Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type Interpretation
- type InterpretationClient
- func (c *InterpretationClient) Create() *InterpretationCreate
- func (c *InterpretationClient) CreateBulk(builders ...*InterpretationCreate) *InterpretationCreateBulk
- func (c *InterpretationClient) Delete() *InterpretationDelete
- func (c *InterpretationClient) DeleteOne(i *Interpretation) *InterpretationDeleteOne
- func (c *InterpretationClient) DeleteOneID(id uuid.UUID) *InterpretationDeleteOne
- func (c *InterpretationClient) Get(ctx context.Context, id uuid.UUID) (*Interpretation, error)
- func (c *InterpretationClient) GetX(ctx context.Context, id uuid.UUID) *Interpretation
- func (c *InterpretationClient) Hooks() []Hook
- func (c *InterpretationClient) Query() *InterpretationQuery
- func (c *InterpretationClient) QueryScale(i *Interpretation) *ScaleQuery
- func (c *InterpretationClient) QueryTranslations(i *Interpretation) *InterpretationTranslationQuery
- func (c *InterpretationClient) Update() *InterpretationUpdate
- func (c *InterpretationClient) UpdateOne(i *Interpretation) *InterpretationUpdateOne
- func (c *InterpretationClient) UpdateOneID(id uuid.UUID) *InterpretationUpdateOne
- func (c *InterpretationClient) Use(hooks ...Hook)
- type InterpretationCreate
- func (ic *InterpretationCreate) AddTranslationIDs(ids ...uuid.UUID) *InterpretationCreate
- func (ic *InterpretationCreate) AddTranslations(i ...*InterpretationTranslation) *InterpretationCreate
- func (ic *InterpretationCreate) Exec(ctx context.Context) error
- func (ic *InterpretationCreate) ExecX(ctx context.Context)
- func (ic *InterpretationCreate) Mutation() *InterpretationMutation
- func (ic *InterpretationCreate) Save(ctx context.Context) (*Interpretation, error)
- func (ic *InterpretationCreate) SaveX(ctx context.Context) *Interpretation
- func (ic *InterpretationCreate) SetCreateTime(t time.Time) *InterpretationCreate
- func (ic *InterpretationCreate) SetID(u uuid.UUID) *InterpretationCreate
- func (ic *InterpretationCreate) SetNillableCreateTime(t *time.Time) *InterpretationCreate
- func (ic *InterpretationCreate) SetNillableID(u *uuid.UUID) *InterpretationCreate
- func (ic *InterpretationCreate) SetNillableScaleID(id *uuid.UUID) *InterpretationCreate
- func (ic *InterpretationCreate) SetNillableUpdateTime(t *time.Time) *InterpretationCreate
- func (ic *InterpretationCreate) SetRange(f [2]float64) *InterpretationCreate
- func (ic *InterpretationCreate) SetScale(s *Scale) *InterpretationCreate
- func (ic *InterpretationCreate) SetScaleID(id uuid.UUID) *InterpretationCreate
- func (ic *InterpretationCreate) SetUpdateTime(t time.Time) *InterpretationCreate
- type InterpretationCreateBulk
- func (icb *InterpretationCreateBulk) Exec(ctx context.Context) error
- func (icb *InterpretationCreateBulk) ExecX(ctx context.Context)
- func (icb *InterpretationCreateBulk) Save(ctx context.Context) ([]*Interpretation, error)
- func (icb *InterpretationCreateBulk) SaveX(ctx context.Context) []*Interpretation
- type InterpretationDelete
- type InterpretationDeleteOne
- type InterpretationEdges
- type InterpretationGroupBy
- func (igb *InterpretationGroupBy) Aggregate(fns ...AggregateFunc) *InterpretationGroupBy
- func (s *InterpretationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InterpretationGroupBy) BoolX(ctx context.Context) bool
- func (s *InterpretationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InterpretationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InterpretationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InterpretationGroupBy) Float64X(ctx context.Context) float64
- func (s *InterpretationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InterpretationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InterpretationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InterpretationGroupBy) IntX(ctx context.Context) int
- func (s *InterpretationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InterpretationGroupBy) IntsX(ctx context.Context) []int
- func (igb *InterpretationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *InterpretationGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *InterpretationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InterpretationGroupBy) StringX(ctx context.Context) string
- func (s *InterpretationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InterpretationGroupBy) StringsX(ctx context.Context) []string
- type InterpretationMutation
- func (m *InterpretationMutation) AddField(name string, value ent.Value) error
- func (m *InterpretationMutation) AddTranslationIDs(ids ...uuid.UUID)
- func (m *InterpretationMutation) AddedEdges() []string
- func (m *InterpretationMutation) AddedField(name string) (ent.Value, bool)
- func (m *InterpretationMutation) AddedFields() []string
- func (m *InterpretationMutation) AddedIDs(name string) []ent.Value
- func (m *InterpretationMutation) ClearEdge(name string) error
- func (m *InterpretationMutation) ClearField(name string) error
- func (m *InterpretationMutation) ClearScale()
- func (m *InterpretationMutation) ClearTranslations()
- func (m *InterpretationMutation) ClearedEdges() []string
- func (m *InterpretationMutation) ClearedFields() []string
- func (m InterpretationMutation) Client() *Client
- func (m *InterpretationMutation) CreateTime() (r time.Time, exists bool)
- func (m *InterpretationMutation) EdgeCleared(name string) bool
- func (m *InterpretationMutation) Field(name string) (ent.Value, bool)
- func (m *InterpretationMutation) FieldCleared(name string) bool
- func (m *InterpretationMutation) Fields() []string
- func (m *InterpretationMutation) ID() (id uuid.UUID, exists bool)
- func (m *InterpretationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *InterpretationMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *InterpretationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InterpretationMutation) OldRange(ctx context.Context) (v [2]float64, err error)
- func (m *InterpretationMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *InterpretationMutation) Op() Op
- func (m *InterpretationMutation) Range() (r [2]float64, exists bool)
- func (m *InterpretationMutation) RemoveTranslationIDs(ids ...uuid.UUID)
- func (m *InterpretationMutation) RemovedEdges() []string
- func (m *InterpretationMutation) RemovedIDs(name string) []ent.Value
- func (m *InterpretationMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
- func (m *InterpretationMutation) ResetCreateTime()
- func (m *InterpretationMutation) ResetEdge(name string) error
- func (m *InterpretationMutation) ResetField(name string) error
- func (m *InterpretationMutation) ResetRange()
- func (m *InterpretationMutation) ResetScale()
- func (m *InterpretationMutation) ResetTranslations()
- func (m *InterpretationMutation) ResetUpdateTime()
- func (m *InterpretationMutation) ScaleCleared() bool
- func (m *InterpretationMutation) ScaleID() (id uuid.UUID, exists bool)
- func (m *InterpretationMutation) ScaleIDs() (ids []uuid.UUID)
- func (m *InterpretationMutation) SetCreateTime(t time.Time)
- func (m *InterpretationMutation) SetField(name string, value ent.Value) error
- func (m *InterpretationMutation) SetID(id uuid.UUID)
- func (m *InterpretationMutation) SetRange(f [2]float64)
- func (m *InterpretationMutation) SetScaleID(id uuid.UUID)
- func (m *InterpretationMutation) SetUpdateTime(t time.Time)
- func (m *InterpretationMutation) TranslationsCleared() bool
- func (m *InterpretationMutation) TranslationsIDs() (ids []uuid.UUID)
- func (m InterpretationMutation) Tx() (*Tx, error)
- func (m *InterpretationMutation) Type() string
- func (m *InterpretationMutation) UpdateTime() (r time.Time, exists bool)
- func (m *InterpretationMutation) Where(ps ...predicate.Interpretation)
- type InterpretationQuery
- func (iq *InterpretationQuery) All(ctx context.Context) ([]*Interpretation, error)
- func (iq *InterpretationQuery) AllX(ctx context.Context) []*Interpretation
- func (iq *InterpretationQuery) Clone() *InterpretationQuery
- func (iq *InterpretationQuery) Count(ctx context.Context) (int, error)
- func (iq *InterpretationQuery) CountX(ctx context.Context) int
- func (iq *InterpretationQuery) Exist(ctx context.Context) (bool, error)
- func (iq *InterpretationQuery) ExistX(ctx context.Context) bool
- func (iq *InterpretationQuery) First(ctx context.Context) (*Interpretation, error)
- func (iq *InterpretationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *InterpretationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (iq *InterpretationQuery) FirstX(ctx context.Context) *Interpretation
- func (iq *InterpretationQuery) GroupBy(field string, fields ...string) *InterpretationGroupBy
- func (iq *InterpretationQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (iq *InterpretationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (iq *InterpretationQuery) Limit(limit int) *InterpretationQuery
- func (iq *InterpretationQuery) Offset(offset int) *InterpretationQuery
- func (iq *InterpretationQuery) Only(ctx context.Context) (*Interpretation, error)
- func (iq *InterpretationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *InterpretationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (iq *InterpretationQuery) OnlyX(ctx context.Context) *Interpretation
- func (iq *InterpretationQuery) Order(o ...OrderFunc) *InterpretationQuery
- func (iq *InterpretationQuery) QueryScale() *ScaleQuery
- func (iq *InterpretationQuery) QueryTranslations() *InterpretationTranslationQuery
- func (iq *InterpretationQuery) Select(fields ...string) *InterpretationSelect
- func (iq *InterpretationQuery) Unique(unique bool) *InterpretationQuery
- func (iq *InterpretationQuery) Where(ps ...predicate.Interpretation) *InterpretationQuery
- func (iq *InterpretationQuery) WithScale(opts ...func(*ScaleQuery)) *InterpretationQuery
- func (iq *InterpretationQuery) WithTranslations(opts ...func(*InterpretationTranslationQuery)) *InterpretationQuery
- type InterpretationSelect
- func (s *InterpretationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InterpretationSelect) BoolX(ctx context.Context) bool
- func (s *InterpretationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InterpretationSelect) BoolsX(ctx context.Context) []bool
- func (s *InterpretationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InterpretationSelect) Float64X(ctx context.Context) float64
- func (s *InterpretationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InterpretationSelect) Float64sX(ctx context.Context) []float64
- func (s *InterpretationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *InterpretationSelect) IntX(ctx context.Context) int
- func (s *InterpretationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *InterpretationSelect) IntsX(ctx context.Context) []int
- func (is *InterpretationSelect) Scan(ctx context.Context, v interface{}) error
- func (s *InterpretationSelect) ScanX(ctx context.Context, v interface{})
- func (s *InterpretationSelect) String(ctx context.Context) (_ string, err error)
- func (s *InterpretationSelect) StringX(ctx context.Context) string
- func (s *InterpretationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *InterpretationSelect) StringsX(ctx context.Context) []string
- type InterpretationTranslation
- type InterpretationTranslationClient
- func (c *InterpretationTranslationClient) Create() *InterpretationTranslationCreate
- func (c *InterpretationTranslationClient) CreateBulk(builders ...*InterpretationTranslationCreate) *InterpretationTranslationCreateBulk
- func (c *InterpretationTranslationClient) Delete() *InterpretationTranslationDelete
- func (c *InterpretationTranslationClient) DeleteOne(it *InterpretationTranslation) *InterpretationTranslationDeleteOne
- func (c *InterpretationTranslationClient) DeleteOneID(id uuid.UUID) *InterpretationTranslationDeleteOne
- func (c *InterpretationTranslationClient) Get(ctx context.Context, id uuid.UUID) (*InterpretationTranslation, error)
- func (c *InterpretationTranslationClient) GetX(ctx context.Context, id uuid.UUID) *InterpretationTranslation
- func (c *InterpretationTranslationClient) Hooks() []Hook
- func (c *InterpretationTranslationClient) Query() *InterpretationTranslationQuery
- func (c *InterpretationTranslationClient) QueryInterpretation(it *InterpretationTranslation) *InterpretationQuery
- func (c *InterpretationTranslationClient) Update() *InterpretationTranslationUpdate
- func (c *InterpretationTranslationClient) UpdateOne(it *InterpretationTranslation) *InterpretationTranslationUpdateOne
- func (c *InterpretationTranslationClient) UpdateOneID(id uuid.UUID) *InterpretationTranslationUpdateOne
- func (c *InterpretationTranslationClient) Use(hooks ...Hook)
- type InterpretationTranslationCreate
- func (itc *InterpretationTranslationCreate) Exec(ctx context.Context) error
- func (itc *InterpretationTranslationCreate) ExecX(ctx context.Context)
- func (itc *InterpretationTranslationCreate) Mutation() *InterpretationTranslationMutation
- func (itc *InterpretationTranslationCreate) Save(ctx context.Context) (*InterpretationTranslation, error)
- func (itc *InterpretationTranslationCreate) SaveX(ctx context.Context) *InterpretationTranslation
- func (itc *InterpretationTranslationCreate) SetContent(s string) *InterpretationTranslationCreate
- func (itc *InterpretationTranslationCreate) SetID(u uuid.UUID) *InterpretationTranslationCreate
- func (itc *InterpretationTranslationCreate) SetInterpretation(i *Interpretation) *InterpretationTranslationCreate
- func (itc *InterpretationTranslationCreate) SetInterpretationID(id uuid.UUID) *InterpretationTranslationCreate
- func (itc *InterpretationTranslationCreate) SetLocale(i interpretationtranslation.Locale) *InterpretationTranslationCreate
- func (itc *InterpretationTranslationCreate) SetNillableID(u *uuid.UUID) *InterpretationTranslationCreate
- func (itc *InterpretationTranslationCreate) SetNillableInterpretationID(id *uuid.UUID) *InterpretationTranslationCreate
- type InterpretationTranslationCreateBulk
- func (itcb *InterpretationTranslationCreateBulk) Exec(ctx context.Context) error
- func (itcb *InterpretationTranslationCreateBulk) ExecX(ctx context.Context)
- func (itcb *InterpretationTranslationCreateBulk) Save(ctx context.Context) ([]*InterpretationTranslation, error)
- func (itcb *InterpretationTranslationCreateBulk) SaveX(ctx context.Context) []*InterpretationTranslation
- type InterpretationTranslationDelete
- type InterpretationTranslationDeleteOne
- type InterpretationTranslationEdges
- type InterpretationTranslationGroupBy
- func (itgb *InterpretationTranslationGroupBy) Aggregate(fns ...AggregateFunc) *InterpretationTranslationGroupBy
- func (s *InterpretationTranslationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InterpretationTranslationGroupBy) BoolX(ctx context.Context) bool
- func (s *InterpretationTranslationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InterpretationTranslationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InterpretationTranslationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InterpretationTranslationGroupBy) Float64X(ctx context.Context) float64
- func (s *InterpretationTranslationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InterpretationTranslationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InterpretationTranslationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InterpretationTranslationGroupBy) IntX(ctx context.Context) int
- func (s *InterpretationTranslationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InterpretationTranslationGroupBy) IntsX(ctx context.Context) []int
- func (itgb *InterpretationTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *InterpretationTranslationGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *InterpretationTranslationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InterpretationTranslationGroupBy) StringX(ctx context.Context) string
- func (s *InterpretationTranslationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InterpretationTranslationGroupBy) StringsX(ctx context.Context) []string
- type InterpretationTranslationMutation
- func (m *InterpretationTranslationMutation) AddField(name string, value ent.Value) error
- func (m *InterpretationTranslationMutation) AddedEdges() []string
- func (m *InterpretationTranslationMutation) AddedField(name string) (ent.Value, bool)
- func (m *InterpretationTranslationMutation) AddedFields() []string
- func (m *InterpretationTranslationMutation) AddedIDs(name string) []ent.Value
- func (m *InterpretationTranslationMutation) ClearEdge(name string) error
- func (m *InterpretationTranslationMutation) ClearField(name string) error
- func (m *InterpretationTranslationMutation) ClearInterpretation()
- func (m *InterpretationTranslationMutation) ClearedEdges() []string
- func (m *InterpretationTranslationMutation) ClearedFields() []string
- func (m InterpretationTranslationMutation) Client() *Client
- func (m *InterpretationTranslationMutation) Content() (r string, exists bool)
- func (m *InterpretationTranslationMutation) EdgeCleared(name string) bool
- func (m *InterpretationTranslationMutation) Field(name string) (ent.Value, bool)
- func (m *InterpretationTranslationMutation) FieldCleared(name string) bool
- func (m *InterpretationTranslationMutation) Fields() []string
- func (m *InterpretationTranslationMutation) ID() (id uuid.UUID, exists bool)
- func (m *InterpretationTranslationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *InterpretationTranslationMutation) InterpretationCleared() bool
- func (m *InterpretationTranslationMutation) InterpretationID() (id uuid.UUID, exists bool)
- func (m *InterpretationTranslationMutation) InterpretationIDs() (ids []uuid.UUID)
- func (m *InterpretationTranslationMutation) Locale() (r interpretationtranslation.Locale, exists bool)
- func (m *InterpretationTranslationMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *InterpretationTranslationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InterpretationTranslationMutation) OldLocale(ctx context.Context) (v interpretationtranslation.Locale, err error)
- func (m *InterpretationTranslationMutation) Op() Op
- func (m *InterpretationTranslationMutation) RemovedEdges() []string
- func (m *InterpretationTranslationMutation) RemovedIDs(name string) []ent.Value
- func (m *InterpretationTranslationMutation) ResetContent()
- func (m *InterpretationTranslationMutation) ResetEdge(name string) error
- func (m *InterpretationTranslationMutation) ResetField(name string) error
- func (m *InterpretationTranslationMutation) ResetInterpretation()
- func (m *InterpretationTranslationMutation) ResetLocale()
- func (m *InterpretationTranslationMutation) SetContent(s string)
- func (m *InterpretationTranslationMutation) SetField(name string, value ent.Value) error
- func (m *InterpretationTranslationMutation) SetID(id uuid.UUID)
- func (m *InterpretationTranslationMutation) SetInterpretationID(id uuid.UUID)
- func (m *InterpretationTranslationMutation) SetLocale(i interpretationtranslation.Locale)
- func (m InterpretationTranslationMutation) Tx() (*Tx, error)
- func (m *InterpretationTranslationMutation) Type() string
- func (m *InterpretationTranslationMutation) Where(ps ...predicate.InterpretationTranslation)
- type InterpretationTranslationQuery
- func (itq *InterpretationTranslationQuery) All(ctx context.Context) ([]*InterpretationTranslation, error)
- func (itq *InterpretationTranslationQuery) AllX(ctx context.Context) []*InterpretationTranslation
- func (itq *InterpretationTranslationQuery) Clone() *InterpretationTranslationQuery
- func (itq *InterpretationTranslationQuery) Count(ctx context.Context) (int, error)
- func (itq *InterpretationTranslationQuery) CountX(ctx context.Context) int
- func (itq *InterpretationTranslationQuery) Exist(ctx context.Context) (bool, error)
- func (itq *InterpretationTranslationQuery) ExistX(ctx context.Context) bool
- func (itq *InterpretationTranslationQuery) First(ctx context.Context) (*InterpretationTranslation, error)
- func (itq *InterpretationTranslationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (itq *InterpretationTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (itq *InterpretationTranslationQuery) FirstX(ctx context.Context) *InterpretationTranslation
- func (itq *InterpretationTranslationQuery) GroupBy(field string, fields ...string) *InterpretationTranslationGroupBy
- func (itq *InterpretationTranslationQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (itq *InterpretationTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (itq *InterpretationTranslationQuery) Limit(limit int) *InterpretationTranslationQuery
- func (itq *InterpretationTranslationQuery) Offset(offset int) *InterpretationTranslationQuery
- func (itq *InterpretationTranslationQuery) Only(ctx context.Context) (*InterpretationTranslation, error)
- func (itq *InterpretationTranslationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (itq *InterpretationTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (itq *InterpretationTranslationQuery) OnlyX(ctx context.Context) *InterpretationTranslation
- func (itq *InterpretationTranslationQuery) Order(o ...OrderFunc) *InterpretationTranslationQuery
- func (itq *InterpretationTranslationQuery) QueryInterpretation() *InterpretationQuery
- func (itq *InterpretationTranslationQuery) Select(fields ...string) *InterpretationTranslationSelect
- func (itq *InterpretationTranslationQuery) Unique(unique bool) *InterpretationTranslationQuery
- func (itq *InterpretationTranslationQuery) Where(ps ...predicate.InterpretationTranslation) *InterpretationTranslationQuery
- func (itq *InterpretationTranslationQuery) WithInterpretation(opts ...func(*InterpretationQuery)) *InterpretationTranslationQuery
- type InterpretationTranslationSelect
- func (s *InterpretationTranslationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InterpretationTranslationSelect) BoolX(ctx context.Context) bool
- func (s *InterpretationTranslationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InterpretationTranslationSelect) BoolsX(ctx context.Context) []bool
- func (s *InterpretationTranslationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InterpretationTranslationSelect) Float64X(ctx context.Context) float64
- func (s *InterpretationTranslationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InterpretationTranslationSelect) Float64sX(ctx context.Context) []float64
- func (s *InterpretationTranslationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *InterpretationTranslationSelect) IntX(ctx context.Context) int
- func (s *InterpretationTranslationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *InterpretationTranslationSelect) IntsX(ctx context.Context) []int
- func (its *InterpretationTranslationSelect) Scan(ctx context.Context, v interface{}) error
- func (s *InterpretationTranslationSelect) ScanX(ctx context.Context, v interface{})
- func (s *InterpretationTranslationSelect) String(ctx context.Context) (_ string, err error)
- func (s *InterpretationTranslationSelect) StringX(ctx context.Context) string
- func (s *InterpretationTranslationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *InterpretationTranslationSelect) StringsX(ctx context.Context) []string
- type InterpretationTranslationUpdate
- func (itu *InterpretationTranslationUpdate) ClearInterpretation() *InterpretationTranslationUpdate
- func (itu *InterpretationTranslationUpdate) Exec(ctx context.Context) error
- func (itu *InterpretationTranslationUpdate) ExecX(ctx context.Context)
- func (itu *InterpretationTranslationUpdate) Mutation() *InterpretationTranslationMutation
- func (itu *InterpretationTranslationUpdate) Save(ctx context.Context) (int, error)
- func (itu *InterpretationTranslationUpdate) SaveX(ctx context.Context) int
- func (itu *InterpretationTranslationUpdate) SetContent(s string) *InterpretationTranslationUpdate
- func (itu *InterpretationTranslationUpdate) SetInterpretation(i *Interpretation) *InterpretationTranslationUpdate
- func (itu *InterpretationTranslationUpdate) SetInterpretationID(id uuid.UUID) *InterpretationTranslationUpdate
- func (itu *InterpretationTranslationUpdate) SetNillableInterpretationID(id *uuid.UUID) *InterpretationTranslationUpdate
- func (itu *InterpretationTranslationUpdate) Where(ps ...predicate.InterpretationTranslation) *InterpretationTranslationUpdate
- type InterpretationTranslationUpdateOne
- func (ituo *InterpretationTranslationUpdateOne) ClearInterpretation() *InterpretationTranslationUpdateOne
- func (ituo *InterpretationTranslationUpdateOne) Exec(ctx context.Context) error
- func (ituo *InterpretationTranslationUpdateOne) ExecX(ctx context.Context)
- func (ituo *InterpretationTranslationUpdateOne) Mutation() *InterpretationTranslationMutation
- func (ituo *InterpretationTranslationUpdateOne) Save(ctx context.Context) (*InterpretationTranslation, error)
- func (ituo *InterpretationTranslationUpdateOne) SaveX(ctx context.Context) *InterpretationTranslation
- func (ituo *InterpretationTranslationUpdateOne) Select(field string, fields ...string) *InterpretationTranslationUpdateOne
- func (ituo *InterpretationTranslationUpdateOne) SetContent(s string) *InterpretationTranslationUpdateOne
- func (ituo *InterpretationTranslationUpdateOne) SetInterpretation(i *Interpretation) *InterpretationTranslationUpdateOne
- func (ituo *InterpretationTranslationUpdateOne) SetInterpretationID(id uuid.UUID) *InterpretationTranslationUpdateOne
- func (ituo *InterpretationTranslationUpdateOne) SetNillableInterpretationID(id *uuid.UUID) *InterpretationTranslationUpdateOne
- type InterpretationTranslations
- type InterpretationUpdate
- func (iu *InterpretationUpdate) AddTranslationIDs(ids ...uuid.UUID) *InterpretationUpdate
- func (iu *InterpretationUpdate) AddTranslations(i ...*InterpretationTranslation) *InterpretationUpdate
- func (iu *InterpretationUpdate) ClearScale() *InterpretationUpdate
- func (iu *InterpretationUpdate) ClearTranslations() *InterpretationUpdate
- func (iu *InterpretationUpdate) Exec(ctx context.Context) error
- func (iu *InterpretationUpdate) ExecX(ctx context.Context)
- func (iu *InterpretationUpdate) Mutation() *InterpretationMutation
- func (iu *InterpretationUpdate) RemoveTranslationIDs(ids ...uuid.UUID) *InterpretationUpdate
- func (iu *InterpretationUpdate) RemoveTranslations(i ...*InterpretationTranslation) *InterpretationUpdate
- func (iu *InterpretationUpdate) Save(ctx context.Context) (int, error)
- func (iu *InterpretationUpdate) SaveX(ctx context.Context) int
- func (iu *InterpretationUpdate) SetNillableScaleID(id *uuid.UUID) *InterpretationUpdate
- func (iu *InterpretationUpdate) SetRange(f [2]float64) *InterpretationUpdate
- func (iu *InterpretationUpdate) SetScale(s *Scale) *InterpretationUpdate
- func (iu *InterpretationUpdate) SetScaleID(id uuid.UUID) *InterpretationUpdate
- func (iu *InterpretationUpdate) SetUpdateTime(t time.Time) *InterpretationUpdate
- func (iu *InterpretationUpdate) Where(ps ...predicate.Interpretation) *InterpretationUpdate
- type InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) AddTranslations(i ...*InterpretationTranslation) *InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) ClearScale() *InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) ClearTranslations() *InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) Exec(ctx context.Context) error
- func (iuo *InterpretationUpdateOne) ExecX(ctx context.Context)
- func (iuo *InterpretationUpdateOne) Mutation() *InterpretationMutation
- func (iuo *InterpretationUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) RemoveTranslations(i ...*InterpretationTranslation) *InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) Save(ctx context.Context) (*Interpretation, error)
- func (iuo *InterpretationUpdateOne) SaveX(ctx context.Context) *Interpretation
- func (iuo *InterpretationUpdateOne) Select(field string, fields ...string) *InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) SetNillableScaleID(id *uuid.UUID) *InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) SetRange(f [2]float64) *InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) SetScale(s *Scale) *InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) SetScaleID(id uuid.UUID) *InterpretationUpdateOne
- func (iuo *InterpretationUpdateOne) SetUpdateTime(t time.Time) *InterpretationUpdateOne
- type Interpretations
- type Item
- func (i *Item) QueryQuestion() *QuestionQuery
- func (i *Item) QueryResponses() *ResponseQuery
- func (i *Item) QueryScale() *ScaleQuery
- func (i *Item) QueryScaleItem() *ScaleItemQuery
- func (i *Item) QueryTranslations() *ItemTranslationQuery
- func (i *Item) String() string
- func (i *Item) Unwrap() *Item
- func (i *Item) Update() *ItemUpdateOne
- type ItemClient
- func (c *ItemClient) Create() *ItemCreate
- func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk
- func (c *ItemClient) Delete() *ItemDelete
- func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne
- func (c *ItemClient) DeleteOneID(id uuid.UUID) *ItemDeleteOne
- func (c *ItemClient) Get(ctx context.Context, id uuid.UUID) (*Item, error)
- func (c *ItemClient) GetX(ctx context.Context, id uuid.UUID) *Item
- func (c *ItemClient) Hooks() []Hook
- func (c *ItemClient) Query() *ItemQuery
- func (c *ItemClient) QueryQuestion(i *Item) *QuestionQuery
- func (c *ItemClient) QueryResponses(i *Item) *ResponseQuery
- func (c *ItemClient) QueryScale(i *Item) *ScaleQuery
- func (c *ItemClient) QueryScaleItem(i *Item) *ScaleItemQuery
- func (c *ItemClient) QueryTranslations(i *Item) *ItemTranslationQuery
- func (c *ItemClient) Update() *ItemUpdate
- func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne
- func (c *ItemClient) UpdateOneID(id uuid.UUID) *ItemUpdateOne
- func (c *ItemClient) Use(hooks ...Hook)
- type ItemCreate
- func (ic *ItemCreate) AddQuestion(q ...*Question) *ItemCreate
- func (ic *ItemCreate) AddQuestionIDs(ids ...uuid.UUID) *ItemCreate
- func (ic *ItemCreate) AddResponseIDs(ids ...uuid.UUID) *ItemCreate
- func (ic *ItemCreate) AddResponses(r ...*Response) *ItemCreate
- func (ic *ItemCreate) AddScale(s ...*Scale) *ItemCreate
- func (ic *ItemCreate) AddScaleIDs(ids ...uuid.UUID) *ItemCreate
- func (ic *ItemCreate) AddTranslationIDs(ids ...uuid.UUID) *ItemCreate
- func (ic *ItemCreate) AddTranslations(i ...*ItemTranslation) *ItemCreate
- func (ic *ItemCreate) Exec(ctx context.Context) error
- func (ic *ItemCreate) ExecX(ctx context.Context)
- func (ic *ItemCreate) Mutation() *ItemMutation
- func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)
- func (ic *ItemCreate) SaveX(ctx context.Context) *Item
- func (ic *ItemCreate) SetCode(s string) *ItemCreate
- func (ic *ItemCreate) SetCreateTime(t time.Time) *ItemCreate
- func (ic *ItemCreate) SetID(u uuid.UUID) *ItemCreate
- func (ic *ItemCreate) SetNillableCreateTime(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetNillableID(u *uuid.UUID) *ItemCreate
- func (ic *ItemCreate) SetNillableSteps(i *int) *ItemCreate
- func (ic *ItemCreate) SetNillableUpdateTime(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetSteps(i int) *ItemCreate
- func (ic *ItemCreate) SetUpdateTime(t time.Time) *ItemCreate
- type ItemCreateBulk
- type ItemDelete
- type ItemDeleteOne
- type ItemEdges
- type ItemGroupBy
- func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy
- func (s *ItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemGroupBy) BoolX(ctx context.Context) bool
- func (s *ItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemGroupBy) Float64X(ctx context.Context) float64
- func (s *ItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ItemGroupBy) IntX(ctx context.Context) int
- func (s *ItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ItemGroupBy) IntsX(ctx context.Context) []int
- func (igb *ItemGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *ItemGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *ItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ItemGroupBy) StringX(ctx context.Context) string
- func (s *ItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ItemGroupBy) StringsX(ctx context.Context) []string
- type ItemMutation
- func (m *ItemMutation) AddField(name string, value ent.Value) error
- func (m *ItemMutation) AddQuestionIDs(ids ...uuid.UUID)
- func (m *ItemMutation) AddResponseIDs(ids ...uuid.UUID)
- func (m *ItemMutation) AddScaleIDs(ids ...uuid.UUID)
- func (m *ItemMutation) AddSteps(i int)
- func (m *ItemMutation) AddTranslationIDs(ids ...uuid.UUID)
- func (m *ItemMutation) AddedEdges() []string
- func (m *ItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *ItemMutation) AddedFields() []string
- func (m *ItemMutation) AddedIDs(name string) []ent.Value
- func (m *ItemMutation) AddedSteps() (r int, exists bool)
- func (m *ItemMutation) ClearEdge(name string) error
- func (m *ItemMutation) ClearField(name string) error
- func (m *ItemMutation) ClearQuestion()
- func (m *ItemMutation) ClearResponses()
- func (m *ItemMutation) ClearScale()
- func (m *ItemMutation) ClearTranslations()
- func (m *ItemMutation) ClearedEdges() []string
- func (m *ItemMutation) ClearedFields() []string
- func (m ItemMutation) Client() *Client
- func (m *ItemMutation) Code() (r string, exists bool)
- func (m *ItemMutation) CreateTime() (r time.Time, exists bool)
- func (m *ItemMutation) EdgeCleared(name string) bool
- func (m *ItemMutation) Field(name string) (ent.Value, bool)
- func (m *ItemMutation) FieldCleared(name string) bool
- func (m *ItemMutation) Fields() []string
- func (m *ItemMutation) ID() (id uuid.UUID, exists bool)
- func (m *ItemMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ItemMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ItemMutation) OldSteps(ctx context.Context) (v int, err error)
- func (m *ItemMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) Op() Op
- func (m *ItemMutation) QuestionCleared() bool
- func (m *ItemMutation) QuestionIDs() (ids []uuid.UUID)
- func (m *ItemMutation) RemoveQuestionIDs(ids ...uuid.UUID)
- func (m *ItemMutation) RemoveResponseIDs(ids ...uuid.UUID)
- func (m *ItemMutation) RemoveScaleIDs(ids ...uuid.UUID)
- func (m *ItemMutation) RemoveTranslationIDs(ids ...uuid.UUID)
- func (m *ItemMutation) RemovedEdges() []string
- func (m *ItemMutation) RemovedIDs(name string) []ent.Value
- func (m *ItemMutation) RemovedQuestionIDs() (ids []uuid.UUID)
- func (m *ItemMutation) RemovedResponsesIDs() (ids []uuid.UUID)
- func (m *ItemMutation) RemovedScaleIDs() (ids []uuid.UUID)
- func (m *ItemMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
- func (m *ItemMutation) ResetCode()
- func (m *ItemMutation) ResetCreateTime()
- func (m *ItemMutation) ResetEdge(name string) error
- func (m *ItemMutation) ResetField(name string) error
- func (m *ItemMutation) ResetQuestion()
- func (m *ItemMutation) ResetResponses()
- func (m *ItemMutation) ResetScale()
- func (m *ItemMutation) ResetSteps()
- func (m *ItemMutation) ResetTranslations()
- func (m *ItemMutation) ResetUpdateTime()
- func (m *ItemMutation) ResponsesCleared() bool
- func (m *ItemMutation) ResponsesIDs() (ids []uuid.UUID)
- func (m *ItemMutation) ScaleCleared() bool
- func (m *ItemMutation) ScaleIDs() (ids []uuid.UUID)
- func (m *ItemMutation) SetCode(s string)
- func (m *ItemMutation) SetCreateTime(t time.Time)
- func (m *ItemMutation) SetField(name string, value ent.Value) error
- func (m *ItemMutation) SetID(id uuid.UUID)
- func (m *ItemMutation) SetSteps(i int)
- func (m *ItemMutation) SetUpdateTime(t time.Time)
- func (m *ItemMutation) Steps() (r int, exists bool)
- func (m *ItemMutation) TranslationsCleared() bool
- func (m *ItemMutation) TranslationsIDs() (ids []uuid.UUID)
- func (m ItemMutation) Tx() (*Tx, error)
- func (m *ItemMutation) Type() string
- func (m *ItemMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ItemMutation) Where(ps ...predicate.Item)
- type ItemQuery
- func (iq *ItemQuery) All(ctx context.Context) ([]*Item, error)
- func (iq *ItemQuery) AllX(ctx context.Context) []*Item
- func (iq *ItemQuery) Clone() *ItemQuery
- func (iq *ItemQuery) Count(ctx context.Context) (int, error)
- func (iq *ItemQuery) CountX(ctx context.Context) int
- func (iq *ItemQuery) Exist(ctx context.Context) (bool, error)
- func (iq *ItemQuery) ExistX(ctx context.Context) bool
- func (iq *ItemQuery) First(ctx context.Context) (*Item, error)
- func (iq *ItemQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *ItemQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (iq *ItemQuery) FirstX(ctx context.Context) *Item
- func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy
- func (iq *ItemQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (iq *ItemQuery) IDsX(ctx context.Context) []uuid.UUID
- func (iq *ItemQuery) Limit(limit int) *ItemQuery
- func (iq *ItemQuery) Offset(offset int) *ItemQuery
- func (iq *ItemQuery) Only(ctx context.Context) (*Item, error)
- func (iq *ItemQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *ItemQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (iq *ItemQuery) OnlyX(ctx context.Context) *Item
- func (iq *ItemQuery) Order(o ...OrderFunc) *ItemQuery
- func (iq *ItemQuery) QueryQuestion() *QuestionQuery
- func (iq *ItemQuery) QueryResponses() *ResponseQuery
- func (iq *ItemQuery) QueryScale() *ScaleQuery
- func (iq *ItemQuery) QueryScaleItem() *ScaleItemQuery
- func (iq *ItemQuery) QueryTranslations() *ItemTranslationQuery
- func (iq *ItemQuery) Select(fields ...string) *ItemSelect
- func (iq *ItemQuery) Unique(unique bool) *ItemQuery
- func (iq *ItemQuery) Where(ps ...predicate.Item) *ItemQuery
- func (iq *ItemQuery) WithQuestion(opts ...func(*QuestionQuery)) *ItemQuery
- func (iq *ItemQuery) WithResponses(opts ...func(*ResponseQuery)) *ItemQuery
- func (iq *ItemQuery) WithScale(opts ...func(*ScaleQuery)) *ItemQuery
- func (iq *ItemQuery) WithScaleItem(opts ...func(*ScaleItemQuery)) *ItemQuery
- func (iq *ItemQuery) WithTranslations(opts ...func(*ItemTranslationQuery)) *ItemQuery
- type ItemSelect
- func (s *ItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemSelect) BoolX(ctx context.Context) bool
- func (s *ItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemSelect) BoolsX(ctx context.Context) []bool
- func (s *ItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemSelect) Float64X(ctx context.Context) float64
- func (s *ItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemSelect) Float64sX(ctx context.Context) []float64
- func (s *ItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ItemSelect) IntX(ctx context.Context) int
- func (s *ItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ItemSelect) IntsX(ctx context.Context) []int
- func (is *ItemSelect) Scan(ctx context.Context, v interface{}) error
- func (s *ItemSelect) ScanX(ctx context.Context, v interface{})
- func (s *ItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *ItemSelect) StringX(ctx context.Context) string
- func (s *ItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ItemSelect) StringsX(ctx context.Context) []string
- type ItemTranslation
- type ItemTranslationClient
- func (c *ItemTranslationClient) Create() *ItemTranslationCreate
- func (c *ItemTranslationClient) CreateBulk(builders ...*ItemTranslationCreate) *ItemTranslationCreateBulk
- func (c *ItemTranslationClient) Delete() *ItemTranslationDelete
- func (c *ItemTranslationClient) DeleteOne(it *ItemTranslation) *ItemTranslationDeleteOne
- func (c *ItemTranslationClient) DeleteOneID(id uuid.UUID) *ItemTranslationDeleteOne
- func (c *ItemTranslationClient) Get(ctx context.Context, id uuid.UUID) (*ItemTranslation, error)
- func (c *ItemTranslationClient) GetX(ctx context.Context, id uuid.UUID) *ItemTranslation
- func (c *ItemTranslationClient) Hooks() []Hook
- func (c *ItemTranslationClient) Query() *ItemTranslationQuery
- func (c *ItemTranslationClient) QueryItem(it *ItemTranslation) *ItemQuery
- func (c *ItemTranslationClient) Update() *ItemTranslationUpdate
- func (c *ItemTranslationClient) UpdateOne(it *ItemTranslation) *ItemTranslationUpdateOne
- func (c *ItemTranslationClient) UpdateOneID(id uuid.UUID) *ItemTranslationUpdateOne
- func (c *ItemTranslationClient) Use(hooks ...Hook)
- type ItemTranslationCreate
- func (itc *ItemTranslationCreate) Exec(ctx context.Context) error
- func (itc *ItemTranslationCreate) ExecX(ctx context.Context)
- func (itc *ItemTranslationCreate) Mutation() *ItemTranslationMutation
- func (itc *ItemTranslationCreate) Save(ctx context.Context) (*ItemTranslation, error)
- func (itc *ItemTranslationCreate) SaveX(ctx context.Context) *ItemTranslation
- func (itc *ItemTranslationCreate) SetContent(s string) *ItemTranslationCreate
- func (itc *ItemTranslationCreate) SetID(u uuid.UUID) *ItemTranslationCreate
- func (itc *ItemTranslationCreate) SetItem(i *Item) *ItemTranslationCreate
- func (itc *ItemTranslationCreate) SetItemID(id uuid.UUID) *ItemTranslationCreate
- func (itc *ItemTranslationCreate) SetLocale(i itemtranslation.Locale) *ItemTranslationCreate
- func (itc *ItemTranslationCreate) SetNillableID(u *uuid.UUID) *ItemTranslationCreate
- func (itc *ItemTranslationCreate) SetNillableItemID(id *uuid.UUID) *ItemTranslationCreate
- type ItemTranslationCreateBulk
- func (itcb *ItemTranslationCreateBulk) Exec(ctx context.Context) error
- func (itcb *ItemTranslationCreateBulk) ExecX(ctx context.Context)
- func (itcb *ItemTranslationCreateBulk) Save(ctx context.Context) ([]*ItemTranslation, error)
- func (itcb *ItemTranslationCreateBulk) SaveX(ctx context.Context) []*ItemTranslation
- type ItemTranslationDelete
- type ItemTranslationDeleteOne
- type ItemTranslationEdges
- type ItemTranslationGroupBy
- func (itgb *ItemTranslationGroupBy) Aggregate(fns ...AggregateFunc) *ItemTranslationGroupBy
- func (s *ItemTranslationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemTranslationGroupBy) BoolX(ctx context.Context) bool
- func (s *ItemTranslationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemTranslationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ItemTranslationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemTranslationGroupBy) Float64X(ctx context.Context) float64
- func (s *ItemTranslationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemTranslationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ItemTranslationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ItemTranslationGroupBy) IntX(ctx context.Context) int
- func (s *ItemTranslationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ItemTranslationGroupBy) IntsX(ctx context.Context) []int
- func (itgb *ItemTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *ItemTranslationGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *ItemTranslationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ItemTranslationGroupBy) StringX(ctx context.Context) string
- func (s *ItemTranslationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ItemTranslationGroupBy) StringsX(ctx context.Context) []string
- type ItemTranslationMutation
- func (m *ItemTranslationMutation) AddField(name string, value ent.Value) error
- func (m *ItemTranslationMutation) AddedEdges() []string
- func (m *ItemTranslationMutation) AddedField(name string) (ent.Value, bool)
- func (m *ItemTranslationMutation) AddedFields() []string
- func (m *ItemTranslationMutation) AddedIDs(name string) []ent.Value
- func (m *ItemTranslationMutation) ClearEdge(name string) error
- func (m *ItemTranslationMutation) ClearField(name string) error
- func (m *ItemTranslationMutation) ClearItem()
- func (m *ItemTranslationMutation) ClearedEdges() []string
- func (m *ItemTranslationMutation) ClearedFields() []string
- func (m ItemTranslationMutation) Client() *Client
- func (m *ItemTranslationMutation) Content() (r string, exists bool)
- func (m *ItemTranslationMutation) EdgeCleared(name string) bool
- func (m *ItemTranslationMutation) Field(name string) (ent.Value, bool)
- func (m *ItemTranslationMutation) FieldCleared(name string) bool
- func (m *ItemTranslationMutation) Fields() []string
- func (m *ItemTranslationMutation) ID() (id uuid.UUID, exists bool)
- func (m *ItemTranslationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ItemTranslationMutation) ItemCleared() bool
- func (m *ItemTranslationMutation) ItemID() (id uuid.UUID, exists bool)
- func (m *ItemTranslationMutation) ItemIDs() (ids []uuid.UUID)
- func (m *ItemTranslationMutation) Locale() (r itemtranslation.Locale, exists bool)
- func (m *ItemTranslationMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *ItemTranslationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ItemTranslationMutation) OldLocale(ctx context.Context) (v itemtranslation.Locale, err error)
- func (m *ItemTranslationMutation) Op() Op
- func (m *ItemTranslationMutation) RemovedEdges() []string
- func (m *ItemTranslationMutation) RemovedIDs(name string) []ent.Value
- func (m *ItemTranslationMutation) ResetContent()
- func (m *ItemTranslationMutation) ResetEdge(name string) error
- func (m *ItemTranslationMutation) ResetField(name string) error
- func (m *ItemTranslationMutation) ResetItem()
- func (m *ItemTranslationMutation) ResetLocale()
- func (m *ItemTranslationMutation) SetContent(s string)
- func (m *ItemTranslationMutation) SetField(name string, value ent.Value) error
- func (m *ItemTranslationMutation) SetID(id uuid.UUID)
- func (m *ItemTranslationMutation) SetItemID(id uuid.UUID)
- func (m *ItemTranslationMutation) SetLocale(i itemtranslation.Locale)
- func (m ItemTranslationMutation) Tx() (*Tx, error)
- func (m *ItemTranslationMutation) Type() string
- func (m *ItemTranslationMutation) Where(ps ...predicate.ItemTranslation)
- type ItemTranslationQuery
- func (itq *ItemTranslationQuery) All(ctx context.Context) ([]*ItemTranslation, error)
- func (itq *ItemTranslationQuery) AllX(ctx context.Context) []*ItemTranslation
- func (itq *ItemTranslationQuery) Clone() *ItemTranslationQuery
- func (itq *ItemTranslationQuery) Count(ctx context.Context) (int, error)
- func (itq *ItemTranslationQuery) CountX(ctx context.Context) int
- func (itq *ItemTranslationQuery) Exist(ctx context.Context) (bool, error)
- func (itq *ItemTranslationQuery) ExistX(ctx context.Context) bool
- func (itq *ItemTranslationQuery) First(ctx context.Context) (*ItemTranslation, error)
- func (itq *ItemTranslationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (itq *ItemTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (itq *ItemTranslationQuery) FirstX(ctx context.Context) *ItemTranslation
- func (itq *ItemTranslationQuery) GroupBy(field string, fields ...string) *ItemTranslationGroupBy
- func (itq *ItemTranslationQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (itq *ItemTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (itq *ItemTranslationQuery) Limit(limit int) *ItemTranslationQuery
- func (itq *ItemTranslationQuery) Offset(offset int) *ItemTranslationQuery
- func (itq *ItemTranslationQuery) Only(ctx context.Context) (*ItemTranslation, error)
- func (itq *ItemTranslationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (itq *ItemTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (itq *ItemTranslationQuery) OnlyX(ctx context.Context) *ItemTranslation
- func (itq *ItemTranslationQuery) Order(o ...OrderFunc) *ItemTranslationQuery
- func (itq *ItemTranslationQuery) QueryItem() *ItemQuery
- func (itq *ItemTranslationQuery) Select(fields ...string) *ItemTranslationSelect
- func (itq *ItemTranslationQuery) Unique(unique bool) *ItemTranslationQuery
- func (itq *ItemTranslationQuery) Where(ps ...predicate.ItemTranslation) *ItemTranslationQuery
- func (itq *ItemTranslationQuery) WithItem(opts ...func(*ItemQuery)) *ItemTranslationQuery
- type ItemTranslationSelect
- func (s *ItemTranslationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemTranslationSelect) BoolX(ctx context.Context) bool
- func (s *ItemTranslationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemTranslationSelect) BoolsX(ctx context.Context) []bool
- func (s *ItemTranslationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemTranslationSelect) Float64X(ctx context.Context) float64
- func (s *ItemTranslationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemTranslationSelect) Float64sX(ctx context.Context) []float64
- func (s *ItemTranslationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ItemTranslationSelect) IntX(ctx context.Context) int
- func (s *ItemTranslationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ItemTranslationSelect) IntsX(ctx context.Context) []int
- func (its *ItemTranslationSelect) Scan(ctx context.Context, v interface{}) error
- func (s *ItemTranslationSelect) ScanX(ctx context.Context, v interface{})
- func (s *ItemTranslationSelect) String(ctx context.Context) (_ string, err error)
- func (s *ItemTranslationSelect) StringX(ctx context.Context) string
- func (s *ItemTranslationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ItemTranslationSelect) StringsX(ctx context.Context) []string
- type ItemTranslationUpdate
- func (itu *ItemTranslationUpdate) ClearItem() *ItemTranslationUpdate
- func (itu *ItemTranslationUpdate) Exec(ctx context.Context) error
- func (itu *ItemTranslationUpdate) ExecX(ctx context.Context)
- func (itu *ItemTranslationUpdate) Mutation() *ItemTranslationMutation
- func (itu *ItemTranslationUpdate) Save(ctx context.Context) (int, error)
- func (itu *ItemTranslationUpdate) SaveX(ctx context.Context) int
- func (itu *ItemTranslationUpdate) SetContent(s string) *ItemTranslationUpdate
- func (itu *ItemTranslationUpdate) SetItem(i *Item) *ItemTranslationUpdate
- func (itu *ItemTranslationUpdate) SetItemID(id uuid.UUID) *ItemTranslationUpdate
- func (itu *ItemTranslationUpdate) SetNillableItemID(id *uuid.UUID) *ItemTranslationUpdate
- func (itu *ItemTranslationUpdate) Where(ps ...predicate.ItemTranslation) *ItemTranslationUpdate
- type ItemTranslationUpdateOne
- func (ituo *ItemTranslationUpdateOne) ClearItem() *ItemTranslationUpdateOne
- func (ituo *ItemTranslationUpdateOne) Exec(ctx context.Context) error
- func (ituo *ItemTranslationUpdateOne) ExecX(ctx context.Context)
- func (ituo *ItemTranslationUpdateOne) Mutation() *ItemTranslationMutation
- func (ituo *ItemTranslationUpdateOne) Save(ctx context.Context) (*ItemTranslation, error)
- func (ituo *ItemTranslationUpdateOne) SaveX(ctx context.Context) *ItemTranslation
- func (ituo *ItemTranslationUpdateOne) Select(field string, fields ...string) *ItemTranslationUpdateOne
- func (ituo *ItemTranslationUpdateOne) SetContent(s string) *ItemTranslationUpdateOne
- func (ituo *ItemTranslationUpdateOne) SetItem(i *Item) *ItemTranslationUpdateOne
- func (ituo *ItemTranslationUpdateOne) SetItemID(id uuid.UUID) *ItemTranslationUpdateOne
- func (ituo *ItemTranslationUpdateOne) SetNillableItemID(id *uuid.UUID) *ItemTranslationUpdateOne
- type ItemTranslations
- type ItemUpdate
- func (iu *ItemUpdate) AddQuestion(q ...*Question) *ItemUpdate
- func (iu *ItemUpdate) AddQuestionIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) AddResponseIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) AddResponses(r ...*Response) *ItemUpdate
- func (iu *ItemUpdate) AddScale(s ...*Scale) *ItemUpdate
- func (iu *ItemUpdate) AddScaleIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) AddSteps(i int) *ItemUpdate
- func (iu *ItemUpdate) AddTranslationIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) AddTranslations(i ...*ItemTranslation) *ItemUpdate
- func (iu *ItemUpdate) ClearQuestion() *ItemUpdate
- func (iu *ItemUpdate) ClearResponses() *ItemUpdate
- func (iu *ItemUpdate) ClearScale() *ItemUpdate
- func (iu *ItemUpdate) ClearTranslations() *ItemUpdate
- func (iu *ItemUpdate) Exec(ctx context.Context) error
- func (iu *ItemUpdate) ExecX(ctx context.Context)
- func (iu *ItemUpdate) Mutation() *ItemMutation
- func (iu *ItemUpdate) RemoveQuestion(q ...*Question) *ItemUpdate
- func (iu *ItemUpdate) RemoveQuestionIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) RemoveResponseIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) RemoveResponses(r ...*Response) *ItemUpdate
- func (iu *ItemUpdate) RemoveScale(s ...*Scale) *ItemUpdate
- func (iu *ItemUpdate) RemoveScaleIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) RemoveTranslationIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) RemoveTranslations(i ...*ItemTranslation) *ItemUpdate
- func (iu *ItemUpdate) Save(ctx context.Context) (int, error)
- func (iu *ItemUpdate) SaveX(ctx context.Context) int
- func (iu *ItemUpdate) SetNillableSteps(i *int) *ItemUpdate
- func (iu *ItemUpdate) SetSteps(i int) *ItemUpdate
- func (iu *ItemUpdate) SetUpdateTime(t time.Time) *ItemUpdate
- func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate
- type ItemUpdateOne
- func (iuo *ItemUpdateOne) AddQuestion(q ...*Question) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddQuestionIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddResponseIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddResponses(r ...*Response) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddScale(s ...*Scale) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddScaleIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddSteps(i int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddTranslations(i ...*ItemTranslation) *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearQuestion() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearResponses() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearScale() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearTranslations() *ItemUpdateOne
- func (iuo *ItemUpdateOne) Exec(ctx context.Context) error
- func (iuo *ItemUpdateOne) ExecX(ctx context.Context)
- func (iuo *ItemUpdateOne) Mutation() *ItemMutation
- func (iuo *ItemUpdateOne) RemoveQuestion(q ...*Question) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveQuestionIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveResponseIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveResponses(r ...*Response) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveScale(s ...*Scale) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveScaleIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveTranslations(i ...*ItemTranslation) *ItemUpdateOne
- func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)
- func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item
- func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableSteps(i *int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetSteps(i int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetUpdateTime(t time.Time) *ItemUpdateOne
- type Items
- type MutateFunc
- type Mutation
- type Mutator
- type Norm
- type NormClient
- func (c *NormClient) Create() *NormCreate
- func (c *NormClient) CreateBulk(builders ...*NormCreate) *NormCreateBulk
- func (c *NormClient) Delete() *NormDelete
- func (c *NormClient) DeleteOne(n *Norm) *NormDeleteOne
- func (c *NormClient) DeleteOneID(id uuid.UUID) *NormDeleteOne
- func (c *NormClient) Get(ctx context.Context, id uuid.UUID) (*Norm, error)
- func (c *NormClient) GetX(ctx context.Context, id uuid.UUID) *Norm
- func (c *NormClient) Hooks() []Hook
- func (c *NormClient) Query() *NormQuery
- func (c *NormClient) QuerySample(n *Norm) *SampleQuery
- func (c *NormClient) QueryScale(n *Norm) *ScaleQuery
- func (c *NormClient) Update() *NormUpdate
- func (c *NormClient) UpdateOne(n *Norm) *NormUpdateOne
- func (c *NormClient) UpdateOneID(id uuid.UUID) *NormUpdateOne
- func (c *NormClient) Use(hooks ...Hook)
- type NormCreate
- func (nc *NormCreate) Exec(ctx context.Context) error
- func (nc *NormCreate) ExecX(ctx context.Context)
- func (nc *NormCreate) Mutation() *NormMutation
- func (nc *NormCreate) Save(ctx context.Context) (*Norm, error)
- func (nc *NormCreate) SaveX(ctx context.Context) *Norm
- func (nc *NormCreate) SetBase(i int) *NormCreate
- func (nc *NormCreate) SetCreateTime(t time.Time) *NormCreate
- func (nc *NormCreate) SetID(u uuid.UUID) *NormCreate
- func (nc *NormCreate) SetMean(f float64) *NormCreate
- func (nc *NormCreate) SetMeta(m map[string]interface{}) *NormCreate
- func (nc *NormCreate) SetName(s string) *NormCreate
- func (nc *NormCreate) SetNillableBase(i *int) *NormCreate
- func (nc *NormCreate) SetNillableCreateTime(t *time.Time) *NormCreate
- func (nc *NormCreate) SetNillableID(u *uuid.UUID) *NormCreate
- func (nc *NormCreate) SetNillableRank(i *int) *NormCreate
- func (nc *NormCreate) SetNillableUpdateTime(t *time.Time) *NormCreate
- func (nc *NormCreate) SetRank(i int) *NormCreate
- func (nc *NormCreate) SetSample(s *Sample) *NormCreate
- func (nc *NormCreate) SetSampleID(id uuid.UUID) *NormCreate
- func (nc *NormCreate) SetScale(s *Scale) *NormCreate
- func (nc *NormCreate) SetScaleID(id uuid.UUID) *NormCreate
- func (nc *NormCreate) SetSigma(f float64) *NormCreate
- func (nc *NormCreate) SetUpdateTime(t time.Time) *NormCreate
- type NormCreateBulk
- type NormDelete
- type NormDeleteOne
- type NormEdges
- type NormGroupBy
- func (ngb *NormGroupBy) Aggregate(fns ...AggregateFunc) *NormGroupBy
- func (s *NormGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NormGroupBy) BoolX(ctx context.Context) bool
- func (s *NormGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NormGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NormGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NormGroupBy) Float64X(ctx context.Context) float64
- func (s *NormGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NormGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NormGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NormGroupBy) IntX(ctx context.Context) int
- func (s *NormGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NormGroupBy) IntsX(ctx context.Context) []int
- func (ngb *NormGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *NormGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *NormGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NormGroupBy) StringX(ctx context.Context) string
- func (s *NormGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NormGroupBy) StringsX(ctx context.Context) []string
- type NormMutation
- func (m *NormMutation) AddBase(i int)
- func (m *NormMutation) AddField(name string, value ent.Value) error
- func (m *NormMutation) AddMean(f float64)
- func (m *NormMutation) AddRank(i int)
- func (m *NormMutation) AddSigma(f float64)
- func (m *NormMutation) AddedBase() (r int, exists bool)
- func (m *NormMutation) AddedEdges() []string
- func (m *NormMutation) AddedField(name string) (ent.Value, bool)
- func (m *NormMutation) AddedFields() []string
- func (m *NormMutation) AddedIDs(name string) []ent.Value
- func (m *NormMutation) AddedMean() (r float64, exists bool)
- func (m *NormMutation) AddedRank() (r int, exists bool)
- func (m *NormMutation) AddedSigma() (r float64, exists bool)
- func (m *NormMutation) Base() (r int, exists bool)
- func (m *NormMutation) ClearEdge(name string) error
- func (m *NormMutation) ClearField(name string) error
- func (m *NormMutation) ClearMeta()
- func (m *NormMutation) ClearSample()
- func (m *NormMutation) ClearScale()
- func (m *NormMutation) ClearedEdges() []string
- func (m *NormMutation) ClearedFields() []string
- func (m NormMutation) Client() *Client
- func (m *NormMutation) CreateTime() (r time.Time, exists bool)
- func (m *NormMutation) EdgeCleared(name string) bool
- func (m *NormMutation) Field(name string) (ent.Value, bool)
- func (m *NormMutation) FieldCleared(name string) bool
- func (m *NormMutation) Fields() []string
- func (m *NormMutation) ID() (id uuid.UUID, exists bool)
- func (m *NormMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *NormMutation) Mean() (r float64, exists bool)
- func (m *NormMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *NormMutation) MetaCleared() bool
- func (m *NormMutation) Name() (r string, exists bool)
- func (m *NormMutation) OldBase(ctx context.Context) (v int, err error)
- func (m *NormMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *NormMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NormMutation) OldMean(ctx context.Context) (v float64, err error)
- func (m *NormMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *NormMutation) OldName(ctx context.Context) (v string, err error)
- func (m *NormMutation) OldRank(ctx context.Context) (v int, err error)
- func (m *NormMutation) OldSigma(ctx context.Context) (v float64, err error)
- func (m *NormMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *NormMutation) Op() Op
- func (m *NormMutation) Rank() (r int, exists bool)
- func (m *NormMutation) RemovedEdges() []string
- func (m *NormMutation) RemovedIDs(name string) []ent.Value
- func (m *NormMutation) ResetBase()
- func (m *NormMutation) ResetCreateTime()
- func (m *NormMutation) ResetEdge(name string) error
- func (m *NormMutation) ResetField(name string) error
- func (m *NormMutation) ResetMean()
- func (m *NormMutation) ResetMeta()
- func (m *NormMutation) ResetName()
- func (m *NormMutation) ResetRank()
- func (m *NormMutation) ResetSample()
- func (m *NormMutation) ResetScale()
- func (m *NormMutation) ResetSigma()
- func (m *NormMutation) ResetUpdateTime()
- func (m *NormMutation) SampleCleared() bool
- func (m *NormMutation) SampleID() (id uuid.UUID, exists bool)
- func (m *NormMutation) SampleIDs() (ids []uuid.UUID)
- func (m *NormMutation) ScaleCleared() bool
- func (m *NormMutation) ScaleID() (id uuid.UUID, exists bool)
- func (m *NormMutation) ScaleIDs() (ids []uuid.UUID)
- func (m *NormMutation) SetBase(i int)
- func (m *NormMutation) SetCreateTime(t time.Time)
- func (m *NormMutation) SetField(name string, value ent.Value) error
- func (m *NormMutation) SetID(id uuid.UUID)
- func (m *NormMutation) SetMean(f float64)
- func (m *NormMutation) SetMeta(value map[string]interface{})
- func (m *NormMutation) SetName(s string)
- func (m *NormMutation) SetRank(i int)
- func (m *NormMutation) SetSampleID(id uuid.UUID)
- func (m *NormMutation) SetScaleID(id uuid.UUID)
- func (m *NormMutation) SetSigma(f float64)
- func (m *NormMutation) SetUpdateTime(t time.Time)
- func (m *NormMutation) Sigma() (r float64, exists bool)
- func (m NormMutation) Tx() (*Tx, error)
- func (m *NormMutation) Type() string
- func (m *NormMutation) UpdateTime() (r time.Time, exists bool)
- func (m *NormMutation) Where(ps ...predicate.Norm)
- type NormQuery
- func (nq *NormQuery) All(ctx context.Context) ([]*Norm, error)
- func (nq *NormQuery) AllX(ctx context.Context) []*Norm
- func (nq *NormQuery) Clone() *NormQuery
- func (nq *NormQuery) Count(ctx context.Context) (int, error)
- func (nq *NormQuery) CountX(ctx context.Context) int
- func (nq *NormQuery) Exist(ctx context.Context) (bool, error)
- func (nq *NormQuery) ExistX(ctx context.Context) bool
- func (nq *NormQuery) First(ctx context.Context) (*Norm, error)
- func (nq *NormQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (nq *NormQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (nq *NormQuery) FirstX(ctx context.Context) *Norm
- func (nq *NormQuery) GroupBy(field string, fields ...string) *NormGroupBy
- func (nq *NormQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (nq *NormQuery) IDsX(ctx context.Context) []uuid.UUID
- func (nq *NormQuery) Limit(limit int) *NormQuery
- func (nq *NormQuery) Offset(offset int) *NormQuery
- func (nq *NormQuery) Only(ctx context.Context) (*Norm, error)
- func (nq *NormQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (nq *NormQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (nq *NormQuery) OnlyX(ctx context.Context) *Norm
- func (nq *NormQuery) Order(o ...OrderFunc) *NormQuery
- func (nq *NormQuery) QuerySample() *SampleQuery
- func (nq *NormQuery) QueryScale() *ScaleQuery
- func (nq *NormQuery) Select(fields ...string) *NormSelect
- func (nq *NormQuery) Unique(unique bool) *NormQuery
- func (nq *NormQuery) Where(ps ...predicate.Norm) *NormQuery
- func (nq *NormQuery) WithSample(opts ...func(*SampleQuery)) *NormQuery
- func (nq *NormQuery) WithScale(opts ...func(*ScaleQuery)) *NormQuery
- type NormSelect
- func (s *NormSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NormSelect) BoolX(ctx context.Context) bool
- func (s *NormSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NormSelect) BoolsX(ctx context.Context) []bool
- func (s *NormSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NormSelect) Float64X(ctx context.Context) float64
- func (s *NormSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NormSelect) Float64sX(ctx context.Context) []float64
- func (s *NormSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NormSelect) IntX(ctx context.Context) int
- func (s *NormSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NormSelect) IntsX(ctx context.Context) []int
- func (ns *NormSelect) Scan(ctx context.Context, v interface{}) error
- func (s *NormSelect) ScanX(ctx context.Context, v interface{})
- func (s *NormSelect) String(ctx context.Context) (_ string, err error)
- func (s *NormSelect) StringX(ctx context.Context) string
- func (s *NormSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NormSelect) StringsX(ctx context.Context) []string
- type NormUpdate
- func (nu *NormUpdate) AddBase(i int) *NormUpdate
- func (nu *NormUpdate) AddMean(f float64) *NormUpdate
- func (nu *NormUpdate) AddRank(i int) *NormUpdate
- func (nu *NormUpdate) AddSigma(f float64) *NormUpdate
- func (nu *NormUpdate) ClearMeta() *NormUpdate
- func (nu *NormUpdate) ClearSample() *NormUpdate
- func (nu *NormUpdate) ClearScale() *NormUpdate
- func (nu *NormUpdate) Exec(ctx context.Context) error
- func (nu *NormUpdate) ExecX(ctx context.Context)
- func (nu *NormUpdate) Mutation() *NormMutation
- func (nu *NormUpdate) Save(ctx context.Context) (int, error)
- func (nu *NormUpdate) SaveX(ctx context.Context) int
- func (nu *NormUpdate) SetBase(i int) *NormUpdate
- func (nu *NormUpdate) SetMean(f float64) *NormUpdate
- func (nu *NormUpdate) SetMeta(m map[string]interface{}) *NormUpdate
- func (nu *NormUpdate) SetName(s string) *NormUpdate
- func (nu *NormUpdate) SetNillableBase(i *int) *NormUpdate
- func (nu *NormUpdate) SetNillableRank(i *int) *NormUpdate
- func (nu *NormUpdate) SetRank(i int) *NormUpdate
- func (nu *NormUpdate) SetSample(s *Sample) *NormUpdate
- func (nu *NormUpdate) SetSampleID(id uuid.UUID) *NormUpdate
- func (nu *NormUpdate) SetScale(s *Scale) *NormUpdate
- func (nu *NormUpdate) SetScaleID(id uuid.UUID) *NormUpdate
- func (nu *NormUpdate) SetSigma(f float64) *NormUpdate
- func (nu *NormUpdate) SetUpdateTime(t time.Time) *NormUpdate
- func (nu *NormUpdate) Where(ps ...predicate.Norm) *NormUpdate
- type NormUpdateOne
- func (nuo *NormUpdateOne) AddBase(i int) *NormUpdateOne
- func (nuo *NormUpdateOne) AddMean(f float64) *NormUpdateOne
- func (nuo *NormUpdateOne) AddRank(i int) *NormUpdateOne
- func (nuo *NormUpdateOne) AddSigma(f float64) *NormUpdateOne
- func (nuo *NormUpdateOne) ClearMeta() *NormUpdateOne
- func (nuo *NormUpdateOne) ClearSample() *NormUpdateOne
- func (nuo *NormUpdateOne) ClearScale() *NormUpdateOne
- func (nuo *NormUpdateOne) Exec(ctx context.Context) error
- func (nuo *NormUpdateOne) ExecX(ctx context.Context)
- func (nuo *NormUpdateOne) Mutation() *NormMutation
- func (nuo *NormUpdateOne) Save(ctx context.Context) (*Norm, error)
- func (nuo *NormUpdateOne) SaveX(ctx context.Context) *Norm
- func (nuo *NormUpdateOne) Select(field string, fields ...string) *NormUpdateOne
- func (nuo *NormUpdateOne) SetBase(i int) *NormUpdateOne
- func (nuo *NormUpdateOne) SetMean(f float64) *NormUpdateOne
- func (nuo *NormUpdateOne) SetMeta(m map[string]interface{}) *NormUpdateOne
- func (nuo *NormUpdateOne) SetName(s string) *NormUpdateOne
- func (nuo *NormUpdateOne) SetNillableBase(i *int) *NormUpdateOne
- func (nuo *NormUpdateOne) SetNillableRank(i *int) *NormUpdateOne
- func (nuo *NormUpdateOne) SetRank(i int) *NormUpdateOne
- func (nuo *NormUpdateOne) SetSample(s *Sample) *NormUpdateOne
- func (nuo *NormUpdateOne) SetSampleID(id uuid.UUID) *NormUpdateOne
- func (nuo *NormUpdateOne) SetScale(s *Scale) *NormUpdateOne
- func (nuo *NormUpdateOne) SetScaleID(id uuid.UUID) *NormUpdateOne
- func (nuo *NormUpdateOne) SetSigma(f float64) *NormUpdateOne
- func (nuo *NormUpdateOne) SetUpdateTime(t time.Time) *NormUpdateOne
- type Norms
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type Question
- type QuestionClient
- func (c *QuestionClient) Create() *QuestionCreate
- func (c *QuestionClient) CreateBulk(builders ...*QuestionCreate) *QuestionCreateBulk
- func (c *QuestionClient) Delete() *QuestionDelete
- func (c *QuestionClient) DeleteOne(q *Question) *QuestionDeleteOne
- func (c *QuestionClient) DeleteOneID(id uuid.UUID) *QuestionDeleteOne
- func (c *QuestionClient) Get(ctx context.Context, id uuid.UUID) (*Question, error)
- func (c *QuestionClient) GetX(ctx context.Context, id uuid.UUID) *Question
- func (c *QuestionClient) Hooks() []Hook
- func (c *QuestionClient) Query() *QuestionQuery
- func (c *QuestionClient) QueryItems(q *Question) *ItemQuery
- func (c *QuestionClient) QueryTest(q *Question) *TestQuery
- func (c *QuestionClient) QueryTranslations(q *Question) *QuestionTranslationQuery
- func (c *QuestionClient) Update() *QuestionUpdate
- func (c *QuestionClient) UpdateOne(q *Question) *QuestionUpdateOne
- func (c *QuestionClient) UpdateOneID(id uuid.UUID) *QuestionUpdateOne
- func (c *QuestionClient) Use(hooks ...Hook)
- type QuestionCreate
- func (qc *QuestionCreate) AddItemIDs(ids ...uuid.UUID) *QuestionCreate
- func (qc *QuestionCreate) AddItems(i ...*Item) *QuestionCreate
- func (qc *QuestionCreate) AddTest(t ...*Test) *QuestionCreate
- func (qc *QuestionCreate) AddTestIDs(ids ...uuid.UUID) *QuestionCreate
- func (qc *QuestionCreate) AddTranslationIDs(ids ...uuid.UUID) *QuestionCreate
- func (qc *QuestionCreate) AddTranslations(q ...*QuestionTranslation) *QuestionCreate
- func (qc *QuestionCreate) Exec(ctx context.Context) error
- func (qc *QuestionCreate) ExecX(ctx context.Context)
- func (qc *QuestionCreate) Mutation() *QuestionMutation
- func (qc *QuestionCreate) Save(ctx context.Context) (*Question, error)
- func (qc *QuestionCreate) SaveX(ctx context.Context) *Question
- func (qc *QuestionCreate) SetCode(s string) *QuestionCreate
- func (qc *QuestionCreate) SetCreateTime(t time.Time) *QuestionCreate
- func (qc *QuestionCreate) SetID(u uuid.UUID) *QuestionCreate
- func (qc *QuestionCreate) SetNillableCreateTime(t *time.Time) *QuestionCreate
- func (qc *QuestionCreate) SetNillableID(u *uuid.UUID) *QuestionCreate
- func (qc *QuestionCreate) SetNillableOrder(i *int) *QuestionCreate
- func (qc *QuestionCreate) SetNillableType(q *question.Type) *QuestionCreate
- func (qc *QuestionCreate) SetNillableUpdateTime(t *time.Time) *QuestionCreate
- func (qc *QuestionCreate) SetOrder(i int) *QuestionCreate
- func (qc *QuestionCreate) SetType(q question.Type) *QuestionCreate
- func (qc *QuestionCreate) SetUpdateTime(t time.Time) *QuestionCreate
- type QuestionCreateBulk
- type QuestionDelete
- type QuestionDeleteOne
- type QuestionEdges
- type QuestionGroupBy
- func (qgb *QuestionGroupBy) Aggregate(fns ...AggregateFunc) *QuestionGroupBy
- func (s *QuestionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *QuestionGroupBy) BoolX(ctx context.Context) bool
- func (s *QuestionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *QuestionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *QuestionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *QuestionGroupBy) Float64X(ctx context.Context) float64
- func (s *QuestionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *QuestionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *QuestionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *QuestionGroupBy) IntX(ctx context.Context) int
- func (s *QuestionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *QuestionGroupBy) IntsX(ctx context.Context) []int
- func (qgb *QuestionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *QuestionGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *QuestionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *QuestionGroupBy) StringX(ctx context.Context) string
- func (s *QuestionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *QuestionGroupBy) StringsX(ctx context.Context) []string
- type QuestionMutation
- func (m *QuestionMutation) AddField(name string, value ent.Value) error
- func (m *QuestionMutation) AddItemIDs(ids ...uuid.UUID)
- func (m *QuestionMutation) AddOrder(i int)
- func (m *QuestionMutation) AddTestIDs(ids ...uuid.UUID)
- func (m *QuestionMutation) AddTranslationIDs(ids ...uuid.UUID)
- func (m *QuestionMutation) AddedEdges() []string
- func (m *QuestionMutation) AddedField(name string) (ent.Value, bool)
- func (m *QuestionMutation) AddedFields() []string
- func (m *QuestionMutation) AddedIDs(name string) []ent.Value
- func (m *QuestionMutation) AddedOrder() (r int, exists bool)
- func (m *QuestionMutation) ClearEdge(name string) error
- func (m *QuestionMutation) ClearField(name string) error
- func (m *QuestionMutation) ClearItems()
- func (m *QuestionMutation) ClearTest()
- func (m *QuestionMutation) ClearTranslations()
- func (m *QuestionMutation) ClearedEdges() []string
- func (m *QuestionMutation) ClearedFields() []string
- func (m QuestionMutation) Client() *Client
- func (m *QuestionMutation) Code() (r string, exists bool)
- func (m *QuestionMutation) CreateTime() (r time.Time, exists bool)
- func (m *QuestionMutation) EdgeCleared(name string) bool
- func (m *QuestionMutation) Field(name string) (ent.Value, bool)
- func (m *QuestionMutation) FieldCleared(name string) bool
- func (m *QuestionMutation) Fields() []string
- func (m *QuestionMutation) GetType() (r question.Type, exists bool)
- func (m *QuestionMutation) ID() (id uuid.UUID, exists bool)
- func (m *QuestionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *QuestionMutation) ItemsCleared() bool
- func (m *QuestionMutation) ItemsIDs() (ids []uuid.UUID)
- func (m *QuestionMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *QuestionMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *QuestionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *QuestionMutation) OldOrder(ctx context.Context) (v int, err error)
- func (m *QuestionMutation) OldType(ctx context.Context) (v question.Type, err error)
- func (m *QuestionMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *QuestionMutation) Op() Op
- func (m *QuestionMutation) Order() (r int, exists bool)
- func (m *QuestionMutation) RemoveItemIDs(ids ...uuid.UUID)
- func (m *QuestionMutation) RemoveTestIDs(ids ...uuid.UUID)
- func (m *QuestionMutation) RemoveTranslationIDs(ids ...uuid.UUID)
- func (m *QuestionMutation) RemovedEdges() []string
- func (m *QuestionMutation) RemovedIDs(name string) []ent.Value
- func (m *QuestionMutation) RemovedItemsIDs() (ids []uuid.UUID)
- func (m *QuestionMutation) RemovedTestIDs() (ids []uuid.UUID)
- func (m *QuestionMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
- func (m *QuestionMutation) ResetCode()
- func (m *QuestionMutation) ResetCreateTime()
- func (m *QuestionMutation) ResetEdge(name string) error
- func (m *QuestionMutation) ResetField(name string) error
- func (m *QuestionMutation) ResetItems()
- func (m *QuestionMutation) ResetOrder()
- func (m *QuestionMutation) ResetTest()
- func (m *QuestionMutation) ResetTranslations()
- func (m *QuestionMutation) ResetType()
- func (m *QuestionMutation) ResetUpdateTime()
- func (m *QuestionMutation) SetCode(s string)
- func (m *QuestionMutation) SetCreateTime(t time.Time)
- func (m *QuestionMutation) SetField(name string, value ent.Value) error
- func (m *QuestionMutation) SetID(id uuid.UUID)
- func (m *QuestionMutation) SetOrder(i int)
- func (m *QuestionMutation) SetType(q question.Type)
- func (m *QuestionMutation) SetUpdateTime(t time.Time)
- func (m *QuestionMutation) TestCleared() bool
- func (m *QuestionMutation) TestIDs() (ids []uuid.UUID)
- func (m *QuestionMutation) TranslationsCleared() bool
- func (m *QuestionMutation) TranslationsIDs() (ids []uuid.UUID)
- func (m QuestionMutation) Tx() (*Tx, error)
- func (m *QuestionMutation) Type() string
- func (m *QuestionMutation) UpdateTime() (r time.Time, exists bool)
- func (m *QuestionMutation) Where(ps ...predicate.Question)
- type QuestionQuery
- func (qq *QuestionQuery) All(ctx context.Context) ([]*Question, error)
- func (qq *QuestionQuery) AllX(ctx context.Context) []*Question
- func (qq *QuestionQuery) Clone() *QuestionQuery
- func (qq *QuestionQuery) Count(ctx context.Context) (int, error)
- func (qq *QuestionQuery) CountX(ctx context.Context) int
- func (qq *QuestionQuery) Exist(ctx context.Context) (bool, error)
- func (qq *QuestionQuery) ExistX(ctx context.Context) bool
- func (qq *QuestionQuery) First(ctx context.Context) (*Question, error)
- func (qq *QuestionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (qq *QuestionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (qq *QuestionQuery) FirstX(ctx context.Context) *Question
- func (qq *QuestionQuery) GroupBy(field string, fields ...string) *QuestionGroupBy
- func (qq *QuestionQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (qq *QuestionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (qq *QuestionQuery) Limit(limit int) *QuestionQuery
- func (qq *QuestionQuery) Offset(offset int) *QuestionQuery
- func (qq *QuestionQuery) Only(ctx context.Context) (*Question, error)
- func (qq *QuestionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (qq *QuestionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (qq *QuestionQuery) OnlyX(ctx context.Context) *Question
- func (qq *QuestionQuery) Order(o ...OrderFunc) *QuestionQuery
- func (qq *QuestionQuery) QueryItems() *ItemQuery
- func (qq *QuestionQuery) QueryTest() *TestQuery
- func (qq *QuestionQuery) QueryTranslations() *QuestionTranslationQuery
- func (qq *QuestionQuery) Select(fields ...string) *QuestionSelect
- func (qq *QuestionQuery) Unique(unique bool) *QuestionQuery
- func (qq *QuestionQuery) Where(ps ...predicate.Question) *QuestionQuery
- func (qq *QuestionQuery) WithItems(opts ...func(*ItemQuery)) *QuestionQuery
- func (qq *QuestionQuery) WithTest(opts ...func(*TestQuery)) *QuestionQuery
- func (qq *QuestionQuery) WithTranslations(opts ...func(*QuestionTranslationQuery)) *QuestionQuery
- type QuestionSelect
- func (s *QuestionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *QuestionSelect) BoolX(ctx context.Context) bool
- func (s *QuestionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *QuestionSelect) BoolsX(ctx context.Context) []bool
- func (s *QuestionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *QuestionSelect) Float64X(ctx context.Context) float64
- func (s *QuestionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *QuestionSelect) Float64sX(ctx context.Context) []float64
- func (s *QuestionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *QuestionSelect) IntX(ctx context.Context) int
- func (s *QuestionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *QuestionSelect) IntsX(ctx context.Context) []int
- func (qs *QuestionSelect) Scan(ctx context.Context, v interface{}) error
- func (s *QuestionSelect) ScanX(ctx context.Context, v interface{})
- func (s *QuestionSelect) String(ctx context.Context) (_ string, err error)
- func (s *QuestionSelect) StringX(ctx context.Context) string
- func (s *QuestionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *QuestionSelect) StringsX(ctx context.Context) []string
- type QuestionTranslation
- type QuestionTranslationClient
- func (c *QuestionTranslationClient) Create() *QuestionTranslationCreate
- func (c *QuestionTranslationClient) CreateBulk(builders ...*QuestionTranslationCreate) *QuestionTranslationCreateBulk
- func (c *QuestionTranslationClient) Delete() *QuestionTranslationDelete
- func (c *QuestionTranslationClient) DeleteOne(qt *QuestionTranslation) *QuestionTranslationDeleteOne
- func (c *QuestionTranslationClient) DeleteOneID(id uuid.UUID) *QuestionTranslationDeleteOne
- func (c *QuestionTranslationClient) Get(ctx context.Context, id uuid.UUID) (*QuestionTranslation, error)
- func (c *QuestionTranslationClient) GetX(ctx context.Context, id uuid.UUID) *QuestionTranslation
- func (c *QuestionTranslationClient) Hooks() []Hook
- func (c *QuestionTranslationClient) Query() *QuestionTranslationQuery
- func (c *QuestionTranslationClient) QueryQuestion(qt *QuestionTranslation) *QuestionQuery
- func (c *QuestionTranslationClient) Update() *QuestionTranslationUpdate
- func (c *QuestionTranslationClient) UpdateOne(qt *QuestionTranslation) *QuestionTranslationUpdateOne
- func (c *QuestionTranslationClient) UpdateOneID(id uuid.UUID) *QuestionTranslationUpdateOne
- func (c *QuestionTranslationClient) Use(hooks ...Hook)
- type QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) Exec(ctx context.Context) error
- func (qtc *QuestionTranslationCreate) ExecX(ctx context.Context)
- func (qtc *QuestionTranslationCreate) Mutation() *QuestionTranslationMutation
- func (qtc *QuestionTranslationCreate) Save(ctx context.Context) (*QuestionTranslation, error)
- func (qtc *QuestionTranslationCreate) SaveX(ctx context.Context) *QuestionTranslation
- func (qtc *QuestionTranslationCreate) SetContent(s string) *QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) SetFooterContent(s string) *QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) SetHeaderContent(s string) *QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) SetID(u uuid.UUID) *QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) SetLocale(q questiontranslation.Locale) *QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) SetNillableContent(s *string) *QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) SetNillableFooterContent(s *string) *QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) SetNillableHeaderContent(s *string) *QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) SetNillableID(u *uuid.UUID) *QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) SetNillableQuestionID(id *uuid.UUID) *QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) SetQuestion(q *Question) *QuestionTranslationCreate
- func (qtc *QuestionTranslationCreate) SetQuestionID(id uuid.UUID) *QuestionTranslationCreate
- type QuestionTranslationCreateBulk
- func (qtcb *QuestionTranslationCreateBulk) Exec(ctx context.Context) error
- func (qtcb *QuestionTranslationCreateBulk) ExecX(ctx context.Context)
- func (qtcb *QuestionTranslationCreateBulk) Save(ctx context.Context) ([]*QuestionTranslation, error)
- func (qtcb *QuestionTranslationCreateBulk) SaveX(ctx context.Context) []*QuestionTranslation
- type QuestionTranslationDelete
- type QuestionTranslationDeleteOne
- type QuestionTranslationEdges
- type QuestionTranslationGroupBy
- func (qtgb *QuestionTranslationGroupBy) Aggregate(fns ...AggregateFunc) *QuestionTranslationGroupBy
- func (s *QuestionTranslationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *QuestionTranslationGroupBy) BoolX(ctx context.Context) bool
- func (s *QuestionTranslationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *QuestionTranslationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *QuestionTranslationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *QuestionTranslationGroupBy) Float64X(ctx context.Context) float64
- func (s *QuestionTranslationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *QuestionTranslationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *QuestionTranslationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *QuestionTranslationGroupBy) IntX(ctx context.Context) int
- func (s *QuestionTranslationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *QuestionTranslationGroupBy) IntsX(ctx context.Context) []int
- func (qtgb *QuestionTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *QuestionTranslationGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *QuestionTranslationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *QuestionTranslationGroupBy) StringX(ctx context.Context) string
- func (s *QuestionTranslationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *QuestionTranslationGroupBy) StringsX(ctx context.Context) []string
- type QuestionTranslationMutation
- func (m *QuestionTranslationMutation) AddField(name string, value ent.Value) error
- func (m *QuestionTranslationMutation) AddedEdges() []string
- func (m *QuestionTranslationMutation) AddedField(name string) (ent.Value, bool)
- func (m *QuestionTranslationMutation) AddedFields() []string
- func (m *QuestionTranslationMutation) AddedIDs(name string) []ent.Value
- func (m *QuestionTranslationMutation) ClearContent()
- func (m *QuestionTranslationMutation) ClearEdge(name string) error
- func (m *QuestionTranslationMutation) ClearField(name string) error
- func (m *QuestionTranslationMutation) ClearFooterContent()
- func (m *QuestionTranslationMutation) ClearHeaderContent()
- func (m *QuestionTranslationMutation) ClearQuestion()
- func (m *QuestionTranslationMutation) ClearedEdges() []string
- func (m *QuestionTranslationMutation) ClearedFields() []string
- func (m QuestionTranslationMutation) Client() *Client
- func (m *QuestionTranslationMutation) Content() (r string, exists bool)
- func (m *QuestionTranslationMutation) ContentCleared() bool
- func (m *QuestionTranslationMutation) EdgeCleared(name string) bool
- func (m *QuestionTranslationMutation) Field(name string) (ent.Value, bool)
- func (m *QuestionTranslationMutation) FieldCleared(name string) bool
- func (m *QuestionTranslationMutation) Fields() []string
- func (m *QuestionTranslationMutation) FooterContent() (r string, exists bool)
- func (m *QuestionTranslationMutation) FooterContentCleared() bool
- func (m *QuestionTranslationMutation) HeaderContent() (r string, exists bool)
- func (m *QuestionTranslationMutation) HeaderContentCleared() bool
- func (m *QuestionTranslationMutation) ID() (id uuid.UUID, exists bool)
- func (m *QuestionTranslationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *QuestionTranslationMutation) Locale() (r questiontranslation.Locale, exists bool)
- func (m *QuestionTranslationMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *QuestionTranslationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *QuestionTranslationMutation) OldFooterContent(ctx context.Context) (v string, err error)
- func (m *QuestionTranslationMutation) OldHeaderContent(ctx context.Context) (v string, err error)
- func (m *QuestionTranslationMutation) OldLocale(ctx context.Context) (v questiontranslation.Locale, err error)
- func (m *QuestionTranslationMutation) Op() Op
- func (m *QuestionTranslationMutation) QuestionCleared() bool
- func (m *QuestionTranslationMutation) QuestionID() (id uuid.UUID, exists bool)
- func (m *QuestionTranslationMutation) QuestionIDs() (ids []uuid.UUID)
- func (m *QuestionTranslationMutation) RemovedEdges() []string
- func (m *QuestionTranslationMutation) RemovedIDs(name string) []ent.Value
- func (m *QuestionTranslationMutation) ResetContent()
- func (m *QuestionTranslationMutation) ResetEdge(name string) error
- func (m *QuestionTranslationMutation) ResetField(name string) error
- func (m *QuestionTranslationMutation) ResetFooterContent()
- func (m *QuestionTranslationMutation) ResetHeaderContent()
- func (m *QuestionTranslationMutation) ResetLocale()
- func (m *QuestionTranslationMutation) ResetQuestion()
- func (m *QuestionTranslationMutation) SetContent(s string)
- func (m *QuestionTranslationMutation) SetField(name string, value ent.Value) error
- func (m *QuestionTranslationMutation) SetFooterContent(s string)
- func (m *QuestionTranslationMutation) SetHeaderContent(s string)
- func (m *QuestionTranslationMutation) SetID(id uuid.UUID)
- func (m *QuestionTranslationMutation) SetLocale(q questiontranslation.Locale)
- func (m *QuestionTranslationMutation) SetQuestionID(id uuid.UUID)
- func (m QuestionTranslationMutation) Tx() (*Tx, error)
- func (m *QuestionTranslationMutation) Type() string
- func (m *QuestionTranslationMutation) Where(ps ...predicate.QuestionTranslation)
- type QuestionTranslationQuery
- func (qtq *QuestionTranslationQuery) All(ctx context.Context) ([]*QuestionTranslation, error)
- func (qtq *QuestionTranslationQuery) AllX(ctx context.Context) []*QuestionTranslation
- func (qtq *QuestionTranslationQuery) Clone() *QuestionTranslationQuery
- func (qtq *QuestionTranslationQuery) Count(ctx context.Context) (int, error)
- func (qtq *QuestionTranslationQuery) CountX(ctx context.Context) int
- func (qtq *QuestionTranslationQuery) Exist(ctx context.Context) (bool, error)
- func (qtq *QuestionTranslationQuery) ExistX(ctx context.Context) bool
- func (qtq *QuestionTranslationQuery) First(ctx context.Context) (*QuestionTranslation, error)
- func (qtq *QuestionTranslationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (qtq *QuestionTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (qtq *QuestionTranslationQuery) FirstX(ctx context.Context) *QuestionTranslation
- func (qtq *QuestionTranslationQuery) GroupBy(field string, fields ...string) *QuestionTranslationGroupBy
- func (qtq *QuestionTranslationQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (qtq *QuestionTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (qtq *QuestionTranslationQuery) Limit(limit int) *QuestionTranslationQuery
- func (qtq *QuestionTranslationQuery) Offset(offset int) *QuestionTranslationQuery
- func (qtq *QuestionTranslationQuery) Only(ctx context.Context) (*QuestionTranslation, error)
- func (qtq *QuestionTranslationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (qtq *QuestionTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (qtq *QuestionTranslationQuery) OnlyX(ctx context.Context) *QuestionTranslation
- func (qtq *QuestionTranslationQuery) Order(o ...OrderFunc) *QuestionTranslationQuery
- func (qtq *QuestionTranslationQuery) QueryQuestion() *QuestionQuery
- func (qtq *QuestionTranslationQuery) Select(fields ...string) *QuestionTranslationSelect
- func (qtq *QuestionTranslationQuery) Unique(unique bool) *QuestionTranslationQuery
- func (qtq *QuestionTranslationQuery) Where(ps ...predicate.QuestionTranslation) *QuestionTranslationQuery
- func (qtq *QuestionTranslationQuery) WithQuestion(opts ...func(*QuestionQuery)) *QuestionTranslationQuery
- type QuestionTranslationSelect
- func (s *QuestionTranslationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *QuestionTranslationSelect) BoolX(ctx context.Context) bool
- func (s *QuestionTranslationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *QuestionTranslationSelect) BoolsX(ctx context.Context) []bool
- func (s *QuestionTranslationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *QuestionTranslationSelect) Float64X(ctx context.Context) float64
- func (s *QuestionTranslationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *QuestionTranslationSelect) Float64sX(ctx context.Context) []float64
- func (s *QuestionTranslationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *QuestionTranslationSelect) IntX(ctx context.Context) int
- func (s *QuestionTranslationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *QuestionTranslationSelect) IntsX(ctx context.Context) []int
- func (qts *QuestionTranslationSelect) Scan(ctx context.Context, v interface{}) error
- func (s *QuestionTranslationSelect) ScanX(ctx context.Context, v interface{})
- func (s *QuestionTranslationSelect) String(ctx context.Context) (_ string, err error)
- func (s *QuestionTranslationSelect) StringX(ctx context.Context) string
- func (s *QuestionTranslationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *QuestionTranslationSelect) StringsX(ctx context.Context) []string
- type QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) ClearContent() *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) ClearFooterContent() *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) ClearHeaderContent() *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) ClearQuestion() *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) Exec(ctx context.Context) error
- func (qtu *QuestionTranslationUpdate) ExecX(ctx context.Context)
- func (qtu *QuestionTranslationUpdate) Mutation() *QuestionTranslationMutation
- func (qtu *QuestionTranslationUpdate) Save(ctx context.Context) (int, error)
- func (qtu *QuestionTranslationUpdate) SaveX(ctx context.Context) int
- func (qtu *QuestionTranslationUpdate) SetContent(s string) *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) SetFooterContent(s string) *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) SetHeaderContent(s string) *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) SetNillableContent(s *string) *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) SetNillableFooterContent(s *string) *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) SetNillableHeaderContent(s *string) *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) SetNillableQuestionID(id *uuid.UUID) *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) SetQuestion(q *Question) *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) SetQuestionID(id uuid.UUID) *QuestionTranslationUpdate
- func (qtu *QuestionTranslationUpdate) Where(ps ...predicate.QuestionTranslation) *QuestionTranslationUpdate
- type QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) ClearContent() *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) ClearFooterContent() *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) ClearHeaderContent() *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) ClearQuestion() *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) Exec(ctx context.Context) error
- func (qtuo *QuestionTranslationUpdateOne) ExecX(ctx context.Context)
- func (qtuo *QuestionTranslationUpdateOne) Mutation() *QuestionTranslationMutation
- func (qtuo *QuestionTranslationUpdateOne) Save(ctx context.Context) (*QuestionTranslation, error)
- func (qtuo *QuestionTranslationUpdateOne) SaveX(ctx context.Context) *QuestionTranslation
- func (qtuo *QuestionTranslationUpdateOne) Select(field string, fields ...string) *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) SetContent(s string) *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) SetFooterContent(s string) *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) SetHeaderContent(s string) *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) SetNillableContent(s *string) *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) SetNillableFooterContent(s *string) *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) SetNillableHeaderContent(s *string) *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) SetNillableQuestionID(id *uuid.UUID) *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) SetQuestion(q *Question) *QuestionTranslationUpdateOne
- func (qtuo *QuestionTranslationUpdateOne) SetQuestionID(id uuid.UUID) *QuestionTranslationUpdateOne
- type QuestionTranslations
- type QuestionUpdate
- func (qu *QuestionUpdate) AddItemIDs(ids ...uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) AddItems(i ...*Item) *QuestionUpdate
- func (qu *QuestionUpdate) AddOrder(i int) *QuestionUpdate
- func (qu *QuestionUpdate) AddTest(t ...*Test) *QuestionUpdate
- func (qu *QuestionUpdate) AddTestIDs(ids ...uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) AddTranslationIDs(ids ...uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) AddTranslations(q ...*QuestionTranslation) *QuestionUpdate
- func (qu *QuestionUpdate) ClearItems() *QuestionUpdate
- func (qu *QuestionUpdate) ClearTest() *QuestionUpdate
- func (qu *QuestionUpdate) ClearTranslations() *QuestionUpdate
- func (qu *QuestionUpdate) Exec(ctx context.Context) error
- func (qu *QuestionUpdate) ExecX(ctx context.Context)
- func (qu *QuestionUpdate) Mutation() *QuestionMutation
- func (qu *QuestionUpdate) RemoveItemIDs(ids ...uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) RemoveItems(i ...*Item) *QuestionUpdate
- func (qu *QuestionUpdate) RemoveTest(t ...*Test) *QuestionUpdate
- func (qu *QuestionUpdate) RemoveTestIDs(ids ...uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) RemoveTranslationIDs(ids ...uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) RemoveTranslations(q ...*QuestionTranslation) *QuestionUpdate
- func (qu *QuestionUpdate) Save(ctx context.Context) (int, error)
- func (qu *QuestionUpdate) SaveX(ctx context.Context) int
- func (qu *QuestionUpdate) SetNillableOrder(i *int) *QuestionUpdate
- func (qu *QuestionUpdate) SetNillableType(q *question.Type) *QuestionUpdate
- func (qu *QuestionUpdate) SetOrder(i int) *QuestionUpdate
- func (qu *QuestionUpdate) SetType(q question.Type) *QuestionUpdate
- func (qu *QuestionUpdate) SetUpdateTime(t time.Time) *QuestionUpdate
- func (qu *QuestionUpdate) Where(ps ...predicate.Question) *QuestionUpdate
- type QuestionUpdateOne
- func (quo *QuestionUpdateOne) AddItemIDs(ids ...uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) AddItems(i ...*Item) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) AddOrder(i int) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) AddTest(t ...*Test) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) AddTestIDs(ids ...uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) AddTranslations(q ...*QuestionTranslation) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) ClearItems() *QuestionUpdateOne
- func (quo *QuestionUpdateOne) ClearTest() *QuestionUpdateOne
- func (quo *QuestionUpdateOne) ClearTranslations() *QuestionUpdateOne
- func (quo *QuestionUpdateOne) Exec(ctx context.Context) error
- func (quo *QuestionUpdateOne) ExecX(ctx context.Context)
- func (quo *QuestionUpdateOne) Mutation() *QuestionMutation
- func (quo *QuestionUpdateOne) RemoveItemIDs(ids ...uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) RemoveItems(i ...*Item) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) RemoveTest(t ...*Test) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) RemoveTestIDs(ids ...uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) RemoveTranslations(q ...*QuestionTranslation) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) Save(ctx context.Context) (*Question, error)
- func (quo *QuestionUpdateOne) SaveX(ctx context.Context) *Question
- func (quo *QuestionUpdateOne) Select(field string, fields ...string) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetNillableOrder(i *int) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetNillableType(q *question.Type) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetOrder(i int) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetType(q question.Type) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetUpdateTime(t time.Time) *QuestionUpdateOne
- type Questions
- type Response
- type ResponseClient
- func (c *ResponseClient) Create() *ResponseCreate
- func (c *ResponseClient) CreateBulk(builders ...*ResponseCreate) *ResponseCreateBulk
- func (c *ResponseClient) Delete() *ResponseDelete
- func (c *ResponseClient) DeleteOne(r *Response) *ResponseDeleteOne
- func (c *ResponseClient) DeleteOneID(id uuid.UUID) *ResponseDeleteOne
- func (c *ResponseClient) Get(ctx context.Context, id uuid.UUID) (*Response, error)
- func (c *ResponseClient) GetX(ctx context.Context, id uuid.UUID) *Response
- func (c *ResponseClient) Hooks() []Hook
- func (c *ResponseClient) Query() *ResponseQuery
- func (c *ResponseClient) QueryItem(r *Response) *ItemQuery
- func (c *ResponseClient) QueryTake(r *Response) *TakeQuery
- func (c *ResponseClient) Update() *ResponseUpdate
- func (c *ResponseClient) UpdateOne(r *Response) *ResponseUpdateOne
- func (c *ResponseClient) UpdateOneID(id uuid.UUID) *ResponseUpdateOne
- func (c *ResponseClient) Use(hooks ...Hook)
- type ResponseCreate
- func (rc *ResponseCreate) Exec(ctx context.Context) error
- func (rc *ResponseCreate) ExecX(ctx context.Context)
- func (rc *ResponseCreate) Mutation() *ResponseMutation
- func (rc *ResponseCreate) Save(ctx context.Context) (*Response, error)
- func (rc *ResponseCreate) SaveX(ctx context.Context) *Response
- func (rc *ResponseCreate) SetCreateTime(t time.Time) *ResponseCreate
- func (rc *ResponseCreate) SetID(u uuid.UUID) *ResponseCreate
- func (rc *ResponseCreate) SetItem(i *Item) *ResponseCreate
- func (rc *ResponseCreate) SetItemID(id uuid.UUID) *ResponseCreate
- func (rc *ResponseCreate) SetMeta(m map[string]interface{}) *ResponseCreate
- func (rc *ResponseCreate) SetNillableCreateTime(t *time.Time) *ResponseCreate
- func (rc *ResponseCreate) SetNillableID(u *uuid.UUID) *ResponseCreate
- func (rc *ResponseCreate) SetNillableUpdateTime(t *time.Time) *ResponseCreate
- func (rc *ResponseCreate) SetNillableValue(i *int) *ResponseCreate
- func (rc *ResponseCreate) SetTake(t *Take) *ResponseCreate
- func (rc *ResponseCreate) SetTakeID(id uuid.UUID) *ResponseCreate
- func (rc *ResponseCreate) SetUpdateTime(t time.Time) *ResponseCreate
- func (rc *ResponseCreate) SetValue(i int) *ResponseCreate
- type ResponseCreateBulk
- type ResponseDelete
- type ResponseDeleteOne
- type ResponseEdges
- type ResponseGroupBy
- func (rgb *ResponseGroupBy) Aggregate(fns ...AggregateFunc) *ResponseGroupBy
- func (s *ResponseGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ResponseGroupBy) BoolX(ctx context.Context) bool
- func (s *ResponseGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ResponseGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ResponseGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ResponseGroupBy) Float64X(ctx context.Context) float64
- func (s *ResponseGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ResponseGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ResponseGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ResponseGroupBy) IntX(ctx context.Context) int
- func (s *ResponseGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ResponseGroupBy) IntsX(ctx context.Context) []int
- func (rgb *ResponseGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *ResponseGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *ResponseGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ResponseGroupBy) StringX(ctx context.Context) string
- func (s *ResponseGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ResponseGroupBy) StringsX(ctx context.Context) []string
- type ResponseMutation
- func (m *ResponseMutation) AddField(name string, value ent.Value) error
- func (m *ResponseMutation) AddValue(i int)
- func (m *ResponseMutation) AddedEdges() []string
- func (m *ResponseMutation) AddedField(name string) (ent.Value, bool)
- func (m *ResponseMutation) AddedFields() []string
- func (m *ResponseMutation) AddedIDs(name string) []ent.Value
- func (m *ResponseMutation) AddedValue() (r int, exists bool)
- func (m *ResponseMutation) ClearEdge(name string) error
- func (m *ResponseMutation) ClearField(name string) error
- func (m *ResponseMutation) ClearItem()
- func (m *ResponseMutation) ClearMeta()
- func (m *ResponseMutation) ClearTake()
- func (m *ResponseMutation) ClearedEdges() []string
- func (m *ResponseMutation) ClearedFields() []string
- func (m ResponseMutation) Client() *Client
- func (m *ResponseMutation) CreateTime() (r time.Time, exists bool)
- func (m *ResponseMutation) EdgeCleared(name string) bool
- func (m *ResponseMutation) Field(name string) (ent.Value, bool)
- func (m *ResponseMutation) FieldCleared(name string) bool
- func (m *ResponseMutation) Fields() []string
- func (m *ResponseMutation) ID() (id uuid.UUID, exists bool)
- func (m *ResponseMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ResponseMutation) ItemCleared() bool
- func (m *ResponseMutation) ItemID() (id uuid.UUID, exists bool)
- func (m *ResponseMutation) ItemIDs() (ids []uuid.UUID)
- func (m *ResponseMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *ResponseMutation) MetaCleared() bool
- func (m *ResponseMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ResponseMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ResponseMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *ResponseMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ResponseMutation) OldValue(ctx context.Context) (v int, err error)
- func (m *ResponseMutation) Op() Op
- func (m *ResponseMutation) RemovedEdges() []string
- func (m *ResponseMutation) RemovedIDs(name string) []ent.Value
- func (m *ResponseMutation) ResetCreateTime()
- func (m *ResponseMutation) ResetEdge(name string) error
- func (m *ResponseMutation) ResetField(name string) error
- func (m *ResponseMutation) ResetItem()
- func (m *ResponseMutation) ResetMeta()
- func (m *ResponseMutation) ResetTake()
- func (m *ResponseMutation) ResetUpdateTime()
- func (m *ResponseMutation) ResetValue()
- func (m *ResponseMutation) SetCreateTime(t time.Time)
- func (m *ResponseMutation) SetField(name string, value ent.Value) error
- func (m *ResponseMutation) SetID(id uuid.UUID)
- func (m *ResponseMutation) SetItemID(id uuid.UUID)
- func (m *ResponseMutation) SetMeta(value map[string]interface{})
- func (m *ResponseMutation) SetTakeID(id uuid.UUID)
- func (m *ResponseMutation) SetUpdateTime(t time.Time)
- func (m *ResponseMutation) SetValue(i int)
- func (m *ResponseMutation) TakeCleared() bool
- func (m *ResponseMutation) TakeID() (id uuid.UUID, exists bool)
- func (m *ResponseMutation) TakeIDs() (ids []uuid.UUID)
- func (m ResponseMutation) Tx() (*Tx, error)
- func (m *ResponseMutation) Type() string
- func (m *ResponseMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ResponseMutation) Value() (r int, exists bool)
- func (m *ResponseMutation) Where(ps ...predicate.Response)
- type ResponseQuery
- func (rq *ResponseQuery) All(ctx context.Context) ([]*Response, error)
- func (rq *ResponseQuery) AllX(ctx context.Context) []*Response
- func (rq *ResponseQuery) Clone() *ResponseQuery
- func (rq *ResponseQuery) Count(ctx context.Context) (int, error)
- func (rq *ResponseQuery) CountX(ctx context.Context) int
- func (rq *ResponseQuery) Exist(ctx context.Context) (bool, error)
- func (rq *ResponseQuery) ExistX(ctx context.Context) bool
- func (rq *ResponseQuery) First(ctx context.Context) (*Response, error)
- func (rq *ResponseQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ResponseQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (rq *ResponseQuery) FirstX(ctx context.Context) *Response
- func (rq *ResponseQuery) GroupBy(field string, fields ...string) *ResponseGroupBy
- func (rq *ResponseQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (rq *ResponseQuery) IDsX(ctx context.Context) []uuid.UUID
- func (rq *ResponseQuery) Limit(limit int) *ResponseQuery
- func (rq *ResponseQuery) Offset(offset int) *ResponseQuery
- func (rq *ResponseQuery) Only(ctx context.Context) (*Response, error)
- func (rq *ResponseQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ResponseQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (rq *ResponseQuery) OnlyX(ctx context.Context) *Response
- func (rq *ResponseQuery) Order(o ...OrderFunc) *ResponseQuery
- func (rq *ResponseQuery) QueryItem() *ItemQuery
- func (rq *ResponseQuery) QueryTake() *TakeQuery
- func (rq *ResponseQuery) Select(fields ...string) *ResponseSelect
- func (rq *ResponseQuery) Unique(unique bool) *ResponseQuery
- func (rq *ResponseQuery) Where(ps ...predicate.Response) *ResponseQuery
- func (rq *ResponseQuery) WithItem(opts ...func(*ItemQuery)) *ResponseQuery
- func (rq *ResponseQuery) WithTake(opts ...func(*TakeQuery)) *ResponseQuery
- type ResponseSelect
- func (s *ResponseSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ResponseSelect) BoolX(ctx context.Context) bool
- func (s *ResponseSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ResponseSelect) BoolsX(ctx context.Context) []bool
- func (s *ResponseSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ResponseSelect) Float64X(ctx context.Context) float64
- func (s *ResponseSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ResponseSelect) Float64sX(ctx context.Context) []float64
- func (s *ResponseSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ResponseSelect) IntX(ctx context.Context) int
- func (s *ResponseSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ResponseSelect) IntsX(ctx context.Context) []int
- func (rs *ResponseSelect) Scan(ctx context.Context, v interface{}) error
- func (s *ResponseSelect) ScanX(ctx context.Context, v interface{})
- func (s *ResponseSelect) String(ctx context.Context) (_ string, err error)
- func (s *ResponseSelect) StringX(ctx context.Context) string
- func (s *ResponseSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ResponseSelect) StringsX(ctx context.Context) []string
- type ResponseUpdate
- func (ru *ResponseUpdate) AddValue(i int) *ResponseUpdate
- func (ru *ResponseUpdate) ClearItem() *ResponseUpdate
- func (ru *ResponseUpdate) ClearMeta() *ResponseUpdate
- func (ru *ResponseUpdate) ClearTake() *ResponseUpdate
- func (ru *ResponseUpdate) Exec(ctx context.Context) error
- func (ru *ResponseUpdate) ExecX(ctx context.Context)
- func (ru *ResponseUpdate) Mutation() *ResponseMutation
- func (ru *ResponseUpdate) Save(ctx context.Context) (int, error)
- func (ru *ResponseUpdate) SaveX(ctx context.Context) int
- func (ru *ResponseUpdate) SetItem(i *Item) *ResponseUpdate
- func (ru *ResponseUpdate) SetItemID(id uuid.UUID) *ResponseUpdate
- func (ru *ResponseUpdate) SetMeta(m map[string]interface{}) *ResponseUpdate
- func (ru *ResponseUpdate) SetNillableValue(i *int) *ResponseUpdate
- func (ru *ResponseUpdate) SetTake(t *Take) *ResponseUpdate
- func (ru *ResponseUpdate) SetTakeID(id uuid.UUID) *ResponseUpdate
- func (ru *ResponseUpdate) SetUpdateTime(t time.Time) *ResponseUpdate
- func (ru *ResponseUpdate) SetValue(i int) *ResponseUpdate
- func (ru *ResponseUpdate) Where(ps ...predicate.Response) *ResponseUpdate
- type ResponseUpdateOne
- func (ruo *ResponseUpdateOne) AddValue(i int) *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) ClearItem() *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) ClearMeta() *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) ClearTake() *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) Exec(ctx context.Context) error
- func (ruo *ResponseUpdateOne) ExecX(ctx context.Context)
- func (ruo *ResponseUpdateOne) Mutation() *ResponseMutation
- func (ruo *ResponseUpdateOne) Save(ctx context.Context) (*Response, error)
- func (ruo *ResponseUpdateOne) SaveX(ctx context.Context) *Response
- func (ruo *ResponseUpdateOne) Select(field string, fields ...string) *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) SetItem(i *Item) *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) SetItemID(id uuid.UUID) *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) SetMeta(m map[string]interface{}) *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) SetNillableValue(i *int) *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) SetTake(t *Take) *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) SetTakeID(id uuid.UUID) *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) SetUpdateTime(t time.Time) *ResponseUpdateOne
- func (ruo *ResponseUpdateOne) SetValue(i int) *ResponseUpdateOne
- type Responses
- type Result
- type ResultClient
- func (c *ResultClient) Create() *ResultCreate
- func (c *ResultClient) CreateBulk(builders ...*ResultCreate) *ResultCreateBulk
- func (c *ResultClient) Delete() *ResultDelete
- func (c *ResultClient) DeleteOne(r *Result) *ResultDeleteOne
- func (c *ResultClient) DeleteOneID(id uuid.UUID) *ResultDeleteOne
- func (c *ResultClient) Get(ctx context.Context, id uuid.UUID) (*Result, error)
- func (c *ResultClient) GetX(ctx context.Context, id uuid.UUID) *Result
- func (c *ResultClient) Hooks() []Hook
- func (c *ResultClient) Query() *ResultQuery
- func (c *ResultClient) QueryScale(r *Result) *ScaleQuery
- func (c *ResultClient) QueryTake(r *Result) *TakeQuery
- func (c *ResultClient) Update() *ResultUpdate
- func (c *ResultClient) UpdateOne(r *Result) *ResultUpdateOne
- func (c *ResultClient) UpdateOneID(id uuid.UUID) *ResultUpdateOne
- func (c *ResultClient) Use(hooks ...Hook)
- type ResultCreate
- func (rc *ResultCreate) Exec(ctx context.Context) error
- func (rc *ResultCreate) ExecX(ctx context.Context)
- func (rc *ResultCreate) Mutation() *ResultMutation
- func (rc *ResultCreate) Save(ctx context.Context) (*Result, error)
- func (rc *ResultCreate) SaveX(ctx context.Context) *Result
- func (rc *ResultCreate) SetCreateTime(t time.Time) *ResultCreate
- func (rc *ResultCreate) SetFinalScore(f float64) *ResultCreate
- func (rc *ResultCreate) SetID(u uuid.UUID) *ResultCreate
- func (rc *ResultCreate) SetMeta(m map[string]interface{}) *ResultCreate
- func (rc *ResultCreate) SetNillableCreateTime(t *time.Time) *ResultCreate
- func (rc *ResultCreate) SetNillableID(u *uuid.UUID) *ResultCreate
- func (rc *ResultCreate) SetNillableUpdateTime(t *time.Time) *ResultCreate
- func (rc *ResultCreate) SetRawScore(f float64) *ResultCreate
- func (rc *ResultCreate) SetScale(s *Scale) *ResultCreate
- func (rc *ResultCreate) SetScaleID(id uuid.UUID) *ResultCreate
- func (rc *ResultCreate) SetTake(t *Take) *ResultCreate
- func (rc *ResultCreate) SetTakeID(id uuid.UUID) *ResultCreate
- func (rc *ResultCreate) SetUpdateTime(t time.Time) *ResultCreate
- type ResultCreateBulk
- type ResultDelete
- type ResultDeleteOne
- type ResultEdges
- type ResultGroupBy
- func (rgb *ResultGroupBy) Aggregate(fns ...AggregateFunc) *ResultGroupBy
- func (s *ResultGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ResultGroupBy) BoolX(ctx context.Context) bool
- func (s *ResultGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ResultGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ResultGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ResultGroupBy) Float64X(ctx context.Context) float64
- func (s *ResultGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ResultGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ResultGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ResultGroupBy) IntX(ctx context.Context) int
- func (s *ResultGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ResultGroupBy) IntsX(ctx context.Context) []int
- func (rgb *ResultGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *ResultGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *ResultGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ResultGroupBy) StringX(ctx context.Context) string
- func (s *ResultGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ResultGroupBy) StringsX(ctx context.Context) []string
- type ResultMutation
- func (m *ResultMutation) AddField(name string, value ent.Value) error
- func (m *ResultMutation) AddFinalScore(f float64)
- func (m *ResultMutation) AddRawScore(f float64)
- func (m *ResultMutation) AddedEdges() []string
- func (m *ResultMutation) AddedField(name string) (ent.Value, bool)
- func (m *ResultMutation) AddedFields() []string
- func (m *ResultMutation) AddedFinalScore() (r float64, exists bool)
- func (m *ResultMutation) AddedIDs(name string) []ent.Value
- func (m *ResultMutation) AddedRawScore() (r float64, exists bool)
- func (m *ResultMutation) ClearEdge(name string) error
- func (m *ResultMutation) ClearField(name string) error
- func (m *ResultMutation) ClearMeta()
- func (m *ResultMutation) ClearScale()
- func (m *ResultMutation) ClearTake()
- func (m *ResultMutation) ClearedEdges() []string
- func (m *ResultMutation) ClearedFields() []string
- func (m ResultMutation) Client() *Client
- func (m *ResultMutation) CreateTime() (r time.Time, exists bool)
- func (m *ResultMutation) EdgeCleared(name string) bool
- func (m *ResultMutation) Field(name string) (ent.Value, bool)
- func (m *ResultMutation) FieldCleared(name string) bool
- func (m *ResultMutation) Fields() []string
- func (m *ResultMutation) FinalScore() (r float64, exists bool)
- func (m *ResultMutation) ID() (id uuid.UUID, exists bool)
- func (m *ResultMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ResultMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *ResultMutation) MetaCleared() bool
- func (m *ResultMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ResultMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ResultMutation) OldFinalScore(ctx context.Context) (v float64, err error)
- func (m *ResultMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *ResultMutation) OldRawScore(ctx context.Context) (v float64, err error)
- func (m *ResultMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ResultMutation) Op() Op
- func (m *ResultMutation) RawScore() (r float64, exists bool)
- func (m *ResultMutation) RemovedEdges() []string
- func (m *ResultMutation) RemovedIDs(name string) []ent.Value
- func (m *ResultMutation) ResetCreateTime()
- func (m *ResultMutation) ResetEdge(name string) error
- func (m *ResultMutation) ResetField(name string) error
- func (m *ResultMutation) ResetFinalScore()
- func (m *ResultMutation) ResetMeta()
- func (m *ResultMutation) ResetRawScore()
- func (m *ResultMutation) ResetScale()
- func (m *ResultMutation) ResetTake()
- func (m *ResultMutation) ResetUpdateTime()
- func (m *ResultMutation) ScaleCleared() bool
- func (m *ResultMutation) ScaleID() (id uuid.UUID, exists bool)
- func (m *ResultMutation) ScaleIDs() (ids []uuid.UUID)
- func (m *ResultMutation) SetCreateTime(t time.Time)
- func (m *ResultMutation) SetField(name string, value ent.Value) error
- func (m *ResultMutation) SetFinalScore(f float64)
- func (m *ResultMutation) SetID(id uuid.UUID)
- func (m *ResultMutation) SetMeta(value map[string]interface{})
- func (m *ResultMutation) SetRawScore(f float64)
- func (m *ResultMutation) SetScaleID(id uuid.UUID)
- func (m *ResultMutation) SetTakeID(id uuid.UUID)
- func (m *ResultMutation) SetUpdateTime(t time.Time)
- func (m *ResultMutation) TakeCleared() bool
- func (m *ResultMutation) TakeID() (id uuid.UUID, exists bool)
- func (m *ResultMutation) TakeIDs() (ids []uuid.UUID)
- func (m ResultMutation) Tx() (*Tx, error)
- func (m *ResultMutation) Type() string
- func (m *ResultMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ResultMutation) Where(ps ...predicate.Result)
- type ResultQuery
- func (rq *ResultQuery) All(ctx context.Context) ([]*Result, error)
- func (rq *ResultQuery) AllX(ctx context.Context) []*Result
- func (rq *ResultQuery) Clone() *ResultQuery
- func (rq *ResultQuery) Count(ctx context.Context) (int, error)
- func (rq *ResultQuery) CountX(ctx context.Context) int
- func (rq *ResultQuery) Exist(ctx context.Context) (bool, error)
- func (rq *ResultQuery) ExistX(ctx context.Context) bool
- func (rq *ResultQuery) First(ctx context.Context) (*Result, error)
- func (rq *ResultQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ResultQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (rq *ResultQuery) FirstX(ctx context.Context) *Result
- func (rq *ResultQuery) GroupBy(field string, fields ...string) *ResultGroupBy
- func (rq *ResultQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (rq *ResultQuery) IDsX(ctx context.Context) []uuid.UUID
- func (rq *ResultQuery) Limit(limit int) *ResultQuery
- func (rq *ResultQuery) Offset(offset int) *ResultQuery
- func (rq *ResultQuery) Only(ctx context.Context) (*Result, error)
- func (rq *ResultQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ResultQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (rq *ResultQuery) OnlyX(ctx context.Context) *Result
- func (rq *ResultQuery) Order(o ...OrderFunc) *ResultQuery
- func (rq *ResultQuery) QueryScale() *ScaleQuery
- func (rq *ResultQuery) QueryTake() *TakeQuery
- func (rq *ResultQuery) Select(fields ...string) *ResultSelect
- func (rq *ResultQuery) Unique(unique bool) *ResultQuery
- func (rq *ResultQuery) Where(ps ...predicate.Result) *ResultQuery
- func (rq *ResultQuery) WithScale(opts ...func(*ScaleQuery)) *ResultQuery
- func (rq *ResultQuery) WithTake(opts ...func(*TakeQuery)) *ResultQuery
- type ResultSelect
- func (s *ResultSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ResultSelect) BoolX(ctx context.Context) bool
- func (s *ResultSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ResultSelect) BoolsX(ctx context.Context) []bool
- func (s *ResultSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ResultSelect) Float64X(ctx context.Context) float64
- func (s *ResultSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ResultSelect) Float64sX(ctx context.Context) []float64
- func (s *ResultSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ResultSelect) IntX(ctx context.Context) int
- func (s *ResultSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ResultSelect) IntsX(ctx context.Context) []int
- func (rs *ResultSelect) Scan(ctx context.Context, v interface{}) error
- func (s *ResultSelect) ScanX(ctx context.Context, v interface{})
- func (s *ResultSelect) String(ctx context.Context) (_ string, err error)
- func (s *ResultSelect) StringX(ctx context.Context) string
- func (s *ResultSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ResultSelect) StringsX(ctx context.Context) []string
- type ResultUpdate
- func (ru *ResultUpdate) AddFinalScore(f float64) *ResultUpdate
- func (ru *ResultUpdate) AddRawScore(f float64) *ResultUpdate
- func (ru *ResultUpdate) ClearMeta() *ResultUpdate
- func (ru *ResultUpdate) ClearScale() *ResultUpdate
- func (ru *ResultUpdate) ClearTake() *ResultUpdate
- func (ru *ResultUpdate) Exec(ctx context.Context) error
- func (ru *ResultUpdate) ExecX(ctx context.Context)
- func (ru *ResultUpdate) Mutation() *ResultMutation
- func (ru *ResultUpdate) Save(ctx context.Context) (int, error)
- func (ru *ResultUpdate) SaveX(ctx context.Context) int
- func (ru *ResultUpdate) SetFinalScore(f float64) *ResultUpdate
- func (ru *ResultUpdate) SetMeta(m map[string]interface{}) *ResultUpdate
- func (ru *ResultUpdate) SetRawScore(f float64) *ResultUpdate
- func (ru *ResultUpdate) SetScale(s *Scale) *ResultUpdate
- func (ru *ResultUpdate) SetScaleID(id uuid.UUID) *ResultUpdate
- func (ru *ResultUpdate) SetTake(t *Take) *ResultUpdate
- func (ru *ResultUpdate) SetTakeID(id uuid.UUID) *ResultUpdate
- func (ru *ResultUpdate) SetUpdateTime(t time.Time) *ResultUpdate
- func (ru *ResultUpdate) Where(ps ...predicate.Result) *ResultUpdate
- type ResultUpdateOne
- func (ruo *ResultUpdateOne) AddFinalScore(f float64) *ResultUpdateOne
- func (ruo *ResultUpdateOne) AddRawScore(f float64) *ResultUpdateOne
- func (ruo *ResultUpdateOne) ClearMeta() *ResultUpdateOne
- func (ruo *ResultUpdateOne) ClearScale() *ResultUpdateOne
- func (ruo *ResultUpdateOne) ClearTake() *ResultUpdateOne
- func (ruo *ResultUpdateOne) Exec(ctx context.Context) error
- func (ruo *ResultUpdateOne) ExecX(ctx context.Context)
- func (ruo *ResultUpdateOne) Mutation() *ResultMutation
- func (ruo *ResultUpdateOne) Save(ctx context.Context) (*Result, error)
- func (ruo *ResultUpdateOne) SaveX(ctx context.Context) *Result
- func (ruo *ResultUpdateOne) Select(field string, fields ...string) *ResultUpdateOne
- func (ruo *ResultUpdateOne) SetFinalScore(f float64) *ResultUpdateOne
- func (ruo *ResultUpdateOne) SetMeta(m map[string]interface{}) *ResultUpdateOne
- func (ruo *ResultUpdateOne) SetRawScore(f float64) *ResultUpdateOne
- func (ruo *ResultUpdateOne) SetScale(s *Scale) *ResultUpdateOne
- func (ruo *ResultUpdateOne) SetScaleID(id uuid.UUID) *ResultUpdateOne
- func (ruo *ResultUpdateOne) SetTake(t *Take) *ResultUpdateOne
- func (ruo *ResultUpdateOne) SetTakeID(id uuid.UUID) *ResultUpdateOne
- func (ruo *ResultUpdateOne) SetUpdateTime(t time.Time) *ResultUpdateOne
- type Results
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Sample
- type SampleClient
- func (c *SampleClient) Create() *SampleCreate
- func (c *SampleClient) CreateBulk(builders ...*SampleCreate) *SampleCreateBulk
- func (c *SampleClient) Delete() *SampleDelete
- func (c *SampleClient) DeleteOne(s *Sample) *SampleDeleteOne
- func (c *SampleClient) DeleteOneID(id uuid.UUID) *SampleDeleteOne
- func (c *SampleClient) Get(ctx context.Context, id uuid.UUID) (*Sample, error)
- func (c *SampleClient) GetX(ctx context.Context, id uuid.UUID) *Sample
- func (c *SampleClient) Hooks() []Hook
- func (c *SampleClient) Query() *SampleQuery
- func (c *SampleClient) QueryNorms(s *Sample) *NormQuery
- func (c *SampleClient) Update() *SampleUpdate
- func (c *SampleClient) UpdateOne(s *Sample) *SampleUpdateOne
- func (c *SampleClient) UpdateOneID(id uuid.UUID) *SampleUpdateOne
- func (c *SampleClient) Use(hooks ...Hook)
- type SampleCreate
- func (sc *SampleCreate) AddNormIDs(ids ...uuid.UUID) *SampleCreate
- func (sc *SampleCreate) AddNorms(n ...*Norm) *SampleCreate
- func (sc *SampleCreate) Exec(ctx context.Context) error
- func (sc *SampleCreate) ExecX(ctx context.Context)
- func (sc *SampleCreate) Mutation() *SampleMutation
- func (sc *SampleCreate) Save(ctx context.Context) (*Sample, error)
- func (sc *SampleCreate) SaveX(ctx context.Context) *Sample
- func (sc *SampleCreate) SetCode(s string) *SampleCreate
- func (sc *SampleCreate) SetCreateTime(t time.Time) *SampleCreate
- func (sc *SampleCreate) SetCriteria(dc domain.SampleCriteria) *SampleCreate
- func (sc *SampleCreate) SetID(u uuid.UUID) *SampleCreate
- func (sc *SampleCreate) SetNillableCreateTime(t *time.Time) *SampleCreate
- func (sc *SampleCreate) SetNillableID(u *uuid.UUID) *SampleCreate
- func (sc *SampleCreate) SetNillableUpdateTime(t *time.Time) *SampleCreate
- func (sc *SampleCreate) SetUpdateTime(t time.Time) *SampleCreate
- type SampleCreateBulk
- type SampleDelete
- type SampleDeleteOne
- type SampleEdges
- type SampleGroupBy
- func (sgb *SampleGroupBy) Aggregate(fns ...AggregateFunc) *SampleGroupBy
- func (s *SampleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SampleGroupBy) BoolX(ctx context.Context) bool
- func (s *SampleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SampleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SampleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SampleGroupBy) Float64X(ctx context.Context) float64
- func (s *SampleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SampleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SampleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SampleGroupBy) IntX(ctx context.Context) int
- func (s *SampleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SampleGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SampleGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *SampleGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *SampleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SampleGroupBy) StringX(ctx context.Context) string
- func (s *SampleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SampleGroupBy) StringsX(ctx context.Context) []string
- type SampleMutation
- func (m *SampleMutation) AddField(name string, value ent.Value) error
- func (m *SampleMutation) AddNormIDs(ids ...uuid.UUID)
- func (m *SampleMutation) AddedEdges() []string
- func (m *SampleMutation) AddedField(name string) (ent.Value, bool)
- func (m *SampleMutation) AddedFields() []string
- func (m *SampleMutation) AddedIDs(name string) []ent.Value
- func (m *SampleMutation) ClearEdge(name string) error
- func (m *SampleMutation) ClearField(name string) error
- func (m *SampleMutation) ClearNorms()
- func (m *SampleMutation) ClearedEdges() []string
- func (m *SampleMutation) ClearedFields() []string
- func (m SampleMutation) Client() *Client
- func (m *SampleMutation) Code() (r string, exists bool)
- func (m *SampleMutation) CreateTime() (r time.Time, exists bool)
- func (m *SampleMutation) Criteria() (r domain.SampleCriteria, exists bool)
- func (m *SampleMutation) EdgeCleared(name string) bool
- func (m *SampleMutation) Field(name string) (ent.Value, bool)
- func (m *SampleMutation) FieldCleared(name string) bool
- func (m *SampleMutation) Fields() []string
- func (m *SampleMutation) ID() (id uuid.UUID, exists bool)
- func (m *SampleMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *SampleMutation) NormsCleared() bool
- func (m *SampleMutation) NormsIDs() (ids []uuid.UUID)
- func (m *SampleMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *SampleMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *SampleMutation) OldCriteria(ctx context.Context) (v domain.SampleCriteria, err error)
- func (m *SampleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SampleMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *SampleMutation) Op() Op
- func (m *SampleMutation) RemoveNormIDs(ids ...uuid.UUID)
- func (m *SampleMutation) RemovedEdges() []string
- func (m *SampleMutation) RemovedIDs(name string) []ent.Value
- func (m *SampleMutation) RemovedNormsIDs() (ids []uuid.UUID)
- func (m *SampleMutation) ResetCode()
- func (m *SampleMutation) ResetCreateTime()
- func (m *SampleMutation) ResetCriteria()
- func (m *SampleMutation) ResetEdge(name string) error
- func (m *SampleMutation) ResetField(name string) error
- func (m *SampleMutation) ResetNorms()
- func (m *SampleMutation) ResetUpdateTime()
- func (m *SampleMutation) SetCode(s string)
- func (m *SampleMutation) SetCreateTime(t time.Time)
- func (m *SampleMutation) SetCriteria(dc domain.SampleCriteria)
- func (m *SampleMutation) SetField(name string, value ent.Value) error
- func (m *SampleMutation) SetID(id uuid.UUID)
- func (m *SampleMutation) SetUpdateTime(t time.Time)
- func (m SampleMutation) Tx() (*Tx, error)
- func (m *SampleMutation) Type() string
- func (m *SampleMutation) UpdateTime() (r time.Time, exists bool)
- func (m *SampleMutation) Where(ps ...predicate.Sample)
- type SampleQuery
- func (sq *SampleQuery) All(ctx context.Context) ([]*Sample, error)
- func (sq *SampleQuery) AllX(ctx context.Context) []*Sample
- func (sq *SampleQuery) Clone() *SampleQuery
- func (sq *SampleQuery) Count(ctx context.Context) (int, error)
- func (sq *SampleQuery) CountX(ctx context.Context) int
- func (sq *SampleQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SampleQuery) ExistX(ctx context.Context) bool
- func (sq *SampleQuery) First(ctx context.Context) (*Sample, error)
- func (sq *SampleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SampleQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sq *SampleQuery) FirstX(ctx context.Context) *Sample
- func (sq *SampleQuery) GroupBy(field string, fields ...string) *SampleGroupBy
- func (sq *SampleQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (sq *SampleQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sq *SampleQuery) Limit(limit int) *SampleQuery
- func (sq *SampleQuery) Offset(offset int) *SampleQuery
- func (sq *SampleQuery) Only(ctx context.Context) (*Sample, error)
- func (sq *SampleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SampleQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sq *SampleQuery) OnlyX(ctx context.Context) *Sample
- func (sq *SampleQuery) Order(o ...OrderFunc) *SampleQuery
- func (sq *SampleQuery) QueryNorms() *NormQuery
- func (sq *SampleQuery) Select(fields ...string) *SampleSelect
- func (sq *SampleQuery) Unique(unique bool) *SampleQuery
- func (sq *SampleQuery) Where(ps ...predicate.Sample) *SampleQuery
- func (sq *SampleQuery) WithNorms(opts ...func(*NormQuery)) *SampleQuery
- type SampleSelect
- func (s *SampleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SampleSelect) BoolX(ctx context.Context) bool
- func (s *SampleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SampleSelect) BoolsX(ctx context.Context) []bool
- func (s *SampleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SampleSelect) Float64X(ctx context.Context) float64
- func (s *SampleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SampleSelect) Float64sX(ctx context.Context) []float64
- func (s *SampleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SampleSelect) IntX(ctx context.Context) int
- func (s *SampleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SampleSelect) IntsX(ctx context.Context) []int
- func (ss *SampleSelect) Scan(ctx context.Context, v interface{}) error
- func (s *SampleSelect) ScanX(ctx context.Context, v interface{})
- func (s *SampleSelect) String(ctx context.Context) (_ string, err error)
- func (s *SampleSelect) StringX(ctx context.Context) string
- func (s *SampleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SampleSelect) StringsX(ctx context.Context) []string
- type SampleUpdate
- func (su *SampleUpdate) AddNormIDs(ids ...uuid.UUID) *SampleUpdate
- func (su *SampleUpdate) AddNorms(n ...*Norm) *SampleUpdate
- func (su *SampleUpdate) ClearNorms() *SampleUpdate
- func (su *SampleUpdate) Exec(ctx context.Context) error
- func (su *SampleUpdate) ExecX(ctx context.Context)
- func (su *SampleUpdate) Mutation() *SampleMutation
- func (su *SampleUpdate) RemoveNormIDs(ids ...uuid.UUID) *SampleUpdate
- func (su *SampleUpdate) RemoveNorms(n ...*Norm) *SampleUpdate
- func (su *SampleUpdate) Save(ctx context.Context) (int, error)
- func (su *SampleUpdate) SaveX(ctx context.Context) int
- func (su *SampleUpdate) SetCriteria(dc domain.SampleCriteria) *SampleUpdate
- func (su *SampleUpdate) SetUpdateTime(t time.Time) *SampleUpdate
- func (su *SampleUpdate) Where(ps ...predicate.Sample) *SampleUpdate
- type SampleUpdateOne
- func (suo *SampleUpdateOne) AddNormIDs(ids ...uuid.UUID) *SampleUpdateOne
- func (suo *SampleUpdateOne) AddNorms(n ...*Norm) *SampleUpdateOne
- func (suo *SampleUpdateOne) ClearNorms() *SampleUpdateOne
- func (suo *SampleUpdateOne) Exec(ctx context.Context) error
- func (suo *SampleUpdateOne) ExecX(ctx context.Context)
- func (suo *SampleUpdateOne) Mutation() *SampleMutation
- func (suo *SampleUpdateOne) RemoveNormIDs(ids ...uuid.UUID) *SampleUpdateOne
- func (suo *SampleUpdateOne) RemoveNorms(n ...*Norm) *SampleUpdateOne
- func (suo *SampleUpdateOne) Save(ctx context.Context) (*Sample, error)
- func (suo *SampleUpdateOne) SaveX(ctx context.Context) *Sample
- func (suo *SampleUpdateOne) Select(field string, fields ...string) *SampleUpdateOne
- func (suo *SampleUpdateOne) SetCriteria(dc domain.SampleCriteria) *SampleUpdateOne
- func (suo *SampleUpdateOne) SetUpdateTime(t time.Time) *SampleUpdateOne
- type Samples
- type Scale
- func (s *Scale) QueryInterpretations() *InterpretationQuery
- func (s *Scale) QueryItems() *ItemQuery
- func (s *Scale) QueryNorms() *NormQuery
- func (s *Scale) QueryResults() *ResultQuery
- func (s *Scale) QueryScaleItem() *ScaleItemQuery
- func (s *Scale) QueryTest() *TestQuery
- func (s *Scale) QueryTranslations() *ScaleTranslationQuery
- func (s *Scale) String() string
- func (s *Scale) Unwrap() *Scale
- func (s *Scale) Update() *ScaleUpdateOne
- type ScaleClient
- func (c *ScaleClient) Create() *ScaleCreate
- func (c *ScaleClient) CreateBulk(builders ...*ScaleCreate) *ScaleCreateBulk
- func (c *ScaleClient) Delete() *ScaleDelete
- func (c *ScaleClient) DeleteOne(s *Scale) *ScaleDeleteOne
- func (c *ScaleClient) DeleteOneID(id uuid.UUID) *ScaleDeleteOne
- func (c *ScaleClient) Get(ctx context.Context, id uuid.UUID) (*Scale, error)
- func (c *ScaleClient) GetX(ctx context.Context, id uuid.UUID) *Scale
- func (c *ScaleClient) Hooks() []Hook
- func (c *ScaleClient) Query() *ScaleQuery
- func (c *ScaleClient) QueryInterpretations(s *Scale) *InterpretationQuery
- func (c *ScaleClient) QueryItems(s *Scale) *ItemQuery
- func (c *ScaleClient) QueryNorms(s *Scale) *NormQuery
- func (c *ScaleClient) QueryResults(s *Scale) *ResultQuery
- func (c *ScaleClient) QueryScaleItem(s *Scale) *ScaleItemQuery
- func (c *ScaleClient) QueryTest(s *Scale) *TestQuery
- func (c *ScaleClient) QueryTranslations(s *Scale) *ScaleTranslationQuery
- func (c *ScaleClient) Update() *ScaleUpdate
- func (c *ScaleClient) UpdateOne(s *Scale) *ScaleUpdateOne
- func (c *ScaleClient) UpdateOneID(id uuid.UUID) *ScaleUpdateOne
- func (c *ScaleClient) Use(hooks ...Hook)
- type ScaleCreate
- func (sc *ScaleCreate) AddInterpretationIDs(ids ...uuid.UUID) *ScaleCreate
- func (sc *ScaleCreate) AddInterpretations(i ...*Interpretation) *ScaleCreate
- func (sc *ScaleCreate) AddItemIDs(ids ...uuid.UUID) *ScaleCreate
- func (sc *ScaleCreate) AddItems(i ...*Item) *ScaleCreate
- func (sc *ScaleCreate) AddNormIDs(ids ...uuid.UUID) *ScaleCreate
- func (sc *ScaleCreate) AddNorms(n ...*Norm) *ScaleCreate
- func (sc *ScaleCreate) AddResultIDs(ids ...uuid.UUID) *ScaleCreate
- func (sc *ScaleCreate) AddResults(r ...*Result) *ScaleCreate
- func (sc *ScaleCreate) AddTest(t ...*Test) *ScaleCreate
- func (sc *ScaleCreate) AddTestIDs(ids ...uuid.UUID) *ScaleCreate
- func (sc *ScaleCreate) AddTranslationIDs(ids ...uuid.UUID) *ScaleCreate
- func (sc *ScaleCreate) AddTranslations(s ...*ScaleTranslation) *ScaleCreate
- func (sc *ScaleCreate) Exec(ctx context.Context) error
- func (sc *ScaleCreate) ExecX(ctx context.Context)
- func (sc *ScaleCreate) Mutation() *ScaleMutation
- func (sc *ScaleCreate) Save(ctx context.Context) (*Scale, error)
- func (sc *ScaleCreate) SaveX(ctx context.Context) *Scale
- func (sc *ScaleCreate) SetCode(s string) *ScaleCreate
- func (sc *ScaleCreate) SetCreateTime(t time.Time) *ScaleCreate
- func (sc *ScaleCreate) SetGlobal(b bool) *ScaleCreate
- func (sc *ScaleCreate) SetID(u uuid.UUID) *ScaleCreate
- func (sc *ScaleCreate) SetNillableCreateTime(t *time.Time) *ScaleCreate
- func (sc *ScaleCreate) SetNillableGlobal(b *bool) *ScaleCreate
- func (sc *ScaleCreate) SetNillableID(u *uuid.UUID) *ScaleCreate
- func (sc *ScaleCreate) SetNillableType(s *scale.Type) *ScaleCreate
- func (sc *ScaleCreate) SetNillableUpdateTime(t *time.Time) *ScaleCreate
- func (sc *ScaleCreate) SetType(s scale.Type) *ScaleCreate
- func (sc *ScaleCreate) SetUpdateTime(t time.Time) *ScaleCreate
- type ScaleCreateBulk
- type ScaleDelete
- type ScaleDeleteOne
- type ScaleEdges
- func (e ScaleEdges) InterpretationsOrErr() ([]*Interpretation, error)
- func (e ScaleEdges) ItemsOrErr() ([]*Item, error)
- func (e ScaleEdges) NormsOrErr() ([]*Norm, error)
- func (e ScaleEdges) ResultsOrErr() ([]*Result, error)
- func (e ScaleEdges) ScaleItemOrErr() ([]*ScaleItem, error)
- func (e ScaleEdges) TestOrErr() ([]*Test, error)
- func (e ScaleEdges) TranslationsOrErr() ([]*ScaleTranslation, error)
- type ScaleGroupBy
- func (sgb *ScaleGroupBy) Aggregate(fns ...AggregateFunc) *ScaleGroupBy
- func (s *ScaleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScaleGroupBy) BoolX(ctx context.Context) bool
- func (s *ScaleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ScaleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ScaleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScaleGroupBy) Float64X(ctx context.Context) float64
- func (s *ScaleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScaleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ScaleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ScaleGroupBy) IntX(ctx context.Context) int
- func (s *ScaleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ScaleGroupBy) IntsX(ctx context.Context) []int
- func (sgb *ScaleGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *ScaleGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *ScaleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ScaleGroupBy) StringX(ctx context.Context) string
- func (s *ScaleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ScaleGroupBy) StringsX(ctx context.Context) []string
- type ScaleItem
- type ScaleItemClient
- func (c *ScaleItemClient) Create() *ScaleItemCreate
- func (c *ScaleItemClient) CreateBulk(builders ...*ScaleItemCreate) *ScaleItemCreateBulk
- func (c *ScaleItemClient) Delete() *ScaleItemDelete
- func (c *ScaleItemClient) Hooks() []Hook
- func (c *ScaleItemClient) Query() *ScaleItemQuery
- func (c *ScaleItemClient) QueryItem(si *ScaleItem) *ItemQuery
- func (c *ScaleItemClient) QueryScale(si *ScaleItem) *ScaleQuery
- func (c *ScaleItemClient) Update() *ScaleItemUpdate
- func (c *ScaleItemClient) UpdateOne(si *ScaleItem) *ScaleItemUpdateOne
- func (c *ScaleItemClient) Use(hooks ...Hook)
- type ScaleItemCreate
- func (sic *ScaleItemCreate) Exec(ctx context.Context) error
- func (sic *ScaleItemCreate) ExecX(ctx context.Context)
- func (sic *ScaleItemCreate) Mutation() *ScaleItemMutation
- func (sic *ScaleItemCreate) Save(ctx context.Context) (*ScaleItem, error)
- func (sic *ScaleItemCreate) SaveX(ctx context.Context) *ScaleItem
- func (sic *ScaleItemCreate) SetItem(i *Item) *ScaleItemCreate
- func (sic *ScaleItemCreate) SetItemID(u uuid.UUID) *ScaleItemCreate
- func (sic *ScaleItemCreate) SetNillableReverse(b *bool) *ScaleItemCreate
- func (sic *ScaleItemCreate) SetReverse(b bool) *ScaleItemCreate
- func (sic *ScaleItemCreate) SetScale(s *Scale) *ScaleItemCreate
- func (sic *ScaleItemCreate) SetScaleID(u uuid.UUID) *ScaleItemCreate
- type ScaleItemCreateBulk
- type ScaleItemDelete
- type ScaleItemDeleteOne
- type ScaleItemEdges
- type ScaleItemGroupBy
- func (sigb *ScaleItemGroupBy) Aggregate(fns ...AggregateFunc) *ScaleItemGroupBy
- func (s *ScaleItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScaleItemGroupBy) BoolX(ctx context.Context) bool
- func (s *ScaleItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ScaleItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ScaleItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScaleItemGroupBy) Float64X(ctx context.Context) float64
- func (s *ScaleItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScaleItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ScaleItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ScaleItemGroupBy) IntX(ctx context.Context) int
- func (s *ScaleItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ScaleItemGroupBy) IntsX(ctx context.Context) []int
- func (sigb *ScaleItemGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *ScaleItemGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *ScaleItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ScaleItemGroupBy) StringX(ctx context.Context) string
- func (s *ScaleItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ScaleItemGroupBy) StringsX(ctx context.Context) []string
- type ScaleItemMutation
- func (m *ScaleItemMutation) AddField(name string, value ent.Value) error
- func (m *ScaleItemMutation) AddedEdges() []string
- func (m *ScaleItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *ScaleItemMutation) AddedFields() []string
- func (m *ScaleItemMutation) AddedIDs(name string) []ent.Value
- func (m *ScaleItemMutation) ClearEdge(name string) error
- func (m *ScaleItemMutation) ClearField(name string) error
- func (m *ScaleItemMutation) ClearItem()
- func (m *ScaleItemMutation) ClearScale()
- func (m *ScaleItemMutation) ClearedEdges() []string
- func (m *ScaleItemMutation) ClearedFields() []string
- func (m ScaleItemMutation) Client() *Client
- func (m *ScaleItemMutation) EdgeCleared(name string) bool
- func (m *ScaleItemMutation) Field(name string) (ent.Value, bool)
- func (m *ScaleItemMutation) FieldCleared(name string) bool
- func (m *ScaleItemMutation) Fields() []string
- func (m *ScaleItemMutation) ItemCleared() bool
- func (m *ScaleItemMutation) ItemID() (r uuid.UUID, exists bool)
- func (m *ScaleItemMutation) ItemIDs() (ids []uuid.UUID)
- func (m *ScaleItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ScaleItemMutation) Op() Op
- func (m *ScaleItemMutation) RemovedEdges() []string
- func (m *ScaleItemMutation) RemovedIDs(name string) []ent.Value
- func (m *ScaleItemMutation) ResetEdge(name string) error
- func (m *ScaleItemMutation) ResetField(name string) error
- func (m *ScaleItemMutation) ResetItem()
- func (m *ScaleItemMutation) ResetItemID()
- func (m *ScaleItemMutation) ResetReverse()
- func (m *ScaleItemMutation) ResetScale()
- func (m *ScaleItemMutation) ResetScaleID()
- func (m *ScaleItemMutation) Reverse() (r bool, exists bool)
- func (m *ScaleItemMutation) ScaleCleared() bool
- func (m *ScaleItemMutation) ScaleID() (r uuid.UUID, exists bool)
- func (m *ScaleItemMutation) ScaleIDs() (ids []uuid.UUID)
- func (m *ScaleItemMutation) SetField(name string, value ent.Value) error
- func (m *ScaleItemMutation) SetItemID(u uuid.UUID)
- func (m *ScaleItemMutation) SetReverse(b bool)
- func (m *ScaleItemMutation) SetScaleID(u uuid.UUID)
- func (m ScaleItemMutation) Tx() (*Tx, error)
- func (m *ScaleItemMutation) Type() string
- func (m *ScaleItemMutation) Where(ps ...predicate.ScaleItem)
- type ScaleItemQuery
- func (siq *ScaleItemQuery) All(ctx context.Context) ([]*ScaleItem, error)
- func (siq *ScaleItemQuery) AllX(ctx context.Context) []*ScaleItem
- func (siq *ScaleItemQuery) Clone() *ScaleItemQuery
- func (siq *ScaleItemQuery) Count(ctx context.Context) (int, error)
- func (siq *ScaleItemQuery) CountX(ctx context.Context) int
- func (siq *ScaleItemQuery) Exist(ctx context.Context) (bool, error)
- func (siq *ScaleItemQuery) ExistX(ctx context.Context) bool
- func (siq *ScaleItemQuery) First(ctx context.Context) (*ScaleItem, error)
- func (siq *ScaleItemQuery) FirstX(ctx context.Context) *ScaleItem
- func (siq *ScaleItemQuery) GroupBy(field string, fields ...string) *ScaleItemGroupBy
- func (siq *ScaleItemQuery) Limit(limit int) *ScaleItemQuery
- func (siq *ScaleItemQuery) Offset(offset int) *ScaleItemQuery
- func (siq *ScaleItemQuery) Only(ctx context.Context) (*ScaleItem, error)
- func (siq *ScaleItemQuery) OnlyX(ctx context.Context) *ScaleItem
- func (siq *ScaleItemQuery) Order(o ...OrderFunc) *ScaleItemQuery
- func (siq *ScaleItemQuery) QueryItem() *ItemQuery
- func (siq *ScaleItemQuery) QueryScale() *ScaleQuery
- func (siq *ScaleItemQuery) Select(fields ...string) *ScaleItemSelect
- func (siq *ScaleItemQuery) Unique(unique bool) *ScaleItemQuery
- func (siq *ScaleItemQuery) Where(ps ...predicate.ScaleItem) *ScaleItemQuery
- func (siq *ScaleItemQuery) WithItem(opts ...func(*ItemQuery)) *ScaleItemQuery
- func (siq *ScaleItemQuery) WithScale(opts ...func(*ScaleQuery)) *ScaleItemQuery
- type ScaleItemSelect
- func (s *ScaleItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScaleItemSelect) BoolX(ctx context.Context) bool
- func (s *ScaleItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ScaleItemSelect) BoolsX(ctx context.Context) []bool
- func (s *ScaleItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScaleItemSelect) Float64X(ctx context.Context) float64
- func (s *ScaleItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScaleItemSelect) Float64sX(ctx context.Context) []float64
- func (s *ScaleItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ScaleItemSelect) IntX(ctx context.Context) int
- func (s *ScaleItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ScaleItemSelect) IntsX(ctx context.Context) []int
- func (sis *ScaleItemSelect) Scan(ctx context.Context, v interface{}) error
- func (s *ScaleItemSelect) ScanX(ctx context.Context, v interface{})
- func (s *ScaleItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *ScaleItemSelect) StringX(ctx context.Context) string
- func (s *ScaleItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ScaleItemSelect) StringsX(ctx context.Context) []string
- type ScaleItemUpdate
- func (siu *ScaleItemUpdate) ClearItem() *ScaleItemUpdate
- func (siu *ScaleItemUpdate) ClearScale() *ScaleItemUpdate
- func (siu *ScaleItemUpdate) Exec(ctx context.Context) error
- func (siu *ScaleItemUpdate) ExecX(ctx context.Context)
- func (siu *ScaleItemUpdate) Mutation() *ScaleItemMutation
- func (siu *ScaleItemUpdate) Save(ctx context.Context) (int, error)
- func (siu *ScaleItemUpdate) SaveX(ctx context.Context) int
- func (siu *ScaleItemUpdate) SetItem(i *Item) *ScaleItemUpdate
- func (siu *ScaleItemUpdate) SetItemID(u uuid.UUID) *ScaleItemUpdate
- func (siu *ScaleItemUpdate) SetNillableReverse(b *bool) *ScaleItemUpdate
- func (siu *ScaleItemUpdate) SetReverse(b bool) *ScaleItemUpdate
- func (siu *ScaleItemUpdate) SetScale(s *Scale) *ScaleItemUpdate
- func (siu *ScaleItemUpdate) SetScaleID(u uuid.UUID) *ScaleItemUpdate
- func (siu *ScaleItemUpdate) Where(ps ...predicate.ScaleItem) *ScaleItemUpdate
- type ScaleItemUpdateOne
- func (siuo *ScaleItemUpdateOne) ClearItem() *ScaleItemUpdateOne
- func (siuo *ScaleItemUpdateOne) ClearScale() *ScaleItemUpdateOne
- func (siuo *ScaleItemUpdateOne) Exec(ctx context.Context) error
- func (siuo *ScaleItemUpdateOne) ExecX(ctx context.Context)
- func (siuo *ScaleItemUpdateOne) Mutation() *ScaleItemMutation
- func (siuo *ScaleItemUpdateOne) Save(ctx context.Context) (*ScaleItem, error)
- func (siuo *ScaleItemUpdateOne) SaveX(ctx context.Context) *ScaleItem
- func (siuo *ScaleItemUpdateOne) Select(field string, fields ...string) *ScaleItemUpdateOne
- func (siuo *ScaleItemUpdateOne) SetItem(i *Item) *ScaleItemUpdateOne
- func (siuo *ScaleItemUpdateOne) SetItemID(u uuid.UUID) *ScaleItemUpdateOne
- func (siuo *ScaleItemUpdateOne) SetNillableReverse(b *bool) *ScaleItemUpdateOne
- func (siuo *ScaleItemUpdateOne) SetReverse(b bool) *ScaleItemUpdateOne
- func (siuo *ScaleItemUpdateOne) SetScale(s *Scale) *ScaleItemUpdateOne
- func (siuo *ScaleItemUpdateOne) SetScaleID(u uuid.UUID) *ScaleItemUpdateOne
- type ScaleItems
- type ScaleMutation
- func (m *ScaleMutation) AddField(name string, value ent.Value) error
- func (m *ScaleMutation) AddInterpretationIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) AddItemIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) AddNormIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) AddResultIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) AddTestIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) AddTranslationIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) AddedEdges() []string
- func (m *ScaleMutation) AddedField(name string) (ent.Value, bool)
- func (m *ScaleMutation) AddedFields() []string
- func (m *ScaleMutation) AddedIDs(name string) []ent.Value
- func (m *ScaleMutation) ClearEdge(name string) error
- func (m *ScaleMutation) ClearField(name string) error
- func (m *ScaleMutation) ClearInterpretations()
- func (m *ScaleMutation) ClearItems()
- func (m *ScaleMutation) ClearNorms()
- func (m *ScaleMutation) ClearResults()
- func (m *ScaleMutation) ClearTest()
- func (m *ScaleMutation) ClearTranslations()
- func (m *ScaleMutation) ClearedEdges() []string
- func (m *ScaleMutation) ClearedFields() []string
- func (m ScaleMutation) Client() *Client
- func (m *ScaleMutation) Code() (r string, exists bool)
- func (m *ScaleMutation) CreateTime() (r time.Time, exists bool)
- func (m *ScaleMutation) EdgeCleared(name string) bool
- func (m *ScaleMutation) Field(name string) (ent.Value, bool)
- func (m *ScaleMutation) FieldCleared(name string) bool
- func (m *ScaleMutation) Fields() []string
- func (m *ScaleMutation) GetType() (r scale.Type, exists bool)
- func (m *ScaleMutation) Global() (r bool, exists bool)
- func (m *ScaleMutation) ID() (id uuid.UUID, exists bool)
- func (m *ScaleMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ScaleMutation) InterpretationsCleared() bool
- func (m *ScaleMutation) InterpretationsIDs() (ids []uuid.UUID)
- func (m *ScaleMutation) ItemsCleared() bool
- func (m *ScaleMutation) ItemsIDs() (ids []uuid.UUID)
- func (m *ScaleMutation) NormsCleared() bool
- func (m *ScaleMutation) NormsIDs() (ids []uuid.UUID)
- func (m *ScaleMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *ScaleMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ScaleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ScaleMutation) OldGlobal(ctx context.Context) (v bool, err error)
- func (m *ScaleMutation) OldType(ctx context.Context) (v scale.Type, err error)
- func (m *ScaleMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ScaleMutation) Op() Op
- func (m *ScaleMutation) RemoveInterpretationIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) RemoveItemIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) RemoveNormIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) RemoveResultIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) RemoveTestIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) RemoveTranslationIDs(ids ...uuid.UUID)
- func (m *ScaleMutation) RemovedEdges() []string
- func (m *ScaleMutation) RemovedIDs(name string) []ent.Value
- func (m *ScaleMutation) RemovedInterpretationsIDs() (ids []uuid.UUID)
- func (m *ScaleMutation) RemovedItemsIDs() (ids []uuid.UUID)
- func (m *ScaleMutation) RemovedNormsIDs() (ids []uuid.UUID)
- func (m *ScaleMutation) RemovedResultsIDs() (ids []uuid.UUID)
- func (m *ScaleMutation) RemovedTestIDs() (ids []uuid.UUID)
- func (m *ScaleMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
- func (m *ScaleMutation) ResetCode()
- func (m *ScaleMutation) ResetCreateTime()
- func (m *ScaleMutation) ResetEdge(name string) error
- func (m *ScaleMutation) ResetField(name string) error
- func (m *ScaleMutation) ResetGlobal()
- func (m *ScaleMutation) ResetInterpretations()
- func (m *ScaleMutation) ResetItems()
- func (m *ScaleMutation) ResetNorms()
- func (m *ScaleMutation) ResetResults()
- func (m *ScaleMutation) ResetTest()
- func (m *ScaleMutation) ResetTranslations()
- func (m *ScaleMutation) ResetType()
- func (m *ScaleMutation) ResetUpdateTime()
- func (m *ScaleMutation) ResultsCleared() bool
- func (m *ScaleMutation) ResultsIDs() (ids []uuid.UUID)
- func (m *ScaleMutation) SetCode(s string)
- func (m *ScaleMutation) SetCreateTime(t time.Time)
- func (m *ScaleMutation) SetField(name string, value ent.Value) error
- func (m *ScaleMutation) SetGlobal(b bool)
- func (m *ScaleMutation) SetID(id uuid.UUID)
- func (m *ScaleMutation) SetType(s scale.Type)
- func (m *ScaleMutation) SetUpdateTime(t time.Time)
- func (m *ScaleMutation) TestCleared() bool
- func (m *ScaleMutation) TestIDs() (ids []uuid.UUID)
- func (m *ScaleMutation) TranslationsCleared() bool
- func (m *ScaleMutation) TranslationsIDs() (ids []uuid.UUID)
- func (m ScaleMutation) Tx() (*Tx, error)
- func (m *ScaleMutation) Type() string
- func (m *ScaleMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ScaleMutation) Where(ps ...predicate.Scale)
- type ScaleQuery
- func (sq *ScaleQuery) All(ctx context.Context) ([]*Scale, error)
- func (sq *ScaleQuery) AllX(ctx context.Context) []*Scale
- func (sq *ScaleQuery) Clone() *ScaleQuery
- func (sq *ScaleQuery) Count(ctx context.Context) (int, error)
- func (sq *ScaleQuery) CountX(ctx context.Context) int
- func (sq *ScaleQuery) Exist(ctx context.Context) (bool, error)
- func (sq *ScaleQuery) ExistX(ctx context.Context) bool
- func (sq *ScaleQuery) First(ctx context.Context) (*Scale, error)
- func (sq *ScaleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *ScaleQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sq *ScaleQuery) FirstX(ctx context.Context) *Scale
- func (sq *ScaleQuery) GroupBy(field string, fields ...string) *ScaleGroupBy
- func (sq *ScaleQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (sq *ScaleQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sq *ScaleQuery) Limit(limit int) *ScaleQuery
- func (sq *ScaleQuery) Offset(offset int) *ScaleQuery
- func (sq *ScaleQuery) Only(ctx context.Context) (*Scale, error)
- func (sq *ScaleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *ScaleQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sq *ScaleQuery) OnlyX(ctx context.Context) *Scale
- func (sq *ScaleQuery) Order(o ...OrderFunc) *ScaleQuery
- func (sq *ScaleQuery) QueryInterpretations() *InterpretationQuery
- func (sq *ScaleQuery) QueryItems() *ItemQuery
- func (sq *ScaleQuery) QueryNorms() *NormQuery
- func (sq *ScaleQuery) QueryResults() *ResultQuery
- func (sq *ScaleQuery) QueryScaleItem() *ScaleItemQuery
- func (sq *ScaleQuery) QueryTest() *TestQuery
- func (sq *ScaleQuery) QueryTranslations() *ScaleTranslationQuery
- func (sq *ScaleQuery) Select(fields ...string) *ScaleSelect
- func (sq *ScaleQuery) Unique(unique bool) *ScaleQuery
- func (sq *ScaleQuery) Where(ps ...predicate.Scale) *ScaleQuery
- func (sq *ScaleQuery) WithInterpretations(opts ...func(*InterpretationQuery)) *ScaleQuery
- func (sq *ScaleQuery) WithItems(opts ...func(*ItemQuery)) *ScaleQuery
- func (sq *ScaleQuery) WithNorms(opts ...func(*NormQuery)) *ScaleQuery
- func (sq *ScaleQuery) WithResults(opts ...func(*ResultQuery)) *ScaleQuery
- func (sq *ScaleQuery) WithScaleItem(opts ...func(*ScaleItemQuery)) *ScaleQuery
- func (sq *ScaleQuery) WithTest(opts ...func(*TestQuery)) *ScaleQuery
- func (sq *ScaleQuery) WithTranslations(opts ...func(*ScaleTranslationQuery)) *ScaleQuery
- type ScaleSelect
- func (s *ScaleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScaleSelect) BoolX(ctx context.Context) bool
- func (s *ScaleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ScaleSelect) BoolsX(ctx context.Context) []bool
- func (s *ScaleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScaleSelect) Float64X(ctx context.Context) float64
- func (s *ScaleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScaleSelect) Float64sX(ctx context.Context) []float64
- func (s *ScaleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ScaleSelect) IntX(ctx context.Context) int
- func (s *ScaleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ScaleSelect) IntsX(ctx context.Context) []int
- func (ss *ScaleSelect) Scan(ctx context.Context, v interface{}) error
- func (s *ScaleSelect) ScanX(ctx context.Context, v interface{})
- func (s *ScaleSelect) String(ctx context.Context) (_ string, err error)
- func (s *ScaleSelect) StringX(ctx context.Context) string
- func (s *ScaleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ScaleSelect) StringsX(ctx context.Context) []string
- type ScaleTranslation
- type ScaleTranslationClient
- func (c *ScaleTranslationClient) Create() *ScaleTranslationCreate
- func (c *ScaleTranslationClient) CreateBulk(builders ...*ScaleTranslationCreate) *ScaleTranslationCreateBulk
- func (c *ScaleTranslationClient) Delete() *ScaleTranslationDelete
- func (c *ScaleTranslationClient) DeleteOne(st *ScaleTranslation) *ScaleTranslationDeleteOne
- func (c *ScaleTranslationClient) DeleteOneID(id uuid.UUID) *ScaleTranslationDeleteOne
- func (c *ScaleTranslationClient) Get(ctx context.Context, id uuid.UUID) (*ScaleTranslation, error)
- func (c *ScaleTranslationClient) GetX(ctx context.Context, id uuid.UUID) *ScaleTranslation
- func (c *ScaleTranslationClient) Hooks() []Hook
- func (c *ScaleTranslationClient) Query() *ScaleTranslationQuery
- func (c *ScaleTranslationClient) QueryScale(st *ScaleTranslation) *ScaleQuery
- func (c *ScaleTranslationClient) Update() *ScaleTranslationUpdate
- func (c *ScaleTranslationClient) UpdateOne(st *ScaleTranslation) *ScaleTranslationUpdateOne
- func (c *ScaleTranslationClient) UpdateOneID(id uuid.UUID) *ScaleTranslationUpdateOne
- func (c *ScaleTranslationClient) Use(hooks ...Hook)
- type ScaleTranslationCreate
- func (stc *ScaleTranslationCreate) Exec(ctx context.Context) error
- func (stc *ScaleTranslationCreate) ExecX(ctx context.Context)
- func (stc *ScaleTranslationCreate) Mutation() *ScaleTranslationMutation
- func (stc *ScaleTranslationCreate) Save(ctx context.Context) (*ScaleTranslation, error)
- func (stc *ScaleTranslationCreate) SaveX(ctx context.Context) *ScaleTranslation
- func (stc *ScaleTranslationCreate) SetAbbreviation(s string) *ScaleTranslationCreate
- func (stc *ScaleTranslationCreate) SetDescription(s string) *ScaleTranslationCreate
- func (stc *ScaleTranslationCreate) SetID(u uuid.UUID) *ScaleTranslationCreate
- func (stc *ScaleTranslationCreate) SetLocale(s scaletranslation.Locale) *ScaleTranslationCreate
- func (stc *ScaleTranslationCreate) SetNillableAbbreviation(s *string) *ScaleTranslationCreate
- func (stc *ScaleTranslationCreate) SetNillableDescription(s *string) *ScaleTranslationCreate
- func (stc *ScaleTranslationCreate) SetNillableID(u *uuid.UUID) *ScaleTranslationCreate
- func (stc *ScaleTranslationCreate) SetNillableScaleID(id *uuid.UUID) *ScaleTranslationCreate
- func (stc *ScaleTranslationCreate) SetScale(s *Scale) *ScaleTranslationCreate
- func (stc *ScaleTranslationCreate) SetScaleID(id uuid.UUID) *ScaleTranslationCreate
- func (stc *ScaleTranslationCreate) SetTitle(s string) *ScaleTranslationCreate
- type ScaleTranslationCreateBulk
- func (stcb *ScaleTranslationCreateBulk) Exec(ctx context.Context) error
- func (stcb *ScaleTranslationCreateBulk) ExecX(ctx context.Context)
- func (stcb *ScaleTranslationCreateBulk) Save(ctx context.Context) ([]*ScaleTranslation, error)
- func (stcb *ScaleTranslationCreateBulk) SaveX(ctx context.Context) []*ScaleTranslation
- type ScaleTranslationDelete
- type ScaleTranslationDeleteOne
- type ScaleTranslationEdges
- type ScaleTranslationGroupBy
- func (stgb *ScaleTranslationGroupBy) Aggregate(fns ...AggregateFunc) *ScaleTranslationGroupBy
- func (s *ScaleTranslationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScaleTranslationGroupBy) BoolX(ctx context.Context) bool
- func (s *ScaleTranslationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ScaleTranslationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ScaleTranslationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScaleTranslationGroupBy) Float64X(ctx context.Context) float64
- func (s *ScaleTranslationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScaleTranslationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ScaleTranslationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ScaleTranslationGroupBy) IntX(ctx context.Context) int
- func (s *ScaleTranslationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ScaleTranslationGroupBy) IntsX(ctx context.Context) []int
- func (stgb *ScaleTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *ScaleTranslationGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *ScaleTranslationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ScaleTranslationGroupBy) StringX(ctx context.Context) string
- func (s *ScaleTranslationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ScaleTranslationGroupBy) StringsX(ctx context.Context) []string
- type ScaleTranslationMutation
- func (m *ScaleTranslationMutation) Abbreviation() (r string, exists bool)
- func (m *ScaleTranslationMutation) AddField(name string, value ent.Value) error
- func (m *ScaleTranslationMutation) AddedEdges() []string
- func (m *ScaleTranslationMutation) AddedField(name string) (ent.Value, bool)
- func (m *ScaleTranslationMutation) AddedFields() []string
- func (m *ScaleTranslationMutation) AddedIDs(name string) []ent.Value
- func (m *ScaleTranslationMutation) ClearDescription()
- func (m *ScaleTranslationMutation) ClearEdge(name string) error
- func (m *ScaleTranslationMutation) ClearField(name string) error
- func (m *ScaleTranslationMutation) ClearScale()
- func (m *ScaleTranslationMutation) ClearedEdges() []string
- func (m *ScaleTranslationMutation) ClearedFields() []string
- func (m ScaleTranslationMutation) Client() *Client
- func (m *ScaleTranslationMutation) Description() (r string, exists bool)
- func (m *ScaleTranslationMutation) DescriptionCleared() bool
- func (m *ScaleTranslationMutation) EdgeCleared(name string) bool
- func (m *ScaleTranslationMutation) Field(name string) (ent.Value, bool)
- func (m *ScaleTranslationMutation) FieldCleared(name string) bool
- func (m *ScaleTranslationMutation) Fields() []string
- func (m *ScaleTranslationMutation) ID() (id uuid.UUID, exists bool)
- func (m *ScaleTranslationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ScaleTranslationMutation) Locale() (r scaletranslation.Locale, exists bool)
- func (m *ScaleTranslationMutation) OldAbbreviation(ctx context.Context) (v string, err error)
- func (m *ScaleTranslationMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *ScaleTranslationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ScaleTranslationMutation) OldLocale(ctx context.Context) (v scaletranslation.Locale, err error)
- func (m *ScaleTranslationMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *ScaleTranslationMutation) Op() Op
- func (m *ScaleTranslationMutation) RemovedEdges() []string
- func (m *ScaleTranslationMutation) RemovedIDs(name string) []ent.Value
- func (m *ScaleTranslationMutation) ResetAbbreviation()
- func (m *ScaleTranslationMutation) ResetDescription()
- func (m *ScaleTranslationMutation) ResetEdge(name string) error
- func (m *ScaleTranslationMutation) ResetField(name string) error
- func (m *ScaleTranslationMutation) ResetLocale()
- func (m *ScaleTranslationMutation) ResetScale()
- func (m *ScaleTranslationMutation) ResetTitle()
- func (m *ScaleTranslationMutation) ScaleCleared() bool
- func (m *ScaleTranslationMutation) ScaleID() (id uuid.UUID, exists bool)
- func (m *ScaleTranslationMutation) ScaleIDs() (ids []uuid.UUID)
- func (m *ScaleTranslationMutation) SetAbbreviation(s string)
- func (m *ScaleTranslationMutation) SetDescription(s string)
- func (m *ScaleTranslationMutation) SetField(name string, value ent.Value) error
- func (m *ScaleTranslationMutation) SetID(id uuid.UUID)
- func (m *ScaleTranslationMutation) SetLocale(s scaletranslation.Locale)
- func (m *ScaleTranslationMutation) SetScaleID(id uuid.UUID)
- func (m *ScaleTranslationMutation) SetTitle(s string)
- func (m *ScaleTranslationMutation) Title() (r string, exists bool)
- func (m ScaleTranslationMutation) Tx() (*Tx, error)
- func (m *ScaleTranslationMutation) Type() string
- func (m *ScaleTranslationMutation) Where(ps ...predicate.ScaleTranslation)
- type ScaleTranslationQuery
- func (stq *ScaleTranslationQuery) All(ctx context.Context) ([]*ScaleTranslation, error)
- func (stq *ScaleTranslationQuery) AllX(ctx context.Context) []*ScaleTranslation
- func (stq *ScaleTranslationQuery) Clone() *ScaleTranslationQuery
- func (stq *ScaleTranslationQuery) Count(ctx context.Context) (int, error)
- func (stq *ScaleTranslationQuery) CountX(ctx context.Context) int
- func (stq *ScaleTranslationQuery) Exist(ctx context.Context) (bool, error)
- func (stq *ScaleTranslationQuery) ExistX(ctx context.Context) bool
- func (stq *ScaleTranslationQuery) First(ctx context.Context) (*ScaleTranslation, error)
- func (stq *ScaleTranslationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (stq *ScaleTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (stq *ScaleTranslationQuery) FirstX(ctx context.Context) *ScaleTranslation
- func (stq *ScaleTranslationQuery) GroupBy(field string, fields ...string) *ScaleTranslationGroupBy
- func (stq *ScaleTranslationQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (stq *ScaleTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (stq *ScaleTranslationQuery) Limit(limit int) *ScaleTranslationQuery
- func (stq *ScaleTranslationQuery) Offset(offset int) *ScaleTranslationQuery
- func (stq *ScaleTranslationQuery) Only(ctx context.Context) (*ScaleTranslation, error)
- func (stq *ScaleTranslationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (stq *ScaleTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (stq *ScaleTranslationQuery) OnlyX(ctx context.Context) *ScaleTranslation
- func (stq *ScaleTranslationQuery) Order(o ...OrderFunc) *ScaleTranslationQuery
- func (stq *ScaleTranslationQuery) QueryScale() *ScaleQuery
- func (stq *ScaleTranslationQuery) Select(fields ...string) *ScaleTranslationSelect
- func (stq *ScaleTranslationQuery) Unique(unique bool) *ScaleTranslationQuery
- func (stq *ScaleTranslationQuery) Where(ps ...predicate.ScaleTranslation) *ScaleTranslationQuery
- func (stq *ScaleTranslationQuery) WithScale(opts ...func(*ScaleQuery)) *ScaleTranslationQuery
- type ScaleTranslationSelect
- func (s *ScaleTranslationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScaleTranslationSelect) BoolX(ctx context.Context) bool
- func (s *ScaleTranslationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ScaleTranslationSelect) BoolsX(ctx context.Context) []bool
- func (s *ScaleTranslationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScaleTranslationSelect) Float64X(ctx context.Context) float64
- func (s *ScaleTranslationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScaleTranslationSelect) Float64sX(ctx context.Context) []float64
- func (s *ScaleTranslationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ScaleTranslationSelect) IntX(ctx context.Context) int
- func (s *ScaleTranslationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ScaleTranslationSelect) IntsX(ctx context.Context) []int
- func (sts *ScaleTranslationSelect) Scan(ctx context.Context, v interface{}) error
- func (s *ScaleTranslationSelect) ScanX(ctx context.Context, v interface{})
- func (s *ScaleTranslationSelect) String(ctx context.Context) (_ string, err error)
- func (s *ScaleTranslationSelect) StringX(ctx context.Context) string
- func (s *ScaleTranslationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ScaleTranslationSelect) StringsX(ctx context.Context) []string
- type ScaleTranslationUpdate
- func (stu *ScaleTranslationUpdate) ClearDescription() *ScaleTranslationUpdate
- func (stu *ScaleTranslationUpdate) ClearScale() *ScaleTranslationUpdate
- func (stu *ScaleTranslationUpdate) Exec(ctx context.Context) error
- func (stu *ScaleTranslationUpdate) ExecX(ctx context.Context)
- func (stu *ScaleTranslationUpdate) Mutation() *ScaleTranslationMutation
- func (stu *ScaleTranslationUpdate) Save(ctx context.Context) (int, error)
- func (stu *ScaleTranslationUpdate) SaveX(ctx context.Context) int
- func (stu *ScaleTranslationUpdate) SetAbbreviation(s string) *ScaleTranslationUpdate
- func (stu *ScaleTranslationUpdate) SetDescription(s string) *ScaleTranslationUpdate
- func (stu *ScaleTranslationUpdate) SetNillableAbbreviation(s *string) *ScaleTranslationUpdate
- func (stu *ScaleTranslationUpdate) SetNillableDescription(s *string) *ScaleTranslationUpdate
- func (stu *ScaleTranslationUpdate) SetNillableScaleID(id *uuid.UUID) *ScaleTranslationUpdate
- func (stu *ScaleTranslationUpdate) SetScale(s *Scale) *ScaleTranslationUpdate
- func (stu *ScaleTranslationUpdate) SetScaleID(id uuid.UUID) *ScaleTranslationUpdate
- func (stu *ScaleTranslationUpdate) SetTitle(s string) *ScaleTranslationUpdate
- func (stu *ScaleTranslationUpdate) Where(ps ...predicate.ScaleTranslation) *ScaleTranslationUpdate
- type ScaleTranslationUpdateOne
- func (stuo *ScaleTranslationUpdateOne) ClearDescription() *ScaleTranslationUpdateOne
- func (stuo *ScaleTranslationUpdateOne) ClearScale() *ScaleTranslationUpdateOne
- func (stuo *ScaleTranslationUpdateOne) Exec(ctx context.Context) error
- func (stuo *ScaleTranslationUpdateOne) ExecX(ctx context.Context)
- func (stuo *ScaleTranslationUpdateOne) Mutation() *ScaleTranslationMutation
- func (stuo *ScaleTranslationUpdateOne) Save(ctx context.Context) (*ScaleTranslation, error)
- func (stuo *ScaleTranslationUpdateOne) SaveX(ctx context.Context) *ScaleTranslation
- func (stuo *ScaleTranslationUpdateOne) Select(field string, fields ...string) *ScaleTranslationUpdateOne
- func (stuo *ScaleTranslationUpdateOne) SetAbbreviation(s string) *ScaleTranslationUpdateOne
- func (stuo *ScaleTranslationUpdateOne) SetDescription(s string) *ScaleTranslationUpdateOne
- func (stuo *ScaleTranslationUpdateOne) SetNillableAbbreviation(s *string) *ScaleTranslationUpdateOne
- func (stuo *ScaleTranslationUpdateOne) SetNillableDescription(s *string) *ScaleTranslationUpdateOne
- func (stuo *ScaleTranslationUpdateOne) SetNillableScaleID(id *uuid.UUID) *ScaleTranslationUpdateOne
- func (stuo *ScaleTranslationUpdateOne) SetScale(s *Scale) *ScaleTranslationUpdateOne
- func (stuo *ScaleTranslationUpdateOne) SetScaleID(id uuid.UUID) *ScaleTranslationUpdateOne
- func (stuo *ScaleTranslationUpdateOne) SetTitle(s string) *ScaleTranslationUpdateOne
- type ScaleTranslations
- type ScaleUpdate
- func (su *ScaleUpdate) AddInterpretationIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) AddInterpretations(i ...*Interpretation) *ScaleUpdate
- func (su *ScaleUpdate) AddItemIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) AddItems(i ...*Item) *ScaleUpdate
- func (su *ScaleUpdate) AddNormIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) AddNorms(n ...*Norm) *ScaleUpdate
- func (su *ScaleUpdate) AddResultIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) AddResults(r ...*Result) *ScaleUpdate
- func (su *ScaleUpdate) AddTest(t ...*Test) *ScaleUpdate
- func (su *ScaleUpdate) AddTestIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) AddTranslationIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) AddTranslations(s ...*ScaleTranslation) *ScaleUpdate
- func (su *ScaleUpdate) ClearInterpretations() *ScaleUpdate
- func (su *ScaleUpdate) ClearItems() *ScaleUpdate
- func (su *ScaleUpdate) ClearNorms() *ScaleUpdate
- func (su *ScaleUpdate) ClearResults() *ScaleUpdate
- func (su *ScaleUpdate) ClearTest() *ScaleUpdate
- func (su *ScaleUpdate) ClearTranslations() *ScaleUpdate
- func (su *ScaleUpdate) Exec(ctx context.Context) error
- func (su *ScaleUpdate) ExecX(ctx context.Context)
- func (su *ScaleUpdate) Mutation() *ScaleMutation
- func (su *ScaleUpdate) RemoveInterpretationIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) RemoveInterpretations(i ...*Interpretation) *ScaleUpdate
- func (su *ScaleUpdate) RemoveItemIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) RemoveItems(i ...*Item) *ScaleUpdate
- func (su *ScaleUpdate) RemoveNormIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) RemoveNorms(n ...*Norm) *ScaleUpdate
- func (su *ScaleUpdate) RemoveResultIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) RemoveResults(r ...*Result) *ScaleUpdate
- func (su *ScaleUpdate) RemoveTest(t ...*Test) *ScaleUpdate
- func (su *ScaleUpdate) RemoveTestIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) RemoveTranslationIDs(ids ...uuid.UUID) *ScaleUpdate
- func (su *ScaleUpdate) RemoveTranslations(s ...*ScaleTranslation) *ScaleUpdate
- func (su *ScaleUpdate) Save(ctx context.Context) (int, error)
- func (su *ScaleUpdate) SaveX(ctx context.Context) int
- func (su *ScaleUpdate) SetGlobal(b bool) *ScaleUpdate
- func (su *ScaleUpdate) SetNillableGlobal(b *bool) *ScaleUpdate
- func (su *ScaleUpdate) SetNillableType(s *scale.Type) *ScaleUpdate
- func (su *ScaleUpdate) SetType(s scale.Type) *ScaleUpdate
- func (su *ScaleUpdate) SetUpdateTime(t time.Time) *ScaleUpdate
- func (su *ScaleUpdate) Where(ps ...predicate.Scale) *ScaleUpdate
- type ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddInterpretationIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddInterpretations(i ...*Interpretation) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddItemIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddItems(i ...*Item) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddNormIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddNorms(n ...*Norm) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddResultIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddResults(r ...*Result) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddTest(t ...*Test) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddTestIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddTranslations(s ...*ScaleTranslation) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) ClearInterpretations() *ScaleUpdateOne
- func (suo *ScaleUpdateOne) ClearItems() *ScaleUpdateOne
- func (suo *ScaleUpdateOne) ClearNorms() *ScaleUpdateOne
- func (suo *ScaleUpdateOne) ClearResults() *ScaleUpdateOne
- func (suo *ScaleUpdateOne) ClearTest() *ScaleUpdateOne
- func (suo *ScaleUpdateOne) ClearTranslations() *ScaleUpdateOne
- func (suo *ScaleUpdateOne) Exec(ctx context.Context) error
- func (suo *ScaleUpdateOne) ExecX(ctx context.Context)
- func (suo *ScaleUpdateOne) Mutation() *ScaleMutation
- func (suo *ScaleUpdateOne) RemoveInterpretationIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveInterpretations(i ...*Interpretation) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveItemIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveItems(i ...*Item) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveNormIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveNorms(n ...*Norm) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveResultIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveResults(r ...*Result) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveTest(t ...*Test) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveTestIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveTranslations(s ...*ScaleTranslation) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) Save(ctx context.Context) (*Scale, error)
- func (suo *ScaleUpdateOne) SaveX(ctx context.Context) *Scale
- func (suo *ScaleUpdateOne) Select(field string, fields ...string) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) SetGlobal(b bool) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) SetNillableGlobal(b *bool) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) SetNillableType(s *scale.Type) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) SetType(s scale.Type) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) SetUpdateTime(t time.Time) *ScaleUpdateOne
- type Scales
- type Tag
- type TagClient
- func (c *TagClient) Create() *TagCreate
- func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
- func (c *TagClient) Delete() *TagDelete
- func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
- func (c *TagClient) DeleteOneID(id uuid.UUID) *TagDeleteOne
- func (c *TagClient) Get(ctx context.Context, id uuid.UUID) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id uuid.UUID) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryTest(t *Tag) *TestQuery
- func (c *TagClient) QueryTranslations(t *Tag) *TagTranslationQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id uuid.UUID) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagCreate
- func (tc *TagCreate) AddTest(t ...*Test) *TagCreate
- func (tc *TagCreate) AddTestIDs(ids ...uuid.UUID) *TagCreate
- func (tc *TagCreate) AddTranslationIDs(ids ...uuid.UUID) *TagCreate
- func (tc *TagCreate) AddTranslations(t ...*TagTranslation) *TagCreate
- func (tc *TagCreate) Exec(ctx context.Context) error
- func (tc *TagCreate) ExecX(ctx context.Context)
- func (tc *TagCreate) Mutation() *TagMutation
- func (tc *TagCreate) Save(ctx context.Context) (*Tag, error)
- func (tc *TagCreate) SaveX(ctx context.Context) *Tag
- func (tc *TagCreate) SetCode(s string) *TagCreate
- func (tc *TagCreate) SetCreateTime(t time.Time) *TagCreate
- func (tc *TagCreate) SetID(u uuid.UUID) *TagCreate
- func (tc *TagCreate) SetNillableCreateTime(t *time.Time) *TagCreate
- func (tc *TagCreate) SetNillableID(u *uuid.UUID) *TagCreate
- func (tc *TagCreate) SetNillableType(t *tag.Type) *TagCreate
- func (tc *TagCreate) SetNillableUpdateTime(t *time.Time) *TagCreate
- func (tc *TagCreate) SetType(t tag.Type) *TagCreate
- func (tc *TagCreate) SetUpdateTime(t time.Time) *TagCreate
- type TagCreateBulk
- type TagDelete
- type TagDeleteOne
- type TagEdges
- type TagGroupBy
- func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
- func (s *TagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagGroupBy) BoolX(ctx context.Context) bool
- func (s *TagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagGroupBy) Float64X(ctx context.Context) float64
- func (s *TagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TagGroupBy) IntX(ctx context.Context) int
- func (s *TagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TagGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TagGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *TagGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *TagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TagGroupBy) StringX(ctx context.Context) string
- func (s *TagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TagGroupBy) StringsX(ctx context.Context) []string
- type TagMutation
- func (m *TagMutation) AddField(name string, value ent.Value) error
- func (m *TagMutation) AddTestIDs(ids ...uuid.UUID)
- func (m *TagMutation) AddTranslationIDs(ids ...uuid.UUID)
- func (m *TagMutation) AddedEdges() []string
- func (m *TagMutation) AddedField(name string) (ent.Value, bool)
- func (m *TagMutation) AddedFields() []string
- func (m *TagMutation) AddedIDs(name string) []ent.Value
- func (m *TagMutation) ClearEdge(name string) error
- func (m *TagMutation) ClearField(name string) error
- func (m *TagMutation) ClearTest()
- func (m *TagMutation) ClearTranslations()
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) Code() (r string, exists bool)
- func (m *TagMutation) CreateTime() (r time.Time, exists bool)
- func (m *TagMutation) EdgeCleared(name string) bool
- func (m *TagMutation) Field(name string) (ent.Value, bool)
- func (m *TagMutation) FieldCleared(name string) bool
- func (m *TagMutation) Fields() []string
- func (m *TagMutation) GetType() (r tag.Type, exists bool)
- func (m *TagMutation) ID() (id uuid.UUID, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TagMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *TagMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *TagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagMutation) OldType(ctx context.Context) (v tag.Type, err error)
- func (m *TagMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *TagMutation) Op() Op
- func (m *TagMutation) RemoveTestIDs(ids ...uuid.UUID)
- func (m *TagMutation) RemoveTranslationIDs(ids ...uuid.UUID)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) RemovedTestIDs() (ids []uuid.UUID)
- func (m *TagMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
- func (m *TagMutation) ResetCode()
- func (m *TagMutation) ResetCreateTime()
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetTest()
- func (m *TagMutation) ResetTranslations()
- func (m *TagMutation) ResetType()
- func (m *TagMutation) ResetUpdateTime()
- func (m *TagMutation) SetCode(s string)
- func (m *TagMutation) SetCreateTime(t time.Time)
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetID(id uuid.UUID)
- func (m *TagMutation) SetType(t tag.Type)
- func (m *TagMutation) SetUpdateTime(t time.Time)
- func (m *TagMutation) TestCleared() bool
- func (m *TagMutation) TestIDs() (ids []uuid.UUID)
- func (m *TagMutation) TranslationsCleared() bool
- func (m *TagMutation) TranslationsIDs() (ids []uuid.UUID)
- func (m TagMutation) Tx() (*Tx, error)
- func (m *TagMutation) Type() string
- func (m *TagMutation) UpdateTime() (r time.Time, exists bool)
- func (m *TagMutation) Where(ps ...predicate.Tag)
- type TagQuery
- func (tq *TagQuery) All(ctx context.Context) ([]*Tag, error)
- func (tq *TagQuery) AllX(ctx context.Context) []*Tag
- func (tq *TagQuery) Clone() *TagQuery
- func (tq *TagQuery) Count(ctx context.Context) (int, error)
- func (tq *TagQuery) CountX(ctx context.Context) int
- func (tq *TagQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TagQuery) ExistX(ctx context.Context) bool
- func (tq *TagQuery) First(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (tq *TagQuery) FirstX(ctx context.Context) *Tag
- func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
- func (tq *TagQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (tq *TagQuery) IDsX(ctx context.Context) []uuid.UUID
- func (tq *TagQuery) Limit(limit int) *TagQuery
- func (tq *TagQuery) Offset(offset int) *TagQuery
- func (tq *TagQuery) Only(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...OrderFunc) *TagQuery
- func (tq *TagQuery) QueryTest() *TestQuery
- func (tq *TagQuery) QueryTranslations() *TagTranslationQuery
- func (tq *TagQuery) Select(fields ...string) *TagSelect
- func (tq *TagQuery) Unique(unique bool) *TagQuery
- func (tq *TagQuery) Where(ps ...predicate.Tag) *TagQuery
- func (tq *TagQuery) WithTest(opts ...func(*TestQuery)) *TagQuery
- func (tq *TagQuery) WithTranslations(opts ...func(*TagTranslationQuery)) *TagQuery
- type TagSelect
- func (s *TagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagSelect) BoolX(ctx context.Context) bool
- func (s *TagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TagSelect) BoolsX(ctx context.Context) []bool
- func (s *TagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagSelect) Float64X(ctx context.Context) float64
- func (s *TagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagSelect) Float64sX(ctx context.Context) []float64
- func (s *TagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TagSelect) IntX(ctx context.Context) int
- func (s *TagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TagSelect) IntsX(ctx context.Context) []int
- func (ts *TagSelect) Scan(ctx context.Context, v interface{}) error
- func (s *TagSelect) ScanX(ctx context.Context, v interface{})
- func (s *TagSelect) String(ctx context.Context) (_ string, err error)
- func (s *TagSelect) StringX(ctx context.Context) string
- func (s *TagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TagSelect) StringsX(ctx context.Context) []string
- type TagTranslation
- type TagTranslationClient
- func (c *TagTranslationClient) Create() *TagTranslationCreate
- func (c *TagTranslationClient) CreateBulk(builders ...*TagTranslationCreate) *TagTranslationCreateBulk
- func (c *TagTranslationClient) Delete() *TagTranslationDelete
- func (c *TagTranslationClient) DeleteOne(tt *TagTranslation) *TagTranslationDeleteOne
- func (c *TagTranslationClient) DeleteOneID(id uuid.UUID) *TagTranslationDeleteOne
- func (c *TagTranslationClient) Get(ctx context.Context, id uuid.UUID) (*TagTranslation, error)
- func (c *TagTranslationClient) GetX(ctx context.Context, id uuid.UUID) *TagTranslation
- func (c *TagTranslationClient) Hooks() []Hook
- func (c *TagTranslationClient) Query() *TagTranslationQuery
- func (c *TagTranslationClient) QueryTag(tt *TagTranslation) *TagQuery
- func (c *TagTranslationClient) Update() *TagTranslationUpdate
- func (c *TagTranslationClient) UpdateOne(tt *TagTranslation) *TagTranslationUpdateOne
- func (c *TagTranslationClient) UpdateOneID(id uuid.UUID) *TagTranslationUpdateOne
- func (c *TagTranslationClient) Use(hooks ...Hook)
- type TagTranslationCreate
- func (ttc *TagTranslationCreate) Exec(ctx context.Context) error
- func (ttc *TagTranslationCreate) ExecX(ctx context.Context)
- func (ttc *TagTranslationCreate) Mutation() *TagTranslationMutation
- func (ttc *TagTranslationCreate) Save(ctx context.Context) (*TagTranslation, error)
- func (ttc *TagTranslationCreate) SaveX(ctx context.Context) *TagTranslation
- func (ttc *TagTranslationCreate) SetContent(s string) *TagTranslationCreate
- func (ttc *TagTranslationCreate) SetID(u uuid.UUID) *TagTranslationCreate
- func (ttc *TagTranslationCreate) SetLocale(t tagtranslation.Locale) *TagTranslationCreate
- func (ttc *TagTranslationCreate) SetNillableID(u *uuid.UUID) *TagTranslationCreate
- func (ttc *TagTranslationCreate) SetNillableTagID(id *uuid.UUID) *TagTranslationCreate
- func (ttc *TagTranslationCreate) SetTag(t *Tag) *TagTranslationCreate
- func (ttc *TagTranslationCreate) SetTagID(id uuid.UUID) *TagTranslationCreate
- type TagTranslationCreateBulk
- func (ttcb *TagTranslationCreateBulk) Exec(ctx context.Context) error
- func (ttcb *TagTranslationCreateBulk) ExecX(ctx context.Context)
- func (ttcb *TagTranslationCreateBulk) Save(ctx context.Context) ([]*TagTranslation, error)
- func (ttcb *TagTranslationCreateBulk) SaveX(ctx context.Context) []*TagTranslation
- type TagTranslationDelete
- type TagTranslationDeleteOne
- type TagTranslationEdges
- type TagTranslationGroupBy
- func (ttgb *TagTranslationGroupBy) Aggregate(fns ...AggregateFunc) *TagTranslationGroupBy
- func (s *TagTranslationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagTranslationGroupBy) BoolX(ctx context.Context) bool
- func (s *TagTranslationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TagTranslationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TagTranslationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagTranslationGroupBy) Float64X(ctx context.Context) float64
- func (s *TagTranslationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagTranslationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TagTranslationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TagTranslationGroupBy) IntX(ctx context.Context) int
- func (s *TagTranslationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TagTranslationGroupBy) IntsX(ctx context.Context) []int
- func (ttgb *TagTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *TagTranslationGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *TagTranslationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TagTranslationGroupBy) StringX(ctx context.Context) string
- func (s *TagTranslationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TagTranslationGroupBy) StringsX(ctx context.Context) []string
- type TagTranslationMutation
- func (m *TagTranslationMutation) AddField(name string, value ent.Value) error
- func (m *TagTranslationMutation) AddedEdges() []string
- func (m *TagTranslationMutation) AddedField(name string) (ent.Value, bool)
- func (m *TagTranslationMutation) AddedFields() []string
- func (m *TagTranslationMutation) AddedIDs(name string) []ent.Value
- func (m *TagTranslationMutation) ClearEdge(name string) error
- func (m *TagTranslationMutation) ClearField(name string) error
- func (m *TagTranslationMutation) ClearTag()
- func (m *TagTranslationMutation) ClearedEdges() []string
- func (m *TagTranslationMutation) ClearedFields() []string
- func (m TagTranslationMutation) Client() *Client
- func (m *TagTranslationMutation) Content() (r string, exists bool)
- func (m *TagTranslationMutation) EdgeCleared(name string) bool
- func (m *TagTranslationMutation) Field(name string) (ent.Value, bool)
- func (m *TagTranslationMutation) FieldCleared(name string) bool
- func (m *TagTranslationMutation) Fields() []string
- func (m *TagTranslationMutation) ID() (id uuid.UUID, exists bool)
- func (m *TagTranslationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TagTranslationMutation) Locale() (r tagtranslation.Locale, exists bool)
- func (m *TagTranslationMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *TagTranslationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagTranslationMutation) OldLocale(ctx context.Context) (v tagtranslation.Locale, err error)
- func (m *TagTranslationMutation) Op() Op
- func (m *TagTranslationMutation) RemovedEdges() []string
- func (m *TagTranslationMutation) RemovedIDs(name string) []ent.Value
- func (m *TagTranslationMutation) ResetContent()
- func (m *TagTranslationMutation) ResetEdge(name string) error
- func (m *TagTranslationMutation) ResetField(name string) error
- func (m *TagTranslationMutation) ResetLocale()
- func (m *TagTranslationMutation) ResetTag()
- func (m *TagTranslationMutation) SetContent(s string)
- func (m *TagTranslationMutation) SetField(name string, value ent.Value) error
- func (m *TagTranslationMutation) SetID(id uuid.UUID)
- func (m *TagTranslationMutation) SetLocale(t tagtranslation.Locale)
- func (m *TagTranslationMutation) SetTagID(id uuid.UUID)
- func (m *TagTranslationMutation) TagCleared() bool
- func (m *TagTranslationMutation) TagID() (id uuid.UUID, exists bool)
- func (m *TagTranslationMutation) TagIDs() (ids []uuid.UUID)
- func (m TagTranslationMutation) Tx() (*Tx, error)
- func (m *TagTranslationMutation) Type() string
- func (m *TagTranslationMutation) Where(ps ...predicate.TagTranslation)
- type TagTranslationQuery
- func (ttq *TagTranslationQuery) All(ctx context.Context) ([]*TagTranslation, error)
- func (ttq *TagTranslationQuery) AllX(ctx context.Context) []*TagTranslation
- func (ttq *TagTranslationQuery) Clone() *TagTranslationQuery
- func (ttq *TagTranslationQuery) Count(ctx context.Context) (int, error)
- func (ttq *TagTranslationQuery) CountX(ctx context.Context) int
- func (ttq *TagTranslationQuery) Exist(ctx context.Context) (bool, error)
- func (ttq *TagTranslationQuery) ExistX(ctx context.Context) bool
- func (ttq *TagTranslationQuery) First(ctx context.Context) (*TagTranslation, error)
- func (ttq *TagTranslationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (ttq *TagTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (ttq *TagTranslationQuery) FirstX(ctx context.Context) *TagTranslation
- func (ttq *TagTranslationQuery) GroupBy(field string, fields ...string) *TagTranslationGroupBy
- func (ttq *TagTranslationQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (ttq *TagTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (ttq *TagTranslationQuery) Limit(limit int) *TagTranslationQuery
- func (ttq *TagTranslationQuery) Offset(offset int) *TagTranslationQuery
- func (ttq *TagTranslationQuery) Only(ctx context.Context) (*TagTranslation, error)
- func (ttq *TagTranslationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (ttq *TagTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (ttq *TagTranslationQuery) OnlyX(ctx context.Context) *TagTranslation
- func (ttq *TagTranslationQuery) Order(o ...OrderFunc) *TagTranslationQuery
- func (ttq *TagTranslationQuery) QueryTag() *TagQuery
- func (ttq *TagTranslationQuery) Select(fields ...string) *TagTranslationSelect
- func (ttq *TagTranslationQuery) Unique(unique bool) *TagTranslationQuery
- func (ttq *TagTranslationQuery) Where(ps ...predicate.TagTranslation) *TagTranslationQuery
- func (ttq *TagTranslationQuery) WithTag(opts ...func(*TagQuery)) *TagTranslationQuery
- type TagTranslationSelect
- func (s *TagTranslationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagTranslationSelect) BoolX(ctx context.Context) bool
- func (s *TagTranslationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TagTranslationSelect) BoolsX(ctx context.Context) []bool
- func (s *TagTranslationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagTranslationSelect) Float64X(ctx context.Context) float64
- func (s *TagTranslationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagTranslationSelect) Float64sX(ctx context.Context) []float64
- func (s *TagTranslationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TagTranslationSelect) IntX(ctx context.Context) int
- func (s *TagTranslationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TagTranslationSelect) IntsX(ctx context.Context) []int
- func (tts *TagTranslationSelect) Scan(ctx context.Context, v interface{}) error
- func (s *TagTranslationSelect) ScanX(ctx context.Context, v interface{})
- func (s *TagTranslationSelect) String(ctx context.Context) (_ string, err error)
- func (s *TagTranslationSelect) StringX(ctx context.Context) string
- func (s *TagTranslationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TagTranslationSelect) StringsX(ctx context.Context) []string
- type TagTranslationUpdate
- func (ttu *TagTranslationUpdate) ClearTag() *TagTranslationUpdate
- func (ttu *TagTranslationUpdate) Exec(ctx context.Context) error
- func (ttu *TagTranslationUpdate) ExecX(ctx context.Context)
- func (ttu *TagTranslationUpdate) Mutation() *TagTranslationMutation
- func (ttu *TagTranslationUpdate) Save(ctx context.Context) (int, error)
- func (ttu *TagTranslationUpdate) SaveX(ctx context.Context) int
- func (ttu *TagTranslationUpdate) SetContent(s string) *TagTranslationUpdate
- func (ttu *TagTranslationUpdate) SetNillableTagID(id *uuid.UUID) *TagTranslationUpdate
- func (ttu *TagTranslationUpdate) SetTag(t *Tag) *TagTranslationUpdate
- func (ttu *TagTranslationUpdate) SetTagID(id uuid.UUID) *TagTranslationUpdate
- func (ttu *TagTranslationUpdate) Where(ps ...predicate.TagTranslation) *TagTranslationUpdate
- type TagTranslationUpdateOne
- func (ttuo *TagTranslationUpdateOne) ClearTag() *TagTranslationUpdateOne
- func (ttuo *TagTranslationUpdateOne) Exec(ctx context.Context) error
- func (ttuo *TagTranslationUpdateOne) ExecX(ctx context.Context)
- func (ttuo *TagTranslationUpdateOne) Mutation() *TagTranslationMutation
- func (ttuo *TagTranslationUpdateOne) Save(ctx context.Context) (*TagTranslation, error)
- func (ttuo *TagTranslationUpdateOne) SaveX(ctx context.Context) *TagTranslation
- func (ttuo *TagTranslationUpdateOne) Select(field string, fields ...string) *TagTranslationUpdateOne
- func (ttuo *TagTranslationUpdateOne) SetContent(s string) *TagTranslationUpdateOne
- func (ttuo *TagTranslationUpdateOne) SetNillableTagID(id *uuid.UUID) *TagTranslationUpdateOne
- func (ttuo *TagTranslationUpdateOne) SetTag(t *Tag) *TagTranslationUpdateOne
- func (ttuo *TagTranslationUpdateOne) SetTagID(id uuid.UUID) *TagTranslationUpdateOne
- type TagTranslations
- type TagUpdate
- func (tu *TagUpdate) AddTest(t ...*Test) *TagUpdate
- func (tu *TagUpdate) AddTestIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) AddTranslationIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) AddTranslations(t ...*TagTranslation) *TagUpdate
- func (tu *TagUpdate) ClearTest() *TagUpdate
- func (tu *TagUpdate) ClearTranslations() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Mutation() *TagMutation
- func (tu *TagUpdate) RemoveTest(t ...*Test) *TagUpdate
- func (tu *TagUpdate) RemoveTestIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) RemoveTranslationIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) RemoveTranslations(t ...*TagTranslation) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (tu *TagUpdate) SetNillableType(t *tag.Type) *TagUpdate
- func (tu *TagUpdate) SetType(t tag.Type) *TagUpdate
- func (tu *TagUpdate) SetUpdateTime(t time.Time) *TagUpdate
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddTest(t ...*Test) *TagUpdateOne
- func (tuo *TagUpdateOne) AddTestIDs(ids ...uuid.UUID) *TagUpdateOne
- func (tuo *TagUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *TagUpdateOne
- func (tuo *TagUpdateOne) AddTranslations(t ...*TagTranslation) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearTest() *TagUpdateOne
- func (tuo *TagUpdateOne) ClearTranslations() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (tuo *TagUpdateOne) RemoveTest(t ...*Test) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveTestIDs(ids ...uuid.UUID) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveTranslations(t ...*TagTranslation) *TagUpdateOne
- func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
- func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
- func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillableType(t *tag.Type) *TagUpdateOne
- func (tuo *TagUpdateOne) SetType(t tag.Type) *TagUpdateOne
- func (tuo *TagUpdateOne) SetUpdateTime(t time.Time) *TagUpdateOne
- type Tags
- type Take
- type TakeClient
- func (c *TakeClient) Create() *TakeCreate
- func (c *TakeClient) CreateBulk(builders ...*TakeCreate) *TakeCreateBulk
- func (c *TakeClient) Delete() *TakeDelete
- func (c *TakeClient) DeleteOne(t *Take) *TakeDeleteOne
- func (c *TakeClient) DeleteOneID(id uuid.UUID) *TakeDeleteOne
- func (c *TakeClient) Get(ctx context.Context, id uuid.UUID) (*Take, error)
- func (c *TakeClient) GetX(ctx context.Context, id uuid.UUID) *Take
- func (c *TakeClient) Hooks() []Hook
- func (c *TakeClient) Query() *TakeQuery
- func (c *TakeClient) QueryResponses(t *Take) *ResponseQuery
- func (c *TakeClient) QueryResults(t *Take) *ResultQuery
- func (c *TakeClient) QueryTest(t *Take) *TestQuery
- func (c *TakeClient) QueryUser(t *Take) *UserQuery
- func (c *TakeClient) Update() *TakeUpdate
- func (c *TakeClient) UpdateOne(t *Take) *TakeUpdateOne
- func (c *TakeClient) UpdateOneID(id uuid.UUID) *TakeUpdateOne
- func (c *TakeClient) Use(hooks ...Hook)
- type TakeCreate
- func (tc *TakeCreate) AddResponseIDs(ids ...uuid.UUID) *TakeCreate
- func (tc *TakeCreate) AddResponses(r ...*Response) *TakeCreate
- func (tc *TakeCreate) AddResultIDs(ids ...uuid.UUID) *TakeCreate
- func (tc *TakeCreate) AddResults(r ...*Result) *TakeCreate
- func (tc *TakeCreate) Exec(ctx context.Context) error
- func (tc *TakeCreate) ExecX(ctx context.Context)
- func (tc *TakeCreate) Mutation() *TakeMutation
- func (tc *TakeCreate) Save(ctx context.Context) (*Take, error)
- func (tc *TakeCreate) SaveX(ctx context.Context) *Take
- func (tc *TakeCreate) SetCreateTime(t time.Time) *TakeCreate
- func (tc *TakeCreate) SetEndTime(t time.Time) *TakeCreate
- func (tc *TakeCreate) SetID(u uuid.UUID) *TakeCreate
- func (tc *TakeCreate) SetInLocale(tl take.InLocale) *TakeCreate
- func (tc *TakeCreate) SetMark(i int) *TakeCreate
- func (tc *TakeCreate) SetMeta(m map[string]interface{}) *TakeCreate
- func (tc *TakeCreate) SetNillableCreateTime(t *time.Time) *TakeCreate
- func (tc *TakeCreate) SetNillableEndTime(t *time.Time) *TakeCreate
- func (tc *TakeCreate) SetNillableID(u *uuid.UUID) *TakeCreate
- func (tc *TakeCreate) SetNillableInLocale(tl *take.InLocale) *TakeCreate
- func (tc *TakeCreate) SetNillableMark(i *int) *TakeCreate
- func (tc *TakeCreate) SetNillablePage(i *int) *TakeCreate
- func (tc *TakeCreate) SetNillableProgress(i *int) *TakeCreate
- func (tc *TakeCreate) SetNillableStartTime(t *time.Time) *TakeCreate
- func (tc *TakeCreate) SetNillableStatus(t *take.Status) *TakeCreate
- func (tc *TakeCreate) SetNillableSuspicious(b *bool) *TakeCreate
- func (tc *TakeCreate) SetNillableUpdateTime(t *time.Time) *TakeCreate
- func (tc *TakeCreate) SetPage(i int) *TakeCreate
- func (tc *TakeCreate) SetProgress(i int) *TakeCreate
- func (tc *TakeCreate) SetSeed(i int64) *TakeCreate
- func (tc *TakeCreate) SetStartTime(t time.Time) *TakeCreate
- func (tc *TakeCreate) SetStatus(t take.Status) *TakeCreate
- func (tc *TakeCreate) SetSuspicious(b bool) *TakeCreate
- func (tc *TakeCreate) SetTest(t *Test) *TakeCreate
- func (tc *TakeCreate) SetTestID(id uuid.UUID) *TakeCreate
- func (tc *TakeCreate) SetUpdateTime(t time.Time) *TakeCreate
- func (tc *TakeCreate) SetUser(u *User) *TakeCreate
- func (tc *TakeCreate) SetUserID(id uuid.UUID) *TakeCreate
- type TakeCreateBulk
- type TakeDelete
- type TakeDeleteOne
- type TakeEdges
- type TakeGroupBy
- func (tgb *TakeGroupBy) Aggregate(fns ...AggregateFunc) *TakeGroupBy
- func (s *TakeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TakeGroupBy) BoolX(ctx context.Context) bool
- func (s *TakeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TakeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TakeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TakeGroupBy) Float64X(ctx context.Context) float64
- func (s *TakeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TakeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TakeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TakeGroupBy) IntX(ctx context.Context) int
- func (s *TakeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TakeGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TakeGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *TakeGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *TakeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TakeGroupBy) StringX(ctx context.Context) string
- func (s *TakeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TakeGroupBy) StringsX(ctx context.Context) []string
- type TakeMutation
- func (m *TakeMutation) AddField(name string, value ent.Value) error
- func (m *TakeMutation) AddMark(i int)
- func (m *TakeMutation) AddPage(i int)
- func (m *TakeMutation) AddProgress(i int)
- func (m *TakeMutation) AddResponseIDs(ids ...uuid.UUID)
- func (m *TakeMutation) AddResultIDs(ids ...uuid.UUID)
- func (m *TakeMutation) AddSeed(i int64)
- func (m *TakeMutation) AddedEdges() []string
- func (m *TakeMutation) AddedField(name string) (ent.Value, bool)
- func (m *TakeMutation) AddedFields() []string
- func (m *TakeMutation) AddedIDs(name string) []ent.Value
- func (m *TakeMutation) AddedMark() (r int, exists bool)
- func (m *TakeMutation) AddedPage() (r int, exists bool)
- func (m *TakeMutation) AddedProgress() (r int, exists bool)
- func (m *TakeMutation) AddedSeed() (r int64, exists bool)
- func (m *TakeMutation) ClearEdge(name string) error
- func (m *TakeMutation) ClearEndTime()
- func (m *TakeMutation) ClearField(name string) error
- func (m *TakeMutation) ClearMark()
- func (m *TakeMutation) ClearMeta()
- func (m *TakeMutation) ClearResponses()
- func (m *TakeMutation) ClearResults()
- func (m *TakeMutation) ClearStartTime()
- func (m *TakeMutation) ClearTest()
- func (m *TakeMutation) ClearUser()
- func (m *TakeMutation) ClearedEdges() []string
- func (m *TakeMutation) ClearedFields() []string
- func (m TakeMutation) Client() *Client
- func (m *TakeMutation) CreateTime() (r time.Time, exists bool)
- func (m *TakeMutation) EdgeCleared(name string) bool
- func (m *TakeMutation) EndTime() (r time.Time, exists bool)
- func (m *TakeMutation) EndTimeCleared() bool
- func (m *TakeMutation) Field(name string) (ent.Value, bool)
- func (m *TakeMutation) FieldCleared(name string) bool
- func (m *TakeMutation) Fields() []string
- func (m *TakeMutation) ID() (id uuid.UUID, exists bool)
- func (m *TakeMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TakeMutation) InLocale() (r take.InLocale, exists bool)
- func (m *TakeMutation) Mark() (r int, exists bool)
- func (m *TakeMutation) MarkCleared() bool
- func (m *TakeMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *TakeMutation) MetaCleared() bool
- func (m *TakeMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *TakeMutation) OldEndTime(ctx context.Context) (v *time.Time, err error)
- func (m *TakeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TakeMutation) OldInLocale(ctx context.Context) (v take.InLocale, err error)
- func (m *TakeMutation) OldMark(ctx context.Context) (v *int, err error)
- func (m *TakeMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *TakeMutation) OldPage(ctx context.Context) (v int, err error)
- func (m *TakeMutation) OldProgress(ctx context.Context) (v int, err error)
- func (m *TakeMutation) OldSeed(ctx context.Context) (v int64, err error)
- func (m *TakeMutation) OldStartTime(ctx context.Context) (v *time.Time, err error)
- func (m *TakeMutation) OldStatus(ctx context.Context) (v take.Status, err error)
- func (m *TakeMutation) OldSuspicious(ctx context.Context) (v bool, err error)
- func (m *TakeMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *TakeMutation) Op() Op
- func (m *TakeMutation) Page() (r int, exists bool)
- func (m *TakeMutation) Progress() (r int, exists bool)
- func (m *TakeMutation) RemoveResponseIDs(ids ...uuid.UUID)
- func (m *TakeMutation) RemoveResultIDs(ids ...uuid.UUID)
- func (m *TakeMutation) RemovedEdges() []string
- func (m *TakeMutation) RemovedIDs(name string) []ent.Value
- func (m *TakeMutation) RemovedResponsesIDs() (ids []uuid.UUID)
- func (m *TakeMutation) RemovedResultsIDs() (ids []uuid.UUID)
- func (m *TakeMutation) ResetCreateTime()
- func (m *TakeMutation) ResetEdge(name string) error
- func (m *TakeMutation) ResetEndTime()
- func (m *TakeMutation) ResetField(name string) error
- func (m *TakeMutation) ResetInLocale()
- func (m *TakeMutation) ResetMark()
- func (m *TakeMutation) ResetMeta()
- func (m *TakeMutation) ResetPage()
- func (m *TakeMutation) ResetProgress()
- func (m *TakeMutation) ResetResponses()
- func (m *TakeMutation) ResetResults()
- func (m *TakeMutation) ResetSeed()
- func (m *TakeMutation) ResetStartTime()
- func (m *TakeMutation) ResetStatus()
- func (m *TakeMutation) ResetSuspicious()
- func (m *TakeMutation) ResetTest()
- func (m *TakeMutation) ResetUpdateTime()
- func (m *TakeMutation) ResetUser()
- func (m *TakeMutation) ResponsesCleared() bool
- func (m *TakeMutation) ResponsesIDs() (ids []uuid.UUID)
- func (m *TakeMutation) ResultsCleared() bool
- func (m *TakeMutation) ResultsIDs() (ids []uuid.UUID)
- func (m *TakeMutation) Seed() (r int64, exists bool)
- func (m *TakeMutation) SetCreateTime(t time.Time)
- func (m *TakeMutation) SetEndTime(t time.Time)
- func (m *TakeMutation) SetField(name string, value ent.Value) error
- func (m *TakeMutation) SetID(id uuid.UUID)
- func (m *TakeMutation) SetInLocale(tl take.InLocale)
- func (m *TakeMutation) SetMark(i int)
- func (m *TakeMutation) SetMeta(value map[string]interface{})
- func (m *TakeMutation) SetPage(i int)
- func (m *TakeMutation) SetProgress(i int)
- func (m *TakeMutation) SetSeed(i int64)
- func (m *TakeMutation) SetStartTime(t time.Time)
- func (m *TakeMutation) SetStatus(t take.Status)
- func (m *TakeMutation) SetSuspicious(b bool)
- func (m *TakeMutation) SetTestID(id uuid.UUID)
- func (m *TakeMutation) SetUpdateTime(t time.Time)
- func (m *TakeMutation) SetUserID(id uuid.UUID)
- func (m *TakeMutation) StartTime() (r time.Time, exists bool)
- func (m *TakeMutation) StartTimeCleared() bool
- func (m *TakeMutation) Status() (r take.Status, exists bool)
- func (m *TakeMutation) Suspicious() (r bool, exists bool)
- func (m *TakeMutation) TestCleared() bool
- func (m *TakeMutation) TestID() (id uuid.UUID, exists bool)
- func (m *TakeMutation) TestIDs() (ids []uuid.UUID)
- func (m TakeMutation) Tx() (*Tx, error)
- func (m *TakeMutation) Type() string
- func (m *TakeMutation) UpdateTime() (r time.Time, exists bool)
- func (m *TakeMutation) UserCleared() bool
- func (m *TakeMutation) UserID() (id uuid.UUID, exists bool)
- func (m *TakeMutation) UserIDs() (ids []uuid.UUID)
- func (m *TakeMutation) Where(ps ...predicate.Take)
- type TakeQuery
- func (tq *TakeQuery) All(ctx context.Context) ([]*Take, error)
- func (tq *TakeQuery) AllX(ctx context.Context) []*Take
- func (tq *TakeQuery) Clone() *TakeQuery
- func (tq *TakeQuery) Count(ctx context.Context) (int, error)
- func (tq *TakeQuery) CountX(ctx context.Context) int
- func (tq *TakeQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TakeQuery) ExistX(ctx context.Context) bool
- func (tq *TakeQuery) First(ctx context.Context) (*Take, error)
- func (tq *TakeQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TakeQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (tq *TakeQuery) FirstX(ctx context.Context) *Take
- func (tq *TakeQuery) GroupBy(field string, fields ...string) *TakeGroupBy
- func (tq *TakeQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (tq *TakeQuery) IDsX(ctx context.Context) []uuid.UUID
- func (tq *TakeQuery) Limit(limit int) *TakeQuery
- func (tq *TakeQuery) Offset(offset int) *TakeQuery
- func (tq *TakeQuery) Only(ctx context.Context) (*Take, error)
- func (tq *TakeQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TakeQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (tq *TakeQuery) OnlyX(ctx context.Context) *Take
- func (tq *TakeQuery) Order(o ...OrderFunc) *TakeQuery
- func (tq *TakeQuery) QueryResponses() *ResponseQuery
- func (tq *TakeQuery) QueryResults() *ResultQuery
- func (tq *TakeQuery) QueryTest() *TestQuery
- func (tq *TakeQuery) QueryUser() *UserQuery
- func (tq *TakeQuery) Select(fields ...string) *TakeSelect
- func (tq *TakeQuery) Unique(unique bool) *TakeQuery
- func (tq *TakeQuery) Where(ps ...predicate.Take) *TakeQuery
- func (tq *TakeQuery) WithResponses(opts ...func(*ResponseQuery)) *TakeQuery
- func (tq *TakeQuery) WithResults(opts ...func(*ResultQuery)) *TakeQuery
- func (tq *TakeQuery) WithTest(opts ...func(*TestQuery)) *TakeQuery
- func (tq *TakeQuery) WithUser(opts ...func(*UserQuery)) *TakeQuery
- type TakeSelect
- func (s *TakeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TakeSelect) BoolX(ctx context.Context) bool
- func (s *TakeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TakeSelect) BoolsX(ctx context.Context) []bool
- func (s *TakeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TakeSelect) Float64X(ctx context.Context) float64
- func (s *TakeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TakeSelect) Float64sX(ctx context.Context) []float64
- func (s *TakeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TakeSelect) IntX(ctx context.Context) int
- func (s *TakeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TakeSelect) IntsX(ctx context.Context) []int
- func (ts *TakeSelect) Scan(ctx context.Context, v interface{}) error
- func (s *TakeSelect) ScanX(ctx context.Context, v interface{})
- func (s *TakeSelect) String(ctx context.Context) (_ string, err error)
- func (s *TakeSelect) StringX(ctx context.Context) string
- func (s *TakeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TakeSelect) StringsX(ctx context.Context) []string
- type TakeUpdate
- func (tu *TakeUpdate) AddMark(i int) *TakeUpdate
- func (tu *TakeUpdate) AddPage(i int) *TakeUpdate
- func (tu *TakeUpdate) AddProgress(i int) *TakeUpdate
- func (tu *TakeUpdate) AddResponseIDs(ids ...uuid.UUID) *TakeUpdate
- func (tu *TakeUpdate) AddResponses(r ...*Response) *TakeUpdate
- func (tu *TakeUpdate) AddResultIDs(ids ...uuid.UUID) *TakeUpdate
- func (tu *TakeUpdate) AddResults(r ...*Result) *TakeUpdate
- func (tu *TakeUpdate) ClearEndTime() *TakeUpdate
- func (tu *TakeUpdate) ClearMark() *TakeUpdate
- func (tu *TakeUpdate) ClearMeta() *TakeUpdate
- func (tu *TakeUpdate) ClearResponses() *TakeUpdate
- func (tu *TakeUpdate) ClearResults() *TakeUpdate
- func (tu *TakeUpdate) ClearStartTime() *TakeUpdate
- func (tu *TakeUpdate) ClearTest() *TakeUpdate
- func (tu *TakeUpdate) ClearUser() *TakeUpdate
- func (tu *TakeUpdate) Exec(ctx context.Context) error
- func (tu *TakeUpdate) ExecX(ctx context.Context)
- func (tu *TakeUpdate) Mutation() *TakeMutation
- func (tu *TakeUpdate) RemoveResponseIDs(ids ...uuid.UUID) *TakeUpdate
- func (tu *TakeUpdate) RemoveResponses(r ...*Response) *TakeUpdate
- func (tu *TakeUpdate) RemoveResultIDs(ids ...uuid.UUID) *TakeUpdate
- func (tu *TakeUpdate) RemoveResults(r ...*Result) *TakeUpdate
- func (tu *TakeUpdate) Save(ctx context.Context) (int, error)
- func (tu *TakeUpdate) SaveX(ctx context.Context) int
- func (tu *TakeUpdate) SetEndTime(t time.Time) *TakeUpdate
- func (tu *TakeUpdate) SetInLocale(tl take.InLocale) *TakeUpdate
- func (tu *TakeUpdate) SetMark(i int) *TakeUpdate
- func (tu *TakeUpdate) SetMeta(m map[string]interface{}) *TakeUpdate
- func (tu *TakeUpdate) SetNillableEndTime(t *time.Time) *TakeUpdate
- func (tu *TakeUpdate) SetNillableInLocale(tl *take.InLocale) *TakeUpdate
- func (tu *TakeUpdate) SetNillableMark(i *int) *TakeUpdate
- func (tu *TakeUpdate) SetNillablePage(i *int) *TakeUpdate
- func (tu *TakeUpdate) SetNillableProgress(i *int) *TakeUpdate
- func (tu *TakeUpdate) SetNillableStartTime(t *time.Time) *TakeUpdate
- func (tu *TakeUpdate) SetNillableStatus(t *take.Status) *TakeUpdate
- func (tu *TakeUpdate) SetNillableSuspicious(b *bool) *TakeUpdate
- func (tu *TakeUpdate) SetPage(i int) *TakeUpdate
- func (tu *TakeUpdate) SetProgress(i int) *TakeUpdate
- func (tu *TakeUpdate) SetStartTime(t time.Time) *TakeUpdate
- func (tu *TakeUpdate) SetStatus(t take.Status) *TakeUpdate
- func (tu *TakeUpdate) SetSuspicious(b bool) *TakeUpdate
- func (tu *TakeUpdate) SetTest(t *Test) *TakeUpdate
- func (tu *TakeUpdate) SetTestID(id uuid.UUID) *TakeUpdate
- func (tu *TakeUpdate) SetUpdateTime(t time.Time) *TakeUpdate
- func (tu *TakeUpdate) SetUser(u *User) *TakeUpdate
- func (tu *TakeUpdate) SetUserID(id uuid.UUID) *TakeUpdate
- func (tu *TakeUpdate) Where(ps ...predicate.Take) *TakeUpdate
- type TakeUpdateOne
- func (tuo *TakeUpdateOne) AddMark(i int) *TakeUpdateOne
- func (tuo *TakeUpdateOne) AddPage(i int) *TakeUpdateOne
- func (tuo *TakeUpdateOne) AddProgress(i int) *TakeUpdateOne
- func (tuo *TakeUpdateOne) AddResponseIDs(ids ...uuid.UUID) *TakeUpdateOne
- func (tuo *TakeUpdateOne) AddResponses(r ...*Response) *TakeUpdateOne
- func (tuo *TakeUpdateOne) AddResultIDs(ids ...uuid.UUID) *TakeUpdateOne
- func (tuo *TakeUpdateOne) AddResults(r ...*Result) *TakeUpdateOne
- func (tuo *TakeUpdateOne) ClearEndTime() *TakeUpdateOne
- func (tuo *TakeUpdateOne) ClearMark() *TakeUpdateOne
- func (tuo *TakeUpdateOne) ClearMeta() *TakeUpdateOne
- func (tuo *TakeUpdateOne) ClearResponses() *TakeUpdateOne
- func (tuo *TakeUpdateOne) ClearResults() *TakeUpdateOne
- func (tuo *TakeUpdateOne) ClearStartTime() *TakeUpdateOne
- func (tuo *TakeUpdateOne) ClearTest() *TakeUpdateOne
- func (tuo *TakeUpdateOne) ClearUser() *TakeUpdateOne
- func (tuo *TakeUpdateOne) Exec(ctx context.Context) error
- func (tuo *TakeUpdateOne) ExecX(ctx context.Context)
- func (tuo *TakeUpdateOne) Mutation() *TakeMutation
- func (tuo *TakeUpdateOne) RemoveResponseIDs(ids ...uuid.UUID) *TakeUpdateOne
- func (tuo *TakeUpdateOne) RemoveResponses(r ...*Response) *TakeUpdateOne
- func (tuo *TakeUpdateOne) RemoveResultIDs(ids ...uuid.UUID) *TakeUpdateOne
- func (tuo *TakeUpdateOne) RemoveResults(r ...*Result) *TakeUpdateOne
- func (tuo *TakeUpdateOne) Save(ctx context.Context) (*Take, error)
- func (tuo *TakeUpdateOne) SaveX(ctx context.Context) *Take
- func (tuo *TakeUpdateOne) Select(field string, fields ...string) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetEndTime(t time.Time) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetInLocale(tl take.InLocale) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetMark(i int) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetMeta(m map[string]interface{}) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetNillableEndTime(t *time.Time) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetNillableInLocale(tl *take.InLocale) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetNillableMark(i *int) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetNillablePage(i *int) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetNillableProgress(i *int) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetNillableStartTime(t *time.Time) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetNillableStatus(t *take.Status) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetNillableSuspicious(b *bool) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetPage(i int) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetProgress(i int) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetStartTime(t time.Time) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetStatus(t take.Status) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetSuspicious(b bool) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetTest(t *Test) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetTestID(id uuid.UUID) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetUpdateTime(t time.Time) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetUser(u *User) *TakeUpdateOne
- func (tuo *TakeUpdateOne) SetUserID(id uuid.UUID) *TakeUpdateOne
- type Takes
- type Test
- func (t *Test) QueryDisplay() *TestDisplayQuery
- func (t *Test) QueryQuestions() *QuestionQuery
- func (t *Test) QueryScales() *ScaleQuery
- func (t *Test) QueryTags() *TagQuery
- func (t *Test) QueryTakes() *TakeQuery
- func (t *Test) QueryTranslations() *TestTranslationQuery
- func (t *Test) String() string
- func (t *Test) Unwrap() *Test
- func (t *Test) Update() *TestUpdateOne
- type TestClient
- func (c *TestClient) Create() *TestCreate
- func (c *TestClient) CreateBulk(builders ...*TestCreate) *TestCreateBulk
- func (c *TestClient) Delete() *TestDelete
- func (c *TestClient) DeleteOne(t *Test) *TestDeleteOne
- func (c *TestClient) DeleteOneID(id uuid.UUID) *TestDeleteOne
- func (c *TestClient) Get(ctx context.Context, id uuid.UUID) (*Test, error)
- func (c *TestClient) GetX(ctx context.Context, id uuid.UUID) *Test
- func (c *TestClient) Hooks() []Hook
- func (c *TestClient) Query() *TestQuery
- func (c *TestClient) QueryDisplay(t *Test) *TestDisplayQuery
- func (c *TestClient) QueryQuestions(t *Test) *QuestionQuery
- func (c *TestClient) QueryScales(t *Test) *ScaleQuery
- func (c *TestClient) QueryTags(t *Test) *TagQuery
- func (c *TestClient) QueryTakes(t *Test) *TakeQuery
- func (c *TestClient) QueryTranslations(t *Test) *TestTranslationQuery
- func (c *TestClient) Update() *TestUpdate
- func (c *TestClient) UpdateOne(t *Test) *TestUpdateOne
- func (c *TestClient) UpdateOneID(id uuid.UUID) *TestUpdateOne
- func (c *TestClient) Use(hooks ...Hook)
- type TestCreate
- func (tc *TestCreate) AddQuestionIDs(ids ...uuid.UUID) *TestCreate
- func (tc *TestCreate) AddQuestions(q ...*Question) *TestCreate
- func (tc *TestCreate) AddScaleIDs(ids ...uuid.UUID) *TestCreate
- func (tc *TestCreate) AddScales(s ...*Scale) *TestCreate
- func (tc *TestCreate) AddTagIDs(ids ...uuid.UUID) *TestCreate
- func (tc *TestCreate) AddTags(t ...*Tag) *TestCreate
- func (tc *TestCreate) AddTakeIDs(ids ...uuid.UUID) *TestCreate
- func (tc *TestCreate) AddTakes(t ...*Take) *TestCreate
- func (tc *TestCreate) AddTranslationIDs(ids ...uuid.UUID) *TestCreate
- func (tc *TestCreate) AddTranslations(t ...*TestTranslation) *TestCreate
- func (tc *TestCreate) Exec(ctx context.Context) error
- func (tc *TestCreate) ExecX(ctx context.Context)
- func (tc *TestCreate) Mutation() *TestMutation
- func (tc *TestCreate) Save(ctx context.Context) (*Test, error)
- func (tc *TestCreate) SaveX(ctx context.Context) *Test
- func (tc *TestCreate) SetAvailableLocales(s []string) *TestCreate
- func (tc *TestCreate) SetCode(s string) *TestCreate
- func (tc *TestCreate) SetCreateTime(t time.Time) *TestCreate
- func (tc *TestCreate) SetDisplay(t *TestDisplay) *TestCreate
- func (tc *TestCreate) SetDisplayID(id uuid.UUID) *TestCreate
- func (tc *TestCreate) SetDuration(t time.Duration) *TestCreate
- func (tc *TestCreate) SetID(u uuid.UUID) *TestCreate
- func (tc *TestCreate) SetImage(s string) *TestCreate
- func (tc *TestCreate) SetMark(f float64) *TestCreate
- func (tc *TestCreate) SetNillableCreateTime(t *time.Time) *TestCreate
- func (tc *TestCreate) SetNillableDisplayID(id *uuid.UUID) *TestCreate
- func (tc *TestCreate) SetNillableDuration(t *time.Duration) *TestCreate
- func (tc *TestCreate) SetNillableID(u *uuid.UUID) *TestCreate
- func (tc *TestCreate) SetNillableImage(s *string) *TestCreate
- func (tc *TestCreate) SetNillableMark(f *float64) *TestCreate
- func (tc *TestCreate) SetNillablePublished(b *bool) *TestCreate
- func (tc *TestCreate) SetNillableQuestionCount(i *int) *TestCreate
- func (tc *TestCreate) SetNillableUpdateTime(t *time.Time) *TestCreate
- func (tc *TestCreate) SetPublished(b bool) *TestCreate
- func (tc *TestCreate) SetQuestionCount(i int) *TestCreate
- func (tc *TestCreate) SetUpdateTime(t time.Time) *TestCreate
- type TestCreateBulk
- type TestDelete
- type TestDeleteOne
- type TestDisplay
- type TestDisplayClient
- func (c *TestDisplayClient) Create() *TestDisplayCreate
- func (c *TestDisplayClient) CreateBulk(builders ...*TestDisplayCreate) *TestDisplayCreateBulk
- func (c *TestDisplayClient) Delete() *TestDisplayDelete
- func (c *TestDisplayClient) DeleteOne(td *TestDisplay) *TestDisplayDeleteOne
- func (c *TestDisplayClient) DeleteOneID(id uuid.UUID) *TestDisplayDeleteOne
- func (c *TestDisplayClient) Get(ctx context.Context, id uuid.UUID) (*TestDisplay, error)
- func (c *TestDisplayClient) GetX(ctx context.Context, id uuid.UUID) *TestDisplay
- func (c *TestDisplayClient) Hooks() []Hook
- func (c *TestDisplayClient) Query() *TestDisplayQuery
- func (c *TestDisplayClient) QueryTest(td *TestDisplay) *TestQuery
- func (c *TestDisplayClient) Update() *TestDisplayUpdate
- func (c *TestDisplayClient) UpdateOne(td *TestDisplay) *TestDisplayUpdateOne
- func (c *TestDisplayClient) UpdateOneID(id uuid.UUID) *TestDisplayUpdateOne
- func (c *TestDisplayClient) Use(hooks ...Hook)
- type TestDisplayCreate
- func (tdc *TestDisplayCreate) Exec(ctx context.Context) error
- func (tdc *TestDisplayCreate) ExecX(ctx context.Context)
- func (tdc *TestDisplayCreate) Mutation() *TestDisplayMutation
- func (tdc *TestDisplayCreate) Save(ctx context.Context) (*TestDisplay, error)
- func (tdc *TestDisplayCreate) SaveX(ctx context.Context) *TestDisplay
- func (tdc *TestDisplayCreate) SetID(u uuid.UUID) *TestDisplayCreate
- func (tdc *TestDisplayCreate) SetNillableID(u *uuid.UUID) *TestDisplayCreate
- func (tdc *TestDisplayCreate) SetNillableQuestionsPerPage(i *int) *TestDisplayCreate
- func (tdc *TestDisplayCreate) SetNillableRandomizeOrder(b *bool) *TestDisplayCreate
- func (tdc *TestDisplayCreate) SetQuestionsPerPage(i int) *TestDisplayCreate
- func (tdc *TestDisplayCreate) SetRandomizeOrder(b bool) *TestDisplayCreate
- func (tdc *TestDisplayCreate) SetTest(t *Test) *TestDisplayCreate
- func (tdc *TestDisplayCreate) SetTestID(id uuid.UUID) *TestDisplayCreate
- type TestDisplayCreateBulk
- type TestDisplayDelete
- type TestDisplayDeleteOne
- type TestDisplayEdges
- type TestDisplayGroupBy
- func (tdgb *TestDisplayGroupBy) Aggregate(fns ...AggregateFunc) *TestDisplayGroupBy
- func (s *TestDisplayGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TestDisplayGroupBy) BoolX(ctx context.Context) bool
- func (s *TestDisplayGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TestDisplayGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TestDisplayGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TestDisplayGroupBy) Float64X(ctx context.Context) float64
- func (s *TestDisplayGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TestDisplayGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TestDisplayGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TestDisplayGroupBy) IntX(ctx context.Context) int
- func (s *TestDisplayGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TestDisplayGroupBy) IntsX(ctx context.Context) []int
- func (tdgb *TestDisplayGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *TestDisplayGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *TestDisplayGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TestDisplayGroupBy) StringX(ctx context.Context) string
- func (s *TestDisplayGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TestDisplayGroupBy) StringsX(ctx context.Context) []string
- type TestDisplayMutation
- func (m *TestDisplayMutation) AddField(name string, value ent.Value) error
- func (m *TestDisplayMutation) AddQuestionsPerPage(i int)
- func (m *TestDisplayMutation) AddedEdges() []string
- func (m *TestDisplayMutation) AddedField(name string) (ent.Value, bool)
- func (m *TestDisplayMutation) AddedFields() []string
- func (m *TestDisplayMutation) AddedIDs(name string) []ent.Value
- func (m *TestDisplayMutation) AddedQuestionsPerPage() (r int, exists bool)
- func (m *TestDisplayMutation) ClearEdge(name string) error
- func (m *TestDisplayMutation) ClearField(name string) error
- func (m *TestDisplayMutation) ClearTest()
- func (m *TestDisplayMutation) ClearedEdges() []string
- func (m *TestDisplayMutation) ClearedFields() []string
- func (m TestDisplayMutation) Client() *Client
- func (m *TestDisplayMutation) EdgeCleared(name string) bool
- func (m *TestDisplayMutation) Field(name string) (ent.Value, bool)
- func (m *TestDisplayMutation) FieldCleared(name string) bool
- func (m *TestDisplayMutation) Fields() []string
- func (m *TestDisplayMutation) ID() (id uuid.UUID, exists bool)
- func (m *TestDisplayMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TestDisplayMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TestDisplayMutation) OldQuestionsPerPage(ctx context.Context) (v int, err error)
- func (m *TestDisplayMutation) OldRandomizeOrder(ctx context.Context) (v bool, err error)
- func (m *TestDisplayMutation) Op() Op
- func (m *TestDisplayMutation) QuestionsPerPage() (r int, exists bool)
- func (m *TestDisplayMutation) RandomizeOrder() (r bool, exists bool)
- func (m *TestDisplayMutation) RemovedEdges() []string
- func (m *TestDisplayMutation) RemovedIDs(name string) []ent.Value
- func (m *TestDisplayMutation) ResetEdge(name string) error
- func (m *TestDisplayMutation) ResetField(name string) error
- func (m *TestDisplayMutation) ResetQuestionsPerPage()
- func (m *TestDisplayMutation) ResetRandomizeOrder()
- func (m *TestDisplayMutation) ResetTest()
- func (m *TestDisplayMutation) SetField(name string, value ent.Value) error
- func (m *TestDisplayMutation) SetID(id uuid.UUID)
- func (m *TestDisplayMutation) SetQuestionsPerPage(i int)
- func (m *TestDisplayMutation) SetRandomizeOrder(b bool)
- func (m *TestDisplayMutation) SetTestID(id uuid.UUID)
- func (m *TestDisplayMutation) TestCleared() bool
- func (m *TestDisplayMutation) TestID() (id uuid.UUID, exists bool)
- func (m *TestDisplayMutation) TestIDs() (ids []uuid.UUID)
- func (m TestDisplayMutation) Tx() (*Tx, error)
- func (m *TestDisplayMutation) Type() string
- func (m *TestDisplayMutation) Where(ps ...predicate.TestDisplay)
- type TestDisplayQuery
- func (tdq *TestDisplayQuery) All(ctx context.Context) ([]*TestDisplay, error)
- func (tdq *TestDisplayQuery) AllX(ctx context.Context) []*TestDisplay
- func (tdq *TestDisplayQuery) Clone() *TestDisplayQuery
- func (tdq *TestDisplayQuery) Count(ctx context.Context) (int, error)
- func (tdq *TestDisplayQuery) CountX(ctx context.Context) int
- func (tdq *TestDisplayQuery) Exist(ctx context.Context) (bool, error)
- func (tdq *TestDisplayQuery) ExistX(ctx context.Context) bool
- func (tdq *TestDisplayQuery) First(ctx context.Context) (*TestDisplay, error)
- func (tdq *TestDisplayQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (tdq *TestDisplayQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (tdq *TestDisplayQuery) FirstX(ctx context.Context) *TestDisplay
- func (tdq *TestDisplayQuery) GroupBy(field string, fields ...string) *TestDisplayGroupBy
- func (tdq *TestDisplayQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (tdq *TestDisplayQuery) IDsX(ctx context.Context) []uuid.UUID
- func (tdq *TestDisplayQuery) Limit(limit int) *TestDisplayQuery
- func (tdq *TestDisplayQuery) Offset(offset int) *TestDisplayQuery
- func (tdq *TestDisplayQuery) Only(ctx context.Context) (*TestDisplay, error)
- func (tdq *TestDisplayQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (tdq *TestDisplayQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (tdq *TestDisplayQuery) OnlyX(ctx context.Context) *TestDisplay
- func (tdq *TestDisplayQuery) Order(o ...OrderFunc) *TestDisplayQuery
- func (tdq *TestDisplayQuery) QueryTest() *TestQuery
- func (tdq *TestDisplayQuery) Select(fields ...string) *TestDisplaySelect
- func (tdq *TestDisplayQuery) Unique(unique bool) *TestDisplayQuery
- func (tdq *TestDisplayQuery) Where(ps ...predicate.TestDisplay) *TestDisplayQuery
- func (tdq *TestDisplayQuery) WithTest(opts ...func(*TestQuery)) *TestDisplayQuery
- type TestDisplaySelect
- func (s *TestDisplaySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TestDisplaySelect) BoolX(ctx context.Context) bool
- func (s *TestDisplaySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TestDisplaySelect) BoolsX(ctx context.Context) []bool
- func (s *TestDisplaySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TestDisplaySelect) Float64X(ctx context.Context) float64
- func (s *TestDisplaySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TestDisplaySelect) Float64sX(ctx context.Context) []float64
- func (s *TestDisplaySelect) Int(ctx context.Context) (_ int, err error)
- func (s *TestDisplaySelect) IntX(ctx context.Context) int
- func (s *TestDisplaySelect) Ints(ctx context.Context) ([]int, error)
- func (s *TestDisplaySelect) IntsX(ctx context.Context) []int
- func (tds *TestDisplaySelect) Scan(ctx context.Context, v interface{}) error
- func (s *TestDisplaySelect) ScanX(ctx context.Context, v interface{})
- func (s *TestDisplaySelect) String(ctx context.Context) (_ string, err error)
- func (s *TestDisplaySelect) StringX(ctx context.Context) string
- func (s *TestDisplaySelect) Strings(ctx context.Context) ([]string, error)
- func (s *TestDisplaySelect) StringsX(ctx context.Context) []string
- type TestDisplayUpdate
- func (tdu *TestDisplayUpdate) AddQuestionsPerPage(i int) *TestDisplayUpdate
- func (tdu *TestDisplayUpdate) ClearTest() *TestDisplayUpdate
- func (tdu *TestDisplayUpdate) Exec(ctx context.Context) error
- func (tdu *TestDisplayUpdate) ExecX(ctx context.Context)
- func (tdu *TestDisplayUpdate) Mutation() *TestDisplayMutation
- func (tdu *TestDisplayUpdate) Save(ctx context.Context) (int, error)
- func (tdu *TestDisplayUpdate) SaveX(ctx context.Context) int
- func (tdu *TestDisplayUpdate) SetNillableQuestionsPerPage(i *int) *TestDisplayUpdate
- func (tdu *TestDisplayUpdate) SetNillableRandomizeOrder(b *bool) *TestDisplayUpdate
- func (tdu *TestDisplayUpdate) SetQuestionsPerPage(i int) *TestDisplayUpdate
- func (tdu *TestDisplayUpdate) SetRandomizeOrder(b bool) *TestDisplayUpdate
- func (tdu *TestDisplayUpdate) SetTest(t *Test) *TestDisplayUpdate
- func (tdu *TestDisplayUpdate) SetTestID(id uuid.UUID) *TestDisplayUpdate
- func (tdu *TestDisplayUpdate) Where(ps ...predicate.TestDisplay) *TestDisplayUpdate
- type TestDisplayUpdateOne
- func (tduo *TestDisplayUpdateOne) AddQuestionsPerPage(i int) *TestDisplayUpdateOne
- func (tduo *TestDisplayUpdateOne) ClearTest() *TestDisplayUpdateOne
- func (tduo *TestDisplayUpdateOne) Exec(ctx context.Context) error
- func (tduo *TestDisplayUpdateOne) ExecX(ctx context.Context)
- func (tduo *TestDisplayUpdateOne) Mutation() *TestDisplayMutation
- func (tduo *TestDisplayUpdateOne) Save(ctx context.Context) (*TestDisplay, error)
- func (tduo *TestDisplayUpdateOne) SaveX(ctx context.Context) *TestDisplay
- func (tduo *TestDisplayUpdateOne) Select(field string, fields ...string) *TestDisplayUpdateOne
- func (tduo *TestDisplayUpdateOne) SetNillableQuestionsPerPage(i *int) *TestDisplayUpdateOne
- func (tduo *TestDisplayUpdateOne) SetNillableRandomizeOrder(b *bool) *TestDisplayUpdateOne
- func (tduo *TestDisplayUpdateOne) SetQuestionsPerPage(i int) *TestDisplayUpdateOne
- func (tduo *TestDisplayUpdateOne) SetRandomizeOrder(b bool) *TestDisplayUpdateOne
- func (tduo *TestDisplayUpdateOne) SetTest(t *Test) *TestDisplayUpdateOne
- func (tduo *TestDisplayUpdateOne) SetTestID(id uuid.UUID) *TestDisplayUpdateOne
- type TestDisplays
- type TestEdges
- func (e TestEdges) DisplayOrErr() (*TestDisplay, error)
- func (e TestEdges) QuestionsOrErr() ([]*Question, error)
- func (e TestEdges) ScalesOrErr() ([]*Scale, error)
- func (e TestEdges) TagsOrErr() ([]*Tag, error)
- func (e TestEdges) TakesOrErr() ([]*Take, error)
- func (e TestEdges) TranslationsOrErr() ([]*TestTranslation, error)
- type TestGroupBy
- func (tgb *TestGroupBy) Aggregate(fns ...AggregateFunc) *TestGroupBy
- func (s *TestGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TestGroupBy) BoolX(ctx context.Context) bool
- func (s *TestGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TestGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TestGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TestGroupBy) Float64X(ctx context.Context) float64
- func (s *TestGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TestGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TestGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TestGroupBy) IntX(ctx context.Context) int
- func (s *TestGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TestGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TestGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *TestGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *TestGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TestGroupBy) StringX(ctx context.Context) string
- func (s *TestGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TestGroupBy) StringsX(ctx context.Context) []string
- type TestMutation
- func (m *TestMutation) AddDuration(t time.Duration)
- func (m *TestMutation) AddField(name string, value ent.Value) error
- func (m *TestMutation) AddMark(f float64)
- func (m *TestMutation) AddQuestionCount(i int)
- func (m *TestMutation) AddQuestionIDs(ids ...uuid.UUID)
- func (m *TestMutation) AddScaleIDs(ids ...uuid.UUID)
- func (m *TestMutation) AddTagIDs(ids ...uuid.UUID)
- func (m *TestMutation) AddTakeIDs(ids ...uuid.UUID)
- func (m *TestMutation) AddTranslationIDs(ids ...uuid.UUID)
- func (m *TestMutation) AddedDuration() (r time.Duration, exists bool)
- func (m *TestMutation) AddedEdges() []string
- func (m *TestMutation) AddedField(name string) (ent.Value, bool)
- func (m *TestMutation) AddedFields() []string
- func (m *TestMutation) AddedIDs(name string) []ent.Value
- func (m *TestMutation) AddedMark() (r float64, exists bool)
- func (m *TestMutation) AddedQuestionCount() (r int, exists bool)
- func (m *TestMutation) AvailableLocales() (r []string, exists bool)
- func (m *TestMutation) AvailableLocalesCleared() bool
- func (m *TestMutation) ClearAvailableLocales()
- func (m *TestMutation) ClearDisplay()
- func (m *TestMutation) ClearDuration()
- func (m *TestMutation) ClearEdge(name string) error
- func (m *TestMutation) ClearField(name string) error
- func (m *TestMutation) ClearImage()
- func (m *TestMutation) ClearQuestions()
- func (m *TestMutation) ClearScales()
- func (m *TestMutation) ClearTags()
- func (m *TestMutation) ClearTakes()
- func (m *TestMutation) ClearTranslations()
- func (m *TestMutation) ClearedEdges() []string
- func (m *TestMutation) ClearedFields() []string
- func (m TestMutation) Client() *Client
- func (m *TestMutation) Code() (r string, exists bool)
- func (m *TestMutation) CreateTime() (r time.Time, exists bool)
- func (m *TestMutation) DisplayCleared() bool
- func (m *TestMutation) DisplayID() (id uuid.UUID, exists bool)
- func (m *TestMutation) DisplayIDs() (ids []uuid.UUID)
- func (m *TestMutation) Duration() (r time.Duration, exists bool)
- func (m *TestMutation) DurationCleared() bool
- func (m *TestMutation) EdgeCleared(name string) bool
- func (m *TestMutation) Field(name string) (ent.Value, bool)
- func (m *TestMutation) FieldCleared(name string) bool
- func (m *TestMutation) Fields() []string
- func (m *TestMutation) ID() (id uuid.UUID, exists bool)
- func (m *TestMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TestMutation) Image() (r string, exists bool)
- func (m *TestMutation) ImageCleared() bool
- func (m *TestMutation) Mark() (r float64, exists bool)
- func (m *TestMutation) OldAvailableLocales(ctx context.Context) (v []string, err error)
- func (m *TestMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *TestMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *TestMutation) OldDuration(ctx context.Context) (v *time.Duration, err error)
- func (m *TestMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TestMutation) OldImage(ctx context.Context) (v string, err error)
- func (m *TestMutation) OldMark(ctx context.Context) (v float64, err error)
- func (m *TestMutation) OldPublished(ctx context.Context) (v bool, err error)
- func (m *TestMutation) OldQuestionCount(ctx context.Context) (v int, err error)
- func (m *TestMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *TestMutation) Op() Op
- func (m *TestMutation) Published() (r bool, exists bool)
- func (m *TestMutation) QuestionCount() (r int, exists bool)
- func (m *TestMutation) QuestionsCleared() bool
- func (m *TestMutation) QuestionsIDs() (ids []uuid.UUID)
- func (m *TestMutation) RemoveQuestionIDs(ids ...uuid.UUID)
- func (m *TestMutation) RemoveScaleIDs(ids ...uuid.UUID)
- func (m *TestMutation) RemoveTagIDs(ids ...uuid.UUID)
- func (m *TestMutation) RemoveTakeIDs(ids ...uuid.UUID)
- func (m *TestMutation) RemoveTranslationIDs(ids ...uuid.UUID)
- func (m *TestMutation) RemovedEdges() []string
- func (m *TestMutation) RemovedIDs(name string) []ent.Value
- func (m *TestMutation) RemovedQuestionsIDs() (ids []uuid.UUID)
- func (m *TestMutation) RemovedScalesIDs() (ids []uuid.UUID)
- func (m *TestMutation) RemovedTagsIDs() (ids []uuid.UUID)
- func (m *TestMutation) RemovedTakesIDs() (ids []uuid.UUID)
- func (m *TestMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
- func (m *TestMutation) ResetAvailableLocales()
- func (m *TestMutation) ResetCode()
- func (m *TestMutation) ResetCreateTime()
- func (m *TestMutation) ResetDisplay()
- func (m *TestMutation) ResetDuration()
- func (m *TestMutation) ResetEdge(name string) error
- func (m *TestMutation) ResetField(name string) error
- func (m *TestMutation) ResetImage()
- func (m *TestMutation) ResetMark()
- func (m *TestMutation) ResetPublished()
- func (m *TestMutation) ResetQuestionCount()
- func (m *TestMutation) ResetQuestions()
- func (m *TestMutation) ResetScales()
- func (m *TestMutation) ResetTags()
- func (m *TestMutation) ResetTakes()
- func (m *TestMutation) ResetTranslations()
- func (m *TestMutation) ResetUpdateTime()
- func (m *TestMutation) ScalesCleared() bool
- func (m *TestMutation) ScalesIDs() (ids []uuid.UUID)
- func (m *TestMutation) SetAvailableLocales(s []string)
- func (m *TestMutation) SetCode(s string)
- func (m *TestMutation) SetCreateTime(t time.Time)
- func (m *TestMutation) SetDisplayID(id uuid.UUID)
- func (m *TestMutation) SetDuration(t time.Duration)
- func (m *TestMutation) SetField(name string, value ent.Value) error
- func (m *TestMutation) SetID(id uuid.UUID)
- func (m *TestMutation) SetImage(s string)
- func (m *TestMutation) SetMark(f float64)
- func (m *TestMutation) SetPublished(b bool)
- func (m *TestMutation) SetQuestionCount(i int)
- func (m *TestMutation) SetUpdateTime(t time.Time)
- func (m *TestMutation) TagsCleared() bool
- func (m *TestMutation) TagsIDs() (ids []uuid.UUID)
- func (m *TestMutation) TakesCleared() bool
- func (m *TestMutation) TakesIDs() (ids []uuid.UUID)
- func (m *TestMutation) TranslationsCleared() bool
- func (m *TestMutation) TranslationsIDs() (ids []uuid.UUID)
- func (m TestMutation) Tx() (*Tx, error)
- func (m *TestMutation) Type() string
- func (m *TestMutation) UpdateTime() (r time.Time, exists bool)
- func (m *TestMutation) Where(ps ...predicate.Test)
- type TestQuery
- func (tq *TestQuery) All(ctx context.Context) ([]*Test, error)
- func (tq *TestQuery) AllX(ctx context.Context) []*Test
- func (tq *TestQuery) Clone() *TestQuery
- func (tq *TestQuery) Count(ctx context.Context) (int, error)
- func (tq *TestQuery) CountX(ctx context.Context) int
- func (tq *TestQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TestQuery) ExistX(ctx context.Context) bool
- func (tq *TestQuery) First(ctx context.Context) (*Test, error)
- func (tq *TestQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TestQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (tq *TestQuery) FirstX(ctx context.Context) *Test
- func (tq *TestQuery) GroupBy(field string, fields ...string) *TestGroupBy
- func (tq *TestQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (tq *TestQuery) IDsX(ctx context.Context) []uuid.UUID
- func (tq *TestQuery) Limit(limit int) *TestQuery
- func (tq *TestQuery) Offset(offset int) *TestQuery
- func (tq *TestQuery) Only(ctx context.Context) (*Test, error)
- func (tq *TestQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TestQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (tq *TestQuery) OnlyX(ctx context.Context) *Test
- func (tq *TestQuery) Order(o ...OrderFunc) *TestQuery
- func (tq *TestQuery) QueryDisplay() *TestDisplayQuery
- func (tq *TestQuery) QueryQuestions() *QuestionQuery
- func (tq *TestQuery) QueryScales() *ScaleQuery
- func (tq *TestQuery) QueryTags() *TagQuery
- func (tq *TestQuery) QueryTakes() *TakeQuery
- func (tq *TestQuery) QueryTranslations() *TestTranslationQuery
- func (tq *TestQuery) Select(fields ...string) *TestSelect
- func (tq *TestQuery) Unique(unique bool) *TestQuery
- func (tq *TestQuery) Where(ps ...predicate.Test) *TestQuery
- func (tq *TestQuery) WithDisplay(opts ...func(*TestDisplayQuery)) *TestQuery
- func (tq *TestQuery) WithQuestions(opts ...func(*QuestionQuery)) *TestQuery
- func (tq *TestQuery) WithScales(opts ...func(*ScaleQuery)) *TestQuery
- func (tq *TestQuery) WithTags(opts ...func(*TagQuery)) *TestQuery
- func (tq *TestQuery) WithTakes(opts ...func(*TakeQuery)) *TestQuery
- func (tq *TestQuery) WithTranslations(opts ...func(*TestTranslationQuery)) *TestQuery
- type TestSelect
- func (s *TestSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TestSelect) BoolX(ctx context.Context) bool
- func (s *TestSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TestSelect) BoolsX(ctx context.Context) []bool
- func (s *TestSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TestSelect) Float64X(ctx context.Context) float64
- func (s *TestSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TestSelect) Float64sX(ctx context.Context) []float64
- func (s *TestSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TestSelect) IntX(ctx context.Context) int
- func (s *TestSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TestSelect) IntsX(ctx context.Context) []int
- func (ts *TestSelect) Scan(ctx context.Context, v interface{}) error
- func (s *TestSelect) ScanX(ctx context.Context, v interface{})
- func (s *TestSelect) String(ctx context.Context) (_ string, err error)
- func (s *TestSelect) StringX(ctx context.Context) string
- func (s *TestSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TestSelect) StringsX(ctx context.Context) []string
- type TestTranslation
- type TestTranslationClient
- func (c *TestTranslationClient) Create() *TestTranslationCreate
- func (c *TestTranslationClient) CreateBulk(builders ...*TestTranslationCreate) *TestTranslationCreateBulk
- func (c *TestTranslationClient) Delete() *TestTranslationDelete
- func (c *TestTranslationClient) DeleteOne(tt *TestTranslation) *TestTranslationDeleteOne
- func (c *TestTranslationClient) DeleteOneID(id uuid.UUID) *TestTranslationDeleteOne
- func (c *TestTranslationClient) Get(ctx context.Context, id uuid.UUID) (*TestTranslation, error)
- func (c *TestTranslationClient) GetX(ctx context.Context, id uuid.UUID) *TestTranslation
- func (c *TestTranslationClient) Hooks() []Hook
- func (c *TestTranslationClient) Query() *TestTranslationQuery
- func (c *TestTranslationClient) QueryTest(tt *TestTranslation) *TestQuery
- func (c *TestTranslationClient) Update() *TestTranslationUpdate
- func (c *TestTranslationClient) UpdateOne(tt *TestTranslation) *TestTranslationUpdateOne
- func (c *TestTranslationClient) UpdateOneID(id uuid.UUID) *TestTranslationUpdateOne
- func (c *TestTranslationClient) Use(hooks ...Hook)
- type TestTranslationCreate
- func (ttc *TestTranslationCreate) Exec(ctx context.Context) error
- func (ttc *TestTranslationCreate) ExecX(ctx context.Context)
- func (ttc *TestTranslationCreate) Mutation() *TestTranslationMutation
- func (ttc *TestTranslationCreate) Save(ctx context.Context) (*TestTranslation, error)
- func (ttc *TestTranslationCreate) SaveX(ctx context.Context) *TestTranslation
- func (ttc *TestTranslationCreate) SetDescription(s string) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetDetails(s string) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetID(u uuid.UUID) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetInstruction(s string) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetLocale(t testtranslation.Locale) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetNillableDescription(s *string) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetNillableDetails(s *string) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetNillableID(u *uuid.UUID) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetNillableInstruction(s *string) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetNillableResultPreambule(s *string) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetNillableTestID(id *uuid.UUID) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetResultPreambule(s string) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetTest(t *Test) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetTestID(id uuid.UUID) *TestTranslationCreate
- func (ttc *TestTranslationCreate) SetTitle(s string) *TestTranslationCreate
- type TestTranslationCreateBulk
- func (ttcb *TestTranslationCreateBulk) Exec(ctx context.Context) error
- func (ttcb *TestTranslationCreateBulk) ExecX(ctx context.Context)
- func (ttcb *TestTranslationCreateBulk) Save(ctx context.Context) ([]*TestTranslation, error)
- func (ttcb *TestTranslationCreateBulk) SaveX(ctx context.Context) []*TestTranslation
- type TestTranslationDelete
- type TestTranslationDeleteOne
- type TestTranslationEdges
- type TestTranslationGroupBy
- func (ttgb *TestTranslationGroupBy) Aggregate(fns ...AggregateFunc) *TestTranslationGroupBy
- func (s *TestTranslationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TestTranslationGroupBy) BoolX(ctx context.Context) bool
- func (s *TestTranslationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TestTranslationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TestTranslationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TestTranslationGroupBy) Float64X(ctx context.Context) float64
- func (s *TestTranslationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TestTranslationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TestTranslationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TestTranslationGroupBy) IntX(ctx context.Context) int
- func (s *TestTranslationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TestTranslationGroupBy) IntsX(ctx context.Context) []int
- func (ttgb *TestTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *TestTranslationGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *TestTranslationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TestTranslationGroupBy) StringX(ctx context.Context) string
- func (s *TestTranslationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TestTranslationGroupBy) StringsX(ctx context.Context) []string
- type TestTranslationMutation
- func (m *TestTranslationMutation) AddField(name string, value ent.Value) error
- func (m *TestTranslationMutation) AddedEdges() []string
- func (m *TestTranslationMutation) AddedField(name string) (ent.Value, bool)
- func (m *TestTranslationMutation) AddedFields() []string
- func (m *TestTranslationMutation) AddedIDs(name string) []ent.Value
- func (m *TestTranslationMutation) ClearDescription()
- func (m *TestTranslationMutation) ClearDetails()
- func (m *TestTranslationMutation) ClearEdge(name string) error
- func (m *TestTranslationMutation) ClearField(name string) error
- func (m *TestTranslationMutation) ClearInstruction()
- func (m *TestTranslationMutation) ClearResultPreambule()
- func (m *TestTranslationMutation) ClearTest()
- func (m *TestTranslationMutation) ClearedEdges() []string
- func (m *TestTranslationMutation) ClearedFields() []string
- func (m TestTranslationMutation) Client() *Client
- func (m *TestTranslationMutation) Description() (r string, exists bool)
- func (m *TestTranslationMutation) DescriptionCleared() bool
- func (m *TestTranslationMutation) Details() (r string, exists bool)
- func (m *TestTranslationMutation) DetailsCleared() bool
- func (m *TestTranslationMutation) EdgeCleared(name string) bool
- func (m *TestTranslationMutation) Field(name string) (ent.Value, bool)
- func (m *TestTranslationMutation) FieldCleared(name string) bool
- func (m *TestTranslationMutation) Fields() []string
- func (m *TestTranslationMutation) ID() (id uuid.UUID, exists bool)
- func (m *TestTranslationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TestTranslationMutation) Instruction() (r string, exists bool)
- func (m *TestTranslationMutation) InstructionCleared() bool
- func (m *TestTranslationMutation) Locale() (r testtranslation.Locale, exists bool)
- func (m *TestTranslationMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *TestTranslationMutation) OldDetails(ctx context.Context) (v string, err error)
- func (m *TestTranslationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TestTranslationMutation) OldInstruction(ctx context.Context) (v string, err error)
- func (m *TestTranslationMutation) OldLocale(ctx context.Context) (v testtranslation.Locale, err error)
- func (m *TestTranslationMutation) OldResultPreambule(ctx context.Context) (v string, err error)
- func (m *TestTranslationMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *TestTranslationMutation) Op() Op
- func (m *TestTranslationMutation) RemovedEdges() []string
- func (m *TestTranslationMutation) RemovedIDs(name string) []ent.Value
- func (m *TestTranslationMutation) ResetDescription()
- func (m *TestTranslationMutation) ResetDetails()
- func (m *TestTranslationMutation) ResetEdge(name string) error
- func (m *TestTranslationMutation) ResetField(name string) error
- func (m *TestTranslationMutation) ResetInstruction()
- func (m *TestTranslationMutation) ResetLocale()
- func (m *TestTranslationMutation) ResetResultPreambule()
- func (m *TestTranslationMutation) ResetTest()
- func (m *TestTranslationMutation) ResetTitle()
- func (m *TestTranslationMutation) ResultPreambule() (r string, exists bool)
- func (m *TestTranslationMutation) ResultPreambuleCleared() bool
- func (m *TestTranslationMutation) SetDescription(s string)
- func (m *TestTranslationMutation) SetDetails(s string)
- func (m *TestTranslationMutation) SetField(name string, value ent.Value) error
- func (m *TestTranslationMutation) SetID(id uuid.UUID)
- func (m *TestTranslationMutation) SetInstruction(s string)
- func (m *TestTranslationMutation) SetLocale(t testtranslation.Locale)
- func (m *TestTranslationMutation) SetResultPreambule(s string)
- func (m *TestTranslationMutation) SetTestID(id uuid.UUID)
- func (m *TestTranslationMutation) SetTitle(s string)
- func (m *TestTranslationMutation) TestCleared() bool
- func (m *TestTranslationMutation) TestID() (id uuid.UUID, exists bool)
- func (m *TestTranslationMutation) TestIDs() (ids []uuid.UUID)
- func (m *TestTranslationMutation) Title() (r string, exists bool)
- func (m TestTranslationMutation) Tx() (*Tx, error)
- func (m *TestTranslationMutation) Type() string
- func (m *TestTranslationMutation) Where(ps ...predicate.TestTranslation)
- type TestTranslationQuery
- func (ttq *TestTranslationQuery) All(ctx context.Context) ([]*TestTranslation, error)
- func (ttq *TestTranslationQuery) AllX(ctx context.Context) []*TestTranslation
- func (ttq *TestTranslationQuery) Clone() *TestTranslationQuery
- func (ttq *TestTranslationQuery) Count(ctx context.Context) (int, error)
- func (ttq *TestTranslationQuery) CountX(ctx context.Context) int
- func (ttq *TestTranslationQuery) Exist(ctx context.Context) (bool, error)
- func (ttq *TestTranslationQuery) ExistX(ctx context.Context) bool
- func (ttq *TestTranslationQuery) First(ctx context.Context) (*TestTranslation, error)
- func (ttq *TestTranslationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (ttq *TestTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (ttq *TestTranslationQuery) FirstX(ctx context.Context) *TestTranslation
- func (ttq *TestTranslationQuery) GroupBy(field string, fields ...string) *TestTranslationGroupBy
- func (ttq *TestTranslationQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (ttq *TestTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (ttq *TestTranslationQuery) Limit(limit int) *TestTranslationQuery
- func (ttq *TestTranslationQuery) Offset(offset int) *TestTranslationQuery
- func (ttq *TestTranslationQuery) Only(ctx context.Context) (*TestTranslation, error)
- func (ttq *TestTranslationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (ttq *TestTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (ttq *TestTranslationQuery) OnlyX(ctx context.Context) *TestTranslation
- func (ttq *TestTranslationQuery) Order(o ...OrderFunc) *TestTranslationQuery
- func (ttq *TestTranslationQuery) QueryTest() *TestQuery
- func (ttq *TestTranslationQuery) Select(fields ...string) *TestTranslationSelect
- func (ttq *TestTranslationQuery) Unique(unique bool) *TestTranslationQuery
- func (ttq *TestTranslationQuery) Where(ps ...predicate.TestTranslation) *TestTranslationQuery
- func (ttq *TestTranslationQuery) WithTest(opts ...func(*TestQuery)) *TestTranslationQuery
- type TestTranslationSelect
- func (s *TestTranslationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TestTranslationSelect) BoolX(ctx context.Context) bool
- func (s *TestTranslationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TestTranslationSelect) BoolsX(ctx context.Context) []bool
- func (s *TestTranslationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TestTranslationSelect) Float64X(ctx context.Context) float64
- func (s *TestTranslationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TestTranslationSelect) Float64sX(ctx context.Context) []float64
- func (s *TestTranslationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TestTranslationSelect) IntX(ctx context.Context) int
- func (s *TestTranslationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TestTranslationSelect) IntsX(ctx context.Context) []int
- func (tts *TestTranslationSelect) Scan(ctx context.Context, v interface{}) error
- func (s *TestTranslationSelect) ScanX(ctx context.Context, v interface{})
- func (s *TestTranslationSelect) String(ctx context.Context) (_ string, err error)
- func (s *TestTranslationSelect) StringX(ctx context.Context) string
- func (s *TestTranslationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TestTranslationSelect) StringsX(ctx context.Context) []string
- type TestTranslationUpdate
- func (ttu *TestTranslationUpdate) ClearDescription() *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) ClearDetails() *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) ClearInstruction() *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) ClearResultPreambule() *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) ClearTest() *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) Exec(ctx context.Context) error
- func (ttu *TestTranslationUpdate) ExecX(ctx context.Context)
- func (ttu *TestTranslationUpdate) Mutation() *TestTranslationMutation
- func (ttu *TestTranslationUpdate) Save(ctx context.Context) (int, error)
- func (ttu *TestTranslationUpdate) SaveX(ctx context.Context) int
- func (ttu *TestTranslationUpdate) SetDescription(s string) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) SetDetails(s string) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) SetInstruction(s string) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) SetNillableDescription(s *string) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) SetNillableDetails(s *string) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) SetNillableInstruction(s *string) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) SetNillableResultPreambule(s *string) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) SetNillableTestID(id *uuid.UUID) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) SetResultPreambule(s string) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) SetTest(t *Test) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) SetTestID(id uuid.UUID) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) SetTitle(s string) *TestTranslationUpdate
- func (ttu *TestTranslationUpdate) Where(ps ...predicate.TestTranslation) *TestTranslationUpdate
- type TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) ClearDescription() *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) ClearDetails() *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) ClearInstruction() *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) ClearResultPreambule() *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) ClearTest() *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) Exec(ctx context.Context) error
- func (ttuo *TestTranslationUpdateOne) ExecX(ctx context.Context)
- func (ttuo *TestTranslationUpdateOne) Mutation() *TestTranslationMutation
- func (ttuo *TestTranslationUpdateOne) Save(ctx context.Context) (*TestTranslation, error)
- func (ttuo *TestTranslationUpdateOne) SaveX(ctx context.Context) *TestTranslation
- func (ttuo *TestTranslationUpdateOne) Select(field string, fields ...string) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetDescription(s string) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetDetails(s string) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetInstruction(s string) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetNillableDescription(s *string) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetNillableDetails(s *string) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetNillableInstruction(s *string) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetNillableResultPreambule(s *string) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetNillableTestID(id *uuid.UUID) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetResultPreambule(s string) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetTest(t *Test) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetTestID(id uuid.UUID) *TestTranslationUpdateOne
- func (ttuo *TestTranslationUpdateOne) SetTitle(s string) *TestTranslationUpdateOne
- type TestTranslations
- type TestUpdate
- func (tu *TestUpdate) AddDuration(t time.Duration) *TestUpdate
- func (tu *TestUpdate) AddMark(f float64) *TestUpdate
- func (tu *TestUpdate) AddQuestionCount(i int) *TestUpdate
- func (tu *TestUpdate) AddQuestionIDs(ids ...uuid.UUID) *TestUpdate
- func (tu *TestUpdate) AddQuestions(q ...*Question) *TestUpdate
- func (tu *TestUpdate) AddScaleIDs(ids ...uuid.UUID) *TestUpdate
- func (tu *TestUpdate) AddScales(s ...*Scale) *TestUpdate
- func (tu *TestUpdate) AddTagIDs(ids ...uuid.UUID) *TestUpdate
- func (tu *TestUpdate) AddTags(t ...*Tag) *TestUpdate
- func (tu *TestUpdate) AddTakeIDs(ids ...uuid.UUID) *TestUpdate
- func (tu *TestUpdate) AddTakes(t ...*Take) *TestUpdate
- func (tu *TestUpdate) AddTranslationIDs(ids ...uuid.UUID) *TestUpdate
- func (tu *TestUpdate) AddTranslations(t ...*TestTranslation) *TestUpdate
- func (tu *TestUpdate) ClearAvailableLocales() *TestUpdate
- func (tu *TestUpdate) ClearDisplay() *TestUpdate
- func (tu *TestUpdate) ClearDuration() *TestUpdate
- func (tu *TestUpdate) ClearImage() *TestUpdate
- func (tu *TestUpdate) ClearQuestions() *TestUpdate
- func (tu *TestUpdate) ClearScales() *TestUpdate
- func (tu *TestUpdate) ClearTags() *TestUpdate
- func (tu *TestUpdate) ClearTakes() *TestUpdate
- func (tu *TestUpdate) ClearTranslations() *TestUpdate
- func (tu *TestUpdate) Exec(ctx context.Context) error
- func (tu *TestUpdate) ExecX(ctx context.Context)
- func (tu *TestUpdate) Mutation() *TestMutation
- func (tu *TestUpdate) RemoveQuestionIDs(ids ...uuid.UUID) *TestUpdate
- func (tu *TestUpdate) RemoveQuestions(q ...*Question) *TestUpdate
- func (tu *TestUpdate) RemoveScaleIDs(ids ...uuid.UUID) *TestUpdate
- func (tu *TestUpdate) RemoveScales(s ...*Scale) *TestUpdate
- func (tu *TestUpdate) RemoveTagIDs(ids ...uuid.UUID) *TestUpdate
- func (tu *TestUpdate) RemoveTags(t ...*Tag) *TestUpdate
- func (tu *TestUpdate) RemoveTakeIDs(ids ...uuid.UUID) *TestUpdate
- func (tu *TestUpdate) RemoveTakes(t ...*Take) *TestUpdate
- func (tu *TestUpdate) RemoveTranslationIDs(ids ...uuid.UUID) *TestUpdate
- func (tu *TestUpdate) RemoveTranslations(t ...*TestTranslation) *TestUpdate
- func (tu *TestUpdate) Save(ctx context.Context) (int, error)
- func (tu *TestUpdate) SaveX(ctx context.Context) int
- func (tu *TestUpdate) SetAvailableLocales(s []string) *TestUpdate
- func (tu *TestUpdate) SetDisplay(t *TestDisplay) *TestUpdate
- func (tu *TestUpdate) SetDisplayID(id uuid.UUID) *TestUpdate
- func (tu *TestUpdate) SetDuration(t time.Duration) *TestUpdate
- func (tu *TestUpdate) SetImage(s string) *TestUpdate
- func (tu *TestUpdate) SetMark(f float64) *TestUpdate
- func (tu *TestUpdate) SetNillableDisplayID(id *uuid.UUID) *TestUpdate
- func (tu *TestUpdate) SetNillableDuration(t *time.Duration) *TestUpdate
- func (tu *TestUpdate) SetNillableImage(s *string) *TestUpdate
- func (tu *TestUpdate) SetNillableMark(f *float64) *TestUpdate
- func (tu *TestUpdate) SetNillablePublished(b *bool) *TestUpdate
- func (tu *TestUpdate) SetNillableQuestionCount(i *int) *TestUpdate
- func (tu *TestUpdate) SetPublished(b bool) *TestUpdate
- func (tu *TestUpdate) SetQuestionCount(i int) *TestUpdate
- func (tu *TestUpdate) SetUpdateTime(t time.Time) *TestUpdate
- func (tu *TestUpdate) Where(ps ...predicate.Test) *TestUpdate
- type TestUpdateOne
- func (tuo *TestUpdateOne) AddDuration(t time.Duration) *TestUpdateOne
- func (tuo *TestUpdateOne) AddMark(f float64) *TestUpdateOne
- func (tuo *TestUpdateOne) AddQuestionCount(i int) *TestUpdateOne
- func (tuo *TestUpdateOne) AddQuestionIDs(ids ...uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) AddQuestions(q ...*Question) *TestUpdateOne
- func (tuo *TestUpdateOne) AddScaleIDs(ids ...uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) AddScales(s ...*Scale) *TestUpdateOne
- func (tuo *TestUpdateOne) AddTagIDs(ids ...uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) AddTags(t ...*Tag) *TestUpdateOne
- func (tuo *TestUpdateOne) AddTakeIDs(ids ...uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) AddTakes(t ...*Take) *TestUpdateOne
- func (tuo *TestUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) AddTranslations(t ...*TestTranslation) *TestUpdateOne
- func (tuo *TestUpdateOne) ClearAvailableLocales() *TestUpdateOne
- func (tuo *TestUpdateOne) ClearDisplay() *TestUpdateOne
- func (tuo *TestUpdateOne) ClearDuration() *TestUpdateOne
- func (tuo *TestUpdateOne) ClearImage() *TestUpdateOne
- func (tuo *TestUpdateOne) ClearQuestions() *TestUpdateOne
- func (tuo *TestUpdateOne) ClearScales() *TestUpdateOne
- func (tuo *TestUpdateOne) ClearTags() *TestUpdateOne
- func (tuo *TestUpdateOne) ClearTakes() *TestUpdateOne
- func (tuo *TestUpdateOne) ClearTranslations() *TestUpdateOne
- func (tuo *TestUpdateOne) Exec(ctx context.Context) error
- func (tuo *TestUpdateOne) ExecX(ctx context.Context)
- func (tuo *TestUpdateOne) Mutation() *TestMutation
- func (tuo *TestUpdateOne) RemoveQuestionIDs(ids ...uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) RemoveQuestions(q ...*Question) *TestUpdateOne
- func (tuo *TestUpdateOne) RemoveScaleIDs(ids ...uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) RemoveScales(s ...*Scale) *TestUpdateOne
- func (tuo *TestUpdateOne) RemoveTagIDs(ids ...uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) RemoveTags(t ...*Tag) *TestUpdateOne
- func (tuo *TestUpdateOne) RemoveTakeIDs(ids ...uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) RemoveTakes(t ...*Take) *TestUpdateOne
- func (tuo *TestUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) RemoveTranslations(t ...*TestTranslation) *TestUpdateOne
- func (tuo *TestUpdateOne) Save(ctx context.Context) (*Test, error)
- func (tuo *TestUpdateOne) SaveX(ctx context.Context) *Test
- func (tuo *TestUpdateOne) Select(field string, fields ...string) *TestUpdateOne
- func (tuo *TestUpdateOne) SetAvailableLocales(s []string) *TestUpdateOne
- func (tuo *TestUpdateOne) SetDisplay(t *TestDisplay) *TestUpdateOne
- func (tuo *TestUpdateOne) SetDisplayID(id uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) SetDuration(t time.Duration) *TestUpdateOne
- func (tuo *TestUpdateOne) SetImage(s string) *TestUpdateOne
- func (tuo *TestUpdateOne) SetMark(f float64) *TestUpdateOne
- func (tuo *TestUpdateOne) SetNillableDisplayID(id *uuid.UUID) *TestUpdateOne
- func (tuo *TestUpdateOne) SetNillableDuration(t *time.Duration) *TestUpdateOne
- func (tuo *TestUpdateOne) SetNillableImage(s *string) *TestUpdateOne
- func (tuo *TestUpdateOne) SetNillableMark(f *float64) *TestUpdateOne
- func (tuo *TestUpdateOne) SetNillablePublished(b *bool) *TestUpdateOne
- func (tuo *TestUpdateOne) SetNillableQuestionCount(i *int) *TestUpdateOne
- func (tuo *TestUpdateOne) SetPublished(b bool) *TestUpdateOne
- func (tuo *TestUpdateOne) SetQuestionCount(i int) *TestUpdateOne
- func (tuo *TestUpdateOne) SetUpdateTime(t time.Time) *TestUpdateOne
- type Tests
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryAliases(u *User) *UserQuery
- func (c *UserClient) QueryParent(u *User) *UserQuery
- func (c *UserClient) QuerySessions(u *User) *UserSessionQuery
- func (c *UserClient) QueryTakes(u *User) *TakeQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddAliasIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddAliases(u ...*User) *UserCreate
- func (uc *UserCreate) AddSessionIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddSessions(u ...*UserSession) *UserCreate
- func (uc *UserCreate) AddTakeIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddTakes(t ...*Take) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAdmin(b bool) *UserCreate
- func (uc *UserCreate) SetAnonymous(b bool) *UserCreate
- func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetLocale(u user.Locale) *UserCreate
- func (uc *UserCreate) SetMeta(m map[string]interface{}) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableAdmin(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableAnonymous(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableParentID(id *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillablePicture(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableUseDarkTheme(b *bool) *UserCreate
- func (uc *UserCreate) SetParent(u *User) *UserCreate
- func (uc *UserCreate) SetParentID(id uuid.UUID) *UserCreate
- func (uc *UserCreate) SetPasswordHash(s string) *UserCreate
- func (uc *UserCreate) SetPicture(s string) *UserCreate
- func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetUseDarkTheme(b bool) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddAliasIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddSessionIDs(ids ...int)
- func (m *UserMutation) AddTakeIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) Admin() (r bool, exists bool)
- func (m *UserMutation) AliasesCleared() bool
- func (m *UserMutation) AliasesIDs() (ids []uuid.UUID)
- func (m *UserMutation) Anonymous() (r bool, exists bool)
- func (m *UserMutation) ClearAliases()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearEmail()
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearMeta()
- func (m *UserMutation) ClearParent()
- func (m *UserMutation) ClearPicture()
- func (m *UserMutation) ClearSessions()
- func (m *UserMutation) ClearTakes()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) EmailCleared() bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) Locale() (r user.Locale, exists bool)
- func (m *UserMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *UserMutation) MetaCleared() bool
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldAdmin(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldAnonymous(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldLocale(ctx context.Context) (v user.Locale, err error)
- func (m *UserMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPasswordHash(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPicture(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUseDarkTheme(ctx context.Context) (v bool, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) ParentCleared() bool
- func (m *UserMutation) ParentID() (id uuid.UUID, exists bool)
- func (m *UserMutation) ParentIDs() (ids []uuid.UUID)
- func (m *UserMutation) PasswordHash() (r string, exists bool)
- func (m *UserMutation) Picture() (r string, exists bool)
- func (m *UserMutation) PictureCleared() bool
- func (m *UserMutation) RemoveAliasIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveSessionIDs(ids ...int)
- func (m *UserMutation) RemoveTakeIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovedAliasesIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedSessionsIDs() (ids []int)
- func (m *UserMutation) RemovedTakesIDs() (ids []uuid.UUID)
- func (m *UserMutation) ResetAdmin()
- func (m *UserMutation) ResetAliases()
- func (m *UserMutation) ResetAnonymous()
- func (m *UserMutation) ResetCreateTime()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetLocale()
- func (m *UserMutation) ResetMeta()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetParent()
- func (m *UserMutation) ResetPasswordHash()
- func (m *UserMutation) ResetPicture()
- func (m *UserMutation) ResetSessions()
- func (m *UserMutation) ResetTakes()
- func (m *UserMutation) ResetUpdateTime()
- func (m *UserMutation) ResetUseDarkTheme()
- func (m *UserMutation) SessionsCleared() bool
- func (m *UserMutation) SessionsIDs() (ids []int)
- func (m *UserMutation) SetAdmin(b bool)
- func (m *UserMutation) SetAnonymous(b bool)
- func (m *UserMutation) SetCreateTime(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetLocale(u user.Locale)
- func (m *UserMutation) SetMeta(value map[string]interface{})
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetParentID(id uuid.UUID)
- func (m *UserMutation) SetPasswordHash(s string)
- func (m *UserMutation) SetPicture(s string)
- func (m *UserMutation) SetUpdateTime(t time.Time)
- func (m *UserMutation) SetUseDarkTheme(b bool)
- func (m *UserMutation) TakesCleared() bool
- func (m *UserMutation) TakesIDs() (ids []uuid.UUID)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserMutation) UseDarkTheme() (r bool, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- type UserQuery
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryAliases() *UserQuery
- func (uq *UserQuery) QueryParent() *UserQuery
- func (uq *UserQuery) QuerySessions() *UserSessionQuery
- func (uq *UserQuery) QueryTakes() *TakeQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithAliases(opts ...func(*UserQuery)) *UserQuery
- func (uq *UserQuery) WithParent(opts ...func(*UserQuery)) *UserQuery
- func (uq *UserQuery) WithSessions(opts ...func(*UserSessionQuery)) *UserQuery
- func (uq *UserQuery) WithTakes(opts ...func(*TakeQuery)) *UserQuery
- type UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
- func (s *UserSelect) ScanX(ctx context.Context, v interface{})
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserSession
- type UserSessionClient
- func (c *UserSessionClient) Create() *UserSessionCreate
- func (c *UserSessionClient) CreateBulk(builders ...*UserSessionCreate) *UserSessionCreateBulk
- func (c *UserSessionClient) Delete() *UserSessionDelete
- func (c *UserSessionClient) DeleteOne(us *UserSession) *UserSessionDeleteOne
- func (c *UserSessionClient) DeleteOneID(id int) *UserSessionDeleteOne
- func (c *UserSessionClient) Get(ctx context.Context, id int) (*UserSession, error)
- func (c *UserSessionClient) GetX(ctx context.Context, id int) *UserSession
- func (c *UserSessionClient) Hooks() []Hook
- func (c *UserSessionClient) Query() *UserSessionQuery
- func (c *UserSessionClient) QueryUser(us *UserSession) *UserQuery
- func (c *UserSessionClient) Update() *UserSessionUpdate
- func (c *UserSessionClient) UpdateOne(us *UserSession) *UserSessionUpdateOne
- func (c *UserSessionClient) UpdateOneID(id int) *UserSessionUpdateOne
- func (c *UserSessionClient) Use(hooks ...Hook)
- type UserSessionCreate
- func (usc *UserSessionCreate) Exec(ctx context.Context) error
- func (usc *UserSessionCreate) ExecX(ctx context.Context)
- func (usc *UserSessionCreate) Mutation() *UserSessionMutation
- func (usc *UserSessionCreate) Save(ctx context.Context) (*UserSession, error)
- func (usc *UserSessionCreate) SaveX(ctx context.Context) *UserSession
- func (usc *UserSessionCreate) SetActive(b bool) *UserSessionCreate
- func (usc *UserSessionCreate) SetCreateTime(t time.Time) *UserSessionCreate
- func (usc *UserSessionCreate) SetIP(s string) *UserSessionCreate
- func (usc *UserSessionCreate) SetLastActivity(t time.Time) *UserSessionCreate
- func (usc *UserSessionCreate) SetMeta(m map[string]interface{}) *UserSessionCreate
- func (usc *UserSessionCreate) SetNillableActive(b *bool) *UserSessionCreate
- func (usc *UserSessionCreate) SetNillableCreateTime(t *time.Time) *UserSessionCreate
- func (usc *UserSessionCreate) SetNillableLastActivity(t *time.Time) *UserSessionCreate
- func (usc *UserSessionCreate) SetNillableUpdateTime(t *time.Time) *UserSessionCreate
- func (usc *UserSessionCreate) SetSid(s string) *UserSessionCreate
- func (usc *UserSessionCreate) SetUpdateTime(t time.Time) *UserSessionCreate
- func (usc *UserSessionCreate) SetUser(u *User) *UserSessionCreate
- func (usc *UserSessionCreate) SetUserAgent(s string) *UserSessionCreate
- func (usc *UserSessionCreate) SetUserID(id uuid.UUID) *UserSessionCreate
- type UserSessionCreateBulk
- type UserSessionDelete
- type UserSessionDeleteOne
- type UserSessionEdges
- type UserSessionGroupBy
- func (usgb *UserSessionGroupBy) Aggregate(fns ...AggregateFunc) *UserSessionGroupBy
- func (s *UserSessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSessionGroupBy) BoolX(ctx context.Context) bool
- func (s *UserSessionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSessionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserSessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSessionGroupBy) Float64X(ctx context.Context) float64
- func (s *UserSessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSessionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserSessionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserSessionGroupBy) IntX(ctx context.Context) int
- func (s *UserSessionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserSessionGroupBy) IntsX(ctx context.Context) []int
- func (usgb *UserSessionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *UserSessionGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *UserSessionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserSessionGroupBy) StringX(ctx context.Context) string
- func (s *UserSessionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserSessionGroupBy) StringsX(ctx context.Context) []string
- type UserSessionMutation
- func (m *UserSessionMutation) Active() (r bool, exists bool)
- func (m *UserSessionMutation) AddField(name string, value ent.Value) error
- func (m *UserSessionMutation) AddedEdges() []string
- func (m *UserSessionMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserSessionMutation) AddedFields() []string
- func (m *UserSessionMutation) AddedIDs(name string) []ent.Value
- func (m *UserSessionMutation) ClearEdge(name string) error
- func (m *UserSessionMutation) ClearField(name string) error
- func (m *UserSessionMutation) ClearMeta()
- func (m *UserSessionMutation) ClearUser()
- func (m *UserSessionMutation) ClearedEdges() []string
- func (m *UserSessionMutation) ClearedFields() []string
- func (m UserSessionMutation) Client() *Client
- func (m *UserSessionMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserSessionMutation) EdgeCleared(name string) bool
- func (m *UserSessionMutation) Field(name string) (ent.Value, bool)
- func (m *UserSessionMutation) FieldCleared(name string) bool
- func (m *UserSessionMutation) Fields() []string
- func (m *UserSessionMutation) ID() (id int, exists bool)
- func (m *UserSessionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserSessionMutation) IP() (r string, exists bool)
- func (m *UserSessionMutation) LastActivity() (r time.Time, exists bool)
- func (m *UserSessionMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *UserSessionMutation) MetaCleared() bool
- func (m *UserSessionMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *UserSessionMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserSessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserSessionMutation) OldIP(ctx context.Context) (v string, err error)
- func (m *UserSessionMutation) OldLastActivity(ctx context.Context) (v time.Time, err error)
- func (m *UserSessionMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *UserSessionMutation) OldSid(ctx context.Context) (v string, err error)
- func (m *UserSessionMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserSessionMutation) OldUserAgent(ctx context.Context) (v string, err error)
- func (m *UserSessionMutation) Op() Op
- func (m *UserSessionMutation) RemovedEdges() []string
- func (m *UserSessionMutation) RemovedIDs(name string) []ent.Value
- func (m *UserSessionMutation) ResetActive()
- func (m *UserSessionMutation) ResetCreateTime()
- func (m *UserSessionMutation) ResetEdge(name string) error
- func (m *UserSessionMutation) ResetField(name string) error
- func (m *UserSessionMutation) ResetIP()
- func (m *UserSessionMutation) ResetLastActivity()
- func (m *UserSessionMutation) ResetMeta()
- func (m *UserSessionMutation) ResetSid()
- func (m *UserSessionMutation) ResetUpdateTime()
- func (m *UserSessionMutation) ResetUser()
- func (m *UserSessionMutation) ResetUserAgent()
- func (m *UserSessionMutation) SetActive(b bool)
- func (m *UserSessionMutation) SetCreateTime(t time.Time)
- func (m *UserSessionMutation) SetField(name string, value ent.Value) error
- func (m *UserSessionMutation) SetIP(s string)
- func (m *UserSessionMutation) SetLastActivity(t time.Time)
- func (m *UserSessionMutation) SetMeta(value map[string]interface{})
- func (m *UserSessionMutation) SetSid(s string)
- func (m *UserSessionMutation) SetUpdateTime(t time.Time)
- func (m *UserSessionMutation) SetUserAgent(s string)
- func (m *UserSessionMutation) SetUserID(id uuid.UUID)
- func (m *UserSessionMutation) Sid() (r string, exists bool)
- func (m UserSessionMutation) Tx() (*Tx, error)
- func (m *UserSessionMutation) Type() string
- func (m *UserSessionMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserSessionMutation) UserAgent() (r string, exists bool)
- func (m *UserSessionMutation) UserCleared() bool
- func (m *UserSessionMutation) UserID() (id uuid.UUID, exists bool)
- func (m *UserSessionMutation) UserIDs() (ids []uuid.UUID)
- func (m *UserSessionMutation) Where(ps ...predicate.UserSession)
- type UserSessionQuery
- func (usq *UserSessionQuery) All(ctx context.Context) ([]*UserSession, error)
- func (usq *UserSessionQuery) AllX(ctx context.Context) []*UserSession
- func (usq *UserSessionQuery) Clone() *UserSessionQuery
- func (usq *UserSessionQuery) Count(ctx context.Context) (int, error)
- func (usq *UserSessionQuery) CountX(ctx context.Context) int
- func (usq *UserSessionQuery) Exist(ctx context.Context) (bool, error)
- func (usq *UserSessionQuery) ExistX(ctx context.Context) bool
- func (usq *UserSessionQuery) First(ctx context.Context) (*UserSession, error)
- func (usq *UserSessionQuery) FirstID(ctx context.Context) (id int, err error)
- func (usq *UserSessionQuery) FirstIDX(ctx context.Context) int
- func (usq *UserSessionQuery) FirstX(ctx context.Context) *UserSession
- func (usq *UserSessionQuery) GroupBy(field string, fields ...string) *UserSessionGroupBy
- func (usq *UserSessionQuery) IDs(ctx context.Context) ([]int, error)
- func (usq *UserSessionQuery) IDsX(ctx context.Context) []int
- func (usq *UserSessionQuery) Limit(limit int) *UserSessionQuery
- func (usq *UserSessionQuery) Offset(offset int) *UserSessionQuery
- func (usq *UserSessionQuery) Only(ctx context.Context) (*UserSession, error)
- func (usq *UserSessionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (usq *UserSessionQuery) OnlyIDX(ctx context.Context) int
- func (usq *UserSessionQuery) OnlyX(ctx context.Context) *UserSession
- func (usq *UserSessionQuery) Order(o ...OrderFunc) *UserSessionQuery
- func (usq *UserSessionQuery) QueryUser() *UserQuery
- func (usq *UserSessionQuery) Select(fields ...string) *UserSessionSelect
- func (usq *UserSessionQuery) Unique(unique bool) *UserSessionQuery
- func (usq *UserSessionQuery) Where(ps ...predicate.UserSession) *UserSessionQuery
- func (usq *UserSessionQuery) WithUser(opts ...func(*UserQuery)) *UserSessionQuery
- type UserSessionSelect
- func (s *UserSessionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSessionSelect) BoolX(ctx context.Context) bool
- func (s *UserSessionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSessionSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSessionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSessionSelect) Float64X(ctx context.Context) float64
- func (s *UserSessionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSessionSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSessionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSessionSelect) IntX(ctx context.Context) int
- func (s *UserSessionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSessionSelect) IntsX(ctx context.Context) []int
- func (uss *UserSessionSelect) Scan(ctx context.Context, v interface{}) error
- func (s *UserSessionSelect) ScanX(ctx context.Context, v interface{})
- func (s *UserSessionSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSessionSelect) StringX(ctx context.Context) string
- func (s *UserSessionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSessionSelect) StringsX(ctx context.Context) []string
- type UserSessionUpdate
- func (usu *UserSessionUpdate) ClearMeta() *UserSessionUpdate
- func (usu *UserSessionUpdate) ClearUser() *UserSessionUpdate
- func (usu *UserSessionUpdate) Exec(ctx context.Context) error
- func (usu *UserSessionUpdate) ExecX(ctx context.Context)
- func (usu *UserSessionUpdate) Mutation() *UserSessionMutation
- func (usu *UserSessionUpdate) Save(ctx context.Context) (int, error)
- func (usu *UserSessionUpdate) SaveX(ctx context.Context) int
- func (usu *UserSessionUpdate) SetActive(b bool) *UserSessionUpdate
- func (usu *UserSessionUpdate) SetIP(s string) *UserSessionUpdate
- func (usu *UserSessionUpdate) SetLastActivity(t time.Time) *UserSessionUpdate
- func (usu *UserSessionUpdate) SetMeta(m map[string]interface{}) *UserSessionUpdate
- func (usu *UserSessionUpdate) SetNillableActive(b *bool) *UserSessionUpdate
- func (usu *UserSessionUpdate) SetNillableLastActivity(t *time.Time) *UserSessionUpdate
- func (usu *UserSessionUpdate) SetUpdateTime(t time.Time) *UserSessionUpdate
- func (usu *UserSessionUpdate) SetUser(u *User) *UserSessionUpdate
- func (usu *UserSessionUpdate) SetUserAgent(s string) *UserSessionUpdate
- func (usu *UserSessionUpdate) SetUserID(id uuid.UUID) *UserSessionUpdate
- func (usu *UserSessionUpdate) Where(ps ...predicate.UserSession) *UserSessionUpdate
- type UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) ClearMeta() *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) ClearUser() *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) Exec(ctx context.Context) error
- func (usuo *UserSessionUpdateOne) ExecX(ctx context.Context)
- func (usuo *UserSessionUpdateOne) Mutation() *UserSessionMutation
- func (usuo *UserSessionUpdateOne) Save(ctx context.Context) (*UserSession, error)
- func (usuo *UserSessionUpdateOne) SaveX(ctx context.Context) *UserSession
- func (usuo *UserSessionUpdateOne) Select(field string, fields ...string) *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) SetActive(b bool) *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) SetIP(s string) *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) SetLastActivity(t time.Time) *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) SetMeta(m map[string]interface{}) *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) SetNillableActive(b *bool) *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) SetNillableLastActivity(t *time.Time) *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) SetUpdateTime(t time.Time) *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) SetUser(u *User) *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) SetUserAgent(s string) *UserSessionUpdateOne
- func (usuo *UserSessionUpdateOne) SetUserID(id uuid.UUID) *UserSessionUpdateOne
- type UserSessions
- type UserUpdate
- func (uu *UserUpdate) AddAliasIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddAliases(u ...*User) *UserUpdate
- func (uu *UserUpdate) AddSessionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddSessions(u ...*UserSession) *UserUpdate
- func (uu *UserUpdate) AddTakeIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddTakes(t ...*Take) *UserUpdate
- func (uu *UserUpdate) ClearAliases() *UserUpdate
- func (uu *UserUpdate) ClearEmail() *UserUpdate
- func (uu *UserUpdate) ClearMeta() *UserUpdate
- func (uu *UserUpdate) ClearParent() *UserUpdate
- func (uu *UserUpdate) ClearPicture() *UserUpdate
- func (uu *UserUpdate) ClearSessions() *UserUpdate
- func (uu *UserUpdate) ClearTakes() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveAliasIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveAliases(u ...*User) *UserUpdate
- func (uu *UserUpdate) RemoveSessionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveSessions(u ...*UserSession) *UserUpdate
- func (uu *UserUpdate) RemoveTakeIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveTakes(t ...*Take) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAdmin(b bool) *UserUpdate
- func (uu *UserUpdate) SetAnonymous(b bool) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetMeta(m map[string]interface{}) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableAdmin(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableAnonymous(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableParentID(id *uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetNillablePicture(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableUseDarkTheme(b *bool) *UserUpdate
- func (uu *UserUpdate) SetParent(u *User) *UserUpdate
- func (uu *UserUpdate) SetParentID(id uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetPasswordHash(s string) *UserUpdate
- func (uu *UserUpdate) SetPicture(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUseDarkTheme(b bool) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddAliasIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddAliases(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSessionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSessions(u ...*UserSession) *UserUpdateOne
- func (uuo *UserUpdateOne) AddTakeIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddTakes(t ...*Take) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAliases() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMeta() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearParent() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPicture() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearSessions() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTakes() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveAliasIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveAliases(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSessionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSessions(u ...*UserSession) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveTakeIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveTakes(t ...*Take) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAdmin(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAnonymous(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetMeta(m map[string]interface{}) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAdmin(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAnonymous(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableParentID(id *uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePicture(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUseDarkTheme(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetParent(u *User) *UserUpdateOne
- func (uuo *UserUpdateOne) SetParentID(id uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPasswordHash(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPicture(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUseDarkTheme(b bool) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeInterpretation = "Interpretation" TypeInterpretationTranslation = "InterpretationTranslation" TypeItem = "Item" TypeItemTranslation = "ItemTranslation" TypeNorm = "Norm" TypeQuestion = "Question" TypeQuestionTranslation = "QuestionTranslation" TypeResponse = "Response" TypeResult = "Result" TypeSample = "Sample" TypeScale = "Scale" TypeScaleItem = "ScaleItem" TypeScaleTranslation = "ScaleTranslation" TypeTag = "Tag" TypeTagTranslation = "TagTranslation" TypeTake = "Take" TypeTest = "Test" TypeTestDisplay = "TestDisplay" TypeTestTranslation = "TestTranslation" TypeUser = "User" TypeUserSession = "UserSession" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Interpretation is the client for interacting with the Interpretation builders. Interpretation *InterpretationClient // InterpretationTranslation is the client for interacting with the InterpretationTranslation builders. InterpretationTranslation *InterpretationTranslationClient // Item is the client for interacting with the Item builders. Item *ItemClient // ItemTranslation is the client for interacting with the ItemTranslation builders. ItemTranslation *ItemTranslationClient // Norm is the client for interacting with the Norm builders. Norm *NormClient // Question is the client for interacting with the Question builders. Question *QuestionClient // QuestionTranslation is the client for interacting with the QuestionTranslation builders. QuestionTranslation *QuestionTranslationClient // Response is the client for interacting with the Response builders. Response *ResponseClient // Result is the client for interacting with the Result builders. Result *ResultClient // Sample is the client for interacting with the Sample builders. Sample *SampleClient // Scale is the client for interacting with the Scale builders. Scale *ScaleClient // ScaleItem is the client for interacting with the ScaleItem builders. ScaleItem *ScaleItemClient // ScaleTranslation is the client for interacting with the ScaleTranslation builders. ScaleTranslation *ScaleTranslationClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // TagTranslation is the client for interacting with the TagTranslation builders. TagTranslation *TagTranslationClient // Take is the client for interacting with the Take builders. Take *TakeClient // Test is the client for interacting with the Test builders. Test *TestClient // TestDisplay is the client for interacting with the TestDisplay builders. TestDisplay *TestDisplayClient // TestTranslation is the client for interacting with the TestTranslation builders. TestTranslation *TestTranslationClient // User is the client for interacting with the User builders. User *UserClient // UserSession is the client for interacting with the UserSession builders. UserSession *UserSessionClient // 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(). Interpretation. Query(). Count(ctx)
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 Interpretation ¶
type Interpretation struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Range holds the value of the "range" field. Range [2]float64 `json:"range,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the InterpretationQuery when eager-loading is set. Edges InterpretationEdges `json:"edges"` // contains filtered or unexported fields }
Interpretation is the model entity for the Interpretation schema.
func (*Interpretation) QueryScale ¶
func (i *Interpretation) QueryScale() *ScaleQuery
QueryScale queries the "scale" edge of the Interpretation entity.
func (*Interpretation) QueryTranslations ¶
func (i *Interpretation) QueryTranslations() *InterpretationTranslationQuery
QueryTranslations queries the "translations" edge of the Interpretation entity.
func (*Interpretation) String ¶
func (i *Interpretation) String() string
String implements the fmt.Stringer.
func (*Interpretation) Unwrap ¶
func (i *Interpretation) Unwrap() *Interpretation
Unwrap unwraps the Interpretation 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 (*Interpretation) Update ¶
func (i *Interpretation) Update() *InterpretationUpdateOne
Update returns a builder for updating this Interpretation. Note that you need to call Interpretation.Unwrap() before calling this method if this Interpretation was returned from a transaction, and the transaction was committed or rolled back.
type InterpretationClient ¶
type InterpretationClient struct {
// contains filtered or unexported fields
}
InterpretationClient is a client for the Interpretation schema.
func NewInterpretationClient ¶
func NewInterpretationClient(c config) *InterpretationClient
NewInterpretationClient returns a client for the Interpretation from the given config.
func (*InterpretationClient) Create ¶
func (c *InterpretationClient) Create() *InterpretationCreate
Create returns a builder for creating a Interpretation entity.
func (*InterpretationClient) CreateBulk ¶
func (c *InterpretationClient) CreateBulk(builders ...*InterpretationCreate) *InterpretationCreateBulk
CreateBulk returns a builder for creating a bulk of Interpretation entities.
func (*InterpretationClient) Delete ¶
func (c *InterpretationClient) Delete() *InterpretationDelete
Delete returns a delete builder for Interpretation.
func (*InterpretationClient) DeleteOne ¶
func (c *InterpretationClient) DeleteOne(i *Interpretation) *InterpretationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InterpretationClient) DeleteOneID ¶
func (c *InterpretationClient) DeleteOneID(id uuid.UUID) *InterpretationDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*InterpretationClient) Get ¶
func (c *InterpretationClient) Get(ctx context.Context, id uuid.UUID) (*Interpretation, error)
Get returns a Interpretation entity by its id.
func (*InterpretationClient) GetX ¶
func (c *InterpretationClient) GetX(ctx context.Context, id uuid.UUID) *Interpretation
GetX is like Get, but panics if an error occurs.
func (*InterpretationClient) Hooks ¶
func (c *InterpretationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InterpretationClient) Query ¶
func (c *InterpretationClient) Query() *InterpretationQuery
Query returns a query builder for Interpretation.
func (*InterpretationClient) QueryScale ¶
func (c *InterpretationClient) QueryScale(i *Interpretation) *ScaleQuery
QueryScale queries the scale edge of a Interpretation.
func (*InterpretationClient) QueryTranslations ¶
func (c *InterpretationClient) QueryTranslations(i *Interpretation) *InterpretationTranslationQuery
QueryTranslations queries the translations edge of a Interpretation.
func (*InterpretationClient) Update ¶
func (c *InterpretationClient) Update() *InterpretationUpdate
Update returns an update builder for Interpretation.
func (*InterpretationClient) UpdateOne ¶
func (c *InterpretationClient) UpdateOne(i *Interpretation) *InterpretationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InterpretationClient) UpdateOneID ¶
func (c *InterpretationClient) UpdateOneID(id uuid.UUID) *InterpretationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InterpretationClient) Use ¶
func (c *InterpretationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `interpretation.Hooks(f(g(h())))`.
type InterpretationCreate ¶
type InterpretationCreate struct {
// contains filtered or unexported fields
}
InterpretationCreate is the builder for creating a Interpretation entity.
func (*InterpretationCreate) AddTranslationIDs ¶
func (ic *InterpretationCreate) AddTranslationIDs(ids ...uuid.UUID) *InterpretationCreate
AddTranslationIDs adds the "translations" edge to the InterpretationTranslation entity by IDs.
func (*InterpretationCreate) AddTranslations ¶
func (ic *InterpretationCreate) AddTranslations(i ...*InterpretationTranslation) *InterpretationCreate
AddTranslations adds the "translations" edges to the InterpretationTranslation entity.
func (*InterpretationCreate) Exec ¶
func (ic *InterpretationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InterpretationCreate) ExecX ¶
func (ic *InterpretationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InterpretationCreate) Mutation ¶
func (ic *InterpretationCreate) Mutation() *InterpretationMutation
Mutation returns the InterpretationMutation object of the builder.
func (*InterpretationCreate) Save ¶
func (ic *InterpretationCreate) Save(ctx context.Context) (*Interpretation, error)
Save creates the Interpretation in the database.
func (*InterpretationCreate) SaveX ¶
func (ic *InterpretationCreate) SaveX(ctx context.Context) *Interpretation
SaveX calls Save and panics if Save returns an error.
func (*InterpretationCreate) SetCreateTime ¶
func (ic *InterpretationCreate) SetCreateTime(t time.Time) *InterpretationCreate
SetCreateTime sets the "create_time" field.
func (*InterpretationCreate) SetID ¶
func (ic *InterpretationCreate) SetID(u uuid.UUID) *InterpretationCreate
SetID sets the "id" field.
func (*InterpretationCreate) SetNillableCreateTime ¶
func (ic *InterpretationCreate) SetNillableCreateTime(t *time.Time) *InterpretationCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*InterpretationCreate) SetNillableID ¶
func (ic *InterpretationCreate) SetNillableID(u *uuid.UUID) *InterpretationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*InterpretationCreate) SetNillableScaleID ¶
func (ic *InterpretationCreate) SetNillableScaleID(id *uuid.UUID) *InterpretationCreate
SetNillableScaleID sets the "scale" edge to the Scale entity by ID if the given value is not nil.
func (*InterpretationCreate) SetNillableUpdateTime ¶
func (ic *InterpretationCreate) SetNillableUpdateTime(t *time.Time) *InterpretationCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*InterpretationCreate) SetRange ¶
func (ic *InterpretationCreate) SetRange(f [2]float64) *InterpretationCreate
SetRange sets the "range" field.
func (*InterpretationCreate) SetScale ¶
func (ic *InterpretationCreate) SetScale(s *Scale) *InterpretationCreate
SetScale sets the "scale" edge to the Scale entity.
func (*InterpretationCreate) SetScaleID ¶
func (ic *InterpretationCreate) SetScaleID(id uuid.UUID) *InterpretationCreate
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*InterpretationCreate) SetUpdateTime ¶
func (ic *InterpretationCreate) SetUpdateTime(t time.Time) *InterpretationCreate
SetUpdateTime sets the "update_time" field.
type InterpretationCreateBulk ¶
type InterpretationCreateBulk struct {
// contains filtered or unexported fields
}
InterpretationCreateBulk is the builder for creating many Interpretation entities in bulk.
func (*InterpretationCreateBulk) Exec ¶
func (icb *InterpretationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InterpretationCreateBulk) ExecX ¶
func (icb *InterpretationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InterpretationCreateBulk) Save ¶
func (icb *InterpretationCreateBulk) Save(ctx context.Context) ([]*Interpretation, error)
Save creates the Interpretation entities in the database.
func (*InterpretationCreateBulk) SaveX ¶
func (icb *InterpretationCreateBulk) SaveX(ctx context.Context) []*Interpretation
SaveX is like Save, but panics if an error occurs.
type InterpretationDelete ¶
type InterpretationDelete struct {
// contains filtered or unexported fields
}
InterpretationDelete is the builder for deleting a Interpretation entity.
func (*InterpretationDelete) Exec ¶
func (id *InterpretationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InterpretationDelete) ExecX ¶
func (id *InterpretationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InterpretationDelete) Where ¶
func (id *InterpretationDelete) Where(ps ...predicate.Interpretation) *InterpretationDelete
Where appends a list predicates to the InterpretationDelete builder.
type InterpretationDeleteOne ¶
type InterpretationDeleteOne struct {
// contains filtered or unexported fields
}
InterpretationDeleteOne is the builder for deleting a single Interpretation entity.
func (*InterpretationDeleteOne) Exec ¶
func (ido *InterpretationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InterpretationDeleteOne) ExecX ¶
func (ido *InterpretationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type InterpretationEdges ¶
type InterpretationEdges struct { // Translations holds the value of the translations edge. Translations []*InterpretationTranslation `json:"translations,omitempty"` // Scale holds the value of the scale edge. Scale *Scale `json:"scale,omitempty"` // contains filtered or unexported fields }
InterpretationEdges holds the relations/edges for other nodes in the graph.
func (InterpretationEdges) ScaleOrErr ¶
func (e InterpretationEdges) ScaleOrErr() (*Scale, error)
ScaleOrErr returns the Scale value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (InterpretationEdges) TranslationsOrErr ¶
func (e InterpretationEdges) TranslationsOrErr() ([]*InterpretationTranslation, error)
TranslationsOrErr returns the Translations value or an error if the edge was not loaded in eager-loading.
type InterpretationGroupBy ¶
type InterpretationGroupBy struct {
// contains filtered or unexported fields
}
InterpretationGroupBy is the group-by builder for Interpretation entities.
func (*InterpretationGroupBy) Aggregate ¶
func (igb *InterpretationGroupBy) Aggregate(fns ...AggregateFunc) *InterpretationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InterpretationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InterpretationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InterpretationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InterpretationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InterpretationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*InterpretationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InterpretationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InterpretationGroupBy) Scan ¶
func (igb *InterpretationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*InterpretationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InterpretationMutation ¶
type InterpretationMutation struct {
// contains filtered or unexported fields
}
InterpretationMutation represents an operation that mutates the Interpretation nodes in the graph.
func (*InterpretationMutation) AddField ¶
func (m *InterpretationMutation) 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 (*InterpretationMutation) AddTranslationIDs ¶
func (m *InterpretationMutation) AddTranslationIDs(ids ...uuid.UUID)
AddTranslationIDs adds the "translations" edge to the InterpretationTranslation entity by ids.
func (*InterpretationMutation) AddedEdges ¶
func (m *InterpretationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InterpretationMutation) AddedField ¶
func (m *InterpretationMutation) 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 (*InterpretationMutation) AddedFields ¶
func (m *InterpretationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InterpretationMutation) AddedIDs ¶
func (m *InterpretationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InterpretationMutation) ClearEdge ¶
func (m *InterpretationMutation) 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 (*InterpretationMutation) ClearField ¶
func (m *InterpretationMutation) 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 (*InterpretationMutation) ClearScale ¶
func (m *InterpretationMutation) ClearScale()
ClearScale clears the "scale" edge to the Scale entity.
func (*InterpretationMutation) ClearTranslations ¶
func (m *InterpretationMutation) ClearTranslations()
ClearTranslations clears the "translations" edge to the InterpretationTranslation entity.
func (*InterpretationMutation) ClearedEdges ¶
func (m *InterpretationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InterpretationMutation) ClearedFields ¶
func (m *InterpretationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InterpretationMutation) Client ¶
func (m InterpretationMutation) 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 (*InterpretationMutation) CreateTime ¶
func (m *InterpretationMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*InterpretationMutation) EdgeCleared ¶
func (m *InterpretationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InterpretationMutation) Field ¶
func (m *InterpretationMutation) 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 (*InterpretationMutation) FieldCleared ¶
func (m *InterpretationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InterpretationMutation) Fields ¶
func (m *InterpretationMutation) 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 (*InterpretationMutation) ID ¶
func (m *InterpretationMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*InterpretationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*InterpretationMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Interpretation entity. If the Interpretation 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 (*InterpretationMutation) 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 (*InterpretationMutation) OldRange ¶
func (m *InterpretationMutation) OldRange(ctx context.Context) (v [2]float64, err error)
OldRange returns the old "range" field's value of the Interpretation entity. If the Interpretation 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 (*InterpretationMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Interpretation entity. If the Interpretation 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 (*InterpretationMutation) Op ¶
func (m *InterpretationMutation) Op() Op
Op returns the operation name.
func (*InterpretationMutation) Range ¶
func (m *InterpretationMutation) Range() (r [2]float64, exists bool)
Range returns the value of the "range" field in the mutation.
func (*InterpretationMutation) RemoveTranslationIDs ¶
func (m *InterpretationMutation) RemoveTranslationIDs(ids ...uuid.UUID)
RemoveTranslationIDs removes the "translations" edge to the InterpretationTranslation entity by IDs.
func (*InterpretationMutation) RemovedEdges ¶
func (m *InterpretationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InterpretationMutation) RemovedIDs ¶
func (m *InterpretationMutation) 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 (*InterpretationMutation) RemovedTranslationsIDs ¶
func (m *InterpretationMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
RemovedTranslations returns the removed IDs of the "translations" edge to the InterpretationTranslation entity.
func (*InterpretationMutation) ResetCreateTime ¶
func (m *InterpretationMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*InterpretationMutation) ResetEdge ¶
func (m *InterpretationMutation) 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 (*InterpretationMutation) ResetField ¶
func (m *InterpretationMutation) 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 (*InterpretationMutation) ResetRange ¶
func (m *InterpretationMutation) ResetRange()
ResetRange resets all changes to the "range" field.
func (*InterpretationMutation) ResetScale ¶
func (m *InterpretationMutation) ResetScale()
ResetScale resets all changes to the "scale" edge.
func (*InterpretationMutation) ResetTranslations ¶
func (m *InterpretationMutation) ResetTranslations()
ResetTranslations resets all changes to the "translations" edge.
func (*InterpretationMutation) ResetUpdateTime ¶
func (m *InterpretationMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*InterpretationMutation) ScaleCleared ¶
func (m *InterpretationMutation) ScaleCleared() bool
ScaleCleared reports if the "scale" edge to the Scale entity was cleared.
func (*InterpretationMutation) ScaleID ¶
func (m *InterpretationMutation) ScaleID() (id uuid.UUID, exists bool)
ScaleID returns the "scale" edge ID in the mutation.
func (*InterpretationMutation) ScaleIDs ¶
func (m *InterpretationMutation) ScaleIDs() (ids []uuid.UUID)
ScaleIDs returns the "scale" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ScaleID instead. It exists only for internal usage by the builders.
func (*InterpretationMutation) SetCreateTime ¶
func (m *InterpretationMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*InterpretationMutation) SetField ¶
func (m *InterpretationMutation) 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 (*InterpretationMutation) SetID ¶
func (m *InterpretationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Interpretation entities.
func (*InterpretationMutation) SetRange ¶
func (m *InterpretationMutation) SetRange(f [2]float64)
SetRange sets the "range" field.
func (*InterpretationMutation) SetScaleID ¶
func (m *InterpretationMutation) SetScaleID(id uuid.UUID)
SetScaleID sets the "scale" edge to the Scale entity by id.
func (*InterpretationMutation) SetUpdateTime ¶
func (m *InterpretationMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*InterpretationMutation) TranslationsCleared ¶
func (m *InterpretationMutation) TranslationsCleared() bool
TranslationsCleared reports if the "translations" edge to the InterpretationTranslation entity was cleared.
func (*InterpretationMutation) TranslationsIDs ¶
func (m *InterpretationMutation) TranslationsIDs() (ids []uuid.UUID)
TranslationsIDs returns the "translations" edge IDs in the mutation.
func (InterpretationMutation) Tx ¶
func (m InterpretationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InterpretationMutation) Type ¶
func (m *InterpretationMutation) Type() string
Type returns the node type of this mutation (Interpretation).
func (*InterpretationMutation) UpdateTime ¶
func (m *InterpretationMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*InterpretationMutation) Where ¶
func (m *InterpretationMutation) Where(ps ...predicate.Interpretation)
Where appends a list predicates to the InterpretationMutation builder.
type InterpretationQuery ¶
type InterpretationQuery struct {
// contains filtered or unexported fields
}
InterpretationQuery is the builder for querying Interpretation entities.
func (*InterpretationQuery) All ¶
func (iq *InterpretationQuery) All(ctx context.Context) ([]*Interpretation, error)
All executes the query and returns a list of Interpretations.
func (*InterpretationQuery) AllX ¶
func (iq *InterpretationQuery) AllX(ctx context.Context) []*Interpretation
AllX is like All, but panics if an error occurs.
func (*InterpretationQuery) Clone ¶
func (iq *InterpretationQuery) Clone() *InterpretationQuery
Clone returns a duplicate of the InterpretationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InterpretationQuery) Count ¶
func (iq *InterpretationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InterpretationQuery) CountX ¶
func (iq *InterpretationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InterpretationQuery) Exist ¶
func (iq *InterpretationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InterpretationQuery) ExistX ¶
func (iq *InterpretationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InterpretationQuery) First ¶
func (iq *InterpretationQuery) First(ctx context.Context) (*Interpretation, error)
First returns the first Interpretation entity from the query. Returns a *NotFoundError when no Interpretation was found.
func (*InterpretationQuery) FirstID ¶
FirstID returns the first Interpretation ID from the query. Returns a *NotFoundError when no Interpretation ID was found.
func (*InterpretationQuery) FirstIDX ¶
func (iq *InterpretationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*InterpretationQuery) FirstX ¶
func (iq *InterpretationQuery) FirstX(ctx context.Context) *Interpretation
FirstX is like First, but panics if an error occurs.
func (*InterpretationQuery) GroupBy ¶
func (iq *InterpretationQuery) GroupBy(field string, fields ...string) *InterpretationGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Interpretation.Query(). GroupBy(interpretation.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InterpretationQuery) IDsX ¶
func (iq *InterpretationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*InterpretationQuery) Limit ¶
func (iq *InterpretationQuery) Limit(limit int) *InterpretationQuery
Limit adds a limit step to the query.
func (*InterpretationQuery) Offset ¶
func (iq *InterpretationQuery) Offset(offset int) *InterpretationQuery
Offset adds an offset step to the query.
func (*InterpretationQuery) Only ¶
func (iq *InterpretationQuery) Only(ctx context.Context) (*Interpretation, error)
Only returns a single Interpretation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Interpretation entity is found. Returns a *NotFoundError when no Interpretation entities are found.
func (*InterpretationQuery) OnlyID ¶
OnlyID is like Only, but returns the only Interpretation ID in the query. Returns a *NotSingularError when more than one Interpretation ID is found. Returns a *NotFoundError when no entities are found.
func (*InterpretationQuery) OnlyIDX ¶
func (iq *InterpretationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InterpretationQuery) OnlyX ¶
func (iq *InterpretationQuery) OnlyX(ctx context.Context) *Interpretation
OnlyX is like Only, but panics if an error occurs.
func (*InterpretationQuery) Order ¶
func (iq *InterpretationQuery) Order(o ...OrderFunc) *InterpretationQuery
Order adds an order step to the query.
func (*InterpretationQuery) QueryScale ¶
func (iq *InterpretationQuery) QueryScale() *ScaleQuery
QueryScale chains the current query on the "scale" edge.
func (*InterpretationQuery) QueryTranslations ¶
func (iq *InterpretationQuery) QueryTranslations() *InterpretationTranslationQuery
QueryTranslations chains the current query on the "translations" edge.
func (*InterpretationQuery) Select ¶
func (iq *InterpretationQuery) Select(fields ...string) *InterpretationSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Interpretation.Query(). Select(interpretation.FieldCreateTime). Scan(ctx, &v)
func (*InterpretationQuery) Unique ¶
func (iq *InterpretationQuery) Unique(unique bool) *InterpretationQuery
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 (*InterpretationQuery) Where ¶
func (iq *InterpretationQuery) Where(ps ...predicate.Interpretation) *InterpretationQuery
Where adds a new predicate for the InterpretationQuery builder.
func (*InterpretationQuery) WithScale ¶
func (iq *InterpretationQuery) WithScale(opts ...func(*ScaleQuery)) *InterpretationQuery
WithScale tells the query-builder to eager-load the nodes that are connected to the "scale" edge. The optional arguments are used to configure the query builder of the edge.
func (*InterpretationQuery) WithTranslations ¶
func (iq *InterpretationQuery) WithTranslations(opts ...func(*InterpretationTranslationQuery)) *InterpretationQuery
WithTranslations tells the query-builder to eager-load the nodes that are connected to the "translations" edge. The optional arguments are used to configure the query builder of the edge.
type InterpretationSelect ¶
type InterpretationSelect struct { *InterpretationQuery // contains filtered or unexported fields }
InterpretationSelect is the builder for selecting fields of Interpretation entities.
func (*InterpretationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InterpretationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InterpretationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InterpretationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InterpretationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InterpretationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InterpretationSelect) Scan ¶
func (is *InterpretationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*InterpretationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InterpretationTranslation ¶
type InterpretationTranslation struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Locale holds the value of the "locale" field. Locale interpretationtranslation.Locale `json:"locale,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the InterpretationTranslationQuery when eager-loading is set. Edges InterpretationTranslationEdges `json:"edges"` // contains filtered or unexported fields }
InterpretationTranslation is the model entity for the InterpretationTranslation schema.
func (*InterpretationTranslation) QueryInterpretation ¶
func (it *InterpretationTranslation) QueryInterpretation() *InterpretationQuery
QueryInterpretation queries the "interpretation" edge of the InterpretationTranslation entity.
func (*InterpretationTranslation) String ¶
func (it *InterpretationTranslation) String() string
String implements the fmt.Stringer.
func (*InterpretationTranslation) Unwrap ¶
func (it *InterpretationTranslation) Unwrap() *InterpretationTranslation
Unwrap unwraps the InterpretationTranslation 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 (*InterpretationTranslation) Update ¶
func (it *InterpretationTranslation) Update() *InterpretationTranslationUpdateOne
Update returns a builder for updating this InterpretationTranslation. Note that you need to call InterpretationTranslation.Unwrap() before calling this method if this InterpretationTranslation was returned from a transaction, and the transaction was committed or rolled back.
type InterpretationTranslationClient ¶
type InterpretationTranslationClient struct {
// contains filtered or unexported fields
}
InterpretationTranslationClient is a client for the InterpretationTranslation schema.
func NewInterpretationTranslationClient ¶
func NewInterpretationTranslationClient(c config) *InterpretationTranslationClient
NewInterpretationTranslationClient returns a client for the InterpretationTranslation from the given config.
func (*InterpretationTranslationClient) Create ¶
func (c *InterpretationTranslationClient) Create() *InterpretationTranslationCreate
Create returns a builder for creating a InterpretationTranslation entity.
func (*InterpretationTranslationClient) CreateBulk ¶
func (c *InterpretationTranslationClient) CreateBulk(builders ...*InterpretationTranslationCreate) *InterpretationTranslationCreateBulk
CreateBulk returns a builder for creating a bulk of InterpretationTranslation entities.
func (*InterpretationTranslationClient) Delete ¶
func (c *InterpretationTranslationClient) Delete() *InterpretationTranslationDelete
Delete returns a delete builder for InterpretationTranslation.
func (*InterpretationTranslationClient) DeleteOne ¶
func (c *InterpretationTranslationClient) DeleteOne(it *InterpretationTranslation) *InterpretationTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InterpretationTranslationClient) DeleteOneID ¶
func (c *InterpretationTranslationClient) DeleteOneID(id uuid.UUID) *InterpretationTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*InterpretationTranslationClient) Get ¶
func (c *InterpretationTranslationClient) Get(ctx context.Context, id uuid.UUID) (*InterpretationTranslation, error)
Get returns a InterpretationTranslation entity by its id.
func (*InterpretationTranslationClient) GetX ¶
func (c *InterpretationTranslationClient) GetX(ctx context.Context, id uuid.UUID) *InterpretationTranslation
GetX is like Get, but panics if an error occurs.
func (*InterpretationTranslationClient) Hooks ¶
func (c *InterpretationTranslationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InterpretationTranslationClient) Query ¶
func (c *InterpretationTranslationClient) Query() *InterpretationTranslationQuery
Query returns a query builder for InterpretationTranslation.
func (*InterpretationTranslationClient) QueryInterpretation ¶
func (c *InterpretationTranslationClient) QueryInterpretation(it *InterpretationTranslation) *InterpretationQuery
QueryInterpretation queries the interpretation edge of a InterpretationTranslation.
func (*InterpretationTranslationClient) Update ¶
func (c *InterpretationTranslationClient) Update() *InterpretationTranslationUpdate
Update returns an update builder for InterpretationTranslation.
func (*InterpretationTranslationClient) UpdateOne ¶
func (c *InterpretationTranslationClient) UpdateOne(it *InterpretationTranslation) *InterpretationTranslationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InterpretationTranslationClient) UpdateOneID ¶
func (c *InterpretationTranslationClient) UpdateOneID(id uuid.UUID) *InterpretationTranslationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InterpretationTranslationClient) Use ¶
func (c *InterpretationTranslationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `interpretationtranslation.Hooks(f(g(h())))`.
type InterpretationTranslationCreate ¶
type InterpretationTranslationCreate struct {
// contains filtered or unexported fields
}
InterpretationTranslationCreate is the builder for creating a InterpretationTranslation entity.
func (*InterpretationTranslationCreate) Exec ¶
func (itc *InterpretationTranslationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InterpretationTranslationCreate) ExecX ¶
func (itc *InterpretationTranslationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InterpretationTranslationCreate) Mutation ¶
func (itc *InterpretationTranslationCreate) Mutation() *InterpretationTranslationMutation
Mutation returns the InterpretationTranslationMutation object of the builder.
func (*InterpretationTranslationCreate) Save ¶
func (itc *InterpretationTranslationCreate) Save(ctx context.Context) (*InterpretationTranslation, error)
Save creates the InterpretationTranslation in the database.
func (*InterpretationTranslationCreate) SaveX ¶
func (itc *InterpretationTranslationCreate) SaveX(ctx context.Context) *InterpretationTranslation
SaveX calls Save and panics if Save returns an error.
func (*InterpretationTranslationCreate) SetContent ¶
func (itc *InterpretationTranslationCreate) SetContent(s string) *InterpretationTranslationCreate
SetContent sets the "content" field.
func (*InterpretationTranslationCreate) SetID ¶
func (itc *InterpretationTranslationCreate) SetID(u uuid.UUID) *InterpretationTranslationCreate
SetID sets the "id" field.
func (*InterpretationTranslationCreate) SetInterpretation ¶
func (itc *InterpretationTranslationCreate) SetInterpretation(i *Interpretation) *InterpretationTranslationCreate
SetInterpretation sets the "interpretation" edge to the Interpretation entity.
func (*InterpretationTranslationCreate) SetInterpretationID ¶
func (itc *InterpretationTranslationCreate) SetInterpretationID(id uuid.UUID) *InterpretationTranslationCreate
SetInterpretationID sets the "interpretation" edge to the Interpretation entity by ID.
func (*InterpretationTranslationCreate) SetLocale ¶
func (itc *InterpretationTranslationCreate) SetLocale(i interpretationtranslation.Locale) *InterpretationTranslationCreate
SetLocale sets the "locale" field.
func (*InterpretationTranslationCreate) SetNillableID ¶
func (itc *InterpretationTranslationCreate) SetNillableID(u *uuid.UUID) *InterpretationTranslationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*InterpretationTranslationCreate) SetNillableInterpretationID ¶
func (itc *InterpretationTranslationCreate) SetNillableInterpretationID(id *uuid.UUID) *InterpretationTranslationCreate
SetNillableInterpretationID sets the "interpretation" edge to the Interpretation entity by ID if the given value is not nil.
type InterpretationTranslationCreateBulk ¶
type InterpretationTranslationCreateBulk struct {
// contains filtered or unexported fields
}
InterpretationTranslationCreateBulk is the builder for creating many InterpretationTranslation entities in bulk.
func (*InterpretationTranslationCreateBulk) Exec ¶
func (itcb *InterpretationTranslationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InterpretationTranslationCreateBulk) ExecX ¶
func (itcb *InterpretationTranslationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InterpretationTranslationCreateBulk) Save ¶
func (itcb *InterpretationTranslationCreateBulk) Save(ctx context.Context) ([]*InterpretationTranslation, error)
Save creates the InterpretationTranslation entities in the database.
func (*InterpretationTranslationCreateBulk) SaveX ¶
func (itcb *InterpretationTranslationCreateBulk) SaveX(ctx context.Context) []*InterpretationTranslation
SaveX is like Save, but panics if an error occurs.
type InterpretationTranslationDelete ¶
type InterpretationTranslationDelete struct {
// contains filtered or unexported fields
}
InterpretationTranslationDelete is the builder for deleting a InterpretationTranslation entity.
func (*InterpretationTranslationDelete) Exec ¶
func (itd *InterpretationTranslationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InterpretationTranslationDelete) ExecX ¶
func (itd *InterpretationTranslationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InterpretationTranslationDelete) Where ¶
func (itd *InterpretationTranslationDelete) Where(ps ...predicate.InterpretationTranslation) *InterpretationTranslationDelete
Where appends a list predicates to the InterpretationTranslationDelete builder.
type InterpretationTranslationDeleteOne ¶
type InterpretationTranslationDeleteOne struct {
// contains filtered or unexported fields
}
InterpretationTranslationDeleteOne is the builder for deleting a single InterpretationTranslation entity.
func (*InterpretationTranslationDeleteOne) Exec ¶
func (itdo *InterpretationTranslationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InterpretationTranslationDeleteOne) ExecX ¶
func (itdo *InterpretationTranslationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type InterpretationTranslationEdges ¶
type InterpretationTranslationEdges struct { // Interpretation holds the value of the interpretation edge. Interpretation *Interpretation `json:"interpretation,omitempty"` // contains filtered or unexported fields }
InterpretationTranslationEdges holds the relations/edges for other nodes in the graph.
func (InterpretationTranslationEdges) InterpretationOrErr ¶
func (e InterpretationTranslationEdges) InterpretationOrErr() (*Interpretation, error)
InterpretationOrErr returns the Interpretation value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type InterpretationTranslationGroupBy ¶
type InterpretationTranslationGroupBy struct {
// contains filtered or unexported fields
}
InterpretationTranslationGroupBy is the group-by builder for InterpretationTranslation entities.
func (*InterpretationTranslationGroupBy) Aggregate ¶
func (itgb *InterpretationTranslationGroupBy) Aggregate(fns ...AggregateFunc) *InterpretationTranslationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InterpretationTranslationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationGroupBy) BoolsX ¶
BoolsX is like Bools, but panics if an error occurs.
func (*InterpretationTranslationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*InterpretationTranslationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*InterpretationTranslationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationGroupBy) Scan ¶
func (itgb *InterpretationTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*InterpretationTranslationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationGroupBy) StringX ¶
StringX is like String, but panics if an error occurs.
type InterpretationTranslationMutation ¶
type InterpretationTranslationMutation struct {
// contains filtered or unexported fields
}
InterpretationTranslationMutation represents an operation that mutates the InterpretationTranslation nodes in the graph.
func (*InterpretationTranslationMutation) AddField ¶
func (m *InterpretationTranslationMutation) 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 (*InterpretationTranslationMutation) AddedEdges ¶
func (m *InterpretationTranslationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InterpretationTranslationMutation) AddedField ¶
func (m *InterpretationTranslationMutation) 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 (*InterpretationTranslationMutation) AddedFields ¶
func (m *InterpretationTranslationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InterpretationTranslationMutation) AddedIDs ¶
func (m *InterpretationTranslationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InterpretationTranslationMutation) ClearEdge ¶
func (m *InterpretationTranslationMutation) 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 (*InterpretationTranslationMutation) ClearField ¶
func (m *InterpretationTranslationMutation) 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 (*InterpretationTranslationMutation) ClearInterpretation ¶
func (m *InterpretationTranslationMutation) ClearInterpretation()
ClearInterpretation clears the "interpretation" edge to the Interpretation entity.
func (*InterpretationTranslationMutation) ClearedEdges ¶
func (m *InterpretationTranslationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InterpretationTranslationMutation) ClearedFields ¶
func (m *InterpretationTranslationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InterpretationTranslationMutation) Client ¶
func (m InterpretationTranslationMutation) 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 (*InterpretationTranslationMutation) Content ¶
func (m *InterpretationTranslationMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*InterpretationTranslationMutation) EdgeCleared ¶
func (m *InterpretationTranslationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InterpretationTranslationMutation) Field ¶
func (m *InterpretationTranslationMutation) 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 (*InterpretationTranslationMutation) FieldCleared ¶
func (m *InterpretationTranslationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InterpretationTranslationMutation) Fields ¶
func (m *InterpretationTranslationMutation) 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 (*InterpretationTranslationMutation) ID ¶
func (m *InterpretationTranslationMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*InterpretationTranslationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*InterpretationTranslationMutation) InterpretationCleared ¶
func (m *InterpretationTranslationMutation) InterpretationCleared() bool
InterpretationCleared reports if the "interpretation" edge to the Interpretation entity was cleared.
func (*InterpretationTranslationMutation) InterpretationID ¶
func (m *InterpretationTranslationMutation) InterpretationID() (id uuid.UUID, exists bool)
InterpretationID returns the "interpretation" edge ID in the mutation.
func (*InterpretationTranslationMutation) InterpretationIDs ¶
func (m *InterpretationTranslationMutation) InterpretationIDs() (ids []uuid.UUID)
InterpretationIDs returns the "interpretation" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InterpretationID instead. It exists only for internal usage by the builders.
func (*InterpretationTranslationMutation) Locale ¶
func (m *InterpretationTranslationMutation) Locale() (r interpretationtranslation.Locale, exists bool)
Locale returns the value of the "locale" field in the mutation.
func (*InterpretationTranslationMutation) OldContent ¶
func (m *InterpretationTranslationMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the InterpretationTranslation entity. If the InterpretationTranslation 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 (*InterpretationTranslationMutation) OldField ¶
func (m *InterpretationTranslationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
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 (*InterpretationTranslationMutation) OldLocale ¶
func (m *InterpretationTranslationMutation) OldLocale(ctx context.Context) (v interpretationtranslation.Locale, err error)
OldLocale returns the old "locale" field's value of the InterpretationTranslation entity. If the InterpretationTranslation 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 (*InterpretationTranslationMutation) Op ¶
func (m *InterpretationTranslationMutation) Op() Op
Op returns the operation name.
func (*InterpretationTranslationMutation) RemovedEdges ¶
func (m *InterpretationTranslationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InterpretationTranslationMutation) RemovedIDs ¶
func (m *InterpretationTranslationMutation) 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 (*InterpretationTranslationMutation) ResetContent ¶
func (m *InterpretationTranslationMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*InterpretationTranslationMutation) ResetEdge ¶
func (m *InterpretationTranslationMutation) 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 (*InterpretationTranslationMutation) ResetField ¶
func (m *InterpretationTranslationMutation) 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 (*InterpretationTranslationMutation) ResetInterpretation ¶
func (m *InterpretationTranslationMutation) ResetInterpretation()
ResetInterpretation resets all changes to the "interpretation" edge.
func (*InterpretationTranslationMutation) ResetLocale ¶
func (m *InterpretationTranslationMutation) ResetLocale()
ResetLocale resets all changes to the "locale" field.
func (*InterpretationTranslationMutation) SetContent ¶
func (m *InterpretationTranslationMutation) SetContent(s string)
SetContent sets the "content" field.
func (*InterpretationTranslationMutation) SetField ¶
func (m *InterpretationTranslationMutation) 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 (*InterpretationTranslationMutation) SetID ¶
func (m *InterpretationTranslationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of InterpretationTranslation entities.
func (*InterpretationTranslationMutation) SetInterpretationID ¶
func (m *InterpretationTranslationMutation) SetInterpretationID(id uuid.UUID)
SetInterpretationID sets the "interpretation" edge to the Interpretation entity by id.
func (*InterpretationTranslationMutation) SetLocale ¶
func (m *InterpretationTranslationMutation) SetLocale(i interpretationtranslation.Locale)
SetLocale sets the "locale" field.
func (InterpretationTranslationMutation) Tx ¶
func (m InterpretationTranslationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InterpretationTranslationMutation) Type ¶
func (m *InterpretationTranslationMutation) Type() string
Type returns the node type of this mutation (InterpretationTranslation).
func (*InterpretationTranslationMutation) Where ¶
func (m *InterpretationTranslationMutation) Where(ps ...predicate.InterpretationTranslation)
Where appends a list predicates to the InterpretationTranslationMutation builder.
type InterpretationTranslationQuery ¶
type InterpretationTranslationQuery struct {
// contains filtered or unexported fields
}
InterpretationTranslationQuery is the builder for querying InterpretationTranslation entities.
func (*InterpretationTranslationQuery) All ¶
func (itq *InterpretationTranslationQuery) All(ctx context.Context) ([]*InterpretationTranslation, error)
All executes the query and returns a list of InterpretationTranslations.
func (*InterpretationTranslationQuery) AllX ¶
func (itq *InterpretationTranslationQuery) AllX(ctx context.Context) []*InterpretationTranslation
AllX is like All, but panics if an error occurs.
func (*InterpretationTranslationQuery) Clone ¶
func (itq *InterpretationTranslationQuery) Clone() *InterpretationTranslationQuery
Clone returns a duplicate of the InterpretationTranslationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InterpretationTranslationQuery) Count ¶
func (itq *InterpretationTranslationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InterpretationTranslationQuery) CountX ¶
func (itq *InterpretationTranslationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InterpretationTranslationQuery) Exist ¶
func (itq *InterpretationTranslationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InterpretationTranslationQuery) ExistX ¶
func (itq *InterpretationTranslationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InterpretationTranslationQuery) First ¶
func (itq *InterpretationTranslationQuery) First(ctx context.Context) (*InterpretationTranslation, error)
First returns the first InterpretationTranslation entity from the query. Returns a *NotFoundError when no InterpretationTranslation was found.
func (*InterpretationTranslationQuery) FirstID ¶
FirstID returns the first InterpretationTranslation ID from the query. Returns a *NotFoundError when no InterpretationTranslation ID was found.
func (*InterpretationTranslationQuery) FirstIDX ¶
func (itq *InterpretationTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*InterpretationTranslationQuery) FirstX ¶
func (itq *InterpretationTranslationQuery) FirstX(ctx context.Context) *InterpretationTranslation
FirstX is like First, but panics if an error occurs.
func (*InterpretationTranslationQuery) GroupBy ¶
func (itq *InterpretationTranslationQuery) GroupBy(field string, fields ...string) *InterpretationTranslationGroupBy
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 { Locale interpretationtranslation.Locale `json:"locale,omitempty"` Count int `json:"count,omitempty"` } client.InterpretationTranslation.Query(). GroupBy(interpretationtranslation.FieldLocale). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InterpretationTranslationQuery) IDs ¶
IDs executes the query and returns a list of InterpretationTranslation IDs.
func (*InterpretationTranslationQuery) IDsX ¶
func (itq *InterpretationTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*InterpretationTranslationQuery) Limit ¶
func (itq *InterpretationTranslationQuery) Limit(limit int) *InterpretationTranslationQuery
Limit adds a limit step to the query.
func (*InterpretationTranslationQuery) Offset ¶
func (itq *InterpretationTranslationQuery) Offset(offset int) *InterpretationTranslationQuery
Offset adds an offset step to the query.
func (*InterpretationTranslationQuery) Only ¶
func (itq *InterpretationTranslationQuery) Only(ctx context.Context) (*InterpretationTranslation, error)
Only returns a single InterpretationTranslation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one InterpretationTranslation entity is found. Returns a *NotFoundError when no InterpretationTranslation entities are found.
func (*InterpretationTranslationQuery) OnlyID ¶
OnlyID is like Only, but returns the only InterpretationTranslation ID in the query. Returns a *NotSingularError when more than one InterpretationTranslation ID is found. Returns a *NotFoundError when no entities are found.
func (*InterpretationTranslationQuery) OnlyIDX ¶
func (itq *InterpretationTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InterpretationTranslationQuery) OnlyX ¶
func (itq *InterpretationTranslationQuery) OnlyX(ctx context.Context) *InterpretationTranslation
OnlyX is like Only, but panics if an error occurs.
func (*InterpretationTranslationQuery) Order ¶
func (itq *InterpretationTranslationQuery) Order(o ...OrderFunc) *InterpretationTranslationQuery
Order adds an order step to the query.
func (*InterpretationTranslationQuery) QueryInterpretation ¶
func (itq *InterpretationTranslationQuery) QueryInterpretation() *InterpretationQuery
QueryInterpretation chains the current query on the "interpretation" edge.
func (*InterpretationTranslationQuery) Select ¶
func (itq *InterpretationTranslationQuery) Select(fields ...string) *InterpretationTranslationSelect
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 { Locale interpretationtranslation.Locale `json:"locale,omitempty"` } client.InterpretationTranslation.Query(). Select(interpretationtranslation.FieldLocale). Scan(ctx, &v)
func (*InterpretationTranslationQuery) Unique ¶
func (itq *InterpretationTranslationQuery) Unique(unique bool) *InterpretationTranslationQuery
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 (*InterpretationTranslationQuery) Where ¶
func (itq *InterpretationTranslationQuery) Where(ps ...predicate.InterpretationTranslation) *InterpretationTranslationQuery
Where adds a new predicate for the InterpretationTranslationQuery builder.
func (*InterpretationTranslationQuery) WithInterpretation ¶
func (itq *InterpretationTranslationQuery) WithInterpretation(opts ...func(*InterpretationQuery)) *InterpretationTranslationQuery
WithInterpretation tells the query-builder to eager-load the nodes that are connected to the "interpretation" edge. The optional arguments are used to configure the query builder of the edge.
type InterpretationTranslationSelect ¶
type InterpretationTranslationSelect struct { *InterpretationTranslationQuery // contains filtered or unexported fields }
InterpretationTranslationSelect is the builder for selecting fields of InterpretationTranslation entities.
func (*InterpretationTranslationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationSelect) BoolsX ¶
BoolsX is like Bools, but panics if an error occurs.
func (*InterpretationTranslationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*InterpretationTranslationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*InterpretationTranslationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationSelect) Scan ¶
func (its *InterpretationTranslationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*InterpretationTranslationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*InterpretationTranslationSelect) StringX ¶
StringX is like String, but panics if an error occurs.
type InterpretationTranslationUpdate ¶
type InterpretationTranslationUpdate struct {
// contains filtered or unexported fields
}
InterpretationTranslationUpdate is the builder for updating InterpretationTranslation entities.
func (*InterpretationTranslationUpdate) ClearInterpretation ¶
func (itu *InterpretationTranslationUpdate) ClearInterpretation() *InterpretationTranslationUpdate
ClearInterpretation clears the "interpretation" edge to the Interpretation entity.
func (*InterpretationTranslationUpdate) Exec ¶
func (itu *InterpretationTranslationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InterpretationTranslationUpdate) ExecX ¶
func (itu *InterpretationTranslationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InterpretationTranslationUpdate) Mutation ¶
func (itu *InterpretationTranslationUpdate) Mutation() *InterpretationTranslationMutation
Mutation returns the InterpretationTranslationMutation object of the builder.
func (*InterpretationTranslationUpdate) Save ¶
func (itu *InterpretationTranslationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InterpretationTranslationUpdate) SaveX ¶
func (itu *InterpretationTranslationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InterpretationTranslationUpdate) SetContent ¶
func (itu *InterpretationTranslationUpdate) SetContent(s string) *InterpretationTranslationUpdate
SetContent sets the "content" field.
func (*InterpretationTranslationUpdate) SetInterpretation ¶
func (itu *InterpretationTranslationUpdate) SetInterpretation(i *Interpretation) *InterpretationTranslationUpdate
SetInterpretation sets the "interpretation" edge to the Interpretation entity.
func (*InterpretationTranslationUpdate) SetInterpretationID ¶
func (itu *InterpretationTranslationUpdate) SetInterpretationID(id uuid.UUID) *InterpretationTranslationUpdate
SetInterpretationID sets the "interpretation" edge to the Interpretation entity by ID.
func (*InterpretationTranslationUpdate) SetNillableInterpretationID ¶
func (itu *InterpretationTranslationUpdate) SetNillableInterpretationID(id *uuid.UUID) *InterpretationTranslationUpdate
SetNillableInterpretationID sets the "interpretation" edge to the Interpretation entity by ID if the given value is not nil.
func (*InterpretationTranslationUpdate) Where ¶
func (itu *InterpretationTranslationUpdate) Where(ps ...predicate.InterpretationTranslation) *InterpretationTranslationUpdate
Where appends a list predicates to the InterpretationTranslationUpdate builder.
type InterpretationTranslationUpdateOne ¶
type InterpretationTranslationUpdateOne struct {
// contains filtered or unexported fields
}
InterpretationTranslationUpdateOne is the builder for updating a single InterpretationTranslation entity.
func (*InterpretationTranslationUpdateOne) ClearInterpretation ¶
func (ituo *InterpretationTranslationUpdateOne) ClearInterpretation() *InterpretationTranslationUpdateOne
ClearInterpretation clears the "interpretation" edge to the Interpretation entity.
func (*InterpretationTranslationUpdateOne) Exec ¶
func (ituo *InterpretationTranslationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InterpretationTranslationUpdateOne) ExecX ¶
func (ituo *InterpretationTranslationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InterpretationTranslationUpdateOne) Mutation ¶
func (ituo *InterpretationTranslationUpdateOne) Mutation() *InterpretationTranslationMutation
Mutation returns the InterpretationTranslationMutation object of the builder.
func (*InterpretationTranslationUpdateOne) Save ¶
func (ituo *InterpretationTranslationUpdateOne) Save(ctx context.Context) (*InterpretationTranslation, error)
Save executes the query and returns the updated InterpretationTranslation entity.
func (*InterpretationTranslationUpdateOne) SaveX ¶
func (ituo *InterpretationTranslationUpdateOne) SaveX(ctx context.Context) *InterpretationTranslation
SaveX is like Save, but panics if an error occurs.
func (*InterpretationTranslationUpdateOne) Select ¶
func (ituo *InterpretationTranslationUpdateOne) Select(field string, fields ...string) *InterpretationTranslationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InterpretationTranslationUpdateOne) SetContent ¶
func (ituo *InterpretationTranslationUpdateOne) SetContent(s string) *InterpretationTranslationUpdateOne
SetContent sets the "content" field.
func (*InterpretationTranslationUpdateOne) SetInterpretation ¶
func (ituo *InterpretationTranslationUpdateOne) SetInterpretation(i *Interpretation) *InterpretationTranslationUpdateOne
SetInterpretation sets the "interpretation" edge to the Interpretation entity.
func (*InterpretationTranslationUpdateOne) SetInterpretationID ¶
func (ituo *InterpretationTranslationUpdateOne) SetInterpretationID(id uuid.UUID) *InterpretationTranslationUpdateOne
SetInterpretationID sets the "interpretation" edge to the Interpretation entity by ID.
func (*InterpretationTranslationUpdateOne) SetNillableInterpretationID ¶
func (ituo *InterpretationTranslationUpdateOne) SetNillableInterpretationID(id *uuid.UUID) *InterpretationTranslationUpdateOne
SetNillableInterpretationID sets the "interpretation" edge to the Interpretation entity by ID if the given value is not nil.
type InterpretationTranslations ¶
type InterpretationTranslations []*InterpretationTranslation
InterpretationTranslations is a parsable slice of InterpretationTranslation.
type InterpretationUpdate ¶
type InterpretationUpdate struct {
// contains filtered or unexported fields
}
InterpretationUpdate is the builder for updating Interpretation entities.
func (*InterpretationUpdate) AddTranslationIDs ¶
func (iu *InterpretationUpdate) AddTranslationIDs(ids ...uuid.UUID) *InterpretationUpdate
AddTranslationIDs adds the "translations" edge to the InterpretationTranslation entity by IDs.
func (*InterpretationUpdate) AddTranslations ¶
func (iu *InterpretationUpdate) AddTranslations(i ...*InterpretationTranslation) *InterpretationUpdate
AddTranslations adds the "translations" edges to the InterpretationTranslation entity.
func (*InterpretationUpdate) ClearScale ¶
func (iu *InterpretationUpdate) ClearScale() *InterpretationUpdate
ClearScale clears the "scale" edge to the Scale entity.
func (*InterpretationUpdate) ClearTranslations ¶
func (iu *InterpretationUpdate) ClearTranslations() *InterpretationUpdate
ClearTranslations clears all "translations" edges to the InterpretationTranslation entity.
func (*InterpretationUpdate) Exec ¶
func (iu *InterpretationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InterpretationUpdate) ExecX ¶
func (iu *InterpretationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InterpretationUpdate) Mutation ¶
func (iu *InterpretationUpdate) Mutation() *InterpretationMutation
Mutation returns the InterpretationMutation object of the builder.
func (*InterpretationUpdate) RemoveTranslationIDs ¶
func (iu *InterpretationUpdate) RemoveTranslationIDs(ids ...uuid.UUID) *InterpretationUpdate
RemoveTranslationIDs removes the "translations" edge to InterpretationTranslation entities by IDs.
func (*InterpretationUpdate) RemoveTranslations ¶
func (iu *InterpretationUpdate) RemoveTranslations(i ...*InterpretationTranslation) *InterpretationUpdate
RemoveTranslations removes "translations" edges to InterpretationTranslation entities.
func (*InterpretationUpdate) Save ¶
func (iu *InterpretationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InterpretationUpdate) SaveX ¶
func (iu *InterpretationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InterpretationUpdate) SetNillableScaleID ¶
func (iu *InterpretationUpdate) SetNillableScaleID(id *uuid.UUID) *InterpretationUpdate
SetNillableScaleID sets the "scale" edge to the Scale entity by ID if the given value is not nil.
func (*InterpretationUpdate) SetRange ¶
func (iu *InterpretationUpdate) SetRange(f [2]float64) *InterpretationUpdate
SetRange sets the "range" field.
func (*InterpretationUpdate) SetScale ¶
func (iu *InterpretationUpdate) SetScale(s *Scale) *InterpretationUpdate
SetScale sets the "scale" edge to the Scale entity.
func (*InterpretationUpdate) SetScaleID ¶
func (iu *InterpretationUpdate) SetScaleID(id uuid.UUID) *InterpretationUpdate
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*InterpretationUpdate) SetUpdateTime ¶
func (iu *InterpretationUpdate) SetUpdateTime(t time.Time) *InterpretationUpdate
SetUpdateTime sets the "update_time" field.
func (*InterpretationUpdate) Where ¶
func (iu *InterpretationUpdate) Where(ps ...predicate.Interpretation) *InterpretationUpdate
Where appends a list predicates to the InterpretationUpdate builder.
type InterpretationUpdateOne ¶
type InterpretationUpdateOne struct {
// contains filtered or unexported fields
}
InterpretationUpdateOne is the builder for updating a single Interpretation entity.
func (*InterpretationUpdateOne) AddTranslationIDs ¶
func (iuo *InterpretationUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *InterpretationUpdateOne
AddTranslationIDs adds the "translations" edge to the InterpretationTranslation entity by IDs.
func (*InterpretationUpdateOne) AddTranslations ¶
func (iuo *InterpretationUpdateOne) AddTranslations(i ...*InterpretationTranslation) *InterpretationUpdateOne
AddTranslations adds the "translations" edges to the InterpretationTranslation entity.
func (*InterpretationUpdateOne) ClearScale ¶
func (iuo *InterpretationUpdateOne) ClearScale() *InterpretationUpdateOne
ClearScale clears the "scale" edge to the Scale entity.
func (*InterpretationUpdateOne) ClearTranslations ¶
func (iuo *InterpretationUpdateOne) ClearTranslations() *InterpretationUpdateOne
ClearTranslations clears all "translations" edges to the InterpretationTranslation entity.
func (*InterpretationUpdateOne) Exec ¶
func (iuo *InterpretationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InterpretationUpdateOne) ExecX ¶
func (iuo *InterpretationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InterpretationUpdateOne) Mutation ¶
func (iuo *InterpretationUpdateOne) Mutation() *InterpretationMutation
Mutation returns the InterpretationMutation object of the builder.
func (*InterpretationUpdateOne) RemoveTranslationIDs ¶
func (iuo *InterpretationUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *InterpretationUpdateOne
RemoveTranslationIDs removes the "translations" edge to InterpretationTranslation entities by IDs.
func (*InterpretationUpdateOne) RemoveTranslations ¶
func (iuo *InterpretationUpdateOne) RemoveTranslations(i ...*InterpretationTranslation) *InterpretationUpdateOne
RemoveTranslations removes "translations" edges to InterpretationTranslation entities.
func (*InterpretationUpdateOne) Save ¶
func (iuo *InterpretationUpdateOne) Save(ctx context.Context) (*Interpretation, error)
Save executes the query and returns the updated Interpretation entity.
func (*InterpretationUpdateOne) SaveX ¶
func (iuo *InterpretationUpdateOne) SaveX(ctx context.Context) *Interpretation
SaveX is like Save, but panics if an error occurs.
func (*InterpretationUpdateOne) Select ¶
func (iuo *InterpretationUpdateOne) Select(field string, fields ...string) *InterpretationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InterpretationUpdateOne) SetNillableScaleID ¶
func (iuo *InterpretationUpdateOne) SetNillableScaleID(id *uuid.UUID) *InterpretationUpdateOne
SetNillableScaleID sets the "scale" edge to the Scale entity by ID if the given value is not nil.
func (*InterpretationUpdateOne) SetRange ¶
func (iuo *InterpretationUpdateOne) SetRange(f [2]float64) *InterpretationUpdateOne
SetRange sets the "range" field.
func (*InterpretationUpdateOne) SetScale ¶
func (iuo *InterpretationUpdateOne) SetScale(s *Scale) *InterpretationUpdateOne
SetScale sets the "scale" edge to the Scale entity.
func (*InterpretationUpdateOne) SetScaleID ¶
func (iuo *InterpretationUpdateOne) SetScaleID(id uuid.UUID) *InterpretationUpdateOne
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*InterpretationUpdateOne) SetUpdateTime ¶
func (iuo *InterpretationUpdateOne) SetUpdateTime(t time.Time) *InterpretationUpdateOne
SetUpdateTime sets the "update_time" field.
type Interpretations ¶
type Interpretations []*Interpretation
Interpretations is a parsable slice of Interpretation.
type Item ¶
type Item struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Steps holds the value of the "steps" field. Steps int `json:"steps,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ItemQuery when eager-loading is set. Edges ItemEdges `json:"edges"` // contains filtered or unexported fields }
Item is the model entity for the Item schema.
func (*Item) QueryQuestion ¶
func (i *Item) QueryQuestion() *QuestionQuery
QueryQuestion queries the "question" edge of the Item entity.
func (*Item) QueryResponses ¶
func (i *Item) QueryResponses() *ResponseQuery
QueryResponses queries the "responses" edge of the Item entity.
func (*Item) QueryScale ¶
func (i *Item) QueryScale() *ScaleQuery
QueryScale queries the "scale" edge of the Item entity.
func (*Item) QueryScaleItem ¶
func (i *Item) QueryScaleItem() *ScaleItemQuery
QueryScaleItem queries the "scale_item" edge of the Item entity.
func (*Item) QueryTranslations ¶
func (i *Item) QueryTranslations() *ItemTranslationQuery
QueryTranslations queries the "translations" edge of the Item entity.
func (*Item) Unwrap ¶
Unwrap unwraps the Item 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 (*Item) Update ¶
func (i *Item) Update() *ItemUpdateOne
Update returns a builder for updating this Item. Note that you need to call Item.Unwrap() before calling this method if this Item was returned from a transaction, and the transaction was committed or rolled back.
type ItemClient ¶
type ItemClient struct {
// contains filtered or unexported fields
}
ItemClient is a client for the Item schema.
func NewItemClient ¶
func NewItemClient(c config) *ItemClient
NewItemClient returns a client for the Item from the given config.
func (*ItemClient) Create ¶
func (c *ItemClient) Create() *ItemCreate
Create returns a builder for creating a Item entity.
func (*ItemClient) CreateBulk ¶
func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk
CreateBulk returns a builder for creating a bulk of Item entities.
func (*ItemClient) Delete ¶
func (c *ItemClient) Delete() *ItemDelete
Delete returns a delete builder for Item.
func (*ItemClient) DeleteOne ¶
func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ItemClient) DeleteOneID ¶
func (c *ItemClient) DeleteOneID(id uuid.UUID) *ItemDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*ItemClient) Query ¶
func (c *ItemClient) Query() *ItemQuery
Query returns a query builder for Item.
func (*ItemClient) QueryQuestion ¶
func (c *ItemClient) QueryQuestion(i *Item) *QuestionQuery
QueryQuestion queries the question edge of a Item.
func (*ItemClient) QueryResponses ¶
func (c *ItemClient) QueryResponses(i *Item) *ResponseQuery
QueryResponses queries the responses edge of a Item.
func (*ItemClient) QueryScale ¶
func (c *ItemClient) QueryScale(i *Item) *ScaleQuery
QueryScale queries the scale edge of a Item.
func (*ItemClient) QueryScaleItem ¶
func (c *ItemClient) QueryScaleItem(i *Item) *ScaleItemQuery
QueryScaleItem queries the scale_item edge of a Item.
func (*ItemClient) QueryTranslations ¶
func (c *ItemClient) QueryTranslations(i *Item) *ItemTranslationQuery
QueryTranslations queries the translations edge of a Item.
func (*ItemClient) Update ¶
func (c *ItemClient) Update() *ItemUpdate
Update returns an update builder for Item.
func (*ItemClient) UpdateOne ¶
func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ItemClient) UpdateOneID ¶
func (c *ItemClient) UpdateOneID(id uuid.UUID) *ItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ItemClient) Use ¶
func (c *ItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `item.Hooks(f(g(h())))`.
type ItemCreate ¶
type ItemCreate struct {
// contains filtered or unexported fields
}
ItemCreate is the builder for creating a Item entity.
func (*ItemCreate) AddQuestion ¶
func (ic *ItemCreate) AddQuestion(q ...*Question) *ItemCreate
AddQuestion adds the "question" edges to the Question entity.
func (*ItemCreate) AddQuestionIDs ¶
func (ic *ItemCreate) AddQuestionIDs(ids ...uuid.UUID) *ItemCreate
AddQuestionIDs adds the "question" edge to the Question entity by IDs.
func (*ItemCreate) AddResponseIDs ¶
func (ic *ItemCreate) AddResponseIDs(ids ...uuid.UUID) *ItemCreate
AddResponseIDs adds the "responses" edge to the Response entity by IDs.
func (*ItemCreate) AddResponses ¶
func (ic *ItemCreate) AddResponses(r ...*Response) *ItemCreate
AddResponses adds the "responses" edges to the Response entity.
func (*ItemCreate) AddScale ¶
func (ic *ItemCreate) AddScale(s ...*Scale) *ItemCreate
AddScale adds the "scale" edges to the Scale entity.
func (*ItemCreate) AddScaleIDs ¶
func (ic *ItemCreate) AddScaleIDs(ids ...uuid.UUID) *ItemCreate
AddScaleIDs adds the "scale" edge to the Scale entity by IDs.
func (*ItemCreate) AddTranslationIDs ¶
func (ic *ItemCreate) AddTranslationIDs(ids ...uuid.UUID) *ItemCreate
AddTranslationIDs adds the "translations" edge to the ItemTranslation entity by IDs.
func (*ItemCreate) AddTranslations ¶
func (ic *ItemCreate) AddTranslations(i ...*ItemTranslation) *ItemCreate
AddTranslations adds the "translations" edges to the ItemTranslation entity.
func (*ItemCreate) Exec ¶
func (ic *ItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemCreate) ExecX ¶
func (ic *ItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemCreate) Mutation ¶
func (ic *ItemCreate) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemCreate) Save ¶
func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)
Save creates the Item in the database.
func (*ItemCreate) SaveX ¶
func (ic *ItemCreate) SaveX(ctx context.Context) *Item
SaveX calls Save and panics if Save returns an error.
func (*ItemCreate) SetCode ¶
func (ic *ItemCreate) SetCode(s string) *ItemCreate
SetCode sets the "code" field.
func (*ItemCreate) SetCreateTime ¶
func (ic *ItemCreate) SetCreateTime(t time.Time) *ItemCreate
SetCreateTime sets the "create_time" field.
func (*ItemCreate) SetID ¶
func (ic *ItemCreate) SetID(u uuid.UUID) *ItemCreate
SetID sets the "id" field.
func (*ItemCreate) SetNillableCreateTime ¶
func (ic *ItemCreate) SetNillableCreateTime(t *time.Time) *ItemCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ItemCreate) SetNillableID ¶
func (ic *ItemCreate) SetNillableID(u *uuid.UUID) *ItemCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ItemCreate) SetNillableSteps ¶
func (ic *ItemCreate) SetNillableSteps(i *int) *ItemCreate
SetNillableSteps sets the "steps" field if the given value is not nil.
func (*ItemCreate) SetNillableUpdateTime ¶
func (ic *ItemCreate) SetNillableUpdateTime(t *time.Time) *ItemCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ItemCreate) SetSteps ¶
func (ic *ItemCreate) SetSteps(i int) *ItemCreate
SetSteps sets the "steps" field.
func (*ItemCreate) SetUpdateTime ¶
func (ic *ItemCreate) SetUpdateTime(t time.Time) *ItemCreate
SetUpdateTime sets the "update_time" field.
type ItemCreateBulk ¶
type ItemCreateBulk struct {
// contains filtered or unexported fields
}
ItemCreateBulk is the builder for creating many Item entities in bulk.
func (*ItemCreateBulk) Exec ¶
func (icb *ItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemCreateBulk) ExecX ¶
func (icb *ItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ItemDelete ¶
type ItemDelete struct {
// contains filtered or unexported fields
}
ItemDelete is the builder for deleting a Item entity.
func (*ItemDelete) Exec ¶
func (id *ItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ItemDelete) ExecX ¶
func (id *ItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ItemDelete) Where ¶
func (id *ItemDelete) Where(ps ...predicate.Item) *ItemDelete
Where appends a list predicates to the ItemDelete builder.
type ItemDeleteOne ¶
type ItemDeleteOne struct {
// contains filtered or unexported fields
}
ItemDeleteOne is the builder for deleting a single Item entity.
func (*ItemDeleteOne) Exec ¶
func (ido *ItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ItemDeleteOne) ExecX ¶
func (ido *ItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ItemEdges ¶
type ItemEdges struct { // Responses holds the value of the responses edge. Responses []*Response `json:"responses,omitempty"` // Translations holds the value of the translations edge. Translations []*ItemTranslation `json:"translations,omitempty"` // Scale holds the value of the scale edge. Scale []*Scale `json:"scale,omitempty"` // Question holds the value of the question edge. Question []*Question `json:"question,omitempty"` // ScaleItem holds the value of the scale_item edge. ScaleItem []*ScaleItem `json:"scale_item,omitempty"` // contains filtered or unexported fields }
ItemEdges holds the relations/edges for other nodes in the graph.
func (ItemEdges) QuestionOrErr ¶
QuestionOrErr returns the Question value or an error if the edge was not loaded in eager-loading.
func (ItemEdges) ResponsesOrErr ¶
ResponsesOrErr returns the Responses value or an error if the edge was not loaded in eager-loading.
func (ItemEdges) ScaleItemOrErr ¶
ScaleItemOrErr returns the ScaleItem value or an error if the edge was not loaded in eager-loading.
func (ItemEdges) ScaleOrErr ¶
ScaleOrErr returns the Scale value or an error if the edge was not loaded in eager-loading.
func (ItemEdges) TranslationsOrErr ¶
func (e ItemEdges) TranslationsOrErr() ([]*ItemTranslation, error)
TranslationsOrErr returns the Translations value or an error if the edge was not loaded in eager-loading.
type ItemGroupBy ¶
type ItemGroupBy struct {
// contains filtered or unexported fields
}
ItemGroupBy is the group-by builder for Item entities.
func (*ItemGroupBy) Aggregate ¶
func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Scan ¶
func (igb *ItemGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemMutation ¶
type ItemMutation struct {
// contains filtered or unexported fields
}
ItemMutation represents an operation that mutates the Item nodes in the graph.
func (*ItemMutation) AddField ¶
func (m *ItemMutation) 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 (*ItemMutation) AddQuestionIDs ¶
func (m *ItemMutation) AddQuestionIDs(ids ...uuid.UUID)
AddQuestionIDs adds the "question" edge to the Question entity by ids.
func (*ItemMutation) AddResponseIDs ¶
func (m *ItemMutation) AddResponseIDs(ids ...uuid.UUID)
AddResponseIDs adds the "responses" edge to the Response entity by ids.
func (*ItemMutation) AddScaleIDs ¶
func (m *ItemMutation) AddScaleIDs(ids ...uuid.UUID)
AddScaleIDs adds the "scale" edge to the Scale entity by ids.
func (*ItemMutation) AddSteps ¶
func (m *ItemMutation) AddSteps(i int)
AddSteps adds i to the "steps" field.
func (*ItemMutation) AddTranslationIDs ¶
func (m *ItemMutation) AddTranslationIDs(ids ...uuid.UUID)
AddTranslationIDs adds the "translations" edge to the ItemTranslation entity by ids.
func (*ItemMutation) AddedEdges ¶
func (m *ItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ItemMutation) AddedField ¶
func (m *ItemMutation) 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 (*ItemMutation) AddedFields ¶
func (m *ItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ItemMutation) AddedIDs ¶
func (m *ItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ItemMutation) AddedSteps ¶
func (m *ItemMutation) AddedSteps() (r int, exists bool)
AddedSteps returns the value that was added to the "steps" field in this mutation.
func (*ItemMutation) ClearEdge ¶
func (m *ItemMutation) 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 (*ItemMutation) ClearField ¶
func (m *ItemMutation) 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 (*ItemMutation) ClearQuestion ¶
func (m *ItemMutation) ClearQuestion()
ClearQuestion clears the "question" edge to the Question entity.
func (*ItemMutation) ClearResponses ¶
func (m *ItemMutation) ClearResponses()
ClearResponses clears the "responses" edge to the Response entity.
func (*ItemMutation) ClearScale ¶
func (m *ItemMutation) ClearScale()
ClearScale clears the "scale" edge to the Scale entity.
func (*ItemMutation) ClearTranslations ¶
func (m *ItemMutation) ClearTranslations()
ClearTranslations clears the "translations" edge to the ItemTranslation entity.
func (*ItemMutation) ClearedEdges ¶
func (m *ItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ItemMutation) ClearedFields ¶
func (m *ItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ItemMutation) Client ¶
func (m ItemMutation) 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 (*ItemMutation) Code ¶
func (m *ItemMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*ItemMutation) CreateTime ¶
func (m *ItemMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ItemMutation) EdgeCleared ¶
func (m *ItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ItemMutation) Field ¶
func (m *ItemMutation) 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 (*ItemMutation) FieldCleared ¶
func (m *ItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ItemMutation) Fields ¶
func (m *ItemMutation) 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 (*ItemMutation) ID ¶
func (m *ItemMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ItemMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ItemMutation) OldCode ¶
func (m *ItemMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Item entity. If the Item 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 (*ItemMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Item entity. If the Item 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 (*ItemMutation) 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 (*ItemMutation) OldSteps ¶
func (m *ItemMutation) OldSteps(ctx context.Context) (v int, err error)
OldSteps returns the old "steps" field's value of the Item entity. If the Item 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 (*ItemMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Item entity. If the Item 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 (*ItemMutation) QuestionCleared ¶
func (m *ItemMutation) QuestionCleared() bool
QuestionCleared reports if the "question" edge to the Question entity was cleared.
func (*ItemMutation) QuestionIDs ¶
func (m *ItemMutation) QuestionIDs() (ids []uuid.UUID)
QuestionIDs returns the "question" edge IDs in the mutation.
func (*ItemMutation) RemoveQuestionIDs ¶
func (m *ItemMutation) RemoveQuestionIDs(ids ...uuid.UUID)
RemoveQuestionIDs removes the "question" edge to the Question entity by IDs.
func (*ItemMutation) RemoveResponseIDs ¶
func (m *ItemMutation) RemoveResponseIDs(ids ...uuid.UUID)
RemoveResponseIDs removes the "responses" edge to the Response entity by IDs.
func (*ItemMutation) RemoveScaleIDs ¶
func (m *ItemMutation) RemoveScaleIDs(ids ...uuid.UUID)
RemoveScaleIDs removes the "scale" edge to the Scale entity by IDs.
func (*ItemMutation) RemoveTranslationIDs ¶
func (m *ItemMutation) RemoveTranslationIDs(ids ...uuid.UUID)
RemoveTranslationIDs removes the "translations" edge to the ItemTranslation entity by IDs.
func (*ItemMutation) RemovedEdges ¶
func (m *ItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ItemMutation) RemovedIDs ¶
func (m *ItemMutation) 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 (*ItemMutation) RemovedQuestionIDs ¶
func (m *ItemMutation) RemovedQuestionIDs() (ids []uuid.UUID)
RemovedQuestion returns the removed IDs of the "question" edge to the Question entity.
func (*ItemMutation) RemovedResponsesIDs ¶
func (m *ItemMutation) RemovedResponsesIDs() (ids []uuid.UUID)
RemovedResponses returns the removed IDs of the "responses" edge to the Response entity.
func (*ItemMutation) RemovedScaleIDs ¶
func (m *ItemMutation) RemovedScaleIDs() (ids []uuid.UUID)
RemovedScale returns the removed IDs of the "scale" edge to the Scale entity.
func (*ItemMutation) RemovedTranslationsIDs ¶
func (m *ItemMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
RemovedTranslations returns the removed IDs of the "translations" edge to the ItemTranslation entity.
func (*ItemMutation) ResetCode ¶
func (m *ItemMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*ItemMutation) ResetCreateTime ¶
func (m *ItemMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ItemMutation) ResetEdge ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetField ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetQuestion ¶
func (m *ItemMutation) ResetQuestion()
ResetQuestion resets all changes to the "question" edge.
func (*ItemMutation) ResetResponses ¶
func (m *ItemMutation) ResetResponses()
ResetResponses resets all changes to the "responses" edge.
func (*ItemMutation) ResetScale ¶
func (m *ItemMutation) ResetScale()
ResetScale resets all changes to the "scale" edge.
func (*ItemMutation) ResetSteps ¶
func (m *ItemMutation) ResetSteps()
ResetSteps resets all changes to the "steps" field.
func (*ItemMutation) ResetTranslations ¶
func (m *ItemMutation) ResetTranslations()
ResetTranslations resets all changes to the "translations" edge.
func (*ItemMutation) ResetUpdateTime ¶
func (m *ItemMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ItemMutation) ResponsesCleared ¶
func (m *ItemMutation) ResponsesCleared() bool
ResponsesCleared reports if the "responses" edge to the Response entity was cleared.
func (*ItemMutation) ResponsesIDs ¶
func (m *ItemMutation) ResponsesIDs() (ids []uuid.UUID)
ResponsesIDs returns the "responses" edge IDs in the mutation.
func (*ItemMutation) ScaleCleared ¶
func (m *ItemMutation) ScaleCleared() bool
ScaleCleared reports if the "scale" edge to the Scale entity was cleared.
func (*ItemMutation) ScaleIDs ¶
func (m *ItemMutation) ScaleIDs() (ids []uuid.UUID)
ScaleIDs returns the "scale" edge IDs in the mutation.
func (*ItemMutation) SetCode ¶
func (m *ItemMutation) SetCode(s string)
SetCode sets the "code" field.
func (*ItemMutation) SetCreateTime ¶
func (m *ItemMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ItemMutation) SetField ¶
func (m *ItemMutation) 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 (*ItemMutation) SetID ¶
func (m *ItemMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Item entities.
func (*ItemMutation) SetSteps ¶
func (m *ItemMutation) SetSteps(i int)
SetSteps sets the "steps" field.
func (*ItemMutation) SetUpdateTime ¶
func (m *ItemMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ItemMutation) Steps ¶
func (m *ItemMutation) Steps() (r int, exists bool)
Steps returns the value of the "steps" field in the mutation.
func (*ItemMutation) TranslationsCleared ¶
func (m *ItemMutation) TranslationsCleared() bool
TranslationsCleared reports if the "translations" edge to the ItemTranslation entity was cleared.
func (*ItemMutation) TranslationsIDs ¶
func (m *ItemMutation) TranslationsIDs() (ids []uuid.UUID)
TranslationsIDs returns the "translations" edge IDs in the mutation.
func (ItemMutation) Tx ¶
func (m ItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ItemMutation) Type ¶
func (m *ItemMutation) Type() string
Type returns the node type of this mutation (Item).
func (*ItemMutation) UpdateTime ¶
func (m *ItemMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ItemMutation) Where ¶
func (m *ItemMutation) Where(ps ...predicate.Item)
Where appends a list predicates to the ItemMutation builder.
type ItemQuery ¶
type ItemQuery struct {
// contains filtered or unexported fields
}
ItemQuery is the builder for querying Item entities.
func (*ItemQuery) Clone ¶
Clone returns a duplicate of the ItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ItemQuery) First ¶
First returns the first Item entity from the query. Returns a *NotFoundError when no Item was found.
func (*ItemQuery) FirstID ¶
FirstID returns the first Item ID from the query. Returns a *NotFoundError when no Item ID was found.
func (*ItemQuery) GroupBy ¶
func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Item.Query(). GroupBy(item.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ItemQuery) Only ¶
Only returns a single Item entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Item entity is found. Returns a *NotFoundError when no Item entities are found.
func (*ItemQuery) OnlyID ¶
OnlyID is like Only, but returns the only Item ID in the query. Returns a *NotSingularError when more than one Item ID is found. Returns a *NotFoundError when no entities are found.
func (*ItemQuery) QueryQuestion ¶
func (iq *ItemQuery) QueryQuestion() *QuestionQuery
QueryQuestion chains the current query on the "question" edge.
func (*ItemQuery) QueryResponses ¶
func (iq *ItemQuery) QueryResponses() *ResponseQuery
QueryResponses chains the current query on the "responses" edge.
func (*ItemQuery) QueryScale ¶
func (iq *ItemQuery) QueryScale() *ScaleQuery
QueryScale chains the current query on the "scale" edge.
func (*ItemQuery) QueryScaleItem ¶
func (iq *ItemQuery) QueryScaleItem() *ScaleItemQuery
QueryScaleItem chains the current query on the "scale_item" edge.
func (*ItemQuery) QueryTranslations ¶
func (iq *ItemQuery) QueryTranslations() *ItemTranslationQuery
QueryTranslations chains the current query on the "translations" edge.
func (*ItemQuery) Select ¶
func (iq *ItemQuery) Select(fields ...string) *ItemSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Item.Query(). Select(item.FieldCreateTime). Scan(ctx, &v)
func (*ItemQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*ItemQuery) WithQuestion ¶
func (iq *ItemQuery) WithQuestion(opts ...func(*QuestionQuery)) *ItemQuery
WithQuestion tells the query-builder to eager-load the nodes that are connected to the "question" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithResponses ¶
func (iq *ItemQuery) WithResponses(opts ...func(*ResponseQuery)) *ItemQuery
WithResponses tells the query-builder to eager-load the nodes that are connected to the "responses" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithScale ¶
func (iq *ItemQuery) WithScale(opts ...func(*ScaleQuery)) *ItemQuery
WithScale tells the query-builder to eager-load the nodes that are connected to the "scale" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithScaleItem ¶
func (iq *ItemQuery) WithScaleItem(opts ...func(*ScaleItemQuery)) *ItemQuery
WithScaleItem tells the query-builder to eager-load the nodes that are connected to the "scale_item" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithTranslations ¶
func (iq *ItemQuery) WithTranslations(opts ...func(*ItemTranslationQuery)) *ItemQuery
WithTranslations tells the query-builder to eager-load the nodes that are connected to the "translations" edge. The optional arguments are used to configure the query builder of the edge.
type ItemSelect ¶
type ItemSelect struct { *ItemQuery // contains filtered or unexported fields }
ItemSelect is the builder for selecting fields of Item entities.
func (*ItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Scan ¶
func (is *ItemSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemTranslation ¶
type ItemTranslation struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Locale holds the value of the "locale" field. Locale itemtranslation.Locale `json:"locale,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ItemTranslationQuery when eager-loading is set. Edges ItemTranslationEdges `json:"edges"` // contains filtered or unexported fields }
ItemTranslation is the model entity for the ItemTranslation schema.
func (*ItemTranslation) QueryItem ¶
func (it *ItemTranslation) QueryItem() *ItemQuery
QueryItem queries the "item" edge of the ItemTranslation entity.
func (*ItemTranslation) String ¶
func (it *ItemTranslation) String() string
String implements the fmt.Stringer.
func (*ItemTranslation) Unwrap ¶
func (it *ItemTranslation) Unwrap() *ItemTranslation
Unwrap unwraps the ItemTranslation 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 (*ItemTranslation) Update ¶
func (it *ItemTranslation) Update() *ItemTranslationUpdateOne
Update returns a builder for updating this ItemTranslation. Note that you need to call ItemTranslation.Unwrap() before calling this method if this ItemTranslation was returned from a transaction, and the transaction was committed or rolled back.
type ItemTranslationClient ¶
type ItemTranslationClient struct {
// contains filtered or unexported fields
}
ItemTranslationClient is a client for the ItemTranslation schema.
func NewItemTranslationClient ¶
func NewItemTranslationClient(c config) *ItemTranslationClient
NewItemTranslationClient returns a client for the ItemTranslation from the given config.
func (*ItemTranslationClient) Create ¶
func (c *ItemTranslationClient) Create() *ItemTranslationCreate
Create returns a builder for creating a ItemTranslation entity.
func (*ItemTranslationClient) CreateBulk ¶
func (c *ItemTranslationClient) CreateBulk(builders ...*ItemTranslationCreate) *ItemTranslationCreateBulk
CreateBulk returns a builder for creating a bulk of ItemTranslation entities.
func (*ItemTranslationClient) Delete ¶
func (c *ItemTranslationClient) Delete() *ItemTranslationDelete
Delete returns a delete builder for ItemTranslation.
func (*ItemTranslationClient) DeleteOne ¶
func (c *ItemTranslationClient) DeleteOne(it *ItemTranslation) *ItemTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ItemTranslationClient) DeleteOneID ¶
func (c *ItemTranslationClient) DeleteOneID(id uuid.UUID) *ItemTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*ItemTranslationClient) Get ¶
func (c *ItemTranslationClient) Get(ctx context.Context, id uuid.UUID) (*ItemTranslation, error)
Get returns a ItemTranslation entity by its id.
func (*ItemTranslationClient) GetX ¶
func (c *ItemTranslationClient) GetX(ctx context.Context, id uuid.UUID) *ItemTranslation
GetX is like Get, but panics if an error occurs.
func (*ItemTranslationClient) Hooks ¶
func (c *ItemTranslationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ItemTranslationClient) Query ¶
func (c *ItemTranslationClient) Query() *ItemTranslationQuery
Query returns a query builder for ItemTranslation.
func (*ItemTranslationClient) QueryItem ¶
func (c *ItemTranslationClient) QueryItem(it *ItemTranslation) *ItemQuery
QueryItem queries the item edge of a ItemTranslation.
func (*ItemTranslationClient) Update ¶
func (c *ItemTranslationClient) Update() *ItemTranslationUpdate
Update returns an update builder for ItemTranslation.
func (*ItemTranslationClient) UpdateOne ¶
func (c *ItemTranslationClient) UpdateOne(it *ItemTranslation) *ItemTranslationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ItemTranslationClient) UpdateOneID ¶
func (c *ItemTranslationClient) UpdateOneID(id uuid.UUID) *ItemTranslationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ItemTranslationClient) Use ¶
func (c *ItemTranslationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `itemtranslation.Hooks(f(g(h())))`.
type ItemTranslationCreate ¶
type ItemTranslationCreate struct {
// contains filtered or unexported fields
}
ItemTranslationCreate is the builder for creating a ItemTranslation entity.
func (*ItemTranslationCreate) Exec ¶
func (itc *ItemTranslationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemTranslationCreate) ExecX ¶
func (itc *ItemTranslationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemTranslationCreate) Mutation ¶
func (itc *ItemTranslationCreate) Mutation() *ItemTranslationMutation
Mutation returns the ItemTranslationMutation object of the builder.
func (*ItemTranslationCreate) Save ¶
func (itc *ItemTranslationCreate) Save(ctx context.Context) (*ItemTranslation, error)
Save creates the ItemTranslation in the database.
func (*ItemTranslationCreate) SaveX ¶
func (itc *ItemTranslationCreate) SaveX(ctx context.Context) *ItemTranslation
SaveX calls Save and panics if Save returns an error.
func (*ItemTranslationCreate) SetContent ¶
func (itc *ItemTranslationCreate) SetContent(s string) *ItemTranslationCreate
SetContent sets the "content" field.
func (*ItemTranslationCreate) SetID ¶
func (itc *ItemTranslationCreate) SetID(u uuid.UUID) *ItemTranslationCreate
SetID sets the "id" field.
func (*ItemTranslationCreate) SetItem ¶
func (itc *ItemTranslationCreate) SetItem(i *Item) *ItemTranslationCreate
SetItem sets the "item" edge to the Item entity.
func (*ItemTranslationCreate) SetItemID ¶
func (itc *ItemTranslationCreate) SetItemID(id uuid.UUID) *ItemTranslationCreate
SetItemID sets the "item" edge to the Item entity by ID.
func (*ItemTranslationCreate) SetLocale ¶
func (itc *ItemTranslationCreate) SetLocale(i itemtranslation.Locale) *ItemTranslationCreate
SetLocale sets the "locale" field.
func (*ItemTranslationCreate) SetNillableID ¶
func (itc *ItemTranslationCreate) SetNillableID(u *uuid.UUID) *ItemTranslationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ItemTranslationCreate) SetNillableItemID ¶
func (itc *ItemTranslationCreate) SetNillableItemID(id *uuid.UUID) *ItemTranslationCreate
SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.
type ItemTranslationCreateBulk ¶
type ItemTranslationCreateBulk struct {
// contains filtered or unexported fields
}
ItemTranslationCreateBulk is the builder for creating many ItemTranslation entities in bulk.
func (*ItemTranslationCreateBulk) Exec ¶
func (itcb *ItemTranslationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemTranslationCreateBulk) ExecX ¶
func (itcb *ItemTranslationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemTranslationCreateBulk) Save ¶
func (itcb *ItemTranslationCreateBulk) Save(ctx context.Context) ([]*ItemTranslation, error)
Save creates the ItemTranslation entities in the database.
func (*ItemTranslationCreateBulk) SaveX ¶
func (itcb *ItemTranslationCreateBulk) SaveX(ctx context.Context) []*ItemTranslation
SaveX is like Save, but panics if an error occurs.
type ItemTranslationDelete ¶
type ItemTranslationDelete struct {
// contains filtered or unexported fields
}
ItemTranslationDelete is the builder for deleting a ItemTranslation entity.
func (*ItemTranslationDelete) Exec ¶
func (itd *ItemTranslationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ItemTranslationDelete) ExecX ¶
func (itd *ItemTranslationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ItemTranslationDelete) Where ¶
func (itd *ItemTranslationDelete) Where(ps ...predicate.ItemTranslation) *ItemTranslationDelete
Where appends a list predicates to the ItemTranslationDelete builder.
type ItemTranslationDeleteOne ¶
type ItemTranslationDeleteOne struct {
// contains filtered or unexported fields
}
ItemTranslationDeleteOne is the builder for deleting a single ItemTranslation entity.
func (*ItemTranslationDeleteOne) Exec ¶
func (itdo *ItemTranslationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ItemTranslationDeleteOne) ExecX ¶
func (itdo *ItemTranslationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ItemTranslationEdges ¶
type ItemTranslationEdges struct { // Item holds the value of the item edge. Item *Item `json:"item,omitempty"` // contains filtered or unexported fields }
ItemTranslationEdges holds the relations/edges for other nodes in the graph.
func (ItemTranslationEdges) ItemOrErr ¶
func (e ItemTranslationEdges) ItemOrErr() (*Item, error)
ItemOrErr returns the Item value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ItemTranslationGroupBy ¶
type ItemTranslationGroupBy struct {
// contains filtered or unexported fields
}
ItemTranslationGroupBy is the group-by builder for ItemTranslation entities.
func (*ItemTranslationGroupBy) Aggregate ¶
func (itgb *ItemTranslationGroupBy) Aggregate(fns ...AggregateFunc) *ItemTranslationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ItemTranslationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemTranslationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemTranslationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemTranslationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemTranslationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ItemTranslationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemTranslationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemTranslationGroupBy) Scan ¶
func (itgb *ItemTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ItemTranslationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemTranslationMutation ¶
type ItemTranslationMutation struct {
// contains filtered or unexported fields
}
ItemTranslationMutation represents an operation that mutates the ItemTranslation nodes in the graph.
func (*ItemTranslationMutation) AddField ¶
func (m *ItemTranslationMutation) 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 (*ItemTranslationMutation) AddedEdges ¶
func (m *ItemTranslationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ItemTranslationMutation) AddedField ¶
func (m *ItemTranslationMutation) 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 (*ItemTranslationMutation) AddedFields ¶
func (m *ItemTranslationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ItemTranslationMutation) AddedIDs ¶
func (m *ItemTranslationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ItemTranslationMutation) ClearEdge ¶
func (m *ItemTranslationMutation) 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 (*ItemTranslationMutation) ClearField ¶
func (m *ItemTranslationMutation) 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 (*ItemTranslationMutation) ClearItem ¶
func (m *ItemTranslationMutation) ClearItem()
ClearItem clears the "item" edge to the Item entity.
func (*ItemTranslationMutation) ClearedEdges ¶
func (m *ItemTranslationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ItemTranslationMutation) ClearedFields ¶
func (m *ItemTranslationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ItemTranslationMutation) Client ¶
func (m ItemTranslationMutation) 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 (*ItemTranslationMutation) Content ¶
func (m *ItemTranslationMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*ItemTranslationMutation) EdgeCleared ¶
func (m *ItemTranslationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ItemTranslationMutation) Field ¶
func (m *ItemTranslationMutation) 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 (*ItemTranslationMutation) FieldCleared ¶
func (m *ItemTranslationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ItemTranslationMutation) Fields ¶
func (m *ItemTranslationMutation) 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 (*ItemTranslationMutation) ID ¶
func (m *ItemTranslationMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ItemTranslationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ItemTranslationMutation) ItemCleared ¶
func (m *ItemTranslationMutation) ItemCleared() bool
ItemCleared reports if the "item" edge to the Item entity was cleared.
func (*ItemTranslationMutation) ItemID ¶
func (m *ItemTranslationMutation) ItemID() (id uuid.UUID, exists bool)
ItemID returns the "item" edge ID in the mutation.
func (*ItemTranslationMutation) ItemIDs ¶
func (m *ItemTranslationMutation) ItemIDs() (ids []uuid.UUID)
ItemIDs returns the "item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ItemID instead. It exists only for internal usage by the builders.
func (*ItemTranslationMutation) Locale ¶
func (m *ItemTranslationMutation) Locale() (r itemtranslation.Locale, exists bool)
Locale returns the value of the "locale" field in the mutation.
func (*ItemTranslationMutation) OldContent ¶
func (m *ItemTranslationMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the ItemTranslation entity. If the ItemTranslation 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 (*ItemTranslationMutation) 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 (*ItemTranslationMutation) OldLocale ¶
func (m *ItemTranslationMutation) OldLocale(ctx context.Context) (v itemtranslation.Locale, err error)
OldLocale returns the old "locale" field's value of the ItemTranslation entity. If the ItemTranslation 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 (*ItemTranslationMutation) Op ¶
func (m *ItemTranslationMutation) Op() Op
Op returns the operation name.
func (*ItemTranslationMutation) RemovedEdges ¶
func (m *ItemTranslationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ItemTranslationMutation) RemovedIDs ¶
func (m *ItemTranslationMutation) 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 (*ItemTranslationMutation) ResetContent ¶
func (m *ItemTranslationMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*ItemTranslationMutation) ResetEdge ¶
func (m *ItemTranslationMutation) 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 (*ItemTranslationMutation) ResetField ¶
func (m *ItemTranslationMutation) 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 (*ItemTranslationMutation) ResetItem ¶
func (m *ItemTranslationMutation) ResetItem()
ResetItem resets all changes to the "item" edge.
func (*ItemTranslationMutation) ResetLocale ¶
func (m *ItemTranslationMutation) ResetLocale()
ResetLocale resets all changes to the "locale" field.
func (*ItemTranslationMutation) SetContent ¶
func (m *ItemTranslationMutation) SetContent(s string)
SetContent sets the "content" field.
func (*ItemTranslationMutation) SetField ¶
func (m *ItemTranslationMutation) 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 (*ItemTranslationMutation) SetID ¶
func (m *ItemTranslationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ItemTranslation entities.
func (*ItemTranslationMutation) SetItemID ¶
func (m *ItemTranslationMutation) SetItemID(id uuid.UUID)
SetItemID sets the "item" edge to the Item entity by id.
func (*ItemTranslationMutation) SetLocale ¶
func (m *ItemTranslationMutation) SetLocale(i itemtranslation.Locale)
SetLocale sets the "locale" field.
func (ItemTranslationMutation) Tx ¶
func (m ItemTranslationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ItemTranslationMutation) Type ¶
func (m *ItemTranslationMutation) Type() string
Type returns the node type of this mutation (ItemTranslation).
func (*ItemTranslationMutation) Where ¶
func (m *ItemTranslationMutation) Where(ps ...predicate.ItemTranslation)
Where appends a list predicates to the ItemTranslationMutation builder.
type ItemTranslationQuery ¶
type ItemTranslationQuery struct {
// contains filtered or unexported fields
}
ItemTranslationQuery is the builder for querying ItemTranslation entities.
func (*ItemTranslationQuery) All ¶
func (itq *ItemTranslationQuery) All(ctx context.Context) ([]*ItemTranslation, error)
All executes the query and returns a list of ItemTranslations.
func (*ItemTranslationQuery) AllX ¶
func (itq *ItemTranslationQuery) AllX(ctx context.Context) []*ItemTranslation
AllX is like All, but panics if an error occurs.
func (*ItemTranslationQuery) Clone ¶
func (itq *ItemTranslationQuery) Clone() *ItemTranslationQuery
Clone returns a duplicate of the ItemTranslationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ItemTranslationQuery) Count ¶
func (itq *ItemTranslationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ItemTranslationQuery) CountX ¶
func (itq *ItemTranslationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ItemTranslationQuery) Exist ¶
func (itq *ItemTranslationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ItemTranslationQuery) ExistX ¶
func (itq *ItemTranslationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ItemTranslationQuery) First ¶
func (itq *ItemTranslationQuery) First(ctx context.Context) (*ItemTranslation, error)
First returns the first ItemTranslation entity from the query. Returns a *NotFoundError when no ItemTranslation was found.
func (*ItemTranslationQuery) FirstID ¶
FirstID returns the first ItemTranslation ID from the query. Returns a *NotFoundError when no ItemTranslation ID was found.
func (*ItemTranslationQuery) FirstIDX ¶
func (itq *ItemTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ItemTranslationQuery) FirstX ¶
func (itq *ItemTranslationQuery) FirstX(ctx context.Context) *ItemTranslation
FirstX is like First, but panics if an error occurs.
func (*ItemTranslationQuery) GroupBy ¶
func (itq *ItemTranslationQuery) GroupBy(field string, fields ...string) *ItemTranslationGroupBy
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 { Locale itemtranslation.Locale `json:"locale,omitempty"` Count int `json:"count,omitempty"` } client.ItemTranslation.Query(). GroupBy(itemtranslation.FieldLocale). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ItemTranslationQuery) IDs ¶
IDs executes the query and returns a list of ItemTranslation IDs.
func (*ItemTranslationQuery) IDsX ¶
func (itq *ItemTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ItemTranslationQuery) Limit ¶
func (itq *ItemTranslationQuery) Limit(limit int) *ItemTranslationQuery
Limit adds a limit step to the query.
func (*ItemTranslationQuery) Offset ¶
func (itq *ItemTranslationQuery) Offset(offset int) *ItemTranslationQuery
Offset adds an offset step to the query.
func (*ItemTranslationQuery) Only ¶
func (itq *ItemTranslationQuery) Only(ctx context.Context) (*ItemTranslation, error)
Only returns a single ItemTranslation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ItemTranslation entity is found. Returns a *NotFoundError when no ItemTranslation entities are found.
func (*ItemTranslationQuery) OnlyID ¶
OnlyID is like Only, but returns the only ItemTranslation ID in the query. Returns a *NotSingularError when more than one ItemTranslation ID is found. Returns a *NotFoundError when no entities are found.
func (*ItemTranslationQuery) OnlyIDX ¶
func (itq *ItemTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ItemTranslationQuery) OnlyX ¶
func (itq *ItemTranslationQuery) OnlyX(ctx context.Context) *ItemTranslation
OnlyX is like Only, but panics if an error occurs.
func (*ItemTranslationQuery) Order ¶
func (itq *ItemTranslationQuery) Order(o ...OrderFunc) *ItemTranslationQuery
Order adds an order step to the query.
func (*ItemTranslationQuery) QueryItem ¶
func (itq *ItemTranslationQuery) QueryItem() *ItemQuery
QueryItem chains the current query on the "item" edge.
func (*ItemTranslationQuery) Select ¶
func (itq *ItemTranslationQuery) Select(fields ...string) *ItemTranslationSelect
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 { Locale itemtranslation.Locale `json:"locale,omitempty"` } client.ItemTranslation.Query(). Select(itemtranslation.FieldLocale). Scan(ctx, &v)
func (*ItemTranslationQuery) Unique ¶
func (itq *ItemTranslationQuery) Unique(unique bool) *ItemTranslationQuery
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 (*ItemTranslationQuery) Where ¶
func (itq *ItemTranslationQuery) Where(ps ...predicate.ItemTranslation) *ItemTranslationQuery
Where adds a new predicate for the ItemTranslationQuery builder.
func (*ItemTranslationQuery) WithItem ¶
func (itq *ItemTranslationQuery) WithItem(opts ...func(*ItemQuery)) *ItemTranslationQuery
WithItem tells the query-builder to eager-load the nodes that are connected to the "item" edge. The optional arguments are used to configure the query builder of the edge.
type ItemTranslationSelect ¶
type ItemTranslationSelect struct { *ItemTranslationQuery // contains filtered or unexported fields }
ItemTranslationSelect is the builder for selecting fields of ItemTranslation entities.
func (*ItemTranslationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemTranslationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemTranslationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemTranslationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemTranslationSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ItemTranslationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemTranslationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemTranslationSelect) Scan ¶
func (its *ItemTranslationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ItemTranslationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemTranslationUpdate ¶
type ItemTranslationUpdate struct {
// contains filtered or unexported fields
}
ItemTranslationUpdate is the builder for updating ItemTranslation entities.
func (*ItemTranslationUpdate) ClearItem ¶
func (itu *ItemTranslationUpdate) ClearItem() *ItemTranslationUpdate
ClearItem clears the "item" edge to the Item entity.
func (*ItemTranslationUpdate) Exec ¶
func (itu *ItemTranslationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemTranslationUpdate) ExecX ¶
func (itu *ItemTranslationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemTranslationUpdate) Mutation ¶
func (itu *ItemTranslationUpdate) Mutation() *ItemTranslationMutation
Mutation returns the ItemTranslationMutation object of the builder.
func (*ItemTranslationUpdate) Save ¶
func (itu *ItemTranslationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ItemTranslationUpdate) SaveX ¶
func (itu *ItemTranslationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ItemTranslationUpdate) SetContent ¶
func (itu *ItemTranslationUpdate) SetContent(s string) *ItemTranslationUpdate
SetContent sets the "content" field.
func (*ItemTranslationUpdate) SetItem ¶
func (itu *ItemTranslationUpdate) SetItem(i *Item) *ItemTranslationUpdate
SetItem sets the "item" edge to the Item entity.
func (*ItemTranslationUpdate) SetItemID ¶
func (itu *ItemTranslationUpdate) SetItemID(id uuid.UUID) *ItemTranslationUpdate
SetItemID sets the "item" edge to the Item entity by ID.
func (*ItemTranslationUpdate) SetNillableItemID ¶
func (itu *ItemTranslationUpdate) SetNillableItemID(id *uuid.UUID) *ItemTranslationUpdate
SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.
func (*ItemTranslationUpdate) Where ¶
func (itu *ItemTranslationUpdate) Where(ps ...predicate.ItemTranslation) *ItemTranslationUpdate
Where appends a list predicates to the ItemTranslationUpdate builder.
type ItemTranslationUpdateOne ¶
type ItemTranslationUpdateOne struct {
// contains filtered or unexported fields
}
ItemTranslationUpdateOne is the builder for updating a single ItemTranslation entity.
func (*ItemTranslationUpdateOne) ClearItem ¶
func (ituo *ItemTranslationUpdateOne) ClearItem() *ItemTranslationUpdateOne
ClearItem clears the "item" edge to the Item entity.
func (*ItemTranslationUpdateOne) Exec ¶
func (ituo *ItemTranslationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ItemTranslationUpdateOne) ExecX ¶
func (ituo *ItemTranslationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemTranslationUpdateOne) Mutation ¶
func (ituo *ItemTranslationUpdateOne) Mutation() *ItemTranslationMutation
Mutation returns the ItemTranslationMutation object of the builder.
func (*ItemTranslationUpdateOne) Save ¶
func (ituo *ItemTranslationUpdateOne) Save(ctx context.Context) (*ItemTranslation, error)
Save executes the query and returns the updated ItemTranslation entity.
func (*ItemTranslationUpdateOne) SaveX ¶
func (ituo *ItemTranslationUpdateOne) SaveX(ctx context.Context) *ItemTranslation
SaveX is like Save, but panics if an error occurs.
func (*ItemTranslationUpdateOne) Select ¶
func (ituo *ItemTranslationUpdateOne) Select(field string, fields ...string) *ItemTranslationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ItemTranslationUpdateOne) SetContent ¶
func (ituo *ItemTranslationUpdateOne) SetContent(s string) *ItemTranslationUpdateOne
SetContent sets the "content" field.
func (*ItemTranslationUpdateOne) SetItem ¶
func (ituo *ItemTranslationUpdateOne) SetItem(i *Item) *ItemTranslationUpdateOne
SetItem sets the "item" edge to the Item entity.
func (*ItemTranslationUpdateOne) SetItemID ¶
func (ituo *ItemTranslationUpdateOne) SetItemID(id uuid.UUID) *ItemTranslationUpdateOne
SetItemID sets the "item" edge to the Item entity by ID.
func (*ItemTranslationUpdateOne) SetNillableItemID ¶
func (ituo *ItemTranslationUpdateOne) SetNillableItemID(id *uuid.UUID) *ItemTranslationUpdateOne
SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.
type ItemTranslations ¶
type ItemTranslations []*ItemTranslation
ItemTranslations is a parsable slice of ItemTranslation.
type ItemUpdate ¶
type ItemUpdate struct {
// contains filtered or unexported fields
}
ItemUpdate is the builder for updating Item entities.
func (*ItemUpdate) AddQuestion ¶
func (iu *ItemUpdate) AddQuestion(q ...*Question) *ItemUpdate
AddQuestion adds the "question" edges to the Question entity.
func (*ItemUpdate) AddQuestionIDs ¶
func (iu *ItemUpdate) AddQuestionIDs(ids ...uuid.UUID) *ItemUpdate
AddQuestionIDs adds the "question" edge to the Question entity by IDs.
func (*ItemUpdate) AddResponseIDs ¶
func (iu *ItemUpdate) AddResponseIDs(ids ...uuid.UUID) *ItemUpdate
AddResponseIDs adds the "responses" edge to the Response entity by IDs.
func (*ItemUpdate) AddResponses ¶
func (iu *ItemUpdate) AddResponses(r ...*Response) *ItemUpdate
AddResponses adds the "responses" edges to the Response entity.
func (*ItemUpdate) AddScale ¶
func (iu *ItemUpdate) AddScale(s ...*Scale) *ItemUpdate
AddScale adds the "scale" edges to the Scale entity.
func (*ItemUpdate) AddScaleIDs ¶
func (iu *ItemUpdate) AddScaleIDs(ids ...uuid.UUID) *ItemUpdate
AddScaleIDs adds the "scale" edge to the Scale entity by IDs.
func (*ItemUpdate) AddSteps ¶
func (iu *ItemUpdate) AddSteps(i int) *ItemUpdate
AddSteps adds i to the "steps" field.
func (*ItemUpdate) AddTranslationIDs ¶
func (iu *ItemUpdate) AddTranslationIDs(ids ...uuid.UUID) *ItemUpdate
AddTranslationIDs adds the "translations" edge to the ItemTranslation entity by IDs.
func (*ItemUpdate) AddTranslations ¶
func (iu *ItemUpdate) AddTranslations(i ...*ItemTranslation) *ItemUpdate
AddTranslations adds the "translations" edges to the ItemTranslation entity.
func (*ItemUpdate) ClearQuestion ¶
func (iu *ItemUpdate) ClearQuestion() *ItemUpdate
ClearQuestion clears all "question" edges to the Question entity.
func (*ItemUpdate) ClearResponses ¶
func (iu *ItemUpdate) ClearResponses() *ItemUpdate
ClearResponses clears all "responses" edges to the Response entity.
func (*ItemUpdate) ClearScale ¶
func (iu *ItemUpdate) ClearScale() *ItemUpdate
ClearScale clears all "scale" edges to the Scale entity.
func (*ItemUpdate) ClearTranslations ¶
func (iu *ItemUpdate) ClearTranslations() *ItemUpdate
ClearTranslations clears all "translations" edges to the ItemTranslation entity.
func (*ItemUpdate) Exec ¶
func (iu *ItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemUpdate) ExecX ¶
func (iu *ItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpdate) Mutation ¶
func (iu *ItemUpdate) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemUpdate) RemoveQuestion ¶
func (iu *ItemUpdate) RemoveQuestion(q ...*Question) *ItemUpdate
RemoveQuestion removes "question" edges to Question entities.
func (*ItemUpdate) RemoveQuestionIDs ¶
func (iu *ItemUpdate) RemoveQuestionIDs(ids ...uuid.UUID) *ItemUpdate
RemoveQuestionIDs removes the "question" edge to Question entities by IDs.
func (*ItemUpdate) RemoveResponseIDs ¶
func (iu *ItemUpdate) RemoveResponseIDs(ids ...uuid.UUID) *ItemUpdate
RemoveResponseIDs removes the "responses" edge to Response entities by IDs.
func (*ItemUpdate) RemoveResponses ¶
func (iu *ItemUpdate) RemoveResponses(r ...*Response) *ItemUpdate
RemoveResponses removes "responses" edges to Response entities.
func (*ItemUpdate) RemoveScale ¶
func (iu *ItemUpdate) RemoveScale(s ...*Scale) *ItemUpdate
RemoveScale removes "scale" edges to Scale entities.
func (*ItemUpdate) RemoveScaleIDs ¶
func (iu *ItemUpdate) RemoveScaleIDs(ids ...uuid.UUID) *ItemUpdate
RemoveScaleIDs removes the "scale" edge to Scale entities by IDs.
func (*ItemUpdate) RemoveTranslationIDs ¶
func (iu *ItemUpdate) RemoveTranslationIDs(ids ...uuid.UUID) *ItemUpdate
RemoveTranslationIDs removes the "translations" edge to ItemTranslation entities by IDs.
func (*ItemUpdate) RemoveTranslations ¶
func (iu *ItemUpdate) RemoveTranslations(i ...*ItemTranslation) *ItemUpdate
RemoveTranslations removes "translations" edges to ItemTranslation entities.
func (*ItemUpdate) Save ¶
func (iu *ItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ItemUpdate) SaveX ¶
func (iu *ItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ItemUpdate) SetNillableSteps ¶
func (iu *ItemUpdate) SetNillableSteps(i *int) *ItemUpdate
SetNillableSteps sets the "steps" field if the given value is not nil.
func (*ItemUpdate) SetSteps ¶
func (iu *ItemUpdate) SetSteps(i int) *ItemUpdate
SetSteps sets the "steps" field.
func (*ItemUpdate) SetUpdateTime ¶
func (iu *ItemUpdate) SetUpdateTime(t time.Time) *ItemUpdate
SetUpdateTime sets the "update_time" field.
func (*ItemUpdate) Where ¶
func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate
Where appends a list predicates to the ItemUpdate builder.
type ItemUpdateOne ¶
type ItemUpdateOne struct {
// contains filtered or unexported fields
}
ItemUpdateOne is the builder for updating a single Item entity.
func (*ItemUpdateOne) AddQuestion ¶
func (iuo *ItemUpdateOne) AddQuestion(q ...*Question) *ItemUpdateOne
AddQuestion adds the "question" edges to the Question entity.
func (*ItemUpdateOne) AddQuestionIDs ¶
func (iuo *ItemUpdateOne) AddQuestionIDs(ids ...uuid.UUID) *ItemUpdateOne
AddQuestionIDs adds the "question" edge to the Question entity by IDs.
func (*ItemUpdateOne) AddResponseIDs ¶
func (iuo *ItemUpdateOne) AddResponseIDs(ids ...uuid.UUID) *ItemUpdateOne
AddResponseIDs adds the "responses" edge to the Response entity by IDs.
func (*ItemUpdateOne) AddResponses ¶
func (iuo *ItemUpdateOne) AddResponses(r ...*Response) *ItemUpdateOne
AddResponses adds the "responses" edges to the Response entity.
func (*ItemUpdateOne) AddScale ¶
func (iuo *ItemUpdateOne) AddScale(s ...*Scale) *ItemUpdateOne
AddScale adds the "scale" edges to the Scale entity.
func (*ItemUpdateOne) AddScaleIDs ¶
func (iuo *ItemUpdateOne) AddScaleIDs(ids ...uuid.UUID) *ItemUpdateOne
AddScaleIDs adds the "scale" edge to the Scale entity by IDs.
func (*ItemUpdateOne) AddSteps ¶
func (iuo *ItemUpdateOne) AddSteps(i int) *ItemUpdateOne
AddSteps adds i to the "steps" field.
func (*ItemUpdateOne) AddTranslationIDs ¶
func (iuo *ItemUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *ItemUpdateOne
AddTranslationIDs adds the "translations" edge to the ItemTranslation entity by IDs.
func (*ItemUpdateOne) AddTranslations ¶
func (iuo *ItemUpdateOne) AddTranslations(i ...*ItemTranslation) *ItemUpdateOne
AddTranslations adds the "translations" edges to the ItemTranslation entity.
func (*ItemUpdateOne) ClearQuestion ¶
func (iuo *ItemUpdateOne) ClearQuestion() *ItemUpdateOne
ClearQuestion clears all "question" edges to the Question entity.
func (*ItemUpdateOne) ClearResponses ¶
func (iuo *ItemUpdateOne) ClearResponses() *ItemUpdateOne
ClearResponses clears all "responses" edges to the Response entity.
func (*ItemUpdateOne) ClearScale ¶
func (iuo *ItemUpdateOne) ClearScale() *ItemUpdateOne
ClearScale clears all "scale" edges to the Scale entity.
func (*ItemUpdateOne) ClearTranslations ¶
func (iuo *ItemUpdateOne) ClearTranslations() *ItemUpdateOne
ClearTranslations clears all "translations" edges to the ItemTranslation entity.
func (*ItemUpdateOne) Exec ¶
func (iuo *ItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ItemUpdateOne) ExecX ¶
func (iuo *ItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpdateOne) Mutation ¶
func (iuo *ItemUpdateOne) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemUpdateOne) RemoveQuestion ¶
func (iuo *ItemUpdateOne) RemoveQuestion(q ...*Question) *ItemUpdateOne
RemoveQuestion removes "question" edges to Question entities.
func (*ItemUpdateOne) RemoveQuestionIDs ¶
func (iuo *ItemUpdateOne) RemoveQuestionIDs(ids ...uuid.UUID) *ItemUpdateOne
RemoveQuestionIDs removes the "question" edge to Question entities by IDs.
func (*ItemUpdateOne) RemoveResponseIDs ¶
func (iuo *ItemUpdateOne) RemoveResponseIDs(ids ...uuid.UUID) *ItemUpdateOne
RemoveResponseIDs removes the "responses" edge to Response entities by IDs.
func (*ItemUpdateOne) RemoveResponses ¶
func (iuo *ItemUpdateOne) RemoveResponses(r ...*Response) *ItemUpdateOne
RemoveResponses removes "responses" edges to Response entities.
func (*ItemUpdateOne) RemoveScale ¶
func (iuo *ItemUpdateOne) RemoveScale(s ...*Scale) *ItemUpdateOne
RemoveScale removes "scale" edges to Scale entities.
func (*ItemUpdateOne) RemoveScaleIDs ¶
func (iuo *ItemUpdateOne) RemoveScaleIDs(ids ...uuid.UUID) *ItemUpdateOne
RemoveScaleIDs removes the "scale" edge to Scale entities by IDs.
func (*ItemUpdateOne) RemoveTranslationIDs ¶
func (iuo *ItemUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *ItemUpdateOne
RemoveTranslationIDs removes the "translations" edge to ItemTranslation entities by IDs.
func (*ItemUpdateOne) RemoveTranslations ¶
func (iuo *ItemUpdateOne) RemoveTranslations(i ...*ItemTranslation) *ItemUpdateOne
RemoveTranslations removes "translations" edges to ItemTranslation entities.
func (*ItemUpdateOne) Save ¶
func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)
Save executes the query and returns the updated Item entity.
func (*ItemUpdateOne) SaveX ¶
func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item
SaveX is like Save, but panics if an error occurs.
func (*ItemUpdateOne) Select ¶
func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ItemUpdateOne) SetNillableSteps ¶
func (iuo *ItemUpdateOne) SetNillableSteps(i *int) *ItemUpdateOne
SetNillableSteps sets the "steps" field if the given value is not nil.
func (*ItemUpdateOne) SetSteps ¶
func (iuo *ItemUpdateOne) SetSteps(i int) *ItemUpdateOne
SetSteps sets the "steps" field.
func (*ItemUpdateOne) SetUpdateTime ¶
func (iuo *ItemUpdateOne) SetUpdateTime(t time.Time) *ItemUpdateOne
SetUpdateTime sets the "update_time" field.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type Norm ¶
type Norm struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Base holds the value of the "base" field. Base int `json:"base,omitempty"` // Mean holds the value of the "mean" field. Mean float64 `json:"mean,omitempty"` // Sigma holds the value of the "sigma" field. Sigma float64 `json:"sigma,omitempty"` // Rank holds the value of the "rank" field. Rank int `json:"rank,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NormQuery when eager-loading is set. Edges NormEdges `json:"edges"` // contains filtered or unexported fields }
Norm is the model entity for the Norm schema.
func (*Norm) QuerySample ¶
func (n *Norm) QuerySample() *SampleQuery
QuerySample queries the "sample" edge of the Norm entity.
func (*Norm) QueryScale ¶
func (n *Norm) QueryScale() *ScaleQuery
QueryScale queries the "scale" edge of the Norm entity.
func (*Norm) Unwrap ¶
Unwrap unwraps the Norm 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 (*Norm) Update ¶
func (n *Norm) Update() *NormUpdateOne
Update returns a builder for updating this Norm. Note that you need to call Norm.Unwrap() before calling this method if this Norm was returned from a transaction, and the transaction was committed or rolled back.
type NormClient ¶
type NormClient struct {
// contains filtered or unexported fields
}
NormClient is a client for the Norm schema.
func NewNormClient ¶
func NewNormClient(c config) *NormClient
NewNormClient returns a client for the Norm from the given config.
func (*NormClient) Create ¶
func (c *NormClient) Create() *NormCreate
Create returns a builder for creating a Norm entity.
func (*NormClient) CreateBulk ¶
func (c *NormClient) CreateBulk(builders ...*NormCreate) *NormCreateBulk
CreateBulk returns a builder for creating a bulk of Norm entities.
func (*NormClient) Delete ¶
func (c *NormClient) Delete() *NormDelete
Delete returns a delete builder for Norm.
func (*NormClient) DeleteOne ¶
func (c *NormClient) DeleteOne(n *Norm) *NormDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NormClient) DeleteOneID ¶
func (c *NormClient) DeleteOneID(id uuid.UUID) *NormDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*NormClient) Query ¶
func (c *NormClient) Query() *NormQuery
Query returns a query builder for Norm.
func (*NormClient) QuerySample ¶
func (c *NormClient) QuerySample(n *Norm) *SampleQuery
QuerySample queries the sample edge of a Norm.
func (*NormClient) QueryScale ¶
func (c *NormClient) QueryScale(n *Norm) *ScaleQuery
QueryScale queries the scale edge of a Norm.
func (*NormClient) Update ¶
func (c *NormClient) Update() *NormUpdate
Update returns an update builder for Norm.
func (*NormClient) UpdateOne ¶
func (c *NormClient) UpdateOne(n *Norm) *NormUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NormClient) UpdateOneID ¶
func (c *NormClient) UpdateOneID(id uuid.UUID) *NormUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NormClient) Use ¶
func (c *NormClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `norm.Hooks(f(g(h())))`.
type NormCreate ¶
type NormCreate struct {
// contains filtered or unexported fields
}
NormCreate is the builder for creating a Norm entity.
func (*NormCreate) Exec ¶
func (nc *NormCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NormCreate) ExecX ¶
func (nc *NormCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NormCreate) Mutation ¶
func (nc *NormCreate) Mutation() *NormMutation
Mutation returns the NormMutation object of the builder.
func (*NormCreate) Save ¶
func (nc *NormCreate) Save(ctx context.Context) (*Norm, error)
Save creates the Norm in the database.
func (*NormCreate) SaveX ¶
func (nc *NormCreate) SaveX(ctx context.Context) *Norm
SaveX calls Save and panics if Save returns an error.
func (*NormCreate) SetBase ¶
func (nc *NormCreate) SetBase(i int) *NormCreate
SetBase sets the "base" field.
func (*NormCreate) SetCreateTime ¶
func (nc *NormCreate) SetCreateTime(t time.Time) *NormCreate
SetCreateTime sets the "create_time" field.
func (*NormCreate) SetID ¶
func (nc *NormCreate) SetID(u uuid.UUID) *NormCreate
SetID sets the "id" field.
func (*NormCreate) SetMean ¶
func (nc *NormCreate) SetMean(f float64) *NormCreate
SetMean sets the "mean" field.
func (*NormCreate) SetMeta ¶
func (nc *NormCreate) SetMeta(m map[string]interface{}) *NormCreate
SetMeta sets the "meta" field.
func (*NormCreate) SetName ¶
func (nc *NormCreate) SetName(s string) *NormCreate
SetName sets the "name" field.
func (*NormCreate) SetNillableBase ¶
func (nc *NormCreate) SetNillableBase(i *int) *NormCreate
SetNillableBase sets the "base" field if the given value is not nil.
func (*NormCreate) SetNillableCreateTime ¶
func (nc *NormCreate) SetNillableCreateTime(t *time.Time) *NormCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*NormCreate) SetNillableID ¶
func (nc *NormCreate) SetNillableID(u *uuid.UUID) *NormCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*NormCreate) SetNillableRank ¶
func (nc *NormCreate) SetNillableRank(i *int) *NormCreate
SetNillableRank sets the "rank" field if the given value is not nil.
func (*NormCreate) SetNillableUpdateTime ¶
func (nc *NormCreate) SetNillableUpdateTime(t *time.Time) *NormCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*NormCreate) SetRank ¶
func (nc *NormCreate) SetRank(i int) *NormCreate
SetRank sets the "rank" field.
func (*NormCreate) SetSample ¶
func (nc *NormCreate) SetSample(s *Sample) *NormCreate
SetSample sets the "sample" edge to the Sample entity.
func (*NormCreate) SetSampleID ¶
func (nc *NormCreate) SetSampleID(id uuid.UUID) *NormCreate
SetSampleID sets the "sample" edge to the Sample entity by ID.
func (*NormCreate) SetScale ¶
func (nc *NormCreate) SetScale(s *Scale) *NormCreate
SetScale sets the "scale" edge to the Scale entity.
func (*NormCreate) SetScaleID ¶
func (nc *NormCreate) SetScaleID(id uuid.UUID) *NormCreate
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*NormCreate) SetSigma ¶
func (nc *NormCreate) SetSigma(f float64) *NormCreate
SetSigma sets the "sigma" field.
func (*NormCreate) SetUpdateTime ¶
func (nc *NormCreate) SetUpdateTime(t time.Time) *NormCreate
SetUpdateTime sets the "update_time" field.
type NormCreateBulk ¶
type NormCreateBulk struct {
// contains filtered or unexported fields
}
NormCreateBulk is the builder for creating many Norm entities in bulk.
func (*NormCreateBulk) Exec ¶
func (ncb *NormCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NormCreateBulk) ExecX ¶
func (ncb *NormCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NormDelete ¶
type NormDelete struct {
// contains filtered or unexported fields
}
NormDelete is the builder for deleting a Norm entity.
func (*NormDelete) Exec ¶
func (nd *NormDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NormDelete) ExecX ¶
func (nd *NormDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NormDelete) Where ¶
func (nd *NormDelete) Where(ps ...predicate.Norm) *NormDelete
Where appends a list predicates to the NormDelete builder.
type NormDeleteOne ¶
type NormDeleteOne struct {
// contains filtered or unexported fields
}
NormDeleteOne is the builder for deleting a single Norm entity.
func (*NormDeleteOne) Exec ¶
func (ndo *NormDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NormDeleteOne) ExecX ¶
func (ndo *NormDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NormEdges ¶
type NormEdges struct { // Sample holds the value of the sample edge. Sample *Sample `json:"sample,omitempty"` // Scale holds the value of the scale edge. Scale *Scale `json:"scale,omitempty"` // contains filtered or unexported fields }
NormEdges holds the relations/edges for other nodes in the graph.
func (NormEdges) SampleOrErr ¶
SampleOrErr returns the Sample value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NormEdges) ScaleOrErr ¶
ScaleOrErr returns the Scale value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NormGroupBy ¶
type NormGroupBy struct {
// contains filtered or unexported fields
}
NormGroupBy is the group-by builder for Norm entities.
func (*NormGroupBy) Aggregate ¶
func (ngb *NormGroupBy) Aggregate(fns ...AggregateFunc) *NormGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NormGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NormGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NormGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NormGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NormGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NormGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NormGroupBy) Scan ¶
func (ngb *NormGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*NormGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NormMutation ¶
type NormMutation struct {
// contains filtered or unexported fields
}
NormMutation represents an operation that mutates the Norm nodes in the graph.
func (*NormMutation) AddBase ¶
func (m *NormMutation) AddBase(i int)
AddBase adds i to the "base" field.
func (*NormMutation) AddField ¶
func (m *NormMutation) 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 (*NormMutation) AddMean ¶
func (m *NormMutation) AddMean(f float64)
AddMean adds f to the "mean" field.
func (*NormMutation) AddRank ¶
func (m *NormMutation) AddRank(i int)
AddRank adds i to the "rank" field.
func (*NormMutation) AddSigma ¶
func (m *NormMutation) AddSigma(f float64)
AddSigma adds f to the "sigma" field.
func (*NormMutation) AddedBase ¶
func (m *NormMutation) AddedBase() (r int, exists bool)
AddedBase returns the value that was added to the "base" field in this mutation.
func (*NormMutation) AddedEdges ¶
func (m *NormMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NormMutation) AddedField ¶
func (m *NormMutation) 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 (*NormMutation) AddedFields ¶
func (m *NormMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NormMutation) AddedIDs ¶
func (m *NormMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NormMutation) AddedMean ¶
func (m *NormMutation) AddedMean() (r float64, exists bool)
AddedMean returns the value that was added to the "mean" field in this mutation.
func (*NormMutation) AddedRank ¶
func (m *NormMutation) AddedRank() (r int, exists bool)
AddedRank returns the value that was added to the "rank" field in this mutation.
func (*NormMutation) AddedSigma ¶
func (m *NormMutation) AddedSigma() (r float64, exists bool)
AddedSigma returns the value that was added to the "sigma" field in this mutation.
func (*NormMutation) Base ¶
func (m *NormMutation) Base() (r int, exists bool)
Base returns the value of the "base" field in the mutation.
func (*NormMutation) ClearEdge ¶
func (m *NormMutation) 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 (*NormMutation) ClearField ¶
func (m *NormMutation) 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 (*NormMutation) ClearMeta ¶
func (m *NormMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*NormMutation) ClearSample ¶
func (m *NormMutation) ClearSample()
ClearSample clears the "sample" edge to the Sample entity.
func (*NormMutation) ClearScale ¶
func (m *NormMutation) ClearScale()
ClearScale clears the "scale" edge to the Scale entity.
func (*NormMutation) ClearedEdges ¶
func (m *NormMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NormMutation) ClearedFields ¶
func (m *NormMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NormMutation) Client ¶
func (m NormMutation) 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 (*NormMutation) CreateTime ¶
func (m *NormMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*NormMutation) EdgeCleared ¶
func (m *NormMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NormMutation) Field ¶
func (m *NormMutation) 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 (*NormMutation) FieldCleared ¶
func (m *NormMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NormMutation) Fields ¶
func (m *NormMutation) 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 (*NormMutation) ID ¶
func (m *NormMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*NormMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*NormMutation) Mean ¶
func (m *NormMutation) Mean() (r float64, exists bool)
Mean returns the value of the "mean" field in the mutation.
func (*NormMutation) Meta ¶
func (m *NormMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*NormMutation) MetaCleared ¶
func (m *NormMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*NormMutation) Name ¶
func (m *NormMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*NormMutation) OldBase ¶
func (m *NormMutation) OldBase(ctx context.Context) (v int, err error)
OldBase returns the old "base" field's value of the Norm entity. If the Norm 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 (*NormMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Norm entity. If the Norm 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 (*NormMutation) 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 (*NormMutation) OldMean ¶
func (m *NormMutation) OldMean(ctx context.Context) (v float64, err error)
OldMean returns the old "mean" field's value of the Norm entity. If the Norm 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 (*NormMutation) OldMeta ¶
func (m *NormMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the Norm entity. If the Norm 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 (*NormMutation) OldName ¶
func (m *NormMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Norm entity. If the Norm 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 (*NormMutation) OldRank ¶
func (m *NormMutation) OldRank(ctx context.Context) (v int, err error)
OldRank returns the old "rank" field's value of the Norm entity. If the Norm 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 (*NormMutation) OldSigma ¶
func (m *NormMutation) OldSigma(ctx context.Context) (v float64, err error)
OldSigma returns the old "sigma" field's value of the Norm entity. If the Norm 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 (*NormMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Norm entity. If the Norm 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 (*NormMutation) Rank ¶
func (m *NormMutation) Rank() (r int, exists bool)
Rank returns the value of the "rank" field in the mutation.
func (*NormMutation) RemovedEdges ¶
func (m *NormMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NormMutation) RemovedIDs ¶
func (m *NormMutation) 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 (*NormMutation) ResetBase ¶
func (m *NormMutation) ResetBase()
ResetBase resets all changes to the "base" field.
func (*NormMutation) ResetCreateTime ¶
func (m *NormMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*NormMutation) ResetEdge ¶
func (m *NormMutation) 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 (*NormMutation) ResetField ¶
func (m *NormMutation) 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 (*NormMutation) ResetMean ¶
func (m *NormMutation) ResetMean()
ResetMean resets all changes to the "mean" field.
func (*NormMutation) ResetMeta ¶
func (m *NormMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*NormMutation) ResetName ¶
func (m *NormMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*NormMutation) ResetRank ¶
func (m *NormMutation) ResetRank()
ResetRank resets all changes to the "rank" field.
func (*NormMutation) ResetSample ¶
func (m *NormMutation) ResetSample()
ResetSample resets all changes to the "sample" edge.
func (*NormMutation) ResetScale ¶
func (m *NormMutation) ResetScale()
ResetScale resets all changes to the "scale" edge.
func (*NormMutation) ResetSigma ¶
func (m *NormMutation) ResetSigma()
ResetSigma resets all changes to the "sigma" field.
func (*NormMutation) ResetUpdateTime ¶
func (m *NormMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*NormMutation) SampleCleared ¶
func (m *NormMutation) SampleCleared() bool
SampleCleared reports if the "sample" edge to the Sample entity was cleared.
func (*NormMutation) SampleID ¶
func (m *NormMutation) SampleID() (id uuid.UUID, exists bool)
SampleID returns the "sample" edge ID in the mutation.
func (*NormMutation) SampleIDs ¶
func (m *NormMutation) SampleIDs() (ids []uuid.UUID)
SampleIDs returns the "sample" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SampleID instead. It exists only for internal usage by the builders.
func (*NormMutation) ScaleCleared ¶
func (m *NormMutation) ScaleCleared() bool
ScaleCleared reports if the "scale" edge to the Scale entity was cleared.
func (*NormMutation) ScaleID ¶
func (m *NormMutation) ScaleID() (id uuid.UUID, exists bool)
ScaleID returns the "scale" edge ID in the mutation.
func (*NormMutation) ScaleIDs ¶
func (m *NormMutation) ScaleIDs() (ids []uuid.UUID)
ScaleIDs returns the "scale" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ScaleID instead. It exists only for internal usage by the builders.
func (*NormMutation) SetCreateTime ¶
func (m *NormMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*NormMutation) SetField ¶
func (m *NormMutation) 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 (*NormMutation) SetID ¶
func (m *NormMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Norm entities.
func (*NormMutation) SetMean ¶
func (m *NormMutation) SetMean(f float64)
SetMean sets the "mean" field.
func (*NormMutation) SetMeta ¶
func (m *NormMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*NormMutation) SetName ¶
func (m *NormMutation) SetName(s string)
SetName sets the "name" field.
func (*NormMutation) SetSampleID ¶
func (m *NormMutation) SetSampleID(id uuid.UUID)
SetSampleID sets the "sample" edge to the Sample entity by id.
func (*NormMutation) SetScaleID ¶
func (m *NormMutation) SetScaleID(id uuid.UUID)
SetScaleID sets the "scale" edge to the Scale entity by id.
func (*NormMutation) SetSigma ¶
func (m *NormMutation) SetSigma(f float64)
SetSigma sets the "sigma" field.
func (*NormMutation) SetUpdateTime ¶
func (m *NormMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*NormMutation) Sigma ¶
func (m *NormMutation) Sigma() (r float64, exists bool)
Sigma returns the value of the "sigma" field in the mutation.
func (NormMutation) Tx ¶
func (m NormMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NormMutation) Type ¶
func (m *NormMutation) Type() string
Type returns the node type of this mutation (Norm).
func (*NormMutation) UpdateTime ¶
func (m *NormMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*NormMutation) Where ¶
func (m *NormMutation) Where(ps ...predicate.Norm)
Where appends a list predicates to the NormMutation builder.
type NormQuery ¶
type NormQuery struct {
// contains filtered or unexported fields
}
NormQuery is the builder for querying Norm entities.
func (*NormQuery) Clone ¶
Clone returns a duplicate of the NormQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NormQuery) First ¶
First returns the first Norm entity from the query. Returns a *NotFoundError when no Norm was found.
func (*NormQuery) FirstID ¶
FirstID returns the first Norm ID from the query. Returns a *NotFoundError when no Norm ID was found.
func (*NormQuery) GroupBy ¶
func (nq *NormQuery) GroupBy(field string, fields ...string) *NormGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Norm.Query(). GroupBy(norm.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NormQuery) Only ¶
Only returns a single Norm entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Norm entity is found. Returns a *NotFoundError when no Norm entities are found.
func (*NormQuery) OnlyID ¶
OnlyID is like Only, but returns the only Norm ID in the query. Returns a *NotSingularError when more than one Norm ID is found. Returns a *NotFoundError when no entities are found.
func (*NormQuery) QuerySample ¶
func (nq *NormQuery) QuerySample() *SampleQuery
QuerySample chains the current query on the "sample" edge.
func (*NormQuery) QueryScale ¶
func (nq *NormQuery) QueryScale() *ScaleQuery
QueryScale chains the current query on the "scale" edge.
func (*NormQuery) Select ¶
func (nq *NormQuery) Select(fields ...string) *NormSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Norm.Query(). Select(norm.FieldCreateTime). Scan(ctx, &v)
func (*NormQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*NormQuery) WithSample ¶
func (nq *NormQuery) WithSample(opts ...func(*SampleQuery)) *NormQuery
WithSample tells the query-builder to eager-load the nodes that are connected to the "sample" edge. The optional arguments are used to configure the query builder of the edge.
func (*NormQuery) WithScale ¶
func (nq *NormQuery) WithScale(opts ...func(*ScaleQuery)) *NormQuery
WithScale tells the query-builder to eager-load the nodes that are connected to the "scale" edge. The optional arguments are used to configure the query builder of the edge.
type NormSelect ¶
type NormSelect struct { *NormQuery // contains filtered or unexported fields }
NormSelect is the builder for selecting fields of Norm entities.
func (*NormSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NormSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NormSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NormSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NormSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NormSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NormSelect) Scan ¶
func (ns *NormSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*NormSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NormUpdate ¶
type NormUpdate struct {
// contains filtered or unexported fields
}
NormUpdate is the builder for updating Norm entities.
func (*NormUpdate) AddBase ¶
func (nu *NormUpdate) AddBase(i int) *NormUpdate
AddBase adds i to the "base" field.
func (*NormUpdate) AddMean ¶
func (nu *NormUpdate) AddMean(f float64) *NormUpdate
AddMean adds f to the "mean" field.
func (*NormUpdate) AddRank ¶
func (nu *NormUpdate) AddRank(i int) *NormUpdate
AddRank adds i to the "rank" field.
func (*NormUpdate) AddSigma ¶
func (nu *NormUpdate) AddSigma(f float64) *NormUpdate
AddSigma adds f to the "sigma" field.
func (*NormUpdate) ClearMeta ¶
func (nu *NormUpdate) ClearMeta() *NormUpdate
ClearMeta clears the value of the "meta" field.
func (*NormUpdate) ClearSample ¶
func (nu *NormUpdate) ClearSample() *NormUpdate
ClearSample clears the "sample" edge to the Sample entity.
func (*NormUpdate) ClearScale ¶
func (nu *NormUpdate) ClearScale() *NormUpdate
ClearScale clears the "scale" edge to the Scale entity.
func (*NormUpdate) Exec ¶
func (nu *NormUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NormUpdate) ExecX ¶
func (nu *NormUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NormUpdate) Mutation ¶
func (nu *NormUpdate) Mutation() *NormMutation
Mutation returns the NormMutation object of the builder.
func (*NormUpdate) Save ¶
func (nu *NormUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NormUpdate) SaveX ¶
func (nu *NormUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NormUpdate) SetBase ¶
func (nu *NormUpdate) SetBase(i int) *NormUpdate
SetBase sets the "base" field.
func (*NormUpdate) SetMean ¶
func (nu *NormUpdate) SetMean(f float64) *NormUpdate
SetMean sets the "mean" field.
func (*NormUpdate) SetMeta ¶
func (nu *NormUpdate) SetMeta(m map[string]interface{}) *NormUpdate
SetMeta sets the "meta" field.
func (*NormUpdate) SetName ¶
func (nu *NormUpdate) SetName(s string) *NormUpdate
SetName sets the "name" field.
func (*NormUpdate) SetNillableBase ¶
func (nu *NormUpdate) SetNillableBase(i *int) *NormUpdate
SetNillableBase sets the "base" field if the given value is not nil.
func (*NormUpdate) SetNillableRank ¶
func (nu *NormUpdate) SetNillableRank(i *int) *NormUpdate
SetNillableRank sets the "rank" field if the given value is not nil.
func (*NormUpdate) SetRank ¶
func (nu *NormUpdate) SetRank(i int) *NormUpdate
SetRank sets the "rank" field.
func (*NormUpdate) SetSample ¶
func (nu *NormUpdate) SetSample(s *Sample) *NormUpdate
SetSample sets the "sample" edge to the Sample entity.
func (*NormUpdate) SetSampleID ¶
func (nu *NormUpdate) SetSampleID(id uuid.UUID) *NormUpdate
SetSampleID sets the "sample" edge to the Sample entity by ID.
func (*NormUpdate) SetScale ¶
func (nu *NormUpdate) SetScale(s *Scale) *NormUpdate
SetScale sets the "scale" edge to the Scale entity.
func (*NormUpdate) SetScaleID ¶
func (nu *NormUpdate) SetScaleID(id uuid.UUID) *NormUpdate
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*NormUpdate) SetSigma ¶
func (nu *NormUpdate) SetSigma(f float64) *NormUpdate
SetSigma sets the "sigma" field.
func (*NormUpdate) SetUpdateTime ¶
func (nu *NormUpdate) SetUpdateTime(t time.Time) *NormUpdate
SetUpdateTime sets the "update_time" field.
func (*NormUpdate) Where ¶
func (nu *NormUpdate) Where(ps ...predicate.Norm) *NormUpdate
Where appends a list predicates to the NormUpdate builder.
type NormUpdateOne ¶
type NormUpdateOne struct {
// contains filtered or unexported fields
}
NormUpdateOne is the builder for updating a single Norm entity.
func (*NormUpdateOne) AddBase ¶
func (nuo *NormUpdateOne) AddBase(i int) *NormUpdateOne
AddBase adds i to the "base" field.
func (*NormUpdateOne) AddMean ¶
func (nuo *NormUpdateOne) AddMean(f float64) *NormUpdateOne
AddMean adds f to the "mean" field.
func (*NormUpdateOne) AddRank ¶
func (nuo *NormUpdateOne) AddRank(i int) *NormUpdateOne
AddRank adds i to the "rank" field.
func (*NormUpdateOne) AddSigma ¶
func (nuo *NormUpdateOne) AddSigma(f float64) *NormUpdateOne
AddSigma adds f to the "sigma" field.
func (*NormUpdateOne) ClearMeta ¶
func (nuo *NormUpdateOne) ClearMeta() *NormUpdateOne
ClearMeta clears the value of the "meta" field.
func (*NormUpdateOne) ClearSample ¶
func (nuo *NormUpdateOne) ClearSample() *NormUpdateOne
ClearSample clears the "sample" edge to the Sample entity.
func (*NormUpdateOne) ClearScale ¶
func (nuo *NormUpdateOne) ClearScale() *NormUpdateOne
ClearScale clears the "scale" edge to the Scale entity.
func (*NormUpdateOne) Exec ¶
func (nuo *NormUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NormUpdateOne) ExecX ¶
func (nuo *NormUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NormUpdateOne) Mutation ¶
func (nuo *NormUpdateOne) Mutation() *NormMutation
Mutation returns the NormMutation object of the builder.
func (*NormUpdateOne) Save ¶
func (nuo *NormUpdateOne) Save(ctx context.Context) (*Norm, error)
Save executes the query and returns the updated Norm entity.
func (*NormUpdateOne) SaveX ¶
func (nuo *NormUpdateOne) SaveX(ctx context.Context) *Norm
SaveX is like Save, but panics if an error occurs.
func (*NormUpdateOne) Select ¶
func (nuo *NormUpdateOne) Select(field string, fields ...string) *NormUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NormUpdateOne) SetBase ¶
func (nuo *NormUpdateOne) SetBase(i int) *NormUpdateOne
SetBase sets the "base" field.
func (*NormUpdateOne) SetMean ¶
func (nuo *NormUpdateOne) SetMean(f float64) *NormUpdateOne
SetMean sets the "mean" field.
func (*NormUpdateOne) SetMeta ¶
func (nuo *NormUpdateOne) SetMeta(m map[string]interface{}) *NormUpdateOne
SetMeta sets the "meta" field.
func (*NormUpdateOne) SetName ¶
func (nuo *NormUpdateOne) SetName(s string) *NormUpdateOne
SetName sets the "name" field.
func (*NormUpdateOne) SetNillableBase ¶
func (nuo *NormUpdateOne) SetNillableBase(i *int) *NormUpdateOne
SetNillableBase sets the "base" field if the given value is not nil.
func (*NormUpdateOne) SetNillableRank ¶
func (nuo *NormUpdateOne) SetNillableRank(i *int) *NormUpdateOne
SetNillableRank sets the "rank" field if the given value is not nil.
func (*NormUpdateOne) SetRank ¶
func (nuo *NormUpdateOne) SetRank(i int) *NormUpdateOne
SetRank sets the "rank" field.
func (*NormUpdateOne) SetSample ¶
func (nuo *NormUpdateOne) SetSample(s *Sample) *NormUpdateOne
SetSample sets the "sample" edge to the Sample entity.
func (*NormUpdateOne) SetSampleID ¶
func (nuo *NormUpdateOne) SetSampleID(id uuid.UUID) *NormUpdateOne
SetSampleID sets the "sample" edge to the Sample entity by ID.
func (*NormUpdateOne) SetScale ¶
func (nuo *NormUpdateOne) SetScale(s *Scale) *NormUpdateOne
SetScale sets the "scale" edge to the Scale entity.
func (*NormUpdateOne) SetScaleID ¶
func (nuo *NormUpdateOne) SetScaleID(id uuid.UUID) *NormUpdateOne
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*NormUpdateOne) SetSigma ¶
func (nuo *NormUpdateOne) SetSigma(f float64) *NormUpdateOne
SetSigma sets the "sigma" field.
func (*NormUpdateOne) SetUpdateTime ¶
func (nuo *NormUpdateOne) SetUpdateTime(t time.Time) *NormUpdateOne
SetUpdateTime sets the "update_time" field.
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 Question ¶
type Question struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Order holds the value of the "order" field. Order int `json:"order,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Type holds the value of the "type" field. Type question.Type `json:"type,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the QuestionQuery when eager-loading is set. Edges QuestionEdges `json:"edges"` // contains filtered or unexported fields }
Question is the model entity for the Question schema.
func (*Question) QueryItems ¶
QueryItems queries the "items" edge of the Question entity.
func (*Question) QueryTranslations ¶
func (q *Question) QueryTranslations() *QuestionTranslationQuery
QueryTranslations queries the "translations" edge of the Question entity.
func (*Question) Unwrap ¶
Unwrap unwraps the Question 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 (*Question) Update ¶
func (q *Question) Update() *QuestionUpdateOne
Update returns a builder for updating this Question. Note that you need to call Question.Unwrap() before calling this method if this Question was returned from a transaction, and the transaction was committed or rolled back.
type QuestionClient ¶
type QuestionClient struct {
// contains filtered or unexported fields
}
QuestionClient is a client for the Question schema.
func NewQuestionClient ¶
func NewQuestionClient(c config) *QuestionClient
NewQuestionClient returns a client for the Question from the given config.
func (*QuestionClient) Create ¶
func (c *QuestionClient) Create() *QuestionCreate
Create returns a builder for creating a Question entity.
func (*QuestionClient) CreateBulk ¶
func (c *QuestionClient) CreateBulk(builders ...*QuestionCreate) *QuestionCreateBulk
CreateBulk returns a builder for creating a bulk of Question entities.
func (*QuestionClient) Delete ¶
func (c *QuestionClient) Delete() *QuestionDelete
Delete returns a delete builder for Question.
func (*QuestionClient) DeleteOne ¶
func (c *QuestionClient) DeleteOne(q *Question) *QuestionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*QuestionClient) DeleteOneID ¶
func (c *QuestionClient) DeleteOneID(id uuid.UUID) *QuestionDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*QuestionClient) Hooks ¶
func (c *QuestionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*QuestionClient) Query ¶
func (c *QuestionClient) Query() *QuestionQuery
Query returns a query builder for Question.
func (*QuestionClient) QueryItems ¶
func (c *QuestionClient) QueryItems(q *Question) *ItemQuery
QueryItems queries the items edge of a Question.
func (*QuestionClient) QueryTest ¶
func (c *QuestionClient) QueryTest(q *Question) *TestQuery
QueryTest queries the test edge of a Question.
func (*QuestionClient) QueryTranslations ¶
func (c *QuestionClient) QueryTranslations(q *Question) *QuestionTranslationQuery
QueryTranslations queries the translations edge of a Question.
func (*QuestionClient) Update ¶
func (c *QuestionClient) Update() *QuestionUpdate
Update returns an update builder for Question.
func (*QuestionClient) UpdateOne ¶
func (c *QuestionClient) UpdateOne(q *Question) *QuestionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*QuestionClient) UpdateOneID ¶
func (c *QuestionClient) UpdateOneID(id uuid.UUID) *QuestionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*QuestionClient) Use ¶
func (c *QuestionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `question.Hooks(f(g(h())))`.
type QuestionCreate ¶
type QuestionCreate struct {
// contains filtered or unexported fields
}
QuestionCreate is the builder for creating a Question entity.
func (*QuestionCreate) AddItemIDs ¶
func (qc *QuestionCreate) AddItemIDs(ids ...uuid.UUID) *QuestionCreate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*QuestionCreate) AddItems ¶
func (qc *QuestionCreate) AddItems(i ...*Item) *QuestionCreate
AddItems adds the "items" edges to the Item entity.
func (*QuestionCreate) AddTest ¶
func (qc *QuestionCreate) AddTest(t ...*Test) *QuestionCreate
AddTest adds the "test" edges to the Test entity.
func (*QuestionCreate) AddTestIDs ¶
func (qc *QuestionCreate) AddTestIDs(ids ...uuid.UUID) *QuestionCreate
AddTestIDs adds the "test" edge to the Test entity by IDs.
func (*QuestionCreate) AddTranslationIDs ¶
func (qc *QuestionCreate) AddTranslationIDs(ids ...uuid.UUID) *QuestionCreate
AddTranslationIDs adds the "translations" edge to the QuestionTranslation entity by IDs.
func (*QuestionCreate) AddTranslations ¶
func (qc *QuestionCreate) AddTranslations(q ...*QuestionTranslation) *QuestionCreate
AddTranslations adds the "translations" edges to the QuestionTranslation entity.
func (*QuestionCreate) Exec ¶
func (qc *QuestionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestionCreate) ExecX ¶
func (qc *QuestionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestionCreate) Mutation ¶
func (qc *QuestionCreate) Mutation() *QuestionMutation
Mutation returns the QuestionMutation object of the builder.
func (*QuestionCreate) Save ¶
func (qc *QuestionCreate) Save(ctx context.Context) (*Question, error)
Save creates the Question in the database.
func (*QuestionCreate) SaveX ¶
func (qc *QuestionCreate) SaveX(ctx context.Context) *Question
SaveX calls Save and panics if Save returns an error.
func (*QuestionCreate) SetCode ¶
func (qc *QuestionCreate) SetCode(s string) *QuestionCreate
SetCode sets the "code" field.
func (*QuestionCreate) SetCreateTime ¶
func (qc *QuestionCreate) SetCreateTime(t time.Time) *QuestionCreate
SetCreateTime sets the "create_time" field.
func (*QuestionCreate) SetID ¶
func (qc *QuestionCreate) SetID(u uuid.UUID) *QuestionCreate
SetID sets the "id" field.
func (*QuestionCreate) SetNillableCreateTime ¶
func (qc *QuestionCreate) SetNillableCreateTime(t *time.Time) *QuestionCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*QuestionCreate) SetNillableID ¶
func (qc *QuestionCreate) SetNillableID(u *uuid.UUID) *QuestionCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*QuestionCreate) SetNillableOrder ¶
func (qc *QuestionCreate) SetNillableOrder(i *int) *QuestionCreate
SetNillableOrder sets the "order" field if the given value is not nil.
func (*QuestionCreate) SetNillableType ¶
func (qc *QuestionCreate) SetNillableType(q *question.Type) *QuestionCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*QuestionCreate) SetNillableUpdateTime ¶
func (qc *QuestionCreate) SetNillableUpdateTime(t *time.Time) *QuestionCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*QuestionCreate) SetOrder ¶
func (qc *QuestionCreate) SetOrder(i int) *QuestionCreate
SetOrder sets the "order" field.
func (*QuestionCreate) SetType ¶
func (qc *QuestionCreate) SetType(q question.Type) *QuestionCreate
SetType sets the "type" field.
func (*QuestionCreate) SetUpdateTime ¶
func (qc *QuestionCreate) SetUpdateTime(t time.Time) *QuestionCreate
SetUpdateTime sets the "update_time" field.
type QuestionCreateBulk ¶
type QuestionCreateBulk struct {
// contains filtered or unexported fields
}
QuestionCreateBulk is the builder for creating many Question entities in bulk.
func (*QuestionCreateBulk) Exec ¶
func (qcb *QuestionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestionCreateBulk) ExecX ¶
func (qcb *QuestionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type QuestionDelete ¶
type QuestionDelete struct {
// contains filtered or unexported fields
}
QuestionDelete is the builder for deleting a Question entity.
func (*QuestionDelete) Exec ¶
func (qd *QuestionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*QuestionDelete) ExecX ¶
func (qd *QuestionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*QuestionDelete) Where ¶
func (qd *QuestionDelete) Where(ps ...predicate.Question) *QuestionDelete
Where appends a list predicates to the QuestionDelete builder.
type QuestionDeleteOne ¶
type QuestionDeleteOne struct {
// contains filtered or unexported fields
}
QuestionDeleteOne is the builder for deleting a single Question entity.
func (*QuestionDeleteOne) Exec ¶
func (qdo *QuestionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*QuestionDeleteOne) ExecX ¶
func (qdo *QuestionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type QuestionEdges ¶
type QuestionEdges struct { // Items holds the value of the items edge. Items []*Item `json:"items,omitempty"` // Translations holds the value of the translations edge. Translations []*QuestionTranslation `json:"translations,omitempty"` // Test holds the value of the test edge. Test []*Test `json:"test,omitempty"` // contains filtered or unexported fields }
QuestionEdges holds the relations/edges for other nodes in the graph.
func (QuestionEdges) ItemsOrErr ¶
func (e QuestionEdges) ItemsOrErr() ([]*Item, error)
ItemsOrErr returns the Items value or an error if the edge was not loaded in eager-loading.
func (QuestionEdges) TestOrErr ¶
func (e QuestionEdges) TestOrErr() ([]*Test, error)
TestOrErr returns the Test value or an error if the edge was not loaded in eager-loading.
func (QuestionEdges) TranslationsOrErr ¶
func (e QuestionEdges) TranslationsOrErr() ([]*QuestionTranslation, error)
TranslationsOrErr returns the Translations value or an error if the edge was not loaded in eager-loading.
type QuestionGroupBy ¶
type QuestionGroupBy struct {
// contains filtered or unexported fields
}
QuestionGroupBy is the group-by builder for Question entities.
func (*QuestionGroupBy) Aggregate ¶
func (qgb *QuestionGroupBy) Aggregate(fns ...AggregateFunc) *QuestionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*QuestionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*QuestionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*QuestionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*QuestionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*QuestionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*QuestionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*QuestionGroupBy) Scan ¶
func (qgb *QuestionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*QuestionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type QuestionMutation ¶
type QuestionMutation struct {
// contains filtered or unexported fields
}
QuestionMutation represents an operation that mutates the Question nodes in the graph.
func (*QuestionMutation) AddField ¶
func (m *QuestionMutation) 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 (*QuestionMutation) AddItemIDs ¶
func (m *QuestionMutation) AddItemIDs(ids ...uuid.UUID)
AddItemIDs adds the "items" edge to the Item entity by ids.
func (*QuestionMutation) AddOrder ¶
func (m *QuestionMutation) AddOrder(i int)
AddOrder adds i to the "order" field.
func (*QuestionMutation) AddTestIDs ¶
func (m *QuestionMutation) AddTestIDs(ids ...uuid.UUID)
AddTestIDs adds the "test" edge to the Test entity by ids.
func (*QuestionMutation) AddTranslationIDs ¶
func (m *QuestionMutation) AddTranslationIDs(ids ...uuid.UUID)
AddTranslationIDs adds the "translations" edge to the QuestionTranslation entity by ids.
func (*QuestionMutation) AddedEdges ¶
func (m *QuestionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*QuestionMutation) AddedField ¶
func (m *QuestionMutation) 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 (*QuestionMutation) AddedFields ¶
func (m *QuestionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*QuestionMutation) AddedIDs ¶
func (m *QuestionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*QuestionMutation) AddedOrder ¶
func (m *QuestionMutation) AddedOrder() (r int, exists bool)
AddedOrder returns the value that was added to the "order" field in this mutation.
func (*QuestionMutation) ClearEdge ¶
func (m *QuestionMutation) 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 (*QuestionMutation) ClearField ¶
func (m *QuestionMutation) 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 (*QuestionMutation) ClearItems ¶
func (m *QuestionMutation) ClearItems()
ClearItems clears the "items" edge to the Item entity.
func (*QuestionMutation) ClearTest ¶
func (m *QuestionMutation) ClearTest()
ClearTest clears the "test" edge to the Test entity.
func (*QuestionMutation) ClearTranslations ¶
func (m *QuestionMutation) ClearTranslations()
ClearTranslations clears the "translations" edge to the QuestionTranslation entity.
func (*QuestionMutation) ClearedEdges ¶
func (m *QuestionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*QuestionMutation) ClearedFields ¶
func (m *QuestionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (QuestionMutation) Client ¶
func (m QuestionMutation) 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 (*QuestionMutation) Code ¶
func (m *QuestionMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*QuestionMutation) CreateTime ¶
func (m *QuestionMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*QuestionMutation) EdgeCleared ¶
func (m *QuestionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*QuestionMutation) Field ¶
func (m *QuestionMutation) 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 (*QuestionMutation) FieldCleared ¶
func (m *QuestionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*QuestionMutation) Fields ¶
func (m *QuestionMutation) 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 (*QuestionMutation) GetType ¶
func (m *QuestionMutation) GetType() (r question.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*QuestionMutation) ID ¶
func (m *QuestionMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*QuestionMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*QuestionMutation) ItemsCleared ¶
func (m *QuestionMutation) ItemsCleared() bool
ItemsCleared reports if the "items" edge to the Item entity was cleared.
func (*QuestionMutation) ItemsIDs ¶
func (m *QuestionMutation) ItemsIDs() (ids []uuid.UUID)
ItemsIDs returns the "items" edge IDs in the mutation.
func (*QuestionMutation) OldCode ¶
func (m *QuestionMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Question entity. If the Question 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 (*QuestionMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Question entity. If the Question 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 (*QuestionMutation) 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 (*QuestionMutation) OldOrder ¶
func (m *QuestionMutation) OldOrder(ctx context.Context) (v int, err error)
OldOrder returns the old "order" field's value of the Question entity. If the Question 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 (*QuestionMutation) OldType ¶
OldType returns the old "type" field's value of the Question entity. If the Question 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 (*QuestionMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Question entity. If the Question 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 (*QuestionMutation) Order ¶
func (m *QuestionMutation) Order() (r int, exists bool)
Order returns the value of the "order" field in the mutation.
func (*QuestionMutation) RemoveItemIDs ¶
func (m *QuestionMutation) RemoveItemIDs(ids ...uuid.UUID)
RemoveItemIDs removes the "items" edge to the Item entity by IDs.
func (*QuestionMutation) RemoveTestIDs ¶
func (m *QuestionMutation) RemoveTestIDs(ids ...uuid.UUID)
RemoveTestIDs removes the "test" edge to the Test entity by IDs.
func (*QuestionMutation) RemoveTranslationIDs ¶
func (m *QuestionMutation) RemoveTranslationIDs(ids ...uuid.UUID)
RemoveTranslationIDs removes the "translations" edge to the QuestionTranslation entity by IDs.
func (*QuestionMutation) RemovedEdges ¶
func (m *QuestionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*QuestionMutation) RemovedIDs ¶
func (m *QuestionMutation) 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 (*QuestionMutation) RemovedItemsIDs ¶
func (m *QuestionMutation) RemovedItemsIDs() (ids []uuid.UUID)
RemovedItems returns the removed IDs of the "items" edge to the Item entity.
func (*QuestionMutation) RemovedTestIDs ¶
func (m *QuestionMutation) RemovedTestIDs() (ids []uuid.UUID)
RemovedTest returns the removed IDs of the "test" edge to the Test entity.
func (*QuestionMutation) RemovedTranslationsIDs ¶
func (m *QuestionMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
RemovedTranslations returns the removed IDs of the "translations" edge to the QuestionTranslation entity.
func (*QuestionMutation) ResetCode ¶
func (m *QuestionMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*QuestionMutation) ResetCreateTime ¶
func (m *QuestionMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*QuestionMutation) ResetEdge ¶
func (m *QuestionMutation) 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 (*QuestionMutation) ResetField ¶
func (m *QuestionMutation) 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 (*QuestionMutation) ResetItems ¶
func (m *QuestionMutation) ResetItems()
ResetItems resets all changes to the "items" edge.
func (*QuestionMutation) ResetOrder ¶
func (m *QuestionMutation) ResetOrder()
ResetOrder resets all changes to the "order" field.
func (*QuestionMutation) ResetTest ¶
func (m *QuestionMutation) ResetTest()
ResetTest resets all changes to the "test" edge.
func (*QuestionMutation) ResetTranslations ¶
func (m *QuestionMutation) ResetTranslations()
ResetTranslations resets all changes to the "translations" edge.
func (*QuestionMutation) ResetType ¶
func (m *QuestionMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*QuestionMutation) ResetUpdateTime ¶
func (m *QuestionMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*QuestionMutation) SetCode ¶
func (m *QuestionMutation) SetCode(s string)
SetCode sets the "code" field.
func (*QuestionMutation) SetCreateTime ¶
func (m *QuestionMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*QuestionMutation) SetField ¶
func (m *QuestionMutation) 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 (*QuestionMutation) SetID ¶
func (m *QuestionMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Question entities.
func (*QuestionMutation) SetOrder ¶
func (m *QuestionMutation) SetOrder(i int)
SetOrder sets the "order" field.
func (*QuestionMutation) SetType ¶
func (m *QuestionMutation) SetType(q question.Type)
SetType sets the "type" field.
func (*QuestionMutation) SetUpdateTime ¶
func (m *QuestionMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*QuestionMutation) TestCleared ¶
func (m *QuestionMutation) TestCleared() bool
TestCleared reports if the "test" edge to the Test entity was cleared.
func (*QuestionMutation) TestIDs ¶
func (m *QuestionMutation) TestIDs() (ids []uuid.UUID)
TestIDs returns the "test" edge IDs in the mutation.
func (*QuestionMutation) TranslationsCleared ¶
func (m *QuestionMutation) TranslationsCleared() bool
TranslationsCleared reports if the "translations" edge to the QuestionTranslation entity was cleared.
func (*QuestionMutation) TranslationsIDs ¶
func (m *QuestionMutation) TranslationsIDs() (ids []uuid.UUID)
TranslationsIDs returns the "translations" edge IDs in the mutation.
func (QuestionMutation) Tx ¶
func (m QuestionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*QuestionMutation) Type ¶
func (m *QuestionMutation) Type() string
Type returns the node type of this mutation (Question).
func (*QuestionMutation) UpdateTime ¶
func (m *QuestionMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*QuestionMutation) Where ¶
func (m *QuestionMutation) Where(ps ...predicate.Question)
Where appends a list predicates to the QuestionMutation builder.
type QuestionQuery ¶
type QuestionQuery struct {
// contains filtered or unexported fields
}
QuestionQuery is the builder for querying Question entities.
func (*QuestionQuery) All ¶
func (qq *QuestionQuery) All(ctx context.Context) ([]*Question, error)
All executes the query and returns a list of Questions.
func (*QuestionQuery) AllX ¶
func (qq *QuestionQuery) AllX(ctx context.Context) []*Question
AllX is like All, but panics if an error occurs.
func (*QuestionQuery) Clone ¶
func (qq *QuestionQuery) Clone() *QuestionQuery
Clone returns a duplicate of the QuestionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*QuestionQuery) Count ¶
func (qq *QuestionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*QuestionQuery) CountX ¶
func (qq *QuestionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*QuestionQuery) Exist ¶
func (qq *QuestionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*QuestionQuery) ExistX ¶
func (qq *QuestionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*QuestionQuery) First ¶
func (qq *QuestionQuery) First(ctx context.Context) (*Question, error)
First returns the first Question entity from the query. Returns a *NotFoundError when no Question was found.
func (*QuestionQuery) FirstID ¶
FirstID returns the first Question ID from the query. Returns a *NotFoundError when no Question ID was found.
func (*QuestionQuery) FirstIDX ¶
func (qq *QuestionQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*QuestionQuery) FirstX ¶
func (qq *QuestionQuery) FirstX(ctx context.Context) *Question
FirstX is like First, but panics if an error occurs.
func (*QuestionQuery) GroupBy ¶
func (qq *QuestionQuery) GroupBy(field string, fields ...string) *QuestionGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Question.Query(). GroupBy(question.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*QuestionQuery) IDsX ¶
func (qq *QuestionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*QuestionQuery) Limit ¶
func (qq *QuestionQuery) Limit(limit int) *QuestionQuery
Limit adds a limit step to the query.
func (*QuestionQuery) Offset ¶
func (qq *QuestionQuery) Offset(offset int) *QuestionQuery
Offset adds an offset step to the query.
func (*QuestionQuery) Only ¶
func (qq *QuestionQuery) Only(ctx context.Context) (*Question, error)
Only returns a single Question entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Question entity is found. Returns a *NotFoundError when no Question entities are found.
func (*QuestionQuery) OnlyID ¶
OnlyID is like Only, but returns the only Question ID in the query. Returns a *NotSingularError when more than one Question ID is found. Returns a *NotFoundError when no entities are found.
func (*QuestionQuery) OnlyIDX ¶
func (qq *QuestionQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*QuestionQuery) OnlyX ¶
func (qq *QuestionQuery) OnlyX(ctx context.Context) *Question
OnlyX is like Only, but panics if an error occurs.
func (*QuestionQuery) Order ¶
func (qq *QuestionQuery) Order(o ...OrderFunc) *QuestionQuery
Order adds an order step to the query.
func (*QuestionQuery) QueryItems ¶
func (qq *QuestionQuery) QueryItems() *ItemQuery
QueryItems chains the current query on the "items" edge.
func (*QuestionQuery) QueryTest ¶
func (qq *QuestionQuery) QueryTest() *TestQuery
QueryTest chains the current query on the "test" edge.
func (*QuestionQuery) QueryTranslations ¶
func (qq *QuestionQuery) QueryTranslations() *QuestionTranslationQuery
QueryTranslations chains the current query on the "translations" edge.
func (*QuestionQuery) Select ¶
func (qq *QuestionQuery) Select(fields ...string) *QuestionSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Question.Query(). Select(question.FieldCreateTime). Scan(ctx, &v)
func (*QuestionQuery) Unique ¶
func (qq *QuestionQuery) Unique(unique bool) *QuestionQuery
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 (*QuestionQuery) Where ¶
func (qq *QuestionQuery) Where(ps ...predicate.Question) *QuestionQuery
Where adds a new predicate for the QuestionQuery builder.
func (*QuestionQuery) WithItems ¶
func (qq *QuestionQuery) WithItems(opts ...func(*ItemQuery)) *QuestionQuery
WithItems tells the query-builder to eager-load the nodes that are connected to the "items" edge. The optional arguments are used to configure the query builder of the edge.
func (*QuestionQuery) WithTest ¶
func (qq *QuestionQuery) WithTest(opts ...func(*TestQuery)) *QuestionQuery
WithTest tells the query-builder to eager-load the nodes that are connected to the "test" edge. The optional arguments are used to configure the query builder of the edge.
func (*QuestionQuery) WithTranslations ¶
func (qq *QuestionQuery) WithTranslations(opts ...func(*QuestionTranslationQuery)) *QuestionQuery
WithTranslations tells the query-builder to eager-load the nodes that are connected to the "translations" edge. The optional arguments are used to configure the query builder of the edge.
type QuestionSelect ¶
type QuestionSelect struct { *QuestionQuery // contains filtered or unexported fields }
QuestionSelect is the builder for selecting fields of Question entities.
func (*QuestionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*QuestionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*QuestionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*QuestionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*QuestionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*QuestionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*QuestionSelect) Scan ¶
func (qs *QuestionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*QuestionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type QuestionTranslation ¶
type QuestionTranslation struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Locale holds the value of the "locale" field. Locale questiontranslation.Locale `json:"locale,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,omitempty"` // HeaderContent holds the value of the "header_content" field. HeaderContent string `json:"header_content,omitempty"` FooterContent string `json:"footer_content,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the QuestionTranslationQuery when eager-loading is set. Edges QuestionTranslationEdges `json:"edges"` // contains filtered or unexported fields }
QuestionTranslation is the model entity for the QuestionTranslation schema.
func (*QuestionTranslation) QueryQuestion ¶
func (qt *QuestionTranslation) QueryQuestion() *QuestionQuery
QueryQuestion queries the "question" edge of the QuestionTranslation entity.
func (*QuestionTranslation) String ¶
func (qt *QuestionTranslation) String() string
String implements the fmt.Stringer.
func (*QuestionTranslation) Unwrap ¶
func (qt *QuestionTranslation) Unwrap() *QuestionTranslation
Unwrap unwraps the QuestionTranslation 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 (*QuestionTranslation) Update ¶
func (qt *QuestionTranslation) Update() *QuestionTranslationUpdateOne
Update returns a builder for updating this QuestionTranslation. Note that you need to call QuestionTranslation.Unwrap() before calling this method if this QuestionTranslation was returned from a transaction, and the transaction was committed or rolled back.
type QuestionTranslationClient ¶
type QuestionTranslationClient struct {
// contains filtered or unexported fields
}
QuestionTranslationClient is a client for the QuestionTranslation schema.
func NewQuestionTranslationClient ¶
func NewQuestionTranslationClient(c config) *QuestionTranslationClient
NewQuestionTranslationClient returns a client for the QuestionTranslation from the given config.
func (*QuestionTranslationClient) Create ¶
func (c *QuestionTranslationClient) Create() *QuestionTranslationCreate
Create returns a builder for creating a QuestionTranslation entity.
func (*QuestionTranslationClient) CreateBulk ¶
func (c *QuestionTranslationClient) CreateBulk(builders ...*QuestionTranslationCreate) *QuestionTranslationCreateBulk
CreateBulk returns a builder for creating a bulk of QuestionTranslation entities.
func (*QuestionTranslationClient) Delete ¶
func (c *QuestionTranslationClient) Delete() *QuestionTranslationDelete
Delete returns a delete builder for QuestionTranslation.
func (*QuestionTranslationClient) DeleteOne ¶
func (c *QuestionTranslationClient) DeleteOne(qt *QuestionTranslation) *QuestionTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*QuestionTranslationClient) DeleteOneID ¶
func (c *QuestionTranslationClient) DeleteOneID(id uuid.UUID) *QuestionTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*QuestionTranslationClient) Get ¶
func (c *QuestionTranslationClient) Get(ctx context.Context, id uuid.UUID) (*QuestionTranslation, error)
Get returns a QuestionTranslation entity by its id.
func (*QuestionTranslationClient) GetX ¶
func (c *QuestionTranslationClient) GetX(ctx context.Context, id uuid.UUID) *QuestionTranslation
GetX is like Get, but panics if an error occurs.
func (*QuestionTranslationClient) Hooks ¶
func (c *QuestionTranslationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*QuestionTranslationClient) Query ¶
func (c *QuestionTranslationClient) Query() *QuestionTranslationQuery
Query returns a query builder for QuestionTranslation.
func (*QuestionTranslationClient) QueryQuestion ¶
func (c *QuestionTranslationClient) QueryQuestion(qt *QuestionTranslation) *QuestionQuery
QueryQuestion queries the question edge of a QuestionTranslation.
func (*QuestionTranslationClient) Update ¶
func (c *QuestionTranslationClient) Update() *QuestionTranslationUpdate
Update returns an update builder for QuestionTranslation.
func (*QuestionTranslationClient) UpdateOne ¶
func (c *QuestionTranslationClient) UpdateOne(qt *QuestionTranslation) *QuestionTranslationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*QuestionTranslationClient) UpdateOneID ¶
func (c *QuestionTranslationClient) UpdateOneID(id uuid.UUID) *QuestionTranslationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*QuestionTranslationClient) Use ¶
func (c *QuestionTranslationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `questiontranslation.Hooks(f(g(h())))`.
type QuestionTranslationCreate ¶
type QuestionTranslationCreate struct {
// contains filtered or unexported fields
}
QuestionTranslationCreate is the builder for creating a QuestionTranslation entity.
func (*QuestionTranslationCreate) Exec ¶
func (qtc *QuestionTranslationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestionTranslationCreate) ExecX ¶
func (qtc *QuestionTranslationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestionTranslationCreate) Mutation ¶
func (qtc *QuestionTranslationCreate) Mutation() *QuestionTranslationMutation
Mutation returns the QuestionTranslationMutation object of the builder.
func (*QuestionTranslationCreate) Save ¶
func (qtc *QuestionTranslationCreate) Save(ctx context.Context) (*QuestionTranslation, error)
Save creates the QuestionTranslation in the database.
func (*QuestionTranslationCreate) SaveX ¶
func (qtc *QuestionTranslationCreate) SaveX(ctx context.Context) *QuestionTranslation
SaveX calls Save and panics if Save returns an error.
func (*QuestionTranslationCreate) SetContent ¶
func (qtc *QuestionTranslationCreate) SetContent(s string) *QuestionTranslationCreate
SetContent sets the "content" field.
func (*QuestionTranslationCreate) SetFooterContent ¶
func (qtc *QuestionTranslationCreate) SetFooterContent(s string) *QuestionTranslationCreate
SetFooterContent sets the "footer_content" field.
func (*QuestionTranslationCreate) SetHeaderContent ¶
func (qtc *QuestionTranslationCreate) SetHeaderContent(s string) *QuestionTranslationCreate
SetHeaderContent sets the "header_content" field.
func (*QuestionTranslationCreate) SetID ¶
func (qtc *QuestionTranslationCreate) SetID(u uuid.UUID) *QuestionTranslationCreate
SetID sets the "id" field.
func (*QuestionTranslationCreate) SetLocale ¶
func (qtc *QuestionTranslationCreate) SetLocale(q questiontranslation.Locale) *QuestionTranslationCreate
SetLocale sets the "locale" field.
func (*QuestionTranslationCreate) SetNillableContent ¶
func (qtc *QuestionTranslationCreate) SetNillableContent(s *string) *QuestionTranslationCreate
SetNillableContent sets the "content" field if the given value is not nil.
func (*QuestionTranslationCreate) SetNillableFooterContent ¶
func (qtc *QuestionTranslationCreate) SetNillableFooterContent(s *string) *QuestionTranslationCreate
SetNillableFooterContent sets the "footer_content" field if the given value is not nil.
func (*QuestionTranslationCreate) SetNillableHeaderContent ¶
func (qtc *QuestionTranslationCreate) SetNillableHeaderContent(s *string) *QuestionTranslationCreate
SetNillableHeaderContent sets the "header_content" field if the given value is not nil.
func (*QuestionTranslationCreate) SetNillableID ¶
func (qtc *QuestionTranslationCreate) SetNillableID(u *uuid.UUID) *QuestionTranslationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*QuestionTranslationCreate) SetNillableQuestionID ¶
func (qtc *QuestionTranslationCreate) SetNillableQuestionID(id *uuid.UUID) *QuestionTranslationCreate
SetNillableQuestionID sets the "question" edge to the Question entity by ID if the given value is not nil.
func (*QuestionTranslationCreate) SetQuestion ¶
func (qtc *QuestionTranslationCreate) SetQuestion(q *Question) *QuestionTranslationCreate
SetQuestion sets the "question" edge to the Question entity.
func (*QuestionTranslationCreate) SetQuestionID ¶
func (qtc *QuestionTranslationCreate) SetQuestionID(id uuid.UUID) *QuestionTranslationCreate
SetQuestionID sets the "question" edge to the Question entity by ID.
type QuestionTranslationCreateBulk ¶
type QuestionTranslationCreateBulk struct {
// contains filtered or unexported fields
}
QuestionTranslationCreateBulk is the builder for creating many QuestionTranslation entities in bulk.
func (*QuestionTranslationCreateBulk) Exec ¶
func (qtcb *QuestionTranslationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestionTranslationCreateBulk) ExecX ¶
func (qtcb *QuestionTranslationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestionTranslationCreateBulk) Save ¶
func (qtcb *QuestionTranslationCreateBulk) Save(ctx context.Context) ([]*QuestionTranslation, error)
Save creates the QuestionTranslation entities in the database.
func (*QuestionTranslationCreateBulk) SaveX ¶
func (qtcb *QuestionTranslationCreateBulk) SaveX(ctx context.Context) []*QuestionTranslation
SaveX is like Save, but panics if an error occurs.
type QuestionTranslationDelete ¶
type QuestionTranslationDelete struct {
// contains filtered or unexported fields
}
QuestionTranslationDelete is the builder for deleting a QuestionTranslation entity.
func (*QuestionTranslationDelete) Exec ¶
func (qtd *QuestionTranslationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*QuestionTranslationDelete) ExecX ¶
func (qtd *QuestionTranslationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*QuestionTranslationDelete) Where ¶
func (qtd *QuestionTranslationDelete) Where(ps ...predicate.QuestionTranslation) *QuestionTranslationDelete
Where appends a list predicates to the QuestionTranslationDelete builder.
type QuestionTranslationDeleteOne ¶
type QuestionTranslationDeleteOne struct {
// contains filtered or unexported fields
}
QuestionTranslationDeleteOne is the builder for deleting a single QuestionTranslation entity.
func (*QuestionTranslationDeleteOne) Exec ¶
func (qtdo *QuestionTranslationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*QuestionTranslationDeleteOne) ExecX ¶
func (qtdo *QuestionTranslationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type QuestionTranslationEdges ¶
type QuestionTranslationEdges struct { // Question holds the value of the question edge. Question *Question `json:"question,omitempty"` // contains filtered or unexported fields }
QuestionTranslationEdges holds the relations/edges for other nodes in the graph.
func (QuestionTranslationEdges) QuestionOrErr ¶
func (e QuestionTranslationEdges) QuestionOrErr() (*Question, error)
QuestionOrErr returns the Question value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type QuestionTranslationGroupBy ¶
type QuestionTranslationGroupBy struct {
// contains filtered or unexported fields
}
QuestionTranslationGroupBy is the group-by builder for QuestionTranslation entities.
func (*QuestionTranslationGroupBy) Aggregate ¶
func (qtgb *QuestionTranslationGroupBy) Aggregate(fns ...AggregateFunc) *QuestionTranslationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*QuestionTranslationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*QuestionTranslationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*QuestionTranslationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationGroupBy) Scan ¶
func (qtgb *QuestionTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*QuestionTranslationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type QuestionTranslationMutation ¶
type QuestionTranslationMutation struct {
// contains filtered or unexported fields
}
QuestionTranslationMutation represents an operation that mutates the QuestionTranslation nodes in the graph.
func (*QuestionTranslationMutation) AddField ¶
func (m *QuestionTranslationMutation) 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 (*QuestionTranslationMutation) AddedEdges ¶
func (m *QuestionTranslationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*QuestionTranslationMutation) AddedField ¶
func (m *QuestionTranslationMutation) 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 (*QuestionTranslationMutation) AddedFields ¶
func (m *QuestionTranslationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*QuestionTranslationMutation) AddedIDs ¶
func (m *QuestionTranslationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*QuestionTranslationMutation) ClearContent ¶
func (m *QuestionTranslationMutation) ClearContent()
ClearContent clears the value of the "content" field.
func (*QuestionTranslationMutation) ClearEdge ¶
func (m *QuestionTranslationMutation) 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 (*QuestionTranslationMutation) ClearField ¶
func (m *QuestionTranslationMutation) 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 (*QuestionTranslationMutation) ClearFooterContent ¶
func (m *QuestionTranslationMutation) ClearFooterContent()
ClearFooterContent clears the value of the "footer_content" field.
func (*QuestionTranslationMutation) ClearHeaderContent ¶
func (m *QuestionTranslationMutation) ClearHeaderContent()
ClearHeaderContent clears the value of the "header_content" field.
func (*QuestionTranslationMutation) ClearQuestion ¶
func (m *QuestionTranslationMutation) ClearQuestion()
ClearQuestion clears the "question" edge to the Question entity.
func (*QuestionTranslationMutation) ClearedEdges ¶
func (m *QuestionTranslationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*QuestionTranslationMutation) ClearedFields ¶
func (m *QuestionTranslationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (QuestionTranslationMutation) Client ¶
func (m QuestionTranslationMutation) 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 (*QuestionTranslationMutation) Content ¶
func (m *QuestionTranslationMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*QuestionTranslationMutation) ContentCleared ¶
func (m *QuestionTranslationMutation) ContentCleared() bool
ContentCleared returns if the "content" field was cleared in this mutation.
func (*QuestionTranslationMutation) EdgeCleared ¶
func (m *QuestionTranslationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*QuestionTranslationMutation) Field ¶
func (m *QuestionTranslationMutation) 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 (*QuestionTranslationMutation) FieldCleared ¶
func (m *QuestionTranslationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*QuestionTranslationMutation) Fields ¶
func (m *QuestionTranslationMutation) 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 (*QuestionTranslationMutation) FooterContent ¶
func (m *QuestionTranslationMutation) FooterContent() (r string, exists bool)
FooterContent returns the value of the "footer_content" field in the mutation.
func (*QuestionTranslationMutation) FooterContentCleared ¶
func (m *QuestionTranslationMutation) FooterContentCleared() bool
FooterContentCleared returns if the "footer_content" field was cleared in this mutation.
func (*QuestionTranslationMutation) HeaderContent ¶
func (m *QuestionTranslationMutation) HeaderContent() (r string, exists bool)
HeaderContent returns the value of the "header_content" field in the mutation.
func (*QuestionTranslationMutation) HeaderContentCleared ¶
func (m *QuestionTranslationMutation) HeaderContentCleared() bool
HeaderContentCleared returns if the "header_content" field was cleared in this mutation.
func (*QuestionTranslationMutation) ID ¶
func (m *QuestionTranslationMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*QuestionTranslationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*QuestionTranslationMutation) Locale ¶
func (m *QuestionTranslationMutation) Locale() (r questiontranslation.Locale, exists bool)
Locale returns the value of the "locale" field in the mutation.
func (*QuestionTranslationMutation) OldContent ¶
func (m *QuestionTranslationMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the QuestionTranslation entity. If the QuestionTranslation 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 (*QuestionTranslationMutation) 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 (*QuestionTranslationMutation) OldFooterContent ¶
func (m *QuestionTranslationMutation) OldFooterContent(ctx context.Context) (v string, err error)
OldFooterContent returns the old "footer_content" field's value of the QuestionTranslation entity. If the QuestionTranslation 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 (*QuestionTranslationMutation) OldHeaderContent ¶
func (m *QuestionTranslationMutation) OldHeaderContent(ctx context.Context) (v string, err error)
OldHeaderContent returns the old "header_content" field's value of the QuestionTranslation entity. If the QuestionTranslation 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 (*QuestionTranslationMutation) OldLocale ¶
func (m *QuestionTranslationMutation) OldLocale(ctx context.Context) (v questiontranslation.Locale, err error)
OldLocale returns the old "locale" field's value of the QuestionTranslation entity. If the QuestionTranslation 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 (*QuestionTranslationMutation) Op ¶
func (m *QuestionTranslationMutation) Op() Op
Op returns the operation name.
func (*QuestionTranslationMutation) QuestionCleared ¶
func (m *QuestionTranslationMutation) QuestionCleared() bool
QuestionCleared reports if the "question" edge to the Question entity was cleared.
func (*QuestionTranslationMutation) QuestionID ¶
func (m *QuestionTranslationMutation) QuestionID() (id uuid.UUID, exists bool)
QuestionID returns the "question" edge ID in the mutation.
func (*QuestionTranslationMutation) QuestionIDs ¶
func (m *QuestionTranslationMutation) QuestionIDs() (ids []uuid.UUID)
QuestionIDs returns the "question" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use QuestionID instead. It exists only for internal usage by the builders.
func (*QuestionTranslationMutation) RemovedEdges ¶
func (m *QuestionTranslationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*QuestionTranslationMutation) RemovedIDs ¶
func (m *QuestionTranslationMutation) 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 (*QuestionTranslationMutation) ResetContent ¶
func (m *QuestionTranslationMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*QuestionTranslationMutation) ResetEdge ¶
func (m *QuestionTranslationMutation) 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 (*QuestionTranslationMutation) ResetField ¶
func (m *QuestionTranslationMutation) 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 (*QuestionTranslationMutation) ResetFooterContent ¶
func (m *QuestionTranslationMutation) ResetFooterContent()
ResetFooterContent resets all changes to the "footer_content" field.
func (*QuestionTranslationMutation) ResetHeaderContent ¶
func (m *QuestionTranslationMutation) ResetHeaderContent()
ResetHeaderContent resets all changes to the "header_content" field.
func (*QuestionTranslationMutation) ResetLocale ¶
func (m *QuestionTranslationMutation) ResetLocale()
ResetLocale resets all changes to the "locale" field.
func (*QuestionTranslationMutation) ResetQuestion ¶
func (m *QuestionTranslationMutation) ResetQuestion()
ResetQuestion resets all changes to the "question" edge.
func (*QuestionTranslationMutation) SetContent ¶
func (m *QuestionTranslationMutation) SetContent(s string)
SetContent sets the "content" field.
func (*QuestionTranslationMutation) SetField ¶
func (m *QuestionTranslationMutation) 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 (*QuestionTranslationMutation) SetFooterContent ¶
func (m *QuestionTranslationMutation) SetFooterContent(s string)
SetFooterContent sets the "footer_content" field.
func (*QuestionTranslationMutation) SetHeaderContent ¶
func (m *QuestionTranslationMutation) SetHeaderContent(s string)
SetHeaderContent sets the "header_content" field.
func (*QuestionTranslationMutation) SetID ¶
func (m *QuestionTranslationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of QuestionTranslation entities.
func (*QuestionTranslationMutation) SetLocale ¶
func (m *QuestionTranslationMutation) SetLocale(q questiontranslation.Locale)
SetLocale sets the "locale" field.
func (*QuestionTranslationMutation) SetQuestionID ¶
func (m *QuestionTranslationMutation) SetQuestionID(id uuid.UUID)
SetQuestionID sets the "question" edge to the Question entity by id.
func (QuestionTranslationMutation) Tx ¶
func (m QuestionTranslationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*QuestionTranslationMutation) Type ¶
func (m *QuestionTranslationMutation) Type() string
Type returns the node type of this mutation (QuestionTranslation).
func (*QuestionTranslationMutation) Where ¶
func (m *QuestionTranslationMutation) Where(ps ...predicate.QuestionTranslation)
Where appends a list predicates to the QuestionTranslationMutation builder.
type QuestionTranslationQuery ¶
type QuestionTranslationQuery struct {
// contains filtered or unexported fields
}
QuestionTranslationQuery is the builder for querying QuestionTranslation entities.
func (*QuestionTranslationQuery) All ¶
func (qtq *QuestionTranslationQuery) All(ctx context.Context) ([]*QuestionTranslation, error)
All executes the query and returns a list of QuestionTranslations.
func (*QuestionTranslationQuery) AllX ¶
func (qtq *QuestionTranslationQuery) AllX(ctx context.Context) []*QuestionTranslation
AllX is like All, but panics if an error occurs.
func (*QuestionTranslationQuery) Clone ¶
func (qtq *QuestionTranslationQuery) Clone() *QuestionTranslationQuery
Clone returns a duplicate of the QuestionTranslationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*QuestionTranslationQuery) Count ¶
func (qtq *QuestionTranslationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*QuestionTranslationQuery) CountX ¶
func (qtq *QuestionTranslationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*QuestionTranslationQuery) Exist ¶
func (qtq *QuestionTranslationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*QuestionTranslationQuery) ExistX ¶
func (qtq *QuestionTranslationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*QuestionTranslationQuery) First ¶
func (qtq *QuestionTranslationQuery) First(ctx context.Context) (*QuestionTranslation, error)
First returns the first QuestionTranslation entity from the query. Returns a *NotFoundError when no QuestionTranslation was found.
func (*QuestionTranslationQuery) FirstID ¶
FirstID returns the first QuestionTranslation ID from the query. Returns a *NotFoundError when no QuestionTranslation ID was found.
func (*QuestionTranslationQuery) FirstIDX ¶
func (qtq *QuestionTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*QuestionTranslationQuery) FirstX ¶
func (qtq *QuestionTranslationQuery) FirstX(ctx context.Context) *QuestionTranslation
FirstX is like First, but panics if an error occurs.
func (*QuestionTranslationQuery) GroupBy ¶
func (qtq *QuestionTranslationQuery) GroupBy(field string, fields ...string) *QuestionTranslationGroupBy
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 { Locale questiontranslation.Locale `json:"locale,omitempty"` Count int `json:"count,omitempty"` } client.QuestionTranslation.Query(). GroupBy(questiontranslation.FieldLocale). Aggregate(ent.Count()). Scan(ctx, &v)
func (*QuestionTranslationQuery) IDs ¶
IDs executes the query and returns a list of QuestionTranslation IDs.
func (*QuestionTranslationQuery) IDsX ¶
func (qtq *QuestionTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*QuestionTranslationQuery) Limit ¶
func (qtq *QuestionTranslationQuery) Limit(limit int) *QuestionTranslationQuery
Limit adds a limit step to the query.
func (*QuestionTranslationQuery) Offset ¶
func (qtq *QuestionTranslationQuery) Offset(offset int) *QuestionTranslationQuery
Offset adds an offset step to the query.
func (*QuestionTranslationQuery) Only ¶
func (qtq *QuestionTranslationQuery) Only(ctx context.Context) (*QuestionTranslation, error)
Only returns a single QuestionTranslation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one QuestionTranslation entity is found. Returns a *NotFoundError when no QuestionTranslation entities are found.
func (*QuestionTranslationQuery) OnlyID ¶
OnlyID is like Only, but returns the only QuestionTranslation ID in the query. Returns a *NotSingularError when more than one QuestionTranslation ID is found. Returns a *NotFoundError when no entities are found.
func (*QuestionTranslationQuery) OnlyIDX ¶
func (qtq *QuestionTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*QuestionTranslationQuery) OnlyX ¶
func (qtq *QuestionTranslationQuery) OnlyX(ctx context.Context) *QuestionTranslation
OnlyX is like Only, but panics if an error occurs.
func (*QuestionTranslationQuery) Order ¶
func (qtq *QuestionTranslationQuery) Order(o ...OrderFunc) *QuestionTranslationQuery
Order adds an order step to the query.
func (*QuestionTranslationQuery) QueryQuestion ¶
func (qtq *QuestionTranslationQuery) QueryQuestion() *QuestionQuery
QueryQuestion chains the current query on the "question" edge.
func (*QuestionTranslationQuery) Select ¶
func (qtq *QuestionTranslationQuery) Select(fields ...string) *QuestionTranslationSelect
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 { Locale questiontranslation.Locale `json:"locale,omitempty"` } client.QuestionTranslation.Query(). Select(questiontranslation.FieldLocale). Scan(ctx, &v)
func (*QuestionTranslationQuery) Unique ¶
func (qtq *QuestionTranslationQuery) Unique(unique bool) *QuestionTranslationQuery
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 (*QuestionTranslationQuery) Where ¶
func (qtq *QuestionTranslationQuery) Where(ps ...predicate.QuestionTranslation) *QuestionTranslationQuery
Where adds a new predicate for the QuestionTranslationQuery builder.
func (*QuestionTranslationQuery) WithQuestion ¶
func (qtq *QuestionTranslationQuery) WithQuestion(opts ...func(*QuestionQuery)) *QuestionTranslationQuery
WithQuestion tells the query-builder to eager-load the nodes that are connected to the "question" edge. The optional arguments are used to configure the query builder of the edge.
type QuestionTranslationSelect ¶
type QuestionTranslationSelect struct { *QuestionTranslationQuery // contains filtered or unexported fields }
QuestionTranslationSelect is the builder for selecting fields of QuestionTranslation entities.
func (*QuestionTranslationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*QuestionTranslationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*QuestionTranslationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*QuestionTranslationSelect) Scan ¶
func (qts *QuestionTranslationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*QuestionTranslationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type QuestionTranslationUpdate ¶
type QuestionTranslationUpdate struct {
// contains filtered or unexported fields
}
QuestionTranslationUpdate is the builder for updating QuestionTranslation entities.
func (*QuestionTranslationUpdate) ClearContent ¶
func (qtu *QuestionTranslationUpdate) ClearContent() *QuestionTranslationUpdate
ClearContent clears the value of the "content" field.
func (*QuestionTranslationUpdate) ClearFooterContent ¶
func (qtu *QuestionTranslationUpdate) ClearFooterContent() *QuestionTranslationUpdate
ClearFooterContent clears the value of the "footer_content" field.
func (*QuestionTranslationUpdate) ClearHeaderContent ¶
func (qtu *QuestionTranslationUpdate) ClearHeaderContent() *QuestionTranslationUpdate
ClearHeaderContent clears the value of the "header_content" field.
func (*QuestionTranslationUpdate) ClearQuestion ¶
func (qtu *QuestionTranslationUpdate) ClearQuestion() *QuestionTranslationUpdate
ClearQuestion clears the "question" edge to the Question entity.
func (*QuestionTranslationUpdate) Exec ¶
func (qtu *QuestionTranslationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestionTranslationUpdate) ExecX ¶
func (qtu *QuestionTranslationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestionTranslationUpdate) Mutation ¶
func (qtu *QuestionTranslationUpdate) Mutation() *QuestionTranslationMutation
Mutation returns the QuestionTranslationMutation object of the builder.
func (*QuestionTranslationUpdate) Save ¶
func (qtu *QuestionTranslationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*QuestionTranslationUpdate) SaveX ¶
func (qtu *QuestionTranslationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*QuestionTranslationUpdate) SetContent ¶
func (qtu *QuestionTranslationUpdate) SetContent(s string) *QuestionTranslationUpdate
SetContent sets the "content" field.
func (*QuestionTranslationUpdate) SetFooterContent ¶
func (qtu *QuestionTranslationUpdate) SetFooterContent(s string) *QuestionTranslationUpdate
SetFooterContent sets the "footer_content" field.
func (*QuestionTranslationUpdate) SetHeaderContent ¶
func (qtu *QuestionTranslationUpdate) SetHeaderContent(s string) *QuestionTranslationUpdate
SetHeaderContent sets the "header_content" field.
func (*QuestionTranslationUpdate) SetNillableContent ¶
func (qtu *QuestionTranslationUpdate) SetNillableContent(s *string) *QuestionTranslationUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*QuestionTranslationUpdate) SetNillableFooterContent ¶
func (qtu *QuestionTranslationUpdate) SetNillableFooterContent(s *string) *QuestionTranslationUpdate
SetNillableFooterContent sets the "footer_content" field if the given value is not nil.
func (*QuestionTranslationUpdate) SetNillableHeaderContent ¶
func (qtu *QuestionTranslationUpdate) SetNillableHeaderContent(s *string) *QuestionTranslationUpdate
SetNillableHeaderContent sets the "header_content" field if the given value is not nil.
func (*QuestionTranslationUpdate) SetNillableQuestionID ¶
func (qtu *QuestionTranslationUpdate) SetNillableQuestionID(id *uuid.UUID) *QuestionTranslationUpdate
SetNillableQuestionID sets the "question" edge to the Question entity by ID if the given value is not nil.
func (*QuestionTranslationUpdate) SetQuestion ¶
func (qtu *QuestionTranslationUpdate) SetQuestion(q *Question) *QuestionTranslationUpdate
SetQuestion sets the "question" edge to the Question entity.
func (*QuestionTranslationUpdate) SetQuestionID ¶
func (qtu *QuestionTranslationUpdate) SetQuestionID(id uuid.UUID) *QuestionTranslationUpdate
SetQuestionID sets the "question" edge to the Question entity by ID.
func (*QuestionTranslationUpdate) Where ¶
func (qtu *QuestionTranslationUpdate) Where(ps ...predicate.QuestionTranslation) *QuestionTranslationUpdate
Where appends a list predicates to the QuestionTranslationUpdate builder.
type QuestionTranslationUpdateOne ¶
type QuestionTranslationUpdateOne struct {
// contains filtered or unexported fields
}
QuestionTranslationUpdateOne is the builder for updating a single QuestionTranslation entity.
func (*QuestionTranslationUpdateOne) ClearContent ¶
func (qtuo *QuestionTranslationUpdateOne) ClearContent() *QuestionTranslationUpdateOne
ClearContent clears the value of the "content" field.
func (*QuestionTranslationUpdateOne) ClearFooterContent ¶
func (qtuo *QuestionTranslationUpdateOne) ClearFooterContent() *QuestionTranslationUpdateOne
ClearFooterContent clears the value of the "footer_content" field.
func (*QuestionTranslationUpdateOne) ClearHeaderContent ¶
func (qtuo *QuestionTranslationUpdateOne) ClearHeaderContent() *QuestionTranslationUpdateOne
ClearHeaderContent clears the value of the "header_content" field.
func (*QuestionTranslationUpdateOne) ClearQuestion ¶
func (qtuo *QuestionTranslationUpdateOne) ClearQuestion() *QuestionTranslationUpdateOne
ClearQuestion clears the "question" edge to the Question entity.
func (*QuestionTranslationUpdateOne) Exec ¶
func (qtuo *QuestionTranslationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*QuestionTranslationUpdateOne) ExecX ¶
func (qtuo *QuestionTranslationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestionTranslationUpdateOne) Mutation ¶
func (qtuo *QuestionTranslationUpdateOne) Mutation() *QuestionTranslationMutation
Mutation returns the QuestionTranslationMutation object of the builder.
func (*QuestionTranslationUpdateOne) Save ¶
func (qtuo *QuestionTranslationUpdateOne) Save(ctx context.Context) (*QuestionTranslation, error)
Save executes the query and returns the updated QuestionTranslation entity.
func (*QuestionTranslationUpdateOne) SaveX ¶
func (qtuo *QuestionTranslationUpdateOne) SaveX(ctx context.Context) *QuestionTranslation
SaveX is like Save, but panics if an error occurs.
func (*QuestionTranslationUpdateOne) Select ¶
func (qtuo *QuestionTranslationUpdateOne) Select(field string, fields ...string) *QuestionTranslationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*QuestionTranslationUpdateOne) SetContent ¶
func (qtuo *QuestionTranslationUpdateOne) SetContent(s string) *QuestionTranslationUpdateOne
SetContent sets the "content" field.
func (*QuestionTranslationUpdateOne) SetFooterContent ¶
func (qtuo *QuestionTranslationUpdateOne) SetFooterContent(s string) *QuestionTranslationUpdateOne
SetFooterContent sets the "footer_content" field.
func (*QuestionTranslationUpdateOne) SetHeaderContent ¶
func (qtuo *QuestionTranslationUpdateOne) SetHeaderContent(s string) *QuestionTranslationUpdateOne
SetHeaderContent sets the "header_content" field.
func (*QuestionTranslationUpdateOne) SetNillableContent ¶
func (qtuo *QuestionTranslationUpdateOne) SetNillableContent(s *string) *QuestionTranslationUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*QuestionTranslationUpdateOne) SetNillableFooterContent ¶
func (qtuo *QuestionTranslationUpdateOne) SetNillableFooterContent(s *string) *QuestionTranslationUpdateOne
SetNillableFooterContent sets the "footer_content" field if the given value is not nil.
func (*QuestionTranslationUpdateOne) SetNillableHeaderContent ¶
func (qtuo *QuestionTranslationUpdateOne) SetNillableHeaderContent(s *string) *QuestionTranslationUpdateOne
SetNillableHeaderContent sets the "header_content" field if the given value is not nil.
func (*QuestionTranslationUpdateOne) SetNillableQuestionID ¶
func (qtuo *QuestionTranslationUpdateOne) SetNillableQuestionID(id *uuid.UUID) *QuestionTranslationUpdateOne
SetNillableQuestionID sets the "question" edge to the Question entity by ID if the given value is not nil.
func (*QuestionTranslationUpdateOne) SetQuestion ¶
func (qtuo *QuestionTranslationUpdateOne) SetQuestion(q *Question) *QuestionTranslationUpdateOne
SetQuestion sets the "question" edge to the Question entity.
func (*QuestionTranslationUpdateOne) SetQuestionID ¶
func (qtuo *QuestionTranslationUpdateOne) SetQuestionID(id uuid.UUID) *QuestionTranslationUpdateOne
SetQuestionID sets the "question" edge to the Question entity by ID.
type QuestionTranslations ¶
type QuestionTranslations []*QuestionTranslation
QuestionTranslations is a parsable slice of QuestionTranslation.
type QuestionUpdate ¶
type QuestionUpdate struct {
// contains filtered or unexported fields
}
QuestionUpdate is the builder for updating Question entities.
func (*QuestionUpdate) AddItemIDs ¶
func (qu *QuestionUpdate) AddItemIDs(ids ...uuid.UUID) *QuestionUpdate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*QuestionUpdate) AddItems ¶
func (qu *QuestionUpdate) AddItems(i ...*Item) *QuestionUpdate
AddItems adds the "items" edges to the Item entity.
func (*QuestionUpdate) AddOrder ¶
func (qu *QuestionUpdate) AddOrder(i int) *QuestionUpdate
AddOrder adds i to the "order" field.
func (*QuestionUpdate) AddTest ¶
func (qu *QuestionUpdate) AddTest(t ...*Test) *QuestionUpdate
AddTest adds the "test" edges to the Test entity.
func (*QuestionUpdate) AddTestIDs ¶
func (qu *QuestionUpdate) AddTestIDs(ids ...uuid.UUID) *QuestionUpdate
AddTestIDs adds the "test" edge to the Test entity by IDs.
func (*QuestionUpdate) AddTranslationIDs ¶
func (qu *QuestionUpdate) AddTranslationIDs(ids ...uuid.UUID) *QuestionUpdate
AddTranslationIDs adds the "translations" edge to the QuestionTranslation entity by IDs.
func (*QuestionUpdate) AddTranslations ¶
func (qu *QuestionUpdate) AddTranslations(q ...*QuestionTranslation) *QuestionUpdate
AddTranslations adds the "translations" edges to the QuestionTranslation entity.
func (*QuestionUpdate) ClearItems ¶
func (qu *QuestionUpdate) ClearItems() *QuestionUpdate
ClearItems clears all "items" edges to the Item entity.
func (*QuestionUpdate) ClearTest ¶
func (qu *QuestionUpdate) ClearTest() *QuestionUpdate
ClearTest clears all "test" edges to the Test entity.
func (*QuestionUpdate) ClearTranslations ¶
func (qu *QuestionUpdate) ClearTranslations() *QuestionUpdate
ClearTranslations clears all "translations" edges to the QuestionTranslation entity.
func (*QuestionUpdate) Exec ¶
func (qu *QuestionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestionUpdate) ExecX ¶
func (qu *QuestionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestionUpdate) Mutation ¶
func (qu *QuestionUpdate) Mutation() *QuestionMutation
Mutation returns the QuestionMutation object of the builder.
func (*QuestionUpdate) RemoveItemIDs ¶
func (qu *QuestionUpdate) RemoveItemIDs(ids ...uuid.UUID) *QuestionUpdate
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*QuestionUpdate) RemoveItems ¶
func (qu *QuestionUpdate) RemoveItems(i ...*Item) *QuestionUpdate
RemoveItems removes "items" edges to Item entities.
func (*QuestionUpdate) RemoveTest ¶
func (qu *QuestionUpdate) RemoveTest(t ...*Test) *QuestionUpdate
RemoveTest removes "test" edges to Test entities.
func (*QuestionUpdate) RemoveTestIDs ¶
func (qu *QuestionUpdate) RemoveTestIDs(ids ...uuid.UUID) *QuestionUpdate
RemoveTestIDs removes the "test" edge to Test entities by IDs.
func (*QuestionUpdate) RemoveTranslationIDs ¶
func (qu *QuestionUpdate) RemoveTranslationIDs(ids ...uuid.UUID) *QuestionUpdate
RemoveTranslationIDs removes the "translations" edge to QuestionTranslation entities by IDs.
func (*QuestionUpdate) RemoveTranslations ¶
func (qu *QuestionUpdate) RemoveTranslations(q ...*QuestionTranslation) *QuestionUpdate
RemoveTranslations removes "translations" edges to QuestionTranslation entities.
func (*QuestionUpdate) Save ¶
func (qu *QuestionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*QuestionUpdate) SaveX ¶
func (qu *QuestionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*QuestionUpdate) SetNillableOrder ¶
func (qu *QuestionUpdate) SetNillableOrder(i *int) *QuestionUpdate
SetNillableOrder sets the "order" field if the given value is not nil.
func (*QuestionUpdate) SetNillableType ¶
func (qu *QuestionUpdate) SetNillableType(q *question.Type) *QuestionUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*QuestionUpdate) SetOrder ¶
func (qu *QuestionUpdate) SetOrder(i int) *QuestionUpdate
SetOrder sets the "order" field.
func (*QuestionUpdate) SetType ¶
func (qu *QuestionUpdate) SetType(q question.Type) *QuestionUpdate
SetType sets the "type" field.
func (*QuestionUpdate) SetUpdateTime ¶
func (qu *QuestionUpdate) SetUpdateTime(t time.Time) *QuestionUpdate
SetUpdateTime sets the "update_time" field.
func (*QuestionUpdate) Where ¶
func (qu *QuestionUpdate) Where(ps ...predicate.Question) *QuestionUpdate
Where appends a list predicates to the QuestionUpdate builder.
type QuestionUpdateOne ¶
type QuestionUpdateOne struct {
// contains filtered or unexported fields
}
QuestionUpdateOne is the builder for updating a single Question entity.
func (*QuestionUpdateOne) AddItemIDs ¶
func (quo *QuestionUpdateOne) AddItemIDs(ids ...uuid.UUID) *QuestionUpdateOne
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*QuestionUpdateOne) AddItems ¶
func (quo *QuestionUpdateOne) AddItems(i ...*Item) *QuestionUpdateOne
AddItems adds the "items" edges to the Item entity.
func (*QuestionUpdateOne) AddOrder ¶
func (quo *QuestionUpdateOne) AddOrder(i int) *QuestionUpdateOne
AddOrder adds i to the "order" field.
func (*QuestionUpdateOne) AddTest ¶
func (quo *QuestionUpdateOne) AddTest(t ...*Test) *QuestionUpdateOne
AddTest adds the "test" edges to the Test entity.
func (*QuestionUpdateOne) AddTestIDs ¶
func (quo *QuestionUpdateOne) AddTestIDs(ids ...uuid.UUID) *QuestionUpdateOne
AddTestIDs adds the "test" edge to the Test entity by IDs.
func (*QuestionUpdateOne) AddTranslationIDs ¶
func (quo *QuestionUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *QuestionUpdateOne
AddTranslationIDs adds the "translations" edge to the QuestionTranslation entity by IDs.
func (*QuestionUpdateOne) AddTranslations ¶
func (quo *QuestionUpdateOne) AddTranslations(q ...*QuestionTranslation) *QuestionUpdateOne
AddTranslations adds the "translations" edges to the QuestionTranslation entity.
func (*QuestionUpdateOne) ClearItems ¶
func (quo *QuestionUpdateOne) ClearItems() *QuestionUpdateOne
ClearItems clears all "items" edges to the Item entity.
func (*QuestionUpdateOne) ClearTest ¶
func (quo *QuestionUpdateOne) ClearTest() *QuestionUpdateOne
ClearTest clears all "test" edges to the Test entity.
func (*QuestionUpdateOne) ClearTranslations ¶
func (quo *QuestionUpdateOne) ClearTranslations() *QuestionUpdateOne
ClearTranslations clears all "translations" edges to the QuestionTranslation entity.
func (*QuestionUpdateOne) Exec ¶
func (quo *QuestionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*QuestionUpdateOne) ExecX ¶
func (quo *QuestionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestionUpdateOne) Mutation ¶
func (quo *QuestionUpdateOne) Mutation() *QuestionMutation
Mutation returns the QuestionMutation object of the builder.
func (*QuestionUpdateOne) RemoveItemIDs ¶
func (quo *QuestionUpdateOne) RemoveItemIDs(ids ...uuid.UUID) *QuestionUpdateOne
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*QuestionUpdateOne) RemoveItems ¶
func (quo *QuestionUpdateOne) RemoveItems(i ...*Item) *QuestionUpdateOne
RemoveItems removes "items" edges to Item entities.
func (*QuestionUpdateOne) RemoveTest ¶
func (quo *QuestionUpdateOne) RemoveTest(t ...*Test) *QuestionUpdateOne
RemoveTest removes "test" edges to Test entities.
func (*QuestionUpdateOne) RemoveTestIDs ¶
func (quo *QuestionUpdateOne) RemoveTestIDs(ids ...uuid.UUID) *QuestionUpdateOne
RemoveTestIDs removes the "test" edge to Test entities by IDs.
func (*QuestionUpdateOne) RemoveTranslationIDs ¶
func (quo *QuestionUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *QuestionUpdateOne
RemoveTranslationIDs removes the "translations" edge to QuestionTranslation entities by IDs.
func (*QuestionUpdateOne) RemoveTranslations ¶
func (quo *QuestionUpdateOne) RemoveTranslations(q ...*QuestionTranslation) *QuestionUpdateOne
RemoveTranslations removes "translations" edges to QuestionTranslation entities.
func (*QuestionUpdateOne) Save ¶
func (quo *QuestionUpdateOne) Save(ctx context.Context) (*Question, error)
Save executes the query and returns the updated Question entity.
func (*QuestionUpdateOne) SaveX ¶
func (quo *QuestionUpdateOne) SaveX(ctx context.Context) *Question
SaveX is like Save, but panics if an error occurs.
func (*QuestionUpdateOne) Select ¶
func (quo *QuestionUpdateOne) Select(field string, fields ...string) *QuestionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*QuestionUpdateOne) SetNillableOrder ¶
func (quo *QuestionUpdateOne) SetNillableOrder(i *int) *QuestionUpdateOne
SetNillableOrder sets the "order" field if the given value is not nil.
func (*QuestionUpdateOne) SetNillableType ¶
func (quo *QuestionUpdateOne) SetNillableType(q *question.Type) *QuestionUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*QuestionUpdateOne) SetOrder ¶
func (quo *QuestionUpdateOne) SetOrder(i int) *QuestionUpdateOne
SetOrder sets the "order" field.
func (*QuestionUpdateOne) SetType ¶
func (quo *QuestionUpdateOne) SetType(q question.Type) *QuestionUpdateOne
SetType sets the "type" field.
func (*QuestionUpdateOne) SetUpdateTime ¶
func (quo *QuestionUpdateOne) SetUpdateTime(t time.Time) *QuestionUpdateOne
SetUpdateTime sets the "update_time" field.
type Response ¶
type Response struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Value holds the value of the "value" field. Value int `json:"value,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ResponseQuery when eager-loading is set. Edges ResponseEdges `json:"edges"` // contains filtered or unexported fields }
Response is the model entity for the Response schema.
func (*Response) Unwrap ¶
Unwrap unwraps the Response 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 (*Response) Update ¶
func (r *Response) Update() *ResponseUpdateOne
Update returns a builder for updating this Response. Note that you need to call Response.Unwrap() before calling this method if this Response was returned from a transaction, and the transaction was committed or rolled back.
type ResponseClient ¶
type ResponseClient struct {
// contains filtered or unexported fields
}
ResponseClient is a client for the Response schema.
func NewResponseClient ¶
func NewResponseClient(c config) *ResponseClient
NewResponseClient returns a client for the Response from the given config.
func (*ResponseClient) Create ¶
func (c *ResponseClient) Create() *ResponseCreate
Create returns a builder for creating a Response entity.
func (*ResponseClient) CreateBulk ¶
func (c *ResponseClient) CreateBulk(builders ...*ResponseCreate) *ResponseCreateBulk
CreateBulk returns a builder for creating a bulk of Response entities.
func (*ResponseClient) Delete ¶
func (c *ResponseClient) Delete() *ResponseDelete
Delete returns a delete builder for Response.
func (*ResponseClient) DeleteOne ¶
func (c *ResponseClient) DeleteOne(r *Response) *ResponseDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ResponseClient) DeleteOneID ¶
func (c *ResponseClient) DeleteOneID(id uuid.UUID) *ResponseDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*ResponseClient) Hooks ¶
func (c *ResponseClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ResponseClient) Query ¶
func (c *ResponseClient) Query() *ResponseQuery
Query returns a query builder for Response.
func (*ResponseClient) QueryItem ¶
func (c *ResponseClient) QueryItem(r *Response) *ItemQuery
QueryItem queries the item edge of a Response.
func (*ResponseClient) QueryTake ¶
func (c *ResponseClient) QueryTake(r *Response) *TakeQuery
QueryTake queries the take edge of a Response.
func (*ResponseClient) Update ¶
func (c *ResponseClient) Update() *ResponseUpdate
Update returns an update builder for Response.
func (*ResponseClient) UpdateOne ¶
func (c *ResponseClient) UpdateOne(r *Response) *ResponseUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ResponseClient) UpdateOneID ¶
func (c *ResponseClient) UpdateOneID(id uuid.UUID) *ResponseUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ResponseClient) Use ¶
func (c *ResponseClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `response.Hooks(f(g(h())))`.
type ResponseCreate ¶
type ResponseCreate struct {
// contains filtered or unexported fields
}
ResponseCreate is the builder for creating a Response entity.
func (*ResponseCreate) Exec ¶
func (rc *ResponseCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ResponseCreate) ExecX ¶
func (rc *ResponseCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResponseCreate) Mutation ¶
func (rc *ResponseCreate) Mutation() *ResponseMutation
Mutation returns the ResponseMutation object of the builder.
func (*ResponseCreate) Save ¶
func (rc *ResponseCreate) Save(ctx context.Context) (*Response, error)
Save creates the Response in the database.
func (*ResponseCreate) SaveX ¶
func (rc *ResponseCreate) SaveX(ctx context.Context) *Response
SaveX calls Save and panics if Save returns an error.
func (*ResponseCreate) SetCreateTime ¶
func (rc *ResponseCreate) SetCreateTime(t time.Time) *ResponseCreate
SetCreateTime sets the "create_time" field.
func (*ResponseCreate) SetID ¶
func (rc *ResponseCreate) SetID(u uuid.UUID) *ResponseCreate
SetID sets the "id" field.
func (*ResponseCreate) SetItem ¶
func (rc *ResponseCreate) SetItem(i *Item) *ResponseCreate
SetItem sets the "item" edge to the Item entity.
func (*ResponseCreate) SetItemID ¶
func (rc *ResponseCreate) SetItemID(id uuid.UUID) *ResponseCreate
SetItemID sets the "item" edge to the Item entity by ID.
func (*ResponseCreate) SetMeta ¶
func (rc *ResponseCreate) SetMeta(m map[string]interface{}) *ResponseCreate
SetMeta sets the "meta" field.
func (*ResponseCreate) SetNillableCreateTime ¶
func (rc *ResponseCreate) SetNillableCreateTime(t *time.Time) *ResponseCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ResponseCreate) SetNillableID ¶
func (rc *ResponseCreate) SetNillableID(u *uuid.UUID) *ResponseCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ResponseCreate) SetNillableUpdateTime ¶
func (rc *ResponseCreate) SetNillableUpdateTime(t *time.Time) *ResponseCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ResponseCreate) SetNillableValue ¶
func (rc *ResponseCreate) SetNillableValue(i *int) *ResponseCreate
SetNillableValue sets the "value" field if the given value is not nil.
func (*ResponseCreate) SetTake ¶
func (rc *ResponseCreate) SetTake(t *Take) *ResponseCreate
SetTake sets the "take" edge to the Take entity.
func (*ResponseCreate) SetTakeID ¶
func (rc *ResponseCreate) SetTakeID(id uuid.UUID) *ResponseCreate
SetTakeID sets the "take" edge to the Take entity by ID.
func (*ResponseCreate) SetUpdateTime ¶
func (rc *ResponseCreate) SetUpdateTime(t time.Time) *ResponseCreate
SetUpdateTime sets the "update_time" field.
func (*ResponseCreate) SetValue ¶
func (rc *ResponseCreate) SetValue(i int) *ResponseCreate
SetValue sets the "value" field.
type ResponseCreateBulk ¶
type ResponseCreateBulk struct {
// contains filtered or unexported fields
}
ResponseCreateBulk is the builder for creating many Response entities in bulk.
func (*ResponseCreateBulk) Exec ¶
func (rcb *ResponseCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ResponseCreateBulk) ExecX ¶
func (rcb *ResponseCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ResponseDelete ¶
type ResponseDelete struct {
// contains filtered or unexported fields
}
ResponseDelete is the builder for deleting a Response entity.
func (*ResponseDelete) Exec ¶
func (rd *ResponseDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ResponseDelete) ExecX ¶
func (rd *ResponseDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ResponseDelete) Where ¶
func (rd *ResponseDelete) Where(ps ...predicate.Response) *ResponseDelete
Where appends a list predicates to the ResponseDelete builder.
type ResponseDeleteOne ¶
type ResponseDeleteOne struct {
// contains filtered or unexported fields
}
ResponseDeleteOne is the builder for deleting a single Response entity.
func (*ResponseDeleteOne) Exec ¶
func (rdo *ResponseDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ResponseDeleteOne) ExecX ¶
func (rdo *ResponseDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ResponseEdges ¶
type ResponseEdges struct { // Item holds the value of the item edge. Item *Item `json:"item,omitempty"` // Take holds the value of the take edge. Take *Take `json:"take,omitempty"` // contains filtered or unexported fields }
ResponseEdges holds the relations/edges for other nodes in the graph.
func (ResponseEdges) ItemOrErr ¶
func (e ResponseEdges) ItemOrErr() (*Item, error)
ItemOrErr returns the Item value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ResponseEdges) TakeOrErr ¶
func (e ResponseEdges) TakeOrErr() (*Take, error)
TakeOrErr returns the Take value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ResponseGroupBy ¶
type ResponseGroupBy struct {
// contains filtered or unexported fields
}
ResponseGroupBy is the group-by builder for Response entities.
func (*ResponseGroupBy) Aggregate ¶
func (rgb *ResponseGroupBy) Aggregate(fns ...AggregateFunc) *ResponseGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ResponseGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ResponseGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ResponseGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ResponseGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ResponseGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ResponseGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ResponseGroupBy) Scan ¶
func (rgb *ResponseGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ResponseGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ResponseMutation ¶
type ResponseMutation struct {
// contains filtered or unexported fields
}
ResponseMutation represents an operation that mutates the Response nodes in the graph.
func (*ResponseMutation) AddField ¶
func (m *ResponseMutation) 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 (*ResponseMutation) AddValue ¶
func (m *ResponseMutation) AddValue(i int)
AddValue adds i to the "value" field.
func (*ResponseMutation) AddedEdges ¶
func (m *ResponseMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ResponseMutation) AddedField ¶
func (m *ResponseMutation) 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 (*ResponseMutation) AddedFields ¶
func (m *ResponseMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ResponseMutation) AddedIDs ¶
func (m *ResponseMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ResponseMutation) AddedValue ¶
func (m *ResponseMutation) AddedValue() (r int, exists bool)
AddedValue returns the value that was added to the "value" field in this mutation.
func (*ResponseMutation) ClearEdge ¶
func (m *ResponseMutation) 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 (*ResponseMutation) ClearField ¶
func (m *ResponseMutation) 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 (*ResponseMutation) ClearItem ¶
func (m *ResponseMutation) ClearItem()
ClearItem clears the "item" edge to the Item entity.
func (*ResponseMutation) ClearMeta ¶
func (m *ResponseMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*ResponseMutation) ClearTake ¶
func (m *ResponseMutation) ClearTake()
ClearTake clears the "take" edge to the Take entity.
func (*ResponseMutation) ClearedEdges ¶
func (m *ResponseMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ResponseMutation) ClearedFields ¶
func (m *ResponseMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ResponseMutation) Client ¶
func (m ResponseMutation) 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 (*ResponseMutation) CreateTime ¶
func (m *ResponseMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ResponseMutation) EdgeCleared ¶
func (m *ResponseMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ResponseMutation) Field ¶
func (m *ResponseMutation) 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 (*ResponseMutation) FieldCleared ¶
func (m *ResponseMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ResponseMutation) Fields ¶
func (m *ResponseMutation) 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 (*ResponseMutation) ID ¶
func (m *ResponseMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ResponseMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ResponseMutation) ItemCleared ¶
func (m *ResponseMutation) ItemCleared() bool
ItemCleared reports if the "item" edge to the Item entity was cleared.
func (*ResponseMutation) ItemID ¶
func (m *ResponseMutation) ItemID() (id uuid.UUID, exists bool)
ItemID returns the "item" edge ID in the mutation.
func (*ResponseMutation) ItemIDs ¶
func (m *ResponseMutation) ItemIDs() (ids []uuid.UUID)
ItemIDs returns the "item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ItemID instead. It exists only for internal usage by the builders.
func (*ResponseMutation) Meta ¶
func (m *ResponseMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*ResponseMutation) MetaCleared ¶
func (m *ResponseMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*ResponseMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Response entity. If the Response 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 (*ResponseMutation) 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 (*ResponseMutation) OldMeta ¶
func (m *ResponseMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the Response entity. If the Response 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 (*ResponseMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Response entity. If the Response 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 (*ResponseMutation) OldValue ¶
func (m *ResponseMutation) OldValue(ctx context.Context) (v int, err error)
OldValue returns the old "value" field's value of the Response entity. If the Response 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 (*ResponseMutation) RemovedEdges ¶
func (m *ResponseMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ResponseMutation) RemovedIDs ¶
func (m *ResponseMutation) 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 (*ResponseMutation) ResetCreateTime ¶
func (m *ResponseMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ResponseMutation) ResetEdge ¶
func (m *ResponseMutation) 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 (*ResponseMutation) ResetField ¶
func (m *ResponseMutation) 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 (*ResponseMutation) ResetItem ¶
func (m *ResponseMutation) ResetItem()
ResetItem resets all changes to the "item" edge.
func (*ResponseMutation) ResetMeta ¶
func (m *ResponseMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*ResponseMutation) ResetTake ¶
func (m *ResponseMutation) ResetTake()
ResetTake resets all changes to the "take" edge.
func (*ResponseMutation) ResetUpdateTime ¶
func (m *ResponseMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ResponseMutation) ResetValue ¶
func (m *ResponseMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*ResponseMutation) SetCreateTime ¶
func (m *ResponseMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ResponseMutation) SetField ¶
func (m *ResponseMutation) 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 (*ResponseMutation) SetID ¶
func (m *ResponseMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Response entities.
func (*ResponseMutation) SetItemID ¶
func (m *ResponseMutation) SetItemID(id uuid.UUID)
SetItemID sets the "item" edge to the Item entity by id.
func (*ResponseMutation) SetMeta ¶
func (m *ResponseMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*ResponseMutation) SetTakeID ¶
func (m *ResponseMutation) SetTakeID(id uuid.UUID)
SetTakeID sets the "take" edge to the Take entity by id.
func (*ResponseMutation) SetUpdateTime ¶
func (m *ResponseMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ResponseMutation) SetValue ¶
func (m *ResponseMutation) SetValue(i int)
SetValue sets the "value" field.
func (*ResponseMutation) TakeCleared ¶
func (m *ResponseMutation) TakeCleared() bool
TakeCleared reports if the "take" edge to the Take entity was cleared.
func (*ResponseMutation) TakeID ¶
func (m *ResponseMutation) TakeID() (id uuid.UUID, exists bool)
TakeID returns the "take" edge ID in the mutation.
func (*ResponseMutation) TakeIDs ¶
func (m *ResponseMutation) TakeIDs() (ids []uuid.UUID)
TakeIDs returns the "take" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TakeID instead. It exists only for internal usage by the builders.
func (ResponseMutation) Tx ¶
func (m ResponseMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ResponseMutation) Type ¶
func (m *ResponseMutation) Type() string
Type returns the node type of this mutation (Response).
func (*ResponseMutation) UpdateTime ¶
func (m *ResponseMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ResponseMutation) Value ¶
func (m *ResponseMutation) Value() (r int, exists bool)
Value returns the value of the "value" field in the mutation.
func (*ResponseMutation) Where ¶
func (m *ResponseMutation) Where(ps ...predicate.Response)
Where appends a list predicates to the ResponseMutation builder.
type ResponseQuery ¶
type ResponseQuery struct {
// contains filtered or unexported fields
}
ResponseQuery is the builder for querying Response entities.
func (*ResponseQuery) All ¶
func (rq *ResponseQuery) All(ctx context.Context) ([]*Response, error)
All executes the query and returns a list of Responses.
func (*ResponseQuery) AllX ¶
func (rq *ResponseQuery) AllX(ctx context.Context) []*Response
AllX is like All, but panics if an error occurs.
func (*ResponseQuery) Clone ¶
func (rq *ResponseQuery) Clone() *ResponseQuery
Clone returns a duplicate of the ResponseQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ResponseQuery) Count ¶
func (rq *ResponseQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ResponseQuery) CountX ¶
func (rq *ResponseQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ResponseQuery) Exist ¶
func (rq *ResponseQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ResponseQuery) ExistX ¶
func (rq *ResponseQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ResponseQuery) First ¶
func (rq *ResponseQuery) First(ctx context.Context) (*Response, error)
First returns the first Response entity from the query. Returns a *NotFoundError when no Response was found.
func (*ResponseQuery) FirstID ¶
FirstID returns the first Response ID from the query. Returns a *NotFoundError when no Response ID was found.
func (*ResponseQuery) FirstIDX ¶
func (rq *ResponseQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ResponseQuery) FirstX ¶
func (rq *ResponseQuery) FirstX(ctx context.Context) *Response
FirstX is like First, but panics if an error occurs.
func (*ResponseQuery) GroupBy ¶
func (rq *ResponseQuery) GroupBy(field string, fields ...string) *ResponseGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Response.Query(). GroupBy(response.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ResponseQuery) IDsX ¶
func (rq *ResponseQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ResponseQuery) Limit ¶
func (rq *ResponseQuery) Limit(limit int) *ResponseQuery
Limit adds a limit step to the query.
func (*ResponseQuery) Offset ¶
func (rq *ResponseQuery) Offset(offset int) *ResponseQuery
Offset adds an offset step to the query.
func (*ResponseQuery) Only ¶
func (rq *ResponseQuery) Only(ctx context.Context) (*Response, error)
Only returns a single Response entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Response entity is found. Returns a *NotFoundError when no Response entities are found.
func (*ResponseQuery) OnlyID ¶
OnlyID is like Only, but returns the only Response ID in the query. Returns a *NotSingularError when more than one Response ID is found. Returns a *NotFoundError when no entities are found.
func (*ResponseQuery) OnlyIDX ¶
func (rq *ResponseQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ResponseQuery) OnlyX ¶
func (rq *ResponseQuery) OnlyX(ctx context.Context) *Response
OnlyX is like Only, but panics if an error occurs.
func (*ResponseQuery) Order ¶
func (rq *ResponseQuery) Order(o ...OrderFunc) *ResponseQuery
Order adds an order step to the query.
func (*ResponseQuery) QueryItem ¶
func (rq *ResponseQuery) QueryItem() *ItemQuery
QueryItem chains the current query on the "item" edge.
func (*ResponseQuery) QueryTake ¶
func (rq *ResponseQuery) QueryTake() *TakeQuery
QueryTake chains the current query on the "take" edge.
func (*ResponseQuery) Select ¶
func (rq *ResponseQuery) Select(fields ...string) *ResponseSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Response.Query(). Select(response.FieldCreateTime). Scan(ctx, &v)
func (*ResponseQuery) Unique ¶
func (rq *ResponseQuery) Unique(unique bool) *ResponseQuery
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 (*ResponseQuery) Where ¶
func (rq *ResponseQuery) Where(ps ...predicate.Response) *ResponseQuery
Where adds a new predicate for the ResponseQuery builder.
func (*ResponseQuery) WithItem ¶
func (rq *ResponseQuery) WithItem(opts ...func(*ItemQuery)) *ResponseQuery
WithItem tells the query-builder to eager-load the nodes that are connected to the "item" edge. The optional arguments are used to configure the query builder of the edge.
func (*ResponseQuery) WithTake ¶
func (rq *ResponseQuery) WithTake(opts ...func(*TakeQuery)) *ResponseQuery
WithTake tells the query-builder to eager-load the nodes that are connected to the "take" edge. The optional arguments are used to configure the query builder of the edge.
type ResponseSelect ¶
type ResponseSelect struct { *ResponseQuery // contains filtered or unexported fields }
ResponseSelect is the builder for selecting fields of Response entities.
func (*ResponseSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ResponseSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ResponseSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ResponseSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ResponseSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ResponseSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ResponseSelect) Scan ¶
func (rs *ResponseSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ResponseSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ResponseUpdate ¶
type ResponseUpdate struct {
// contains filtered or unexported fields
}
ResponseUpdate is the builder for updating Response entities.
func (*ResponseUpdate) AddValue ¶
func (ru *ResponseUpdate) AddValue(i int) *ResponseUpdate
AddValue adds i to the "value" field.
func (*ResponseUpdate) ClearItem ¶
func (ru *ResponseUpdate) ClearItem() *ResponseUpdate
ClearItem clears the "item" edge to the Item entity.
func (*ResponseUpdate) ClearMeta ¶
func (ru *ResponseUpdate) ClearMeta() *ResponseUpdate
ClearMeta clears the value of the "meta" field.
func (*ResponseUpdate) ClearTake ¶
func (ru *ResponseUpdate) ClearTake() *ResponseUpdate
ClearTake clears the "take" edge to the Take entity.
func (*ResponseUpdate) Exec ¶
func (ru *ResponseUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ResponseUpdate) ExecX ¶
func (ru *ResponseUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResponseUpdate) Mutation ¶
func (ru *ResponseUpdate) Mutation() *ResponseMutation
Mutation returns the ResponseMutation object of the builder.
func (*ResponseUpdate) Save ¶
func (ru *ResponseUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ResponseUpdate) SaveX ¶
func (ru *ResponseUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ResponseUpdate) SetItem ¶
func (ru *ResponseUpdate) SetItem(i *Item) *ResponseUpdate
SetItem sets the "item" edge to the Item entity.
func (*ResponseUpdate) SetItemID ¶
func (ru *ResponseUpdate) SetItemID(id uuid.UUID) *ResponseUpdate
SetItemID sets the "item" edge to the Item entity by ID.
func (*ResponseUpdate) SetMeta ¶
func (ru *ResponseUpdate) SetMeta(m map[string]interface{}) *ResponseUpdate
SetMeta sets the "meta" field.
func (*ResponseUpdate) SetNillableValue ¶
func (ru *ResponseUpdate) SetNillableValue(i *int) *ResponseUpdate
SetNillableValue sets the "value" field if the given value is not nil.
func (*ResponseUpdate) SetTake ¶
func (ru *ResponseUpdate) SetTake(t *Take) *ResponseUpdate
SetTake sets the "take" edge to the Take entity.
func (*ResponseUpdate) SetTakeID ¶
func (ru *ResponseUpdate) SetTakeID(id uuid.UUID) *ResponseUpdate
SetTakeID sets the "take" edge to the Take entity by ID.
func (*ResponseUpdate) SetUpdateTime ¶
func (ru *ResponseUpdate) SetUpdateTime(t time.Time) *ResponseUpdate
SetUpdateTime sets the "update_time" field.
func (*ResponseUpdate) SetValue ¶
func (ru *ResponseUpdate) SetValue(i int) *ResponseUpdate
SetValue sets the "value" field.
func (*ResponseUpdate) Where ¶
func (ru *ResponseUpdate) Where(ps ...predicate.Response) *ResponseUpdate
Where appends a list predicates to the ResponseUpdate builder.
type ResponseUpdateOne ¶
type ResponseUpdateOne struct {
// contains filtered or unexported fields
}
ResponseUpdateOne is the builder for updating a single Response entity.
func (*ResponseUpdateOne) AddValue ¶
func (ruo *ResponseUpdateOne) AddValue(i int) *ResponseUpdateOne
AddValue adds i to the "value" field.
func (*ResponseUpdateOne) ClearItem ¶
func (ruo *ResponseUpdateOne) ClearItem() *ResponseUpdateOne
ClearItem clears the "item" edge to the Item entity.
func (*ResponseUpdateOne) ClearMeta ¶
func (ruo *ResponseUpdateOne) ClearMeta() *ResponseUpdateOne
ClearMeta clears the value of the "meta" field.
func (*ResponseUpdateOne) ClearTake ¶
func (ruo *ResponseUpdateOne) ClearTake() *ResponseUpdateOne
ClearTake clears the "take" edge to the Take entity.
func (*ResponseUpdateOne) Exec ¶
func (ruo *ResponseUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ResponseUpdateOne) ExecX ¶
func (ruo *ResponseUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResponseUpdateOne) Mutation ¶
func (ruo *ResponseUpdateOne) Mutation() *ResponseMutation
Mutation returns the ResponseMutation object of the builder.
func (*ResponseUpdateOne) Save ¶
func (ruo *ResponseUpdateOne) Save(ctx context.Context) (*Response, error)
Save executes the query and returns the updated Response entity.
func (*ResponseUpdateOne) SaveX ¶
func (ruo *ResponseUpdateOne) SaveX(ctx context.Context) *Response
SaveX is like Save, but panics if an error occurs.
func (*ResponseUpdateOne) Select ¶
func (ruo *ResponseUpdateOne) Select(field string, fields ...string) *ResponseUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ResponseUpdateOne) SetItem ¶
func (ruo *ResponseUpdateOne) SetItem(i *Item) *ResponseUpdateOne
SetItem sets the "item" edge to the Item entity.
func (*ResponseUpdateOne) SetItemID ¶
func (ruo *ResponseUpdateOne) SetItemID(id uuid.UUID) *ResponseUpdateOne
SetItemID sets the "item" edge to the Item entity by ID.
func (*ResponseUpdateOne) SetMeta ¶
func (ruo *ResponseUpdateOne) SetMeta(m map[string]interface{}) *ResponseUpdateOne
SetMeta sets the "meta" field.
func (*ResponseUpdateOne) SetNillableValue ¶
func (ruo *ResponseUpdateOne) SetNillableValue(i *int) *ResponseUpdateOne
SetNillableValue sets the "value" field if the given value is not nil.
func (*ResponseUpdateOne) SetTake ¶
func (ruo *ResponseUpdateOne) SetTake(t *Take) *ResponseUpdateOne
SetTake sets the "take" edge to the Take entity.
func (*ResponseUpdateOne) SetTakeID ¶
func (ruo *ResponseUpdateOne) SetTakeID(id uuid.UUID) *ResponseUpdateOne
SetTakeID sets the "take" edge to the Take entity by ID.
func (*ResponseUpdateOne) SetUpdateTime ¶
func (ruo *ResponseUpdateOne) SetUpdateTime(t time.Time) *ResponseUpdateOne
SetUpdateTime sets the "update_time" field.
func (*ResponseUpdateOne) SetValue ¶
func (ruo *ResponseUpdateOne) SetValue(i int) *ResponseUpdateOne
SetValue sets the "value" field.
type Result ¶
type Result struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // RawScore holds the value of the "raw_score" field. RawScore float64 `json:"raw_score,omitempty"` // FinalScore holds the value of the "final_score" field. FinalScore float64 `json:"final_score,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ResultQuery when eager-loading is set. Edges ResultEdges `json:"edges"` // contains filtered or unexported fields }
Result is the model entity for the Result schema.
func (*Result) QueryScale ¶
func (r *Result) QueryScale() *ScaleQuery
QueryScale queries the "scale" edge of the Result entity.
func (*Result) Unwrap ¶
Unwrap unwraps the Result 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 (*Result) Update ¶
func (r *Result) Update() *ResultUpdateOne
Update returns a builder for updating this Result. Note that you need to call Result.Unwrap() before calling this method if this Result was returned from a transaction, and the transaction was committed or rolled back.
type ResultClient ¶
type ResultClient struct {
// contains filtered or unexported fields
}
ResultClient is a client for the Result schema.
func NewResultClient ¶
func NewResultClient(c config) *ResultClient
NewResultClient returns a client for the Result from the given config.
func (*ResultClient) Create ¶
func (c *ResultClient) Create() *ResultCreate
Create returns a builder for creating a Result entity.
func (*ResultClient) CreateBulk ¶
func (c *ResultClient) CreateBulk(builders ...*ResultCreate) *ResultCreateBulk
CreateBulk returns a builder for creating a bulk of Result entities.
func (*ResultClient) Delete ¶
func (c *ResultClient) Delete() *ResultDelete
Delete returns a delete builder for Result.
func (*ResultClient) DeleteOne ¶
func (c *ResultClient) DeleteOne(r *Result) *ResultDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ResultClient) DeleteOneID ¶
func (c *ResultClient) DeleteOneID(id uuid.UUID) *ResultDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*ResultClient) Query ¶
func (c *ResultClient) Query() *ResultQuery
Query returns a query builder for Result.
func (*ResultClient) QueryScale ¶
func (c *ResultClient) QueryScale(r *Result) *ScaleQuery
QueryScale queries the scale edge of a Result.
func (*ResultClient) QueryTake ¶
func (c *ResultClient) QueryTake(r *Result) *TakeQuery
QueryTake queries the take edge of a Result.
func (*ResultClient) Update ¶
func (c *ResultClient) Update() *ResultUpdate
Update returns an update builder for Result.
func (*ResultClient) UpdateOne ¶
func (c *ResultClient) UpdateOne(r *Result) *ResultUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ResultClient) UpdateOneID ¶
func (c *ResultClient) UpdateOneID(id uuid.UUID) *ResultUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ResultClient) Use ¶
func (c *ResultClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `result.Hooks(f(g(h())))`.
type ResultCreate ¶
type ResultCreate struct {
// contains filtered or unexported fields
}
ResultCreate is the builder for creating a Result entity.
func (*ResultCreate) Exec ¶
func (rc *ResultCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ResultCreate) ExecX ¶
func (rc *ResultCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResultCreate) Mutation ¶
func (rc *ResultCreate) Mutation() *ResultMutation
Mutation returns the ResultMutation object of the builder.
func (*ResultCreate) Save ¶
func (rc *ResultCreate) Save(ctx context.Context) (*Result, error)
Save creates the Result in the database.
func (*ResultCreate) SaveX ¶
func (rc *ResultCreate) SaveX(ctx context.Context) *Result
SaveX calls Save and panics if Save returns an error.
func (*ResultCreate) SetCreateTime ¶
func (rc *ResultCreate) SetCreateTime(t time.Time) *ResultCreate
SetCreateTime sets the "create_time" field.
func (*ResultCreate) SetFinalScore ¶
func (rc *ResultCreate) SetFinalScore(f float64) *ResultCreate
SetFinalScore sets the "final_score" field.
func (*ResultCreate) SetID ¶
func (rc *ResultCreate) SetID(u uuid.UUID) *ResultCreate
SetID sets the "id" field.
func (*ResultCreate) SetMeta ¶
func (rc *ResultCreate) SetMeta(m map[string]interface{}) *ResultCreate
SetMeta sets the "meta" field.
func (*ResultCreate) SetNillableCreateTime ¶
func (rc *ResultCreate) SetNillableCreateTime(t *time.Time) *ResultCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ResultCreate) SetNillableID ¶
func (rc *ResultCreate) SetNillableID(u *uuid.UUID) *ResultCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ResultCreate) SetNillableUpdateTime ¶
func (rc *ResultCreate) SetNillableUpdateTime(t *time.Time) *ResultCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ResultCreate) SetRawScore ¶
func (rc *ResultCreate) SetRawScore(f float64) *ResultCreate
SetRawScore sets the "raw_score" field.
func (*ResultCreate) SetScale ¶
func (rc *ResultCreate) SetScale(s *Scale) *ResultCreate
SetScale sets the "scale" edge to the Scale entity.
func (*ResultCreate) SetScaleID ¶
func (rc *ResultCreate) SetScaleID(id uuid.UUID) *ResultCreate
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*ResultCreate) SetTake ¶
func (rc *ResultCreate) SetTake(t *Take) *ResultCreate
SetTake sets the "take" edge to the Take entity.
func (*ResultCreate) SetTakeID ¶
func (rc *ResultCreate) SetTakeID(id uuid.UUID) *ResultCreate
SetTakeID sets the "take" edge to the Take entity by ID.
func (*ResultCreate) SetUpdateTime ¶
func (rc *ResultCreate) SetUpdateTime(t time.Time) *ResultCreate
SetUpdateTime sets the "update_time" field.
type ResultCreateBulk ¶
type ResultCreateBulk struct {
// contains filtered or unexported fields
}
ResultCreateBulk is the builder for creating many Result entities in bulk.
func (*ResultCreateBulk) Exec ¶
func (rcb *ResultCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ResultCreateBulk) ExecX ¶
func (rcb *ResultCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ResultDelete ¶
type ResultDelete struct {
// contains filtered or unexported fields
}
ResultDelete is the builder for deleting a Result entity.
func (*ResultDelete) Exec ¶
func (rd *ResultDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ResultDelete) ExecX ¶
func (rd *ResultDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ResultDelete) Where ¶
func (rd *ResultDelete) Where(ps ...predicate.Result) *ResultDelete
Where appends a list predicates to the ResultDelete builder.
type ResultDeleteOne ¶
type ResultDeleteOne struct {
// contains filtered or unexported fields
}
ResultDeleteOne is the builder for deleting a single Result entity.
func (*ResultDeleteOne) Exec ¶
func (rdo *ResultDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ResultDeleteOne) ExecX ¶
func (rdo *ResultDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ResultEdges ¶
type ResultEdges struct { // Scale holds the value of the scale edge. Scale *Scale `json:"scale,omitempty"` // Take holds the value of the take edge. Take *Take `json:"take,omitempty"` // contains filtered or unexported fields }
ResultEdges holds the relations/edges for other nodes in the graph.
func (ResultEdges) ScaleOrErr ¶
func (e ResultEdges) ScaleOrErr() (*Scale, error)
ScaleOrErr returns the Scale value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ResultEdges) TakeOrErr ¶
func (e ResultEdges) TakeOrErr() (*Take, error)
TakeOrErr returns the Take value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ResultGroupBy ¶
type ResultGroupBy struct {
// contains filtered or unexported fields
}
ResultGroupBy is the group-by builder for Result entities.
func (*ResultGroupBy) Aggregate ¶
func (rgb *ResultGroupBy) Aggregate(fns ...AggregateFunc) *ResultGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ResultGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ResultGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ResultGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ResultGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ResultGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ResultGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ResultGroupBy) Scan ¶
func (rgb *ResultGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ResultGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ResultMutation ¶
type ResultMutation struct {
// contains filtered or unexported fields
}
ResultMutation represents an operation that mutates the Result nodes in the graph.
func (*ResultMutation) AddField ¶
func (m *ResultMutation) 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 (*ResultMutation) AddFinalScore ¶
func (m *ResultMutation) AddFinalScore(f float64)
AddFinalScore adds f to the "final_score" field.
func (*ResultMutation) AddRawScore ¶
func (m *ResultMutation) AddRawScore(f float64)
AddRawScore adds f to the "raw_score" field.
func (*ResultMutation) AddedEdges ¶
func (m *ResultMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ResultMutation) AddedField ¶
func (m *ResultMutation) 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 (*ResultMutation) AddedFields ¶
func (m *ResultMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ResultMutation) AddedFinalScore ¶
func (m *ResultMutation) AddedFinalScore() (r float64, exists bool)
AddedFinalScore returns the value that was added to the "final_score" field in this mutation.
func (*ResultMutation) AddedIDs ¶
func (m *ResultMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ResultMutation) AddedRawScore ¶
func (m *ResultMutation) AddedRawScore() (r float64, exists bool)
AddedRawScore returns the value that was added to the "raw_score" field in this mutation.
func (*ResultMutation) ClearEdge ¶
func (m *ResultMutation) 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 (*ResultMutation) ClearField ¶
func (m *ResultMutation) 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 (*ResultMutation) ClearMeta ¶
func (m *ResultMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*ResultMutation) ClearScale ¶
func (m *ResultMutation) ClearScale()
ClearScale clears the "scale" edge to the Scale entity.
func (*ResultMutation) ClearTake ¶
func (m *ResultMutation) ClearTake()
ClearTake clears the "take" edge to the Take entity.
func (*ResultMutation) ClearedEdges ¶
func (m *ResultMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ResultMutation) ClearedFields ¶
func (m *ResultMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ResultMutation) Client ¶
func (m ResultMutation) 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 (*ResultMutation) CreateTime ¶
func (m *ResultMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ResultMutation) EdgeCleared ¶
func (m *ResultMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ResultMutation) Field ¶
func (m *ResultMutation) 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 (*ResultMutation) FieldCleared ¶
func (m *ResultMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ResultMutation) Fields ¶
func (m *ResultMutation) 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 (*ResultMutation) FinalScore ¶
func (m *ResultMutation) FinalScore() (r float64, exists bool)
FinalScore returns the value of the "final_score" field in the mutation.
func (*ResultMutation) ID ¶
func (m *ResultMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ResultMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ResultMutation) Meta ¶
func (m *ResultMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*ResultMutation) MetaCleared ¶
func (m *ResultMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*ResultMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Result entity. If the Result 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 (*ResultMutation) 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 (*ResultMutation) OldFinalScore ¶
func (m *ResultMutation) OldFinalScore(ctx context.Context) (v float64, err error)
OldFinalScore returns the old "final_score" field's value of the Result entity. If the Result 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 (*ResultMutation) OldMeta ¶
func (m *ResultMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the Result entity. If the Result 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 (*ResultMutation) OldRawScore ¶
func (m *ResultMutation) OldRawScore(ctx context.Context) (v float64, err error)
OldRawScore returns the old "raw_score" field's value of the Result entity. If the Result 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 (*ResultMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Result entity. If the Result 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 (*ResultMutation) RawScore ¶
func (m *ResultMutation) RawScore() (r float64, exists bool)
RawScore returns the value of the "raw_score" field in the mutation.
func (*ResultMutation) RemovedEdges ¶
func (m *ResultMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ResultMutation) RemovedIDs ¶
func (m *ResultMutation) 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 (*ResultMutation) ResetCreateTime ¶
func (m *ResultMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ResultMutation) ResetEdge ¶
func (m *ResultMutation) 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 (*ResultMutation) ResetField ¶
func (m *ResultMutation) 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 (*ResultMutation) ResetFinalScore ¶
func (m *ResultMutation) ResetFinalScore()
ResetFinalScore resets all changes to the "final_score" field.
func (*ResultMutation) ResetMeta ¶
func (m *ResultMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*ResultMutation) ResetRawScore ¶
func (m *ResultMutation) ResetRawScore()
ResetRawScore resets all changes to the "raw_score" field.
func (*ResultMutation) ResetScale ¶
func (m *ResultMutation) ResetScale()
ResetScale resets all changes to the "scale" edge.
func (*ResultMutation) ResetTake ¶
func (m *ResultMutation) ResetTake()
ResetTake resets all changes to the "take" edge.
func (*ResultMutation) ResetUpdateTime ¶
func (m *ResultMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ResultMutation) ScaleCleared ¶
func (m *ResultMutation) ScaleCleared() bool
ScaleCleared reports if the "scale" edge to the Scale entity was cleared.
func (*ResultMutation) ScaleID ¶
func (m *ResultMutation) ScaleID() (id uuid.UUID, exists bool)
ScaleID returns the "scale" edge ID in the mutation.
func (*ResultMutation) ScaleIDs ¶
func (m *ResultMutation) ScaleIDs() (ids []uuid.UUID)
ScaleIDs returns the "scale" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ScaleID instead. It exists only for internal usage by the builders.
func (*ResultMutation) SetCreateTime ¶
func (m *ResultMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ResultMutation) SetField ¶
func (m *ResultMutation) 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 (*ResultMutation) SetFinalScore ¶
func (m *ResultMutation) SetFinalScore(f float64)
SetFinalScore sets the "final_score" field.
func (*ResultMutation) SetID ¶
func (m *ResultMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Result entities.
func (*ResultMutation) SetMeta ¶
func (m *ResultMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*ResultMutation) SetRawScore ¶
func (m *ResultMutation) SetRawScore(f float64)
SetRawScore sets the "raw_score" field.
func (*ResultMutation) SetScaleID ¶
func (m *ResultMutation) SetScaleID(id uuid.UUID)
SetScaleID sets the "scale" edge to the Scale entity by id.
func (*ResultMutation) SetTakeID ¶
func (m *ResultMutation) SetTakeID(id uuid.UUID)
SetTakeID sets the "take" edge to the Take entity by id.
func (*ResultMutation) SetUpdateTime ¶
func (m *ResultMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ResultMutation) TakeCleared ¶
func (m *ResultMutation) TakeCleared() bool
TakeCleared reports if the "take" edge to the Take entity was cleared.
func (*ResultMutation) TakeID ¶
func (m *ResultMutation) TakeID() (id uuid.UUID, exists bool)
TakeID returns the "take" edge ID in the mutation.
func (*ResultMutation) TakeIDs ¶
func (m *ResultMutation) TakeIDs() (ids []uuid.UUID)
TakeIDs returns the "take" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TakeID instead. It exists only for internal usage by the builders.
func (ResultMutation) Tx ¶
func (m ResultMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ResultMutation) Type ¶
func (m *ResultMutation) Type() string
Type returns the node type of this mutation (Result).
func (*ResultMutation) UpdateTime ¶
func (m *ResultMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ResultMutation) Where ¶
func (m *ResultMutation) Where(ps ...predicate.Result)
Where appends a list predicates to the ResultMutation builder.
type ResultQuery ¶
type ResultQuery struct {
// contains filtered or unexported fields
}
ResultQuery is the builder for querying Result entities.
func (*ResultQuery) All ¶
func (rq *ResultQuery) All(ctx context.Context) ([]*Result, error)
All executes the query and returns a list of Results.
func (*ResultQuery) AllX ¶
func (rq *ResultQuery) AllX(ctx context.Context) []*Result
AllX is like All, but panics if an error occurs.
func (*ResultQuery) Clone ¶
func (rq *ResultQuery) Clone() *ResultQuery
Clone returns a duplicate of the ResultQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ResultQuery) Count ¶
func (rq *ResultQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ResultQuery) CountX ¶
func (rq *ResultQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ResultQuery) Exist ¶
func (rq *ResultQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ResultQuery) ExistX ¶
func (rq *ResultQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ResultQuery) First ¶
func (rq *ResultQuery) First(ctx context.Context) (*Result, error)
First returns the first Result entity from the query. Returns a *NotFoundError when no Result was found.
func (*ResultQuery) FirstID ¶
FirstID returns the first Result ID from the query. Returns a *NotFoundError when no Result ID was found.
func (*ResultQuery) FirstIDX ¶
func (rq *ResultQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ResultQuery) FirstX ¶
func (rq *ResultQuery) FirstX(ctx context.Context) *Result
FirstX is like First, but panics if an error occurs.
func (*ResultQuery) GroupBy ¶
func (rq *ResultQuery) GroupBy(field string, fields ...string) *ResultGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Result.Query(). GroupBy(result.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ResultQuery) IDsX ¶
func (rq *ResultQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ResultQuery) Limit ¶
func (rq *ResultQuery) Limit(limit int) *ResultQuery
Limit adds a limit step to the query.
func (*ResultQuery) Offset ¶
func (rq *ResultQuery) Offset(offset int) *ResultQuery
Offset adds an offset step to the query.
func (*ResultQuery) Only ¶
func (rq *ResultQuery) Only(ctx context.Context) (*Result, error)
Only returns a single Result entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Result entity is found. Returns a *NotFoundError when no Result entities are found.
func (*ResultQuery) OnlyID ¶
OnlyID is like Only, but returns the only Result ID in the query. Returns a *NotSingularError when more than one Result ID is found. Returns a *NotFoundError when no entities are found.
func (*ResultQuery) OnlyIDX ¶
func (rq *ResultQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ResultQuery) OnlyX ¶
func (rq *ResultQuery) OnlyX(ctx context.Context) *Result
OnlyX is like Only, but panics if an error occurs.
func (*ResultQuery) Order ¶
func (rq *ResultQuery) Order(o ...OrderFunc) *ResultQuery
Order adds an order step to the query.
func (*ResultQuery) QueryScale ¶
func (rq *ResultQuery) QueryScale() *ScaleQuery
QueryScale chains the current query on the "scale" edge.
func (*ResultQuery) QueryTake ¶
func (rq *ResultQuery) QueryTake() *TakeQuery
QueryTake chains the current query on the "take" edge.
func (*ResultQuery) Select ¶
func (rq *ResultQuery) Select(fields ...string) *ResultSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Result.Query(). Select(result.FieldCreateTime). Scan(ctx, &v)
func (*ResultQuery) Unique ¶
func (rq *ResultQuery) Unique(unique bool) *ResultQuery
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 (*ResultQuery) Where ¶
func (rq *ResultQuery) Where(ps ...predicate.Result) *ResultQuery
Where adds a new predicate for the ResultQuery builder.
func (*ResultQuery) WithScale ¶
func (rq *ResultQuery) WithScale(opts ...func(*ScaleQuery)) *ResultQuery
WithScale tells the query-builder to eager-load the nodes that are connected to the "scale" edge. The optional arguments are used to configure the query builder of the edge.
func (*ResultQuery) WithTake ¶
func (rq *ResultQuery) WithTake(opts ...func(*TakeQuery)) *ResultQuery
WithTake tells the query-builder to eager-load the nodes that are connected to the "take" edge. The optional arguments are used to configure the query builder of the edge.
type ResultSelect ¶
type ResultSelect struct { *ResultQuery // contains filtered or unexported fields }
ResultSelect is the builder for selecting fields of Result entities.
func (*ResultSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ResultSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ResultSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ResultSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ResultSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ResultSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ResultSelect) Scan ¶
func (rs *ResultSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ResultSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ResultUpdate ¶
type ResultUpdate struct {
// contains filtered or unexported fields
}
ResultUpdate is the builder for updating Result entities.
func (*ResultUpdate) AddFinalScore ¶
func (ru *ResultUpdate) AddFinalScore(f float64) *ResultUpdate
AddFinalScore adds f to the "final_score" field.
func (*ResultUpdate) AddRawScore ¶
func (ru *ResultUpdate) AddRawScore(f float64) *ResultUpdate
AddRawScore adds f to the "raw_score" field.
func (*ResultUpdate) ClearMeta ¶
func (ru *ResultUpdate) ClearMeta() *ResultUpdate
ClearMeta clears the value of the "meta" field.
func (*ResultUpdate) ClearScale ¶
func (ru *ResultUpdate) ClearScale() *ResultUpdate
ClearScale clears the "scale" edge to the Scale entity.
func (*ResultUpdate) ClearTake ¶
func (ru *ResultUpdate) ClearTake() *ResultUpdate
ClearTake clears the "take" edge to the Take entity.
func (*ResultUpdate) Exec ¶
func (ru *ResultUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ResultUpdate) ExecX ¶
func (ru *ResultUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResultUpdate) Mutation ¶
func (ru *ResultUpdate) Mutation() *ResultMutation
Mutation returns the ResultMutation object of the builder.
func (*ResultUpdate) Save ¶
func (ru *ResultUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ResultUpdate) SaveX ¶
func (ru *ResultUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ResultUpdate) SetFinalScore ¶
func (ru *ResultUpdate) SetFinalScore(f float64) *ResultUpdate
SetFinalScore sets the "final_score" field.
func (*ResultUpdate) SetMeta ¶
func (ru *ResultUpdate) SetMeta(m map[string]interface{}) *ResultUpdate
SetMeta sets the "meta" field.
func (*ResultUpdate) SetRawScore ¶
func (ru *ResultUpdate) SetRawScore(f float64) *ResultUpdate
SetRawScore sets the "raw_score" field.
func (*ResultUpdate) SetScale ¶
func (ru *ResultUpdate) SetScale(s *Scale) *ResultUpdate
SetScale sets the "scale" edge to the Scale entity.
func (*ResultUpdate) SetScaleID ¶
func (ru *ResultUpdate) SetScaleID(id uuid.UUID) *ResultUpdate
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*ResultUpdate) SetTake ¶
func (ru *ResultUpdate) SetTake(t *Take) *ResultUpdate
SetTake sets the "take" edge to the Take entity.
func (*ResultUpdate) SetTakeID ¶
func (ru *ResultUpdate) SetTakeID(id uuid.UUID) *ResultUpdate
SetTakeID sets the "take" edge to the Take entity by ID.
func (*ResultUpdate) SetUpdateTime ¶
func (ru *ResultUpdate) SetUpdateTime(t time.Time) *ResultUpdate
SetUpdateTime sets the "update_time" field.
func (*ResultUpdate) Where ¶
func (ru *ResultUpdate) Where(ps ...predicate.Result) *ResultUpdate
Where appends a list predicates to the ResultUpdate builder.
type ResultUpdateOne ¶
type ResultUpdateOne struct {
// contains filtered or unexported fields
}
ResultUpdateOne is the builder for updating a single Result entity.
func (*ResultUpdateOne) AddFinalScore ¶
func (ruo *ResultUpdateOne) AddFinalScore(f float64) *ResultUpdateOne
AddFinalScore adds f to the "final_score" field.
func (*ResultUpdateOne) AddRawScore ¶
func (ruo *ResultUpdateOne) AddRawScore(f float64) *ResultUpdateOne
AddRawScore adds f to the "raw_score" field.
func (*ResultUpdateOne) ClearMeta ¶
func (ruo *ResultUpdateOne) ClearMeta() *ResultUpdateOne
ClearMeta clears the value of the "meta" field.
func (*ResultUpdateOne) ClearScale ¶
func (ruo *ResultUpdateOne) ClearScale() *ResultUpdateOne
ClearScale clears the "scale" edge to the Scale entity.
func (*ResultUpdateOne) ClearTake ¶
func (ruo *ResultUpdateOne) ClearTake() *ResultUpdateOne
ClearTake clears the "take" edge to the Take entity.
func (*ResultUpdateOne) Exec ¶
func (ruo *ResultUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ResultUpdateOne) ExecX ¶
func (ruo *ResultUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResultUpdateOne) Mutation ¶
func (ruo *ResultUpdateOne) Mutation() *ResultMutation
Mutation returns the ResultMutation object of the builder.
func (*ResultUpdateOne) Save ¶
func (ruo *ResultUpdateOne) Save(ctx context.Context) (*Result, error)
Save executes the query and returns the updated Result entity.
func (*ResultUpdateOne) SaveX ¶
func (ruo *ResultUpdateOne) SaveX(ctx context.Context) *Result
SaveX is like Save, but panics if an error occurs.
func (*ResultUpdateOne) Select ¶
func (ruo *ResultUpdateOne) Select(field string, fields ...string) *ResultUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ResultUpdateOne) SetFinalScore ¶
func (ruo *ResultUpdateOne) SetFinalScore(f float64) *ResultUpdateOne
SetFinalScore sets the "final_score" field.
func (*ResultUpdateOne) SetMeta ¶
func (ruo *ResultUpdateOne) SetMeta(m map[string]interface{}) *ResultUpdateOne
SetMeta sets the "meta" field.
func (*ResultUpdateOne) SetRawScore ¶
func (ruo *ResultUpdateOne) SetRawScore(f float64) *ResultUpdateOne
SetRawScore sets the "raw_score" field.
func (*ResultUpdateOne) SetScale ¶
func (ruo *ResultUpdateOne) SetScale(s *Scale) *ResultUpdateOne
SetScale sets the "scale" edge to the Scale entity.
func (*ResultUpdateOne) SetScaleID ¶
func (ruo *ResultUpdateOne) SetScaleID(id uuid.UUID) *ResultUpdateOne
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*ResultUpdateOne) SetTake ¶
func (ruo *ResultUpdateOne) SetTake(t *Take) *ResultUpdateOne
SetTake sets the "take" edge to the Take entity.
func (*ResultUpdateOne) SetTakeID ¶
func (ruo *ResultUpdateOne) SetTakeID(id uuid.UUID) *ResultUpdateOne
SetTakeID sets the "take" edge to the Take entity by ID.
func (*ResultUpdateOne) SetUpdateTime ¶
func (ruo *ResultUpdateOne) SetUpdateTime(t time.Time) *ResultUpdateOne
SetUpdateTime sets the "update_time" field.
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 Sample ¶
type Sample struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Criteria holds the value of the "criteria" field. Criteria domain.SampleCriteria `json:"criteria,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SampleQuery when eager-loading is set. Edges SampleEdges `json:"edges"` // contains filtered or unexported fields }
Sample is the model entity for the Sample schema.
func (*Sample) QueryNorms ¶
QueryNorms queries the "norms" edge of the Sample entity.
func (*Sample) Unwrap ¶
Unwrap unwraps the Sample 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 (*Sample) Update ¶
func (s *Sample) Update() *SampleUpdateOne
Update returns a builder for updating this Sample. Note that you need to call Sample.Unwrap() before calling this method if this Sample was returned from a transaction, and the transaction was committed or rolled back.
type SampleClient ¶
type SampleClient struct {
// contains filtered or unexported fields
}
SampleClient is a client for the Sample schema.
func NewSampleClient ¶
func NewSampleClient(c config) *SampleClient
NewSampleClient returns a client for the Sample from the given config.
func (*SampleClient) Create ¶
func (c *SampleClient) Create() *SampleCreate
Create returns a builder for creating a Sample entity.
func (*SampleClient) CreateBulk ¶
func (c *SampleClient) CreateBulk(builders ...*SampleCreate) *SampleCreateBulk
CreateBulk returns a builder for creating a bulk of Sample entities.
func (*SampleClient) Delete ¶
func (c *SampleClient) Delete() *SampleDelete
Delete returns a delete builder for Sample.
func (*SampleClient) DeleteOne ¶
func (c *SampleClient) DeleteOne(s *Sample) *SampleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SampleClient) DeleteOneID ¶
func (c *SampleClient) DeleteOneID(id uuid.UUID) *SampleDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*SampleClient) Query ¶
func (c *SampleClient) Query() *SampleQuery
Query returns a query builder for Sample.
func (*SampleClient) QueryNorms ¶
func (c *SampleClient) QueryNorms(s *Sample) *NormQuery
QueryNorms queries the norms edge of a Sample.
func (*SampleClient) Update ¶
func (c *SampleClient) Update() *SampleUpdate
Update returns an update builder for Sample.
func (*SampleClient) UpdateOne ¶
func (c *SampleClient) UpdateOne(s *Sample) *SampleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SampleClient) UpdateOneID ¶
func (c *SampleClient) UpdateOneID(id uuid.UUID) *SampleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SampleClient) Use ¶
func (c *SampleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sample.Hooks(f(g(h())))`.
type SampleCreate ¶
type SampleCreate struct {
// contains filtered or unexported fields
}
SampleCreate is the builder for creating a Sample entity.
func (*SampleCreate) AddNormIDs ¶
func (sc *SampleCreate) AddNormIDs(ids ...uuid.UUID) *SampleCreate
AddNormIDs adds the "norms" edge to the Norm entity by IDs.
func (*SampleCreate) AddNorms ¶
func (sc *SampleCreate) AddNorms(n ...*Norm) *SampleCreate
AddNorms adds the "norms" edges to the Norm entity.
func (*SampleCreate) Exec ¶
func (sc *SampleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SampleCreate) ExecX ¶
func (sc *SampleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SampleCreate) Mutation ¶
func (sc *SampleCreate) Mutation() *SampleMutation
Mutation returns the SampleMutation object of the builder.
func (*SampleCreate) Save ¶
func (sc *SampleCreate) Save(ctx context.Context) (*Sample, error)
Save creates the Sample in the database.
func (*SampleCreate) SaveX ¶
func (sc *SampleCreate) SaveX(ctx context.Context) *Sample
SaveX calls Save and panics if Save returns an error.
func (*SampleCreate) SetCode ¶
func (sc *SampleCreate) SetCode(s string) *SampleCreate
SetCode sets the "code" field.
func (*SampleCreate) SetCreateTime ¶
func (sc *SampleCreate) SetCreateTime(t time.Time) *SampleCreate
SetCreateTime sets the "create_time" field.
func (*SampleCreate) SetCriteria ¶
func (sc *SampleCreate) SetCriteria(dc domain.SampleCriteria) *SampleCreate
SetCriteria sets the "criteria" field.
func (*SampleCreate) SetID ¶
func (sc *SampleCreate) SetID(u uuid.UUID) *SampleCreate
SetID sets the "id" field.
func (*SampleCreate) SetNillableCreateTime ¶
func (sc *SampleCreate) SetNillableCreateTime(t *time.Time) *SampleCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*SampleCreate) SetNillableID ¶
func (sc *SampleCreate) SetNillableID(u *uuid.UUID) *SampleCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SampleCreate) SetNillableUpdateTime ¶
func (sc *SampleCreate) SetNillableUpdateTime(t *time.Time) *SampleCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*SampleCreate) SetUpdateTime ¶
func (sc *SampleCreate) SetUpdateTime(t time.Time) *SampleCreate
SetUpdateTime sets the "update_time" field.
type SampleCreateBulk ¶
type SampleCreateBulk struct {
// contains filtered or unexported fields
}
SampleCreateBulk is the builder for creating many Sample entities in bulk.
func (*SampleCreateBulk) Exec ¶
func (scb *SampleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SampleCreateBulk) ExecX ¶
func (scb *SampleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SampleDelete ¶
type SampleDelete struct {
// contains filtered or unexported fields
}
SampleDelete is the builder for deleting a Sample entity.
func (*SampleDelete) Exec ¶
func (sd *SampleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SampleDelete) ExecX ¶
func (sd *SampleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SampleDelete) Where ¶
func (sd *SampleDelete) Where(ps ...predicate.Sample) *SampleDelete
Where appends a list predicates to the SampleDelete builder.
type SampleDeleteOne ¶
type SampleDeleteOne struct {
// contains filtered or unexported fields
}
SampleDeleteOne is the builder for deleting a single Sample entity.
func (*SampleDeleteOne) Exec ¶
func (sdo *SampleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SampleDeleteOne) ExecX ¶
func (sdo *SampleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SampleEdges ¶
type SampleEdges struct { // Norms holds the value of the norms edge. Norms []*Norm `json:"norms,omitempty"` // contains filtered or unexported fields }
SampleEdges holds the relations/edges for other nodes in the graph.
func (SampleEdges) NormsOrErr ¶
func (e SampleEdges) NormsOrErr() ([]*Norm, error)
NormsOrErr returns the Norms value or an error if the edge was not loaded in eager-loading.
type SampleGroupBy ¶
type SampleGroupBy struct {
// contains filtered or unexported fields
}
SampleGroupBy is the group-by builder for Sample entities.
func (*SampleGroupBy) Aggregate ¶
func (sgb *SampleGroupBy) Aggregate(fns ...AggregateFunc) *SampleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SampleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SampleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SampleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SampleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SampleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SampleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SampleGroupBy) Scan ¶
func (sgb *SampleGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SampleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SampleMutation ¶
type SampleMutation struct {
// contains filtered or unexported fields
}
SampleMutation represents an operation that mutates the Sample nodes in the graph.
func (*SampleMutation) AddField ¶
func (m *SampleMutation) 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 (*SampleMutation) AddNormIDs ¶
func (m *SampleMutation) AddNormIDs(ids ...uuid.UUID)
AddNormIDs adds the "norms" edge to the Norm entity by ids.
func (*SampleMutation) AddedEdges ¶
func (m *SampleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SampleMutation) AddedField ¶
func (m *SampleMutation) 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 (*SampleMutation) AddedFields ¶
func (m *SampleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SampleMutation) AddedIDs ¶
func (m *SampleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SampleMutation) ClearEdge ¶
func (m *SampleMutation) 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 (*SampleMutation) ClearField ¶
func (m *SampleMutation) 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 (*SampleMutation) ClearNorms ¶
func (m *SampleMutation) ClearNorms()
ClearNorms clears the "norms" edge to the Norm entity.
func (*SampleMutation) ClearedEdges ¶
func (m *SampleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SampleMutation) ClearedFields ¶
func (m *SampleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SampleMutation) Client ¶
func (m SampleMutation) 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 (*SampleMutation) Code ¶
func (m *SampleMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*SampleMutation) CreateTime ¶
func (m *SampleMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*SampleMutation) Criteria ¶
func (m *SampleMutation) Criteria() (r domain.SampleCriteria, exists bool)
Criteria returns the value of the "criteria" field in the mutation.
func (*SampleMutation) EdgeCleared ¶
func (m *SampleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SampleMutation) Field ¶
func (m *SampleMutation) 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 (*SampleMutation) FieldCleared ¶
func (m *SampleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SampleMutation) Fields ¶
func (m *SampleMutation) 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 (*SampleMutation) ID ¶
func (m *SampleMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SampleMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SampleMutation) NormsCleared ¶
func (m *SampleMutation) NormsCleared() bool
NormsCleared reports if the "norms" edge to the Norm entity was cleared.
func (*SampleMutation) NormsIDs ¶
func (m *SampleMutation) NormsIDs() (ids []uuid.UUID)
NormsIDs returns the "norms" edge IDs in the mutation.
func (*SampleMutation) OldCode ¶
func (m *SampleMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Sample entity. If the Sample 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 (*SampleMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Sample entity. If the Sample 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 (*SampleMutation) OldCriteria ¶
func (m *SampleMutation) OldCriteria(ctx context.Context) (v domain.SampleCriteria, err error)
OldCriteria returns the old "criteria" field's value of the Sample entity. If the Sample 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 (*SampleMutation) 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 (*SampleMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Sample entity. If the Sample 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 (*SampleMutation) RemoveNormIDs ¶
func (m *SampleMutation) RemoveNormIDs(ids ...uuid.UUID)
RemoveNormIDs removes the "norms" edge to the Norm entity by IDs.
func (*SampleMutation) RemovedEdges ¶
func (m *SampleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SampleMutation) RemovedIDs ¶
func (m *SampleMutation) 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 (*SampleMutation) RemovedNormsIDs ¶
func (m *SampleMutation) RemovedNormsIDs() (ids []uuid.UUID)
RemovedNorms returns the removed IDs of the "norms" edge to the Norm entity.
func (*SampleMutation) ResetCode ¶
func (m *SampleMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*SampleMutation) ResetCreateTime ¶
func (m *SampleMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*SampleMutation) ResetCriteria ¶
func (m *SampleMutation) ResetCriteria()
ResetCriteria resets all changes to the "criteria" field.
func (*SampleMutation) ResetEdge ¶
func (m *SampleMutation) 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 (*SampleMutation) ResetField ¶
func (m *SampleMutation) 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 (*SampleMutation) ResetNorms ¶
func (m *SampleMutation) ResetNorms()
ResetNorms resets all changes to the "norms" edge.
func (*SampleMutation) ResetUpdateTime ¶
func (m *SampleMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*SampleMutation) SetCode ¶
func (m *SampleMutation) SetCode(s string)
SetCode sets the "code" field.
func (*SampleMutation) SetCreateTime ¶
func (m *SampleMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*SampleMutation) SetCriteria ¶
func (m *SampleMutation) SetCriteria(dc domain.SampleCriteria)
SetCriteria sets the "criteria" field.
func (*SampleMutation) SetField ¶
func (m *SampleMutation) 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 (*SampleMutation) SetID ¶
func (m *SampleMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Sample entities.
func (*SampleMutation) SetUpdateTime ¶
func (m *SampleMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (SampleMutation) Tx ¶
func (m SampleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SampleMutation) Type ¶
func (m *SampleMutation) Type() string
Type returns the node type of this mutation (Sample).
func (*SampleMutation) UpdateTime ¶
func (m *SampleMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*SampleMutation) Where ¶
func (m *SampleMutation) Where(ps ...predicate.Sample)
Where appends a list predicates to the SampleMutation builder.
type SampleQuery ¶
type SampleQuery struct {
// contains filtered or unexported fields
}
SampleQuery is the builder for querying Sample entities.
func (*SampleQuery) All ¶
func (sq *SampleQuery) All(ctx context.Context) ([]*Sample, error)
All executes the query and returns a list of Samples.
func (*SampleQuery) AllX ¶
func (sq *SampleQuery) AllX(ctx context.Context) []*Sample
AllX is like All, but panics if an error occurs.
func (*SampleQuery) Clone ¶
func (sq *SampleQuery) Clone() *SampleQuery
Clone returns a duplicate of the SampleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SampleQuery) Count ¶
func (sq *SampleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SampleQuery) CountX ¶
func (sq *SampleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SampleQuery) Exist ¶
func (sq *SampleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SampleQuery) ExistX ¶
func (sq *SampleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SampleQuery) First ¶
func (sq *SampleQuery) First(ctx context.Context) (*Sample, error)
First returns the first Sample entity from the query. Returns a *NotFoundError when no Sample was found.
func (*SampleQuery) FirstID ¶
FirstID returns the first Sample ID from the query. Returns a *NotFoundError when no Sample ID was found.
func (*SampleQuery) FirstIDX ¶
func (sq *SampleQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*SampleQuery) FirstX ¶
func (sq *SampleQuery) FirstX(ctx context.Context) *Sample
FirstX is like First, but panics if an error occurs.
func (*SampleQuery) GroupBy ¶
func (sq *SampleQuery) GroupBy(field string, fields ...string) *SampleGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Sample.Query(). GroupBy(sample.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SampleQuery) IDsX ¶
func (sq *SampleQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SampleQuery) Limit ¶
func (sq *SampleQuery) Limit(limit int) *SampleQuery
Limit adds a limit step to the query.
func (*SampleQuery) Offset ¶
func (sq *SampleQuery) Offset(offset int) *SampleQuery
Offset adds an offset step to the query.
func (*SampleQuery) Only ¶
func (sq *SampleQuery) Only(ctx context.Context) (*Sample, error)
Only returns a single Sample entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Sample entity is found. Returns a *NotFoundError when no Sample entities are found.
func (*SampleQuery) OnlyID ¶
OnlyID is like Only, but returns the only Sample ID in the query. Returns a *NotSingularError when more than one Sample ID is found. Returns a *NotFoundError when no entities are found.
func (*SampleQuery) OnlyIDX ¶
func (sq *SampleQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SampleQuery) OnlyX ¶
func (sq *SampleQuery) OnlyX(ctx context.Context) *Sample
OnlyX is like Only, but panics if an error occurs.
func (*SampleQuery) Order ¶
func (sq *SampleQuery) Order(o ...OrderFunc) *SampleQuery
Order adds an order step to the query.
func (*SampleQuery) QueryNorms ¶
func (sq *SampleQuery) QueryNorms() *NormQuery
QueryNorms chains the current query on the "norms" edge.
func (*SampleQuery) Select ¶
func (sq *SampleQuery) Select(fields ...string) *SampleSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Sample.Query(). Select(sample.FieldCreateTime). Scan(ctx, &v)
func (*SampleQuery) Unique ¶
func (sq *SampleQuery) Unique(unique bool) *SampleQuery
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 (*SampleQuery) Where ¶
func (sq *SampleQuery) Where(ps ...predicate.Sample) *SampleQuery
Where adds a new predicate for the SampleQuery builder.
func (*SampleQuery) WithNorms ¶
func (sq *SampleQuery) WithNorms(opts ...func(*NormQuery)) *SampleQuery
WithNorms tells the query-builder to eager-load the nodes that are connected to the "norms" edge. The optional arguments are used to configure the query builder of the edge.
type SampleSelect ¶
type SampleSelect struct { *SampleQuery // contains filtered or unexported fields }
SampleSelect is the builder for selecting fields of Sample entities.
func (*SampleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SampleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SampleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SampleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SampleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SampleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SampleSelect) Scan ¶
func (ss *SampleSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SampleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SampleUpdate ¶
type SampleUpdate struct {
// contains filtered or unexported fields
}
SampleUpdate is the builder for updating Sample entities.
func (*SampleUpdate) AddNormIDs ¶
func (su *SampleUpdate) AddNormIDs(ids ...uuid.UUID) *SampleUpdate
AddNormIDs adds the "norms" edge to the Norm entity by IDs.
func (*SampleUpdate) AddNorms ¶
func (su *SampleUpdate) AddNorms(n ...*Norm) *SampleUpdate
AddNorms adds the "norms" edges to the Norm entity.
func (*SampleUpdate) ClearNorms ¶
func (su *SampleUpdate) ClearNorms() *SampleUpdate
ClearNorms clears all "norms" edges to the Norm entity.
func (*SampleUpdate) Exec ¶
func (su *SampleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SampleUpdate) ExecX ¶
func (su *SampleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SampleUpdate) Mutation ¶
func (su *SampleUpdate) Mutation() *SampleMutation
Mutation returns the SampleMutation object of the builder.
func (*SampleUpdate) RemoveNormIDs ¶
func (su *SampleUpdate) RemoveNormIDs(ids ...uuid.UUID) *SampleUpdate
RemoveNormIDs removes the "norms" edge to Norm entities by IDs.
func (*SampleUpdate) RemoveNorms ¶
func (su *SampleUpdate) RemoveNorms(n ...*Norm) *SampleUpdate
RemoveNorms removes "norms" edges to Norm entities.
func (*SampleUpdate) Save ¶
func (su *SampleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SampleUpdate) SaveX ¶
func (su *SampleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SampleUpdate) SetCriteria ¶
func (su *SampleUpdate) SetCriteria(dc domain.SampleCriteria) *SampleUpdate
SetCriteria sets the "criteria" field.
func (*SampleUpdate) SetUpdateTime ¶
func (su *SampleUpdate) SetUpdateTime(t time.Time) *SampleUpdate
SetUpdateTime sets the "update_time" field.
func (*SampleUpdate) Where ¶
func (su *SampleUpdate) Where(ps ...predicate.Sample) *SampleUpdate
Where appends a list predicates to the SampleUpdate builder.
type SampleUpdateOne ¶
type SampleUpdateOne struct {
// contains filtered or unexported fields
}
SampleUpdateOne is the builder for updating a single Sample entity.
func (*SampleUpdateOne) AddNormIDs ¶
func (suo *SampleUpdateOne) AddNormIDs(ids ...uuid.UUID) *SampleUpdateOne
AddNormIDs adds the "norms" edge to the Norm entity by IDs.
func (*SampleUpdateOne) AddNorms ¶
func (suo *SampleUpdateOne) AddNorms(n ...*Norm) *SampleUpdateOne
AddNorms adds the "norms" edges to the Norm entity.
func (*SampleUpdateOne) ClearNorms ¶
func (suo *SampleUpdateOne) ClearNorms() *SampleUpdateOne
ClearNorms clears all "norms" edges to the Norm entity.
func (*SampleUpdateOne) Exec ¶
func (suo *SampleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SampleUpdateOne) ExecX ¶
func (suo *SampleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SampleUpdateOne) Mutation ¶
func (suo *SampleUpdateOne) Mutation() *SampleMutation
Mutation returns the SampleMutation object of the builder.
func (*SampleUpdateOne) RemoveNormIDs ¶
func (suo *SampleUpdateOne) RemoveNormIDs(ids ...uuid.UUID) *SampleUpdateOne
RemoveNormIDs removes the "norms" edge to Norm entities by IDs.
func (*SampleUpdateOne) RemoveNorms ¶
func (suo *SampleUpdateOne) RemoveNorms(n ...*Norm) *SampleUpdateOne
RemoveNorms removes "norms" edges to Norm entities.
func (*SampleUpdateOne) Save ¶
func (suo *SampleUpdateOne) Save(ctx context.Context) (*Sample, error)
Save executes the query and returns the updated Sample entity.
func (*SampleUpdateOne) SaveX ¶
func (suo *SampleUpdateOne) SaveX(ctx context.Context) *Sample
SaveX is like Save, but panics if an error occurs.
func (*SampleUpdateOne) Select ¶
func (suo *SampleUpdateOne) Select(field string, fields ...string) *SampleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SampleUpdateOne) SetCriteria ¶
func (suo *SampleUpdateOne) SetCriteria(dc domain.SampleCriteria) *SampleUpdateOne
SetCriteria sets the "criteria" field.
func (*SampleUpdateOne) SetUpdateTime ¶
func (suo *SampleUpdateOne) SetUpdateTime(t time.Time) *SampleUpdateOne
SetUpdateTime sets the "update_time" field.
type Scale ¶
type Scale struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Global holds the value of the "global" field. Global bool `json:"global,omitempty"` // Type holds the value of the "type" field. Type scale.Type `json:"type,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ScaleQuery when eager-loading is set. Edges ScaleEdges `json:"edges"` // contains filtered or unexported fields }
Scale is the model entity for the Scale schema.
func (*Scale) QueryInterpretations ¶
func (s *Scale) QueryInterpretations() *InterpretationQuery
QueryInterpretations queries the "interpretations" edge of the Scale entity.
func (*Scale) QueryItems ¶
QueryItems queries the "items" edge of the Scale entity.
func (*Scale) QueryNorms ¶
QueryNorms queries the "norms" edge of the Scale entity.
func (*Scale) QueryResults ¶
func (s *Scale) QueryResults() *ResultQuery
QueryResults queries the "results" edge of the Scale entity.
func (*Scale) QueryScaleItem ¶
func (s *Scale) QueryScaleItem() *ScaleItemQuery
QueryScaleItem queries the "scale_item" edge of the Scale entity.
func (*Scale) QueryTranslations ¶
func (s *Scale) QueryTranslations() *ScaleTranslationQuery
QueryTranslations queries the "translations" edge of the Scale entity.
func (*Scale) Unwrap ¶
Unwrap unwraps the Scale 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 (*Scale) Update ¶
func (s *Scale) Update() *ScaleUpdateOne
Update returns a builder for updating this Scale. Note that you need to call Scale.Unwrap() before calling this method if this Scale was returned from a transaction, and the transaction was committed or rolled back.
type ScaleClient ¶
type ScaleClient struct {
// contains filtered or unexported fields
}
ScaleClient is a client for the Scale schema.
func NewScaleClient ¶
func NewScaleClient(c config) *ScaleClient
NewScaleClient returns a client for the Scale from the given config.
func (*ScaleClient) Create ¶
func (c *ScaleClient) Create() *ScaleCreate
Create returns a builder for creating a Scale entity.
func (*ScaleClient) CreateBulk ¶
func (c *ScaleClient) CreateBulk(builders ...*ScaleCreate) *ScaleCreateBulk
CreateBulk returns a builder for creating a bulk of Scale entities.
func (*ScaleClient) Delete ¶
func (c *ScaleClient) Delete() *ScaleDelete
Delete returns a delete builder for Scale.
func (*ScaleClient) DeleteOne ¶
func (c *ScaleClient) DeleteOne(s *Scale) *ScaleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ScaleClient) DeleteOneID ¶
func (c *ScaleClient) DeleteOneID(id uuid.UUID) *ScaleDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*ScaleClient) Query ¶
func (c *ScaleClient) Query() *ScaleQuery
Query returns a query builder for Scale.
func (*ScaleClient) QueryInterpretations ¶
func (c *ScaleClient) QueryInterpretations(s *Scale) *InterpretationQuery
QueryInterpretations queries the interpretations edge of a Scale.
func (*ScaleClient) QueryItems ¶
func (c *ScaleClient) QueryItems(s *Scale) *ItemQuery
QueryItems queries the items edge of a Scale.
func (*ScaleClient) QueryNorms ¶
func (c *ScaleClient) QueryNorms(s *Scale) *NormQuery
QueryNorms queries the norms edge of a Scale.
func (*ScaleClient) QueryResults ¶
func (c *ScaleClient) QueryResults(s *Scale) *ResultQuery
QueryResults queries the results edge of a Scale.
func (*ScaleClient) QueryScaleItem ¶
func (c *ScaleClient) QueryScaleItem(s *Scale) *ScaleItemQuery
QueryScaleItem queries the scale_item edge of a Scale.
func (*ScaleClient) QueryTest ¶
func (c *ScaleClient) QueryTest(s *Scale) *TestQuery
QueryTest queries the test edge of a Scale.
func (*ScaleClient) QueryTranslations ¶
func (c *ScaleClient) QueryTranslations(s *Scale) *ScaleTranslationQuery
QueryTranslations queries the translations edge of a Scale.
func (*ScaleClient) Update ¶
func (c *ScaleClient) Update() *ScaleUpdate
Update returns an update builder for Scale.
func (*ScaleClient) UpdateOne ¶
func (c *ScaleClient) UpdateOne(s *Scale) *ScaleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ScaleClient) UpdateOneID ¶
func (c *ScaleClient) UpdateOneID(id uuid.UUID) *ScaleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ScaleClient) Use ¶
func (c *ScaleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `scale.Hooks(f(g(h())))`.
type ScaleCreate ¶
type ScaleCreate struct {
// contains filtered or unexported fields
}
ScaleCreate is the builder for creating a Scale entity.
func (*ScaleCreate) AddInterpretationIDs ¶
func (sc *ScaleCreate) AddInterpretationIDs(ids ...uuid.UUID) *ScaleCreate
AddInterpretationIDs adds the "interpretations" edge to the Interpretation entity by IDs.
func (*ScaleCreate) AddInterpretations ¶
func (sc *ScaleCreate) AddInterpretations(i ...*Interpretation) *ScaleCreate
AddInterpretations adds the "interpretations" edges to the Interpretation entity.
func (*ScaleCreate) AddItemIDs ¶
func (sc *ScaleCreate) AddItemIDs(ids ...uuid.UUID) *ScaleCreate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*ScaleCreate) AddItems ¶
func (sc *ScaleCreate) AddItems(i ...*Item) *ScaleCreate
AddItems adds the "items" edges to the Item entity.
func (*ScaleCreate) AddNormIDs ¶
func (sc *ScaleCreate) AddNormIDs(ids ...uuid.UUID) *ScaleCreate
AddNormIDs adds the "norms" edge to the Norm entity by IDs.
func (*ScaleCreate) AddNorms ¶
func (sc *ScaleCreate) AddNorms(n ...*Norm) *ScaleCreate
AddNorms adds the "norms" edges to the Norm entity.
func (*ScaleCreate) AddResultIDs ¶
func (sc *ScaleCreate) AddResultIDs(ids ...uuid.UUID) *ScaleCreate
AddResultIDs adds the "results" edge to the Result entity by IDs.
func (*ScaleCreate) AddResults ¶
func (sc *ScaleCreate) AddResults(r ...*Result) *ScaleCreate
AddResults adds the "results" edges to the Result entity.
func (*ScaleCreate) AddTest ¶
func (sc *ScaleCreate) AddTest(t ...*Test) *ScaleCreate
AddTest adds the "test" edges to the Test entity.
func (*ScaleCreate) AddTestIDs ¶
func (sc *ScaleCreate) AddTestIDs(ids ...uuid.UUID) *ScaleCreate
AddTestIDs adds the "test" edge to the Test entity by IDs.
func (*ScaleCreate) AddTranslationIDs ¶
func (sc *ScaleCreate) AddTranslationIDs(ids ...uuid.UUID) *ScaleCreate
AddTranslationIDs adds the "translations" edge to the ScaleTranslation entity by IDs.
func (*ScaleCreate) AddTranslations ¶
func (sc *ScaleCreate) AddTranslations(s ...*ScaleTranslation) *ScaleCreate
AddTranslations adds the "translations" edges to the ScaleTranslation entity.
func (*ScaleCreate) Exec ¶
func (sc *ScaleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScaleCreate) ExecX ¶
func (sc *ScaleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleCreate) Mutation ¶
func (sc *ScaleCreate) Mutation() *ScaleMutation
Mutation returns the ScaleMutation object of the builder.
func (*ScaleCreate) Save ¶
func (sc *ScaleCreate) Save(ctx context.Context) (*Scale, error)
Save creates the Scale in the database.
func (*ScaleCreate) SaveX ¶
func (sc *ScaleCreate) SaveX(ctx context.Context) *Scale
SaveX calls Save and panics if Save returns an error.
func (*ScaleCreate) SetCode ¶
func (sc *ScaleCreate) SetCode(s string) *ScaleCreate
SetCode sets the "code" field.
func (*ScaleCreate) SetCreateTime ¶
func (sc *ScaleCreate) SetCreateTime(t time.Time) *ScaleCreate
SetCreateTime sets the "create_time" field.
func (*ScaleCreate) SetGlobal ¶
func (sc *ScaleCreate) SetGlobal(b bool) *ScaleCreate
SetGlobal sets the "global" field.
func (*ScaleCreate) SetID ¶
func (sc *ScaleCreate) SetID(u uuid.UUID) *ScaleCreate
SetID sets the "id" field.
func (*ScaleCreate) SetNillableCreateTime ¶
func (sc *ScaleCreate) SetNillableCreateTime(t *time.Time) *ScaleCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScaleCreate) SetNillableGlobal ¶
func (sc *ScaleCreate) SetNillableGlobal(b *bool) *ScaleCreate
SetNillableGlobal sets the "global" field if the given value is not nil.
func (*ScaleCreate) SetNillableID ¶
func (sc *ScaleCreate) SetNillableID(u *uuid.UUID) *ScaleCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ScaleCreate) SetNillableType ¶
func (sc *ScaleCreate) SetNillableType(s *scale.Type) *ScaleCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*ScaleCreate) SetNillableUpdateTime ¶
func (sc *ScaleCreate) SetNillableUpdateTime(t *time.Time) *ScaleCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScaleCreate) SetType ¶
func (sc *ScaleCreate) SetType(s scale.Type) *ScaleCreate
SetType sets the "type" field.
func (*ScaleCreate) SetUpdateTime ¶
func (sc *ScaleCreate) SetUpdateTime(t time.Time) *ScaleCreate
SetUpdateTime sets the "update_time" field.
type ScaleCreateBulk ¶
type ScaleCreateBulk struct {
// contains filtered or unexported fields
}
ScaleCreateBulk is the builder for creating many Scale entities in bulk.
func (*ScaleCreateBulk) Exec ¶
func (scb *ScaleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ScaleCreateBulk) ExecX ¶
func (scb *ScaleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ScaleDelete ¶
type ScaleDelete struct {
// contains filtered or unexported fields
}
ScaleDelete is the builder for deleting a Scale entity.
func (*ScaleDelete) Exec ¶
func (sd *ScaleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ScaleDelete) ExecX ¶
func (sd *ScaleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ScaleDelete) Where ¶
func (sd *ScaleDelete) Where(ps ...predicate.Scale) *ScaleDelete
Where appends a list predicates to the ScaleDelete builder.
type ScaleDeleteOne ¶
type ScaleDeleteOne struct {
// contains filtered or unexported fields
}
ScaleDeleteOne is the builder for deleting a single Scale entity.
func (*ScaleDeleteOne) Exec ¶
func (sdo *ScaleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ScaleDeleteOne) ExecX ¶
func (sdo *ScaleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ScaleEdges ¶
type ScaleEdges struct { // Items holds the value of the items edge. Items []*Item `json:"items,omitempty"` // Interpretations holds the value of the interpretations edge. Interpretations []*Interpretation `json:"interpretations,omitempty"` // Translations holds the value of the translations edge. Translations []*ScaleTranslation `json:"translations,omitempty"` // Norms holds the value of the norms edge. Norms []*Norm `json:"norms,omitempty"` // Results holds the value of the results edge. Results []*Result `json:"results,omitempty"` // Test holds the value of the test edge. Test []*Test `json:"test,omitempty"` // ScaleItem holds the value of the scale_item edge. ScaleItem []*ScaleItem `json:"scale_item,omitempty"` // contains filtered or unexported fields }
ScaleEdges holds the relations/edges for other nodes in the graph.
func (ScaleEdges) InterpretationsOrErr ¶
func (e ScaleEdges) InterpretationsOrErr() ([]*Interpretation, error)
InterpretationsOrErr returns the Interpretations value or an error if the edge was not loaded in eager-loading.
func (ScaleEdges) ItemsOrErr ¶
func (e ScaleEdges) ItemsOrErr() ([]*Item, error)
ItemsOrErr returns the Items value or an error if the edge was not loaded in eager-loading.
func (ScaleEdges) NormsOrErr ¶
func (e ScaleEdges) NormsOrErr() ([]*Norm, error)
NormsOrErr returns the Norms value or an error if the edge was not loaded in eager-loading.
func (ScaleEdges) ResultsOrErr ¶
func (e ScaleEdges) ResultsOrErr() ([]*Result, error)
ResultsOrErr returns the Results value or an error if the edge was not loaded in eager-loading.
func (ScaleEdges) ScaleItemOrErr ¶
func (e ScaleEdges) ScaleItemOrErr() ([]*ScaleItem, error)
ScaleItemOrErr returns the ScaleItem value or an error if the edge was not loaded in eager-loading.
func (ScaleEdges) TestOrErr ¶
func (e ScaleEdges) TestOrErr() ([]*Test, error)
TestOrErr returns the Test value or an error if the edge was not loaded in eager-loading.
func (ScaleEdges) TranslationsOrErr ¶
func (e ScaleEdges) TranslationsOrErr() ([]*ScaleTranslation, error)
TranslationsOrErr returns the Translations value or an error if the edge was not loaded in eager-loading.
type ScaleGroupBy ¶
type ScaleGroupBy struct {
// contains filtered or unexported fields
}
ScaleGroupBy is the group-by builder for Scale entities.
func (*ScaleGroupBy) Aggregate ¶
func (sgb *ScaleGroupBy) Aggregate(fns ...AggregateFunc) *ScaleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ScaleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScaleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScaleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScaleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScaleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScaleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScaleGroupBy) Scan ¶
func (sgb *ScaleGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ScaleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScaleItem ¶
type ScaleItem struct { // Reverse holds the value of the "reverse" field. Reverse bool `json:"reverse,omitempty"` // ScaleID holds the value of the "scale_id" field. ScaleID uuid.UUID `json:"scale_id,omitempty"` // ItemID holds the value of the "item_id" field. ItemID uuid.UUID `json:"item_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ScaleItemQuery when eager-loading is set. Edges ScaleItemEdges `json:"edges"` // contains filtered or unexported fields }
ScaleItem is the model entity for the ScaleItem schema.
func (*ScaleItem) QueryScale ¶
func (si *ScaleItem) QueryScale() *ScaleQuery
QueryScale queries the "scale" edge of the ScaleItem entity.
func (*ScaleItem) Unwrap ¶
Unwrap unwraps the ScaleItem 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 (*ScaleItem) Update ¶
func (si *ScaleItem) Update() *ScaleItemUpdateOne
Update returns a builder for updating this ScaleItem. Note that you need to call ScaleItem.Unwrap() before calling this method if this ScaleItem was returned from a transaction, and the transaction was committed or rolled back.
type ScaleItemClient ¶
type ScaleItemClient struct {
// contains filtered or unexported fields
}
ScaleItemClient is a client for the ScaleItem schema.
func NewScaleItemClient ¶
func NewScaleItemClient(c config) *ScaleItemClient
NewScaleItemClient returns a client for the ScaleItem from the given config.
func (*ScaleItemClient) Create ¶
func (c *ScaleItemClient) Create() *ScaleItemCreate
Create returns a builder for creating a ScaleItem entity.
func (*ScaleItemClient) CreateBulk ¶
func (c *ScaleItemClient) CreateBulk(builders ...*ScaleItemCreate) *ScaleItemCreateBulk
CreateBulk returns a builder for creating a bulk of ScaleItem entities.
func (*ScaleItemClient) Delete ¶
func (c *ScaleItemClient) Delete() *ScaleItemDelete
Delete returns a delete builder for ScaleItem.
func (*ScaleItemClient) Hooks ¶
func (c *ScaleItemClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ScaleItemClient) Query ¶
func (c *ScaleItemClient) Query() *ScaleItemQuery
Query returns a query builder for ScaleItem.
func (*ScaleItemClient) QueryItem ¶
func (c *ScaleItemClient) QueryItem(si *ScaleItem) *ItemQuery
QueryItem queries the item edge of a ScaleItem.
func (*ScaleItemClient) QueryScale ¶
func (c *ScaleItemClient) QueryScale(si *ScaleItem) *ScaleQuery
QueryScale queries the scale edge of a ScaleItem.
func (*ScaleItemClient) Update ¶
func (c *ScaleItemClient) Update() *ScaleItemUpdate
Update returns an update builder for ScaleItem.
func (*ScaleItemClient) UpdateOne ¶
func (c *ScaleItemClient) UpdateOne(si *ScaleItem) *ScaleItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ScaleItemClient) Use ¶
func (c *ScaleItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `scaleitem.Hooks(f(g(h())))`.
type ScaleItemCreate ¶
type ScaleItemCreate struct {
// contains filtered or unexported fields
}
ScaleItemCreate is the builder for creating a ScaleItem entity.
func (*ScaleItemCreate) Exec ¶
func (sic *ScaleItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScaleItemCreate) ExecX ¶
func (sic *ScaleItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleItemCreate) Mutation ¶
func (sic *ScaleItemCreate) Mutation() *ScaleItemMutation
Mutation returns the ScaleItemMutation object of the builder.
func (*ScaleItemCreate) Save ¶
func (sic *ScaleItemCreate) Save(ctx context.Context) (*ScaleItem, error)
Save creates the ScaleItem in the database.
func (*ScaleItemCreate) SaveX ¶
func (sic *ScaleItemCreate) SaveX(ctx context.Context) *ScaleItem
SaveX calls Save and panics if Save returns an error.
func (*ScaleItemCreate) SetItem ¶
func (sic *ScaleItemCreate) SetItem(i *Item) *ScaleItemCreate
SetItem sets the "item" edge to the Item entity.
func (*ScaleItemCreate) SetItemID ¶
func (sic *ScaleItemCreate) SetItemID(u uuid.UUID) *ScaleItemCreate
SetItemID sets the "item_id" field.
func (*ScaleItemCreate) SetNillableReverse ¶
func (sic *ScaleItemCreate) SetNillableReverse(b *bool) *ScaleItemCreate
SetNillableReverse sets the "reverse" field if the given value is not nil.
func (*ScaleItemCreate) SetReverse ¶
func (sic *ScaleItemCreate) SetReverse(b bool) *ScaleItemCreate
SetReverse sets the "reverse" field.
func (*ScaleItemCreate) SetScale ¶
func (sic *ScaleItemCreate) SetScale(s *Scale) *ScaleItemCreate
SetScale sets the "scale" edge to the Scale entity.
func (*ScaleItemCreate) SetScaleID ¶
func (sic *ScaleItemCreate) SetScaleID(u uuid.UUID) *ScaleItemCreate
SetScaleID sets the "scale_id" field.
type ScaleItemCreateBulk ¶
type ScaleItemCreateBulk struct {
// contains filtered or unexported fields
}
ScaleItemCreateBulk is the builder for creating many ScaleItem entities in bulk.
func (*ScaleItemCreateBulk) Exec ¶
func (sicb *ScaleItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ScaleItemCreateBulk) ExecX ¶
func (sicb *ScaleItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ScaleItemDelete ¶
type ScaleItemDelete struct {
// contains filtered or unexported fields
}
ScaleItemDelete is the builder for deleting a ScaleItem entity.
func (*ScaleItemDelete) Exec ¶
func (sid *ScaleItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ScaleItemDelete) ExecX ¶
func (sid *ScaleItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ScaleItemDelete) Where ¶
func (sid *ScaleItemDelete) Where(ps ...predicate.ScaleItem) *ScaleItemDelete
Where appends a list predicates to the ScaleItemDelete builder.
type ScaleItemDeleteOne ¶
type ScaleItemDeleteOne struct {
// contains filtered or unexported fields
}
ScaleItemDeleteOne is the builder for deleting a single ScaleItem entity.
func (*ScaleItemDeleteOne) Exec ¶
func (sido *ScaleItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ScaleItemDeleteOne) ExecX ¶
func (sido *ScaleItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ScaleItemEdges ¶
type ScaleItemEdges struct { // Item holds the value of the item edge. Item *Item `json:"item,omitempty"` // Scale holds the value of the scale edge. Scale *Scale `json:"scale,omitempty"` // contains filtered or unexported fields }
ScaleItemEdges holds the relations/edges for other nodes in the graph.
func (ScaleItemEdges) ItemOrErr ¶
func (e ScaleItemEdges) ItemOrErr() (*Item, error)
ItemOrErr returns the Item value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ScaleItemEdges) ScaleOrErr ¶
func (e ScaleItemEdges) ScaleOrErr() (*Scale, error)
ScaleOrErr returns the Scale value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ScaleItemGroupBy ¶
type ScaleItemGroupBy struct {
// contains filtered or unexported fields
}
ScaleItemGroupBy is the group-by builder for ScaleItem entities.
func (*ScaleItemGroupBy) Aggregate ¶
func (sigb *ScaleItemGroupBy) Aggregate(fns ...AggregateFunc) *ScaleItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ScaleItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScaleItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScaleItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScaleItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScaleItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScaleItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScaleItemGroupBy) Scan ¶
func (sigb *ScaleItemGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ScaleItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScaleItemMutation ¶
type ScaleItemMutation struct {
// contains filtered or unexported fields
}
ScaleItemMutation represents an operation that mutates the ScaleItem nodes in the graph.
func (*ScaleItemMutation) AddField ¶
func (m *ScaleItemMutation) 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 (*ScaleItemMutation) AddedEdges ¶
func (m *ScaleItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ScaleItemMutation) AddedField ¶
func (m *ScaleItemMutation) 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 (*ScaleItemMutation) AddedFields ¶
func (m *ScaleItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ScaleItemMutation) AddedIDs ¶
func (m *ScaleItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ScaleItemMutation) ClearEdge ¶
func (m *ScaleItemMutation) 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 (*ScaleItemMutation) ClearField ¶
func (m *ScaleItemMutation) 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 (*ScaleItemMutation) ClearItem ¶
func (m *ScaleItemMutation) ClearItem()
ClearItem clears the "item" edge to the Item entity.
func (*ScaleItemMutation) ClearScale ¶
func (m *ScaleItemMutation) ClearScale()
ClearScale clears the "scale" edge to the Scale entity.
func (*ScaleItemMutation) ClearedEdges ¶
func (m *ScaleItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ScaleItemMutation) ClearedFields ¶
func (m *ScaleItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ScaleItemMutation) Client ¶
func (m ScaleItemMutation) 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 (*ScaleItemMutation) EdgeCleared ¶
func (m *ScaleItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ScaleItemMutation) Field ¶
func (m *ScaleItemMutation) 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 (*ScaleItemMutation) FieldCleared ¶
func (m *ScaleItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ScaleItemMutation) Fields ¶
func (m *ScaleItemMutation) 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 (*ScaleItemMutation) ItemCleared ¶
func (m *ScaleItemMutation) ItemCleared() bool
ItemCleared reports if the "item" edge to the Item entity was cleared.
func (*ScaleItemMutation) ItemID ¶
func (m *ScaleItemMutation) ItemID() (r uuid.UUID, exists bool)
ItemID returns the value of the "item_id" field in the mutation.
func (*ScaleItemMutation) ItemIDs ¶
func (m *ScaleItemMutation) ItemIDs() (ids []uuid.UUID)
ItemIDs returns the "item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ItemID instead. It exists only for internal usage by the builders.
func (*ScaleItemMutation) 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 (*ScaleItemMutation) RemovedEdges ¶
func (m *ScaleItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ScaleItemMutation) RemovedIDs ¶
func (m *ScaleItemMutation) 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 (*ScaleItemMutation) ResetEdge ¶
func (m *ScaleItemMutation) 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 (*ScaleItemMutation) ResetField ¶
func (m *ScaleItemMutation) 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 (*ScaleItemMutation) ResetItem ¶
func (m *ScaleItemMutation) ResetItem()
ResetItem resets all changes to the "item" edge.
func (*ScaleItemMutation) ResetItemID ¶
func (m *ScaleItemMutation) ResetItemID()
ResetItemID resets all changes to the "item_id" field.
func (*ScaleItemMutation) ResetReverse ¶
func (m *ScaleItemMutation) ResetReverse()
ResetReverse resets all changes to the "reverse" field.
func (*ScaleItemMutation) ResetScale ¶
func (m *ScaleItemMutation) ResetScale()
ResetScale resets all changes to the "scale" edge.
func (*ScaleItemMutation) ResetScaleID ¶
func (m *ScaleItemMutation) ResetScaleID()
ResetScaleID resets all changes to the "scale_id" field.
func (*ScaleItemMutation) Reverse ¶
func (m *ScaleItemMutation) Reverse() (r bool, exists bool)
Reverse returns the value of the "reverse" field in the mutation.
func (*ScaleItemMutation) ScaleCleared ¶
func (m *ScaleItemMutation) ScaleCleared() bool
ScaleCleared reports if the "scale" edge to the Scale entity was cleared.
func (*ScaleItemMutation) ScaleID ¶
func (m *ScaleItemMutation) ScaleID() (r uuid.UUID, exists bool)
ScaleID returns the value of the "scale_id" field in the mutation.
func (*ScaleItemMutation) ScaleIDs ¶
func (m *ScaleItemMutation) ScaleIDs() (ids []uuid.UUID)
ScaleIDs returns the "scale" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ScaleID instead. It exists only for internal usage by the builders.
func (*ScaleItemMutation) SetField ¶
func (m *ScaleItemMutation) 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 (*ScaleItemMutation) SetItemID ¶
func (m *ScaleItemMutation) SetItemID(u uuid.UUID)
SetItemID sets the "item_id" field.
func (*ScaleItemMutation) SetReverse ¶
func (m *ScaleItemMutation) SetReverse(b bool)
SetReverse sets the "reverse" field.
func (*ScaleItemMutation) SetScaleID ¶
func (m *ScaleItemMutation) SetScaleID(u uuid.UUID)
SetScaleID sets the "scale_id" field.
func (ScaleItemMutation) Tx ¶
func (m ScaleItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ScaleItemMutation) Type ¶
func (m *ScaleItemMutation) Type() string
Type returns the node type of this mutation (ScaleItem).
func (*ScaleItemMutation) Where ¶
func (m *ScaleItemMutation) Where(ps ...predicate.ScaleItem)
Where appends a list predicates to the ScaleItemMutation builder.
type ScaleItemQuery ¶
type ScaleItemQuery struct {
// contains filtered or unexported fields
}
ScaleItemQuery is the builder for querying ScaleItem entities.
func (*ScaleItemQuery) All ¶
func (siq *ScaleItemQuery) All(ctx context.Context) ([]*ScaleItem, error)
All executes the query and returns a list of ScaleItems.
func (*ScaleItemQuery) AllX ¶
func (siq *ScaleItemQuery) AllX(ctx context.Context) []*ScaleItem
AllX is like All, but panics if an error occurs.
func (*ScaleItemQuery) Clone ¶
func (siq *ScaleItemQuery) Clone() *ScaleItemQuery
Clone returns a duplicate of the ScaleItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ScaleItemQuery) Count ¶
func (siq *ScaleItemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ScaleItemQuery) CountX ¶
func (siq *ScaleItemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ScaleItemQuery) Exist ¶
func (siq *ScaleItemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ScaleItemQuery) ExistX ¶
func (siq *ScaleItemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ScaleItemQuery) First ¶
func (siq *ScaleItemQuery) First(ctx context.Context) (*ScaleItem, error)
First returns the first ScaleItem entity from the query. Returns a *NotFoundError when no ScaleItem was found.
func (*ScaleItemQuery) FirstX ¶
func (siq *ScaleItemQuery) FirstX(ctx context.Context) *ScaleItem
FirstX is like First, but panics if an error occurs.
func (*ScaleItemQuery) GroupBy ¶
func (siq *ScaleItemQuery) GroupBy(field string, fields ...string) *ScaleItemGroupBy
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 { Reverse bool `json:"reverse,omitempty"` Count int `json:"count,omitempty"` } client.ScaleItem.Query(). GroupBy(scaleitem.FieldReverse). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ScaleItemQuery) Limit ¶
func (siq *ScaleItemQuery) Limit(limit int) *ScaleItemQuery
Limit adds a limit step to the query.
func (*ScaleItemQuery) Offset ¶
func (siq *ScaleItemQuery) Offset(offset int) *ScaleItemQuery
Offset adds an offset step to the query.
func (*ScaleItemQuery) Only ¶
func (siq *ScaleItemQuery) Only(ctx context.Context) (*ScaleItem, error)
Only returns a single ScaleItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ScaleItem entity is found. Returns a *NotFoundError when no ScaleItem entities are found.
func (*ScaleItemQuery) OnlyX ¶
func (siq *ScaleItemQuery) OnlyX(ctx context.Context) *ScaleItem
OnlyX is like Only, but panics if an error occurs.
func (*ScaleItemQuery) Order ¶
func (siq *ScaleItemQuery) Order(o ...OrderFunc) *ScaleItemQuery
Order adds an order step to the query.
func (*ScaleItemQuery) QueryItem ¶
func (siq *ScaleItemQuery) QueryItem() *ItemQuery
QueryItem chains the current query on the "item" edge.
func (*ScaleItemQuery) QueryScale ¶
func (siq *ScaleItemQuery) QueryScale() *ScaleQuery
QueryScale chains the current query on the "scale" edge.
func (*ScaleItemQuery) Select ¶
func (siq *ScaleItemQuery) Select(fields ...string) *ScaleItemSelect
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 { Reverse bool `json:"reverse,omitempty"` } client.ScaleItem.Query(). Select(scaleitem.FieldReverse). Scan(ctx, &v)
func (*ScaleItemQuery) Unique ¶
func (siq *ScaleItemQuery) Unique(unique bool) *ScaleItemQuery
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 (*ScaleItemQuery) Where ¶
func (siq *ScaleItemQuery) Where(ps ...predicate.ScaleItem) *ScaleItemQuery
Where adds a new predicate for the ScaleItemQuery builder.
func (*ScaleItemQuery) WithItem ¶
func (siq *ScaleItemQuery) WithItem(opts ...func(*ItemQuery)) *ScaleItemQuery
WithItem tells the query-builder to eager-load the nodes that are connected to the "item" edge. The optional arguments are used to configure the query builder of the edge.
func (*ScaleItemQuery) WithScale ¶
func (siq *ScaleItemQuery) WithScale(opts ...func(*ScaleQuery)) *ScaleItemQuery
WithScale tells the query-builder to eager-load the nodes that are connected to the "scale" edge. The optional arguments are used to configure the query builder of the edge.
type ScaleItemSelect ¶
type ScaleItemSelect struct { *ScaleItemQuery // contains filtered or unexported fields }
ScaleItemSelect is the builder for selecting fields of ScaleItem entities.
func (*ScaleItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScaleItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScaleItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScaleItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScaleItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScaleItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScaleItemSelect) Scan ¶
func (sis *ScaleItemSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ScaleItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScaleItemUpdate ¶
type ScaleItemUpdate struct {
// contains filtered or unexported fields
}
ScaleItemUpdate is the builder for updating ScaleItem entities.
func (*ScaleItemUpdate) ClearItem ¶
func (siu *ScaleItemUpdate) ClearItem() *ScaleItemUpdate
ClearItem clears the "item" edge to the Item entity.
func (*ScaleItemUpdate) ClearScale ¶
func (siu *ScaleItemUpdate) ClearScale() *ScaleItemUpdate
ClearScale clears the "scale" edge to the Scale entity.
func (*ScaleItemUpdate) Exec ¶
func (siu *ScaleItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScaleItemUpdate) ExecX ¶
func (siu *ScaleItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleItemUpdate) Mutation ¶
func (siu *ScaleItemUpdate) Mutation() *ScaleItemMutation
Mutation returns the ScaleItemMutation object of the builder.
func (*ScaleItemUpdate) Save ¶
func (siu *ScaleItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ScaleItemUpdate) SaveX ¶
func (siu *ScaleItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ScaleItemUpdate) SetItem ¶
func (siu *ScaleItemUpdate) SetItem(i *Item) *ScaleItemUpdate
SetItem sets the "item" edge to the Item entity.
func (*ScaleItemUpdate) SetItemID ¶
func (siu *ScaleItemUpdate) SetItemID(u uuid.UUID) *ScaleItemUpdate
SetItemID sets the "item_id" field.
func (*ScaleItemUpdate) SetNillableReverse ¶
func (siu *ScaleItemUpdate) SetNillableReverse(b *bool) *ScaleItemUpdate
SetNillableReverse sets the "reverse" field if the given value is not nil.
func (*ScaleItemUpdate) SetReverse ¶
func (siu *ScaleItemUpdate) SetReverse(b bool) *ScaleItemUpdate
SetReverse sets the "reverse" field.
func (*ScaleItemUpdate) SetScale ¶
func (siu *ScaleItemUpdate) SetScale(s *Scale) *ScaleItemUpdate
SetScale sets the "scale" edge to the Scale entity.
func (*ScaleItemUpdate) SetScaleID ¶
func (siu *ScaleItemUpdate) SetScaleID(u uuid.UUID) *ScaleItemUpdate
SetScaleID sets the "scale_id" field.
func (*ScaleItemUpdate) Where ¶
func (siu *ScaleItemUpdate) Where(ps ...predicate.ScaleItem) *ScaleItemUpdate
Where appends a list predicates to the ScaleItemUpdate builder.
type ScaleItemUpdateOne ¶
type ScaleItemUpdateOne struct {
// contains filtered or unexported fields
}
ScaleItemUpdateOne is the builder for updating a single ScaleItem entity.
func (*ScaleItemUpdateOne) ClearItem ¶
func (siuo *ScaleItemUpdateOne) ClearItem() *ScaleItemUpdateOne
ClearItem clears the "item" edge to the Item entity.
func (*ScaleItemUpdateOne) ClearScale ¶
func (siuo *ScaleItemUpdateOne) ClearScale() *ScaleItemUpdateOne
ClearScale clears the "scale" edge to the Scale entity.
func (*ScaleItemUpdateOne) Exec ¶
func (siuo *ScaleItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ScaleItemUpdateOne) ExecX ¶
func (siuo *ScaleItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleItemUpdateOne) Mutation ¶
func (siuo *ScaleItemUpdateOne) Mutation() *ScaleItemMutation
Mutation returns the ScaleItemMutation object of the builder.
func (*ScaleItemUpdateOne) Save ¶
func (siuo *ScaleItemUpdateOne) Save(ctx context.Context) (*ScaleItem, error)
Save executes the query and returns the updated ScaleItem entity.
func (*ScaleItemUpdateOne) SaveX ¶
func (siuo *ScaleItemUpdateOne) SaveX(ctx context.Context) *ScaleItem
SaveX is like Save, but panics if an error occurs.
func (*ScaleItemUpdateOne) Select ¶
func (siuo *ScaleItemUpdateOne) Select(field string, fields ...string) *ScaleItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ScaleItemUpdateOne) SetItem ¶
func (siuo *ScaleItemUpdateOne) SetItem(i *Item) *ScaleItemUpdateOne
SetItem sets the "item" edge to the Item entity.
func (*ScaleItemUpdateOne) SetItemID ¶
func (siuo *ScaleItemUpdateOne) SetItemID(u uuid.UUID) *ScaleItemUpdateOne
SetItemID sets the "item_id" field.
func (*ScaleItemUpdateOne) SetNillableReverse ¶
func (siuo *ScaleItemUpdateOne) SetNillableReverse(b *bool) *ScaleItemUpdateOne
SetNillableReverse sets the "reverse" field if the given value is not nil.
func (*ScaleItemUpdateOne) SetReverse ¶
func (siuo *ScaleItemUpdateOne) SetReverse(b bool) *ScaleItemUpdateOne
SetReverse sets the "reverse" field.
func (*ScaleItemUpdateOne) SetScale ¶
func (siuo *ScaleItemUpdateOne) SetScale(s *Scale) *ScaleItemUpdateOne
SetScale sets the "scale" edge to the Scale entity.
func (*ScaleItemUpdateOne) SetScaleID ¶
func (siuo *ScaleItemUpdateOne) SetScaleID(u uuid.UUID) *ScaleItemUpdateOne
SetScaleID sets the "scale_id" field.
type ScaleMutation ¶
type ScaleMutation struct {
// contains filtered or unexported fields
}
ScaleMutation represents an operation that mutates the Scale nodes in the graph.
func (*ScaleMutation) AddField ¶
func (m *ScaleMutation) 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 (*ScaleMutation) AddInterpretationIDs ¶
func (m *ScaleMutation) AddInterpretationIDs(ids ...uuid.UUID)
AddInterpretationIDs adds the "interpretations" edge to the Interpretation entity by ids.
func (*ScaleMutation) AddItemIDs ¶
func (m *ScaleMutation) AddItemIDs(ids ...uuid.UUID)
AddItemIDs adds the "items" edge to the Item entity by ids.
func (*ScaleMutation) AddNormIDs ¶
func (m *ScaleMutation) AddNormIDs(ids ...uuid.UUID)
AddNormIDs adds the "norms" edge to the Norm entity by ids.
func (*ScaleMutation) AddResultIDs ¶
func (m *ScaleMutation) AddResultIDs(ids ...uuid.UUID)
AddResultIDs adds the "results" edge to the Result entity by ids.
func (*ScaleMutation) AddTestIDs ¶
func (m *ScaleMutation) AddTestIDs(ids ...uuid.UUID)
AddTestIDs adds the "test" edge to the Test entity by ids.
func (*ScaleMutation) AddTranslationIDs ¶
func (m *ScaleMutation) AddTranslationIDs(ids ...uuid.UUID)
AddTranslationIDs adds the "translations" edge to the ScaleTranslation entity by ids.
func (*ScaleMutation) AddedEdges ¶
func (m *ScaleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ScaleMutation) AddedField ¶
func (m *ScaleMutation) 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 (*ScaleMutation) AddedFields ¶
func (m *ScaleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ScaleMutation) AddedIDs ¶
func (m *ScaleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ScaleMutation) ClearEdge ¶
func (m *ScaleMutation) 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 (*ScaleMutation) ClearField ¶
func (m *ScaleMutation) 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 (*ScaleMutation) ClearInterpretations ¶
func (m *ScaleMutation) ClearInterpretations()
ClearInterpretations clears the "interpretations" edge to the Interpretation entity.
func (*ScaleMutation) ClearItems ¶
func (m *ScaleMutation) ClearItems()
ClearItems clears the "items" edge to the Item entity.
func (*ScaleMutation) ClearNorms ¶
func (m *ScaleMutation) ClearNorms()
ClearNorms clears the "norms" edge to the Norm entity.
func (*ScaleMutation) ClearResults ¶
func (m *ScaleMutation) ClearResults()
ClearResults clears the "results" edge to the Result entity.
func (*ScaleMutation) ClearTest ¶
func (m *ScaleMutation) ClearTest()
ClearTest clears the "test" edge to the Test entity.
func (*ScaleMutation) ClearTranslations ¶
func (m *ScaleMutation) ClearTranslations()
ClearTranslations clears the "translations" edge to the ScaleTranslation entity.
func (*ScaleMutation) ClearedEdges ¶
func (m *ScaleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ScaleMutation) ClearedFields ¶
func (m *ScaleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ScaleMutation) Client ¶
func (m ScaleMutation) 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 (*ScaleMutation) Code ¶
func (m *ScaleMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*ScaleMutation) CreateTime ¶
func (m *ScaleMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ScaleMutation) EdgeCleared ¶
func (m *ScaleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ScaleMutation) Field ¶
func (m *ScaleMutation) 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 (*ScaleMutation) FieldCleared ¶
func (m *ScaleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ScaleMutation) Fields ¶
func (m *ScaleMutation) 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 (*ScaleMutation) GetType ¶
func (m *ScaleMutation) GetType() (r scale.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*ScaleMutation) Global ¶
func (m *ScaleMutation) Global() (r bool, exists bool)
Global returns the value of the "global" field in the mutation.
func (*ScaleMutation) ID ¶
func (m *ScaleMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ScaleMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ScaleMutation) InterpretationsCleared ¶
func (m *ScaleMutation) InterpretationsCleared() bool
InterpretationsCleared reports if the "interpretations" edge to the Interpretation entity was cleared.
func (*ScaleMutation) InterpretationsIDs ¶
func (m *ScaleMutation) InterpretationsIDs() (ids []uuid.UUID)
InterpretationsIDs returns the "interpretations" edge IDs in the mutation.
func (*ScaleMutation) ItemsCleared ¶
func (m *ScaleMutation) ItemsCleared() bool
ItemsCleared reports if the "items" edge to the Item entity was cleared.
func (*ScaleMutation) ItemsIDs ¶
func (m *ScaleMutation) ItemsIDs() (ids []uuid.UUID)
ItemsIDs returns the "items" edge IDs in the mutation.
func (*ScaleMutation) NormsCleared ¶
func (m *ScaleMutation) NormsCleared() bool
NormsCleared reports if the "norms" edge to the Norm entity was cleared.
func (*ScaleMutation) NormsIDs ¶
func (m *ScaleMutation) NormsIDs() (ids []uuid.UUID)
NormsIDs returns the "norms" edge IDs in the mutation.
func (*ScaleMutation) OldCode ¶
func (m *ScaleMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Scale entity. If the Scale 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 (*ScaleMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Scale entity. If the Scale 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 (*ScaleMutation) 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 (*ScaleMutation) OldGlobal ¶
func (m *ScaleMutation) OldGlobal(ctx context.Context) (v bool, err error)
OldGlobal returns the old "global" field's value of the Scale entity. If the Scale 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 (*ScaleMutation) OldType ¶
OldType returns the old "type" field's value of the Scale entity. If the Scale 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 (*ScaleMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Scale entity. If the Scale 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 (*ScaleMutation) RemoveInterpretationIDs ¶
func (m *ScaleMutation) RemoveInterpretationIDs(ids ...uuid.UUID)
RemoveInterpretationIDs removes the "interpretations" edge to the Interpretation entity by IDs.
func (*ScaleMutation) RemoveItemIDs ¶
func (m *ScaleMutation) RemoveItemIDs(ids ...uuid.UUID)
RemoveItemIDs removes the "items" edge to the Item entity by IDs.
func (*ScaleMutation) RemoveNormIDs ¶
func (m *ScaleMutation) RemoveNormIDs(ids ...uuid.UUID)
RemoveNormIDs removes the "norms" edge to the Norm entity by IDs.
func (*ScaleMutation) RemoveResultIDs ¶
func (m *ScaleMutation) RemoveResultIDs(ids ...uuid.UUID)
RemoveResultIDs removes the "results" edge to the Result entity by IDs.
func (*ScaleMutation) RemoveTestIDs ¶
func (m *ScaleMutation) RemoveTestIDs(ids ...uuid.UUID)
RemoveTestIDs removes the "test" edge to the Test entity by IDs.
func (*ScaleMutation) RemoveTranslationIDs ¶
func (m *ScaleMutation) RemoveTranslationIDs(ids ...uuid.UUID)
RemoveTranslationIDs removes the "translations" edge to the ScaleTranslation entity by IDs.
func (*ScaleMutation) RemovedEdges ¶
func (m *ScaleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ScaleMutation) RemovedIDs ¶
func (m *ScaleMutation) 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 (*ScaleMutation) RemovedInterpretationsIDs ¶
func (m *ScaleMutation) RemovedInterpretationsIDs() (ids []uuid.UUID)
RemovedInterpretations returns the removed IDs of the "interpretations" edge to the Interpretation entity.
func (*ScaleMutation) RemovedItemsIDs ¶
func (m *ScaleMutation) RemovedItemsIDs() (ids []uuid.UUID)
RemovedItems returns the removed IDs of the "items" edge to the Item entity.
func (*ScaleMutation) RemovedNormsIDs ¶
func (m *ScaleMutation) RemovedNormsIDs() (ids []uuid.UUID)
RemovedNorms returns the removed IDs of the "norms" edge to the Norm entity.
func (*ScaleMutation) RemovedResultsIDs ¶
func (m *ScaleMutation) RemovedResultsIDs() (ids []uuid.UUID)
RemovedResults returns the removed IDs of the "results" edge to the Result entity.
func (*ScaleMutation) RemovedTestIDs ¶
func (m *ScaleMutation) RemovedTestIDs() (ids []uuid.UUID)
RemovedTest returns the removed IDs of the "test" edge to the Test entity.
func (*ScaleMutation) RemovedTranslationsIDs ¶
func (m *ScaleMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
RemovedTranslations returns the removed IDs of the "translations" edge to the ScaleTranslation entity.
func (*ScaleMutation) ResetCode ¶
func (m *ScaleMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*ScaleMutation) ResetCreateTime ¶
func (m *ScaleMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ScaleMutation) ResetEdge ¶
func (m *ScaleMutation) 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 (*ScaleMutation) ResetField ¶
func (m *ScaleMutation) 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 (*ScaleMutation) ResetGlobal ¶
func (m *ScaleMutation) ResetGlobal()
ResetGlobal resets all changes to the "global" field.
func (*ScaleMutation) ResetInterpretations ¶
func (m *ScaleMutation) ResetInterpretations()
ResetInterpretations resets all changes to the "interpretations" edge.
func (*ScaleMutation) ResetItems ¶
func (m *ScaleMutation) ResetItems()
ResetItems resets all changes to the "items" edge.
func (*ScaleMutation) ResetNorms ¶
func (m *ScaleMutation) ResetNorms()
ResetNorms resets all changes to the "norms" edge.
func (*ScaleMutation) ResetResults ¶
func (m *ScaleMutation) ResetResults()
ResetResults resets all changes to the "results" edge.
func (*ScaleMutation) ResetTest ¶
func (m *ScaleMutation) ResetTest()
ResetTest resets all changes to the "test" edge.
func (*ScaleMutation) ResetTranslations ¶
func (m *ScaleMutation) ResetTranslations()
ResetTranslations resets all changes to the "translations" edge.
func (*ScaleMutation) ResetType ¶
func (m *ScaleMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*ScaleMutation) ResetUpdateTime ¶
func (m *ScaleMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ScaleMutation) ResultsCleared ¶
func (m *ScaleMutation) ResultsCleared() bool
ResultsCleared reports if the "results" edge to the Result entity was cleared.
func (*ScaleMutation) ResultsIDs ¶
func (m *ScaleMutation) ResultsIDs() (ids []uuid.UUID)
ResultsIDs returns the "results" edge IDs in the mutation.
func (*ScaleMutation) SetCode ¶
func (m *ScaleMutation) SetCode(s string)
SetCode sets the "code" field.
func (*ScaleMutation) SetCreateTime ¶
func (m *ScaleMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ScaleMutation) SetField ¶
func (m *ScaleMutation) 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 (*ScaleMutation) SetGlobal ¶
func (m *ScaleMutation) SetGlobal(b bool)
SetGlobal sets the "global" field.
func (*ScaleMutation) SetID ¶
func (m *ScaleMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Scale entities.
func (*ScaleMutation) SetType ¶
func (m *ScaleMutation) SetType(s scale.Type)
SetType sets the "type" field.
func (*ScaleMutation) SetUpdateTime ¶
func (m *ScaleMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ScaleMutation) TestCleared ¶
func (m *ScaleMutation) TestCleared() bool
TestCleared reports if the "test" edge to the Test entity was cleared.
func (*ScaleMutation) TestIDs ¶
func (m *ScaleMutation) TestIDs() (ids []uuid.UUID)
TestIDs returns the "test" edge IDs in the mutation.
func (*ScaleMutation) TranslationsCleared ¶
func (m *ScaleMutation) TranslationsCleared() bool
TranslationsCleared reports if the "translations" edge to the ScaleTranslation entity was cleared.
func (*ScaleMutation) TranslationsIDs ¶
func (m *ScaleMutation) TranslationsIDs() (ids []uuid.UUID)
TranslationsIDs returns the "translations" edge IDs in the mutation.
func (ScaleMutation) Tx ¶
func (m ScaleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ScaleMutation) Type ¶
func (m *ScaleMutation) Type() string
Type returns the node type of this mutation (Scale).
func (*ScaleMutation) UpdateTime ¶
func (m *ScaleMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ScaleMutation) Where ¶
func (m *ScaleMutation) Where(ps ...predicate.Scale)
Where appends a list predicates to the ScaleMutation builder.
type ScaleQuery ¶
type ScaleQuery struct {
// contains filtered or unexported fields
}
ScaleQuery is the builder for querying Scale entities.
func (*ScaleQuery) All ¶
func (sq *ScaleQuery) All(ctx context.Context) ([]*Scale, error)
All executes the query and returns a list of Scales.
func (*ScaleQuery) AllX ¶
func (sq *ScaleQuery) AllX(ctx context.Context) []*Scale
AllX is like All, but panics if an error occurs.
func (*ScaleQuery) Clone ¶
func (sq *ScaleQuery) Clone() *ScaleQuery
Clone returns a duplicate of the ScaleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ScaleQuery) Count ¶
func (sq *ScaleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ScaleQuery) CountX ¶
func (sq *ScaleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ScaleQuery) Exist ¶
func (sq *ScaleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ScaleQuery) ExistX ¶
func (sq *ScaleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ScaleQuery) First ¶
func (sq *ScaleQuery) First(ctx context.Context) (*Scale, error)
First returns the first Scale entity from the query. Returns a *NotFoundError when no Scale was found.
func (*ScaleQuery) FirstID ¶
FirstID returns the first Scale ID from the query. Returns a *NotFoundError when no Scale ID was found.
func (*ScaleQuery) FirstIDX ¶
func (sq *ScaleQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ScaleQuery) FirstX ¶
func (sq *ScaleQuery) FirstX(ctx context.Context) *Scale
FirstX is like First, but panics if an error occurs.
func (*ScaleQuery) GroupBy ¶
func (sq *ScaleQuery) GroupBy(field string, fields ...string) *ScaleGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Scale.Query(). GroupBy(scale.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ScaleQuery) IDsX ¶
func (sq *ScaleQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ScaleQuery) Limit ¶
func (sq *ScaleQuery) Limit(limit int) *ScaleQuery
Limit adds a limit step to the query.
func (*ScaleQuery) Offset ¶
func (sq *ScaleQuery) Offset(offset int) *ScaleQuery
Offset adds an offset step to the query.
func (*ScaleQuery) Only ¶
func (sq *ScaleQuery) Only(ctx context.Context) (*Scale, error)
Only returns a single Scale entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Scale entity is found. Returns a *NotFoundError when no Scale entities are found.
func (*ScaleQuery) OnlyID ¶
OnlyID is like Only, but returns the only Scale ID in the query. Returns a *NotSingularError when more than one Scale ID is found. Returns a *NotFoundError when no entities are found.
func (*ScaleQuery) OnlyIDX ¶
func (sq *ScaleQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ScaleQuery) OnlyX ¶
func (sq *ScaleQuery) OnlyX(ctx context.Context) *Scale
OnlyX is like Only, but panics if an error occurs.
func (*ScaleQuery) Order ¶
func (sq *ScaleQuery) Order(o ...OrderFunc) *ScaleQuery
Order adds an order step to the query.
func (*ScaleQuery) QueryInterpretations ¶
func (sq *ScaleQuery) QueryInterpretations() *InterpretationQuery
QueryInterpretations chains the current query on the "interpretations" edge.
func (*ScaleQuery) QueryItems ¶
func (sq *ScaleQuery) QueryItems() *ItemQuery
QueryItems chains the current query on the "items" edge.
func (*ScaleQuery) QueryNorms ¶
func (sq *ScaleQuery) QueryNorms() *NormQuery
QueryNorms chains the current query on the "norms" edge.
func (*ScaleQuery) QueryResults ¶
func (sq *ScaleQuery) QueryResults() *ResultQuery
QueryResults chains the current query on the "results" edge.
func (*ScaleQuery) QueryScaleItem ¶
func (sq *ScaleQuery) QueryScaleItem() *ScaleItemQuery
QueryScaleItem chains the current query on the "scale_item" edge.
func (*ScaleQuery) QueryTest ¶
func (sq *ScaleQuery) QueryTest() *TestQuery
QueryTest chains the current query on the "test" edge.
func (*ScaleQuery) QueryTranslations ¶
func (sq *ScaleQuery) QueryTranslations() *ScaleTranslationQuery
QueryTranslations chains the current query on the "translations" edge.
func (*ScaleQuery) Select ¶
func (sq *ScaleQuery) Select(fields ...string) *ScaleSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Scale.Query(). Select(scale.FieldCreateTime). Scan(ctx, &v)
func (*ScaleQuery) Unique ¶
func (sq *ScaleQuery) Unique(unique bool) *ScaleQuery
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 (*ScaleQuery) Where ¶
func (sq *ScaleQuery) Where(ps ...predicate.Scale) *ScaleQuery
Where adds a new predicate for the ScaleQuery builder.
func (*ScaleQuery) WithInterpretations ¶
func (sq *ScaleQuery) WithInterpretations(opts ...func(*InterpretationQuery)) *ScaleQuery
WithInterpretations tells the query-builder to eager-load the nodes that are connected to the "interpretations" edge. The optional arguments are used to configure the query builder of the edge.
func (*ScaleQuery) WithItems ¶
func (sq *ScaleQuery) WithItems(opts ...func(*ItemQuery)) *ScaleQuery
WithItems tells the query-builder to eager-load the nodes that are connected to the "items" edge. The optional arguments are used to configure the query builder of the edge.
func (*ScaleQuery) WithNorms ¶
func (sq *ScaleQuery) WithNorms(opts ...func(*NormQuery)) *ScaleQuery
WithNorms tells the query-builder to eager-load the nodes that are connected to the "norms" edge. The optional arguments are used to configure the query builder of the edge.
func (*ScaleQuery) WithResults ¶
func (sq *ScaleQuery) WithResults(opts ...func(*ResultQuery)) *ScaleQuery
WithResults tells the query-builder to eager-load the nodes that are connected to the "results" edge. The optional arguments are used to configure the query builder of the edge.
func (*ScaleQuery) WithScaleItem ¶
func (sq *ScaleQuery) WithScaleItem(opts ...func(*ScaleItemQuery)) *ScaleQuery
WithScaleItem tells the query-builder to eager-load the nodes that are connected to the "scale_item" edge. The optional arguments are used to configure the query builder of the edge.
func (*ScaleQuery) WithTest ¶
func (sq *ScaleQuery) WithTest(opts ...func(*TestQuery)) *ScaleQuery
WithTest tells the query-builder to eager-load the nodes that are connected to the "test" edge. The optional arguments are used to configure the query builder of the edge.
func (*ScaleQuery) WithTranslations ¶
func (sq *ScaleQuery) WithTranslations(opts ...func(*ScaleTranslationQuery)) *ScaleQuery
WithTranslations tells the query-builder to eager-load the nodes that are connected to the "translations" edge. The optional arguments are used to configure the query builder of the edge.
type ScaleSelect ¶
type ScaleSelect struct { *ScaleQuery // contains filtered or unexported fields }
ScaleSelect is the builder for selecting fields of Scale entities.
func (*ScaleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) Scan ¶
func (ss *ScaleSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ScaleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScaleTranslation ¶
type ScaleTranslation struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Locale holds the value of the "locale" field. Locale scaletranslation.Locale `json:"locale,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Abbreviation holds the value of the "abbreviation" field. Abbreviation string `json:"abbreviation,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ScaleTranslationQuery when eager-loading is set. Edges ScaleTranslationEdges `json:"edges"` // contains filtered or unexported fields }
ScaleTranslation is the model entity for the ScaleTranslation schema.
func (*ScaleTranslation) QueryScale ¶
func (st *ScaleTranslation) QueryScale() *ScaleQuery
QueryScale queries the "scale" edge of the ScaleTranslation entity.
func (*ScaleTranslation) String ¶
func (st *ScaleTranslation) String() string
String implements the fmt.Stringer.
func (*ScaleTranslation) Unwrap ¶
func (st *ScaleTranslation) Unwrap() *ScaleTranslation
Unwrap unwraps the ScaleTranslation 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 (*ScaleTranslation) Update ¶
func (st *ScaleTranslation) Update() *ScaleTranslationUpdateOne
Update returns a builder for updating this ScaleTranslation. Note that you need to call ScaleTranslation.Unwrap() before calling this method if this ScaleTranslation was returned from a transaction, and the transaction was committed or rolled back.
type ScaleTranslationClient ¶
type ScaleTranslationClient struct {
// contains filtered or unexported fields
}
ScaleTranslationClient is a client for the ScaleTranslation schema.
func NewScaleTranslationClient ¶
func NewScaleTranslationClient(c config) *ScaleTranslationClient
NewScaleTranslationClient returns a client for the ScaleTranslation from the given config.
func (*ScaleTranslationClient) Create ¶
func (c *ScaleTranslationClient) Create() *ScaleTranslationCreate
Create returns a builder for creating a ScaleTranslation entity.
func (*ScaleTranslationClient) CreateBulk ¶
func (c *ScaleTranslationClient) CreateBulk(builders ...*ScaleTranslationCreate) *ScaleTranslationCreateBulk
CreateBulk returns a builder for creating a bulk of ScaleTranslation entities.
func (*ScaleTranslationClient) Delete ¶
func (c *ScaleTranslationClient) Delete() *ScaleTranslationDelete
Delete returns a delete builder for ScaleTranslation.
func (*ScaleTranslationClient) DeleteOne ¶
func (c *ScaleTranslationClient) DeleteOne(st *ScaleTranslation) *ScaleTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ScaleTranslationClient) DeleteOneID ¶
func (c *ScaleTranslationClient) DeleteOneID(id uuid.UUID) *ScaleTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*ScaleTranslationClient) Get ¶
func (c *ScaleTranslationClient) Get(ctx context.Context, id uuid.UUID) (*ScaleTranslation, error)
Get returns a ScaleTranslation entity by its id.
func (*ScaleTranslationClient) GetX ¶
func (c *ScaleTranslationClient) GetX(ctx context.Context, id uuid.UUID) *ScaleTranslation
GetX is like Get, but panics if an error occurs.
func (*ScaleTranslationClient) Hooks ¶
func (c *ScaleTranslationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ScaleTranslationClient) Query ¶
func (c *ScaleTranslationClient) Query() *ScaleTranslationQuery
Query returns a query builder for ScaleTranslation.
func (*ScaleTranslationClient) QueryScale ¶
func (c *ScaleTranslationClient) QueryScale(st *ScaleTranslation) *ScaleQuery
QueryScale queries the scale edge of a ScaleTranslation.
func (*ScaleTranslationClient) Update ¶
func (c *ScaleTranslationClient) Update() *ScaleTranslationUpdate
Update returns an update builder for ScaleTranslation.
func (*ScaleTranslationClient) UpdateOne ¶
func (c *ScaleTranslationClient) UpdateOne(st *ScaleTranslation) *ScaleTranslationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ScaleTranslationClient) UpdateOneID ¶
func (c *ScaleTranslationClient) UpdateOneID(id uuid.UUID) *ScaleTranslationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ScaleTranslationClient) Use ¶
func (c *ScaleTranslationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `scaletranslation.Hooks(f(g(h())))`.
type ScaleTranslationCreate ¶
type ScaleTranslationCreate struct {
// contains filtered or unexported fields
}
ScaleTranslationCreate is the builder for creating a ScaleTranslation entity.
func (*ScaleTranslationCreate) Exec ¶
func (stc *ScaleTranslationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScaleTranslationCreate) ExecX ¶
func (stc *ScaleTranslationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleTranslationCreate) Mutation ¶
func (stc *ScaleTranslationCreate) Mutation() *ScaleTranslationMutation
Mutation returns the ScaleTranslationMutation object of the builder.
func (*ScaleTranslationCreate) Save ¶
func (stc *ScaleTranslationCreate) Save(ctx context.Context) (*ScaleTranslation, error)
Save creates the ScaleTranslation in the database.
func (*ScaleTranslationCreate) SaveX ¶
func (stc *ScaleTranslationCreate) SaveX(ctx context.Context) *ScaleTranslation
SaveX calls Save and panics if Save returns an error.
func (*ScaleTranslationCreate) SetAbbreviation ¶
func (stc *ScaleTranslationCreate) SetAbbreviation(s string) *ScaleTranslationCreate
SetAbbreviation sets the "abbreviation" field.
func (*ScaleTranslationCreate) SetDescription ¶
func (stc *ScaleTranslationCreate) SetDescription(s string) *ScaleTranslationCreate
SetDescription sets the "description" field.
func (*ScaleTranslationCreate) SetID ¶
func (stc *ScaleTranslationCreate) SetID(u uuid.UUID) *ScaleTranslationCreate
SetID sets the "id" field.
func (*ScaleTranslationCreate) SetLocale ¶
func (stc *ScaleTranslationCreate) SetLocale(s scaletranslation.Locale) *ScaleTranslationCreate
SetLocale sets the "locale" field.
func (*ScaleTranslationCreate) SetNillableAbbreviation ¶
func (stc *ScaleTranslationCreate) SetNillableAbbreviation(s *string) *ScaleTranslationCreate
SetNillableAbbreviation sets the "abbreviation" field if the given value is not nil.
func (*ScaleTranslationCreate) SetNillableDescription ¶
func (stc *ScaleTranslationCreate) SetNillableDescription(s *string) *ScaleTranslationCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ScaleTranslationCreate) SetNillableID ¶
func (stc *ScaleTranslationCreate) SetNillableID(u *uuid.UUID) *ScaleTranslationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ScaleTranslationCreate) SetNillableScaleID ¶
func (stc *ScaleTranslationCreate) SetNillableScaleID(id *uuid.UUID) *ScaleTranslationCreate
SetNillableScaleID sets the "scale" edge to the Scale entity by ID if the given value is not nil.
func (*ScaleTranslationCreate) SetScale ¶
func (stc *ScaleTranslationCreate) SetScale(s *Scale) *ScaleTranslationCreate
SetScale sets the "scale" edge to the Scale entity.
func (*ScaleTranslationCreate) SetScaleID ¶
func (stc *ScaleTranslationCreate) SetScaleID(id uuid.UUID) *ScaleTranslationCreate
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*ScaleTranslationCreate) SetTitle ¶
func (stc *ScaleTranslationCreate) SetTitle(s string) *ScaleTranslationCreate
SetTitle sets the "title" field.
type ScaleTranslationCreateBulk ¶
type ScaleTranslationCreateBulk struct {
// contains filtered or unexported fields
}
ScaleTranslationCreateBulk is the builder for creating many ScaleTranslation entities in bulk.
func (*ScaleTranslationCreateBulk) Exec ¶
func (stcb *ScaleTranslationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ScaleTranslationCreateBulk) ExecX ¶
func (stcb *ScaleTranslationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleTranslationCreateBulk) Save ¶
func (stcb *ScaleTranslationCreateBulk) Save(ctx context.Context) ([]*ScaleTranslation, error)
Save creates the ScaleTranslation entities in the database.
func (*ScaleTranslationCreateBulk) SaveX ¶
func (stcb *ScaleTranslationCreateBulk) SaveX(ctx context.Context) []*ScaleTranslation
SaveX is like Save, but panics if an error occurs.
type ScaleTranslationDelete ¶
type ScaleTranslationDelete struct {
// contains filtered or unexported fields
}
ScaleTranslationDelete is the builder for deleting a ScaleTranslation entity.
func (*ScaleTranslationDelete) Exec ¶
func (std *ScaleTranslationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ScaleTranslationDelete) ExecX ¶
func (std *ScaleTranslationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ScaleTranslationDelete) Where ¶
func (std *ScaleTranslationDelete) Where(ps ...predicate.ScaleTranslation) *ScaleTranslationDelete
Where appends a list predicates to the ScaleTranslationDelete builder.
type ScaleTranslationDeleteOne ¶
type ScaleTranslationDeleteOne struct {
// contains filtered or unexported fields
}
ScaleTranslationDeleteOne is the builder for deleting a single ScaleTranslation entity.
func (*ScaleTranslationDeleteOne) Exec ¶
func (stdo *ScaleTranslationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ScaleTranslationDeleteOne) ExecX ¶
func (stdo *ScaleTranslationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ScaleTranslationEdges ¶
type ScaleTranslationEdges struct { // Scale holds the value of the scale edge. Scale *Scale `json:"scale,omitempty"` // contains filtered or unexported fields }
ScaleTranslationEdges holds the relations/edges for other nodes in the graph.
func (ScaleTranslationEdges) ScaleOrErr ¶
func (e ScaleTranslationEdges) ScaleOrErr() (*Scale, error)
ScaleOrErr returns the Scale value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ScaleTranslationGroupBy ¶
type ScaleTranslationGroupBy struct {
// contains filtered or unexported fields
}
ScaleTranslationGroupBy is the group-by builder for ScaleTranslation entities.
func (*ScaleTranslationGroupBy) Aggregate ¶
func (stgb *ScaleTranslationGroupBy) Aggregate(fns ...AggregateFunc) *ScaleTranslationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ScaleTranslationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ScaleTranslationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationGroupBy) Scan ¶
func (stgb *ScaleTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ScaleTranslationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScaleTranslationMutation ¶
type ScaleTranslationMutation struct {
// contains filtered or unexported fields
}
ScaleTranslationMutation represents an operation that mutates the ScaleTranslation nodes in the graph.
func (*ScaleTranslationMutation) Abbreviation ¶
func (m *ScaleTranslationMutation) Abbreviation() (r string, exists bool)
Abbreviation returns the value of the "abbreviation" field in the mutation.
func (*ScaleTranslationMutation) AddField ¶
func (m *ScaleTranslationMutation) 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 (*ScaleTranslationMutation) AddedEdges ¶
func (m *ScaleTranslationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ScaleTranslationMutation) AddedField ¶
func (m *ScaleTranslationMutation) 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 (*ScaleTranslationMutation) AddedFields ¶
func (m *ScaleTranslationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ScaleTranslationMutation) AddedIDs ¶
func (m *ScaleTranslationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ScaleTranslationMutation) ClearDescription ¶
func (m *ScaleTranslationMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*ScaleTranslationMutation) ClearEdge ¶
func (m *ScaleTranslationMutation) 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 (*ScaleTranslationMutation) ClearField ¶
func (m *ScaleTranslationMutation) 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 (*ScaleTranslationMutation) ClearScale ¶
func (m *ScaleTranslationMutation) ClearScale()
ClearScale clears the "scale" edge to the Scale entity.
func (*ScaleTranslationMutation) ClearedEdges ¶
func (m *ScaleTranslationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ScaleTranslationMutation) ClearedFields ¶
func (m *ScaleTranslationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ScaleTranslationMutation) Client ¶
func (m ScaleTranslationMutation) 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 (*ScaleTranslationMutation) Description ¶
func (m *ScaleTranslationMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ScaleTranslationMutation) DescriptionCleared ¶
func (m *ScaleTranslationMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*ScaleTranslationMutation) EdgeCleared ¶
func (m *ScaleTranslationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ScaleTranslationMutation) Field ¶
func (m *ScaleTranslationMutation) 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 (*ScaleTranslationMutation) FieldCleared ¶
func (m *ScaleTranslationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ScaleTranslationMutation) Fields ¶
func (m *ScaleTranslationMutation) 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 (*ScaleTranslationMutation) ID ¶
func (m *ScaleTranslationMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ScaleTranslationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ScaleTranslationMutation) Locale ¶
func (m *ScaleTranslationMutation) Locale() (r scaletranslation.Locale, exists bool)
Locale returns the value of the "locale" field in the mutation.
func (*ScaleTranslationMutation) OldAbbreviation ¶
func (m *ScaleTranslationMutation) OldAbbreviation(ctx context.Context) (v string, err error)
OldAbbreviation returns the old "abbreviation" field's value of the ScaleTranslation entity. If the ScaleTranslation 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 (*ScaleTranslationMutation) OldDescription ¶
func (m *ScaleTranslationMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the ScaleTranslation entity. If the ScaleTranslation 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 (*ScaleTranslationMutation) 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 (*ScaleTranslationMutation) OldLocale ¶
func (m *ScaleTranslationMutation) OldLocale(ctx context.Context) (v scaletranslation.Locale, err error)
OldLocale returns the old "locale" field's value of the ScaleTranslation entity. If the ScaleTranslation 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 (*ScaleTranslationMutation) OldTitle ¶
func (m *ScaleTranslationMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the ScaleTranslation entity. If the ScaleTranslation 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 (*ScaleTranslationMutation) Op ¶
func (m *ScaleTranslationMutation) Op() Op
Op returns the operation name.
func (*ScaleTranslationMutation) RemovedEdges ¶
func (m *ScaleTranslationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ScaleTranslationMutation) RemovedIDs ¶
func (m *ScaleTranslationMutation) 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 (*ScaleTranslationMutation) ResetAbbreviation ¶
func (m *ScaleTranslationMutation) ResetAbbreviation()
ResetAbbreviation resets all changes to the "abbreviation" field.
func (*ScaleTranslationMutation) ResetDescription ¶
func (m *ScaleTranslationMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ScaleTranslationMutation) ResetEdge ¶
func (m *ScaleTranslationMutation) 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 (*ScaleTranslationMutation) ResetField ¶
func (m *ScaleTranslationMutation) 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 (*ScaleTranslationMutation) ResetLocale ¶
func (m *ScaleTranslationMutation) ResetLocale()
ResetLocale resets all changes to the "locale" field.
func (*ScaleTranslationMutation) ResetScale ¶
func (m *ScaleTranslationMutation) ResetScale()
ResetScale resets all changes to the "scale" edge.
func (*ScaleTranslationMutation) ResetTitle ¶
func (m *ScaleTranslationMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*ScaleTranslationMutation) ScaleCleared ¶
func (m *ScaleTranslationMutation) ScaleCleared() bool
ScaleCleared reports if the "scale" edge to the Scale entity was cleared.
func (*ScaleTranslationMutation) ScaleID ¶
func (m *ScaleTranslationMutation) ScaleID() (id uuid.UUID, exists bool)
ScaleID returns the "scale" edge ID in the mutation.
func (*ScaleTranslationMutation) ScaleIDs ¶
func (m *ScaleTranslationMutation) ScaleIDs() (ids []uuid.UUID)
ScaleIDs returns the "scale" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ScaleID instead. It exists only for internal usage by the builders.
func (*ScaleTranslationMutation) SetAbbreviation ¶
func (m *ScaleTranslationMutation) SetAbbreviation(s string)
SetAbbreviation sets the "abbreviation" field.
func (*ScaleTranslationMutation) SetDescription ¶
func (m *ScaleTranslationMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ScaleTranslationMutation) SetField ¶
func (m *ScaleTranslationMutation) 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 (*ScaleTranslationMutation) SetID ¶
func (m *ScaleTranslationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ScaleTranslation entities.
func (*ScaleTranslationMutation) SetLocale ¶
func (m *ScaleTranslationMutation) SetLocale(s scaletranslation.Locale)
SetLocale sets the "locale" field.
func (*ScaleTranslationMutation) SetScaleID ¶
func (m *ScaleTranslationMutation) SetScaleID(id uuid.UUID)
SetScaleID sets the "scale" edge to the Scale entity by id.
func (*ScaleTranslationMutation) SetTitle ¶
func (m *ScaleTranslationMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*ScaleTranslationMutation) Title ¶
func (m *ScaleTranslationMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (ScaleTranslationMutation) Tx ¶
func (m ScaleTranslationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ScaleTranslationMutation) Type ¶
func (m *ScaleTranslationMutation) Type() string
Type returns the node type of this mutation (ScaleTranslation).
func (*ScaleTranslationMutation) Where ¶
func (m *ScaleTranslationMutation) Where(ps ...predicate.ScaleTranslation)
Where appends a list predicates to the ScaleTranslationMutation builder.
type ScaleTranslationQuery ¶
type ScaleTranslationQuery struct {
// contains filtered or unexported fields
}
ScaleTranslationQuery is the builder for querying ScaleTranslation entities.
func (*ScaleTranslationQuery) All ¶
func (stq *ScaleTranslationQuery) All(ctx context.Context) ([]*ScaleTranslation, error)
All executes the query and returns a list of ScaleTranslations.
func (*ScaleTranslationQuery) AllX ¶
func (stq *ScaleTranslationQuery) AllX(ctx context.Context) []*ScaleTranslation
AllX is like All, but panics if an error occurs.
func (*ScaleTranslationQuery) Clone ¶
func (stq *ScaleTranslationQuery) Clone() *ScaleTranslationQuery
Clone returns a duplicate of the ScaleTranslationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ScaleTranslationQuery) Count ¶
func (stq *ScaleTranslationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ScaleTranslationQuery) CountX ¶
func (stq *ScaleTranslationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ScaleTranslationQuery) Exist ¶
func (stq *ScaleTranslationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ScaleTranslationQuery) ExistX ¶
func (stq *ScaleTranslationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ScaleTranslationQuery) First ¶
func (stq *ScaleTranslationQuery) First(ctx context.Context) (*ScaleTranslation, error)
First returns the first ScaleTranslation entity from the query. Returns a *NotFoundError when no ScaleTranslation was found.
func (*ScaleTranslationQuery) FirstID ¶
FirstID returns the first ScaleTranslation ID from the query. Returns a *NotFoundError when no ScaleTranslation ID was found.
func (*ScaleTranslationQuery) FirstIDX ¶
func (stq *ScaleTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ScaleTranslationQuery) FirstX ¶
func (stq *ScaleTranslationQuery) FirstX(ctx context.Context) *ScaleTranslation
FirstX is like First, but panics if an error occurs.
func (*ScaleTranslationQuery) GroupBy ¶
func (stq *ScaleTranslationQuery) GroupBy(field string, fields ...string) *ScaleTranslationGroupBy
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 { Locale scaletranslation.Locale `json:"locale,omitempty"` Count int `json:"count,omitempty"` } client.ScaleTranslation.Query(). GroupBy(scaletranslation.FieldLocale). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ScaleTranslationQuery) IDs ¶
IDs executes the query and returns a list of ScaleTranslation IDs.
func (*ScaleTranslationQuery) IDsX ¶
func (stq *ScaleTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ScaleTranslationQuery) Limit ¶
func (stq *ScaleTranslationQuery) Limit(limit int) *ScaleTranslationQuery
Limit adds a limit step to the query.
func (*ScaleTranslationQuery) Offset ¶
func (stq *ScaleTranslationQuery) Offset(offset int) *ScaleTranslationQuery
Offset adds an offset step to the query.
func (*ScaleTranslationQuery) Only ¶
func (stq *ScaleTranslationQuery) Only(ctx context.Context) (*ScaleTranslation, error)
Only returns a single ScaleTranslation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ScaleTranslation entity is found. Returns a *NotFoundError when no ScaleTranslation entities are found.
func (*ScaleTranslationQuery) OnlyID ¶
OnlyID is like Only, but returns the only ScaleTranslation ID in the query. Returns a *NotSingularError when more than one ScaleTranslation ID is found. Returns a *NotFoundError when no entities are found.
func (*ScaleTranslationQuery) OnlyIDX ¶
func (stq *ScaleTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ScaleTranslationQuery) OnlyX ¶
func (stq *ScaleTranslationQuery) OnlyX(ctx context.Context) *ScaleTranslation
OnlyX is like Only, but panics if an error occurs.
func (*ScaleTranslationQuery) Order ¶
func (stq *ScaleTranslationQuery) Order(o ...OrderFunc) *ScaleTranslationQuery
Order adds an order step to the query.
func (*ScaleTranslationQuery) QueryScale ¶
func (stq *ScaleTranslationQuery) QueryScale() *ScaleQuery
QueryScale chains the current query on the "scale" edge.
func (*ScaleTranslationQuery) Select ¶
func (stq *ScaleTranslationQuery) Select(fields ...string) *ScaleTranslationSelect
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 { Locale scaletranslation.Locale `json:"locale,omitempty"` } client.ScaleTranslation.Query(). Select(scaletranslation.FieldLocale). Scan(ctx, &v)
func (*ScaleTranslationQuery) Unique ¶
func (stq *ScaleTranslationQuery) Unique(unique bool) *ScaleTranslationQuery
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 (*ScaleTranslationQuery) Where ¶
func (stq *ScaleTranslationQuery) Where(ps ...predicate.ScaleTranslation) *ScaleTranslationQuery
Where adds a new predicate for the ScaleTranslationQuery builder.
func (*ScaleTranslationQuery) WithScale ¶
func (stq *ScaleTranslationQuery) WithScale(opts ...func(*ScaleQuery)) *ScaleTranslationQuery
WithScale tells the query-builder to eager-load the nodes that are connected to the "scale" edge. The optional arguments are used to configure the query builder of the edge.
type ScaleTranslationSelect ¶
type ScaleTranslationSelect struct { *ScaleTranslationQuery // contains filtered or unexported fields }
ScaleTranslationSelect is the builder for selecting fields of ScaleTranslation entities.
func (*ScaleTranslationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ScaleTranslationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScaleTranslationSelect) Scan ¶
func (sts *ScaleTranslationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ScaleTranslationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScaleTranslationUpdate ¶
type ScaleTranslationUpdate struct {
// contains filtered or unexported fields
}
ScaleTranslationUpdate is the builder for updating ScaleTranslation entities.
func (*ScaleTranslationUpdate) ClearDescription ¶
func (stu *ScaleTranslationUpdate) ClearDescription() *ScaleTranslationUpdate
ClearDescription clears the value of the "description" field.
func (*ScaleTranslationUpdate) ClearScale ¶
func (stu *ScaleTranslationUpdate) ClearScale() *ScaleTranslationUpdate
ClearScale clears the "scale" edge to the Scale entity.
func (*ScaleTranslationUpdate) Exec ¶
func (stu *ScaleTranslationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScaleTranslationUpdate) ExecX ¶
func (stu *ScaleTranslationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleTranslationUpdate) Mutation ¶
func (stu *ScaleTranslationUpdate) Mutation() *ScaleTranslationMutation
Mutation returns the ScaleTranslationMutation object of the builder.
func (*ScaleTranslationUpdate) Save ¶
func (stu *ScaleTranslationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ScaleTranslationUpdate) SaveX ¶
func (stu *ScaleTranslationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ScaleTranslationUpdate) SetAbbreviation ¶
func (stu *ScaleTranslationUpdate) SetAbbreviation(s string) *ScaleTranslationUpdate
SetAbbreviation sets the "abbreviation" field.
func (*ScaleTranslationUpdate) SetDescription ¶
func (stu *ScaleTranslationUpdate) SetDescription(s string) *ScaleTranslationUpdate
SetDescription sets the "description" field.
func (*ScaleTranslationUpdate) SetNillableAbbreviation ¶
func (stu *ScaleTranslationUpdate) SetNillableAbbreviation(s *string) *ScaleTranslationUpdate
SetNillableAbbreviation sets the "abbreviation" field if the given value is not nil.
func (*ScaleTranslationUpdate) SetNillableDescription ¶
func (stu *ScaleTranslationUpdate) SetNillableDescription(s *string) *ScaleTranslationUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ScaleTranslationUpdate) SetNillableScaleID ¶
func (stu *ScaleTranslationUpdate) SetNillableScaleID(id *uuid.UUID) *ScaleTranslationUpdate
SetNillableScaleID sets the "scale" edge to the Scale entity by ID if the given value is not nil.
func (*ScaleTranslationUpdate) SetScale ¶
func (stu *ScaleTranslationUpdate) SetScale(s *Scale) *ScaleTranslationUpdate
SetScale sets the "scale" edge to the Scale entity.
func (*ScaleTranslationUpdate) SetScaleID ¶
func (stu *ScaleTranslationUpdate) SetScaleID(id uuid.UUID) *ScaleTranslationUpdate
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*ScaleTranslationUpdate) SetTitle ¶
func (stu *ScaleTranslationUpdate) SetTitle(s string) *ScaleTranslationUpdate
SetTitle sets the "title" field.
func (*ScaleTranslationUpdate) Where ¶
func (stu *ScaleTranslationUpdate) Where(ps ...predicate.ScaleTranslation) *ScaleTranslationUpdate
Where appends a list predicates to the ScaleTranslationUpdate builder.
type ScaleTranslationUpdateOne ¶
type ScaleTranslationUpdateOne struct {
// contains filtered or unexported fields
}
ScaleTranslationUpdateOne is the builder for updating a single ScaleTranslation entity.
func (*ScaleTranslationUpdateOne) ClearDescription ¶
func (stuo *ScaleTranslationUpdateOne) ClearDescription() *ScaleTranslationUpdateOne
ClearDescription clears the value of the "description" field.
func (*ScaleTranslationUpdateOne) ClearScale ¶
func (stuo *ScaleTranslationUpdateOne) ClearScale() *ScaleTranslationUpdateOne
ClearScale clears the "scale" edge to the Scale entity.
func (*ScaleTranslationUpdateOne) Exec ¶
func (stuo *ScaleTranslationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ScaleTranslationUpdateOne) ExecX ¶
func (stuo *ScaleTranslationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleTranslationUpdateOne) Mutation ¶
func (stuo *ScaleTranslationUpdateOne) Mutation() *ScaleTranslationMutation
Mutation returns the ScaleTranslationMutation object of the builder.
func (*ScaleTranslationUpdateOne) Save ¶
func (stuo *ScaleTranslationUpdateOne) Save(ctx context.Context) (*ScaleTranslation, error)
Save executes the query and returns the updated ScaleTranslation entity.
func (*ScaleTranslationUpdateOne) SaveX ¶
func (stuo *ScaleTranslationUpdateOne) SaveX(ctx context.Context) *ScaleTranslation
SaveX is like Save, but panics if an error occurs.
func (*ScaleTranslationUpdateOne) Select ¶
func (stuo *ScaleTranslationUpdateOne) Select(field string, fields ...string) *ScaleTranslationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ScaleTranslationUpdateOne) SetAbbreviation ¶
func (stuo *ScaleTranslationUpdateOne) SetAbbreviation(s string) *ScaleTranslationUpdateOne
SetAbbreviation sets the "abbreviation" field.
func (*ScaleTranslationUpdateOne) SetDescription ¶
func (stuo *ScaleTranslationUpdateOne) SetDescription(s string) *ScaleTranslationUpdateOne
SetDescription sets the "description" field.
func (*ScaleTranslationUpdateOne) SetNillableAbbreviation ¶
func (stuo *ScaleTranslationUpdateOne) SetNillableAbbreviation(s *string) *ScaleTranslationUpdateOne
SetNillableAbbreviation sets the "abbreviation" field if the given value is not nil.
func (*ScaleTranslationUpdateOne) SetNillableDescription ¶
func (stuo *ScaleTranslationUpdateOne) SetNillableDescription(s *string) *ScaleTranslationUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ScaleTranslationUpdateOne) SetNillableScaleID ¶
func (stuo *ScaleTranslationUpdateOne) SetNillableScaleID(id *uuid.UUID) *ScaleTranslationUpdateOne
SetNillableScaleID sets the "scale" edge to the Scale entity by ID if the given value is not nil.
func (*ScaleTranslationUpdateOne) SetScale ¶
func (stuo *ScaleTranslationUpdateOne) SetScale(s *Scale) *ScaleTranslationUpdateOne
SetScale sets the "scale" edge to the Scale entity.
func (*ScaleTranslationUpdateOne) SetScaleID ¶
func (stuo *ScaleTranslationUpdateOne) SetScaleID(id uuid.UUID) *ScaleTranslationUpdateOne
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*ScaleTranslationUpdateOne) SetTitle ¶
func (stuo *ScaleTranslationUpdateOne) SetTitle(s string) *ScaleTranslationUpdateOne
SetTitle sets the "title" field.
type ScaleTranslations ¶
type ScaleTranslations []*ScaleTranslation
ScaleTranslations is a parsable slice of ScaleTranslation.
type ScaleUpdate ¶
type ScaleUpdate struct {
// contains filtered or unexported fields
}
ScaleUpdate is the builder for updating Scale entities.
func (*ScaleUpdate) AddInterpretationIDs ¶
func (su *ScaleUpdate) AddInterpretationIDs(ids ...uuid.UUID) *ScaleUpdate
AddInterpretationIDs adds the "interpretations" edge to the Interpretation entity by IDs.
func (*ScaleUpdate) AddInterpretations ¶
func (su *ScaleUpdate) AddInterpretations(i ...*Interpretation) *ScaleUpdate
AddInterpretations adds the "interpretations" edges to the Interpretation entity.
func (*ScaleUpdate) AddItemIDs ¶
func (su *ScaleUpdate) AddItemIDs(ids ...uuid.UUID) *ScaleUpdate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*ScaleUpdate) AddItems ¶
func (su *ScaleUpdate) AddItems(i ...*Item) *ScaleUpdate
AddItems adds the "items" edges to the Item entity.
func (*ScaleUpdate) AddNormIDs ¶
func (su *ScaleUpdate) AddNormIDs(ids ...uuid.UUID) *ScaleUpdate
AddNormIDs adds the "norms" edge to the Norm entity by IDs.
func (*ScaleUpdate) AddNorms ¶
func (su *ScaleUpdate) AddNorms(n ...*Norm) *ScaleUpdate
AddNorms adds the "norms" edges to the Norm entity.
func (*ScaleUpdate) AddResultIDs ¶
func (su *ScaleUpdate) AddResultIDs(ids ...uuid.UUID) *ScaleUpdate
AddResultIDs adds the "results" edge to the Result entity by IDs.
func (*ScaleUpdate) AddResults ¶
func (su *ScaleUpdate) AddResults(r ...*Result) *ScaleUpdate
AddResults adds the "results" edges to the Result entity.
func (*ScaleUpdate) AddTest ¶
func (su *ScaleUpdate) AddTest(t ...*Test) *ScaleUpdate
AddTest adds the "test" edges to the Test entity.
func (*ScaleUpdate) AddTestIDs ¶
func (su *ScaleUpdate) AddTestIDs(ids ...uuid.UUID) *ScaleUpdate
AddTestIDs adds the "test" edge to the Test entity by IDs.
func (*ScaleUpdate) AddTranslationIDs ¶
func (su *ScaleUpdate) AddTranslationIDs(ids ...uuid.UUID) *ScaleUpdate
AddTranslationIDs adds the "translations" edge to the ScaleTranslation entity by IDs.
func (*ScaleUpdate) AddTranslations ¶
func (su *ScaleUpdate) AddTranslations(s ...*ScaleTranslation) *ScaleUpdate
AddTranslations adds the "translations" edges to the ScaleTranslation entity.
func (*ScaleUpdate) ClearInterpretations ¶
func (su *ScaleUpdate) ClearInterpretations() *ScaleUpdate
ClearInterpretations clears all "interpretations" edges to the Interpretation entity.
func (*ScaleUpdate) ClearItems ¶
func (su *ScaleUpdate) ClearItems() *ScaleUpdate
ClearItems clears all "items" edges to the Item entity.
func (*ScaleUpdate) ClearNorms ¶
func (su *ScaleUpdate) ClearNorms() *ScaleUpdate
ClearNorms clears all "norms" edges to the Norm entity.
func (*ScaleUpdate) ClearResults ¶
func (su *ScaleUpdate) ClearResults() *ScaleUpdate
ClearResults clears all "results" edges to the Result entity.
func (*ScaleUpdate) ClearTest ¶
func (su *ScaleUpdate) ClearTest() *ScaleUpdate
ClearTest clears all "test" edges to the Test entity.
func (*ScaleUpdate) ClearTranslations ¶
func (su *ScaleUpdate) ClearTranslations() *ScaleUpdate
ClearTranslations clears all "translations" edges to the ScaleTranslation entity.
func (*ScaleUpdate) Exec ¶
func (su *ScaleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScaleUpdate) ExecX ¶
func (su *ScaleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleUpdate) Mutation ¶
func (su *ScaleUpdate) Mutation() *ScaleMutation
Mutation returns the ScaleMutation object of the builder.
func (*ScaleUpdate) RemoveInterpretationIDs ¶
func (su *ScaleUpdate) RemoveInterpretationIDs(ids ...uuid.UUID) *ScaleUpdate
RemoveInterpretationIDs removes the "interpretations" edge to Interpretation entities by IDs.
func (*ScaleUpdate) RemoveInterpretations ¶
func (su *ScaleUpdate) RemoveInterpretations(i ...*Interpretation) *ScaleUpdate
RemoveInterpretations removes "interpretations" edges to Interpretation entities.
func (*ScaleUpdate) RemoveItemIDs ¶
func (su *ScaleUpdate) RemoveItemIDs(ids ...uuid.UUID) *ScaleUpdate
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*ScaleUpdate) RemoveItems ¶
func (su *ScaleUpdate) RemoveItems(i ...*Item) *ScaleUpdate
RemoveItems removes "items" edges to Item entities.
func (*ScaleUpdate) RemoveNormIDs ¶
func (su *ScaleUpdate) RemoveNormIDs(ids ...uuid.UUID) *ScaleUpdate
RemoveNormIDs removes the "norms" edge to Norm entities by IDs.
func (*ScaleUpdate) RemoveNorms ¶
func (su *ScaleUpdate) RemoveNorms(n ...*Norm) *ScaleUpdate
RemoveNorms removes "norms" edges to Norm entities.
func (*ScaleUpdate) RemoveResultIDs ¶
func (su *ScaleUpdate) RemoveResultIDs(ids ...uuid.UUID) *ScaleUpdate
RemoveResultIDs removes the "results" edge to Result entities by IDs.
func (*ScaleUpdate) RemoveResults ¶
func (su *ScaleUpdate) RemoveResults(r ...*Result) *ScaleUpdate
RemoveResults removes "results" edges to Result entities.
func (*ScaleUpdate) RemoveTest ¶
func (su *ScaleUpdate) RemoveTest(t ...*Test) *ScaleUpdate
RemoveTest removes "test" edges to Test entities.
func (*ScaleUpdate) RemoveTestIDs ¶
func (su *ScaleUpdate) RemoveTestIDs(ids ...uuid.UUID) *ScaleUpdate
RemoveTestIDs removes the "test" edge to Test entities by IDs.
func (*ScaleUpdate) RemoveTranslationIDs ¶
func (su *ScaleUpdate) RemoveTranslationIDs(ids ...uuid.UUID) *ScaleUpdate
RemoveTranslationIDs removes the "translations" edge to ScaleTranslation entities by IDs.
func (*ScaleUpdate) RemoveTranslations ¶
func (su *ScaleUpdate) RemoveTranslations(s ...*ScaleTranslation) *ScaleUpdate
RemoveTranslations removes "translations" edges to ScaleTranslation entities.
func (*ScaleUpdate) Save ¶
func (su *ScaleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ScaleUpdate) SaveX ¶
func (su *ScaleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ScaleUpdate) SetGlobal ¶
func (su *ScaleUpdate) SetGlobal(b bool) *ScaleUpdate
SetGlobal sets the "global" field.
func (*ScaleUpdate) SetNillableGlobal ¶
func (su *ScaleUpdate) SetNillableGlobal(b *bool) *ScaleUpdate
SetNillableGlobal sets the "global" field if the given value is not nil.
func (*ScaleUpdate) SetNillableType ¶
func (su *ScaleUpdate) SetNillableType(s *scale.Type) *ScaleUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*ScaleUpdate) SetType ¶
func (su *ScaleUpdate) SetType(s scale.Type) *ScaleUpdate
SetType sets the "type" field.
func (*ScaleUpdate) SetUpdateTime ¶
func (su *ScaleUpdate) SetUpdateTime(t time.Time) *ScaleUpdate
SetUpdateTime sets the "update_time" field.
func (*ScaleUpdate) Where ¶
func (su *ScaleUpdate) Where(ps ...predicate.Scale) *ScaleUpdate
Where appends a list predicates to the ScaleUpdate builder.
type ScaleUpdateOne ¶
type ScaleUpdateOne struct {
// contains filtered or unexported fields
}
ScaleUpdateOne is the builder for updating a single Scale entity.
func (*ScaleUpdateOne) AddInterpretationIDs ¶
func (suo *ScaleUpdateOne) AddInterpretationIDs(ids ...uuid.UUID) *ScaleUpdateOne
AddInterpretationIDs adds the "interpretations" edge to the Interpretation entity by IDs.
func (*ScaleUpdateOne) AddInterpretations ¶
func (suo *ScaleUpdateOne) AddInterpretations(i ...*Interpretation) *ScaleUpdateOne
AddInterpretations adds the "interpretations" edges to the Interpretation entity.
func (*ScaleUpdateOne) AddItemIDs ¶
func (suo *ScaleUpdateOne) AddItemIDs(ids ...uuid.UUID) *ScaleUpdateOne
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*ScaleUpdateOne) AddItems ¶
func (suo *ScaleUpdateOne) AddItems(i ...*Item) *ScaleUpdateOne
AddItems adds the "items" edges to the Item entity.
func (*ScaleUpdateOne) AddNormIDs ¶
func (suo *ScaleUpdateOne) AddNormIDs(ids ...uuid.UUID) *ScaleUpdateOne
AddNormIDs adds the "norms" edge to the Norm entity by IDs.
func (*ScaleUpdateOne) AddNorms ¶
func (suo *ScaleUpdateOne) AddNorms(n ...*Norm) *ScaleUpdateOne
AddNorms adds the "norms" edges to the Norm entity.
func (*ScaleUpdateOne) AddResultIDs ¶
func (suo *ScaleUpdateOne) AddResultIDs(ids ...uuid.UUID) *ScaleUpdateOne
AddResultIDs adds the "results" edge to the Result entity by IDs.
func (*ScaleUpdateOne) AddResults ¶
func (suo *ScaleUpdateOne) AddResults(r ...*Result) *ScaleUpdateOne
AddResults adds the "results" edges to the Result entity.
func (*ScaleUpdateOne) AddTest ¶
func (suo *ScaleUpdateOne) AddTest(t ...*Test) *ScaleUpdateOne
AddTest adds the "test" edges to the Test entity.
func (*ScaleUpdateOne) AddTestIDs ¶
func (suo *ScaleUpdateOne) AddTestIDs(ids ...uuid.UUID) *ScaleUpdateOne
AddTestIDs adds the "test" edge to the Test entity by IDs.
func (*ScaleUpdateOne) AddTranslationIDs ¶
func (suo *ScaleUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *ScaleUpdateOne
AddTranslationIDs adds the "translations" edge to the ScaleTranslation entity by IDs.
func (*ScaleUpdateOne) AddTranslations ¶
func (suo *ScaleUpdateOne) AddTranslations(s ...*ScaleTranslation) *ScaleUpdateOne
AddTranslations adds the "translations" edges to the ScaleTranslation entity.
func (*ScaleUpdateOne) ClearInterpretations ¶
func (suo *ScaleUpdateOne) ClearInterpretations() *ScaleUpdateOne
ClearInterpretations clears all "interpretations" edges to the Interpretation entity.
func (*ScaleUpdateOne) ClearItems ¶
func (suo *ScaleUpdateOne) ClearItems() *ScaleUpdateOne
ClearItems clears all "items" edges to the Item entity.
func (*ScaleUpdateOne) ClearNorms ¶
func (suo *ScaleUpdateOne) ClearNorms() *ScaleUpdateOne
ClearNorms clears all "norms" edges to the Norm entity.
func (*ScaleUpdateOne) ClearResults ¶
func (suo *ScaleUpdateOne) ClearResults() *ScaleUpdateOne
ClearResults clears all "results" edges to the Result entity.
func (*ScaleUpdateOne) ClearTest ¶
func (suo *ScaleUpdateOne) ClearTest() *ScaleUpdateOne
ClearTest clears all "test" edges to the Test entity.
func (*ScaleUpdateOne) ClearTranslations ¶
func (suo *ScaleUpdateOne) ClearTranslations() *ScaleUpdateOne
ClearTranslations clears all "translations" edges to the ScaleTranslation entity.
func (*ScaleUpdateOne) Exec ¶
func (suo *ScaleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ScaleUpdateOne) ExecX ¶
func (suo *ScaleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleUpdateOne) Mutation ¶
func (suo *ScaleUpdateOne) Mutation() *ScaleMutation
Mutation returns the ScaleMutation object of the builder.
func (*ScaleUpdateOne) RemoveInterpretationIDs ¶
func (suo *ScaleUpdateOne) RemoveInterpretationIDs(ids ...uuid.UUID) *ScaleUpdateOne
RemoveInterpretationIDs removes the "interpretations" edge to Interpretation entities by IDs.
func (*ScaleUpdateOne) RemoveInterpretations ¶
func (suo *ScaleUpdateOne) RemoveInterpretations(i ...*Interpretation) *ScaleUpdateOne
RemoveInterpretations removes "interpretations" edges to Interpretation entities.
func (*ScaleUpdateOne) RemoveItemIDs ¶
func (suo *ScaleUpdateOne) RemoveItemIDs(ids ...uuid.UUID) *ScaleUpdateOne
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*ScaleUpdateOne) RemoveItems ¶
func (suo *ScaleUpdateOne) RemoveItems(i ...*Item) *ScaleUpdateOne
RemoveItems removes "items" edges to Item entities.
func (*ScaleUpdateOne) RemoveNormIDs ¶
func (suo *ScaleUpdateOne) RemoveNormIDs(ids ...uuid.UUID) *ScaleUpdateOne
RemoveNormIDs removes the "norms" edge to Norm entities by IDs.
func (*ScaleUpdateOne) RemoveNorms ¶
func (suo *ScaleUpdateOne) RemoveNorms(n ...*Norm) *ScaleUpdateOne
RemoveNorms removes "norms" edges to Norm entities.
func (*ScaleUpdateOne) RemoveResultIDs ¶
func (suo *ScaleUpdateOne) RemoveResultIDs(ids ...uuid.UUID) *ScaleUpdateOne
RemoveResultIDs removes the "results" edge to Result entities by IDs.
func (*ScaleUpdateOne) RemoveResults ¶
func (suo *ScaleUpdateOne) RemoveResults(r ...*Result) *ScaleUpdateOne
RemoveResults removes "results" edges to Result entities.
func (*ScaleUpdateOne) RemoveTest ¶
func (suo *ScaleUpdateOne) RemoveTest(t ...*Test) *ScaleUpdateOne
RemoveTest removes "test" edges to Test entities.
func (*ScaleUpdateOne) RemoveTestIDs ¶
func (suo *ScaleUpdateOne) RemoveTestIDs(ids ...uuid.UUID) *ScaleUpdateOne
RemoveTestIDs removes the "test" edge to Test entities by IDs.
func (*ScaleUpdateOne) RemoveTranslationIDs ¶
func (suo *ScaleUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *ScaleUpdateOne
RemoveTranslationIDs removes the "translations" edge to ScaleTranslation entities by IDs.
func (*ScaleUpdateOne) RemoveTranslations ¶
func (suo *ScaleUpdateOne) RemoveTranslations(s ...*ScaleTranslation) *ScaleUpdateOne
RemoveTranslations removes "translations" edges to ScaleTranslation entities.
func (*ScaleUpdateOne) Save ¶
func (suo *ScaleUpdateOne) Save(ctx context.Context) (*Scale, error)
Save executes the query and returns the updated Scale entity.
func (*ScaleUpdateOne) SaveX ¶
func (suo *ScaleUpdateOne) SaveX(ctx context.Context) *Scale
SaveX is like Save, but panics if an error occurs.
func (*ScaleUpdateOne) Select ¶
func (suo *ScaleUpdateOne) Select(field string, fields ...string) *ScaleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ScaleUpdateOne) SetGlobal ¶
func (suo *ScaleUpdateOne) SetGlobal(b bool) *ScaleUpdateOne
SetGlobal sets the "global" field.
func (*ScaleUpdateOne) SetNillableGlobal ¶
func (suo *ScaleUpdateOne) SetNillableGlobal(b *bool) *ScaleUpdateOne
SetNillableGlobal sets the "global" field if the given value is not nil.
func (*ScaleUpdateOne) SetNillableType ¶
func (suo *ScaleUpdateOne) SetNillableType(s *scale.Type) *ScaleUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*ScaleUpdateOne) SetType ¶
func (suo *ScaleUpdateOne) SetType(s scale.Type) *ScaleUpdateOne
SetType sets the "type" field.
func (*ScaleUpdateOne) SetUpdateTime ¶
func (suo *ScaleUpdateOne) SetUpdateTime(t time.Time) *ScaleUpdateOne
SetUpdateTime sets the "update_time" field.
type Tag ¶
type Tag struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Type holds the value of the "type" field. Type tag.Type `json:"type,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TagQuery when eager-loading is set. Edges TagEdges `json:"edges"` // contains filtered or unexported fields }
Tag is the model entity for the Tag schema.
func (*Tag) QueryTranslations ¶
func (t *Tag) QueryTranslations() *TagTranslationQuery
QueryTranslations queries the "translations" edge of the Tag entity.
func (*Tag) Unwrap ¶
Unwrap unwraps the Tag entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Tag) Update ¶
func (t *Tag) Update() *TagUpdateOne
Update returns a builder for updating this Tag. Note that you need to call Tag.Unwrap() before calling this method if this Tag was returned from a transaction, and the transaction was committed or rolled back.
type TagClient ¶
type TagClient struct {
// contains filtered or unexported fields
}
TagClient is a client for the Tag schema.
func NewTagClient ¶
func NewTagClient(c config) *TagClient
NewTagClient returns a client for the Tag from the given config.
func (*TagClient) CreateBulk ¶
func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
CreateBulk returns a builder for creating a bulk of Tag entities.
func (*TagClient) DeleteOne ¶
func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TagClient) DeleteOneID ¶
func (c *TagClient) DeleteOneID(id uuid.UUID) *TagDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*TagClient) QueryTranslations ¶
func (c *TagClient) QueryTranslations(t *Tag) *TagTranslationQuery
QueryTranslations queries the translations edge of a Tag.
func (*TagClient) UpdateOne ¶
func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TagClient) UpdateOneID ¶
func (c *TagClient) UpdateOneID(id uuid.UUID) *TagUpdateOne
UpdateOneID returns an update builder for the given id.
type TagCreate ¶
type TagCreate struct {
// contains filtered or unexported fields
}
TagCreate is the builder for creating a Tag entity.
func (*TagCreate) AddTestIDs ¶
AddTestIDs adds the "test" edge to the Test entity by IDs.
func (*TagCreate) AddTranslationIDs ¶
AddTranslationIDs adds the "translations" edge to the TagTranslation entity by IDs.
func (*TagCreate) AddTranslations ¶
func (tc *TagCreate) AddTranslations(t ...*TagTranslation) *TagCreate
AddTranslations adds the "translations" edges to the TagTranslation entity.
func (*TagCreate) Mutation ¶
func (tc *TagCreate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagCreate) SetCreateTime ¶
SetCreateTime sets the "create_time" field.
func (*TagCreate) SetNillableCreateTime ¶
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*TagCreate) SetNillableID ¶
SetNillableID sets the "id" field if the given value is not nil.
func (*TagCreate) SetNillableType ¶
SetNillableType sets the "type" field if the given value is not nil.
func (*TagCreate) SetNillableUpdateTime ¶
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
type TagCreateBulk ¶
type TagCreateBulk struct {
// contains filtered or unexported fields
}
TagCreateBulk is the builder for creating many Tag entities in bulk.
func (*TagCreateBulk) Exec ¶
func (tcb *TagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagCreateBulk) ExecX ¶
func (tcb *TagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TagDelete ¶
type TagDelete struct {
// contains filtered or unexported fields
}
TagDelete is the builder for deleting a Tag entity.
func (*TagDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type TagDeleteOne ¶
type TagDeleteOne struct {
// contains filtered or unexported fields
}
TagDeleteOne is the builder for deleting a single Tag entity.
func (*TagDeleteOne) Exec ¶
func (tdo *TagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TagDeleteOne) ExecX ¶
func (tdo *TagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TagEdges ¶
type TagEdges struct { // Translations holds the value of the translations edge. Translations []*TagTranslation `json:"translations,omitempty"` // Test holds the value of the test edge. Test []*Test `json:"test,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
func (TagEdges) TestOrErr ¶
TestOrErr returns the Test value or an error if the edge was not loaded in eager-loading.
func (TagEdges) TranslationsOrErr ¶
func (e TagEdges) TranslationsOrErr() ([]*TagTranslation, error)
TranslationsOrErr returns the Translations value or an error if the edge was not loaded in eager-loading.
type TagGroupBy ¶
type TagGroupBy struct {
// contains filtered or unexported fields
}
TagGroupBy is the group-by builder for Tag entities.
func (*TagGroupBy) Aggregate ¶
func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Scan ¶
func (tgb *TagGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagMutation ¶
type TagMutation struct {
// contains filtered or unexported fields
}
TagMutation represents an operation that mutates the Tag nodes in the graph.
func (*TagMutation) AddField ¶
func (m *TagMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*TagMutation) AddTestIDs ¶
func (m *TagMutation) AddTestIDs(ids ...uuid.UUID)
AddTestIDs adds the "test" edge to the Test entity by ids.
func (*TagMutation) AddTranslationIDs ¶
func (m *TagMutation) AddTranslationIDs(ids ...uuid.UUID)
AddTranslationIDs adds the "translations" edge to the TagTranslation entity by ids.
func (*TagMutation) AddedEdges ¶
func (m *TagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TagMutation) AddedField ¶
func (m *TagMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*TagMutation) AddedFields ¶
func (m *TagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TagMutation) AddedIDs ¶
func (m *TagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TagMutation) ClearEdge ¶
func (m *TagMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*TagMutation) ClearField ¶
func (m *TagMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*TagMutation) ClearTest ¶
func (m *TagMutation) ClearTest()
ClearTest clears the "test" edge to the Test entity.
func (*TagMutation) ClearTranslations ¶
func (m *TagMutation) ClearTranslations()
ClearTranslations clears the "translations" edge to the TagTranslation entity.
func (*TagMutation) ClearedEdges ¶
func (m *TagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TagMutation) ClearedFields ¶
func (m *TagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TagMutation) Client ¶
func (m TagMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*TagMutation) Code ¶
func (m *TagMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*TagMutation) CreateTime ¶
func (m *TagMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*TagMutation) EdgeCleared ¶
func (m *TagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TagMutation) Field ¶
func (m *TagMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*TagMutation) FieldCleared ¶
func (m *TagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TagMutation) Fields ¶
func (m *TagMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*TagMutation) GetType ¶
func (m *TagMutation) GetType() (r tag.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*TagMutation) ID ¶
func (m *TagMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TagMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TagMutation) OldCode ¶
func (m *TagMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Tag entity. If the Tag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TagMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Tag entity. If the Tag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TagMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*TagMutation) OldType ¶
OldType returns the old "type" field's value of the Tag entity. If the Tag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TagMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Tag entity. If the Tag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TagMutation) RemoveTestIDs ¶
func (m *TagMutation) RemoveTestIDs(ids ...uuid.UUID)
RemoveTestIDs removes the "test" edge to the Test entity by IDs.
func (*TagMutation) RemoveTranslationIDs ¶
func (m *TagMutation) RemoveTranslationIDs(ids ...uuid.UUID)
RemoveTranslationIDs removes the "translations" edge to the TagTranslation entity by IDs.
func (*TagMutation) RemovedEdges ¶
func (m *TagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TagMutation) RemovedIDs ¶
func (m *TagMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*TagMutation) RemovedTestIDs ¶
func (m *TagMutation) RemovedTestIDs() (ids []uuid.UUID)
RemovedTest returns the removed IDs of the "test" edge to the Test entity.
func (*TagMutation) RemovedTranslationsIDs ¶
func (m *TagMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
RemovedTranslations returns the removed IDs of the "translations" edge to the TagTranslation entity.
func (*TagMutation) ResetCode ¶
func (m *TagMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*TagMutation) ResetCreateTime ¶
func (m *TagMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*TagMutation) ResetEdge ¶
func (m *TagMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*TagMutation) ResetField ¶
func (m *TagMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*TagMutation) ResetTest ¶
func (m *TagMutation) ResetTest()
ResetTest resets all changes to the "test" edge.
func (*TagMutation) ResetTranslations ¶
func (m *TagMutation) ResetTranslations()
ResetTranslations resets all changes to the "translations" edge.
func (*TagMutation) ResetType ¶
func (m *TagMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*TagMutation) ResetUpdateTime ¶
func (m *TagMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*TagMutation) SetCode ¶
func (m *TagMutation) SetCode(s string)
SetCode sets the "code" field.
func (*TagMutation) SetCreateTime ¶
func (m *TagMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*TagMutation) SetField ¶
func (m *TagMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*TagMutation) SetID ¶
func (m *TagMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Tag entities.
func (*TagMutation) SetType ¶
func (m *TagMutation) SetType(t tag.Type)
SetType sets the "type" field.
func (*TagMutation) SetUpdateTime ¶
func (m *TagMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*TagMutation) TestCleared ¶
func (m *TagMutation) TestCleared() bool
TestCleared reports if the "test" edge to the Test entity was cleared.
func (*TagMutation) TestIDs ¶
func (m *TagMutation) TestIDs() (ids []uuid.UUID)
TestIDs returns the "test" edge IDs in the mutation.
func (*TagMutation) TranslationsCleared ¶
func (m *TagMutation) TranslationsCleared() bool
TranslationsCleared reports if the "translations" edge to the TagTranslation entity was cleared.
func (*TagMutation) TranslationsIDs ¶
func (m *TagMutation) TranslationsIDs() (ids []uuid.UUID)
TranslationsIDs returns the "translations" edge IDs in the mutation.
func (TagMutation) Tx ¶
func (m TagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TagMutation) Type ¶
func (m *TagMutation) Type() string
Type returns the node type of this mutation (Tag).
func (*TagMutation) UpdateTime ¶
func (m *TagMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*TagMutation) Where ¶
func (m *TagMutation) Where(ps ...predicate.Tag)
Where appends a list predicates to the TagMutation builder.
type TagQuery ¶
type TagQuery struct {
// contains filtered or unexported fields
}
TagQuery is the builder for querying Tag entities.
func (*TagQuery) Clone ¶
Clone returns a duplicate of the TagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TagQuery) First ¶
First returns the first Tag entity from the query. Returns a *NotFoundError when no Tag was found.
func (*TagQuery) FirstID ¶
FirstID returns the first Tag ID from the query. Returns a *NotFoundError when no Tag ID was found.
func (*TagQuery) GroupBy ¶
func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Tag.Query(). GroupBy(tag.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TagQuery) Only ¶
Only returns a single Tag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tag entity is found. Returns a *NotFoundError when no Tag entities are found.
func (*TagQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tag ID in the query. Returns a *NotSingularError when more than one Tag ID is found. Returns a *NotFoundError when no entities are found.
func (*TagQuery) QueryTranslations ¶
func (tq *TagQuery) QueryTranslations() *TagTranslationQuery
QueryTranslations chains the current query on the "translations" edge.
func (*TagQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Tag.Query(). Select(tag.FieldCreateTime). Scan(ctx, &v)
func (*TagQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*TagQuery) WithTest ¶
WithTest tells the query-builder to eager-load the nodes that are connected to the "test" edge. The optional arguments are used to configure the query builder of the edge.
func (*TagQuery) WithTranslations ¶
func (tq *TagQuery) WithTranslations(opts ...func(*TagTranslationQuery)) *TagQuery
WithTranslations tells the query-builder to eager-load the nodes that are connected to the "translations" edge. The optional arguments are used to configure the query builder of the edge.
type TagSelect ¶
type TagSelect struct { *TagQuery // contains filtered or unexported fields }
TagSelect is the builder for selecting fields of Tag entities.
func (*TagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagTranslation ¶
type TagTranslation struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Locale holds the value of the "locale" field. Locale tagtranslation.Locale `json:"locale,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TagTranslationQuery when eager-loading is set. Edges TagTranslationEdges `json:"edges"` // contains filtered or unexported fields }
TagTranslation is the model entity for the TagTranslation schema.
func (*TagTranslation) QueryTag ¶
func (tt *TagTranslation) QueryTag() *TagQuery
QueryTag queries the "tag" edge of the TagTranslation entity.
func (*TagTranslation) String ¶
func (tt *TagTranslation) String() string
String implements the fmt.Stringer.
func (*TagTranslation) Unwrap ¶
func (tt *TagTranslation) Unwrap() *TagTranslation
Unwrap unwraps the TagTranslation 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 (*TagTranslation) Update ¶
func (tt *TagTranslation) Update() *TagTranslationUpdateOne
Update returns a builder for updating this TagTranslation. Note that you need to call TagTranslation.Unwrap() before calling this method if this TagTranslation was returned from a transaction, and the transaction was committed or rolled back.
type TagTranslationClient ¶
type TagTranslationClient struct {
// contains filtered or unexported fields
}
TagTranslationClient is a client for the TagTranslation schema.
func NewTagTranslationClient ¶
func NewTagTranslationClient(c config) *TagTranslationClient
NewTagTranslationClient returns a client for the TagTranslation from the given config.
func (*TagTranslationClient) Create ¶
func (c *TagTranslationClient) Create() *TagTranslationCreate
Create returns a builder for creating a TagTranslation entity.
func (*TagTranslationClient) CreateBulk ¶
func (c *TagTranslationClient) CreateBulk(builders ...*TagTranslationCreate) *TagTranslationCreateBulk
CreateBulk returns a builder for creating a bulk of TagTranslation entities.
func (*TagTranslationClient) Delete ¶
func (c *TagTranslationClient) Delete() *TagTranslationDelete
Delete returns a delete builder for TagTranslation.
func (*TagTranslationClient) DeleteOne ¶
func (c *TagTranslationClient) DeleteOne(tt *TagTranslation) *TagTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TagTranslationClient) DeleteOneID ¶
func (c *TagTranslationClient) DeleteOneID(id uuid.UUID) *TagTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*TagTranslationClient) Get ¶
func (c *TagTranslationClient) Get(ctx context.Context, id uuid.UUID) (*TagTranslation, error)
Get returns a TagTranslation entity by its id.
func (*TagTranslationClient) GetX ¶
func (c *TagTranslationClient) GetX(ctx context.Context, id uuid.UUID) *TagTranslation
GetX is like Get, but panics if an error occurs.
func (*TagTranslationClient) Hooks ¶
func (c *TagTranslationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TagTranslationClient) Query ¶
func (c *TagTranslationClient) Query() *TagTranslationQuery
Query returns a query builder for TagTranslation.
func (*TagTranslationClient) QueryTag ¶
func (c *TagTranslationClient) QueryTag(tt *TagTranslation) *TagQuery
QueryTag queries the tag edge of a TagTranslation.
func (*TagTranslationClient) Update ¶
func (c *TagTranslationClient) Update() *TagTranslationUpdate
Update returns an update builder for TagTranslation.
func (*TagTranslationClient) UpdateOne ¶
func (c *TagTranslationClient) UpdateOne(tt *TagTranslation) *TagTranslationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TagTranslationClient) UpdateOneID ¶
func (c *TagTranslationClient) UpdateOneID(id uuid.UUID) *TagTranslationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TagTranslationClient) Use ¶
func (c *TagTranslationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tagtranslation.Hooks(f(g(h())))`.
type TagTranslationCreate ¶
type TagTranslationCreate struct {
// contains filtered or unexported fields
}
TagTranslationCreate is the builder for creating a TagTranslation entity.
func (*TagTranslationCreate) Exec ¶
func (ttc *TagTranslationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TagTranslationCreate) ExecX ¶
func (ttc *TagTranslationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagTranslationCreate) Mutation ¶
func (ttc *TagTranslationCreate) Mutation() *TagTranslationMutation
Mutation returns the TagTranslationMutation object of the builder.
func (*TagTranslationCreate) Save ¶
func (ttc *TagTranslationCreate) Save(ctx context.Context) (*TagTranslation, error)
Save creates the TagTranslation in the database.
func (*TagTranslationCreate) SaveX ¶
func (ttc *TagTranslationCreate) SaveX(ctx context.Context) *TagTranslation
SaveX calls Save and panics if Save returns an error.
func (*TagTranslationCreate) SetContent ¶
func (ttc *TagTranslationCreate) SetContent(s string) *TagTranslationCreate
SetContent sets the "content" field.
func (*TagTranslationCreate) SetID ¶
func (ttc *TagTranslationCreate) SetID(u uuid.UUID) *TagTranslationCreate
SetID sets the "id" field.
func (*TagTranslationCreate) SetLocale ¶
func (ttc *TagTranslationCreate) SetLocale(t tagtranslation.Locale) *TagTranslationCreate
SetLocale sets the "locale" field.
func (*TagTranslationCreate) SetNillableID ¶
func (ttc *TagTranslationCreate) SetNillableID(u *uuid.UUID) *TagTranslationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TagTranslationCreate) SetNillableTagID ¶
func (ttc *TagTranslationCreate) SetNillableTagID(id *uuid.UUID) *TagTranslationCreate
SetNillableTagID sets the "tag" edge to the Tag entity by ID if the given value is not nil.
func (*TagTranslationCreate) SetTag ¶
func (ttc *TagTranslationCreate) SetTag(t *Tag) *TagTranslationCreate
SetTag sets the "tag" edge to the Tag entity.
func (*TagTranslationCreate) SetTagID ¶
func (ttc *TagTranslationCreate) SetTagID(id uuid.UUID) *TagTranslationCreate
SetTagID sets the "tag" edge to the Tag entity by ID.
type TagTranslationCreateBulk ¶
type TagTranslationCreateBulk struct {
// contains filtered or unexported fields
}
TagTranslationCreateBulk is the builder for creating many TagTranslation entities in bulk.
func (*TagTranslationCreateBulk) Exec ¶
func (ttcb *TagTranslationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagTranslationCreateBulk) ExecX ¶
func (ttcb *TagTranslationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagTranslationCreateBulk) Save ¶
func (ttcb *TagTranslationCreateBulk) Save(ctx context.Context) ([]*TagTranslation, error)
Save creates the TagTranslation entities in the database.
func (*TagTranslationCreateBulk) SaveX ¶
func (ttcb *TagTranslationCreateBulk) SaveX(ctx context.Context) []*TagTranslation
SaveX is like Save, but panics if an error occurs.
type TagTranslationDelete ¶
type TagTranslationDelete struct {
// contains filtered or unexported fields
}
TagTranslationDelete is the builder for deleting a TagTranslation entity.
func (*TagTranslationDelete) Exec ¶
func (ttd *TagTranslationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TagTranslationDelete) ExecX ¶
func (ttd *TagTranslationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TagTranslationDelete) Where ¶
func (ttd *TagTranslationDelete) Where(ps ...predicate.TagTranslation) *TagTranslationDelete
Where appends a list predicates to the TagTranslationDelete builder.
type TagTranslationDeleteOne ¶
type TagTranslationDeleteOne struct {
// contains filtered or unexported fields
}
TagTranslationDeleteOne is the builder for deleting a single TagTranslation entity.
func (*TagTranslationDeleteOne) Exec ¶
func (ttdo *TagTranslationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TagTranslationDeleteOne) ExecX ¶
func (ttdo *TagTranslationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TagTranslationEdges ¶
type TagTranslationEdges struct { // Tag holds the value of the tag edge. Tag *Tag `json:"tag,omitempty"` // contains filtered or unexported fields }
TagTranslationEdges holds the relations/edges for other nodes in the graph.
func (TagTranslationEdges) TagOrErr ¶
func (e TagTranslationEdges) TagOrErr() (*Tag, error)
TagOrErr returns the Tag value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TagTranslationGroupBy ¶
type TagTranslationGroupBy struct {
// contains filtered or unexported fields
}
TagTranslationGroupBy is the group-by builder for TagTranslation entities.
func (*TagTranslationGroupBy) Aggregate ¶
func (ttgb *TagTranslationGroupBy) Aggregate(fns ...AggregateFunc) *TagTranslationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TagTranslationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagTranslationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagTranslationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagTranslationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagTranslationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TagTranslationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagTranslationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagTranslationGroupBy) Scan ¶
func (ttgb *TagTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TagTranslationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagTranslationMutation ¶
type TagTranslationMutation struct {
// contains filtered or unexported fields
}
TagTranslationMutation represents an operation that mutates the TagTranslation nodes in the graph.
func (*TagTranslationMutation) AddField ¶
func (m *TagTranslationMutation) 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 (*TagTranslationMutation) AddedEdges ¶
func (m *TagTranslationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TagTranslationMutation) AddedField ¶
func (m *TagTranslationMutation) 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 (*TagTranslationMutation) AddedFields ¶
func (m *TagTranslationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TagTranslationMutation) AddedIDs ¶
func (m *TagTranslationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TagTranslationMutation) ClearEdge ¶
func (m *TagTranslationMutation) 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 (*TagTranslationMutation) ClearField ¶
func (m *TagTranslationMutation) 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 (*TagTranslationMutation) ClearTag ¶
func (m *TagTranslationMutation) ClearTag()
ClearTag clears the "tag" edge to the Tag entity.
func (*TagTranslationMutation) ClearedEdges ¶
func (m *TagTranslationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TagTranslationMutation) ClearedFields ¶
func (m *TagTranslationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TagTranslationMutation) Client ¶
func (m TagTranslationMutation) 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 (*TagTranslationMutation) Content ¶
func (m *TagTranslationMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*TagTranslationMutation) EdgeCleared ¶
func (m *TagTranslationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TagTranslationMutation) Field ¶
func (m *TagTranslationMutation) 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 (*TagTranslationMutation) FieldCleared ¶
func (m *TagTranslationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TagTranslationMutation) Fields ¶
func (m *TagTranslationMutation) 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 (*TagTranslationMutation) ID ¶
func (m *TagTranslationMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TagTranslationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TagTranslationMutation) Locale ¶
func (m *TagTranslationMutation) Locale() (r tagtranslation.Locale, exists bool)
Locale returns the value of the "locale" field in the mutation.
func (*TagTranslationMutation) OldContent ¶
func (m *TagTranslationMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the TagTranslation entity. If the TagTranslation 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 (*TagTranslationMutation) 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 (*TagTranslationMutation) OldLocale ¶
func (m *TagTranslationMutation) OldLocale(ctx context.Context) (v tagtranslation.Locale, err error)
OldLocale returns the old "locale" field's value of the TagTranslation entity. If the TagTranslation 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 (*TagTranslationMutation) Op ¶
func (m *TagTranslationMutation) Op() Op
Op returns the operation name.
func (*TagTranslationMutation) RemovedEdges ¶
func (m *TagTranslationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TagTranslationMutation) RemovedIDs ¶
func (m *TagTranslationMutation) 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 (*TagTranslationMutation) ResetContent ¶
func (m *TagTranslationMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*TagTranslationMutation) ResetEdge ¶
func (m *TagTranslationMutation) 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 (*TagTranslationMutation) ResetField ¶
func (m *TagTranslationMutation) 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 (*TagTranslationMutation) ResetLocale ¶
func (m *TagTranslationMutation) ResetLocale()
ResetLocale resets all changes to the "locale" field.
func (*TagTranslationMutation) ResetTag ¶
func (m *TagTranslationMutation) ResetTag()
ResetTag resets all changes to the "tag" edge.
func (*TagTranslationMutation) SetContent ¶
func (m *TagTranslationMutation) SetContent(s string)
SetContent sets the "content" field.
func (*TagTranslationMutation) SetField ¶
func (m *TagTranslationMutation) 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 (*TagTranslationMutation) SetID ¶
func (m *TagTranslationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of TagTranslation entities.
func (*TagTranslationMutation) SetLocale ¶
func (m *TagTranslationMutation) SetLocale(t tagtranslation.Locale)
SetLocale sets the "locale" field.
func (*TagTranslationMutation) SetTagID ¶
func (m *TagTranslationMutation) SetTagID(id uuid.UUID)
SetTagID sets the "tag" edge to the Tag entity by id.
func (*TagTranslationMutation) TagCleared ¶
func (m *TagTranslationMutation) TagCleared() bool
TagCleared reports if the "tag" edge to the Tag entity was cleared.
func (*TagTranslationMutation) TagID ¶
func (m *TagTranslationMutation) TagID() (id uuid.UUID, exists bool)
TagID returns the "tag" edge ID in the mutation.
func (*TagTranslationMutation) TagIDs ¶
func (m *TagTranslationMutation) TagIDs() (ids []uuid.UUID)
TagIDs returns the "tag" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TagID instead. It exists only for internal usage by the builders.
func (TagTranslationMutation) Tx ¶
func (m TagTranslationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TagTranslationMutation) Type ¶
func (m *TagTranslationMutation) Type() string
Type returns the node type of this mutation (TagTranslation).
func (*TagTranslationMutation) Where ¶
func (m *TagTranslationMutation) Where(ps ...predicate.TagTranslation)
Where appends a list predicates to the TagTranslationMutation builder.
type TagTranslationQuery ¶
type TagTranslationQuery struct {
// contains filtered or unexported fields
}
TagTranslationQuery is the builder for querying TagTranslation entities.
func (*TagTranslationQuery) All ¶
func (ttq *TagTranslationQuery) All(ctx context.Context) ([]*TagTranslation, error)
All executes the query and returns a list of TagTranslations.
func (*TagTranslationQuery) AllX ¶
func (ttq *TagTranslationQuery) AllX(ctx context.Context) []*TagTranslation
AllX is like All, but panics if an error occurs.
func (*TagTranslationQuery) Clone ¶
func (ttq *TagTranslationQuery) Clone() *TagTranslationQuery
Clone returns a duplicate of the TagTranslationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TagTranslationQuery) Count ¶
func (ttq *TagTranslationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TagTranslationQuery) CountX ¶
func (ttq *TagTranslationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TagTranslationQuery) Exist ¶
func (ttq *TagTranslationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TagTranslationQuery) ExistX ¶
func (ttq *TagTranslationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TagTranslationQuery) First ¶
func (ttq *TagTranslationQuery) First(ctx context.Context) (*TagTranslation, error)
First returns the first TagTranslation entity from the query. Returns a *NotFoundError when no TagTranslation was found.
func (*TagTranslationQuery) FirstID ¶
FirstID returns the first TagTranslation ID from the query. Returns a *NotFoundError when no TagTranslation ID was found.
func (*TagTranslationQuery) FirstIDX ¶
func (ttq *TagTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*TagTranslationQuery) FirstX ¶
func (ttq *TagTranslationQuery) FirstX(ctx context.Context) *TagTranslation
FirstX is like First, but panics if an error occurs.
func (*TagTranslationQuery) GroupBy ¶
func (ttq *TagTranslationQuery) GroupBy(field string, fields ...string) *TagTranslationGroupBy
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 { Locale tagtranslation.Locale `json:"locale,omitempty"` Count int `json:"count,omitempty"` } client.TagTranslation.Query(). GroupBy(tagtranslation.FieldLocale). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TagTranslationQuery) IDsX ¶
func (ttq *TagTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*TagTranslationQuery) Limit ¶
func (ttq *TagTranslationQuery) Limit(limit int) *TagTranslationQuery
Limit adds a limit step to the query.
func (*TagTranslationQuery) Offset ¶
func (ttq *TagTranslationQuery) Offset(offset int) *TagTranslationQuery
Offset adds an offset step to the query.
func (*TagTranslationQuery) Only ¶
func (ttq *TagTranslationQuery) Only(ctx context.Context) (*TagTranslation, error)
Only returns a single TagTranslation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TagTranslation entity is found. Returns a *NotFoundError when no TagTranslation entities are found.
func (*TagTranslationQuery) OnlyID ¶
OnlyID is like Only, but returns the only TagTranslation ID in the query. Returns a *NotSingularError when more than one TagTranslation ID is found. Returns a *NotFoundError when no entities are found.
func (*TagTranslationQuery) OnlyIDX ¶
func (ttq *TagTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TagTranslationQuery) OnlyX ¶
func (ttq *TagTranslationQuery) OnlyX(ctx context.Context) *TagTranslation
OnlyX is like Only, but panics if an error occurs.
func (*TagTranslationQuery) Order ¶
func (ttq *TagTranslationQuery) Order(o ...OrderFunc) *TagTranslationQuery
Order adds an order step to the query.
func (*TagTranslationQuery) QueryTag ¶
func (ttq *TagTranslationQuery) QueryTag() *TagQuery
QueryTag chains the current query on the "tag" edge.
func (*TagTranslationQuery) Select ¶
func (ttq *TagTranslationQuery) Select(fields ...string) *TagTranslationSelect
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 { Locale tagtranslation.Locale `json:"locale,omitempty"` } client.TagTranslation.Query(). Select(tagtranslation.FieldLocale). Scan(ctx, &v)
func (*TagTranslationQuery) Unique ¶
func (ttq *TagTranslationQuery) Unique(unique bool) *TagTranslationQuery
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 (*TagTranslationQuery) Where ¶
func (ttq *TagTranslationQuery) Where(ps ...predicate.TagTranslation) *TagTranslationQuery
Where adds a new predicate for the TagTranslationQuery builder.
func (*TagTranslationQuery) WithTag ¶
func (ttq *TagTranslationQuery) WithTag(opts ...func(*TagQuery)) *TagTranslationQuery
WithTag tells the query-builder to eager-load the nodes that are connected to the "tag" edge. The optional arguments are used to configure the query builder of the edge.
type TagTranslationSelect ¶
type TagTranslationSelect struct { *TagTranslationQuery // contains filtered or unexported fields }
TagTranslationSelect is the builder for selecting fields of TagTranslation entities.
func (*TagTranslationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagTranslationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagTranslationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagTranslationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagTranslationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagTranslationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagTranslationSelect) Scan ¶
func (tts *TagTranslationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TagTranslationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagTranslationUpdate ¶
type TagTranslationUpdate struct {
// contains filtered or unexported fields
}
TagTranslationUpdate is the builder for updating TagTranslation entities.
func (*TagTranslationUpdate) ClearTag ¶
func (ttu *TagTranslationUpdate) ClearTag() *TagTranslationUpdate
ClearTag clears the "tag" edge to the Tag entity.
func (*TagTranslationUpdate) Exec ¶
func (ttu *TagTranslationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TagTranslationUpdate) ExecX ¶
func (ttu *TagTranslationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagTranslationUpdate) Mutation ¶
func (ttu *TagTranslationUpdate) Mutation() *TagTranslationMutation
Mutation returns the TagTranslationMutation object of the builder.
func (*TagTranslationUpdate) Save ¶
func (ttu *TagTranslationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TagTranslationUpdate) SaveX ¶
func (ttu *TagTranslationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TagTranslationUpdate) SetContent ¶
func (ttu *TagTranslationUpdate) SetContent(s string) *TagTranslationUpdate
SetContent sets the "content" field.
func (*TagTranslationUpdate) SetNillableTagID ¶
func (ttu *TagTranslationUpdate) SetNillableTagID(id *uuid.UUID) *TagTranslationUpdate
SetNillableTagID sets the "tag" edge to the Tag entity by ID if the given value is not nil.
func (*TagTranslationUpdate) SetTag ¶
func (ttu *TagTranslationUpdate) SetTag(t *Tag) *TagTranslationUpdate
SetTag sets the "tag" edge to the Tag entity.
func (*TagTranslationUpdate) SetTagID ¶
func (ttu *TagTranslationUpdate) SetTagID(id uuid.UUID) *TagTranslationUpdate
SetTagID sets the "tag" edge to the Tag entity by ID.
func (*TagTranslationUpdate) Where ¶
func (ttu *TagTranslationUpdate) Where(ps ...predicate.TagTranslation) *TagTranslationUpdate
Where appends a list predicates to the TagTranslationUpdate builder.
type TagTranslationUpdateOne ¶
type TagTranslationUpdateOne struct {
// contains filtered or unexported fields
}
TagTranslationUpdateOne is the builder for updating a single TagTranslation entity.
func (*TagTranslationUpdateOne) ClearTag ¶
func (ttuo *TagTranslationUpdateOne) ClearTag() *TagTranslationUpdateOne
ClearTag clears the "tag" edge to the Tag entity.
func (*TagTranslationUpdateOne) Exec ¶
func (ttuo *TagTranslationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TagTranslationUpdateOne) ExecX ¶
func (ttuo *TagTranslationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagTranslationUpdateOne) Mutation ¶
func (ttuo *TagTranslationUpdateOne) Mutation() *TagTranslationMutation
Mutation returns the TagTranslationMutation object of the builder.
func (*TagTranslationUpdateOne) Save ¶
func (ttuo *TagTranslationUpdateOne) Save(ctx context.Context) (*TagTranslation, error)
Save executes the query and returns the updated TagTranslation entity.
func (*TagTranslationUpdateOne) SaveX ¶
func (ttuo *TagTranslationUpdateOne) SaveX(ctx context.Context) *TagTranslation
SaveX is like Save, but panics if an error occurs.
func (*TagTranslationUpdateOne) Select ¶
func (ttuo *TagTranslationUpdateOne) Select(field string, fields ...string) *TagTranslationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TagTranslationUpdateOne) SetContent ¶
func (ttuo *TagTranslationUpdateOne) SetContent(s string) *TagTranslationUpdateOne
SetContent sets the "content" field.
func (*TagTranslationUpdateOne) SetNillableTagID ¶
func (ttuo *TagTranslationUpdateOne) SetNillableTagID(id *uuid.UUID) *TagTranslationUpdateOne
SetNillableTagID sets the "tag" edge to the Tag entity by ID if the given value is not nil.
func (*TagTranslationUpdateOne) SetTag ¶
func (ttuo *TagTranslationUpdateOne) SetTag(t *Tag) *TagTranslationUpdateOne
SetTag sets the "tag" edge to the Tag entity.
func (*TagTranslationUpdateOne) SetTagID ¶
func (ttuo *TagTranslationUpdateOne) SetTagID(id uuid.UUID) *TagTranslationUpdateOne
SetTagID sets the "tag" edge to the Tag entity by ID.
type TagTranslations ¶
type TagTranslations []*TagTranslation
TagTranslations is a parsable slice of TagTranslation.
type TagUpdate ¶
type TagUpdate struct {
// contains filtered or unexported fields
}
TagUpdate is the builder for updating Tag entities.
func (*TagUpdate) AddTestIDs ¶
AddTestIDs adds the "test" edge to the Test entity by IDs.
func (*TagUpdate) AddTranslationIDs ¶
AddTranslationIDs adds the "translations" edge to the TagTranslation entity by IDs.
func (*TagUpdate) AddTranslations ¶
func (tu *TagUpdate) AddTranslations(t ...*TagTranslation) *TagUpdate
AddTranslations adds the "translations" edges to the TagTranslation entity.
func (*TagUpdate) ClearTranslations ¶
ClearTranslations clears all "translations" edges to the TagTranslation entity.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) RemoveTest ¶
RemoveTest removes "test" edges to Test entities.
func (*TagUpdate) RemoveTestIDs ¶
RemoveTestIDs removes the "test" edge to Test entities by IDs.
func (*TagUpdate) RemoveTranslationIDs ¶
RemoveTranslationIDs removes the "translations" edge to TagTranslation entities by IDs.
func (*TagUpdate) RemoveTranslations ¶
func (tu *TagUpdate) RemoveTranslations(t ...*TagTranslation) *TagUpdate
RemoveTranslations removes "translations" edges to TagTranslation entities.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*TagUpdate) SetNillableType ¶
SetNillableType sets the "type" field if the given value is not nil.
func (*TagUpdate) SetUpdateTime ¶
SetUpdateTime sets the "update_time" field.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddTest ¶
func (tuo *TagUpdateOne) AddTest(t ...*Test) *TagUpdateOne
AddTest adds the "test" edges to the Test entity.
func (*TagUpdateOne) AddTestIDs ¶
func (tuo *TagUpdateOne) AddTestIDs(ids ...uuid.UUID) *TagUpdateOne
AddTestIDs adds the "test" edge to the Test entity by IDs.
func (*TagUpdateOne) AddTranslationIDs ¶
func (tuo *TagUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *TagUpdateOne
AddTranslationIDs adds the "translations" edge to the TagTranslation entity by IDs.
func (*TagUpdateOne) AddTranslations ¶
func (tuo *TagUpdateOne) AddTranslations(t ...*TagTranslation) *TagUpdateOne
AddTranslations adds the "translations" edges to the TagTranslation entity.
func (*TagUpdateOne) ClearTest ¶
func (tuo *TagUpdateOne) ClearTest() *TagUpdateOne
ClearTest clears all "test" edges to the Test entity.
func (*TagUpdateOne) ClearTranslations ¶
func (tuo *TagUpdateOne) ClearTranslations() *TagUpdateOne
ClearTranslations clears all "translations" edges to the TagTranslation entity.
func (*TagUpdateOne) Exec ¶
func (tuo *TagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TagUpdateOne) ExecX ¶
func (tuo *TagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpdateOne) Mutation ¶
func (tuo *TagUpdateOne) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdateOne) RemoveTest ¶
func (tuo *TagUpdateOne) RemoveTest(t ...*Test) *TagUpdateOne
RemoveTest removes "test" edges to Test entities.
func (*TagUpdateOne) RemoveTestIDs ¶
func (tuo *TagUpdateOne) RemoveTestIDs(ids ...uuid.UUID) *TagUpdateOne
RemoveTestIDs removes the "test" edge to Test entities by IDs.
func (*TagUpdateOne) RemoveTranslationIDs ¶
func (tuo *TagUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *TagUpdateOne
RemoveTranslationIDs removes the "translations" edge to TagTranslation entities by IDs.
func (*TagUpdateOne) RemoveTranslations ¶
func (tuo *TagUpdateOne) RemoveTranslations(t ...*TagTranslation) *TagUpdateOne
RemoveTranslations removes "translations" edges to TagTranslation entities.
func (*TagUpdateOne) Save ¶
func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
Save executes the query and returns the updated Tag entity.
func (*TagUpdateOne) SaveX ¶
func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
SaveX is like Save, but panics if an error occurs.
func (*TagUpdateOne) Select ¶
func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TagUpdateOne) SetNillableType ¶
func (tuo *TagUpdateOne) SetNillableType(t *tag.Type) *TagUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*TagUpdateOne) SetType ¶
func (tuo *TagUpdateOne) SetType(t tag.Type) *TagUpdateOne
SetType sets the "type" field.
func (*TagUpdateOne) SetUpdateTime ¶
func (tuo *TagUpdateOne) SetUpdateTime(t time.Time) *TagUpdateOne
SetUpdateTime sets the "update_time" field.
type Take ¶
type Take struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Seed holds the value of the "seed" field. Seed int64 `json:"seed,omitempty"` // Progress holds the value of the "progress" field. Progress int `json:"progress,omitempty"` // Page holds the value of the "page" field. Page int `json:"page,omitempty"` // StartTime holds the value of the "start_time" field. StartTime *time.Time `json:"start_time,omitempty"` // EndTime holds the value of the "end_time" field. EndTime *time.Time `json:"end_time,omitempty"` // Suspicious holds the value of the "suspicious" field. Suspicious bool `json:"suspicious,omitempty"` // Status holds the value of the "status" field. Status take.Status `json:"status,omitempty"` // Mark holds the value of the "mark" field. Mark *int `json:"mark,omitempty"` // InLocale holds the value of the "in_locale" field. InLocale take.InLocale `json:"in_locale,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TakeQuery when eager-loading is set. Edges TakeEdges `json:"edges"` // contains filtered or unexported fields }
Take is the model entity for the Take schema.
func (*Take) QueryResponses ¶
func (t *Take) QueryResponses() *ResponseQuery
QueryResponses queries the "responses" edge of the Take entity.
func (*Take) QueryResults ¶
func (t *Take) QueryResults() *ResultQuery
QueryResults queries the "results" edge of the Take entity.
func (*Take) Unwrap ¶
Unwrap unwraps the Take 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 (*Take) Update ¶
func (t *Take) Update() *TakeUpdateOne
Update returns a builder for updating this Take. Note that you need to call Take.Unwrap() before calling this method if this Take was returned from a transaction, and the transaction was committed or rolled back.
type TakeClient ¶
type TakeClient struct {
// contains filtered or unexported fields
}
TakeClient is a client for the Take schema.
func NewTakeClient ¶
func NewTakeClient(c config) *TakeClient
NewTakeClient returns a client for the Take from the given config.
func (*TakeClient) Create ¶
func (c *TakeClient) Create() *TakeCreate
Create returns a builder for creating a Take entity.
func (*TakeClient) CreateBulk ¶
func (c *TakeClient) CreateBulk(builders ...*TakeCreate) *TakeCreateBulk
CreateBulk returns a builder for creating a bulk of Take entities.
func (*TakeClient) Delete ¶
func (c *TakeClient) Delete() *TakeDelete
Delete returns a delete builder for Take.
func (*TakeClient) DeleteOne ¶
func (c *TakeClient) DeleteOne(t *Take) *TakeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TakeClient) DeleteOneID ¶
func (c *TakeClient) DeleteOneID(id uuid.UUID) *TakeDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*TakeClient) Query ¶
func (c *TakeClient) Query() *TakeQuery
Query returns a query builder for Take.
func (*TakeClient) QueryResponses ¶
func (c *TakeClient) QueryResponses(t *Take) *ResponseQuery
QueryResponses queries the responses edge of a Take.
func (*TakeClient) QueryResults ¶
func (c *TakeClient) QueryResults(t *Take) *ResultQuery
QueryResults queries the results edge of a Take.
func (*TakeClient) QueryTest ¶
func (c *TakeClient) QueryTest(t *Take) *TestQuery
QueryTest queries the test edge of a Take.
func (*TakeClient) QueryUser ¶
func (c *TakeClient) QueryUser(t *Take) *UserQuery
QueryUser queries the user edge of a Take.
func (*TakeClient) Update ¶
func (c *TakeClient) Update() *TakeUpdate
Update returns an update builder for Take.
func (*TakeClient) UpdateOne ¶
func (c *TakeClient) UpdateOne(t *Take) *TakeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TakeClient) UpdateOneID ¶
func (c *TakeClient) UpdateOneID(id uuid.UUID) *TakeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TakeClient) Use ¶
func (c *TakeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `take.Hooks(f(g(h())))`.
type TakeCreate ¶
type TakeCreate struct {
// contains filtered or unexported fields
}
TakeCreate is the builder for creating a Take entity.
func (*TakeCreate) AddResponseIDs ¶
func (tc *TakeCreate) AddResponseIDs(ids ...uuid.UUID) *TakeCreate
AddResponseIDs adds the "responses" edge to the Response entity by IDs.
func (*TakeCreate) AddResponses ¶
func (tc *TakeCreate) AddResponses(r ...*Response) *TakeCreate
AddResponses adds the "responses" edges to the Response entity.
func (*TakeCreate) AddResultIDs ¶
func (tc *TakeCreate) AddResultIDs(ids ...uuid.UUID) *TakeCreate
AddResultIDs adds the "results" edge to the Result entity by IDs.
func (*TakeCreate) AddResults ¶
func (tc *TakeCreate) AddResults(r ...*Result) *TakeCreate
AddResults adds the "results" edges to the Result entity.
func (*TakeCreate) Exec ¶
func (tc *TakeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TakeCreate) ExecX ¶
func (tc *TakeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TakeCreate) Mutation ¶
func (tc *TakeCreate) Mutation() *TakeMutation
Mutation returns the TakeMutation object of the builder.
func (*TakeCreate) Save ¶
func (tc *TakeCreate) Save(ctx context.Context) (*Take, error)
Save creates the Take in the database.
func (*TakeCreate) SaveX ¶
func (tc *TakeCreate) SaveX(ctx context.Context) *Take
SaveX calls Save and panics if Save returns an error.
func (*TakeCreate) SetCreateTime ¶
func (tc *TakeCreate) SetCreateTime(t time.Time) *TakeCreate
SetCreateTime sets the "create_time" field.
func (*TakeCreate) SetEndTime ¶
func (tc *TakeCreate) SetEndTime(t time.Time) *TakeCreate
SetEndTime sets the "end_time" field.
func (*TakeCreate) SetID ¶
func (tc *TakeCreate) SetID(u uuid.UUID) *TakeCreate
SetID sets the "id" field.
func (*TakeCreate) SetInLocale ¶
func (tc *TakeCreate) SetInLocale(tl take.InLocale) *TakeCreate
SetInLocale sets the "in_locale" field.
func (*TakeCreate) SetMark ¶
func (tc *TakeCreate) SetMark(i int) *TakeCreate
SetMark sets the "mark" field.
func (*TakeCreate) SetMeta ¶
func (tc *TakeCreate) SetMeta(m map[string]interface{}) *TakeCreate
SetMeta sets the "meta" field.
func (*TakeCreate) SetNillableCreateTime ¶
func (tc *TakeCreate) SetNillableCreateTime(t *time.Time) *TakeCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*TakeCreate) SetNillableEndTime ¶
func (tc *TakeCreate) SetNillableEndTime(t *time.Time) *TakeCreate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*TakeCreate) SetNillableID ¶
func (tc *TakeCreate) SetNillableID(u *uuid.UUID) *TakeCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TakeCreate) SetNillableInLocale ¶
func (tc *TakeCreate) SetNillableInLocale(tl *take.InLocale) *TakeCreate
SetNillableInLocale sets the "in_locale" field if the given value is not nil.
func (*TakeCreate) SetNillableMark ¶
func (tc *TakeCreate) SetNillableMark(i *int) *TakeCreate
SetNillableMark sets the "mark" field if the given value is not nil.
func (*TakeCreate) SetNillablePage ¶
func (tc *TakeCreate) SetNillablePage(i *int) *TakeCreate
SetNillablePage sets the "page" field if the given value is not nil.
func (*TakeCreate) SetNillableProgress ¶
func (tc *TakeCreate) SetNillableProgress(i *int) *TakeCreate
SetNillableProgress sets the "progress" field if the given value is not nil.
func (*TakeCreate) SetNillableStartTime ¶
func (tc *TakeCreate) SetNillableStartTime(t *time.Time) *TakeCreate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*TakeCreate) SetNillableStatus ¶
func (tc *TakeCreate) SetNillableStatus(t *take.Status) *TakeCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TakeCreate) SetNillableSuspicious ¶
func (tc *TakeCreate) SetNillableSuspicious(b *bool) *TakeCreate
SetNillableSuspicious sets the "suspicious" field if the given value is not nil.
func (*TakeCreate) SetNillableUpdateTime ¶
func (tc *TakeCreate) SetNillableUpdateTime(t *time.Time) *TakeCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*TakeCreate) SetPage ¶
func (tc *TakeCreate) SetPage(i int) *TakeCreate
SetPage sets the "page" field.
func (*TakeCreate) SetProgress ¶
func (tc *TakeCreate) SetProgress(i int) *TakeCreate
SetProgress sets the "progress" field.
func (*TakeCreate) SetSeed ¶
func (tc *TakeCreate) SetSeed(i int64) *TakeCreate
SetSeed sets the "seed" field.
func (*TakeCreate) SetStartTime ¶
func (tc *TakeCreate) SetStartTime(t time.Time) *TakeCreate
SetStartTime sets the "start_time" field.
func (*TakeCreate) SetStatus ¶
func (tc *TakeCreate) SetStatus(t take.Status) *TakeCreate
SetStatus sets the "status" field.
func (*TakeCreate) SetSuspicious ¶
func (tc *TakeCreate) SetSuspicious(b bool) *TakeCreate
SetSuspicious sets the "suspicious" field.
func (*TakeCreate) SetTest ¶
func (tc *TakeCreate) SetTest(t *Test) *TakeCreate
SetTest sets the "test" edge to the Test entity.
func (*TakeCreate) SetTestID ¶
func (tc *TakeCreate) SetTestID(id uuid.UUID) *TakeCreate
SetTestID sets the "test" edge to the Test entity by ID.
func (*TakeCreate) SetUpdateTime ¶
func (tc *TakeCreate) SetUpdateTime(t time.Time) *TakeCreate
SetUpdateTime sets the "update_time" field.
func (*TakeCreate) SetUser ¶
func (tc *TakeCreate) SetUser(u *User) *TakeCreate
SetUser sets the "user" edge to the User entity.
func (*TakeCreate) SetUserID ¶
func (tc *TakeCreate) SetUserID(id uuid.UUID) *TakeCreate
SetUserID sets the "user" edge to the User entity by ID.
type TakeCreateBulk ¶
type TakeCreateBulk struct {
// contains filtered or unexported fields
}
TakeCreateBulk is the builder for creating many Take entities in bulk.
func (*TakeCreateBulk) Exec ¶
func (tcb *TakeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TakeCreateBulk) ExecX ¶
func (tcb *TakeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TakeDelete ¶
type TakeDelete struct {
// contains filtered or unexported fields
}
TakeDelete is the builder for deleting a Take entity.
func (*TakeDelete) Exec ¶
func (td *TakeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TakeDelete) ExecX ¶
func (td *TakeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TakeDelete) Where ¶
func (td *TakeDelete) Where(ps ...predicate.Take) *TakeDelete
Where appends a list predicates to the TakeDelete builder.
type TakeDeleteOne ¶
type TakeDeleteOne struct {
// contains filtered or unexported fields
}
TakeDeleteOne is the builder for deleting a single Take entity.
func (*TakeDeleteOne) Exec ¶
func (tdo *TakeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TakeDeleteOne) ExecX ¶
func (tdo *TakeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TakeEdges ¶
type TakeEdges struct { // Responses holds the value of the responses edge. Responses []*Response `json:"responses,omitempty"` // Results holds the value of the results edge. Results []*Result `json:"results,omitempty"` // Test holds the value of the test edge. Test *Test `json:"test,omitempty"` // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
TakeEdges holds the relations/edges for other nodes in the graph.
func (TakeEdges) ResponsesOrErr ¶
ResponsesOrErr returns the Responses value or an error if the edge was not loaded in eager-loading.
func (TakeEdges) ResultsOrErr ¶
ResultsOrErr returns the Results value or an error if the edge was not loaded in eager-loading.
type TakeGroupBy ¶
type TakeGroupBy struct {
// contains filtered or unexported fields
}
TakeGroupBy is the group-by builder for Take entities.
func (*TakeGroupBy) Aggregate ¶
func (tgb *TakeGroupBy) Aggregate(fns ...AggregateFunc) *TakeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TakeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TakeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TakeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TakeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TakeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TakeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TakeGroupBy) Scan ¶
func (tgb *TakeGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TakeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TakeMutation ¶
type TakeMutation struct {
// contains filtered or unexported fields
}
TakeMutation represents an operation that mutates the Take nodes in the graph.
func (*TakeMutation) AddField ¶
func (m *TakeMutation) 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 (*TakeMutation) AddMark ¶
func (m *TakeMutation) AddMark(i int)
AddMark adds i to the "mark" field.
func (*TakeMutation) AddPage ¶
func (m *TakeMutation) AddPage(i int)
AddPage adds i to the "page" field.
func (*TakeMutation) AddProgress ¶
func (m *TakeMutation) AddProgress(i int)
AddProgress adds i to the "progress" field.
func (*TakeMutation) AddResponseIDs ¶
func (m *TakeMutation) AddResponseIDs(ids ...uuid.UUID)
AddResponseIDs adds the "responses" edge to the Response entity by ids.
func (*TakeMutation) AddResultIDs ¶
func (m *TakeMutation) AddResultIDs(ids ...uuid.UUID)
AddResultIDs adds the "results" edge to the Result entity by ids.
func (*TakeMutation) AddSeed ¶
func (m *TakeMutation) AddSeed(i int64)
AddSeed adds i to the "seed" field.
func (*TakeMutation) AddedEdges ¶
func (m *TakeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TakeMutation) AddedField ¶
func (m *TakeMutation) 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 (*TakeMutation) AddedFields ¶
func (m *TakeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TakeMutation) AddedIDs ¶
func (m *TakeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TakeMutation) AddedMark ¶
func (m *TakeMutation) AddedMark() (r int, exists bool)
AddedMark returns the value that was added to the "mark" field in this mutation.
func (*TakeMutation) AddedPage ¶
func (m *TakeMutation) AddedPage() (r int, exists bool)
AddedPage returns the value that was added to the "page" field in this mutation.
func (*TakeMutation) AddedProgress ¶
func (m *TakeMutation) AddedProgress() (r int, exists bool)
AddedProgress returns the value that was added to the "progress" field in this mutation.
func (*TakeMutation) AddedSeed ¶
func (m *TakeMutation) AddedSeed() (r int64, exists bool)
AddedSeed returns the value that was added to the "seed" field in this mutation.
func (*TakeMutation) ClearEdge ¶
func (m *TakeMutation) 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 (*TakeMutation) ClearEndTime ¶
func (m *TakeMutation) ClearEndTime()
ClearEndTime clears the value of the "end_time" field.
func (*TakeMutation) ClearField ¶
func (m *TakeMutation) 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 (*TakeMutation) ClearMark ¶
func (m *TakeMutation) ClearMark()
ClearMark clears the value of the "mark" field.
func (*TakeMutation) ClearMeta ¶
func (m *TakeMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*TakeMutation) ClearResponses ¶
func (m *TakeMutation) ClearResponses()
ClearResponses clears the "responses" edge to the Response entity.
func (*TakeMutation) ClearResults ¶
func (m *TakeMutation) ClearResults()
ClearResults clears the "results" edge to the Result entity.
func (*TakeMutation) ClearStartTime ¶
func (m *TakeMutation) ClearStartTime()
ClearStartTime clears the value of the "start_time" field.
func (*TakeMutation) ClearTest ¶
func (m *TakeMutation) ClearTest()
ClearTest clears the "test" edge to the Test entity.
func (*TakeMutation) ClearUser ¶
func (m *TakeMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*TakeMutation) ClearedEdges ¶
func (m *TakeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TakeMutation) ClearedFields ¶
func (m *TakeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TakeMutation) Client ¶
func (m TakeMutation) 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 (*TakeMutation) CreateTime ¶
func (m *TakeMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*TakeMutation) EdgeCleared ¶
func (m *TakeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TakeMutation) EndTime ¶
func (m *TakeMutation) EndTime() (r time.Time, exists bool)
EndTime returns the value of the "end_time" field in the mutation.
func (*TakeMutation) EndTimeCleared ¶
func (m *TakeMutation) EndTimeCleared() bool
EndTimeCleared returns if the "end_time" field was cleared in this mutation.
func (*TakeMutation) Field ¶
func (m *TakeMutation) 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 (*TakeMutation) FieldCleared ¶
func (m *TakeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TakeMutation) Fields ¶
func (m *TakeMutation) 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 (*TakeMutation) ID ¶
func (m *TakeMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TakeMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TakeMutation) InLocale ¶
func (m *TakeMutation) InLocale() (r take.InLocale, exists bool)
InLocale returns the value of the "in_locale" field in the mutation.
func (*TakeMutation) Mark ¶
func (m *TakeMutation) Mark() (r int, exists bool)
Mark returns the value of the "mark" field in the mutation.
func (*TakeMutation) MarkCleared ¶
func (m *TakeMutation) MarkCleared() bool
MarkCleared returns if the "mark" field was cleared in this mutation.
func (*TakeMutation) Meta ¶
func (m *TakeMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*TakeMutation) MetaCleared ¶
func (m *TakeMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*TakeMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Take entity. If the Take 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 (*TakeMutation) OldEndTime ¶
OldEndTime returns the old "end_time" field's value of the Take entity. If the Take 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 (*TakeMutation) 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 (*TakeMutation) OldInLocale ¶
OldInLocale returns the old "in_locale" field's value of the Take entity. If the Take 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 (*TakeMutation) OldMark ¶
func (m *TakeMutation) OldMark(ctx context.Context) (v *int, err error)
OldMark returns the old "mark" field's value of the Take entity. If the Take 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 (*TakeMutation) OldMeta ¶
func (m *TakeMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the Take entity. If the Take 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 (*TakeMutation) OldPage ¶
func (m *TakeMutation) OldPage(ctx context.Context) (v int, err error)
OldPage returns the old "page" field's value of the Take entity. If the Take 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 (*TakeMutation) OldProgress ¶
func (m *TakeMutation) OldProgress(ctx context.Context) (v int, err error)
OldProgress returns the old "progress" field's value of the Take entity. If the Take 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 (*TakeMutation) OldSeed ¶
func (m *TakeMutation) OldSeed(ctx context.Context) (v int64, err error)
OldSeed returns the old "seed" field's value of the Take entity. If the Take 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 (*TakeMutation) OldStartTime ¶
OldStartTime returns the old "start_time" field's value of the Take entity. If the Take 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 (*TakeMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Take entity. If the Take 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 (*TakeMutation) OldSuspicious ¶
func (m *TakeMutation) OldSuspicious(ctx context.Context) (v bool, err error)
OldSuspicious returns the old "suspicious" field's value of the Take entity. If the Take 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 (*TakeMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Take entity. If the Take 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 (*TakeMutation) Page ¶
func (m *TakeMutation) Page() (r int, exists bool)
Page returns the value of the "page" field in the mutation.
func (*TakeMutation) Progress ¶
func (m *TakeMutation) Progress() (r int, exists bool)
Progress returns the value of the "progress" field in the mutation.
func (*TakeMutation) RemoveResponseIDs ¶
func (m *TakeMutation) RemoveResponseIDs(ids ...uuid.UUID)
RemoveResponseIDs removes the "responses" edge to the Response entity by IDs.
func (*TakeMutation) RemoveResultIDs ¶
func (m *TakeMutation) RemoveResultIDs(ids ...uuid.UUID)
RemoveResultIDs removes the "results" edge to the Result entity by IDs.
func (*TakeMutation) RemovedEdges ¶
func (m *TakeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TakeMutation) RemovedIDs ¶
func (m *TakeMutation) 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 (*TakeMutation) RemovedResponsesIDs ¶
func (m *TakeMutation) RemovedResponsesIDs() (ids []uuid.UUID)
RemovedResponses returns the removed IDs of the "responses" edge to the Response entity.
func (*TakeMutation) RemovedResultsIDs ¶
func (m *TakeMutation) RemovedResultsIDs() (ids []uuid.UUID)
RemovedResults returns the removed IDs of the "results" edge to the Result entity.
func (*TakeMutation) ResetCreateTime ¶
func (m *TakeMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*TakeMutation) ResetEdge ¶
func (m *TakeMutation) 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 (*TakeMutation) ResetEndTime ¶
func (m *TakeMutation) ResetEndTime()
ResetEndTime resets all changes to the "end_time" field.
func (*TakeMutation) ResetField ¶
func (m *TakeMutation) 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 (*TakeMutation) ResetInLocale ¶
func (m *TakeMutation) ResetInLocale()
ResetInLocale resets all changes to the "in_locale" field.
func (*TakeMutation) ResetMark ¶
func (m *TakeMutation) ResetMark()
ResetMark resets all changes to the "mark" field.
func (*TakeMutation) ResetMeta ¶
func (m *TakeMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*TakeMutation) ResetPage ¶
func (m *TakeMutation) ResetPage()
ResetPage resets all changes to the "page" field.
func (*TakeMutation) ResetProgress ¶
func (m *TakeMutation) ResetProgress()
ResetProgress resets all changes to the "progress" field.
func (*TakeMutation) ResetResponses ¶
func (m *TakeMutation) ResetResponses()
ResetResponses resets all changes to the "responses" edge.
func (*TakeMutation) ResetResults ¶
func (m *TakeMutation) ResetResults()
ResetResults resets all changes to the "results" edge.
func (*TakeMutation) ResetSeed ¶
func (m *TakeMutation) ResetSeed()
ResetSeed resets all changes to the "seed" field.
func (*TakeMutation) ResetStartTime ¶
func (m *TakeMutation) ResetStartTime()
ResetStartTime resets all changes to the "start_time" field.
func (*TakeMutation) ResetStatus ¶
func (m *TakeMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*TakeMutation) ResetSuspicious ¶
func (m *TakeMutation) ResetSuspicious()
ResetSuspicious resets all changes to the "suspicious" field.
func (*TakeMutation) ResetTest ¶
func (m *TakeMutation) ResetTest()
ResetTest resets all changes to the "test" edge.
func (*TakeMutation) ResetUpdateTime ¶
func (m *TakeMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*TakeMutation) ResetUser ¶
func (m *TakeMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*TakeMutation) ResponsesCleared ¶
func (m *TakeMutation) ResponsesCleared() bool
ResponsesCleared reports if the "responses" edge to the Response entity was cleared.
func (*TakeMutation) ResponsesIDs ¶
func (m *TakeMutation) ResponsesIDs() (ids []uuid.UUID)
ResponsesIDs returns the "responses" edge IDs in the mutation.
func (*TakeMutation) ResultsCleared ¶
func (m *TakeMutation) ResultsCleared() bool
ResultsCleared reports if the "results" edge to the Result entity was cleared.
func (*TakeMutation) ResultsIDs ¶
func (m *TakeMutation) ResultsIDs() (ids []uuid.UUID)
ResultsIDs returns the "results" edge IDs in the mutation.
func (*TakeMutation) Seed ¶
func (m *TakeMutation) Seed() (r int64, exists bool)
Seed returns the value of the "seed" field in the mutation.
func (*TakeMutation) SetCreateTime ¶
func (m *TakeMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*TakeMutation) SetEndTime ¶
func (m *TakeMutation) SetEndTime(t time.Time)
SetEndTime sets the "end_time" field.
func (*TakeMutation) SetField ¶
func (m *TakeMutation) 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 (*TakeMutation) SetID ¶
func (m *TakeMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Take entities.
func (*TakeMutation) SetInLocale ¶
func (m *TakeMutation) SetInLocale(tl take.InLocale)
SetInLocale sets the "in_locale" field.
func (*TakeMutation) SetMeta ¶
func (m *TakeMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*TakeMutation) SetProgress ¶
func (m *TakeMutation) SetProgress(i int)
SetProgress sets the "progress" field.
func (*TakeMutation) SetSeed ¶
func (m *TakeMutation) SetSeed(i int64)
SetSeed sets the "seed" field.
func (*TakeMutation) SetStartTime ¶
func (m *TakeMutation) SetStartTime(t time.Time)
SetStartTime sets the "start_time" field.
func (*TakeMutation) SetStatus ¶
func (m *TakeMutation) SetStatus(t take.Status)
SetStatus sets the "status" field.
func (*TakeMutation) SetSuspicious ¶
func (m *TakeMutation) SetSuspicious(b bool)
SetSuspicious sets the "suspicious" field.
func (*TakeMutation) SetTestID ¶
func (m *TakeMutation) SetTestID(id uuid.UUID)
SetTestID sets the "test" edge to the Test entity by id.
func (*TakeMutation) SetUpdateTime ¶
func (m *TakeMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*TakeMutation) SetUserID ¶
func (m *TakeMutation) SetUserID(id uuid.UUID)
SetUserID sets the "user" edge to the User entity by id.
func (*TakeMutation) StartTime ¶
func (m *TakeMutation) StartTime() (r time.Time, exists bool)
StartTime returns the value of the "start_time" field in the mutation.
func (*TakeMutation) StartTimeCleared ¶
func (m *TakeMutation) StartTimeCleared() bool
StartTimeCleared returns if the "start_time" field was cleared in this mutation.
func (*TakeMutation) Status ¶
func (m *TakeMutation) Status() (r take.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*TakeMutation) Suspicious ¶
func (m *TakeMutation) Suspicious() (r bool, exists bool)
Suspicious returns the value of the "suspicious" field in the mutation.
func (*TakeMutation) TestCleared ¶
func (m *TakeMutation) TestCleared() bool
TestCleared reports if the "test" edge to the Test entity was cleared.
func (*TakeMutation) TestID ¶
func (m *TakeMutation) TestID() (id uuid.UUID, exists bool)
TestID returns the "test" edge ID in the mutation.
func (*TakeMutation) TestIDs ¶
func (m *TakeMutation) TestIDs() (ids []uuid.UUID)
TestIDs returns the "test" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TestID instead. It exists only for internal usage by the builders.
func (TakeMutation) Tx ¶
func (m TakeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TakeMutation) Type ¶
func (m *TakeMutation) Type() string
Type returns the node type of this mutation (Take).
func (*TakeMutation) UpdateTime ¶
func (m *TakeMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*TakeMutation) UserCleared ¶
func (m *TakeMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*TakeMutation) UserID ¶
func (m *TakeMutation) UserID() (id uuid.UUID, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*TakeMutation) UserIDs ¶
func (m *TakeMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*TakeMutation) Where ¶
func (m *TakeMutation) Where(ps ...predicate.Take)
Where appends a list predicates to the TakeMutation builder.
type TakeQuery ¶
type TakeQuery struct {
// contains filtered or unexported fields
}
TakeQuery is the builder for querying Take entities.
func (*TakeQuery) Clone ¶
Clone returns a duplicate of the TakeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TakeQuery) First ¶
First returns the first Take entity from the query. Returns a *NotFoundError when no Take was found.
func (*TakeQuery) FirstID ¶
FirstID returns the first Take ID from the query. Returns a *NotFoundError when no Take ID was found.
func (*TakeQuery) GroupBy ¶
func (tq *TakeQuery) GroupBy(field string, fields ...string) *TakeGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Take.Query(). GroupBy(take.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TakeQuery) Only ¶
Only returns a single Take entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Take entity is found. Returns a *NotFoundError when no Take entities are found.
func (*TakeQuery) OnlyID ¶
OnlyID is like Only, but returns the only Take ID in the query. Returns a *NotSingularError when more than one Take ID is found. Returns a *NotFoundError when no entities are found.
func (*TakeQuery) QueryResponses ¶
func (tq *TakeQuery) QueryResponses() *ResponseQuery
QueryResponses chains the current query on the "responses" edge.
func (*TakeQuery) QueryResults ¶
func (tq *TakeQuery) QueryResults() *ResultQuery
QueryResults chains the current query on the "results" edge.
func (*TakeQuery) Select ¶
func (tq *TakeQuery) Select(fields ...string) *TakeSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Take.Query(). Select(take.FieldCreateTime). Scan(ctx, &v)
func (*TakeQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*TakeQuery) WithResponses ¶
func (tq *TakeQuery) WithResponses(opts ...func(*ResponseQuery)) *TakeQuery
WithResponses tells the query-builder to eager-load the nodes that are connected to the "responses" edge. The optional arguments are used to configure the query builder of the edge.
func (*TakeQuery) WithResults ¶
func (tq *TakeQuery) WithResults(opts ...func(*ResultQuery)) *TakeQuery
WithResults tells the query-builder to eager-load the nodes that are connected to the "results" edge. The optional arguments are used to configure the query builder of the edge.
type TakeSelect ¶
type TakeSelect struct { *TakeQuery // contains filtered or unexported fields }
TakeSelect is the builder for selecting fields of Take entities.
func (*TakeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TakeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TakeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TakeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TakeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TakeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TakeSelect) Scan ¶
func (ts *TakeSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TakeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TakeUpdate ¶
type TakeUpdate struct {
// contains filtered or unexported fields
}
TakeUpdate is the builder for updating Take entities.
func (*TakeUpdate) AddMark ¶
func (tu *TakeUpdate) AddMark(i int) *TakeUpdate
AddMark adds i to the "mark" field.
func (*TakeUpdate) AddPage ¶
func (tu *TakeUpdate) AddPage(i int) *TakeUpdate
AddPage adds i to the "page" field.
func (*TakeUpdate) AddProgress ¶
func (tu *TakeUpdate) AddProgress(i int) *TakeUpdate
AddProgress adds i to the "progress" field.
func (*TakeUpdate) AddResponseIDs ¶
func (tu *TakeUpdate) AddResponseIDs(ids ...uuid.UUID) *TakeUpdate
AddResponseIDs adds the "responses" edge to the Response entity by IDs.
func (*TakeUpdate) AddResponses ¶
func (tu *TakeUpdate) AddResponses(r ...*Response) *TakeUpdate
AddResponses adds the "responses" edges to the Response entity.
func (*TakeUpdate) AddResultIDs ¶
func (tu *TakeUpdate) AddResultIDs(ids ...uuid.UUID) *TakeUpdate
AddResultIDs adds the "results" edge to the Result entity by IDs.
func (*TakeUpdate) AddResults ¶
func (tu *TakeUpdate) AddResults(r ...*Result) *TakeUpdate
AddResults adds the "results" edges to the Result entity.
func (*TakeUpdate) ClearEndTime ¶
func (tu *TakeUpdate) ClearEndTime() *TakeUpdate
ClearEndTime clears the value of the "end_time" field.
func (*TakeUpdate) ClearMark ¶
func (tu *TakeUpdate) ClearMark() *TakeUpdate
ClearMark clears the value of the "mark" field.
func (*TakeUpdate) ClearMeta ¶
func (tu *TakeUpdate) ClearMeta() *TakeUpdate
ClearMeta clears the value of the "meta" field.
func (*TakeUpdate) ClearResponses ¶
func (tu *TakeUpdate) ClearResponses() *TakeUpdate
ClearResponses clears all "responses" edges to the Response entity.
func (*TakeUpdate) ClearResults ¶
func (tu *TakeUpdate) ClearResults() *TakeUpdate
ClearResults clears all "results" edges to the Result entity.
func (*TakeUpdate) ClearStartTime ¶
func (tu *TakeUpdate) ClearStartTime() *TakeUpdate
ClearStartTime clears the value of the "start_time" field.
func (*TakeUpdate) ClearTest ¶
func (tu *TakeUpdate) ClearTest() *TakeUpdate
ClearTest clears the "test" edge to the Test entity.
func (*TakeUpdate) ClearUser ¶
func (tu *TakeUpdate) ClearUser() *TakeUpdate
ClearUser clears the "user" edge to the User entity.
func (*TakeUpdate) Exec ¶
func (tu *TakeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TakeUpdate) ExecX ¶
func (tu *TakeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TakeUpdate) Mutation ¶
func (tu *TakeUpdate) Mutation() *TakeMutation
Mutation returns the TakeMutation object of the builder.
func (*TakeUpdate) RemoveResponseIDs ¶
func (tu *TakeUpdate) RemoveResponseIDs(ids ...uuid.UUID) *TakeUpdate
RemoveResponseIDs removes the "responses" edge to Response entities by IDs.
func (*TakeUpdate) RemoveResponses ¶
func (tu *TakeUpdate) RemoveResponses(r ...*Response) *TakeUpdate
RemoveResponses removes "responses" edges to Response entities.
func (*TakeUpdate) RemoveResultIDs ¶
func (tu *TakeUpdate) RemoveResultIDs(ids ...uuid.UUID) *TakeUpdate
RemoveResultIDs removes the "results" edge to Result entities by IDs.
func (*TakeUpdate) RemoveResults ¶
func (tu *TakeUpdate) RemoveResults(r ...*Result) *TakeUpdate
RemoveResults removes "results" edges to Result entities.
func (*TakeUpdate) Save ¶
func (tu *TakeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TakeUpdate) SaveX ¶
func (tu *TakeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TakeUpdate) SetEndTime ¶
func (tu *TakeUpdate) SetEndTime(t time.Time) *TakeUpdate
SetEndTime sets the "end_time" field.
func (*TakeUpdate) SetInLocale ¶
func (tu *TakeUpdate) SetInLocale(tl take.InLocale) *TakeUpdate
SetInLocale sets the "in_locale" field.
func (*TakeUpdate) SetMark ¶
func (tu *TakeUpdate) SetMark(i int) *TakeUpdate
SetMark sets the "mark" field.
func (*TakeUpdate) SetMeta ¶
func (tu *TakeUpdate) SetMeta(m map[string]interface{}) *TakeUpdate
SetMeta sets the "meta" field.
func (*TakeUpdate) SetNillableEndTime ¶
func (tu *TakeUpdate) SetNillableEndTime(t *time.Time) *TakeUpdate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*TakeUpdate) SetNillableInLocale ¶
func (tu *TakeUpdate) SetNillableInLocale(tl *take.InLocale) *TakeUpdate
SetNillableInLocale sets the "in_locale" field if the given value is not nil.
func (*TakeUpdate) SetNillableMark ¶
func (tu *TakeUpdate) SetNillableMark(i *int) *TakeUpdate
SetNillableMark sets the "mark" field if the given value is not nil.
func (*TakeUpdate) SetNillablePage ¶
func (tu *TakeUpdate) SetNillablePage(i *int) *TakeUpdate
SetNillablePage sets the "page" field if the given value is not nil.
func (*TakeUpdate) SetNillableProgress ¶
func (tu *TakeUpdate) SetNillableProgress(i *int) *TakeUpdate
SetNillableProgress sets the "progress" field if the given value is not nil.
func (*TakeUpdate) SetNillableStartTime ¶
func (tu *TakeUpdate) SetNillableStartTime(t *time.Time) *TakeUpdate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*TakeUpdate) SetNillableStatus ¶
func (tu *TakeUpdate) SetNillableStatus(t *take.Status) *TakeUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TakeUpdate) SetNillableSuspicious ¶
func (tu *TakeUpdate) SetNillableSuspicious(b *bool) *TakeUpdate
SetNillableSuspicious sets the "suspicious" field if the given value is not nil.
func (*TakeUpdate) SetPage ¶
func (tu *TakeUpdate) SetPage(i int) *TakeUpdate
SetPage sets the "page" field.
func (*TakeUpdate) SetProgress ¶
func (tu *TakeUpdate) SetProgress(i int) *TakeUpdate
SetProgress sets the "progress" field.
func (*TakeUpdate) SetStartTime ¶
func (tu *TakeUpdate) SetStartTime(t time.Time) *TakeUpdate
SetStartTime sets the "start_time" field.
func (*TakeUpdate) SetStatus ¶
func (tu *TakeUpdate) SetStatus(t take.Status) *TakeUpdate
SetStatus sets the "status" field.
func (*TakeUpdate) SetSuspicious ¶
func (tu *TakeUpdate) SetSuspicious(b bool) *TakeUpdate
SetSuspicious sets the "suspicious" field.
func (*TakeUpdate) SetTest ¶
func (tu *TakeUpdate) SetTest(t *Test) *TakeUpdate
SetTest sets the "test" edge to the Test entity.
func (*TakeUpdate) SetTestID ¶
func (tu *TakeUpdate) SetTestID(id uuid.UUID) *TakeUpdate
SetTestID sets the "test" edge to the Test entity by ID.
func (*TakeUpdate) SetUpdateTime ¶
func (tu *TakeUpdate) SetUpdateTime(t time.Time) *TakeUpdate
SetUpdateTime sets the "update_time" field.
func (*TakeUpdate) SetUser ¶
func (tu *TakeUpdate) SetUser(u *User) *TakeUpdate
SetUser sets the "user" edge to the User entity.
func (*TakeUpdate) SetUserID ¶
func (tu *TakeUpdate) SetUserID(id uuid.UUID) *TakeUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*TakeUpdate) Where ¶
func (tu *TakeUpdate) Where(ps ...predicate.Take) *TakeUpdate
Where appends a list predicates to the TakeUpdate builder.
type TakeUpdateOne ¶
type TakeUpdateOne struct {
// contains filtered or unexported fields
}
TakeUpdateOne is the builder for updating a single Take entity.
func (*TakeUpdateOne) AddMark ¶
func (tuo *TakeUpdateOne) AddMark(i int) *TakeUpdateOne
AddMark adds i to the "mark" field.
func (*TakeUpdateOne) AddPage ¶
func (tuo *TakeUpdateOne) AddPage(i int) *TakeUpdateOne
AddPage adds i to the "page" field.
func (*TakeUpdateOne) AddProgress ¶
func (tuo *TakeUpdateOne) AddProgress(i int) *TakeUpdateOne
AddProgress adds i to the "progress" field.
func (*TakeUpdateOne) AddResponseIDs ¶
func (tuo *TakeUpdateOne) AddResponseIDs(ids ...uuid.UUID) *TakeUpdateOne
AddResponseIDs adds the "responses" edge to the Response entity by IDs.
func (*TakeUpdateOne) AddResponses ¶
func (tuo *TakeUpdateOne) AddResponses(r ...*Response) *TakeUpdateOne
AddResponses adds the "responses" edges to the Response entity.
func (*TakeUpdateOne) AddResultIDs ¶
func (tuo *TakeUpdateOne) AddResultIDs(ids ...uuid.UUID) *TakeUpdateOne
AddResultIDs adds the "results" edge to the Result entity by IDs.
func (*TakeUpdateOne) AddResults ¶
func (tuo *TakeUpdateOne) AddResults(r ...*Result) *TakeUpdateOne
AddResults adds the "results" edges to the Result entity.
func (*TakeUpdateOne) ClearEndTime ¶
func (tuo *TakeUpdateOne) ClearEndTime() *TakeUpdateOne
ClearEndTime clears the value of the "end_time" field.
func (*TakeUpdateOne) ClearMark ¶
func (tuo *TakeUpdateOne) ClearMark() *TakeUpdateOne
ClearMark clears the value of the "mark" field.
func (*TakeUpdateOne) ClearMeta ¶
func (tuo *TakeUpdateOne) ClearMeta() *TakeUpdateOne
ClearMeta clears the value of the "meta" field.
func (*TakeUpdateOne) ClearResponses ¶
func (tuo *TakeUpdateOne) ClearResponses() *TakeUpdateOne
ClearResponses clears all "responses" edges to the Response entity.
func (*TakeUpdateOne) ClearResults ¶
func (tuo *TakeUpdateOne) ClearResults() *TakeUpdateOne
ClearResults clears all "results" edges to the Result entity.
func (*TakeUpdateOne) ClearStartTime ¶
func (tuo *TakeUpdateOne) ClearStartTime() *TakeUpdateOne
ClearStartTime clears the value of the "start_time" field.
func (*TakeUpdateOne) ClearTest ¶
func (tuo *TakeUpdateOne) ClearTest() *TakeUpdateOne
ClearTest clears the "test" edge to the Test entity.
func (*TakeUpdateOne) ClearUser ¶
func (tuo *TakeUpdateOne) ClearUser() *TakeUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*TakeUpdateOne) Exec ¶
func (tuo *TakeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TakeUpdateOne) ExecX ¶
func (tuo *TakeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TakeUpdateOne) Mutation ¶
func (tuo *TakeUpdateOne) Mutation() *TakeMutation
Mutation returns the TakeMutation object of the builder.
func (*TakeUpdateOne) RemoveResponseIDs ¶
func (tuo *TakeUpdateOne) RemoveResponseIDs(ids ...uuid.UUID) *TakeUpdateOne
RemoveResponseIDs removes the "responses" edge to Response entities by IDs.
func (*TakeUpdateOne) RemoveResponses ¶
func (tuo *TakeUpdateOne) RemoveResponses(r ...*Response) *TakeUpdateOne
RemoveResponses removes "responses" edges to Response entities.
func (*TakeUpdateOne) RemoveResultIDs ¶
func (tuo *TakeUpdateOne) RemoveResultIDs(ids ...uuid.UUID) *TakeUpdateOne
RemoveResultIDs removes the "results" edge to Result entities by IDs.
func (*TakeUpdateOne) RemoveResults ¶
func (tuo *TakeUpdateOne) RemoveResults(r ...*Result) *TakeUpdateOne
RemoveResults removes "results" edges to Result entities.
func (*TakeUpdateOne) Save ¶
func (tuo *TakeUpdateOne) Save(ctx context.Context) (*Take, error)
Save executes the query and returns the updated Take entity.
func (*TakeUpdateOne) SaveX ¶
func (tuo *TakeUpdateOne) SaveX(ctx context.Context) *Take
SaveX is like Save, but panics if an error occurs.
func (*TakeUpdateOne) Select ¶
func (tuo *TakeUpdateOne) Select(field string, fields ...string) *TakeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TakeUpdateOne) SetEndTime ¶
func (tuo *TakeUpdateOne) SetEndTime(t time.Time) *TakeUpdateOne
SetEndTime sets the "end_time" field.
func (*TakeUpdateOne) SetInLocale ¶
func (tuo *TakeUpdateOne) SetInLocale(tl take.InLocale) *TakeUpdateOne
SetInLocale sets the "in_locale" field.
func (*TakeUpdateOne) SetMark ¶
func (tuo *TakeUpdateOne) SetMark(i int) *TakeUpdateOne
SetMark sets the "mark" field.
func (*TakeUpdateOne) SetMeta ¶
func (tuo *TakeUpdateOne) SetMeta(m map[string]interface{}) *TakeUpdateOne
SetMeta sets the "meta" field.
func (*TakeUpdateOne) SetNillableEndTime ¶
func (tuo *TakeUpdateOne) SetNillableEndTime(t *time.Time) *TakeUpdateOne
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*TakeUpdateOne) SetNillableInLocale ¶
func (tuo *TakeUpdateOne) SetNillableInLocale(tl *take.InLocale) *TakeUpdateOne
SetNillableInLocale sets the "in_locale" field if the given value is not nil.
func (*TakeUpdateOne) SetNillableMark ¶
func (tuo *TakeUpdateOne) SetNillableMark(i *int) *TakeUpdateOne
SetNillableMark sets the "mark" field if the given value is not nil.
func (*TakeUpdateOne) SetNillablePage ¶
func (tuo *TakeUpdateOne) SetNillablePage(i *int) *TakeUpdateOne
SetNillablePage sets the "page" field if the given value is not nil.
func (*TakeUpdateOne) SetNillableProgress ¶
func (tuo *TakeUpdateOne) SetNillableProgress(i *int) *TakeUpdateOne
SetNillableProgress sets the "progress" field if the given value is not nil.
func (*TakeUpdateOne) SetNillableStartTime ¶
func (tuo *TakeUpdateOne) SetNillableStartTime(t *time.Time) *TakeUpdateOne
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*TakeUpdateOne) SetNillableStatus ¶
func (tuo *TakeUpdateOne) SetNillableStatus(t *take.Status) *TakeUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TakeUpdateOne) SetNillableSuspicious ¶
func (tuo *TakeUpdateOne) SetNillableSuspicious(b *bool) *TakeUpdateOne
SetNillableSuspicious sets the "suspicious" field if the given value is not nil.
func (*TakeUpdateOne) SetPage ¶
func (tuo *TakeUpdateOne) SetPage(i int) *TakeUpdateOne
SetPage sets the "page" field.
func (*TakeUpdateOne) SetProgress ¶
func (tuo *TakeUpdateOne) SetProgress(i int) *TakeUpdateOne
SetProgress sets the "progress" field.
func (*TakeUpdateOne) SetStartTime ¶
func (tuo *TakeUpdateOne) SetStartTime(t time.Time) *TakeUpdateOne
SetStartTime sets the "start_time" field.
func (*TakeUpdateOne) SetStatus ¶
func (tuo *TakeUpdateOne) SetStatus(t take.Status) *TakeUpdateOne
SetStatus sets the "status" field.
func (*TakeUpdateOne) SetSuspicious ¶
func (tuo *TakeUpdateOne) SetSuspicious(b bool) *TakeUpdateOne
SetSuspicious sets the "suspicious" field.
func (*TakeUpdateOne) SetTest ¶
func (tuo *TakeUpdateOne) SetTest(t *Test) *TakeUpdateOne
SetTest sets the "test" edge to the Test entity.
func (*TakeUpdateOne) SetTestID ¶
func (tuo *TakeUpdateOne) SetTestID(id uuid.UUID) *TakeUpdateOne
SetTestID sets the "test" edge to the Test entity by ID.
func (*TakeUpdateOne) SetUpdateTime ¶
func (tuo *TakeUpdateOne) SetUpdateTime(t time.Time) *TakeUpdateOne
SetUpdateTime sets the "update_time" field.
func (*TakeUpdateOne) SetUser ¶
func (tuo *TakeUpdateOne) SetUser(u *User) *TakeUpdateOne
SetUser sets the "user" edge to the User entity.
func (*TakeUpdateOne) SetUserID ¶
func (tuo *TakeUpdateOne) SetUserID(id uuid.UUID) *TakeUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type Test ¶
type Test struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Published holds the value of the "published" field. Published bool `json:"published,omitempty"` // AvailableLocales holds the value of the "available_locales" field. AvailableLocales []string `json:"available_locales,omitempty"` // Mark holds the value of the "mark" field. Mark float64 `json:"mark,omitempty"` // Duration holds the value of the "duration" field. Duration *time.Duration `json:"duration,omitempty"` // QuestionCount holds the value of the "question_count" field. QuestionCount int `json:"question_count,omitempty"` // Image holds the value of the "image" field. Image string `json:"image,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TestQuery when eager-loading is set. Edges TestEdges `json:"edges"` // contains filtered or unexported fields }
Test is the model entity for the Test schema.
func (*Test) QueryDisplay ¶
func (t *Test) QueryDisplay() *TestDisplayQuery
QueryDisplay queries the "display" edge of the Test entity.
func (*Test) QueryQuestions ¶
func (t *Test) QueryQuestions() *QuestionQuery
QueryQuestions queries the "questions" edge of the Test entity.
func (*Test) QueryScales ¶
func (t *Test) QueryScales() *ScaleQuery
QueryScales queries the "scales" edge of the Test entity.
func (*Test) QueryTakes ¶
QueryTakes queries the "takes" edge of the Test entity.
func (*Test) QueryTranslations ¶
func (t *Test) QueryTranslations() *TestTranslationQuery
QueryTranslations queries the "translations" edge of the Test entity.
func (*Test) Unwrap ¶
Unwrap unwraps the Test 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 (*Test) Update ¶
func (t *Test) Update() *TestUpdateOne
Update returns a builder for updating this Test. Note that you need to call Test.Unwrap() before calling this method if this Test was returned from a transaction, and the transaction was committed or rolled back.
type TestClient ¶
type TestClient struct {
// contains filtered or unexported fields
}
TestClient is a client for the Test schema.
func NewTestClient ¶
func NewTestClient(c config) *TestClient
NewTestClient returns a client for the Test from the given config.
func (*TestClient) Create ¶
func (c *TestClient) Create() *TestCreate
Create returns a builder for creating a Test entity.
func (*TestClient) CreateBulk ¶
func (c *TestClient) CreateBulk(builders ...*TestCreate) *TestCreateBulk
CreateBulk returns a builder for creating a bulk of Test entities.
func (*TestClient) Delete ¶
func (c *TestClient) Delete() *TestDelete
Delete returns a delete builder for Test.
func (*TestClient) DeleteOne ¶
func (c *TestClient) DeleteOne(t *Test) *TestDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TestClient) DeleteOneID ¶
func (c *TestClient) DeleteOneID(id uuid.UUID) *TestDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*TestClient) Query ¶
func (c *TestClient) Query() *TestQuery
Query returns a query builder for Test.
func (*TestClient) QueryDisplay ¶
func (c *TestClient) QueryDisplay(t *Test) *TestDisplayQuery
QueryDisplay queries the display edge of a Test.
func (*TestClient) QueryQuestions ¶
func (c *TestClient) QueryQuestions(t *Test) *QuestionQuery
QueryQuestions queries the questions edge of a Test.
func (*TestClient) QueryScales ¶
func (c *TestClient) QueryScales(t *Test) *ScaleQuery
QueryScales queries the scales edge of a Test.
func (*TestClient) QueryTags ¶
func (c *TestClient) QueryTags(t *Test) *TagQuery
QueryTags queries the tags edge of a Test.
func (*TestClient) QueryTakes ¶
func (c *TestClient) QueryTakes(t *Test) *TakeQuery
QueryTakes queries the takes edge of a Test.
func (*TestClient) QueryTranslations ¶
func (c *TestClient) QueryTranslations(t *Test) *TestTranslationQuery
QueryTranslations queries the translations edge of a Test.
func (*TestClient) Update ¶
func (c *TestClient) Update() *TestUpdate
Update returns an update builder for Test.
func (*TestClient) UpdateOne ¶
func (c *TestClient) UpdateOne(t *Test) *TestUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TestClient) UpdateOneID ¶
func (c *TestClient) UpdateOneID(id uuid.UUID) *TestUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TestClient) Use ¶
func (c *TestClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `test.Hooks(f(g(h())))`.
type TestCreate ¶
type TestCreate struct {
// contains filtered or unexported fields
}
TestCreate is the builder for creating a Test entity.
func (*TestCreate) AddQuestionIDs ¶
func (tc *TestCreate) AddQuestionIDs(ids ...uuid.UUID) *TestCreate
AddQuestionIDs adds the "questions" edge to the Question entity by IDs.
func (*TestCreate) AddQuestions ¶
func (tc *TestCreate) AddQuestions(q ...*Question) *TestCreate
AddQuestions adds the "questions" edges to the Question entity.
func (*TestCreate) AddScaleIDs ¶
func (tc *TestCreate) AddScaleIDs(ids ...uuid.UUID) *TestCreate
AddScaleIDs adds the "scales" edge to the Scale entity by IDs.
func (*TestCreate) AddScales ¶
func (tc *TestCreate) AddScales(s ...*Scale) *TestCreate
AddScales adds the "scales" edges to the Scale entity.
func (*TestCreate) AddTagIDs ¶
func (tc *TestCreate) AddTagIDs(ids ...uuid.UUID) *TestCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*TestCreate) AddTags ¶
func (tc *TestCreate) AddTags(t ...*Tag) *TestCreate
AddTags adds the "tags" edges to the Tag entity.
func (*TestCreate) AddTakeIDs ¶
func (tc *TestCreate) AddTakeIDs(ids ...uuid.UUID) *TestCreate
AddTakeIDs adds the "takes" edge to the Take entity by IDs.
func (*TestCreate) AddTakes ¶
func (tc *TestCreate) AddTakes(t ...*Take) *TestCreate
AddTakes adds the "takes" edges to the Take entity.
func (*TestCreate) AddTranslationIDs ¶
func (tc *TestCreate) AddTranslationIDs(ids ...uuid.UUID) *TestCreate
AddTranslationIDs adds the "translations" edge to the TestTranslation entity by IDs.
func (*TestCreate) AddTranslations ¶
func (tc *TestCreate) AddTranslations(t ...*TestTranslation) *TestCreate
AddTranslations adds the "translations" edges to the TestTranslation entity.
func (*TestCreate) Exec ¶
func (tc *TestCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TestCreate) ExecX ¶
func (tc *TestCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TestCreate) Mutation ¶
func (tc *TestCreate) Mutation() *TestMutation
Mutation returns the TestMutation object of the builder.
func (*TestCreate) Save ¶
func (tc *TestCreate) Save(ctx context.Context) (*Test, error)
Save creates the Test in the database.
func (*TestCreate) SaveX ¶
func (tc *TestCreate) SaveX(ctx context.Context) *Test
SaveX calls Save and panics if Save returns an error.
func (*TestCreate) SetAvailableLocales ¶
func (tc *TestCreate) SetAvailableLocales(s []string) *TestCreate
SetAvailableLocales sets the "available_locales" field.
func (*TestCreate) SetCode ¶
func (tc *TestCreate) SetCode(s string) *TestCreate
SetCode sets the "code" field.
func (*TestCreate) SetCreateTime ¶
func (tc *TestCreate) SetCreateTime(t time.Time) *TestCreate
SetCreateTime sets the "create_time" field.
func (*TestCreate) SetDisplay ¶
func (tc *TestCreate) SetDisplay(t *TestDisplay) *TestCreate
SetDisplay sets the "display" edge to the TestDisplay entity.
func (*TestCreate) SetDisplayID ¶
func (tc *TestCreate) SetDisplayID(id uuid.UUID) *TestCreate
SetDisplayID sets the "display" edge to the TestDisplay entity by ID.
func (*TestCreate) SetDuration ¶
func (tc *TestCreate) SetDuration(t time.Duration) *TestCreate
SetDuration sets the "duration" field.
func (*TestCreate) SetID ¶
func (tc *TestCreate) SetID(u uuid.UUID) *TestCreate
SetID sets the "id" field.
func (*TestCreate) SetImage ¶ added in v1.1.0
func (tc *TestCreate) SetImage(s string) *TestCreate
SetImage sets the "image" field.
func (*TestCreate) SetMark ¶
func (tc *TestCreate) SetMark(f float64) *TestCreate
SetMark sets the "mark" field.
func (*TestCreate) SetNillableCreateTime ¶
func (tc *TestCreate) SetNillableCreateTime(t *time.Time) *TestCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*TestCreate) SetNillableDisplayID ¶
func (tc *TestCreate) SetNillableDisplayID(id *uuid.UUID) *TestCreate
SetNillableDisplayID sets the "display" edge to the TestDisplay entity by ID if the given value is not nil.
func (*TestCreate) SetNillableDuration ¶
func (tc *TestCreate) SetNillableDuration(t *time.Duration) *TestCreate
SetNillableDuration sets the "duration" field if the given value is not nil.
func (*TestCreate) SetNillableID ¶
func (tc *TestCreate) SetNillableID(u *uuid.UUID) *TestCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TestCreate) SetNillableImage ¶ added in v1.1.0
func (tc *TestCreate) SetNillableImage(s *string) *TestCreate
SetNillableImage sets the "image" field if the given value is not nil.
func (*TestCreate) SetNillableMark ¶
func (tc *TestCreate) SetNillableMark(f *float64) *TestCreate
SetNillableMark sets the "mark" field if the given value is not nil.
func (*TestCreate) SetNillablePublished ¶
func (tc *TestCreate) SetNillablePublished(b *bool) *TestCreate
SetNillablePublished sets the "published" field if the given value is not nil.
func (*TestCreate) SetNillableQuestionCount ¶
func (tc *TestCreate) SetNillableQuestionCount(i *int) *TestCreate
SetNillableQuestionCount sets the "question_count" field if the given value is not nil.
func (*TestCreate) SetNillableUpdateTime ¶
func (tc *TestCreate) SetNillableUpdateTime(t *time.Time) *TestCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*TestCreate) SetPublished ¶
func (tc *TestCreate) SetPublished(b bool) *TestCreate
SetPublished sets the "published" field.
func (*TestCreate) SetQuestionCount ¶
func (tc *TestCreate) SetQuestionCount(i int) *TestCreate
SetQuestionCount sets the "question_count" field.
func (*TestCreate) SetUpdateTime ¶
func (tc *TestCreate) SetUpdateTime(t time.Time) *TestCreate
SetUpdateTime sets the "update_time" field.
type TestCreateBulk ¶
type TestCreateBulk struct {
// contains filtered or unexported fields
}
TestCreateBulk is the builder for creating many Test entities in bulk.
func (*TestCreateBulk) Exec ¶
func (tcb *TestCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TestCreateBulk) ExecX ¶
func (tcb *TestCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TestDelete ¶
type TestDelete struct {
// contains filtered or unexported fields
}
TestDelete is the builder for deleting a Test entity.
func (*TestDelete) Exec ¶
func (td *TestDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TestDelete) ExecX ¶
func (td *TestDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TestDelete) Where ¶
func (td *TestDelete) Where(ps ...predicate.Test) *TestDelete
Where appends a list predicates to the TestDelete builder.
type TestDeleteOne ¶
type TestDeleteOne struct {
// contains filtered or unexported fields
}
TestDeleteOne is the builder for deleting a single Test entity.
func (*TestDeleteOne) Exec ¶
func (tdo *TestDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TestDeleteOne) ExecX ¶
func (tdo *TestDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TestDisplay ¶
type TestDisplay struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // RandomizeOrder holds the value of the "randomize_order" field. RandomizeOrder bool `json:"randomize_order,omitempty"` // QuestionsPerPage holds the value of the "questions_per_page" field. QuestionsPerPage int `json:"questions_per_page,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TestDisplayQuery when eager-loading is set. Edges TestDisplayEdges `json:"edges"` // contains filtered or unexported fields }
TestDisplay is the model entity for the TestDisplay schema.
func (*TestDisplay) QueryTest ¶
func (td *TestDisplay) QueryTest() *TestQuery
QueryTest queries the "test" edge of the TestDisplay entity.
func (*TestDisplay) String ¶
func (td *TestDisplay) String() string
String implements the fmt.Stringer.
func (*TestDisplay) Unwrap ¶
func (td *TestDisplay) Unwrap() *TestDisplay
Unwrap unwraps the TestDisplay 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 (*TestDisplay) Update ¶
func (td *TestDisplay) Update() *TestDisplayUpdateOne
Update returns a builder for updating this TestDisplay. Note that you need to call TestDisplay.Unwrap() before calling this method if this TestDisplay was returned from a transaction, and the transaction was committed or rolled back.
type TestDisplayClient ¶
type TestDisplayClient struct {
// contains filtered or unexported fields
}
TestDisplayClient is a client for the TestDisplay schema.
func NewTestDisplayClient ¶
func NewTestDisplayClient(c config) *TestDisplayClient
NewTestDisplayClient returns a client for the TestDisplay from the given config.
func (*TestDisplayClient) Create ¶
func (c *TestDisplayClient) Create() *TestDisplayCreate
Create returns a builder for creating a TestDisplay entity.
func (*TestDisplayClient) CreateBulk ¶
func (c *TestDisplayClient) CreateBulk(builders ...*TestDisplayCreate) *TestDisplayCreateBulk
CreateBulk returns a builder for creating a bulk of TestDisplay entities.
func (*TestDisplayClient) Delete ¶
func (c *TestDisplayClient) Delete() *TestDisplayDelete
Delete returns a delete builder for TestDisplay.
func (*TestDisplayClient) DeleteOne ¶
func (c *TestDisplayClient) DeleteOne(td *TestDisplay) *TestDisplayDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TestDisplayClient) DeleteOneID ¶
func (c *TestDisplayClient) DeleteOneID(id uuid.UUID) *TestDisplayDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*TestDisplayClient) Get ¶
func (c *TestDisplayClient) Get(ctx context.Context, id uuid.UUID) (*TestDisplay, error)
Get returns a TestDisplay entity by its id.
func (*TestDisplayClient) GetX ¶
func (c *TestDisplayClient) GetX(ctx context.Context, id uuid.UUID) *TestDisplay
GetX is like Get, but panics if an error occurs.
func (*TestDisplayClient) Hooks ¶
func (c *TestDisplayClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TestDisplayClient) Query ¶
func (c *TestDisplayClient) Query() *TestDisplayQuery
Query returns a query builder for TestDisplay.
func (*TestDisplayClient) QueryTest ¶
func (c *TestDisplayClient) QueryTest(td *TestDisplay) *TestQuery
QueryTest queries the test edge of a TestDisplay.
func (*TestDisplayClient) Update ¶
func (c *TestDisplayClient) Update() *TestDisplayUpdate
Update returns an update builder for TestDisplay.
func (*TestDisplayClient) UpdateOne ¶
func (c *TestDisplayClient) UpdateOne(td *TestDisplay) *TestDisplayUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TestDisplayClient) UpdateOneID ¶
func (c *TestDisplayClient) UpdateOneID(id uuid.UUID) *TestDisplayUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TestDisplayClient) Use ¶
func (c *TestDisplayClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `testdisplay.Hooks(f(g(h())))`.
type TestDisplayCreate ¶
type TestDisplayCreate struct {
// contains filtered or unexported fields
}
TestDisplayCreate is the builder for creating a TestDisplay entity.
func (*TestDisplayCreate) Exec ¶
func (tdc *TestDisplayCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TestDisplayCreate) ExecX ¶
func (tdc *TestDisplayCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TestDisplayCreate) Mutation ¶
func (tdc *TestDisplayCreate) Mutation() *TestDisplayMutation
Mutation returns the TestDisplayMutation object of the builder.
func (*TestDisplayCreate) Save ¶
func (tdc *TestDisplayCreate) Save(ctx context.Context) (*TestDisplay, error)
Save creates the TestDisplay in the database.
func (*TestDisplayCreate) SaveX ¶
func (tdc *TestDisplayCreate) SaveX(ctx context.Context) *TestDisplay
SaveX calls Save and panics if Save returns an error.
func (*TestDisplayCreate) SetID ¶
func (tdc *TestDisplayCreate) SetID(u uuid.UUID) *TestDisplayCreate
SetID sets the "id" field.
func (*TestDisplayCreate) SetNillableID ¶
func (tdc *TestDisplayCreate) SetNillableID(u *uuid.UUID) *TestDisplayCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TestDisplayCreate) SetNillableQuestionsPerPage ¶
func (tdc *TestDisplayCreate) SetNillableQuestionsPerPage(i *int) *TestDisplayCreate
SetNillableQuestionsPerPage sets the "questions_per_page" field if the given value is not nil.
func (*TestDisplayCreate) SetNillableRandomizeOrder ¶
func (tdc *TestDisplayCreate) SetNillableRandomizeOrder(b *bool) *TestDisplayCreate
SetNillableRandomizeOrder sets the "randomize_order" field if the given value is not nil.
func (*TestDisplayCreate) SetQuestionsPerPage ¶
func (tdc *TestDisplayCreate) SetQuestionsPerPage(i int) *TestDisplayCreate
SetQuestionsPerPage sets the "questions_per_page" field.
func (*TestDisplayCreate) SetRandomizeOrder ¶
func (tdc *TestDisplayCreate) SetRandomizeOrder(b bool) *TestDisplayCreate
SetRandomizeOrder sets the "randomize_order" field.
func (*TestDisplayCreate) SetTest ¶
func (tdc *TestDisplayCreate) SetTest(t *Test) *TestDisplayCreate
SetTest sets the "test" edge to the Test entity.
func (*TestDisplayCreate) SetTestID ¶
func (tdc *TestDisplayCreate) SetTestID(id uuid.UUID) *TestDisplayCreate
SetTestID sets the "test" edge to the Test entity by ID.
type TestDisplayCreateBulk ¶
type TestDisplayCreateBulk struct {
// contains filtered or unexported fields
}
TestDisplayCreateBulk is the builder for creating many TestDisplay entities in bulk.
func (*TestDisplayCreateBulk) Exec ¶
func (tdcb *TestDisplayCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TestDisplayCreateBulk) ExecX ¶
func (tdcb *TestDisplayCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TestDisplayCreateBulk) Save ¶
func (tdcb *TestDisplayCreateBulk) Save(ctx context.Context) ([]*TestDisplay, error)
Save creates the TestDisplay entities in the database.
func (*TestDisplayCreateBulk) SaveX ¶
func (tdcb *TestDisplayCreateBulk) SaveX(ctx context.Context) []*TestDisplay
SaveX is like Save, but panics if an error occurs.
type TestDisplayDelete ¶
type TestDisplayDelete struct {
// contains filtered or unexported fields
}
TestDisplayDelete is the builder for deleting a TestDisplay entity.
func (*TestDisplayDelete) Exec ¶
func (tdd *TestDisplayDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TestDisplayDelete) ExecX ¶
func (tdd *TestDisplayDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TestDisplayDelete) Where ¶
func (tdd *TestDisplayDelete) Where(ps ...predicate.TestDisplay) *TestDisplayDelete
Where appends a list predicates to the TestDisplayDelete builder.
type TestDisplayDeleteOne ¶
type TestDisplayDeleteOne struct {
// contains filtered or unexported fields
}
TestDisplayDeleteOne is the builder for deleting a single TestDisplay entity.
func (*TestDisplayDeleteOne) Exec ¶
func (tddo *TestDisplayDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TestDisplayDeleteOne) ExecX ¶
func (tddo *TestDisplayDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TestDisplayEdges ¶
type TestDisplayEdges struct { // Test holds the value of the test edge. Test *Test `json:"test,omitempty"` // contains filtered or unexported fields }
TestDisplayEdges holds the relations/edges for other nodes in the graph.
func (TestDisplayEdges) TestOrErr ¶
func (e TestDisplayEdges) TestOrErr() (*Test, error)
TestOrErr returns the Test value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TestDisplayGroupBy ¶
type TestDisplayGroupBy struct {
// contains filtered or unexported fields
}
TestDisplayGroupBy is the group-by builder for TestDisplay entities.
func (*TestDisplayGroupBy) Aggregate ¶
func (tdgb *TestDisplayGroupBy) Aggregate(fns ...AggregateFunc) *TestDisplayGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TestDisplayGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TestDisplayGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TestDisplayGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TestDisplayGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TestDisplayGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TestDisplayGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TestDisplayGroupBy) Scan ¶
func (tdgb *TestDisplayGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TestDisplayGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TestDisplayMutation ¶
type TestDisplayMutation struct {
// contains filtered or unexported fields
}
TestDisplayMutation represents an operation that mutates the TestDisplay nodes in the graph.
func (*TestDisplayMutation) AddField ¶
func (m *TestDisplayMutation) 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 (*TestDisplayMutation) AddQuestionsPerPage ¶
func (m *TestDisplayMutation) AddQuestionsPerPage(i int)
AddQuestionsPerPage adds i to the "questions_per_page" field.
func (*TestDisplayMutation) AddedEdges ¶
func (m *TestDisplayMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TestDisplayMutation) AddedField ¶
func (m *TestDisplayMutation) 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 (*TestDisplayMutation) AddedFields ¶
func (m *TestDisplayMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TestDisplayMutation) AddedIDs ¶
func (m *TestDisplayMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TestDisplayMutation) AddedQuestionsPerPage ¶
func (m *TestDisplayMutation) AddedQuestionsPerPage() (r int, exists bool)
AddedQuestionsPerPage returns the value that was added to the "questions_per_page" field in this mutation.
func (*TestDisplayMutation) ClearEdge ¶
func (m *TestDisplayMutation) 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 (*TestDisplayMutation) ClearField ¶
func (m *TestDisplayMutation) 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 (*TestDisplayMutation) ClearTest ¶
func (m *TestDisplayMutation) ClearTest()
ClearTest clears the "test" edge to the Test entity.
func (*TestDisplayMutation) ClearedEdges ¶
func (m *TestDisplayMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TestDisplayMutation) ClearedFields ¶
func (m *TestDisplayMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TestDisplayMutation) Client ¶
func (m TestDisplayMutation) 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 (*TestDisplayMutation) EdgeCleared ¶
func (m *TestDisplayMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TestDisplayMutation) Field ¶
func (m *TestDisplayMutation) 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 (*TestDisplayMutation) FieldCleared ¶
func (m *TestDisplayMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TestDisplayMutation) Fields ¶
func (m *TestDisplayMutation) 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 (*TestDisplayMutation) ID ¶
func (m *TestDisplayMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TestDisplayMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TestDisplayMutation) 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 (*TestDisplayMutation) OldQuestionsPerPage ¶
func (m *TestDisplayMutation) OldQuestionsPerPage(ctx context.Context) (v int, err error)
OldQuestionsPerPage returns the old "questions_per_page" field's value of the TestDisplay entity. If the TestDisplay 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 (*TestDisplayMutation) OldRandomizeOrder ¶
func (m *TestDisplayMutation) OldRandomizeOrder(ctx context.Context) (v bool, err error)
OldRandomizeOrder returns the old "randomize_order" field's value of the TestDisplay entity. If the TestDisplay 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 (*TestDisplayMutation) Op ¶
func (m *TestDisplayMutation) Op() Op
Op returns the operation name.
func (*TestDisplayMutation) QuestionsPerPage ¶
func (m *TestDisplayMutation) QuestionsPerPage() (r int, exists bool)
QuestionsPerPage returns the value of the "questions_per_page" field in the mutation.
func (*TestDisplayMutation) RandomizeOrder ¶
func (m *TestDisplayMutation) RandomizeOrder() (r bool, exists bool)
RandomizeOrder returns the value of the "randomize_order" field in the mutation.
func (*TestDisplayMutation) RemovedEdges ¶
func (m *TestDisplayMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TestDisplayMutation) RemovedIDs ¶
func (m *TestDisplayMutation) 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 (*TestDisplayMutation) ResetEdge ¶
func (m *TestDisplayMutation) 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 (*TestDisplayMutation) ResetField ¶
func (m *TestDisplayMutation) 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 (*TestDisplayMutation) ResetQuestionsPerPage ¶
func (m *TestDisplayMutation) ResetQuestionsPerPage()
ResetQuestionsPerPage resets all changes to the "questions_per_page" field.
func (*TestDisplayMutation) ResetRandomizeOrder ¶
func (m *TestDisplayMutation) ResetRandomizeOrder()
ResetRandomizeOrder resets all changes to the "randomize_order" field.
func (*TestDisplayMutation) ResetTest ¶
func (m *TestDisplayMutation) ResetTest()
ResetTest resets all changes to the "test" edge.
func (*TestDisplayMutation) SetField ¶
func (m *TestDisplayMutation) 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 (*TestDisplayMutation) SetID ¶
func (m *TestDisplayMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of TestDisplay entities.
func (*TestDisplayMutation) SetQuestionsPerPage ¶
func (m *TestDisplayMutation) SetQuestionsPerPage(i int)
SetQuestionsPerPage sets the "questions_per_page" field.
func (*TestDisplayMutation) SetRandomizeOrder ¶
func (m *TestDisplayMutation) SetRandomizeOrder(b bool)
SetRandomizeOrder sets the "randomize_order" field.
func (*TestDisplayMutation) SetTestID ¶
func (m *TestDisplayMutation) SetTestID(id uuid.UUID)
SetTestID sets the "test" edge to the Test entity by id.
func (*TestDisplayMutation) TestCleared ¶
func (m *TestDisplayMutation) TestCleared() bool
TestCleared reports if the "test" edge to the Test entity was cleared.
func (*TestDisplayMutation) TestID ¶
func (m *TestDisplayMutation) TestID() (id uuid.UUID, exists bool)
TestID returns the "test" edge ID in the mutation.
func (*TestDisplayMutation) TestIDs ¶
func (m *TestDisplayMutation) TestIDs() (ids []uuid.UUID)
TestIDs returns the "test" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TestID instead. It exists only for internal usage by the builders.
func (TestDisplayMutation) Tx ¶
func (m TestDisplayMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TestDisplayMutation) Type ¶
func (m *TestDisplayMutation) Type() string
Type returns the node type of this mutation (TestDisplay).
func (*TestDisplayMutation) Where ¶
func (m *TestDisplayMutation) Where(ps ...predicate.TestDisplay)
Where appends a list predicates to the TestDisplayMutation builder.
type TestDisplayQuery ¶
type TestDisplayQuery struct {
// contains filtered or unexported fields
}
TestDisplayQuery is the builder for querying TestDisplay entities.
func (*TestDisplayQuery) All ¶
func (tdq *TestDisplayQuery) All(ctx context.Context) ([]*TestDisplay, error)
All executes the query and returns a list of TestDisplays.
func (*TestDisplayQuery) AllX ¶
func (tdq *TestDisplayQuery) AllX(ctx context.Context) []*TestDisplay
AllX is like All, but panics if an error occurs.
func (*TestDisplayQuery) Clone ¶
func (tdq *TestDisplayQuery) Clone() *TestDisplayQuery
Clone returns a duplicate of the TestDisplayQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TestDisplayQuery) Count ¶
func (tdq *TestDisplayQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TestDisplayQuery) CountX ¶
func (tdq *TestDisplayQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TestDisplayQuery) Exist ¶
func (tdq *TestDisplayQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TestDisplayQuery) ExistX ¶
func (tdq *TestDisplayQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TestDisplayQuery) First ¶
func (tdq *TestDisplayQuery) First(ctx context.Context) (*TestDisplay, error)
First returns the first TestDisplay entity from the query. Returns a *NotFoundError when no TestDisplay was found.
func (*TestDisplayQuery) FirstID ¶
FirstID returns the first TestDisplay ID from the query. Returns a *NotFoundError when no TestDisplay ID was found.
func (*TestDisplayQuery) FirstIDX ¶
func (tdq *TestDisplayQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*TestDisplayQuery) FirstX ¶
func (tdq *TestDisplayQuery) FirstX(ctx context.Context) *TestDisplay
FirstX is like First, but panics if an error occurs.
func (*TestDisplayQuery) GroupBy ¶
func (tdq *TestDisplayQuery) GroupBy(field string, fields ...string) *TestDisplayGroupBy
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 { RandomizeOrder bool `json:"randomize_order,omitempty"` Count int `json:"count,omitempty"` } client.TestDisplay.Query(). GroupBy(testdisplay.FieldRandomizeOrder). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TestDisplayQuery) IDsX ¶
func (tdq *TestDisplayQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*TestDisplayQuery) Limit ¶
func (tdq *TestDisplayQuery) Limit(limit int) *TestDisplayQuery
Limit adds a limit step to the query.
func (*TestDisplayQuery) Offset ¶
func (tdq *TestDisplayQuery) Offset(offset int) *TestDisplayQuery
Offset adds an offset step to the query.
func (*TestDisplayQuery) Only ¶
func (tdq *TestDisplayQuery) Only(ctx context.Context) (*TestDisplay, error)
Only returns a single TestDisplay entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TestDisplay entity is found. Returns a *NotFoundError when no TestDisplay entities are found.
func (*TestDisplayQuery) OnlyID ¶
OnlyID is like Only, but returns the only TestDisplay ID in the query. Returns a *NotSingularError when more than one TestDisplay ID is found. Returns a *NotFoundError when no entities are found.
func (*TestDisplayQuery) OnlyIDX ¶
func (tdq *TestDisplayQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TestDisplayQuery) OnlyX ¶
func (tdq *TestDisplayQuery) OnlyX(ctx context.Context) *TestDisplay
OnlyX is like Only, but panics if an error occurs.
func (*TestDisplayQuery) Order ¶
func (tdq *TestDisplayQuery) Order(o ...OrderFunc) *TestDisplayQuery
Order adds an order step to the query.
func (*TestDisplayQuery) QueryTest ¶
func (tdq *TestDisplayQuery) QueryTest() *TestQuery
QueryTest chains the current query on the "test" edge.
func (*TestDisplayQuery) Select ¶
func (tdq *TestDisplayQuery) Select(fields ...string) *TestDisplaySelect
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 { RandomizeOrder bool `json:"randomize_order,omitempty"` } client.TestDisplay.Query(). Select(testdisplay.FieldRandomizeOrder). Scan(ctx, &v)
func (*TestDisplayQuery) Unique ¶
func (tdq *TestDisplayQuery) Unique(unique bool) *TestDisplayQuery
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 (*TestDisplayQuery) Where ¶
func (tdq *TestDisplayQuery) Where(ps ...predicate.TestDisplay) *TestDisplayQuery
Where adds a new predicate for the TestDisplayQuery builder.
func (*TestDisplayQuery) WithTest ¶
func (tdq *TestDisplayQuery) WithTest(opts ...func(*TestQuery)) *TestDisplayQuery
WithTest tells the query-builder to eager-load the nodes that are connected to the "test" edge. The optional arguments are used to configure the query builder of the edge.
type TestDisplaySelect ¶
type TestDisplaySelect struct { *TestDisplayQuery // contains filtered or unexported fields }
TestDisplaySelect is the builder for selecting fields of TestDisplay entities.
func (*TestDisplaySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TestDisplaySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TestDisplaySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TestDisplaySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TestDisplaySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TestDisplaySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TestDisplaySelect) Scan ¶
func (tds *TestDisplaySelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TestDisplaySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TestDisplayUpdate ¶
type TestDisplayUpdate struct {
// contains filtered or unexported fields
}
TestDisplayUpdate is the builder for updating TestDisplay entities.
func (*TestDisplayUpdate) AddQuestionsPerPage ¶
func (tdu *TestDisplayUpdate) AddQuestionsPerPage(i int) *TestDisplayUpdate
AddQuestionsPerPage adds i to the "questions_per_page" field.
func (*TestDisplayUpdate) ClearTest ¶
func (tdu *TestDisplayUpdate) ClearTest() *TestDisplayUpdate
ClearTest clears the "test" edge to the Test entity.
func (*TestDisplayUpdate) Exec ¶
func (tdu *TestDisplayUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TestDisplayUpdate) ExecX ¶
func (tdu *TestDisplayUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TestDisplayUpdate) Mutation ¶
func (tdu *TestDisplayUpdate) Mutation() *TestDisplayMutation
Mutation returns the TestDisplayMutation object of the builder.
func (*TestDisplayUpdate) Save ¶
func (tdu *TestDisplayUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TestDisplayUpdate) SaveX ¶
func (tdu *TestDisplayUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TestDisplayUpdate) SetNillableQuestionsPerPage ¶
func (tdu *TestDisplayUpdate) SetNillableQuestionsPerPage(i *int) *TestDisplayUpdate
SetNillableQuestionsPerPage sets the "questions_per_page" field if the given value is not nil.
func (*TestDisplayUpdate) SetNillableRandomizeOrder ¶
func (tdu *TestDisplayUpdate) SetNillableRandomizeOrder(b *bool) *TestDisplayUpdate
SetNillableRandomizeOrder sets the "randomize_order" field if the given value is not nil.
func (*TestDisplayUpdate) SetQuestionsPerPage ¶
func (tdu *TestDisplayUpdate) SetQuestionsPerPage(i int) *TestDisplayUpdate
SetQuestionsPerPage sets the "questions_per_page" field.
func (*TestDisplayUpdate) SetRandomizeOrder ¶
func (tdu *TestDisplayUpdate) SetRandomizeOrder(b bool) *TestDisplayUpdate
SetRandomizeOrder sets the "randomize_order" field.
func (*TestDisplayUpdate) SetTest ¶
func (tdu *TestDisplayUpdate) SetTest(t *Test) *TestDisplayUpdate
SetTest sets the "test" edge to the Test entity.
func (*TestDisplayUpdate) SetTestID ¶
func (tdu *TestDisplayUpdate) SetTestID(id uuid.UUID) *TestDisplayUpdate
SetTestID sets the "test" edge to the Test entity by ID.
func (*TestDisplayUpdate) Where ¶
func (tdu *TestDisplayUpdate) Where(ps ...predicate.TestDisplay) *TestDisplayUpdate
Where appends a list predicates to the TestDisplayUpdate builder.
type TestDisplayUpdateOne ¶
type TestDisplayUpdateOne struct {
// contains filtered or unexported fields
}
TestDisplayUpdateOne is the builder for updating a single TestDisplay entity.
func (*TestDisplayUpdateOne) AddQuestionsPerPage ¶
func (tduo *TestDisplayUpdateOne) AddQuestionsPerPage(i int) *TestDisplayUpdateOne
AddQuestionsPerPage adds i to the "questions_per_page" field.
func (*TestDisplayUpdateOne) ClearTest ¶
func (tduo *TestDisplayUpdateOne) ClearTest() *TestDisplayUpdateOne
ClearTest clears the "test" edge to the Test entity.
func (*TestDisplayUpdateOne) Exec ¶
func (tduo *TestDisplayUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TestDisplayUpdateOne) ExecX ¶
func (tduo *TestDisplayUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TestDisplayUpdateOne) Mutation ¶
func (tduo *TestDisplayUpdateOne) Mutation() *TestDisplayMutation
Mutation returns the TestDisplayMutation object of the builder.
func (*TestDisplayUpdateOne) Save ¶
func (tduo *TestDisplayUpdateOne) Save(ctx context.Context) (*TestDisplay, error)
Save executes the query and returns the updated TestDisplay entity.
func (*TestDisplayUpdateOne) SaveX ¶
func (tduo *TestDisplayUpdateOne) SaveX(ctx context.Context) *TestDisplay
SaveX is like Save, but panics if an error occurs.
func (*TestDisplayUpdateOne) Select ¶
func (tduo *TestDisplayUpdateOne) Select(field string, fields ...string) *TestDisplayUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TestDisplayUpdateOne) SetNillableQuestionsPerPage ¶
func (tduo *TestDisplayUpdateOne) SetNillableQuestionsPerPage(i *int) *TestDisplayUpdateOne
SetNillableQuestionsPerPage sets the "questions_per_page" field if the given value is not nil.
func (*TestDisplayUpdateOne) SetNillableRandomizeOrder ¶
func (tduo *TestDisplayUpdateOne) SetNillableRandomizeOrder(b *bool) *TestDisplayUpdateOne
SetNillableRandomizeOrder sets the "randomize_order" field if the given value is not nil.
func (*TestDisplayUpdateOne) SetQuestionsPerPage ¶
func (tduo *TestDisplayUpdateOne) SetQuestionsPerPage(i int) *TestDisplayUpdateOne
SetQuestionsPerPage sets the "questions_per_page" field.
func (*TestDisplayUpdateOne) SetRandomizeOrder ¶
func (tduo *TestDisplayUpdateOne) SetRandomizeOrder(b bool) *TestDisplayUpdateOne
SetRandomizeOrder sets the "randomize_order" field.
func (*TestDisplayUpdateOne) SetTest ¶
func (tduo *TestDisplayUpdateOne) SetTest(t *Test) *TestDisplayUpdateOne
SetTest sets the "test" edge to the Test entity.
func (*TestDisplayUpdateOne) SetTestID ¶
func (tduo *TestDisplayUpdateOne) SetTestID(id uuid.UUID) *TestDisplayUpdateOne
SetTestID sets the "test" edge to the Test entity by ID.
type TestDisplays ¶
type TestDisplays []*TestDisplay
TestDisplays is a parsable slice of TestDisplay.
type TestEdges ¶
type TestEdges struct { // Takes holds the value of the takes edge. Takes []*Take `json:"takes,omitempty"` // Questions holds the value of the questions edge. Questions []*Question `json:"questions,omitempty"` // Translations holds the value of the translations edge. Translations []*TestTranslation `json:"translations,omitempty"` // Scales holds the value of the scales edge. Scales []*Scale `json:"scales,omitempty"` // Display holds the value of the display edge. Display *TestDisplay `json:"display,omitempty"` // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // contains filtered or unexported fields }
TestEdges holds the relations/edges for other nodes in the graph.
func (TestEdges) DisplayOrErr ¶
func (e TestEdges) DisplayOrErr() (*TestDisplay, error)
DisplayOrErr returns the Display value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (TestEdges) QuestionsOrErr ¶
QuestionsOrErr returns the Questions value or an error if the edge was not loaded in eager-loading.
func (TestEdges) ScalesOrErr ¶
ScalesOrErr returns the Scales value or an error if the edge was not loaded in eager-loading.
func (TestEdges) TagsOrErr ¶
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.
func (TestEdges) TakesOrErr ¶
TakesOrErr returns the Takes value or an error if the edge was not loaded in eager-loading.
func (TestEdges) TranslationsOrErr ¶
func (e TestEdges) TranslationsOrErr() ([]*TestTranslation, error)
TranslationsOrErr returns the Translations value or an error if the edge was not loaded in eager-loading.
type TestGroupBy ¶
type TestGroupBy struct {
// contains filtered or unexported fields
}
TestGroupBy is the group-by builder for Test entities.
func (*TestGroupBy) Aggregate ¶
func (tgb *TestGroupBy) Aggregate(fns ...AggregateFunc) *TestGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TestGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TestGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TestGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TestGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TestGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TestGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TestGroupBy) Scan ¶
func (tgb *TestGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TestGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TestMutation ¶
type TestMutation struct {
// contains filtered or unexported fields
}
TestMutation represents an operation that mutates the Test nodes in the graph.
func (*TestMutation) AddDuration ¶
func (m *TestMutation) AddDuration(t time.Duration)
AddDuration adds t to the "duration" field.
func (*TestMutation) AddField ¶
func (m *TestMutation) 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 (*TestMutation) AddMark ¶
func (m *TestMutation) AddMark(f float64)
AddMark adds f to the "mark" field.
func (*TestMutation) AddQuestionCount ¶
func (m *TestMutation) AddQuestionCount(i int)
AddQuestionCount adds i to the "question_count" field.
func (*TestMutation) AddQuestionIDs ¶
func (m *TestMutation) AddQuestionIDs(ids ...uuid.UUID)
AddQuestionIDs adds the "questions" edge to the Question entity by ids.
func (*TestMutation) AddScaleIDs ¶
func (m *TestMutation) AddScaleIDs(ids ...uuid.UUID)
AddScaleIDs adds the "scales" edge to the Scale entity by ids.
func (*TestMutation) AddTagIDs ¶
func (m *TestMutation) AddTagIDs(ids ...uuid.UUID)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*TestMutation) AddTakeIDs ¶
func (m *TestMutation) AddTakeIDs(ids ...uuid.UUID)
AddTakeIDs adds the "takes" edge to the Take entity by ids.
func (*TestMutation) AddTranslationIDs ¶
func (m *TestMutation) AddTranslationIDs(ids ...uuid.UUID)
AddTranslationIDs adds the "translations" edge to the TestTranslation entity by ids.
func (*TestMutation) AddedDuration ¶
func (m *TestMutation) AddedDuration() (r time.Duration, exists bool)
AddedDuration returns the value that was added to the "duration" field in this mutation.
func (*TestMutation) AddedEdges ¶
func (m *TestMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TestMutation) AddedField ¶
func (m *TestMutation) 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 (*TestMutation) AddedFields ¶
func (m *TestMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TestMutation) AddedIDs ¶
func (m *TestMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TestMutation) AddedMark ¶
func (m *TestMutation) AddedMark() (r float64, exists bool)
AddedMark returns the value that was added to the "mark" field in this mutation.
func (*TestMutation) AddedQuestionCount ¶
func (m *TestMutation) AddedQuestionCount() (r int, exists bool)
AddedQuestionCount returns the value that was added to the "question_count" field in this mutation.
func (*TestMutation) AvailableLocales ¶
func (m *TestMutation) AvailableLocales() (r []string, exists bool)
AvailableLocales returns the value of the "available_locales" field in the mutation.
func (*TestMutation) AvailableLocalesCleared ¶
func (m *TestMutation) AvailableLocalesCleared() bool
AvailableLocalesCleared returns if the "available_locales" field was cleared in this mutation.
func (*TestMutation) ClearAvailableLocales ¶
func (m *TestMutation) ClearAvailableLocales()
ClearAvailableLocales clears the value of the "available_locales" field.
func (*TestMutation) ClearDisplay ¶
func (m *TestMutation) ClearDisplay()
ClearDisplay clears the "display" edge to the TestDisplay entity.
func (*TestMutation) ClearDuration ¶
func (m *TestMutation) ClearDuration()
ClearDuration clears the value of the "duration" field.
func (*TestMutation) ClearEdge ¶
func (m *TestMutation) 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 (*TestMutation) ClearField ¶
func (m *TestMutation) 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 (*TestMutation) ClearImage ¶ added in v1.1.0
func (m *TestMutation) ClearImage()
ClearImage clears the value of the "image" field.
func (*TestMutation) ClearQuestions ¶
func (m *TestMutation) ClearQuestions()
ClearQuestions clears the "questions" edge to the Question entity.
func (*TestMutation) ClearScales ¶
func (m *TestMutation) ClearScales()
ClearScales clears the "scales" edge to the Scale entity.
func (*TestMutation) ClearTags ¶
func (m *TestMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*TestMutation) ClearTakes ¶
func (m *TestMutation) ClearTakes()
ClearTakes clears the "takes" edge to the Take entity.
func (*TestMutation) ClearTranslations ¶
func (m *TestMutation) ClearTranslations()
ClearTranslations clears the "translations" edge to the TestTranslation entity.
func (*TestMutation) ClearedEdges ¶
func (m *TestMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TestMutation) ClearedFields ¶
func (m *TestMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TestMutation) Client ¶
func (m TestMutation) 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 (*TestMutation) Code ¶
func (m *TestMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*TestMutation) CreateTime ¶
func (m *TestMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*TestMutation) DisplayCleared ¶
func (m *TestMutation) DisplayCleared() bool
DisplayCleared reports if the "display" edge to the TestDisplay entity was cleared.
func (*TestMutation) DisplayID ¶
func (m *TestMutation) DisplayID() (id uuid.UUID, exists bool)
DisplayID returns the "display" edge ID in the mutation.
func (*TestMutation) DisplayIDs ¶
func (m *TestMutation) DisplayIDs() (ids []uuid.UUID)
DisplayIDs returns the "display" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DisplayID instead. It exists only for internal usage by the builders.
func (*TestMutation) Duration ¶
func (m *TestMutation) Duration() (r time.Duration, exists bool)
Duration returns the value of the "duration" field in the mutation.
func (*TestMutation) DurationCleared ¶
func (m *TestMutation) DurationCleared() bool
DurationCleared returns if the "duration" field was cleared in this mutation.
func (*TestMutation) EdgeCleared ¶
func (m *TestMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TestMutation) Field ¶
func (m *TestMutation) 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 (*TestMutation) FieldCleared ¶
func (m *TestMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TestMutation) Fields ¶
func (m *TestMutation) 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 (*TestMutation) ID ¶
func (m *TestMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TestMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TestMutation) Image ¶ added in v1.1.0
func (m *TestMutation) Image() (r string, exists bool)
Image returns the value of the "image" field in the mutation.
func (*TestMutation) ImageCleared ¶ added in v1.1.0
func (m *TestMutation) ImageCleared() bool
ImageCleared returns if the "image" field was cleared in this mutation.
func (*TestMutation) Mark ¶
func (m *TestMutation) Mark() (r float64, exists bool)
Mark returns the value of the "mark" field in the mutation.
func (*TestMutation) OldAvailableLocales ¶
func (m *TestMutation) OldAvailableLocales(ctx context.Context) (v []string, err error)
OldAvailableLocales returns the old "available_locales" field's value of the Test entity. If the Test 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 (*TestMutation) OldCode ¶
func (m *TestMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Test entity. If the Test 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 (*TestMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Test entity. If the Test 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 (*TestMutation) OldDuration ¶
OldDuration returns the old "duration" field's value of the Test entity. If the Test 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 (*TestMutation) 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 (*TestMutation) OldImage ¶ added in v1.1.0
func (m *TestMutation) OldImage(ctx context.Context) (v string, err error)
OldImage returns the old "image" field's value of the Test entity. If the Test 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 (*TestMutation) OldMark ¶
func (m *TestMutation) OldMark(ctx context.Context) (v float64, err error)
OldMark returns the old "mark" field's value of the Test entity. If the Test 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 (*TestMutation) OldPublished ¶
func (m *TestMutation) OldPublished(ctx context.Context) (v bool, err error)
OldPublished returns the old "published" field's value of the Test entity. If the Test 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 (*TestMutation) OldQuestionCount ¶
func (m *TestMutation) OldQuestionCount(ctx context.Context) (v int, err error)
OldQuestionCount returns the old "question_count" field's value of the Test entity. If the Test 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 (*TestMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Test entity. If the Test 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 (*TestMutation) Published ¶
func (m *TestMutation) Published() (r bool, exists bool)
Published returns the value of the "published" field in the mutation.
func (*TestMutation) QuestionCount ¶
func (m *TestMutation) QuestionCount() (r int, exists bool)
QuestionCount returns the value of the "question_count" field in the mutation.
func (*TestMutation) QuestionsCleared ¶
func (m *TestMutation) QuestionsCleared() bool
QuestionsCleared reports if the "questions" edge to the Question entity was cleared.
func (*TestMutation) QuestionsIDs ¶
func (m *TestMutation) QuestionsIDs() (ids []uuid.UUID)
QuestionsIDs returns the "questions" edge IDs in the mutation.
func (*TestMutation) RemoveQuestionIDs ¶
func (m *TestMutation) RemoveQuestionIDs(ids ...uuid.UUID)
RemoveQuestionIDs removes the "questions" edge to the Question entity by IDs.
func (*TestMutation) RemoveScaleIDs ¶
func (m *TestMutation) RemoveScaleIDs(ids ...uuid.UUID)
RemoveScaleIDs removes the "scales" edge to the Scale entity by IDs.
func (*TestMutation) RemoveTagIDs ¶
func (m *TestMutation) RemoveTagIDs(ids ...uuid.UUID)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*TestMutation) RemoveTakeIDs ¶
func (m *TestMutation) RemoveTakeIDs(ids ...uuid.UUID)
RemoveTakeIDs removes the "takes" edge to the Take entity by IDs.
func (*TestMutation) RemoveTranslationIDs ¶
func (m *TestMutation) RemoveTranslationIDs(ids ...uuid.UUID)
RemoveTranslationIDs removes the "translations" edge to the TestTranslation entity by IDs.
func (*TestMutation) RemovedEdges ¶
func (m *TestMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TestMutation) RemovedIDs ¶
func (m *TestMutation) 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 (*TestMutation) RemovedQuestionsIDs ¶
func (m *TestMutation) RemovedQuestionsIDs() (ids []uuid.UUID)
RemovedQuestions returns the removed IDs of the "questions" edge to the Question entity.
func (*TestMutation) RemovedScalesIDs ¶
func (m *TestMutation) RemovedScalesIDs() (ids []uuid.UUID)
RemovedScales returns the removed IDs of the "scales" edge to the Scale entity.
func (*TestMutation) RemovedTagsIDs ¶
func (m *TestMutation) RemovedTagsIDs() (ids []uuid.UUID)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*TestMutation) RemovedTakesIDs ¶
func (m *TestMutation) RemovedTakesIDs() (ids []uuid.UUID)
RemovedTakes returns the removed IDs of the "takes" edge to the Take entity.
func (*TestMutation) RemovedTranslationsIDs ¶
func (m *TestMutation) RemovedTranslationsIDs() (ids []uuid.UUID)
RemovedTranslations returns the removed IDs of the "translations" edge to the TestTranslation entity.
func (*TestMutation) ResetAvailableLocales ¶
func (m *TestMutation) ResetAvailableLocales()
ResetAvailableLocales resets all changes to the "available_locales" field.
func (*TestMutation) ResetCode ¶
func (m *TestMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*TestMutation) ResetCreateTime ¶
func (m *TestMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*TestMutation) ResetDisplay ¶
func (m *TestMutation) ResetDisplay()
ResetDisplay resets all changes to the "display" edge.
func (*TestMutation) ResetDuration ¶
func (m *TestMutation) ResetDuration()
ResetDuration resets all changes to the "duration" field.
func (*TestMutation) ResetEdge ¶
func (m *TestMutation) 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 (*TestMutation) ResetField ¶
func (m *TestMutation) 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 (*TestMutation) ResetImage ¶ added in v1.1.0
func (m *TestMutation) ResetImage()
ResetImage resets all changes to the "image" field.
func (*TestMutation) ResetMark ¶
func (m *TestMutation) ResetMark()
ResetMark resets all changes to the "mark" field.
func (*TestMutation) ResetPublished ¶
func (m *TestMutation) ResetPublished()
ResetPublished resets all changes to the "published" field.
func (*TestMutation) ResetQuestionCount ¶
func (m *TestMutation) ResetQuestionCount()
ResetQuestionCount resets all changes to the "question_count" field.
func (*TestMutation) ResetQuestions ¶
func (m *TestMutation) ResetQuestions()
ResetQuestions resets all changes to the "questions" edge.
func (*TestMutation) ResetScales ¶
func (m *TestMutation) ResetScales()
ResetScales resets all changes to the "scales" edge.
func (*TestMutation) ResetTags ¶
func (m *TestMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*TestMutation) ResetTakes ¶
func (m *TestMutation) ResetTakes()
ResetTakes resets all changes to the "takes" edge.
func (*TestMutation) ResetTranslations ¶
func (m *TestMutation) ResetTranslations()
ResetTranslations resets all changes to the "translations" edge.
func (*TestMutation) ResetUpdateTime ¶
func (m *TestMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*TestMutation) ScalesCleared ¶
func (m *TestMutation) ScalesCleared() bool
ScalesCleared reports if the "scales" edge to the Scale entity was cleared.
func (*TestMutation) ScalesIDs ¶
func (m *TestMutation) ScalesIDs() (ids []uuid.UUID)
ScalesIDs returns the "scales" edge IDs in the mutation.
func (*TestMutation) SetAvailableLocales ¶
func (m *TestMutation) SetAvailableLocales(s []string)
SetAvailableLocales sets the "available_locales" field.
func (*TestMutation) SetCode ¶
func (m *TestMutation) SetCode(s string)
SetCode sets the "code" field.
func (*TestMutation) SetCreateTime ¶
func (m *TestMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*TestMutation) SetDisplayID ¶
func (m *TestMutation) SetDisplayID(id uuid.UUID)
SetDisplayID sets the "display" edge to the TestDisplay entity by id.
func (*TestMutation) SetDuration ¶
func (m *TestMutation) SetDuration(t time.Duration)
SetDuration sets the "duration" field.
func (*TestMutation) SetField ¶
func (m *TestMutation) 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 (*TestMutation) SetID ¶
func (m *TestMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Test entities.
func (*TestMutation) SetImage ¶ added in v1.1.0
func (m *TestMutation) SetImage(s string)
SetImage sets the "image" field.
func (*TestMutation) SetMark ¶
func (m *TestMutation) SetMark(f float64)
SetMark sets the "mark" field.
func (*TestMutation) SetPublished ¶
func (m *TestMutation) SetPublished(b bool)
SetPublished sets the "published" field.
func (*TestMutation) SetQuestionCount ¶
func (m *TestMutation) SetQuestionCount(i int)
SetQuestionCount sets the "question_count" field.
func (*TestMutation) SetUpdateTime ¶
func (m *TestMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*TestMutation) TagsCleared ¶
func (m *TestMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*TestMutation) TagsIDs ¶
func (m *TestMutation) TagsIDs() (ids []uuid.UUID)
TagsIDs returns the "tags" edge IDs in the mutation.
func (*TestMutation) TakesCleared ¶
func (m *TestMutation) TakesCleared() bool
TakesCleared reports if the "takes" edge to the Take entity was cleared.
func (*TestMutation) TakesIDs ¶
func (m *TestMutation) TakesIDs() (ids []uuid.UUID)
TakesIDs returns the "takes" edge IDs in the mutation.
func (*TestMutation) TranslationsCleared ¶
func (m *TestMutation) TranslationsCleared() bool
TranslationsCleared reports if the "translations" edge to the TestTranslation entity was cleared.
func (*TestMutation) TranslationsIDs ¶
func (m *TestMutation) TranslationsIDs() (ids []uuid.UUID)
TranslationsIDs returns the "translations" edge IDs in the mutation.
func (TestMutation) Tx ¶
func (m TestMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TestMutation) Type ¶
func (m *TestMutation) Type() string
Type returns the node type of this mutation (Test).
func (*TestMutation) UpdateTime ¶
func (m *TestMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*TestMutation) Where ¶
func (m *TestMutation) Where(ps ...predicate.Test)
Where appends a list predicates to the TestMutation builder.
type TestQuery ¶
type TestQuery struct {
// contains filtered or unexported fields
}
TestQuery is the builder for querying Test entities.
func (*TestQuery) Clone ¶
Clone returns a duplicate of the TestQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TestQuery) First ¶
First returns the first Test entity from the query. Returns a *NotFoundError when no Test was found.
func (*TestQuery) FirstID ¶
FirstID returns the first Test ID from the query. Returns a *NotFoundError when no Test ID was found.
func (*TestQuery) GroupBy ¶
func (tq *TestQuery) GroupBy(field string, fields ...string) *TestGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Test.Query(). GroupBy(test.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TestQuery) Only ¶
Only returns a single Test entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Test entity is found. Returns a *NotFoundError when no Test entities are found.
func (*TestQuery) OnlyID ¶
OnlyID is like Only, but returns the only Test ID in the query. Returns a *NotSingularError when more than one Test ID is found. Returns a *NotFoundError when no entities are found.
func (*TestQuery) QueryDisplay ¶
func (tq *TestQuery) QueryDisplay() *TestDisplayQuery
QueryDisplay chains the current query on the "display" edge.
func (*TestQuery) QueryQuestions ¶
func (tq *TestQuery) QueryQuestions() *QuestionQuery
QueryQuestions chains the current query on the "questions" edge.
func (*TestQuery) QueryScales ¶
func (tq *TestQuery) QueryScales() *ScaleQuery
QueryScales chains the current query on the "scales" edge.
func (*TestQuery) QueryTakes ¶
QueryTakes chains the current query on the "takes" edge.
func (*TestQuery) QueryTranslations ¶
func (tq *TestQuery) QueryTranslations() *TestTranslationQuery
QueryTranslations chains the current query on the "translations" edge.
func (*TestQuery) Select ¶
func (tq *TestQuery) Select(fields ...string) *TestSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Test.Query(). Select(test.FieldCreateTime). Scan(ctx, &v)
func (*TestQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*TestQuery) WithDisplay ¶
func (tq *TestQuery) WithDisplay(opts ...func(*TestDisplayQuery)) *TestQuery
WithDisplay tells the query-builder to eager-load the nodes that are connected to the "display" edge. The optional arguments are used to configure the query builder of the edge.
func (*TestQuery) WithQuestions ¶
func (tq *TestQuery) WithQuestions(opts ...func(*QuestionQuery)) *TestQuery
WithQuestions tells the query-builder to eager-load the nodes that are connected to the "questions" edge. The optional arguments are used to configure the query builder of the edge.
func (*TestQuery) WithScales ¶
func (tq *TestQuery) WithScales(opts ...func(*ScaleQuery)) *TestQuery
WithScales tells the query-builder to eager-load the nodes that are connected to the "scales" edge. The optional arguments are used to configure the query builder of the edge.
func (*TestQuery) WithTags ¶
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*TestQuery) WithTakes ¶
WithTakes tells the query-builder to eager-load the nodes that are connected to the "takes" edge. The optional arguments are used to configure the query builder of the edge.
func (*TestQuery) WithTranslations ¶
func (tq *TestQuery) WithTranslations(opts ...func(*TestTranslationQuery)) *TestQuery
WithTranslations tells the query-builder to eager-load the nodes that are connected to the "translations" edge. The optional arguments are used to configure the query builder of the edge.
type TestSelect ¶
type TestSelect struct { *TestQuery // contains filtered or unexported fields }
TestSelect is the builder for selecting fields of Test entities.
func (*TestSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TestSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TestSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TestSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TestSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TestSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TestSelect) Scan ¶
func (ts *TestSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TestSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TestTranslation ¶
type TestTranslation struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Locale holds the value of the "locale" field. Locale testtranslation.Locale `json:"locale,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Details holds the value of the "details" field. Details string `json:"details,omitempty"` // Instruction holds the value of the "instruction" field. Instruction string `json:"instruction,omitempty"` // ResultPreambule holds the value of the "result_preambule" field. ResultPreambule string `json:"result_preambule,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TestTranslationQuery when eager-loading is set. Edges TestTranslationEdges `json:"edges"` // contains filtered or unexported fields }
TestTranslation is the model entity for the TestTranslation schema.
func (*TestTranslation) QueryTest ¶
func (tt *TestTranslation) QueryTest() *TestQuery
QueryTest queries the "test" edge of the TestTranslation entity.
func (*TestTranslation) String ¶
func (tt *TestTranslation) String() string
String implements the fmt.Stringer.
func (*TestTranslation) Unwrap ¶
func (tt *TestTranslation) Unwrap() *TestTranslation
Unwrap unwraps the TestTranslation 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 (*TestTranslation) Update ¶
func (tt *TestTranslation) Update() *TestTranslationUpdateOne
Update returns a builder for updating this TestTranslation. Note that you need to call TestTranslation.Unwrap() before calling this method if this TestTranslation was returned from a transaction, and the transaction was committed or rolled back.
type TestTranslationClient ¶
type TestTranslationClient struct {
// contains filtered or unexported fields
}
TestTranslationClient is a client for the TestTranslation schema.
func NewTestTranslationClient ¶
func NewTestTranslationClient(c config) *TestTranslationClient
NewTestTranslationClient returns a client for the TestTranslation from the given config.
func (*TestTranslationClient) Create ¶
func (c *TestTranslationClient) Create() *TestTranslationCreate
Create returns a builder for creating a TestTranslation entity.
func (*TestTranslationClient) CreateBulk ¶
func (c *TestTranslationClient) CreateBulk(builders ...*TestTranslationCreate) *TestTranslationCreateBulk
CreateBulk returns a builder for creating a bulk of TestTranslation entities.
func (*TestTranslationClient) Delete ¶
func (c *TestTranslationClient) Delete() *TestTranslationDelete
Delete returns a delete builder for TestTranslation.
func (*TestTranslationClient) DeleteOne ¶
func (c *TestTranslationClient) DeleteOne(tt *TestTranslation) *TestTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TestTranslationClient) DeleteOneID ¶
func (c *TestTranslationClient) DeleteOneID(id uuid.UUID) *TestTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*TestTranslationClient) Get ¶
func (c *TestTranslationClient) Get(ctx context.Context, id uuid.UUID) (*TestTranslation, error)
Get returns a TestTranslation entity by its id.
func (*TestTranslationClient) GetX ¶
func (c *TestTranslationClient) GetX(ctx context.Context, id uuid.UUID) *TestTranslation
GetX is like Get, but panics if an error occurs.
func (*TestTranslationClient) Hooks ¶
func (c *TestTranslationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TestTranslationClient) Query ¶
func (c *TestTranslationClient) Query() *TestTranslationQuery
Query returns a query builder for TestTranslation.
func (*TestTranslationClient) QueryTest ¶
func (c *TestTranslationClient) QueryTest(tt *TestTranslation) *TestQuery
QueryTest queries the test edge of a TestTranslation.
func (*TestTranslationClient) Update ¶
func (c *TestTranslationClient) Update() *TestTranslationUpdate
Update returns an update builder for TestTranslation.
func (*TestTranslationClient) UpdateOne ¶
func (c *TestTranslationClient) UpdateOne(tt *TestTranslation) *TestTranslationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TestTranslationClient) UpdateOneID ¶
func (c *TestTranslationClient) UpdateOneID(id uuid.UUID) *TestTranslationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TestTranslationClient) Use ¶
func (c *TestTranslationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `testtranslation.Hooks(f(g(h())))`.
type TestTranslationCreate ¶
type TestTranslationCreate struct {
// contains filtered or unexported fields
}
TestTranslationCreate is the builder for creating a TestTranslation entity.
func (*TestTranslationCreate) Exec ¶
func (ttc *TestTranslationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TestTranslationCreate) ExecX ¶
func (ttc *TestTranslationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TestTranslationCreate) Mutation ¶
func (ttc *TestTranslationCreate) Mutation() *TestTranslationMutation
Mutation returns the TestTranslationMutation object of the builder.
func (*TestTranslationCreate) Save ¶
func (ttc *TestTranslationCreate) Save(ctx context.Context) (*TestTranslation, error)
Save creates the TestTranslation in the database.
func (*TestTranslationCreate) SaveX ¶
func (ttc *TestTranslationCreate) SaveX(ctx context.Context) *TestTranslation
SaveX calls Save and panics if Save returns an error.
func (*TestTranslationCreate) SetDescription ¶
func (ttc *TestTranslationCreate) SetDescription(s string) *TestTranslationCreate
SetDescription sets the "description" field.
func (*TestTranslationCreate) SetDetails ¶
func (ttc *TestTranslationCreate) SetDetails(s string) *TestTranslationCreate
SetDetails sets the "details" field.
func (*TestTranslationCreate) SetID ¶
func (ttc *TestTranslationCreate) SetID(u uuid.UUID) *TestTranslationCreate
SetID sets the "id" field.
func (*TestTranslationCreate) SetInstruction ¶
func (ttc *TestTranslationCreate) SetInstruction(s string) *TestTranslationCreate
SetInstruction sets the "instruction" field.
func (*TestTranslationCreate) SetLocale ¶
func (ttc *TestTranslationCreate) SetLocale(t testtranslation.Locale) *TestTranslationCreate
SetLocale sets the "locale" field.
func (*TestTranslationCreate) SetNillableDescription ¶
func (ttc *TestTranslationCreate) SetNillableDescription(s *string) *TestTranslationCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TestTranslationCreate) SetNillableDetails ¶
func (ttc *TestTranslationCreate) SetNillableDetails(s *string) *TestTranslationCreate
SetNillableDetails sets the "details" field if the given value is not nil.
func (*TestTranslationCreate) SetNillableID ¶
func (ttc *TestTranslationCreate) SetNillableID(u *uuid.UUID) *TestTranslationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TestTranslationCreate) SetNillableInstruction ¶
func (ttc *TestTranslationCreate) SetNillableInstruction(s *string) *TestTranslationCreate
SetNillableInstruction sets the "instruction" field if the given value is not nil.
func (*TestTranslationCreate) SetNillableResultPreambule ¶
func (ttc *TestTranslationCreate) SetNillableResultPreambule(s *string) *TestTranslationCreate
SetNillableResultPreambule sets the "result_preambule" field if the given value is not nil.
func (*TestTranslationCreate) SetNillableTestID ¶
func (ttc *TestTranslationCreate) SetNillableTestID(id *uuid.UUID) *TestTranslationCreate
SetNillableTestID sets the "test" edge to the Test entity by ID if the given value is not nil.
func (*TestTranslationCreate) SetResultPreambule ¶
func (ttc *TestTranslationCreate) SetResultPreambule(s string) *TestTranslationCreate
SetResultPreambule sets the "result_preambule" field.
func (*TestTranslationCreate) SetTest ¶
func (ttc *TestTranslationCreate) SetTest(t *Test) *TestTranslationCreate
SetTest sets the "test" edge to the Test entity.
func (*TestTranslationCreate) SetTestID ¶
func (ttc *TestTranslationCreate) SetTestID(id uuid.UUID) *TestTranslationCreate
SetTestID sets the "test" edge to the Test entity by ID.
func (*TestTranslationCreate) SetTitle ¶
func (ttc *TestTranslationCreate) SetTitle(s string) *TestTranslationCreate
SetTitle sets the "title" field.
type TestTranslationCreateBulk ¶
type TestTranslationCreateBulk struct {
// contains filtered or unexported fields
}
TestTranslationCreateBulk is the builder for creating many TestTranslation entities in bulk.
func (*TestTranslationCreateBulk) Exec ¶
func (ttcb *TestTranslationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TestTranslationCreateBulk) ExecX ¶
func (ttcb *TestTranslationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TestTranslationCreateBulk) Save ¶
func (ttcb *TestTranslationCreateBulk) Save(ctx context.Context) ([]*TestTranslation, error)
Save creates the TestTranslation entities in the database.
func (*TestTranslationCreateBulk) SaveX ¶
func (ttcb *TestTranslationCreateBulk) SaveX(ctx context.Context) []*TestTranslation
SaveX is like Save, but panics if an error occurs.
type TestTranslationDelete ¶
type TestTranslationDelete struct {
// contains filtered or unexported fields
}
TestTranslationDelete is the builder for deleting a TestTranslation entity.
func (*TestTranslationDelete) Exec ¶
func (ttd *TestTranslationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TestTranslationDelete) ExecX ¶
func (ttd *TestTranslationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TestTranslationDelete) Where ¶
func (ttd *TestTranslationDelete) Where(ps ...predicate.TestTranslation) *TestTranslationDelete
Where appends a list predicates to the TestTranslationDelete builder.
type TestTranslationDeleteOne ¶
type TestTranslationDeleteOne struct {
// contains filtered or unexported fields
}
TestTranslationDeleteOne is the builder for deleting a single TestTranslation entity.
func (*TestTranslationDeleteOne) Exec ¶
func (ttdo *TestTranslationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TestTranslationDeleteOne) ExecX ¶
func (ttdo *TestTranslationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TestTranslationEdges ¶
type TestTranslationEdges struct { // Test holds the value of the test edge. Test *Test `json:"test,omitempty"` // contains filtered or unexported fields }
TestTranslationEdges holds the relations/edges for other nodes in the graph.
func (TestTranslationEdges) TestOrErr ¶
func (e TestTranslationEdges) TestOrErr() (*Test, error)
TestOrErr returns the Test value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TestTranslationGroupBy ¶
type TestTranslationGroupBy struct {
// contains filtered or unexported fields
}
TestTranslationGroupBy is the group-by builder for TestTranslation entities.
func (*TestTranslationGroupBy) Aggregate ¶
func (ttgb *TestTranslationGroupBy) Aggregate(fns ...AggregateFunc) *TestTranslationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TestTranslationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TestTranslationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TestTranslationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TestTranslationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TestTranslationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TestTranslationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TestTranslationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TestTranslationGroupBy) Scan ¶
func (ttgb *TestTranslationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TestTranslationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TestTranslationMutation ¶
type TestTranslationMutation struct {
// contains filtered or unexported fields
}
TestTranslationMutation represents an operation that mutates the TestTranslation nodes in the graph.
func (*TestTranslationMutation) AddField ¶
func (m *TestTranslationMutation) 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 (*TestTranslationMutation) AddedEdges ¶
func (m *TestTranslationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TestTranslationMutation) AddedField ¶
func (m *TestTranslationMutation) 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 (*TestTranslationMutation) AddedFields ¶
func (m *TestTranslationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TestTranslationMutation) AddedIDs ¶
func (m *TestTranslationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TestTranslationMutation) ClearDescription ¶
func (m *TestTranslationMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*TestTranslationMutation) ClearDetails ¶
func (m *TestTranslationMutation) ClearDetails()
ClearDetails clears the value of the "details" field.
func (*TestTranslationMutation) ClearEdge ¶
func (m *TestTranslationMutation) 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 (*TestTranslationMutation) ClearField ¶
func (m *TestTranslationMutation) 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 (*TestTranslationMutation) ClearInstruction ¶
func (m *TestTranslationMutation) ClearInstruction()
ClearInstruction clears the value of the "instruction" field.
func (*TestTranslationMutation) ClearResultPreambule ¶
func (m *TestTranslationMutation) ClearResultPreambule()
ClearResultPreambule clears the value of the "result_preambule" field.
func (*TestTranslationMutation) ClearTest ¶
func (m *TestTranslationMutation) ClearTest()
ClearTest clears the "test" edge to the Test entity.
func (*TestTranslationMutation) ClearedEdges ¶
func (m *TestTranslationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TestTranslationMutation) ClearedFields ¶
func (m *TestTranslationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TestTranslationMutation) Client ¶
func (m TestTranslationMutation) 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 (*TestTranslationMutation) Description ¶
func (m *TestTranslationMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*TestTranslationMutation) DescriptionCleared ¶
func (m *TestTranslationMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*TestTranslationMutation) Details ¶
func (m *TestTranslationMutation) Details() (r string, exists bool)
Details returns the value of the "details" field in the mutation.
func (*TestTranslationMutation) DetailsCleared ¶
func (m *TestTranslationMutation) DetailsCleared() bool
DetailsCleared returns if the "details" field was cleared in this mutation.
func (*TestTranslationMutation) EdgeCleared ¶
func (m *TestTranslationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TestTranslationMutation) Field ¶
func (m *TestTranslationMutation) 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 (*TestTranslationMutation) FieldCleared ¶
func (m *TestTranslationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TestTranslationMutation) Fields ¶
func (m *TestTranslationMutation) 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 (*TestTranslationMutation) ID ¶
func (m *TestTranslationMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TestTranslationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TestTranslationMutation) Instruction ¶
func (m *TestTranslationMutation) Instruction() (r string, exists bool)
Instruction returns the value of the "instruction" field in the mutation.
func (*TestTranslationMutation) InstructionCleared ¶
func (m *TestTranslationMutation) InstructionCleared() bool
InstructionCleared returns if the "instruction" field was cleared in this mutation.
func (*TestTranslationMutation) Locale ¶
func (m *TestTranslationMutation) Locale() (r testtranslation.Locale, exists bool)
Locale returns the value of the "locale" field in the mutation.
func (*TestTranslationMutation) OldDescription ¶
func (m *TestTranslationMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the TestTranslation entity. If the TestTranslation 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 (*TestTranslationMutation) OldDetails ¶
func (m *TestTranslationMutation) OldDetails(ctx context.Context) (v string, err error)
OldDetails returns the old "details" field's value of the TestTranslation entity. If the TestTranslation 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 (*TestTranslationMutation) 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 (*TestTranslationMutation) OldInstruction ¶
func (m *TestTranslationMutation) OldInstruction(ctx context.Context) (v string, err error)
OldInstruction returns the old "instruction" field's value of the TestTranslation entity. If the TestTranslation 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 (*TestTranslationMutation) OldLocale ¶
func (m *TestTranslationMutation) OldLocale(ctx context.Context) (v testtranslation.Locale, err error)
OldLocale returns the old "locale" field's value of the TestTranslation entity. If the TestTranslation 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 (*TestTranslationMutation) OldResultPreambule ¶
func (m *TestTranslationMutation) OldResultPreambule(ctx context.Context) (v string, err error)
OldResultPreambule returns the old "result_preambule" field's value of the TestTranslation entity. If the TestTranslation 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 (*TestTranslationMutation) OldTitle ¶
func (m *TestTranslationMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the TestTranslation entity. If the TestTranslation 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 (*TestTranslationMutation) Op ¶
func (m *TestTranslationMutation) Op() Op
Op returns the operation name.
func (*TestTranslationMutation) RemovedEdges ¶
func (m *TestTranslationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TestTranslationMutation) RemovedIDs ¶
func (m *TestTranslationMutation) 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 (*TestTranslationMutation) ResetDescription ¶
func (m *TestTranslationMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*TestTranslationMutation) ResetDetails ¶
func (m *TestTranslationMutation) ResetDetails()
ResetDetails resets all changes to the "details" field.
func (*TestTranslationMutation) ResetEdge ¶
func (m *TestTranslationMutation) 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 (*TestTranslationMutation) ResetField ¶
func (m *TestTranslationMutation) 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 (*TestTranslationMutation) ResetInstruction ¶
func (m *TestTranslationMutation) ResetInstruction()
ResetInstruction resets all changes to the "instruction" field.
func (*TestTranslationMutation) ResetLocale ¶
func (m *TestTranslationMutation) ResetLocale()
ResetLocale resets all changes to the "locale" field.
func (*TestTranslationMutation) ResetResultPreambule ¶
func (m *TestTranslationMutation) ResetResultPreambule()
ResetResultPreambule resets all changes to the "result_preambule" field.
func (*TestTranslationMutation) ResetTest ¶
func (m *TestTranslationMutation) ResetTest()
ResetTest resets all changes to the "test" edge.
func (*TestTranslationMutation) ResetTitle ¶
func (m *TestTranslationMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*TestTranslationMutation) ResultPreambule ¶
func (m *TestTranslationMutation) ResultPreambule() (r string, exists bool)
ResultPreambule returns the value of the "result_preambule" field in the mutation.
func (*TestTranslationMutation) ResultPreambuleCleared ¶
func (m *TestTranslationMutation) ResultPreambuleCleared() bool
ResultPreambuleCleared returns if the "result_preambule" field was cleared in this mutation.
func (*TestTranslationMutation) SetDescription ¶
func (m *TestTranslationMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*TestTranslationMutation) SetDetails ¶
func (m *TestTranslationMutation) SetDetails(s string)
SetDetails sets the "details" field.
func (*TestTranslationMutation) SetField ¶
func (m *TestTranslationMutation) 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 (*TestTranslationMutation) SetID ¶
func (m *TestTranslationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of TestTranslation entities.
func (*TestTranslationMutation) SetInstruction ¶
func (m *TestTranslationMutation) SetInstruction(s string)
SetInstruction sets the "instruction" field.
func (*TestTranslationMutation) SetLocale ¶
func (m *TestTranslationMutation) SetLocale(t testtranslation.Locale)
SetLocale sets the "locale" field.
func (*TestTranslationMutation) SetResultPreambule ¶
func (m *TestTranslationMutation) SetResultPreambule(s string)
SetResultPreambule sets the "result_preambule" field.
func (*TestTranslationMutation) SetTestID ¶
func (m *TestTranslationMutation) SetTestID(id uuid.UUID)
SetTestID sets the "test" edge to the Test entity by id.
func (*TestTranslationMutation) SetTitle ¶
func (m *TestTranslationMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*TestTranslationMutation) TestCleared ¶
func (m *TestTranslationMutation) TestCleared() bool
TestCleared reports if the "test" edge to the Test entity was cleared.
func (*TestTranslationMutation) TestID ¶
func (m *TestTranslationMutation) TestID() (id uuid.UUID, exists bool)
TestID returns the "test" edge ID in the mutation.
func (*TestTranslationMutation) TestIDs ¶
func (m *TestTranslationMutation) TestIDs() (ids []uuid.UUID)
TestIDs returns the "test" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TestID instead. It exists only for internal usage by the builders.
func (*TestTranslationMutation) Title ¶
func (m *TestTranslationMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (TestTranslationMutation) Tx ¶
func (m TestTranslationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TestTranslationMutation) Type ¶
func (m *TestTranslationMutation) Type() string
Type returns the node type of this mutation (TestTranslation).
func (*TestTranslationMutation) Where ¶
func (m *TestTranslationMutation) Where(ps ...predicate.TestTranslation)
Where appends a list predicates to the TestTranslationMutation builder.
type TestTranslationQuery ¶
type TestTranslationQuery struct {
// contains filtered or unexported fields
}
TestTranslationQuery is the builder for querying TestTranslation entities.
func (*TestTranslationQuery) All ¶
func (ttq *TestTranslationQuery) All(ctx context.Context) ([]*TestTranslation, error)
All executes the query and returns a list of TestTranslations.
func (*TestTranslationQuery) AllX ¶
func (ttq *TestTranslationQuery) AllX(ctx context.Context) []*TestTranslation
AllX is like All, but panics if an error occurs.
func (*TestTranslationQuery) Clone ¶
func (ttq *TestTranslationQuery) Clone() *TestTranslationQuery
Clone returns a duplicate of the TestTranslationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TestTranslationQuery) Count ¶
func (ttq *TestTranslationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TestTranslationQuery) CountX ¶
func (ttq *TestTranslationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TestTranslationQuery) Exist ¶
func (ttq *TestTranslationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TestTranslationQuery) ExistX ¶
func (ttq *TestTranslationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TestTranslationQuery) First ¶
func (ttq *TestTranslationQuery) First(ctx context.Context) (*TestTranslation, error)
First returns the first TestTranslation entity from the query. Returns a *NotFoundError when no TestTranslation was found.
func (*TestTranslationQuery) FirstID ¶
FirstID returns the first TestTranslation ID from the query. Returns a *NotFoundError when no TestTranslation ID was found.
func (*TestTranslationQuery) FirstIDX ¶
func (ttq *TestTranslationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*TestTranslationQuery) FirstX ¶
func (ttq *TestTranslationQuery) FirstX(ctx context.Context) *TestTranslation
FirstX is like First, but panics if an error occurs.
func (*TestTranslationQuery) GroupBy ¶
func (ttq *TestTranslationQuery) GroupBy(field string, fields ...string) *TestTranslationGroupBy
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 { Locale testtranslation.Locale `json:"locale,omitempty"` Count int `json:"count,omitempty"` } client.TestTranslation.Query(). GroupBy(testtranslation.FieldLocale). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TestTranslationQuery) IDs ¶
IDs executes the query and returns a list of TestTranslation IDs.
func (*TestTranslationQuery) IDsX ¶
func (ttq *TestTranslationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*TestTranslationQuery) Limit ¶
func (ttq *TestTranslationQuery) Limit(limit int) *TestTranslationQuery
Limit adds a limit step to the query.
func (*TestTranslationQuery) Offset ¶
func (ttq *TestTranslationQuery) Offset(offset int) *TestTranslationQuery
Offset adds an offset step to the query.
func (*TestTranslationQuery) Only ¶
func (ttq *TestTranslationQuery) Only(ctx context.Context) (*TestTranslation, error)
Only returns a single TestTranslation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TestTranslation entity is found. Returns a *NotFoundError when no TestTranslation entities are found.
func (*TestTranslationQuery) OnlyID ¶
OnlyID is like Only, but returns the only TestTranslation ID in the query. Returns a *NotSingularError when more than one TestTranslation ID is found. Returns a *NotFoundError when no entities are found.
func (*TestTranslationQuery) OnlyIDX ¶
func (ttq *TestTranslationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TestTranslationQuery) OnlyX ¶
func (ttq *TestTranslationQuery) OnlyX(ctx context.Context) *TestTranslation
OnlyX is like Only, but panics if an error occurs.
func (*TestTranslationQuery) Order ¶
func (ttq *TestTranslationQuery) Order(o ...OrderFunc) *TestTranslationQuery
Order adds an order step to the query.
func (*TestTranslationQuery) QueryTest ¶
func (ttq *TestTranslationQuery) QueryTest() *TestQuery
QueryTest chains the current query on the "test" edge.
func (*TestTranslationQuery) Select ¶
func (ttq *TestTranslationQuery) Select(fields ...string) *TestTranslationSelect
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 { Locale testtranslation.Locale `json:"locale,omitempty"` } client.TestTranslation.Query(). Select(testtranslation.FieldLocale). Scan(ctx, &v)
func (*TestTranslationQuery) Unique ¶
func (ttq *TestTranslationQuery) Unique(unique bool) *TestTranslationQuery
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 (*TestTranslationQuery) Where ¶
func (ttq *TestTranslationQuery) Where(ps ...predicate.TestTranslation) *TestTranslationQuery
Where adds a new predicate for the TestTranslationQuery builder.
func (*TestTranslationQuery) WithTest ¶
func (ttq *TestTranslationQuery) WithTest(opts ...func(*TestQuery)) *TestTranslationQuery
WithTest tells the query-builder to eager-load the nodes that are connected to the "test" edge. The optional arguments are used to configure the query builder of the edge.
type TestTranslationSelect ¶
type TestTranslationSelect struct { *TestTranslationQuery // contains filtered or unexported fields }
TestTranslationSelect is the builder for selecting fields of TestTranslation entities.
func (*TestTranslationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TestTranslationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TestTranslationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TestTranslationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TestTranslationSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TestTranslationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TestTranslationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TestTranslationSelect) Scan ¶
func (tts *TestTranslationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TestTranslationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TestTranslationUpdate ¶
type TestTranslationUpdate struct {
// contains filtered or unexported fields
}
TestTranslationUpdate is the builder for updating TestTranslation entities.
func (*TestTranslationUpdate) ClearDescription ¶
func (ttu *TestTranslationUpdate) ClearDescription() *TestTranslationUpdate
ClearDescription clears the value of the "description" field.
func (*TestTranslationUpdate) ClearDetails ¶
func (ttu *TestTranslationUpdate) ClearDetails() *TestTranslationUpdate
ClearDetails clears the value of the "details" field.
func (*TestTranslationUpdate) ClearInstruction ¶
func (ttu *TestTranslationUpdate) ClearInstruction() *TestTranslationUpdate
ClearInstruction clears the value of the "instruction" field.
func (*TestTranslationUpdate) ClearResultPreambule ¶
func (ttu *TestTranslationUpdate) ClearResultPreambule() *TestTranslationUpdate
ClearResultPreambule clears the value of the "result_preambule" field.
func (*TestTranslationUpdate) ClearTest ¶
func (ttu *TestTranslationUpdate) ClearTest() *TestTranslationUpdate
ClearTest clears the "test" edge to the Test entity.
func (*TestTranslationUpdate) Exec ¶
func (ttu *TestTranslationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TestTranslationUpdate) ExecX ¶
func (ttu *TestTranslationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TestTranslationUpdate) Mutation ¶
func (ttu *TestTranslationUpdate) Mutation() *TestTranslationMutation
Mutation returns the TestTranslationMutation object of the builder.
func (*TestTranslationUpdate) Save ¶
func (ttu *TestTranslationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TestTranslationUpdate) SaveX ¶
func (ttu *TestTranslationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TestTranslationUpdate) SetDescription ¶
func (ttu *TestTranslationUpdate) SetDescription(s string) *TestTranslationUpdate
SetDescription sets the "description" field.
func (*TestTranslationUpdate) SetDetails ¶
func (ttu *TestTranslationUpdate) SetDetails(s string) *TestTranslationUpdate
SetDetails sets the "details" field.
func (*TestTranslationUpdate) SetInstruction ¶
func (ttu *TestTranslationUpdate) SetInstruction(s string) *TestTranslationUpdate
SetInstruction sets the "instruction" field.
func (*TestTranslationUpdate) SetNillableDescription ¶
func (ttu *TestTranslationUpdate) SetNillableDescription(s *string) *TestTranslationUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TestTranslationUpdate) SetNillableDetails ¶
func (ttu *TestTranslationUpdate) SetNillableDetails(s *string) *TestTranslationUpdate
SetNillableDetails sets the "details" field if the given value is not nil.
func (*TestTranslationUpdate) SetNillableInstruction ¶
func (ttu *TestTranslationUpdate) SetNillableInstruction(s *string) *TestTranslationUpdate
SetNillableInstruction sets the "instruction" field if the given value is not nil.
func (*TestTranslationUpdate) SetNillableResultPreambule ¶
func (ttu *TestTranslationUpdate) SetNillableResultPreambule(s *string) *TestTranslationUpdate
SetNillableResultPreambule sets the "result_preambule" field if the given value is not nil.
func (*TestTranslationUpdate) SetNillableTestID ¶
func (ttu *TestTranslationUpdate) SetNillableTestID(id *uuid.UUID) *TestTranslationUpdate
SetNillableTestID sets the "test" edge to the Test entity by ID if the given value is not nil.
func (*TestTranslationUpdate) SetResultPreambule ¶
func (ttu *TestTranslationUpdate) SetResultPreambule(s string) *TestTranslationUpdate
SetResultPreambule sets the "result_preambule" field.
func (*TestTranslationUpdate) SetTest ¶
func (ttu *TestTranslationUpdate) SetTest(t *Test) *TestTranslationUpdate
SetTest sets the "test" edge to the Test entity.
func (*TestTranslationUpdate) SetTestID ¶
func (ttu *TestTranslationUpdate) SetTestID(id uuid.UUID) *TestTranslationUpdate
SetTestID sets the "test" edge to the Test entity by ID.
func (*TestTranslationUpdate) SetTitle ¶
func (ttu *TestTranslationUpdate) SetTitle(s string) *TestTranslationUpdate
SetTitle sets the "title" field.
func (*TestTranslationUpdate) Where ¶
func (ttu *TestTranslationUpdate) Where(ps ...predicate.TestTranslation) *TestTranslationUpdate
Where appends a list predicates to the TestTranslationUpdate builder.
type TestTranslationUpdateOne ¶
type TestTranslationUpdateOne struct {
// contains filtered or unexported fields
}
TestTranslationUpdateOne is the builder for updating a single TestTranslation entity.
func (*TestTranslationUpdateOne) ClearDescription ¶
func (ttuo *TestTranslationUpdateOne) ClearDescription() *TestTranslationUpdateOne
ClearDescription clears the value of the "description" field.
func (*TestTranslationUpdateOne) ClearDetails ¶
func (ttuo *TestTranslationUpdateOne) ClearDetails() *TestTranslationUpdateOne
ClearDetails clears the value of the "details" field.
func (*TestTranslationUpdateOne) ClearInstruction ¶
func (ttuo *TestTranslationUpdateOne) ClearInstruction() *TestTranslationUpdateOne
ClearInstruction clears the value of the "instruction" field.
func (*TestTranslationUpdateOne) ClearResultPreambule ¶
func (ttuo *TestTranslationUpdateOne) ClearResultPreambule() *TestTranslationUpdateOne
ClearResultPreambule clears the value of the "result_preambule" field.
func (*TestTranslationUpdateOne) ClearTest ¶
func (ttuo *TestTranslationUpdateOne) ClearTest() *TestTranslationUpdateOne
ClearTest clears the "test" edge to the Test entity.
func (*TestTranslationUpdateOne) Exec ¶
func (ttuo *TestTranslationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TestTranslationUpdateOne) ExecX ¶
func (ttuo *TestTranslationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TestTranslationUpdateOne) Mutation ¶
func (ttuo *TestTranslationUpdateOne) Mutation() *TestTranslationMutation
Mutation returns the TestTranslationMutation object of the builder.
func (*TestTranslationUpdateOne) Save ¶
func (ttuo *TestTranslationUpdateOne) Save(ctx context.Context) (*TestTranslation, error)
Save executes the query and returns the updated TestTranslation entity.
func (*TestTranslationUpdateOne) SaveX ¶
func (ttuo *TestTranslationUpdateOne) SaveX(ctx context.Context) *TestTranslation
SaveX is like Save, but panics if an error occurs.
func (*TestTranslationUpdateOne) Select ¶
func (ttuo *TestTranslationUpdateOne) Select(field string, fields ...string) *TestTranslationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TestTranslationUpdateOne) SetDescription ¶
func (ttuo *TestTranslationUpdateOne) SetDescription(s string) *TestTranslationUpdateOne
SetDescription sets the "description" field.
func (*TestTranslationUpdateOne) SetDetails ¶
func (ttuo *TestTranslationUpdateOne) SetDetails(s string) *TestTranslationUpdateOne
SetDetails sets the "details" field.
func (*TestTranslationUpdateOne) SetInstruction ¶
func (ttuo *TestTranslationUpdateOne) SetInstruction(s string) *TestTranslationUpdateOne
SetInstruction sets the "instruction" field.
func (*TestTranslationUpdateOne) SetNillableDescription ¶
func (ttuo *TestTranslationUpdateOne) SetNillableDescription(s *string) *TestTranslationUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TestTranslationUpdateOne) SetNillableDetails ¶
func (ttuo *TestTranslationUpdateOne) SetNillableDetails(s *string) *TestTranslationUpdateOne
SetNillableDetails sets the "details" field if the given value is not nil.
func (*TestTranslationUpdateOne) SetNillableInstruction ¶
func (ttuo *TestTranslationUpdateOne) SetNillableInstruction(s *string) *TestTranslationUpdateOne
SetNillableInstruction sets the "instruction" field if the given value is not nil.
func (*TestTranslationUpdateOne) SetNillableResultPreambule ¶
func (ttuo *TestTranslationUpdateOne) SetNillableResultPreambule(s *string) *TestTranslationUpdateOne
SetNillableResultPreambule sets the "result_preambule" field if the given value is not nil.
func (*TestTranslationUpdateOne) SetNillableTestID ¶
func (ttuo *TestTranslationUpdateOne) SetNillableTestID(id *uuid.UUID) *TestTranslationUpdateOne
SetNillableTestID sets the "test" edge to the Test entity by ID if the given value is not nil.
func (*TestTranslationUpdateOne) SetResultPreambule ¶
func (ttuo *TestTranslationUpdateOne) SetResultPreambule(s string) *TestTranslationUpdateOne
SetResultPreambule sets the "result_preambule" field.
func (*TestTranslationUpdateOne) SetTest ¶
func (ttuo *TestTranslationUpdateOne) SetTest(t *Test) *TestTranslationUpdateOne
SetTest sets the "test" edge to the Test entity.
func (*TestTranslationUpdateOne) SetTestID ¶
func (ttuo *TestTranslationUpdateOne) SetTestID(id uuid.UUID) *TestTranslationUpdateOne
SetTestID sets the "test" edge to the Test entity by ID.
func (*TestTranslationUpdateOne) SetTitle ¶
func (ttuo *TestTranslationUpdateOne) SetTitle(s string) *TestTranslationUpdateOne
SetTitle sets the "title" field.
type TestTranslations ¶
type TestTranslations []*TestTranslation
TestTranslations is a parsable slice of TestTranslation.
type TestUpdate ¶
type TestUpdate struct {
// contains filtered or unexported fields
}
TestUpdate is the builder for updating Test entities.
func (*TestUpdate) AddDuration ¶
func (tu *TestUpdate) AddDuration(t time.Duration) *TestUpdate
AddDuration adds t to the "duration" field.
func (*TestUpdate) AddMark ¶
func (tu *TestUpdate) AddMark(f float64) *TestUpdate
AddMark adds f to the "mark" field.
func (*TestUpdate) AddQuestionCount ¶
func (tu *TestUpdate) AddQuestionCount(i int) *TestUpdate
AddQuestionCount adds i to the "question_count" field.
func (*TestUpdate) AddQuestionIDs ¶
func (tu *TestUpdate) AddQuestionIDs(ids ...uuid.UUID) *TestUpdate
AddQuestionIDs adds the "questions" edge to the Question entity by IDs.
func (*TestUpdate) AddQuestions ¶
func (tu *TestUpdate) AddQuestions(q ...*Question) *TestUpdate
AddQuestions adds the "questions" edges to the Question entity.
func (*TestUpdate) AddScaleIDs ¶
func (tu *TestUpdate) AddScaleIDs(ids ...uuid.UUID) *TestUpdate
AddScaleIDs adds the "scales" edge to the Scale entity by IDs.
func (*TestUpdate) AddScales ¶
func (tu *TestUpdate) AddScales(s ...*Scale) *TestUpdate
AddScales adds the "scales" edges to the Scale entity.
func (*TestUpdate) AddTagIDs ¶
func (tu *TestUpdate) AddTagIDs(ids ...uuid.UUID) *TestUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*TestUpdate) AddTags ¶
func (tu *TestUpdate) AddTags(t ...*Tag) *TestUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*TestUpdate) AddTakeIDs ¶
func (tu *TestUpdate) AddTakeIDs(ids ...uuid.UUID) *TestUpdate
AddTakeIDs adds the "takes" edge to the Take entity by IDs.
func (*TestUpdate) AddTakes ¶
func (tu *TestUpdate) AddTakes(t ...*Take) *TestUpdate
AddTakes adds the "takes" edges to the Take entity.
func (*TestUpdate) AddTranslationIDs ¶
func (tu *TestUpdate) AddTranslationIDs(ids ...uuid.UUID) *TestUpdate
AddTranslationIDs adds the "translations" edge to the TestTranslation entity by IDs.
func (*TestUpdate) AddTranslations ¶
func (tu *TestUpdate) AddTranslations(t ...*TestTranslation) *TestUpdate
AddTranslations adds the "translations" edges to the TestTranslation entity.
func (*TestUpdate) ClearAvailableLocales ¶
func (tu *TestUpdate) ClearAvailableLocales() *TestUpdate
ClearAvailableLocales clears the value of the "available_locales" field.
func (*TestUpdate) ClearDisplay ¶
func (tu *TestUpdate) ClearDisplay() *TestUpdate
ClearDisplay clears the "display" edge to the TestDisplay entity.
func (*TestUpdate) ClearDuration ¶
func (tu *TestUpdate) ClearDuration() *TestUpdate
ClearDuration clears the value of the "duration" field.
func (*TestUpdate) ClearImage ¶ added in v1.1.0
func (tu *TestUpdate) ClearImage() *TestUpdate
ClearImage clears the value of the "image" field.
func (*TestUpdate) ClearQuestions ¶
func (tu *TestUpdate) ClearQuestions() *TestUpdate
ClearQuestions clears all "questions" edges to the Question entity.
func (*TestUpdate) ClearScales ¶
func (tu *TestUpdate) ClearScales() *TestUpdate
ClearScales clears all "scales" edges to the Scale entity.
func (*TestUpdate) ClearTags ¶
func (tu *TestUpdate) ClearTags() *TestUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*TestUpdate) ClearTakes ¶
func (tu *TestUpdate) ClearTakes() *TestUpdate
ClearTakes clears all "takes" edges to the Take entity.
func (*TestUpdate) ClearTranslations ¶
func (tu *TestUpdate) ClearTranslations() *TestUpdate
ClearTranslations clears all "translations" edges to the TestTranslation entity.
func (*TestUpdate) Exec ¶
func (tu *TestUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TestUpdate) ExecX ¶
func (tu *TestUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TestUpdate) Mutation ¶
func (tu *TestUpdate) Mutation() *TestMutation
Mutation returns the TestMutation object of the builder.
func (*TestUpdate) RemoveQuestionIDs ¶
func (tu *TestUpdate) RemoveQuestionIDs(ids ...uuid.UUID) *TestUpdate
RemoveQuestionIDs removes the "questions" edge to Question entities by IDs.
func (*TestUpdate) RemoveQuestions ¶
func (tu *TestUpdate) RemoveQuestions(q ...*Question) *TestUpdate
RemoveQuestions removes "questions" edges to Question entities.
func (*TestUpdate) RemoveScaleIDs ¶
func (tu *TestUpdate) RemoveScaleIDs(ids ...uuid.UUID) *TestUpdate
RemoveScaleIDs removes the "scales" edge to Scale entities by IDs.
func (*TestUpdate) RemoveScales ¶
func (tu *TestUpdate) RemoveScales(s ...*Scale) *TestUpdate
RemoveScales removes "scales" edges to Scale entities.
func (*TestUpdate) RemoveTagIDs ¶
func (tu *TestUpdate) RemoveTagIDs(ids ...uuid.UUID) *TestUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*TestUpdate) RemoveTags ¶
func (tu *TestUpdate) RemoveTags(t ...*Tag) *TestUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*TestUpdate) RemoveTakeIDs ¶
func (tu *TestUpdate) RemoveTakeIDs(ids ...uuid.UUID) *TestUpdate
RemoveTakeIDs removes the "takes" edge to Take entities by IDs.
func (*TestUpdate) RemoveTakes ¶
func (tu *TestUpdate) RemoveTakes(t ...*Take) *TestUpdate
RemoveTakes removes "takes" edges to Take entities.
func (*TestUpdate) RemoveTranslationIDs ¶
func (tu *TestUpdate) RemoveTranslationIDs(ids ...uuid.UUID) *TestUpdate
RemoveTranslationIDs removes the "translations" edge to TestTranslation entities by IDs.
func (*TestUpdate) RemoveTranslations ¶
func (tu *TestUpdate) RemoveTranslations(t ...*TestTranslation) *TestUpdate
RemoveTranslations removes "translations" edges to TestTranslation entities.
func (*TestUpdate) Save ¶
func (tu *TestUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TestUpdate) SaveX ¶
func (tu *TestUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TestUpdate) SetAvailableLocales ¶
func (tu *TestUpdate) SetAvailableLocales(s []string) *TestUpdate
SetAvailableLocales sets the "available_locales" field.
func (*TestUpdate) SetDisplay ¶
func (tu *TestUpdate) SetDisplay(t *TestDisplay) *TestUpdate
SetDisplay sets the "display" edge to the TestDisplay entity.
func (*TestUpdate) SetDisplayID ¶
func (tu *TestUpdate) SetDisplayID(id uuid.UUID) *TestUpdate
SetDisplayID sets the "display" edge to the TestDisplay entity by ID.
func (*TestUpdate) SetDuration ¶
func (tu *TestUpdate) SetDuration(t time.Duration) *TestUpdate
SetDuration sets the "duration" field.
func (*TestUpdate) SetImage ¶ added in v1.1.0
func (tu *TestUpdate) SetImage(s string) *TestUpdate
SetImage sets the "image" field.
func (*TestUpdate) SetMark ¶
func (tu *TestUpdate) SetMark(f float64) *TestUpdate
SetMark sets the "mark" field.
func (*TestUpdate) SetNillableDisplayID ¶
func (tu *TestUpdate) SetNillableDisplayID(id *uuid.UUID) *TestUpdate
SetNillableDisplayID sets the "display" edge to the TestDisplay entity by ID if the given value is not nil.
func (*TestUpdate) SetNillableDuration ¶
func (tu *TestUpdate) SetNillableDuration(t *time.Duration) *TestUpdate
SetNillableDuration sets the "duration" field if the given value is not nil.
func (*TestUpdate) SetNillableImage ¶ added in v1.1.0
func (tu *TestUpdate) SetNillableImage(s *string) *TestUpdate
SetNillableImage sets the "image" field if the given value is not nil.
func (*TestUpdate) SetNillableMark ¶
func (tu *TestUpdate) SetNillableMark(f *float64) *TestUpdate
SetNillableMark sets the "mark" field if the given value is not nil.
func (*TestUpdate) SetNillablePublished ¶
func (tu *TestUpdate) SetNillablePublished(b *bool) *TestUpdate
SetNillablePublished sets the "published" field if the given value is not nil.
func (*TestUpdate) SetNillableQuestionCount ¶
func (tu *TestUpdate) SetNillableQuestionCount(i *int) *TestUpdate
SetNillableQuestionCount sets the "question_count" field if the given value is not nil.
func (*TestUpdate) SetPublished ¶
func (tu *TestUpdate) SetPublished(b bool) *TestUpdate
SetPublished sets the "published" field.
func (*TestUpdate) SetQuestionCount ¶
func (tu *TestUpdate) SetQuestionCount(i int) *TestUpdate
SetQuestionCount sets the "question_count" field.
func (*TestUpdate) SetUpdateTime ¶
func (tu *TestUpdate) SetUpdateTime(t time.Time) *TestUpdate
SetUpdateTime sets the "update_time" field.
func (*TestUpdate) Where ¶
func (tu *TestUpdate) Where(ps ...predicate.Test) *TestUpdate
Where appends a list predicates to the TestUpdate builder.
type TestUpdateOne ¶
type TestUpdateOne struct {
// contains filtered or unexported fields
}
TestUpdateOne is the builder for updating a single Test entity.
func (*TestUpdateOne) AddDuration ¶
func (tuo *TestUpdateOne) AddDuration(t time.Duration) *TestUpdateOne
AddDuration adds t to the "duration" field.
func (*TestUpdateOne) AddMark ¶
func (tuo *TestUpdateOne) AddMark(f float64) *TestUpdateOne
AddMark adds f to the "mark" field.
func (*TestUpdateOne) AddQuestionCount ¶
func (tuo *TestUpdateOne) AddQuestionCount(i int) *TestUpdateOne
AddQuestionCount adds i to the "question_count" field.
func (*TestUpdateOne) AddQuestionIDs ¶
func (tuo *TestUpdateOne) AddQuestionIDs(ids ...uuid.UUID) *TestUpdateOne
AddQuestionIDs adds the "questions" edge to the Question entity by IDs.
func (*TestUpdateOne) AddQuestions ¶
func (tuo *TestUpdateOne) AddQuestions(q ...*Question) *TestUpdateOne
AddQuestions adds the "questions" edges to the Question entity.
func (*TestUpdateOne) AddScaleIDs ¶
func (tuo *TestUpdateOne) AddScaleIDs(ids ...uuid.UUID) *TestUpdateOne
AddScaleIDs adds the "scales" edge to the Scale entity by IDs.
func (*TestUpdateOne) AddScales ¶
func (tuo *TestUpdateOne) AddScales(s ...*Scale) *TestUpdateOne
AddScales adds the "scales" edges to the Scale entity.
func (*TestUpdateOne) AddTagIDs ¶
func (tuo *TestUpdateOne) AddTagIDs(ids ...uuid.UUID) *TestUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*TestUpdateOne) AddTags ¶
func (tuo *TestUpdateOne) AddTags(t ...*Tag) *TestUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*TestUpdateOne) AddTakeIDs ¶
func (tuo *TestUpdateOne) AddTakeIDs(ids ...uuid.UUID) *TestUpdateOne
AddTakeIDs adds the "takes" edge to the Take entity by IDs.
func (*TestUpdateOne) AddTakes ¶
func (tuo *TestUpdateOne) AddTakes(t ...*Take) *TestUpdateOne
AddTakes adds the "takes" edges to the Take entity.
func (*TestUpdateOne) AddTranslationIDs ¶
func (tuo *TestUpdateOne) AddTranslationIDs(ids ...uuid.UUID) *TestUpdateOne
AddTranslationIDs adds the "translations" edge to the TestTranslation entity by IDs.
func (*TestUpdateOne) AddTranslations ¶
func (tuo *TestUpdateOne) AddTranslations(t ...*TestTranslation) *TestUpdateOne
AddTranslations adds the "translations" edges to the TestTranslation entity.
func (*TestUpdateOne) ClearAvailableLocales ¶
func (tuo *TestUpdateOne) ClearAvailableLocales() *TestUpdateOne
ClearAvailableLocales clears the value of the "available_locales" field.
func (*TestUpdateOne) ClearDisplay ¶
func (tuo *TestUpdateOne) ClearDisplay() *TestUpdateOne
ClearDisplay clears the "display" edge to the TestDisplay entity.
func (*TestUpdateOne) ClearDuration ¶
func (tuo *TestUpdateOne) ClearDuration() *TestUpdateOne
ClearDuration clears the value of the "duration" field.
func (*TestUpdateOne) ClearImage ¶ added in v1.1.0
func (tuo *TestUpdateOne) ClearImage() *TestUpdateOne
ClearImage clears the value of the "image" field.
func (*TestUpdateOne) ClearQuestions ¶
func (tuo *TestUpdateOne) ClearQuestions() *TestUpdateOne
ClearQuestions clears all "questions" edges to the Question entity.
func (*TestUpdateOne) ClearScales ¶
func (tuo *TestUpdateOne) ClearScales() *TestUpdateOne
ClearScales clears all "scales" edges to the Scale entity.
func (*TestUpdateOne) ClearTags ¶
func (tuo *TestUpdateOne) ClearTags() *TestUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*TestUpdateOne) ClearTakes ¶
func (tuo *TestUpdateOne) ClearTakes() *TestUpdateOne
ClearTakes clears all "takes" edges to the Take entity.
func (*TestUpdateOne) ClearTranslations ¶
func (tuo *TestUpdateOne) ClearTranslations() *TestUpdateOne
ClearTranslations clears all "translations" edges to the TestTranslation entity.
func (*TestUpdateOne) Exec ¶
func (tuo *TestUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TestUpdateOne) ExecX ¶
func (tuo *TestUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TestUpdateOne) Mutation ¶
func (tuo *TestUpdateOne) Mutation() *TestMutation
Mutation returns the TestMutation object of the builder.
func (*TestUpdateOne) RemoveQuestionIDs ¶
func (tuo *TestUpdateOne) RemoveQuestionIDs(ids ...uuid.UUID) *TestUpdateOne
RemoveQuestionIDs removes the "questions" edge to Question entities by IDs.
func (*TestUpdateOne) RemoveQuestions ¶
func (tuo *TestUpdateOne) RemoveQuestions(q ...*Question) *TestUpdateOne
RemoveQuestions removes "questions" edges to Question entities.
func (*TestUpdateOne) RemoveScaleIDs ¶
func (tuo *TestUpdateOne) RemoveScaleIDs(ids ...uuid.UUID) *TestUpdateOne
RemoveScaleIDs removes the "scales" edge to Scale entities by IDs.
func (*TestUpdateOne) RemoveScales ¶
func (tuo *TestUpdateOne) RemoveScales(s ...*Scale) *TestUpdateOne
RemoveScales removes "scales" edges to Scale entities.
func (*TestUpdateOne) RemoveTagIDs ¶
func (tuo *TestUpdateOne) RemoveTagIDs(ids ...uuid.UUID) *TestUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*TestUpdateOne) RemoveTags ¶
func (tuo *TestUpdateOne) RemoveTags(t ...*Tag) *TestUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*TestUpdateOne) RemoveTakeIDs ¶
func (tuo *TestUpdateOne) RemoveTakeIDs(ids ...uuid.UUID) *TestUpdateOne
RemoveTakeIDs removes the "takes" edge to Take entities by IDs.
func (*TestUpdateOne) RemoveTakes ¶
func (tuo *TestUpdateOne) RemoveTakes(t ...*Take) *TestUpdateOne
RemoveTakes removes "takes" edges to Take entities.
func (*TestUpdateOne) RemoveTranslationIDs ¶
func (tuo *TestUpdateOne) RemoveTranslationIDs(ids ...uuid.UUID) *TestUpdateOne
RemoveTranslationIDs removes the "translations" edge to TestTranslation entities by IDs.
func (*TestUpdateOne) RemoveTranslations ¶
func (tuo *TestUpdateOne) RemoveTranslations(t ...*TestTranslation) *TestUpdateOne
RemoveTranslations removes "translations" edges to TestTranslation entities.
func (*TestUpdateOne) Save ¶
func (tuo *TestUpdateOne) Save(ctx context.Context) (*Test, error)
Save executes the query and returns the updated Test entity.
func (*TestUpdateOne) SaveX ¶
func (tuo *TestUpdateOne) SaveX(ctx context.Context) *Test
SaveX is like Save, but panics if an error occurs.
func (*TestUpdateOne) Select ¶
func (tuo *TestUpdateOne) Select(field string, fields ...string) *TestUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TestUpdateOne) SetAvailableLocales ¶
func (tuo *TestUpdateOne) SetAvailableLocales(s []string) *TestUpdateOne
SetAvailableLocales sets the "available_locales" field.
func (*TestUpdateOne) SetDisplay ¶
func (tuo *TestUpdateOne) SetDisplay(t *TestDisplay) *TestUpdateOne
SetDisplay sets the "display" edge to the TestDisplay entity.
func (*TestUpdateOne) SetDisplayID ¶
func (tuo *TestUpdateOne) SetDisplayID(id uuid.UUID) *TestUpdateOne
SetDisplayID sets the "display" edge to the TestDisplay entity by ID.
func (*TestUpdateOne) SetDuration ¶
func (tuo *TestUpdateOne) SetDuration(t time.Duration) *TestUpdateOne
SetDuration sets the "duration" field.
func (*TestUpdateOne) SetImage ¶ added in v1.1.0
func (tuo *TestUpdateOne) SetImage(s string) *TestUpdateOne
SetImage sets the "image" field.
func (*TestUpdateOne) SetMark ¶
func (tuo *TestUpdateOne) SetMark(f float64) *TestUpdateOne
SetMark sets the "mark" field.
func (*TestUpdateOne) SetNillableDisplayID ¶
func (tuo *TestUpdateOne) SetNillableDisplayID(id *uuid.UUID) *TestUpdateOne
SetNillableDisplayID sets the "display" edge to the TestDisplay entity by ID if the given value is not nil.
func (*TestUpdateOne) SetNillableDuration ¶
func (tuo *TestUpdateOne) SetNillableDuration(t *time.Duration) *TestUpdateOne
SetNillableDuration sets the "duration" field if the given value is not nil.
func (*TestUpdateOne) SetNillableImage ¶ added in v1.1.0
func (tuo *TestUpdateOne) SetNillableImage(s *string) *TestUpdateOne
SetNillableImage sets the "image" field if the given value is not nil.
func (*TestUpdateOne) SetNillableMark ¶
func (tuo *TestUpdateOne) SetNillableMark(f *float64) *TestUpdateOne
SetNillableMark sets the "mark" field if the given value is not nil.
func (*TestUpdateOne) SetNillablePublished ¶
func (tuo *TestUpdateOne) SetNillablePublished(b *bool) *TestUpdateOne
SetNillablePublished sets the "published" field if the given value is not nil.
func (*TestUpdateOne) SetNillableQuestionCount ¶
func (tuo *TestUpdateOne) SetNillableQuestionCount(i *int) *TestUpdateOne
SetNillableQuestionCount sets the "question_count" field if the given value is not nil.
func (*TestUpdateOne) SetPublished ¶
func (tuo *TestUpdateOne) SetPublished(b bool) *TestUpdateOne
SetPublished sets the "published" field.
func (*TestUpdateOne) SetQuestionCount ¶
func (tuo *TestUpdateOne) SetQuestionCount(i int) *TestUpdateOne
SetQuestionCount sets the "question_count" field.
func (*TestUpdateOne) SetUpdateTime ¶
func (tuo *TestUpdateOne) SetUpdateTime(t time.Time) *TestUpdateOne
SetUpdateTime sets the "update_time" field.
type Tx ¶
type Tx struct { // Interpretation is the client for interacting with the Interpretation builders. Interpretation *InterpretationClient // InterpretationTranslation is the client for interacting with the InterpretationTranslation builders. InterpretationTranslation *InterpretationTranslationClient // Item is the client for interacting with the Item builders. Item *ItemClient // ItemTranslation is the client for interacting with the ItemTranslation builders. ItemTranslation *ItemTranslationClient // Norm is the client for interacting with the Norm builders. Norm *NormClient // Question is the client for interacting with the Question builders. Question *QuestionClient // QuestionTranslation is the client for interacting with the QuestionTranslation builders. QuestionTranslation *QuestionTranslationClient // Response is the client for interacting with the Response builders. Response *ResponseClient // Result is the client for interacting with the Result builders. Result *ResultClient // Sample is the client for interacting with the Sample builders. Sample *SampleClient // Scale is the client for interacting with the Scale builders. Scale *ScaleClient // ScaleItem is the client for interacting with the ScaleItem builders. ScaleItem *ScaleItemClient // ScaleTranslation is the client for interacting with the ScaleTranslation builders. ScaleTranslation *ScaleTranslationClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // TagTranslation is the client for interacting with the TagTranslation builders. TagTranslation *TagTranslationClient // Take is the client for interacting with the Take builders. Take *TakeClient // Test is the client for interacting with the Test builders. Test *TestClient // TestDisplay is the client for interacting with the TestDisplay builders. TestDisplay *TestDisplayClient // TestTranslation is the client for interacting with the TestTranslation builders. TestTranslation *TestTranslationClient // User is the client for interacting with the User builders. User *UserClient // UserSession is the client for interacting with the UserSession builders. UserSession *UserSessionClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Locale holds the value of the "locale" field. Locale user.Locale `json:"locale,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Email holds the value of the "email" field. Email *string `json:"email,omitempty"` // Picture holds the value of the "picture" field. Picture string `json:"picture,omitempty"` // PasswordHash holds the value of the "password_hash" field. PasswordHash string `json:"password_hash,omitempty"` // Admin holds the value of the "admin" field. Admin bool `json:"admin,omitempty"` // Anonymous holds the value of the "anonymous" field. Anonymous bool `json:"anonymous,omitempty"` // UseDarkTheme holds the value of the "use_dark_theme" field. UseDarkTheme bool `json:"use_dark_theme,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryAliases ¶
QueryAliases queries the "aliases" edge of the User entity.
func (*User) QueryParent ¶
QueryParent queries the "parent" edge of the User entity.
func (*User) QuerySessions ¶
func (u *User) QuerySessions() *UserSessionQuery
QuerySessions queries the "sessions" edge of the User entity.
func (*User) QueryTakes ¶
QueryTakes queries the "takes" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryAliases ¶
func (c *UserClient) QueryAliases(u *User) *UserQuery
QueryAliases queries the aliases edge of a User.
func (*UserClient) QueryParent ¶
func (c *UserClient) QueryParent(u *User) *UserQuery
QueryParent queries the parent edge of a User.
func (*UserClient) QuerySessions ¶
func (c *UserClient) QuerySessions(u *User) *UserSessionQuery
QuerySessions queries the sessions edge of a User.
func (*UserClient) QueryTakes ¶
func (c *UserClient) QueryTakes(u *User) *TakeQuery
QueryTakes queries the takes edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddAliasIDs ¶
func (uc *UserCreate) AddAliasIDs(ids ...uuid.UUID) *UserCreate
AddAliasIDs adds the "aliases" edge to the User entity by IDs.
func (*UserCreate) AddAliases ¶
func (uc *UserCreate) AddAliases(u ...*User) *UserCreate
AddAliases adds the "aliases" edges to the User entity.
func (*UserCreate) AddSessionIDs ¶
func (uc *UserCreate) AddSessionIDs(ids ...int) *UserCreate
AddSessionIDs adds the "sessions" edge to the UserSession entity by IDs.
func (*UserCreate) AddSessions ¶
func (uc *UserCreate) AddSessions(u ...*UserSession) *UserCreate
AddSessions adds the "sessions" edges to the UserSession entity.
func (*UserCreate) AddTakeIDs ¶
func (uc *UserCreate) AddTakeIDs(ids ...uuid.UUID) *UserCreate
AddTakeIDs adds the "takes" edge to the Take entity by IDs.
func (*UserCreate) AddTakes ¶
func (uc *UserCreate) AddTakes(t ...*Take) *UserCreate
AddTakes adds the "takes" edges to the Take entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAdmin ¶
func (uc *UserCreate) SetAdmin(b bool) *UserCreate
SetAdmin sets the "admin" field.
func (*UserCreate) SetAnonymous ¶
func (uc *UserCreate) SetAnonymous(b bool) *UserCreate
SetAnonymous sets the "anonymous" field.
func (*UserCreate) SetCreateTime ¶
func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
SetCreateTime sets the "create_time" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetLocale ¶
func (uc *UserCreate) SetLocale(u user.Locale) *UserCreate
SetLocale sets the "locale" field.
func (*UserCreate) SetMeta ¶
func (uc *UserCreate) SetMeta(m map[string]interface{}) *UserCreate
SetMeta sets the "meta" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableAdmin ¶
func (uc *UserCreate) SetNillableAdmin(b *bool) *UserCreate
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*UserCreate) SetNillableAnonymous ¶
func (uc *UserCreate) SetNillableAnonymous(b *bool) *UserCreate
SetNillableAnonymous sets the "anonymous" field if the given value is not nil.
func (*UserCreate) SetNillableCreateTime ¶
func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserCreate) SetNillableEmail ¶
func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableParentID ¶
func (uc *UserCreate) SetNillableParentID(id *uuid.UUID) *UserCreate
SetNillableParentID sets the "parent" edge to the User entity by ID if the given value is not nil.
func (*UserCreate) SetNillablePicture ¶
func (uc *UserCreate) SetNillablePicture(s *string) *UserCreate
SetNillablePicture sets the "picture" field if the given value is not nil.
func (*UserCreate) SetNillableUpdateTime ¶
func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserCreate) SetNillableUseDarkTheme ¶
func (uc *UserCreate) SetNillableUseDarkTheme(b *bool) *UserCreate
SetNillableUseDarkTheme sets the "use_dark_theme" field if the given value is not nil.
func (*UserCreate) SetParent ¶
func (uc *UserCreate) SetParent(u *User) *UserCreate
SetParent sets the "parent" edge to the User entity.
func (*UserCreate) SetParentID ¶
func (uc *UserCreate) SetParentID(id uuid.UUID) *UserCreate
SetParentID sets the "parent" edge to the User entity by ID.
func (*UserCreate) SetPasswordHash ¶
func (uc *UserCreate) SetPasswordHash(s string) *UserCreate
SetPasswordHash sets the "password_hash" field.
func (*UserCreate) SetPicture ¶
func (uc *UserCreate) SetPicture(s string) *UserCreate
SetPicture sets the "picture" field.
func (*UserCreate) SetUpdateTime ¶
func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
SetUpdateTime sets the "update_time" field.
func (*UserCreate) SetUseDarkTheme ¶
func (uc *UserCreate) SetUseDarkTheme(b bool) *UserCreate
SetUseDarkTheme sets the "use_dark_theme" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEdges ¶
type UserEdges struct { // Sessions holds the value of the sessions edge. Sessions []*UserSession `json:"sessions,omitempty"` // Takes holds the value of the takes edge. Takes []*Take `json:"takes,omitempty"` // Parent holds the value of the parent edge. Parent *User `json:"parent,omitempty"` // Aliases holds the value of the aliases edge. Aliases []*User `json:"aliases,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) AliasesOrErr ¶
AliasesOrErr returns the Aliases value or an error if the edge was not loaded in eager-loading.
func (UserEdges) ParentOrErr ¶
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) SessionsOrErr ¶
func (e UserEdges) SessionsOrErr() ([]*UserSession, error)
SessionsOrErr returns the Sessions value or an error if the edge was not loaded in eager-loading.
func (UserEdges) TakesOrErr ¶
TakesOrErr returns the Takes value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddAliasIDs ¶
func (m *UserMutation) AddAliasIDs(ids ...uuid.UUID)
AddAliasIDs adds the "aliases" edge to the User entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddSessionIDs ¶
func (m *UserMutation) AddSessionIDs(ids ...int)
AddSessionIDs adds the "sessions" edge to the UserSession entity by ids.
func (*UserMutation) AddTakeIDs ¶
func (m *UserMutation) AddTakeIDs(ids ...uuid.UUID)
AddTakeIDs adds the "takes" edge to the Take entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) Admin ¶
func (m *UserMutation) Admin() (r bool, exists bool)
Admin returns the value of the "admin" field in the mutation.
func (*UserMutation) AliasesCleared ¶
func (m *UserMutation) AliasesCleared() bool
AliasesCleared reports if the "aliases" edge to the User entity was cleared.
func (*UserMutation) AliasesIDs ¶
func (m *UserMutation) AliasesIDs() (ids []uuid.UUID)
AliasesIDs returns the "aliases" edge IDs in the mutation.
func (*UserMutation) Anonymous ¶
func (m *UserMutation) Anonymous() (r bool, exists bool)
Anonymous returns the value of the "anonymous" field in the mutation.
func (*UserMutation) ClearAliases ¶
func (m *UserMutation) ClearAliases()
ClearAliases clears the "aliases" edge to the User entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearEmail ¶
func (m *UserMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearMeta ¶
func (m *UserMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*UserMutation) ClearParent ¶
func (m *UserMutation) ClearParent()
ClearParent clears the "parent" edge to the User entity.
func (*UserMutation) ClearPicture ¶
func (m *UserMutation) ClearPicture()
ClearPicture clears the value of the "picture" field.
func (*UserMutation) ClearSessions ¶
func (m *UserMutation) ClearSessions()
ClearSessions clears the "sessions" edge to the UserSession entity.
func (*UserMutation) ClearTakes ¶
func (m *UserMutation) ClearTakes()
ClearTakes clears the "takes" edge to the Take entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreateTime ¶
func (m *UserMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) EmailCleared ¶
func (m *UserMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) Locale ¶
func (m *UserMutation) Locale() (r user.Locale, exists bool)
Locale returns the value of the "locale" field in the mutation.
func (*UserMutation) Meta ¶
func (m *UserMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*UserMutation) MetaCleared ¶
func (m *UserMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OldAdmin ¶
func (m *UserMutation) OldAdmin(ctx context.Context) (v bool, err error)
OldAdmin returns the old "admin" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldAnonymous ¶
func (m *UserMutation) OldAnonymous(ctx context.Context) (v bool, err error)
OldAnonymous returns the old "anonymous" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v *string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldLocale ¶
OldLocale returns the old "locale" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldMeta ¶
func (m *UserMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPasswordHash ¶
func (m *UserMutation) OldPasswordHash(ctx context.Context) (v string, err error)
OldPasswordHash returns the old "password_hash" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPicture ¶
func (m *UserMutation) OldPicture(ctx context.Context) (v string, err error)
OldPicture returns the old "picture" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUseDarkTheme ¶
func (m *UserMutation) OldUseDarkTheme(ctx context.Context) (v bool, err error)
OldUseDarkTheme returns the old "use_dark_theme" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) ParentCleared ¶
func (m *UserMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the User entity was cleared.
func (*UserMutation) ParentID ¶
func (m *UserMutation) ParentID() (id uuid.UUID, exists bool)
ParentID returns the "parent" edge ID in the mutation.
func (*UserMutation) ParentIDs ¶
func (m *UserMutation) ParentIDs() (ids []uuid.UUID)
ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.
func (*UserMutation) PasswordHash ¶
func (m *UserMutation) PasswordHash() (r string, exists bool)
PasswordHash returns the value of the "password_hash" field in the mutation.
func (*UserMutation) Picture ¶
func (m *UserMutation) Picture() (r string, exists bool)
Picture returns the value of the "picture" field in the mutation.
func (*UserMutation) PictureCleared ¶
func (m *UserMutation) PictureCleared() bool
PictureCleared returns if the "picture" field was cleared in this mutation.
func (*UserMutation) RemoveAliasIDs ¶
func (m *UserMutation) RemoveAliasIDs(ids ...uuid.UUID)
RemoveAliasIDs removes the "aliases" edge to the User entity by IDs.
func (*UserMutation) RemoveSessionIDs ¶
func (m *UserMutation) RemoveSessionIDs(ids ...int)
RemoveSessionIDs removes the "sessions" edge to the UserSession entity by IDs.
func (*UserMutation) RemoveTakeIDs ¶
func (m *UserMutation) RemoveTakeIDs(ids ...uuid.UUID)
RemoveTakeIDs removes the "takes" edge to the Take entity by IDs.
func (*UserMutation) RemovedAliasesIDs ¶
func (m *UserMutation) RemovedAliasesIDs() (ids []uuid.UUID)
RemovedAliases returns the removed IDs of the "aliases" edge to the User entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedSessionsIDs ¶
func (m *UserMutation) RemovedSessionsIDs() (ids []int)
RemovedSessions returns the removed IDs of the "sessions" edge to the UserSession entity.
func (*UserMutation) RemovedTakesIDs ¶
func (m *UserMutation) RemovedTakesIDs() (ids []uuid.UUID)
RemovedTakes returns the removed IDs of the "takes" edge to the Take entity.
func (*UserMutation) ResetAdmin ¶
func (m *UserMutation) ResetAdmin()
ResetAdmin resets all changes to the "admin" field.
func (*UserMutation) ResetAliases ¶
func (m *UserMutation) ResetAliases()
ResetAliases resets all changes to the "aliases" edge.
func (*UserMutation) ResetAnonymous ¶
func (m *UserMutation) ResetAnonymous()
ResetAnonymous resets all changes to the "anonymous" field.
func (*UserMutation) ResetCreateTime ¶
func (m *UserMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetLocale ¶
func (m *UserMutation) ResetLocale()
ResetLocale resets all changes to the "locale" field.
func (*UserMutation) ResetMeta ¶
func (m *UserMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetParent ¶
func (m *UserMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*UserMutation) ResetPasswordHash ¶
func (m *UserMutation) ResetPasswordHash()
ResetPasswordHash resets all changes to the "password_hash" field.
func (*UserMutation) ResetPicture ¶
func (m *UserMutation) ResetPicture()
ResetPicture resets all changes to the "picture" field.
func (*UserMutation) ResetSessions ¶
func (m *UserMutation) ResetSessions()
ResetSessions resets all changes to the "sessions" edge.
func (*UserMutation) ResetTakes ¶
func (m *UserMutation) ResetTakes()
ResetTakes resets all changes to the "takes" edge.
func (*UserMutation) ResetUpdateTime ¶
func (m *UserMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserMutation) ResetUseDarkTheme ¶
func (m *UserMutation) ResetUseDarkTheme()
ResetUseDarkTheme resets all changes to the "use_dark_theme" field.
func (*UserMutation) SessionsCleared ¶
func (m *UserMutation) SessionsCleared() bool
SessionsCleared reports if the "sessions" edge to the UserSession entity was cleared.
func (*UserMutation) SessionsIDs ¶
func (m *UserMutation) SessionsIDs() (ids []int)
SessionsIDs returns the "sessions" edge IDs in the mutation.
func (*UserMutation) SetAdmin ¶
func (m *UserMutation) SetAdmin(b bool)
SetAdmin sets the "admin" field.
func (*UserMutation) SetAnonymous ¶
func (m *UserMutation) SetAnonymous(b bool)
SetAnonymous sets the "anonymous" field.
func (*UserMutation) SetCreateTime ¶
func (m *UserMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetLocale ¶
func (m *UserMutation) SetLocale(u user.Locale)
SetLocale sets the "locale" field.
func (*UserMutation) SetMeta ¶
func (m *UserMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetParentID ¶
func (m *UserMutation) SetParentID(id uuid.UUID)
SetParentID sets the "parent" edge to the User entity by id.
func (*UserMutation) SetPasswordHash ¶
func (m *UserMutation) SetPasswordHash(s string)
SetPasswordHash sets the "password_hash" field.
func (*UserMutation) SetPicture ¶
func (m *UserMutation) SetPicture(s string)
SetPicture sets the "picture" field.
func (*UserMutation) SetUpdateTime ¶
func (m *UserMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserMutation) SetUseDarkTheme ¶
func (m *UserMutation) SetUseDarkTheme(b bool)
SetUseDarkTheme sets the "use_dark_theme" field.
func (*UserMutation) TakesCleared ¶
func (m *UserMutation) TakesCleared() bool
TakesCleared reports if the "takes" edge to the Take entity was cleared.
func (*UserMutation) TakesIDs ¶
func (m *UserMutation) TakesIDs() (ids []uuid.UUID)
TakesIDs returns the "takes" edge IDs in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdateTime ¶
func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserMutation) UseDarkTheme ¶
func (m *UserMutation) UseDarkTheme() (r bool, exists bool)
UseDarkTheme returns the value of the "use_dark_theme" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryAliases ¶
QueryAliases chains the current query on the "aliases" edge.
func (*UserQuery) QueryParent ¶
QueryParent chains the current query on the "parent" edge.
func (*UserQuery) QuerySessions ¶
func (uq *UserQuery) QuerySessions() *UserSessionQuery
QuerySessions chains the current query on the "sessions" edge.
func (*UserQuery) QueryTakes ¶
QueryTakes chains the current query on the "takes" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.User.Query(). Select(user.FieldCreateTime). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithAliases ¶
WithAliases tells the query-builder to eager-load the nodes that are connected to the "aliases" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithParent ¶
WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithSessions ¶
func (uq *UserQuery) WithSessions(opts ...func(*UserSessionQuery)) *UserQuery
WithSessions tells the query-builder to eager-load the nodes that are connected to the "sessions" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserSession ¶
type UserSession struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Sid holds the value of the "sid" field. Sid string `json:"sid,omitempty"` // IP holds the value of the "ip" field. IP string `json:"ip,omitempty"` // UserAgent holds the value of the "user_agent" field. UserAgent string `json:"user_agent,omitempty"` // LastActivity holds the value of the "last_activity" field. LastActivity time.Time `json:"last_activity,omitempty"` // Active holds the value of the "active" field. Active bool `json:"active,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserSessionQuery when eager-loading is set. Edges UserSessionEdges `json:"edges"` // contains filtered or unexported fields }
UserSession is the model entity for the UserSession schema.
func (*UserSession) QueryUser ¶
func (us *UserSession) QueryUser() *UserQuery
QueryUser queries the "user" edge of the UserSession entity.
func (*UserSession) String ¶
func (us *UserSession) String() string
String implements the fmt.Stringer.
func (*UserSession) Unwrap ¶
func (us *UserSession) Unwrap() *UserSession
Unwrap unwraps the UserSession 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 (*UserSession) Update ¶
func (us *UserSession) Update() *UserSessionUpdateOne
Update returns a builder for updating this UserSession. Note that you need to call UserSession.Unwrap() before calling this method if this UserSession was returned from a transaction, and the transaction was committed or rolled back.
type UserSessionClient ¶
type UserSessionClient struct {
// contains filtered or unexported fields
}
UserSessionClient is a client for the UserSession schema.
func NewUserSessionClient ¶
func NewUserSessionClient(c config) *UserSessionClient
NewUserSessionClient returns a client for the UserSession from the given config.
func (*UserSessionClient) Create ¶
func (c *UserSessionClient) Create() *UserSessionCreate
Create returns a builder for creating a UserSession entity.
func (*UserSessionClient) CreateBulk ¶
func (c *UserSessionClient) CreateBulk(builders ...*UserSessionCreate) *UserSessionCreateBulk
CreateBulk returns a builder for creating a bulk of UserSession entities.
func (*UserSessionClient) Delete ¶
func (c *UserSessionClient) Delete() *UserSessionDelete
Delete returns a delete builder for UserSession.
func (*UserSessionClient) DeleteOne ¶
func (c *UserSessionClient) DeleteOne(us *UserSession) *UserSessionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserSessionClient) DeleteOneID ¶
func (c *UserSessionClient) DeleteOneID(id int) *UserSessionDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*UserSessionClient) Get ¶
func (c *UserSessionClient) Get(ctx context.Context, id int) (*UserSession, error)
Get returns a UserSession entity by its id.
func (*UserSessionClient) GetX ¶
func (c *UserSessionClient) GetX(ctx context.Context, id int) *UserSession
GetX is like Get, but panics if an error occurs.
func (*UserSessionClient) Hooks ¶
func (c *UserSessionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserSessionClient) Query ¶
func (c *UserSessionClient) Query() *UserSessionQuery
Query returns a query builder for UserSession.
func (*UserSessionClient) QueryUser ¶
func (c *UserSessionClient) QueryUser(us *UserSession) *UserQuery
QueryUser queries the user edge of a UserSession.
func (*UserSessionClient) Update ¶
func (c *UserSessionClient) Update() *UserSessionUpdate
Update returns an update builder for UserSession.
func (*UserSessionClient) UpdateOne ¶
func (c *UserSessionClient) UpdateOne(us *UserSession) *UserSessionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserSessionClient) UpdateOneID ¶
func (c *UserSessionClient) UpdateOneID(id int) *UserSessionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserSessionClient) Use ¶
func (c *UserSessionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usersession.Hooks(f(g(h())))`.
type UserSessionCreate ¶
type UserSessionCreate struct {
// contains filtered or unexported fields
}
UserSessionCreate is the builder for creating a UserSession entity.
func (*UserSessionCreate) Exec ¶
func (usc *UserSessionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserSessionCreate) ExecX ¶
func (usc *UserSessionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSessionCreate) Mutation ¶
func (usc *UserSessionCreate) Mutation() *UserSessionMutation
Mutation returns the UserSessionMutation object of the builder.
func (*UserSessionCreate) Save ¶
func (usc *UserSessionCreate) Save(ctx context.Context) (*UserSession, error)
Save creates the UserSession in the database.
func (*UserSessionCreate) SaveX ¶
func (usc *UserSessionCreate) SaveX(ctx context.Context) *UserSession
SaveX calls Save and panics if Save returns an error.
func (*UserSessionCreate) SetActive ¶
func (usc *UserSessionCreate) SetActive(b bool) *UserSessionCreate
SetActive sets the "active" field.
func (*UserSessionCreate) SetCreateTime ¶
func (usc *UserSessionCreate) SetCreateTime(t time.Time) *UserSessionCreate
SetCreateTime sets the "create_time" field.
func (*UserSessionCreate) SetIP ¶
func (usc *UserSessionCreate) SetIP(s string) *UserSessionCreate
SetIP sets the "ip" field.
func (*UserSessionCreate) SetLastActivity ¶
func (usc *UserSessionCreate) SetLastActivity(t time.Time) *UserSessionCreate
SetLastActivity sets the "last_activity" field.
func (*UserSessionCreate) SetMeta ¶
func (usc *UserSessionCreate) SetMeta(m map[string]interface{}) *UserSessionCreate
SetMeta sets the "meta" field.
func (*UserSessionCreate) SetNillableActive ¶
func (usc *UserSessionCreate) SetNillableActive(b *bool) *UserSessionCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*UserSessionCreate) SetNillableCreateTime ¶
func (usc *UserSessionCreate) SetNillableCreateTime(t *time.Time) *UserSessionCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserSessionCreate) SetNillableLastActivity ¶
func (usc *UserSessionCreate) SetNillableLastActivity(t *time.Time) *UserSessionCreate
SetNillableLastActivity sets the "last_activity" field if the given value is not nil.
func (*UserSessionCreate) SetNillableUpdateTime ¶
func (usc *UserSessionCreate) SetNillableUpdateTime(t *time.Time) *UserSessionCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserSessionCreate) SetSid ¶
func (usc *UserSessionCreate) SetSid(s string) *UserSessionCreate
SetSid sets the "sid" field.
func (*UserSessionCreate) SetUpdateTime ¶
func (usc *UserSessionCreate) SetUpdateTime(t time.Time) *UserSessionCreate
SetUpdateTime sets the "update_time" field.
func (*UserSessionCreate) SetUser ¶
func (usc *UserSessionCreate) SetUser(u *User) *UserSessionCreate
SetUser sets the "user" edge to the User entity.
func (*UserSessionCreate) SetUserAgent ¶
func (usc *UserSessionCreate) SetUserAgent(s string) *UserSessionCreate
SetUserAgent sets the "user_agent" field.
func (*UserSessionCreate) SetUserID ¶
func (usc *UserSessionCreate) SetUserID(id uuid.UUID) *UserSessionCreate
SetUserID sets the "user" edge to the User entity by ID.
type UserSessionCreateBulk ¶
type UserSessionCreateBulk struct {
// contains filtered or unexported fields
}
UserSessionCreateBulk is the builder for creating many UserSession entities in bulk.
func (*UserSessionCreateBulk) Exec ¶
func (uscb *UserSessionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserSessionCreateBulk) ExecX ¶
func (uscb *UserSessionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSessionCreateBulk) Save ¶
func (uscb *UserSessionCreateBulk) Save(ctx context.Context) ([]*UserSession, error)
Save creates the UserSession entities in the database.
func (*UserSessionCreateBulk) SaveX ¶
func (uscb *UserSessionCreateBulk) SaveX(ctx context.Context) []*UserSession
SaveX is like Save, but panics if an error occurs.
type UserSessionDelete ¶
type UserSessionDelete struct {
// contains filtered or unexported fields
}
UserSessionDelete is the builder for deleting a UserSession entity.
func (*UserSessionDelete) Exec ¶
func (usd *UserSessionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserSessionDelete) ExecX ¶
func (usd *UserSessionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserSessionDelete) Where ¶
func (usd *UserSessionDelete) Where(ps ...predicate.UserSession) *UserSessionDelete
Where appends a list predicates to the UserSessionDelete builder.
type UserSessionDeleteOne ¶
type UserSessionDeleteOne struct {
// contains filtered or unexported fields
}
UserSessionDeleteOne is the builder for deleting a single UserSession entity.
func (*UserSessionDeleteOne) Exec ¶
func (usdo *UserSessionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserSessionDeleteOne) ExecX ¶
func (usdo *UserSessionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserSessionEdges ¶
type UserSessionEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
UserSessionEdges holds the relations/edges for other nodes in the graph.
func (UserSessionEdges) UserOrErr ¶
func (e UserSessionEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserSessionGroupBy ¶
type UserSessionGroupBy struct {
// contains filtered or unexported fields
}
UserSessionGroupBy is the group-by builder for UserSession entities.
func (*UserSessionGroupBy) Aggregate ¶
func (usgb *UserSessionGroupBy) Aggregate(fns ...AggregateFunc) *UserSessionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserSessionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSessionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSessionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSessionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSessionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSessionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSessionGroupBy) Scan ¶
func (usgb *UserSessionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserSessionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserSessionMutation ¶
type UserSessionMutation struct {
// contains filtered or unexported fields
}
UserSessionMutation represents an operation that mutates the UserSession nodes in the graph.
func (*UserSessionMutation) Active ¶
func (m *UserSessionMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*UserSessionMutation) AddField ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) AddedEdges ¶
func (m *UserSessionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserSessionMutation) AddedField ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) AddedFields ¶
func (m *UserSessionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserSessionMutation) AddedIDs ¶
func (m *UserSessionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserSessionMutation) ClearEdge ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) ClearField ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) ClearMeta ¶
func (m *UserSessionMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*UserSessionMutation) ClearUser ¶
func (m *UserSessionMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserSessionMutation) ClearedEdges ¶
func (m *UserSessionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserSessionMutation) ClearedFields ¶
func (m *UserSessionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserSessionMutation) Client ¶
func (m UserSessionMutation) 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 (*UserSessionMutation) CreateTime ¶
func (m *UserSessionMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserSessionMutation) EdgeCleared ¶
func (m *UserSessionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserSessionMutation) Field ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) FieldCleared ¶
func (m *UserSessionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserSessionMutation) Fields ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) ID ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) IDs ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) IP ¶
func (m *UserSessionMutation) IP() (r string, exists bool)
IP returns the value of the "ip" field in the mutation.
func (*UserSessionMutation) LastActivity ¶
func (m *UserSessionMutation) LastActivity() (r time.Time, exists bool)
LastActivity returns the value of the "last_activity" field in the mutation.
func (*UserSessionMutation) Meta ¶
func (m *UserSessionMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*UserSessionMutation) MetaCleared ¶
func (m *UserSessionMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*UserSessionMutation) OldActive ¶
func (m *UserSessionMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the UserSession entity. If the UserSession 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 (*UserSessionMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the UserSession entity. If the UserSession 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 (*UserSessionMutation) 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 (*UserSessionMutation) OldIP ¶
func (m *UserSessionMutation) OldIP(ctx context.Context) (v string, err error)
OldIP returns the old "ip" field's value of the UserSession entity. If the UserSession 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 (*UserSessionMutation) OldLastActivity ¶
OldLastActivity returns the old "last_activity" field's value of the UserSession entity. If the UserSession 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 (*UserSessionMutation) OldMeta ¶
func (m *UserSessionMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the UserSession entity. If the UserSession 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 (*UserSessionMutation) OldSid ¶
func (m *UserSessionMutation) OldSid(ctx context.Context) (v string, err error)
OldSid returns the old "sid" field's value of the UserSession entity. If the UserSession 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 (*UserSessionMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the UserSession entity. If the UserSession 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 (*UserSessionMutation) OldUserAgent ¶
func (m *UserSessionMutation) OldUserAgent(ctx context.Context) (v string, err error)
OldUserAgent returns the old "user_agent" field's value of the UserSession entity. If the UserSession 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 (*UserSessionMutation) Op ¶
func (m *UserSessionMutation) Op() Op
Op returns the operation name.
func (*UserSessionMutation) RemovedEdges ¶
func (m *UserSessionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserSessionMutation) RemovedIDs ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) ResetActive ¶
func (m *UserSessionMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*UserSessionMutation) ResetCreateTime ¶
func (m *UserSessionMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserSessionMutation) ResetEdge ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) ResetField ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) ResetIP ¶
func (m *UserSessionMutation) ResetIP()
ResetIP resets all changes to the "ip" field.
func (*UserSessionMutation) ResetLastActivity ¶
func (m *UserSessionMutation) ResetLastActivity()
ResetLastActivity resets all changes to the "last_activity" field.
func (*UserSessionMutation) ResetMeta ¶
func (m *UserSessionMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*UserSessionMutation) ResetSid ¶
func (m *UserSessionMutation) ResetSid()
ResetSid resets all changes to the "sid" field.
func (*UserSessionMutation) ResetUpdateTime ¶
func (m *UserSessionMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserSessionMutation) ResetUser ¶
func (m *UserSessionMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserSessionMutation) ResetUserAgent ¶
func (m *UserSessionMutation) ResetUserAgent()
ResetUserAgent resets all changes to the "user_agent" field.
func (*UserSessionMutation) SetActive ¶
func (m *UserSessionMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*UserSessionMutation) SetCreateTime ¶
func (m *UserSessionMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserSessionMutation) SetField ¶
func (m *UserSessionMutation) 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 (*UserSessionMutation) SetIP ¶
func (m *UserSessionMutation) SetIP(s string)
SetIP sets the "ip" field.
func (*UserSessionMutation) SetLastActivity ¶
func (m *UserSessionMutation) SetLastActivity(t time.Time)
SetLastActivity sets the "last_activity" field.
func (*UserSessionMutation) SetMeta ¶
func (m *UserSessionMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*UserSessionMutation) SetSid ¶
func (m *UserSessionMutation) SetSid(s string)
SetSid sets the "sid" field.
func (*UserSessionMutation) SetUpdateTime ¶
func (m *UserSessionMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserSessionMutation) SetUserAgent ¶
func (m *UserSessionMutation) SetUserAgent(s string)
SetUserAgent sets the "user_agent" field.
func (*UserSessionMutation) SetUserID ¶
func (m *UserSessionMutation) SetUserID(id uuid.UUID)
SetUserID sets the "user" edge to the User entity by id.
func (*UserSessionMutation) Sid ¶
func (m *UserSessionMutation) Sid() (r string, exists bool)
Sid returns the value of the "sid" field in the mutation.
func (UserSessionMutation) Tx ¶
func (m UserSessionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserSessionMutation) Type ¶
func (m *UserSessionMutation) Type() string
Type returns the node type of this mutation (UserSession).
func (*UserSessionMutation) UpdateTime ¶
func (m *UserSessionMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserSessionMutation) UserAgent ¶
func (m *UserSessionMutation) UserAgent() (r string, exists bool)
UserAgent returns the value of the "user_agent" field in the mutation.
func (*UserSessionMutation) UserCleared ¶
func (m *UserSessionMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*UserSessionMutation) UserID ¶
func (m *UserSessionMutation) UserID() (id uuid.UUID, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*UserSessionMutation) UserIDs ¶
func (m *UserSessionMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*UserSessionMutation) Where ¶
func (m *UserSessionMutation) Where(ps ...predicate.UserSession)
Where appends a list predicates to the UserSessionMutation builder.
type UserSessionQuery ¶
type UserSessionQuery struct {
// contains filtered or unexported fields
}
UserSessionQuery is the builder for querying UserSession entities.
func (*UserSessionQuery) All ¶
func (usq *UserSessionQuery) All(ctx context.Context) ([]*UserSession, error)
All executes the query and returns a list of UserSessions.
func (*UserSessionQuery) AllX ¶
func (usq *UserSessionQuery) AllX(ctx context.Context) []*UserSession
AllX is like All, but panics if an error occurs.
func (*UserSessionQuery) Clone ¶
func (usq *UserSessionQuery) Clone() *UserSessionQuery
Clone returns a duplicate of the UserSessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserSessionQuery) Count ¶
func (usq *UserSessionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserSessionQuery) CountX ¶
func (usq *UserSessionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserSessionQuery) Exist ¶
func (usq *UserSessionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserSessionQuery) ExistX ¶
func (usq *UserSessionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserSessionQuery) First ¶
func (usq *UserSessionQuery) First(ctx context.Context) (*UserSession, error)
First returns the first UserSession entity from the query. Returns a *NotFoundError when no UserSession was found.
func (*UserSessionQuery) FirstID ¶
func (usq *UserSessionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserSession ID from the query. Returns a *NotFoundError when no UserSession ID was found.
func (*UserSessionQuery) FirstIDX ¶
func (usq *UserSessionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserSessionQuery) FirstX ¶
func (usq *UserSessionQuery) FirstX(ctx context.Context) *UserSession
FirstX is like First, but panics if an error occurs.
func (*UserSessionQuery) GroupBy ¶
func (usq *UserSessionQuery) GroupBy(field string, fields ...string) *UserSessionGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.UserSession.Query(). GroupBy(usersession.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserSessionQuery) IDs ¶
func (usq *UserSessionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserSession IDs.
func (*UserSessionQuery) IDsX ¶
func (usq *UserSessionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserSessionQuery) Limit ¶
func (usq *UserSessionQuery) Limit(limit int) *UserSessionQuery
Limit adds a limit step to the query.
func (*UserSessionQuery) Offset ¶
func (usq *UserSessionQuery) Offset(offset int) *UserSessionQuery
Offset adds an offset step to the query.
func (*UserSessionQuery) Only ¶
func (usq *UserSessionQuery) Only(ctx context.Context) (*UserSession, error)
Only returns a single UserSession entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserSession entity is found. Returns a *NotFoundError when no UserSession entities are found.
func (*UserSessionQuery) OnlyID ¶
func (usq *UserSessionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserSession ID in the query. Returns a *NotSingularError when more than one UserSession ID is found. Returns a *NotFoundError when no entities are found.
func (*UserSessionQuery) OnlyIDX ¶
func (usq *UserSessionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserSessionQuery) OnlyX ¶
func (usq *UserSessionQuery) OnlyX(ctx context.Context) *UserSession
OnlyX is like Only, but panics if an error occurs.
func (*UserSessionQuery) Order ¶
func (usq *UserSessionQuery) Order(o ...OrderFunc) *UserSessionQuery
Order adds an order step to the query.
func (*UserSessionQuery) QueryUser ¶
func (usq *UserSessionQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserSessionQuery) Select ¶
func (usq *UserSessionQuery) Select(fields ...string) *UserSessionSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.UserSession.Query(). Select(usersession.FieldCreateTime). Scan(ctx, &v)
func (*UserSessionQuery) Unique ¶
func (usq *UserSessionQuery) Unique(unique bool) *UserSessionQuery
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 (*UserSessionQuery) Where ¶
func (usq *UserSessionQuery) Where(ps ...predicate.UserSession) *UserSessionQuery
Where adds a new predicate for the UserSessionQuery builder.
func (*UserSessionQuery) WithUser ¶
func (usq *UserSessionQuery) WithUser(opts ...func(*UserQuery)) *UserSessionQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type UserSessionSelect ¶
type UserSessionSelect struct { *UserSessionQuery // contains filtered or unexported fields }
UserSessionSelect is the builder for selecting fields of UserSession entities.
func (*UserSessionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSessionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSessionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSessionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSessionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSessionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSessionSelect) Scan ¶
func (uss *UserSessionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSessionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserSessionUpdate ¶
type UserSessionUpdate struct {
// contains filtered or unexported fields
}
UserSessionUpdate is the builder for updating UserSession entities.
func (*UserSessionUpdate) ClearMeta ¶
func (usu *UserSessionUpdate) ClearMeta() *UserSessionUpdate
ClearMeta clears the value of the "meta" field.
func (*UserSessionUpdate) ClearUser ¶
func (usu *UserSessionUpdate) ClearUser() *UserSessionUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserSessionUpdate) Exec ¶
func (usu *UserSessionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserSessionUpdate) ExecX ¶
func (usu *UserSessionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSessionUpdate) Mutation ¶
func (usu *UserSessionUpdate) Mutation() *UserSessionMutation
Mutation returns the UserSessionMutation object of the builder.
func (*UserSessionUpdate) Save ¶
func (usu *UserSessionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserSessionUpdate) SaveX ¶
func (usu *UserSessionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserSessionUpdate) SetActive ¶
func (usu *UserSessionUpdate) SetActive(b bool) *UserSessionUpdate
SetActive sets the "active" field.
func (*UserSessionUpdate) SetIP ¶
func (usu *UserSessionUpdate) SetIP(s string) *UserSessionUpdate
SetIP sets the "ip" field.
func (*UserSessionUpdate) SetLastActivity ¶
func (usu *UserSessionUpdate) SetLastActivity(t time.Time) *UserSessionUpdate
SetLastActivity sets the "last_activity" field.
func (*UserSessionUpdate) SetMeta ¶
func (usu *UserSessionUpdate) SetMeta(m map[string]interface{}) *UserSessionUpdate
SetMeta sets the "meta" field.
func (*UserSessionUpdate) SetNillableActive ¶
func (usu *UserSessionUpdate) SetNillableActive(b *bool) *UserSessionUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*UserSessionUpdate) SetNillableLastActivity ¶
func (usu *UserSessionUpdate) SetNillableLastActivity(t *time.Time) *UserSessionUpdate
SetNillableLastActivity sets the "last_activity" field if the given value is not nil.
func (*UserSessionUpdate) SetUpdateTime ¶
func (usu *UserSessionUpdate) SetUpdateTime(t time.Time) *UserSessionUpdate
SetUpdateTime sets the "update_time" field.
func (*UserSessionUpdate) SetUser ¶
func (usu *UserSessionUpdate) SetUser(u *User) *UserSessionUpdate
SetUser sets the "user" edge to the User entity.
func (*UserSessionUpdate) SetUserAgent ¶
func (usu *UserSessionUpdate) SetUserAgent(s string) *UserSessionUpdate
SetUserAgent sets the "user_agent" field.
func (*UserSessionUpdate) SetUserID ¶
func (usu *UserSessionUpdate) SetUserID(id uuid.UUID) *UserSessionUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*UserSessionUpdate) Where ¶
func (usu *UserSessionUpdate) Where(ps ...predicate.UserSession) *UserSessionUpdate
Where appends a list predicates to the UserSessionUpdate builder.
type UserSessionUpdateOne ¶
type UserSessionUpdateOne struct {
// contains filtered or unexported fields
}
UserSessionUpdateOne is the builder for updating a single UserSession entity.
func (*UserSessionUpdateOne) ClearMeta ¶
func (usuo *UserSessionUpdateOne) ClearMeta() *UserSessionUpdateOne
ClearMeta clears the value of the "meta" field.
func (*UserSessionUpdateOne) ClearUser ¶
func (usuo *UserSessionUpdateOne) ClearUser() *UserSessionUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserSessionUpdateOne) Exec ¶
func (usuo *UserSessionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserSessionUpdateOne) ExecX ¶
func (usuo *UserSessionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSessionUpdateOne) Mutation ¶
func (usuo *UserSessionUpdateOne) Mutation() *UserSessionMutation
Mutation returns the UserSessionMutation object of the builder.
func (*UserSessionUpdateOne) Save ¶
func (usuo *UserSessionUpdateOne) Save(ctx context.Context) (*UserSession, error)
Save executes the query and returns the updated UserSession entity.
func (*UserSessionUpdateOne) SaveX ¶
func (usuo *UserSessionUpdateOne) SaveX(ctx context.Context) *UserSession
SaveX is like Save, but panics if an error occurs.
func (*UserSessionUpdateOne) Select ¶
func (usuo *UserSessionUpdateOne) Select(field string, fields ...string) *UserSessionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserSessionUpdateOne) SetActive ¶
func (usuo *UserSessionUpdateOne) SetActive(b bool) *UserSessionUpdateOne
SetActive sets the "active" field.
func (*UserSessionUpdateOne) SetIP ¶
func (usuo *UserSessionUpdateOne) SetIP(s string) *UserSessionUpdateOne
SetIP sets the "ip" field.
func (*UserSessionUpdateOne) SetLastActivity ¶
func (usuo *UserSessionUpdateOne) SetLastActivity(t time.Time) *UserSessionUpdateOne
SetLastActivity sets the "last_activity" field.
func (*UserSessionUpdateOne) SetMeta ¶
func (usuo *UserSessionUpdateOne) SetMeta(m map[string]interface{}) *UserSessionUpdateOne
SetMeta sets the "meta" field.
func (*UserSessionUpdateOne) SetNillableActive ¶
func (usuo *UserSessionUpdateOne) SetNillableActive(b *bool) *UserSessionUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*UserSessionUpdateOne) SetNillableLastActivity ¶
func (usuo *UserSessionUpdateOne) SetNillableLastActivity(t *time.Time) *UserSessionUpdateOne
SetNillableLastActivity sets the "last_activity" field if the given value is not nil.
func (*UserSessionUpdateOne) SetUpdateTime ¶
func (usuo *UserSessionUpdateOne) SetUpdateTime(t time.Time) *UserSessionUpdateOne
SetUpdateTime sets the "update_time" field.
func (*UserSessionUpdateOne) SetUser ¶
func (usuo *UserSessionUpdateOne) SetUser(u *User) *UserSessionUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserSessionUpdateOne) SetUserAgent ¶
func (usuo *UserSessionUpdateOne) SetUserAgent(s string) *UserSessionUpdateOne
SetUserAgent sets the "user_agent" field.
func (*UserSessionUpdateOne) SetUserID ¶
func (usuo *UserSessionUpdateOne) SetUserID(id uuid.UUID) *UserSessionUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type UserSessions ¶
type UserSessions []*UserSession
UserSessions is a parsable slice of UserSession.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddAliasIDs ¶
func (uu *UserUpdate) AddAliasIDs(ids ...uuid.UUID) *UserUpdate
AddAliasIDs adds the "aliases" edge to the User entity by IDs.
func (*UserUpdate) AddAliases ¶
func (uu *UserUpdate) AddAliases(u ...*User) *UserUpdate
AddAliases adds the "aliases" edges to the User entity.
func (*UserUpdate) AddSessionIDs ¶
func (uu *UserUpdate) AddSessionIDs(ids ...int) *UserUpdate
AddSessionIDs adds the "sessions" edge to the UserSession entity by IDs.
func (*UserUpdate) AddSessions ¶
func (uu *UserUpdate) AddSessions(u ...*UserSession) *UserUpdate
AddSessions adds the "sessions" edges to the UserSession entity.
func (*UserUpdate) AddTakeIDs ¶
func (uu *UserUpdate) AddTakeIDs(ids ...uuid.UUID) *UserUpdate
AddTakeIDs adds the "takes" edge to the Take entity by IDs.
func (*UserUpdate) AddTakes ¶
func (uu *UserUpdate) AddTakes(t ...*Take) *UserUpdate
AddTakes adds the "takes" edges to the Take entity.
func (*UserUpdate) ClearAliases ¶
func (uu *UserUpdate) ClearAliases() *UserUpdate
ClearAliases clears all "aliases" edges to the User entity.
func (*UserUpdate) ClearEmail ¶
func (uu *UserUpdate) ClearEmail() *UserUpdate
ClearEmail clears the value of the "email" field.
func (*UserUpdate) ClearMeta ¶
func (uu *UserUpdate) ClearMeta() *UserUpdate
ClearMeta clears the value of the "meta" field.
func (*UserUpdate) ClearParent ¶
func (uu *UserUpdate) ClearParent() *UserUpdate
ClearParent clears the "parent" edge to the User entity.
func (*UserUpdate) ClearPicture ¶
func (uu *UserUpdate) ClearPicture() *UserUpdate
ClearPicture clears the value of the "picture" field.
func (*UserUpdate) ClearSessions ¶
func (uu *UserUpdate) ClearSessions() *UserUpdate
ClearSessions clears all "sessions" edges to the UserSession entity.
func (*UserUpdate) ClearTakes ¶
func (uu *UserUpdate) ClearTakes() *UserUpdate
ClearTakes clears all "takes" edges to the Take entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveAliasIDs ¶
func (uu *UserUpdate) RemoveAliasIDs(ids ...uuid.UUID) *UserUpdate
RemoveAliasIDs removes the "aliases" edge to User entities by IDs.
func (*UserUpdate) RemoveAliases ¶
func (uu *UserUpdate) RemoveAliases(u ...*User) *UserUpdate
RemoveAliases removes "aliases" edges to User entities.
func (*UserUpdate) RemoveSessionIDs ¶
func (uu *UserUpdate) RemoveSessionIDs(ids ...int) *UserUpdate
RemoveSessionIDs removes the "sessions" edge to UserSession entities by IDs.
func (*UserUpdate) RemoveSessions ¶
func (uu *UserUpdate) RemoveSessions(u ...*UserSession) *UserUpdate
RemoveSessions removes "sessions" edges to UserSession entities.
func (*UserUpdate) RemoveTakeIDs ¶
func (uu *UserUpdate) RemoveTakeIDs(ids ...uuid.UUID) *UserUpdate
RemoveTakeIDs removes the "takes" edge to Take entities by IDs.
func (*UserUpdate) RemoveTakes ¶
func (uu *UserUpdate) RemoveTakes(t ...*Take) *UserUpdate
RemoveTakes removes "takes" edges to Take entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAdmin ¶
func (uu *UserUpdate) SetAdmin(b bool) *UserUpdate
SetAdmin sets the "admin" field.
func (*UserUpdate) SetAnonymous ¶
func (uu *UserUpdate) SetAnonymous(b bool) *UserUpdate
SetAnonymous sets the "anonymous" field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetMeta ¶
func (uu *UserUpdate) SetMeta(m map[string]interface{}) *UserUpdate
SetMeta sets the "meta" field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableAdmin ¶
func (uu *UserUpdate) SetNillableAdmin(b *bool) *UserUpdate
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*UserUpdate) SetNillableAnonymous ¶
func (uu *UserUpdate) SetNillableAnonymous(b *bool) *UserUpdate
SetNillableAnonymous sets the "anonymous" field if the given value is not nil.
func (*UserUpdate) SetNillableEmail ¶
func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdate) SetNillableParentID ¶
func (uu *UserUpdate) SetNillableParentID(id *uuid.UUID) *UserUpdate
SetNillableParentID sets the "parent" edge to the User entity by ID if the given value is not nil.
func (*UserUpdate) SetNillablePicture ¶
func (uu *UserUpdate) SetNillablePicture(s *string) *UserUpdate
SetNillablePicture sets the "picture" field if the given value is not nil.
func (*UserUpdate) SetNillableUseDarkTheme ¶
func (uu *UserUpdate) SetNillableUseDarkTheme(b *bool) *UserUpdate
SetNillableUseDarkTheme sets the "use_dark_theme" field if the given value is not nil.
func (*UserUpdate) SetParent ¶
func (uu *UserUpdate) SetParent(u *User) *UserUpdate
SetParent sets the "parent" edge to the User entity.
func (*UserUpdate) SetParentID ¶
func (uu *UserUpdate) SetParentID(id uuid.UUID) *UserUpdate
SetParentID sets the "parent" edge to the User entity by ID.
func (*UserUpdate) SetPasswordHash ¶
func (uu *UserUpdate) SetPasswordHash(s string) *UserUpdate
SetPasswordHash sets the "password_hash" field.
func (*UserUpdate) SetPicture ¶
func (uu *UserUpdate) SetPicture(s string) *UserUpdate
SetPicture sets the "picture" field.
func (*UserUpdate) SetUpdateTime ¶
func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
SetUpdateTime sets the "update_time" field.
func (*UserUpdate) SetUseDarkTheme ¶
func (uu *UserUpdate) SetUseDarkTheme(b bool) *UserUpdate
SetUseDarkTheme sets the "use_dark_theme" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddAliasIDs ¶
func (uuo *UserUpdateOne) AddAliasIDs(ids ...uuid.UUID) *UserUpdateOne
AddAliasIDs adds the "aliases" edge to the User entity by IDs.
func (*UserUpdateOne) AddAliases ¶
func (uuo *UserUpdateOne) AddAliases(u ...*User) *UserUpdateOne
AddAliases adds the "aliases" edges to the User entity.
func (*UserUpdateOne) AddSessionIDs ¶
func (uuo *UserUpdateOne) AddSessionIDs(ids ...int) *UserUpdateOne
AddSessionIDs adds the "sessions" edge to the UserSession entity by IDs.
func (*UserUpdateOne) AddSessions ¶
func (uuo *UserUpdateOne) AddSessions(u ...*UserSession) *UserUpdateOne
AddSessions adds the "sessions" edges to the UserSession entity.
func (*UserUpdateOne) AddTakeIDs ¶
func (uuo *UserUpdateOne) AddTakeIDs(ids ...uuid.UUID) *UserUpdateOne
AddTakeIDs adds the "takes" edge to the Take entity by IDs.
func (*UserUpdateOne) AddTakes ¶
func (uuo *UserUpdateOne) AddTakes(t ...*Take) *UserUpdateOne
AddTakes adds the "takes" edges to the Take entity.
func (*UserUpdateOne) ClearAliases ¶
func (uuo *UserUpdateOne) ClearAliases() *UserUpdateOne
ClearAliases clears all "aliases" edges to the User entity.
func (*UserUpdateOne) ClearEmail ¶
func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne
ClearEmail clears the value of the "email" field.
func (*UserUpdateOne) ClearMeta ¶
func (uuo *UserUpdateOne) ClearMeta() *UserUpdateOne
ClearMeta clears the value of the "meta" field.
func (*UserUpdateOne) ClearParent ¶
func (uuo *UserUpdateOne) ClearParent() *UserUpdateOne
ClearParent clears the "parent" edge to the User entity.
func (*UserUpdateOne) ClearPicture ¶
func (uuo *UserUpdateOne) ClearPicture() *UserUpdateOne
ClearPicture clears the value of the "picture" field.
func (*UserUpdateOne) ClearSessions ¶
func (uuo *UserUpdateOne) ClearSessions() *UserUpdateOne
ClearSessions clears all "sessions" edges to the UserSession entity.
func (*UserUpdateOne) ClearTakes ¶
func (uuo *UserUpdateOne) ClearTakes() *UserUpdateOne
ClearTakes clears all "takes" edges to the Take entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveAliasIDs ¶
func (uuo *UserUpdateOne) RemoveAliasIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveAliasIDs removes the "aliases" edge to User entities by IDs.
func (*UserUpdateOne) RemoveAliases ¶
func (uuo *UserUpdateOne) RemoveAliases(u ...*User) *UserUpdateOne
RemoveAliases removes "aliases" edges to User entities.
func (*UserUpdateOne) RemoveSessionIDs ¶
func (uuo *UserUpdateOne) RemoveSessionIDs(ids ...int) *UserUpdateOne
RemoveSessionIDs removes the "sessions" edge to UserSession entities by IDs.
func (*UserUpdateOne) RemoveSessions ¶
func (uuo *UserUpdateOne) RemoveSessions(u ...*UserSession) *UserUpdateOne
RemoveSessions removes "sessions" edges to UserSession entities.
func (*UserUpdateOne) RemoveTakeIDs ¶
func (uuo *UserUpdateOne) RemoveTakeIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveTakeIDs removes the "takes" edge to Take entities by IDs.
func (*UserUpdateOne) RemoveTakes ¶
func (uuo *UserUpdateOne) RemoveTakes(t ...*Take) *UserUpdateOne
RemoveTakes removes "takes" edges to Take entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetAdmin ¶
func (uuo *UserUpdateOne) SetAdmin(b bool) *UserUpdateOne
SetAdmin sets the "admin" field.
func (*UserUpdateOne) SetAnonymous ¶
func (uuo *UserUpdateOne) SetAnonymous(b bool) *UserUpdateOne
SetAnonymous sets the "anonymous" field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetMeta ¶
func (uuo *UserUpdateOne) SetMeta(m map[string]interface{}) *UserUpdateOne
SetMeta sets the "meta" field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableAdmin ¶
func (uuo *UserUpdateOne) SetNillableAdmin(b *bool) *UserUpdateOne
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*UserUpdateOne) SetNillableAnonymous ¶
func (uuo *UserUpdateOne) SetNillableAnonymous(b *bool) *UserUpdateOne
SetNillableAnonymous sets the "anonymous" field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmail ¶
func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdateOne) SetNillableParentID ¶
func (uuo *UserUpdateOne) SetNillableParentID(id *uuid.UUID) *UserUpdateOne
SetNillableParentID sets the "parent" edge to the User entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillablePicture ¶
func (uuo *UserUpdateOne) SetNillablePicture(s *string) *UserUpdateOne
SetNillablePicture sets the "picture" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUseDarkTheme ¶
func (uuo *UserUpdateOne) SetNillableUseDarkTheme(b *bool) *UserUpdateOne
SetNillableUseDarkTheme sets the "use_dark_theme" field if the given value is not nil.
func (*UserUpdateOne) SetParent ¶
func (uuo *UserUpdateOne) SetParent(u *User) *UserUpdateOne
SetParent sets the "parent" edge to the User entity.
func (*UserUpdateOne) SetParentID ¶
func (uuo *UserUpdateOne) SetParentID(id uuid.UUID) *UserUpdateOne
SetParentID sets the "parent" edge to the User entity by ID.
func (*UserUpdateOne) SetPasswordHash ¶
func (uuo *UserUpdateOne) SetPasswordHash(s string) *UserUpdateOne
SetPasswordHash sets the "password_hash" field.
func (*UserUpdateOne) SetPicture ¶
func (uuo *UserUpdateOne) SetPicture(s string) *UserUpdateOne
SetPicture sets the "picture" field.
func (*UserUpdateOne) SetUpdateTime ¶
func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
SetUpdateTime sets the "update_time" field.
func (*UserUpdateOne) SetUseDarkTheme ¶
func (uuo *UserUpdateOne) SetUseDarkTheme(b bool) *UserUpdateOne
SetUseDarkTheme sets the "use_dark_theme" field.
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
- config.go
- context.go
- ent.go
- generate.go
- interpretation.go
- interpretation_create.go
- interpretation_delete.go
- interpretation_query.go
- interpretation_update.go
- interpretationtranslation.go
- interpretationtranslation_create.go
- interpretationtranslation_delete.go
- interpretationtranslation_query.go
- interpretationtranslation_update.go
- item.go
- item_create.go
- item_delete.go
- item_query.go
- item_update.go
- itemtranslation.go
- itemtranslation_create.go
- itemtranslation_delete.go
- itemtranslation_query.go
- itemtranslation_update.go
- mutation.go
- norm.go
- norm_create.go
- norm_delete.go
- norm_query.go
- norm_update.go
- question.go
- question_create.go
- question_delete.go
- question_query.go
- question_update.go
- questiontranslation.go
- questiontranslation_create.go
- questiontranslation_delete.go
- questiontranslation_query.go
- questiontranslation_update.go
- response.go
- response_create.go
- response_delete.go
- response_query.go
- response_update.go
- result.go
- result_create.go
- result_delete.go
- result_query.go
- result_update.go
- runtime.go
- sample.go
- sample_create.go
- sample_delete.go
- sample_query.go
- sample_update.go
- scale.go
- scale_create.go
- scale_delete.go
- scale_query.go
- scale_update.go
- scaleitem.go
- scaleitem_create.go
- scaleitem_delete.go
- scaleitem_query.go
- scaleitem_update.go
- scaletranslation.go
- scaletranslation_create.go
- scaletranslation_delete.go
- scaletranslation_query.go
- scaletranslation_update.go
- tag.go
- tag_create.go
- tag_delete.go
- tag_query.go
- tag_update.go
- tagtranslation.go
- tagtranslation_create.go
- tagtranslation_delete.go
- tagtranslation_query.go
- tagtranslation_update.go
- take.go
- take_create.go
- take_delete.go
- take_query.go
- take_update.go
- test.go
- test_create.go
- test_delete.go
- test_query.go
- test_update.go
- testdisplay.go
- testdisplay_create.go
- testdisplay_delete.go
- testdisplay_query.go
- testdisplay_update.go
- testtranslation.go
- testtranslation_create.go
- testtranslation_delete.go
- testtranslation_query.go
- testtranslation_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- usersession.go
- usersession_create.go
- usersession_delete.go
- usersession_query.go
- usersession_update.go