Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Definition
- type DefinitionClient
- func (c *DefinitionClient) Create() *DefinitionCreate
- func (c *DefinitionClient) CreateBulk(builders ...*DefinitionCreate) *DefinitionCreateBulk
- func (c *DefinitionClient) Delete() *DefinitionDelete
- func (c *DefinitionClient) DeleteOne(d *Definition) *DefinitionDeleteOne
- func (c *DefinitionClient) DeleteOneID(id int) *DefinitionDeleteOne
- func (c *DefinitionClient) Get(ctx context.Context, id int) (*Definition, error)
- func (c *DefinitionClient) GetX(ctx context.Context, id int) *Definition
- func (c *DefinitionClient) Hooks() []Hook
- func (c *DefinitionClient) Intercept(interceptors ...Interceptor)
- func (c *DefinitionClient) Interceptors() []Interceptor
- func (c *DefinitionClient) MapCreateBulk(slice any, setFunc func(*DefinitionCreate, int)) *DefinitionCreateBulk
- func (c *DefinitionClient) Query() *DefinitionQuery
- func (c *DefinitionClient) QuerySynset(d *Definition) *SynsetQuery
- func (c *DefinitionClient) Update() *DefinitionUpdate
- func (c *DefinitionClient) UpdateOne(d *Definition) *DefinitionUpdateOne
- func (c *DefinitionClient) UpdateOneID(id int) *DefinitionUpdateOne
- func (c *DefinitionClient) Use(hooks ...Hook)
- type DefinitionCreate
- func (dc *DefinitionCreate) Exec(ctx context.Context) error
- func (dc *DefinitionCreate) ExecX(ctx context.Context)
- func (dc *DefinitionCreate) Mutation() *DefinitionMutation
- func (dc *DefinitionCreate) Save(ctx context.Context) (*Definition, error)
- func (dc *DefinitionCreate) SaveX(ctx context.Context) *Definition
- func (dc *DefinitionCreate) SetNillableSynsetID(id *string) *DefinitionCreate
- func (dc *DefinitionCreate) SetSynset(s *Synset) *DefinitionCreate
- func (dc *DefinitionCreate) SetSynsetID(id string) *DefinitionCreate
- func (dc *DefinitionCreate) SetText(s string) *DefinitionCreate
- type DefinitionCreateBulk
- type DefinitionDelete
- type DefinitionDeleteOne
- type DefinitionEdges
- type DefinitionGroupBy
- func (dgb *DefinitionGroupBy) Aggregate(fns ...AggregateFunc) *DefinitionGroupBy
- func (s *DefinitionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DefinitionGroupBy) BoolX(ctx context.Context) bool
- func (s *DefinitionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DefinitionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DefinitionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DefinitionGroupBy) Float64X(ctx context.Context) float64
- func (s *DefinitionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DefinitionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DefinitionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DefinitionGroupBy) IntX(ctx context.Context) int
- func (s *DefinitionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DefinitionGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DefinitionGroupBy) Scan(ctx context.Context, v any) error
- func (s *DefinitionGroupBy) ScanX(ctx context.Context, v any)
- func (s *DefinitionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DefinitionGroupBy) StringX(ctx context.Context) string
- func (s *DefinitionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DefinitionGroupBy) StringsX(ctx context.Context) []string
- type DefinitionMutation
- func (m *DefinitionMutation) AddField(name string, value ent.Value) error
- func (m *DefinitionMutation) AddedEdges() []string
- func (m *DefinitionMutation) AddedField(name string) (ent.Value, bool)
- func (m *DefinitionMutation) AddedFields() []string
- func (m *DefinitionMutation) AddedIDs(name string) []ent.Value
- func (m *DefinitionMutation) ClearEdge(name string) error
- func (m *DefinitionMutation) ClearField(name string) error
- func (m *DefinitionMutation) ClearSynset()
- func (m *DefinitionMutation) ClearedEdges() []string
- func (m *DefinitionMutation) ClearedFields() []string
- func (m DefinitionMutation) Client() *Client
- func (m *DefinitionMutation) EdgeCleared(name string) bool
- func (m *DefinitionMutation) Field(name string) (ent.Value, bool)
- func (m *DefinitionMutation) FieldCleared(name string) bool
- func (m *DefinitionMutation) Fields() []string
- func (m *DefinitionMutation) ID() (id int, exists bool)
- func (m *DefinitionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DefinitionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DefinitionMutation) OldText(ctx context.Context) (v string, err error)
- func (m *DefinitionMutation) Op() Op
- func (m *DefinitionMutation) RemovedEdges() []string
- func (m *DefinitionMutation) RemovedIDs(name string) []ent.Value
- func (m *DefinitionMutation) ResetEdge(name string) error
- func (m *DefinitionMutation) ResetField(name string) error
- func (m *DefinitionMutation) ResetSynset()
- func (m *DefinitionMutation) ResetText()
- func (m *DefinitionMutation) SetField(name string, value ent.Value) error
- func (m *DefinitionMutation) SetOp(op Op)
- func (m *DefinitionMutation) SetSynsetID(id string)
- func (m *DefinitionMutation) SetText(s string)
- func (m *DefinitionMutation) SynsetCleared() bool
- func (m *DefinitionMutation) SynsetID() (id string, exists bool)
- func (m *DefinitionMutation) SynsetIDs() (ids []string)
- func (m *DefinitionMutation) Text() (r string, exists bool)
- func (m DefinitionMutation) Tx() (*Tx, error)
- func (m *DefinitionMutation) Type() string
- func (m *DefinitionMutation) Where(ps ...predicate.Definition)
- func (m *DefinitionMutation) WhereP(ps ...func(*sql.Selector))
- type DefinitionQuery
- func (dq *DefinitionQuery) Aggregate(fns ...AggregateFunc) *DefinitionSelect
- func (dq *DefinitionQuery) All(ctx context.Context) ([]*Definition, error)
- func (dq *DefinitionQuery) AllX(ctx context.Context) []*Definition
- func (dq *DefinitionQuery) Clone() *DefinitionQuery
- func (dq *DefinitionQuery) Count(ctx context.Context) (int, error)
- func (dq *DefinitionQuery) CountX(ctx context.Context) int
- func (dq *DefinitionQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DefinitionQuery) ExistX(ctx context.Context) bool
- func (dq *DefinitionQuery) First(ctx context.Context) (*Definition, error)
- func (dq *DefinitionQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DefinitionQuery) FirstIDX(ctx context.Context) int
- func (dq *DefinitionQuery) FirstX(ctx context.Context) *Definition
- func (dq *DefinitionQuery) GroupBy(field string, fields ...string) *DefinitionGroupBy
- func (dq *DefinitionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (dq *DefinitionQuery) IDsX(ctx context.Context) []int
- func (dq *DefinitionQuery) Limit(limit int) *DefinitionQuery
- func (dq *DefinitionQuery) Offset(offset int) *DefinitionQuery
- func (dq *DefinitionQuery) Only(ctx context.Context) (*Definition, error)
- func (dq *DefinitionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DefinitionQuery) OnlyIDX(ctx context.Context) int
- func (dq *DefinitionQuery) OnlyX(ctx context.Context) *Definition
- func (dq *DefinitionQuery) Order(o ...definition.OrderOption) *DefinitionQuery
- func (dq *DefinitionQuery) QuerySynset() *SynsetQuery
- func (dq *DefinitionQuery) Select(fields ...string) *DefinitionSelect
- func (dq *DefinitionQuery) Unique(unique bool) *DefinitionQuery
- func (dq *DefinitionQuery) Where(ps ...predicate.Definition) *DefinitionQuery
- func (dq *DefinitionQuery) WithSynset(opts ...func(*SynsetQuery)) *DefinitionQuery
- type DefinitionSelect
- func (ds *DefinitionSelect) Aggregate(fns ...AggregateFunc) *DefinitionSelect
- func (s *DefinitionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DefinitionSelect) BoolX(ctx context.Context) bool
- func (s *DefinitionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DefinitionSelect) BoolsX(ctx context.Context) []bool
- func (s *DefinitionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DefinitionSelect) Float64X(ctx context.Context) float64
- func (s *DefinitionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DefinitionSelect) Float64sX(ctx context.Context) []float64
- func (s *DefinitionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DefinitionSelect) IntX(ctx context.Context) int
- func (s *DefinitionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DefinitionSelect) IntsX(ctx context.Context) []int
- func (ds *DefinitionSelect) Scan(ctx context.Context, v any) error
- func (s *DefinitionSelect) ScanX(ctx context.Context, v any)
- func (s *DefinitionSelect) String(ctx context.Context) (_ string, err error)
- func (s *DefinitionSelect) StringX(ctx context.Context) string
- func (s *DefinitionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DefinitionSelect) StringsX(ctx context.Context) []string
- type DefinitionUpdate
- func (du *DefinitionUpdate) ClearSynset() *DefinitionUpdate
- func (du *DefinitionUpdate) Exec(ctx context.Context) error
- func (du *DefinitionUpdate) ExecX(ctx context.Context)
- func (du *DefinitionUpdate) Mutation() *DefinitionMutation
- func (du *DefinitionUpdate) Save(ctx context.Context) (int, error)
- func (du *DefinitionUpdate) SaveX(ctx context.Context) int
- func (du *DefinitionUpdate) SetNillableSynsetID(id *string) *DefinitionUpdate
- func (du *DefinitionUpdate) SetNillableText(s *string) *DefinitionUpdate
- func (du *DefinitionUpdate) SetSynset(s *Synset) *DefinitionUpdate
- func (du *DefinitionUpdate) SetSynsetID(id string) *DefinitionUpdate
- func (du *DefinitionUpdate) SetText(s string) *DefinitionUpdate
- func (du *DefinitionUpdate) Where(ps ...predicate.Definition) *DefinitionUpdate
- type DefinitionUpdateOne
- func (duo *DefinitionUpdateOne) ClearSynset() *DefinitionUpdateOne
- func (duo *DefinitionUpdateOne) Exec(ctx context.Context) error
- func (duo *DefinitionUpdateOne) ExecX(ctx context.Context)
- func (duo *DefinitionUpdateOne) Mutation() *DefinitionMutation
- func (duo *DefinitionUpdateOne) Save(ctx context.Context) (*Definition, error)
- func (duo *DefinitionUpdateOne) SaveX(ctx context.Context) *Definition
- func (duo *DefinitionUpdateOne) Select(field string, fields ...string) *DefinitionUpdateOne
- func (duo *DefinitionUpdateOne) SetNillableSynsetID(id *string) *DefinitionUpdateOne
- func (duo *DefinitionUpdateOne) SetNillableText(s *string) *DefinitionUpdateOne
- func (duo *DefinitionUpdateOne) SetSynset(s *Synset) *DefinitionUpdateOne
- func (duo *DefinitionUpdateOne) SetSynsetID(id string) *DefinitionUpdateOne
- func (duo *DefinitionUpdateOne) SetText(s string) *DefinitionUpdateOne
- func (duo *DefinitionUpdateOne) Where(ps ...predicate.Definition) *DefinitionUpdateOne
- type Definitions
- type Hook
- type InterceptFunc
- type Interceptor
- type Lemma
- type LemmaClient
- func (c *LemmaClient) Create() *LemmaCreate
- func (c *LemmaClient) CreateBulk(builders ...*LemmaCreate) *LemmaCreateBulk
- func (c *LemmaClient) Delete() *LemmaDelete
- func (c *LemmaClient) DeleteOne(l *Lemma) *LemmaDeleteOne
- func (c *LemmaClient) DeleteOneID(id string) *LemmaDeleteOne
- func (c *LemmaClient) Get(ctx context.Context, id string) (*Lemma, error)
- func (c *LemmaClient) GetX(ctx context.Context, id string) *Lemma
- func (c *LemmaClient) Hooks() []Hook
- func (c *LemmaClient) Intercept(interceptors ...Interceptor)
- func (c *LemmaClient) Interceptors() []Interceptor
- func (c *LemmaClient) MapCreateBulk(slice any, setFunc func(*LemmaCreate, int)) *LemmaCreateBulk
- func (c *LemmaClient) Query() *LemmaQuery
- func (c *LemmaClient) QuerySenses(l *Lemma) *SenseQuery
- func (c *LemmaClient) Update() *LemmaUpdate
- func (c *LemmaClient) UpdateOne(l *Lemma) *LemmaUpdateOne
- func (c *LemmaClient) UpdateOneID(id string) *LemmaUpdateOne
- func (c *LemmaClient) Use(hooks ...Hook)
- type LemmaCreate
- func (lc *LemmaCreate) AddSenseIDs(ids ...string) *LemmaCreate
- func (lc *LemmaCreate) AddSenses(s ...*Sense) *LemmaCreate
- func (lc *LemmaCreate) Exec(ctx context.Context) error
- func (lc *LemmaCreate) ExecX(ctx context.Context)
- func (lc *LemmaCreate) Mutation() *LemmaMutation
- func (lc *LemmaCreate) Save(ctx context.Context) (*Lemma, error)
- func (lc *LemmaCreate) SaveX(ctx context.Context) *Lemma
- func (lc *LemmaCreate) SetID(s string) *LemmaCreate
- func (lc *LemmaCreate) SetPartOfSpeech(s string) *LemmaCreate
- func (lc *LemmaCreate) SetWrittenForm(s string) *LemmaCreate
- type LemmaCreateBulk
- type LemmaDelete
- type LemmaDeleteOne
- type LemmaEdges
- type LemmaGroupBy
- func (lgb *LemmaGroupBy) Aggregate(fns ...AggregateFunc) *LemmaGroupBy
- func (s *LemmaGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LemmaGroupBy) BoolX(ctx context.Context) bool
- func (s *LemmaGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LemmaGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LemmaGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LemmaGroupBy) Float64X(ctx context.Context) float64
- func (s *LemmaGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LemmaGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LemmaGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LemmaGroupBy) IntX(ctx context.Context) int
- func (s *LemmaGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LemmaGroupBy) IntsX(ctx context.Context) []int
- func (lgb *LemmaGroupBy) Scan(ctx context.Context, v any) error
- func (s *LemmaGroupBy) ScanX(ctx context.Context, v any)
- func (s *LemmaGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LemmaGroupBy) StringX(ctx context.Context) string
- func (s *LemmaGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LemmaGroupBy) StringsX(ctx context.Context) []string
- type LemmaMutation
- func (m *LemmaMutation) AddField(name string, value ent.Value) error
- func (m *LemmaMutation) AddSenseIDs(ids ...string)
- func (m *LemmaMutation) AddedEdges() []string
- func (m *LemmaMutation) AddedField(name string) (ent.Value, bool)
- func (m *LemmaMutation) AddedFields() []string
- func (m *LemmaMutation) AddedIDs(name string) []ent.Value
- func (m *LemmaMutation) ClearEdge(name string) error
- func (m *LemmaMutation) ClearField(name string) error
- func (m *LemmaMutation) ClearSenses()
- func (m *LemmaMutation) ClearedEdges() []string
- func (m *LemmaMutation) ClearedFields() []string
- func (m LemmaMutation) Client() *Client
- func (m *LemmaMutation) EdgeCleared(name string) bool
- func (m *LemmaMutation) Field(name string) (ent.Value, bool)
- func (m *LemmaMutation) FieldCleared(name string) bool
- func (m *LemmaMutation) Fields() []string
- func (m *LemmaMutation) ID() (id string, exists bool)
- func (m *LemmaMutation) IDs(ctx context.Context) ([]string, error)
- func (m *LemmaMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LemmaMutation) OldPartOfSpeech(ctx context.Context) (v string, err error)
- func (m *LemmaMutation) OldWrittenForm(ctx context.Context) (v string, err error)
- func (m *LemmaMutation) Op() Op
- func (m *LemmaMutation) PartOfSpeech() (r string, exists bool)
- func (m *LemmaMutation) RemoveSenseIDs(ids ...string)
- func (m *LemmaMutation) RemovedEdges() []string
- func (m *LemmaMutation) RemovedIDs(name string) []ent.Value
- func (m *LemmaMutation) RemovedSensesIDs() (ids []string)
- func (m *LemmaMutation) ResetEdge(name string) error
- func (m *LemmaMutation) ResetField(name string) error
- func (m *LemmaMutation) ResetPartOfSpeech()
- func (m *LemmaMutation) ResetSenses()
- func (m *LemmaMutation) ResetWrittenForm()
- func (m *LemmaMutation) SensesCleared() bool
- func (m *LemmaMutation) SensesIDs() (ids []string)
- func (m *LemmaMutation) SetField(name string, value ent.Value) error
- func (m *LemmaMutation) SetID(id string)
- func (m *LemmaMutation) SetOp(op Op)
- func (m *LemmaMutation) SetPartOfSpeech(s string)
- func (m *LemmaMutation) SetWrittenForm(s string)
- func (m LemmaMutation) Tx() (*Tx, error)
- func (m *LemmaMutation) Type() string
- func (m *LemmaMutation) Where(ps ...predicate.Lemma)
- func (m *LemmaMutation) WhereP(ps ...func(*sql.Selector))
- func (m *LemmaMutation) WrittenForm() (r string, exists bool)
- type LemmaQuery
- func (lq *LemmaQuery) Aggregate(fns ...AggregateFunc) *LemmaSelect
- func (lq *LemmaQuery) All(ctx context.Context) ([]*Lemma, error)
- func (lq *LemmaQuery) AllX(ctx context.Context) []*Lemma
- func (lq *LemmaQuery) Clone() *LemmaQuery
- func (lq *LemmaQuery) Count(ctx context.Context) (int, error)
- func (lq *LemmaQuery) CountX(ctx context.Context) int
- func (lq *LemmaQuery) Exist(ctx context.Context) (bool, error)
- func (lq *LemmaQuery) ExistX(ctx context.Context) bool
- func (lq *LemmaQuery) First(ctx context.Context) (*Lemma, error)
- func (lq *LemmaQuery) FirstID(ctx context.Context) (id string, err error)
- func (lq *LemmaQuery) FirstIDX(ctx context.Context) string
- func (lq *LemmaQuery) FirstX(ctx context.Context) *Lemma
- func (lq *LemmaQuery) GroupBy(field string, fields ...string) *LemmaGroupBy
- func (lq *LemmaQuery) IDs(ctx context.Context) (ids []string, err error)
- func (lq *LemmaQuery) IDsX(ctx context.Context) []string
- func (lq *LemmaQuery) Limit(limit int) *LemmaQuery
- func (lq *LemmaQuery) Offset(offset int) *LemmaQuery
- func (lq *LemmaQuery) Only(ctx context.Context) (*Lemma, error)
- func (lq *LemmaQuery) OnlyID(ctx context.Context) (id string, err error)
- func (lq *LemmaQuery) OnlyIDX(ctx context.Context) string
- func (lq *LemmaQuery) OnlyX(ctx context.Context) *Lemma
- func (lq *LemmaQuery) Order(o ...lemma.OrderOption) *LemmaQuery
- func (lq *LemmaQuery) QuerySenses() *SenseQuery
- func (lq *LemmaQuery) Select(fields ...string) *LemmaSelect
- func (lq *LemmaQuery) Unique(unique bool) *LemmaQuery
- func (lq *LemmaQuery) Where(ps ...predicate.Lemma) *LemmaQuery
- func (lq *LemmaQuery) WithSenses(opts ...func(*SenseQuery)) *LemmaQuery
- type LemmaSelect
- func (ls *LemmaSelect) Aggregate(fns ...AggregateFunc) *LemmaSelect
- func (s *LemmaSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LemmaSelect) BoolX(ctx context.Context) bool
- func (s *LemmaSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LemmaSelect) BoolsX(ctx context.Context) []bool
- func (s *LemmaSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LemmaSelect) Float64X(ctx context.Context) float64
- func (s *LemmaSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LemmaSelect) Float64sX(ctx context.Context) []float64
- func (s *LemmaSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LemmaSelect) IntX(ctx context.Context) int
- func (s *LemmaSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LemmaSelect) IntsX(ctx context.Context) []int
- func (ls *LemmaSelect) Scan(ctx context.Context, v any) error
- func (s *LemmaSelect) ScanX(ctx context.Context, v any)
- func (s *LemmaSelect) String(ctx context.Context) (_ string, err error)
- func (s *LemmaSelect) StringX(ctx context.Context) string
- func (s *LemmaSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LemmaSelect) StringsX(ctx context.Context) []string
- type LemmaUpdate
- func (lu *LemmaUpdate) AddSenseIDs(ids ...string) *LemmaUpdate
- func (lu *LemmaUpdate) AddSenses(s ...*Sense) *LemmaUpdate
- func (lu *LemmaUpdate) ClearSenses() *LemmaUpdate
- func (lu *LemmaUpdate) Exec(ctx context.Context) error
- func (lu *LemmaUpdate) ExecX(ctx context.Context)
- func (lu *LemmaUpdate) Mutation() *LemmaMutation
- func (lu *LemmaUpdate) RemoveSenseIDs(ids ...string) *LemmaUpdate
- func (lu *LemmaUpdate) RemoveSenses(s ...*Sense) *LemmaUpdate
- func (lu *LemmaUpdate) Save(ctx context.Context) (int, error)
- func (lu *LemmaUpdate) SaveX(ctx context.Context) int
- func (lu *LemmaUpdate) SetNillablePartOfSpeech(s *string) *LemmaUpdate
- func (lu *LemmaUpdate) SetNillableWrittenForm(s *string) *LemmaUpdate
- func (lu *LemmaUpdate) SetPartOfSpeech(s string) *LemmaUpdate
- func (lu *LemmaUpdate) SetWrittenForm(s string) *LemmaUpdate
- func (lu *LemmaUpdate) Where(ps ...predicate.Lemma) *LemmaUpdate
- type LemmaUpdateOne
- func (luo *LemmaUpdateOne) AddSenseIDs(ids ...string) *LemmaUpdateOne
- func (luo *LemmaUpdateOne) AddSenses(s ...*Sense) *LemmaUpdateOne
- func (luo *LemmaUpdateOne) ClearSenses() *LemmaUpdateOne
- func (luo *LemmaUpdateOne) Exec(ctx context.Context) error
- func (luo *LemmaUpdateOne) ExecX(ctx context.Context)
- func (luo *LemmaUpdateOne) Mutation() *LemmaMutation
- func (luo *LemmaUpdateOne) RemoveSenseIDs(ids ...string) *LemmaUpdateOne
- func (luo *LemmaUpdateOne) RemoveSenses(s ...*Sense) *LemmaUpdateOne
- func (luo *LemmaUpdateOne) Save(ctx context.Context) (*Lemma, error)
- func (luo *LemmaUpdateOne) SaveX(ctx context.Context) *Lemma
- func (luo *LemmaUpdateOne) Select(field string, fields ...string) *LemmaUpdateOne
- func (luo *LemmaUpdateOne) SetNillablePartOfSpeech(s *string) *LemmaUpdateOne
- func (luo *LemmaUpdateOne) SetNillableWrittenForm(s *string) *LemmaUpdateOne
- func (luo *LemmaUpdateOne) SetPartOfSpeech(s string) *LemmaUpdateOne
- func (luo *LemmaUpdateOne) SetWrittenForm(s string) *LemmaUpdateOne
- func (luo *LemmaUpdateOne) Where(ps ...predicate.Lemma) *LemmaUpdateOne
- type Lemmas
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Sense
- func (s *Sense) QueryLemma() *LemmaQuery
- func (s *Sense) QueryRelFrom() *SenseRelationQuery
- func (s *Sense) QueryRelTo() *SenseRelationQuery
- func (s *Sense) QuerySynset() *SynsetQuery
- func (s *Sense) String() string
- func (s *Sense) Unwrap() *Sense
- func (s *Sense) Update() *SenseUpdateOne
- func (s *Sense) Value(name string) (ent.Value, error)
- type SenseClient
- func (c *SenseClient) Create() *SenseCreate
- func (c *SenseClient) CreateBulk(builders ...*SenseCreate) *SenseCreateBulk
- func (c *SenseClient) Delete() *SenseDelete
- func (c *SenseClient) DeleteOne(s *Sense) *SenseDeleteOne
- func (c *SenseClient) DeleteOneID(id string) *SenseDeleteOne
- func (c *SenseClient) Get(ctx context.Context, id string) (*Sense, error)
- func (c *SenseClient) GetX(ctx context.Context, id string) *Sense
- func (c *SenseClient) Hooks() []Hook
- func (c *SenseClient) Intercept(interceptors ...Interceptor)
- func (c *SenseClient) Interceptors() []Interceptor
- func (c *SenseClient) MapCreateBulk(slice any, setFunc func(*SenseCreate, int)) *SenseCreateBulk
- func (c *SenseClient) Query() *SenseQuery
- func (c *SenseClient) QueryLemma(s *Sense) *LemmaQuery
- func (c *SenseClient) QueryRelFrom(s *Sense) *SenseRelationQuery
- func (c *SenseClient) QueryRelTo(s *Sense) *SenseRelationQuery
- func (c *SenseClient) QuerySynset(s *Sense) *SynsetQuery
- func (c *SenseClient) Update() *SenseUpdate
- func (c *SenseClient) UpdateOne(s *Sense) *SenseUpdateOne
- func (c *SenseClient) UpdateOneID(id string) *SenseUpdateOne
- func (c *SenseClient) Use(hooks ...Hook)
- type SenseCreate
- func (sc *SenseCreate) AddRelFrom(s ...*SenseRelation) *SenseCreate
- func (sc *SenseCreate) AddRelFromIDs(ids ...int) *SenseCreate
- func (sc *SenseCreate) AddRelTo(s ...*SenseRelation) *SenseCreate
- func (sc *SenseCreate) AddRelToIDs(ids ...int) *SenseCreate
- func (sc *SenseCreate) Exec(ctx context.Context) error
- func (sc *SenseCreate) ExecX(ctx context.Context)
- func (sc *SenseCreate) Mutation() *SenseMutation
- func (sc *SenseCreate) Save(ctx context.Context) (*Sense, error)
- func (sc *SenseCreate) SaveX(ctx context.Context) *Sense
- func (sc *SenseCreate) SetID(s string) *SenseCreate
- func (sc *SenseCreate) SetLemma(l *Lemma) *SenseCreate
- func (sc *SenseCreate) SetLemmaID(id string) *SenseCreate
- func (sc *SenseCreate) SetNillableLemmaID(id *string) *SenseCreate
- func (sc *SenseCreate) SetNillableSynsetID(id *string) *SenseCreate
- func (sc *SenseCreate) SetSynset(s *Synset) *SenseCreate
- func (sc *SenseCreate) SetSynsetID(id string) *SenseCreate
- type SenseCreateBulk
- type SenseDelete
- type SenseDeleteOne
- type SenseEdges
- type SenseGroupBy
- func (sgb *SenseGroupBy) Aggregate(fns ...AggregateFunc) *SenseGroupBy
- func (s *SenseGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SenseGroupBy) BoolX(ctx context.Context) bool
- func (s *SenseGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SenseGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SenseGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SenseGroupBy) Float64X(ctx context.Context) float64
- func (s *SenseGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SenseGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SenseGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SenseGroupBy) IntX(ctx context.Context) int
- func (s *SenseGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SenseGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SenseGroupBy) Scan(ctx context.Context, v any) error
- func (s *SenseGroupBy) ScanX(ctx context.Context, v any)
- func (s *SenseGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SenseGroupBy) StringX(ctx context.Context) string
- func (s *SenseGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SenseGroupBy) StringsX(ctx context.Context) []string
- type SenseMutation
- func (m *SenseMutation) AddField(name string, value ent.Value) error
- func (m *SenseMutation) AddRelFromIDs(ids ...int)
- func (m *SenseMutation) AddRelToIDs(ids ...int)
- func (m *SenseMutation) AddedEdges() []string
- func (m *SenseMutation) AddedField(name string) (ent.Value, bool)
- func (m *SenseMutation) AddedFields() []string
- func (m *SenseMutation) AddedIDs(name string) []ent.Value
- func (m *SenseMutation) ClearEdge(name string) error
- func (m *SenseMutation) ClearField(name string) error
- func (m *SenseMutation) ClearLemma()
- func (m *SenseMutation) ClearRelFrom()
- func (m *SenseMutation) ClearRelTo()
- func (m *SenseMutation) ClearSynset()
- func (m *SenseMutation) ClearedEdges() []string
- func (m *SenseMutation) ClearedFields() []string
- func (m SenseMutation) Client() *Client
- func (m *SenseMutation) EdgeCleared(name string) bool
- func (m *SenseMutation) Field(name string) (ent.Value, bool)
- func (m *SenseMutation) FieldCleared(name string) bool
- func (m *SenseMutation) Fields() []string
- func (m *SenseMutation) ID() (id string, exists bool)
- func (m *SenseMutation) IDs(ctx context.Context) ([]string, error)
- func (m *SenseMutation) LemmaCleared() bool
- func (m *SenseMutation) LemmaID() (id string, exists bool)
- func (m *SenseMutation) LemmaIDs() (ids []string)
- func (m *SenseMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SenseMutation) Op() Op
- func (m *SenseMutation) RelFromCleared() bool
- func (m *SenseMutation) RelFromIDs() (ids []int)
- func (m *SenseMutation) RelToCleared() bool
- func (m *SenseMutation) RelToIDs() (ids []int)
- func (m *SenseMutation) RemoveRelFromIDs(ids ...int)
- func (m *SenseMutation) RemoveRelToIDs(ids ...int)
- func (m *SenseMutation) RemovedEdges() []string
- func (m *SenseMutation) RemovedIDs(name string) []ent.Value
- func (m *SenseMutation) RemovedRelFromIDs() (ids []int)
- func (m *SenseMutation) RemovedRelToIDs() (ids []int)
- func (m *SenseMutation) ResetEdge(name string) error
- func (m *SenseMutation) ResetField(name string) error
- func (m *SenseMutation) ResetLemma()
- func (m *SenseMutation) ResetRelFrom()
- func (m *SenseMutation) ResetRelTo()
- func (m *SenseMutation) ResetSynset()
- func (m *SenseMutation) SetField(name string, value ent.Value) error
- func (m *SenseMutation) SetID(id string)
- func (m *SenseMutation) SetLemmaID(id string)
- func (m *SenseMutation) SetOp(op Op)
- func (m *SenseMutation) SetSynsetID(id string)
- func (m *SenseMutation) SynsetCleared() bool
- func (m *SenseMutation) SynsetID() (id string, exists bool)
- func (m *SenseMutation) SynsetIDs() (ids []string)
- func (m SenseMutation) Tx() (*Tx, error)
- func (m *SenseMutation) Type() string
- func (m *SenseMutation) Where(ps ...predicate.Sense)
- func (m *SenseMutation) WhereP(ps ...func(*sql.Selector))
- type SenseQuery
- func (sq *SenseQuery) Aggregate(fns ...AggregateFunc) *SenseSelect
- func (sq *SenseQuery) All(ctx context.Context) ([]*Sense, error)
- func (sq *SenseQuery) AllX(ctx context.Context) []*Sense
- func (sq *SenseQuery) Clone() *SenseQuery
- func (sq *SenseQuery) Count(ctx context.Context) (int, error)
- func (sq *SenseQuery) CountX(ctx context.Context) int
- func (sq *SenseQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SenseQuery) ExistX(ctx context.Context) bool
- func (sq *SenseQuery) First(ctx context.Context) (*Sense, error)
- func (sq *SenseQuery) FirstID(ctx context.Context) (id string, err error)
- func (sq *SenseQuery) FirstIDX(ctx context.Context) string
- func (sq *SenseQuery) FirstX(ctx context.Context) *Sense
- func (sq *SenseQuery) GroupBy(field string, fields ...string) *SenseGroupBy
- func (sq *SenseQuery) IDs(ctx context.Context) (ids []string, err error)
- func (sq *SenseQuery) IDsX(ctx context.Context) []string
- func (sq *SenseQuery) Limit(limit int) *SenseQuery
- func (sq *SenseQuery) Offset(offset int) *SenseQuery
- func (sq *SenseQuery) Only(ctx context.Context) (*Sense, error)
- func (sq *SenseQuery) OnlyID(ctx context.Context) (id string, err error)
- func (sq *SenseQuery) OnlyIDX(ctx context.Context) string
- func (sq *SenseQuery) OnlyX(ctx context.Context) *Sense
- func (sq *SenseQuery) Order(o ...sense.OrderOption) *SenseQuery
- func (sq *SenseQuery) QueryLemma() *LemmaQuery
- func (sq *SenseQuery) QueryRelFrom() *SenseRelationQuery
- func (sq *SenseQuery) QueryRelTo() *SenseRelationQuery
- func (sq *SenseQuery) QuerySynset() *SynsetQuery
- func (sq *SenseQuery) Select(fields ...string) *SenseSelect
- func (sq *SenseQuery) Unique(unique bool) *SenseQuery
- func (sq *SenseQuery) Where(ps ...predicate.Sense) *SenseQuery
- func (sq *SenseQuery) WithLemma(opts ...func(*LemmaQuery)) *SenseQuery
- func (sq *SenseQuery) WithRelFrom(opts ...func(*SenseRelationQuery)) *SenseQuery
- func (sq *SenseQuery) WithRelTo(opts ...func(*SenseRelationQuery)) *SenseQuery
- func (sq *SenseQuery) WithSynset(opts ...func(*SynsetQuery)) *SenseQuery
- type SenseRelation
- func (sr *SenseRelation) QueryFrom() *SenseQuery
- func (sr *SenseRelation) QueryTo() *SenseQuery
- func (sr *SenseRelation) String() string
- func (sr *SenseRelation) Unwrap() *SenseRelation
- func (sr *SenseRelation) Update() *SenseRelationUpdateOne
- func (sr *SenseRelation) Value(name string) (ent.Value, error)
- type SenseRelationClient
- func (c *SenseRelationClient) Create() *SenseRelationCreate
- func (c *SenseRelationClient) CreateBulk(builders ...*SenseRelationCreate) *SenseRelationCreateBulk
- func (c *SenseRelationClient) Delete() *SenseRelationDelete
- func (c *SenseRelationClient) DeleteOne(sr *SenseRelation) *SenseRelationDeleteOne
- func (c *SenseRelationClient) DeleteOneID(id int) *SenseRelationDeleteOne
- func (c *SenseRelationClient) Get(ctx context.Context, id int) (*SenseRelation, error)
- func (c *SenseRelationClient) GetX(ctx context.Context, id int) *SenseRelation
- func (c *SenseRelationClient) Hooks() []Hook
- func (c *SenseRelationClient) Intercept(interceptors ...Interceptor)
- func (c *SenseRelationClient) Interceptors() []Interceptor
- func (c *SenseRelationClient) MapCreateBulk(slice any, setFunc func(*SenseRelationCreate, int)) *SenseRelationCreateBulk
- func (c *SenseRelationClient) Query() *SenseRelationQuery
- func (c *SenseRelationClient) QueryFrom(sr *SenseRelation) *SenseQuery
- func (c *SenseRelationClient) QueryTo(sr *SenseRelation) *SenseQuery
- func (c *SenseRelationClient) Update() *SenseRelationUpdate
- func (c *SenseRelationClient) UpdateOne(sr *SenseRelation) *SenseRelationUpdateOne
- func (c *SenseRelationClient) UpdateOneID(id int) *SenseRelationUpdateOne
- func (c *SenseRelationClient) Use(hooks ...Hook)
- type SenseRelationCreate
- func (src *SenseRelationCreate) Exec(ctx context.Context) error
- func (src *SenseRelationCreate) ExecX(ctx context.Context)
- func (src *SenseRelationCreate) Mutation() *SenseRelationMutation
- func (src *SenseRelationCreate) Save(ctx context.Context) (*SenseRelation, error)
- func (src *SenseRelationCreate) SaveX(ctx context.Context) *SenseRelation
- func (src *SenseRelationCreate) SetFrom(s *Sense) *SenseRelationCreate
- func (src *SenseRelationCreate) SetFromID(id string) *SenseRelationCreate
- func (src *SenseRelationCreate) SetRelType(s string) *SenseRelationCreate
- func (src *SenseRelationCreate) SetTo(s *Sense) *SenseRelationCreate
- func (src *SenseRelationCreate) SetToID(id string) *SenseRelationCreate
- type SenseRelationCreateBulk
- func (srcb *SenseRelationCreateBulk) Exec(ctx context.Context) error
- func (srcb *SenseRelationCreateBulk) ExecX(ctx context.Context)
- func (srcb *SenseRelationCreateBulk) Save(ctx context.Context) ([]*SenseRelation, error)
- func (srcb *SenseRelationCreateBulk) SaveX(ctx context.Context) []*SenseRelation
- type SenseRelationDelete
- type SenseRelationDeleteOne
- type SenseRelationEdges
- type SenseRelationGroupBy
- func (srgb *SenseRelationGroupBy) Aggregate(fns ...AggregateFunc) *SenseRelationGroupBy
- func (s *SenseRelationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SenseRelationGroupBy) BoolX(ctx context.Context) bool
- func (s *SenseRelationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SenseRelationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SenseRelationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SenseRelationGroupBy) Float64X(ctx context.Context) float64
- func (s *SenseRelationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SenseRelationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SenseRelationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SenseRelationGroupBy) IntX(ctx context.Context) int
- func (s *SenseRelationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SenseRelationGroupBy) IntsX(ctx context.Context) []int
- func (srgb *SenseRelationGroupBy) Scan(ctx context.Context, v any) error
- func (s *SenseRelationGroupBy) ScanX(ctx context.Context, v any)
- func (s *SenseRelationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SenseRelationGroupBy) StringX(ctx context.Context) string
- func (s *SenseRelationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SenseRelationGroupBy) StringsX(ctx context.Context) []string
- type SenseRelationMutation
- func (m *SenseRelationMutation) AddField(name string, value ent.Value) error
- func (m *SenseRelationMutation) AddedEdges() []string
- func (m *SenseRelationMutation) AddedField(name string) (ent.Value, bool)
- func (m *SenseRelationMutation) AddedFields() []string
- func (m *SenseRelationMutation) AddedIDs(name string) []ent.Value
- func (m *SenseRelationMutation) ClearEdge(name string) error
- func (m *SenseRelationMutation) ClearField(name string) error
- func (m *SenseRelationMutation) ClearFrom()
- func (m *SenseRelationMutation) ClearTo()
- func (m *SenseRelationMutation) ClearedEdges() []string
- func (m *SenseRelationMutation) ClearedFields() []string
- func (m SenseRelationMutation) Client() *Client
- func (m *SenseRelationMutation) EdgeCleared(name string) bool
- func (m *SenseRelationMutation) Field(name string) (ent.Value, bool)
- func (m *SenseRelationMutation) FieldCleared(name string) bool
- func (m *SenseRelationMutation) Fields() []string
- func (m *SenseRelationMutation) FromCleared() bool
- func (m *SenseRelationMutation) FromID() (id string, exists bool)
- func (m *SenseRelationMutation) FromIDs() (ids []string)
- func (m *SenseRelationMutation) ID() (id int, exists bool)
- func (m *SenseRelationMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SenseRelationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SenseRelationMutation) OldRelType(ctx context.Context) (v string, err error)
- func (m *SenseRelationMutation) Op() Op
- func (m *SenseRelationMutation) RelType() (r string, exists bool)
- func (m *SenseRelationMutation) RemovedEdges() []string
- func (m *SenseRelationMutation) RemovedIDs(name string) []ent.Value
- func (m *SenseRelationMutation) ResetEdge(name string) error
- func (m *SenseRelationMutation) ResetField(name string) error
- func (m *SenseRelationMutation) ResetFrom()
- func (m *SenseRelationMutation) ResetRelType()
- func (m *SenseRelationMutation) ResetTo()
- func (m *SenseRelationMutation) SetField(name string, value ent.Value) error
- func (m *SenseRelationMutation) SetFromID(id string)
- func (m *SenseRelationMutation) SetOp(op Op)
- func (m *SenseRelationMutation) SetRelType(s string)
- func (m *SenseRelationMutation) SetToID(id string)
- func (m *SenseRelationMutation) ToCleared() bool
- func (m *SenseRelationMutation) ToID() (id string, exists bool)
- func (m *SenseRelationMutation) ToIDs() (ids []string)
- func (m SenseRelationMutation) Tx() (*Tx, error)
- func (m *SenseRelationMutation) Type() string
- func (m *SenseRelationMutation) Where(ps ...predicate.SenseRelation)
- func (m *SenseRelationMutation) WhereP(ps ...func(*sql.Selector))
- type SenseRelationQuery
- func (srq *SenseRelationQuery) Aggregate(fns ...AggregateFunc) *SenseRelationSelect
- func (srq *SenseRelationQuery) All(ctx context.Context) ([]*SenseRelation, error)
- func (srq *SenseRelationQuery) AllX(ctx context.Context) []*SenseRelation
- func (srq *SenseRelationQuery) Clone() *SenseRelationQuery
- func (srq *SenseRelationQuery) Count(ctx context.Context) (int, error)
- func (srq *SenseRelationQuery) CountX(ctx context.Context) int
- func (srq *SenseRelationQuery) Exist(ctx context.Context) (bool, error)
- func (srq *SenseRelationQuery) ExistX(ctx context.Context) bool
- func (srq *SenseRelationQuery) First(ctx context.Context) (*SenseRelation, error)
- func (srq *SenseRelationQuery) FirstID(ctx context.Context) (id int, err error)
- func (srq *SenseRelationQuery) FirstIDX(ctx context.Context) int
- func (srq *SenseRelationQuery) FirstX(ctx context.Context) *SenseRelation
- func (srq *SenseRelationQuery) GroupBy(field string, fields ...string) *SenseRelationGroupBy
- func (srq *SenseRelationQuery) IDs(ctx context.Context) (ids []int, err error)
- func (srq *SenseRelationQuery) IDsX(ctx context.Context) []int
- func (srq *SenseRelationQuery) Limit(limit int) *SenseRelationQuery
- func (srq *SenseRelationQuery) Offset(offset int) *SenseRelationQuery
- func (srq *SenseRelationQuery) Only(ctx context.Context) (*SenseRelation, error)
- func (srq *SenseRelationQuery) OnlyID(ctx context.Context) (id int, err error)
- func (srq *SenseRelationQuery) OnlyIDX(ctx context.Context) int
- func (srq *SenseRelationQuery) OnlyX(ctx context.Context) *SenseRelation
- func (srq *SenseRelationQuery) Order(o ...senserelation.OrderOption) *SenseRelationQuery
- func (srq *SenseRelationQuery) QueryFrom() *SenseQuery
- func (srq *SenseRelationQuery) QueryTo() *SenseQuery
- func (srq *SenseRelationQuery) Select(fields ...string) *SenseRelationSelect
- func (srq *SenseRelationQuery) Unique(unique bool) *SenseRelationQuery
- func (srq *SenseRelationQuery) Where(ps ...predicate.SenseRelation) *SenseRelationQuery
- func (srq *SenseRelationQuery) WithFrom(opts ...func(*SenseQuery)) *SenseRelationQuery
- func (srq *SenseRelationQuery) WithTo(opts ...func(*SenseQuery)) *SenseRelationQuery
- type SenseRelationSelect
- func (srs *SenseRelationSelect) Aggregate(fns ...AggregateFunc) *SenseRelationSelect
- func (s *SenseRelationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SenseRelationSelect) BoolX(ctx context.Context) bool
- func (s *SenseRelationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SenseRelationSelect) BoolsX(ctx context.Context) []bool
- func (s *SenseRelationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SenseRelationSelect) Float64X(ctx context.Context) float64
- func (s *SenseRelationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SenseRelationSelect) Float64sX(ctx context.Context) []float64
- func (s *SenseRelationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SenseRelationSelect) IntX(ctx context.Context) int
- func (s *SenseRelationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SenseRelationSelect) IntsX(ctx context.Context) []int
- func (srs *SenseRelationSelect) Scan(ctx context.Context, v any) error
- func (s *SenseRelationSelect) ScanX(ctx context.Context, v any)
- func (s *SenseRelationSelect) String(ctx context.Context) (_ string, err error)
- func (s *SenseRelationSelect) StringX(ctx context.Context) string
- func (s *SenseRelationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SenseRelationSelect) StringsX(ctx context.Context) []string
- type SenseRelationUpdate
- func (sru *SenseRelationUpdate) ClearFrom() *SenseRelationUpdate
- func (sru *SenseRelationUpdate) ClearTo() *SenseRelationUpdate
- func (sru *SenseRelationUpdate) Exec(ctx context.Context) error
- func (sru *SenseRelationUpdate) ExecX(ctx context.Context)
- func (sru *SenseRelationUpdate) Mutation() *SenseRelationMutation
- func (sru *SenseRelationUpdate) Save(ctx context.Context) (int, error)
- func (sru *SenseRelationUpdate) SaveX(ctx context.Context) int
- func (sru *SenseRelationUpdate) SetFrom(s *Sense) *SenseRelationUpdate
- func (sru *SenseRelationUpdate) SetFromID(id string) *SenseRelationUpdate
- func (sru *SenseRelationUpdate) SetNillableRelType(s *string) *SenseRelationUpdate
- func (sru *SenseRelationUpdate) SetRelType(s string) *SenseRelationUpdate
- func (sru *SenseRelationUpdate) SetTo(s *Sense) *SenseRelationUpdate
- func (sru *SenseRelationUpdate) SetToID(id string) *SenseRelationUpdate
- func (sru *SenseRelationUpdate) Where(ps ...predicate.SenseRelation) *SenseRelationUpdate
- type SenseRelationUpdateOne
- func (sruo *SenseRelationUpdateOne) ClearFrom() *SenseRelationUpdateOne
- func (sruo *SenseRelationUpdateOne) ClearTo() *SenseRelationUpdateOne
- func (sruo *SenseRelationUpdateOne) Exec(ctx context.Context) error
- func (sruo *SenseRelationUpdateOne) ExecX(ctx context.Context)
- func (sruo *SenseRelationUpdateOne) Mutation() *SenseRelationMutation
- func (sruo *SenseRelationUpdateOne) Save(ctx context.Context) (*SenseRelation, error)
- func (sruo *SenseRelationUpdateOne) SaveX(ctx context.Context) *SenseRelation
- func (sruo *SenseRelationUpdateOne) Select(field string, fields ...string) *SenseRelationUpdateOne
- func (sruo *SenseRelationUpdateOne) SetFrom(s *Sense) *SenseRelationUpdateOne
- func (sruo *SenseRelationUpdateOne) SetFromID(id string) *SenseRelationUpdateOne
- func (sruo *SenseRelationUpdateOne) SetNillableRelType(s *string) *SenseRelationUpdateOne
- func (sruo *SenseRelationUpdateOne) SetRelType(s string) *SenseRelationUpdateOne
- func (sruo *SenseRelationUpdateOne) SetTo(s *Sense) *SenseRelationUpdateOne
- func (sruo *SenseRelationUpdateOne) SetToID(id string) *SenseRelationUpdateOne
- func (sruo *SenseRelationUpdateOne) Where(ps ...predicate.SenseRelation) *SenseRelationUpdateOne
- type SenseRelations
- type SenseSelect
- func (ss *SenseSelect) Aggregate(fns ...AggregateFunc) *SenseSelect
- func (s *SenseSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SenseSelect) BoolX(ctx context.Context) bool
- func (s *SenseSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SenseSelect) BoolsX(ctx context.Context) []bool
- func (s *SenseSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SenseSelect) Float64X(ctx context.Context) float64
- func (s *SenseSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SenseSelect) Float64sX(ctx context.Context) []float64
- func (s *SenseSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SenseSelect) IntX(ctx context.Context) int
- func (s *SenseSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SenseSelect) IntsX(ctx context.Context) []int
- func (ss *SenseSelect) Scan(ctx context.Context, v any) error
- func (s *SenseSelect) ScanX(ctx context.Context, v any)
- func (s *SenseSelect) String(ctx context.Context) (_ string, err error)
- func (s *SenseSelect) StringX(ctx context.Context) string
- func (s *SenseSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SenseSelect) StringsX(ctx context.Context) []string
- type SenseUpdate
- func (su *SenseUpdate) AddRelFrom(s ...*SenseRelation) *SenseUpdate
- func (su *SenseUpdate) AddRelFromIDs(ids ...int) *SenseUpdate
- func (su *SenseUpdate) AddRelTo(s ...*SenseRelation) *SenseUpdate
- func (su *SenseUpdate) AddRelToIDs(ids ...int) *SenseUpdate
- func (su *SenseUpdate) ClearLemma() *SenseUpdate
- func (su *SenseUpdate) ClearRelFrom() *SenseUpdate
- func (su *SenseUpdate) ClearRelTo() *SenseUpdate
- func (su *SenseUpdate) ClearSynset() *SenseUpdate
- func (su *SenseUpdate) Exec(ctx context.Context) error
- func (su *SenseUpdate) ExecX(ctx context.Context)
- func (su *SenseUpdate) Mutation() *SenseMutation
- func (su *SenseUpdate) RemoveRelFrom(s ...*SenseRelation) *SenseUpdate
- func (su *SenseUpdate) RemoveRelFromIDs(ids ...int) *SenseUpdate
- func (su *SenseUpdate) RemoveRelTo(s ...*SenseRelation) *SenseUpdate
- func (su *SenseUpdate) RemoveRelToIDs(ids ...int) *SenseUpdate
- func (su *SenseUpdate) Save(ctx context.Context) (int, error)
- func (su *SenseUpdate) SaveX(ctx context.Context) int
- func (su *SenseUpdate) SetLemma(l *Lemma) *SenseUpdate
- func (su *SenseUpdate) SetLemmaID(id string) *SenseUpdate
- func (su *SenseUpdate) SetNillableLemmaID(id *string) *SenseUpdate
- func (su *SenseUpdate) SetNillableSynsetID(id *string) *SenseUpdate
- func (su *SenseUpdate) SetSynset(s *Synset) *SenseUpdate
- func (su *SenseUpdate) SetSynsetID(id string) *SenseUpdate
- func (su *SenseUpdate) Where(ps ...predicate.Sense) *SenseUpdate
- type SenseUpdateOne
- func (suo *SenseUpdateOne) AddRelFrom(s ...*SenseRelation) *SenseUpdateOne
- func (suo *SenseUpdateOne) AddRelFromIDs(ids ...int) *SenseUpdateOne
- func (suo *SenseUpdateOne) AddRelTo(s ...*SenseRelation) *SenseUpdateOne
- func (suo *SenseUpdateOne) AddRelToIDs(ids ...int) *SenseUpdateOne
- func (suo *SenseUpdateOne) ClearLemma() *SenseUpdateOne
- func (suo *SenseUpdateOne) ClearRelFrom() *SenseUpdateOne
- func (suo *SenseUpdateOne) ClearRelTo() *SenseUpdateOne
- func (suo *SenseUpdateOne) ClearSynset() *SenseUpdateOne
- func (suo *SenseUpdateOne) Exec(ctx context.Context) error
- func (suo *SenseUpdateOne) ExecX(ctx context.Context)
- func (suo *SenseUpdateOne) Mutation() *SenseMutation
- func (suo *SenseUpdateOne) RemoveRelFrom(s ...*SenseRelation) *SenseUpdateOne
- func (suo *SenseUpdateOne) RemoveRelFromIDs(ids ...int) *SenseUpdateOne
- func (suo *SenseUpdateOne) RemoveRelTo(s ...*SenseRelation) *SenseUpdateOne
- func (suo *SenseUpdateOne) RemoveRelToIDs(ids ...int) *SenseUpdateOne
- func (suo *SenseUpdateOne) Save(ctx context.Context) (*Sense, error)
- func (suo *SenseUpdateOne) SaveX(ctx context.Context) *Sense
- func (suo *SenseUpdateOne) Select(field string, fields ...string) *SenseUpdateOne
- func (suo *SenseUpdateOne) SetLemma(l *Lemma) *SenseUpdateOne
- func (suo *SenseUpdateOne) SetLemmaID(id string) *SenseUpdateOne
- func (suo *SenseUpdateOne) SetNillableLemmaID(id *string) *SenseUpdateOne
- func (suo *SenseUpdateOne) SetNillableSynsetID(id *string) *SenseUpdateOne
- func (suo *SenseUpdateOne) SetSynset(s *Synset) *SenseUpdateOne
- func (suo *SenseUpdateOne) SetSynsetID(id string) *SenseUpdateOne
- func (suo *SenseUpdateOne) Where(ps ...predicate.Sense) *SenseUpdateOne
- type Senses
- type Synset
- func (s *Synset) QueryDefinitions() *DefinitionQuery
- func (s *Synset) QueryRelFrom() *SynsetRelationQuery
- func (s *Synset) QueryRelTo() *SynsetRelationQuery
- func (s *Synset) QuerySense() *SenseQuery
- func (s *Synset) String() string
- func (s *Synset) Unwrap() *Synset
- func (s *Synset) Update() *SynsetUpdateOne
- func (s *Synset) Value(name string) (ent.Value, error)
- type SynsetClient
- func (c *SynsetClient) Create() *SynsetCreate
- func (c *SynsetClient) CreateBulk(builders ...*SynsetCreate) *SynsetCreateBulk
- func (c *SynsetClient) Delete() *SynsetDelete
- func (c *SynsetClient) DeleteOne(s *Synset) *SynsetDeleteOne
- func (c *SynsetClient) DeleteOneID(id string) *SynsetDeleteOne
- func (c *SynsetClient) Get(ctx context.Context, id string) (*Synset, error)
- func (c *SynsetClient) GetX(ctx context.Context, id string) *Synset
- func (c *SynsetClient) Hooks() []Hook
- func (c *SynsetClient) Intercept(interceptors ...Interceptor)
- func (c *SynsetClient) Interceptors() []Interceptor
- func (c *SynsetClient) MapCreateBulk(slice any, setFunc func(*SynsetCreate, int)) *SynsetCreateBulk
- func (c *SynsetClient) Query() *SynsetQuery
- func (c *SynsetClient) QueryDefinitions(s *Synset) *DefinitionQuery
- func (c *SynsetClient) QueryRelFrom(s *Synset) *SynsetRelationQuery
- func (c *SynsetClient) QueryRelTo(s *Synset) *SynsetRelationQuery
- func (c *SynsetClient) QuerySense(s *Synset) *SenseQuery
- func (c *SynsetClient) Update() *SynsetUpdate
- func (c *SynsetClient) UpdateOne(s *Synset) *SynsetUpdateOne
- func (c *SynsetClient) UpdateOneID(id string) *SynsetUpdateOne
- func (c *SynsetClient) Use(hooks ...Hook)
- type SynsetCreate
- func (sc *SynsetCreate) AddDefinitionIDs(ids ...int) *SynsetCreate
- func (sc *SynsetCreate) AddDefinitions(d ...*Definition) *SynsetCreate
- func (sc *SynsetCreate) AddRelFrom(s ...*SynsetRelation) *SynsetCreate
- func (sc *SynsetCreate) AddRelFromIDs(ids ...int) *SynsetCreate
- func (sc *SynsetCreate) AddRelTo(s ...*SynsetRelation) *SynsetCreate
- func (sc *SynsetCreate) AddRelToIDs(ids ...int) *SynsetCreate
- func (sc *SynsetCreate) AddSense(s ...*Sense) *SynsetCreate
- func (sc *SynsetCreate) AddSenseIDs(ids ...string) *SynsetCreate
- func (sc *SynsetCreate) Exec(ctx context.Context) error
- func (sc *SynsetCreate) ExecX(ctx context.Context)
- func (sc *SynsetCreate) Mutation() *SynsetMutation
- func (sc *SynsetCreate) Save(ctx context.Context) (*Synset, error)
- func (sc *SynsetCreate) SaveX(ctx context.Context) *Synset
- func (sc *SynsetCreate) SetID(s string) *SynsetCreate
- func (sc *SynsetCreate) SetPartOfSpeech(s string) *SynsetCreate
- type SynsetCreateBulk
- type SynsetDelete
- type SynsetDeleteOne
- type SynsetEdges
- type SynsetGroupBy
- func (sgb *SynsetGroupBy) Aggregate(fns ...AggregateFunc) *SynsetGroupBy
- func (s *SynsetGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SynsetGroupBy) BoolX(ctx context.Context) bool
- func (s *SynsetGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SynsetGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SynsetGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SynsetGroupBy) Float64X(ctx context.Context) float64
- func (s *SynsetGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SynsetGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SynsetGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SynsetGroupBy) IntX(ctx context.Context) int
- func (s *SynsetGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SynsetGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SynsetGroupBy) Scan(ctx context.Context, v any) error
- func (s *SynsetGroupBy) ScanX(ctx context.Context, v any)
- func (s *SynsetGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SynsetGroupBy) StringX(ctx context.Context) string
- func (s *SynsetGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SynsetGroupBy) StringsX(ctx context.Context) []string
- type SynsetMutation
- func (m *SynsetMutation) AddDefinitionIDs(ids ...int)
- func (m *SynsetMutation) AddField(name string, value ent.Value) error
- func (m *SynsetMutation) AddRelFromIDs(ids ...int)
- func (m *SynsetMutation) AddRelToIDs(ids ...int)
- func (m *SynsetMutation) AddSenseIDs(ids ...string)
- func (m *SynsetMutation) AddedEdges() []string
- func (m *SynsetMutation) AddedField(name string) (ent.Value, bool)
- func (m *SynsetMutation) AddedFields() []string
- func (m *SynsetMutation) AddedIDs(name string) []ent.Value
- func (m *SynsetMutation) ClearDefinitions()
- func (m *SynsetMutation) ClearEdge(name string) error
- func (m *SynsetMutation) ClearField(name string) error
- func (m *SynsetMutation) ClearRelFrom()
- func (m *SynsetMutation) ClearRelTo()
- func (m *SynsetMutation) ClearSense()
- func (m *SynsetMutation) ClearedEdges() []string
- func (m *SynsetMutation) ClearedFields() []string
- func (m SynsetMutation) Client() *Client
- func (m *SynsetMutation) DefinitionsCleared() bool
- func (m *SynsetMutation) DefinitionsIDs() (ids []int)
- func (m *SynsetMutation) EdgeCleared(name string) bool
- func (m *SynsetMutation) Field(name string) (ent.Value, bool)
- func (m *SynsetMutation) FieldCleared(name string) bool
- func (m *SynsetMutation) Fields() []string
- func (m *SynsetMutation) ID() (id string, exists bool)
- func (m *SynsetMutation) IDs(ctx context.Context) ([]string, error)
- func (m *SynsetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SynsetMutation) OldPartOfSpeech(ctx context.Context) (v string, err error)
- func (m *SynsetMutation) Op() Op
- func (m *SynsetMutation) PartOfSpeech() (r string, exists bool)
- func (m *SynsetMutation) RelFromCleared() bool
- func (m *SynsetMutation) RelFromIDs() (ids []int)
- func (m *SynsetMutation) RelToCleared() bool
- func (m *SynsetMutation) RelToIDs() (ids []int)
- func (m *SynsetMutation) RemoveDefinitionIDs(ids ...int)
- func (m *SynsetMutation) RemoveRelFromIDs(ids ...int)
- func (m *SynsetMutation) RemoveRelToIDs(ids ...int)
- func (m *SynsetMutation) RemoveSenseIDs(ids ...string)
- func (m *SynsetMutation) RemovedDefinitionsIDs() (ids []int)
- func (m *SynsetMutation) RemovedEdges() []string
- func (m *SynsetMutation) RemovedIDs(name string) []ent.Value
- func (m *SynsetMutation) RemovedRelFromIDs() (ids []int)
- func (m *SynsetMutation) RemovedRelToIDs() (ids []int)
- func (m *SynsetMutation) RemovedSenseIDs() (ids []string)
- func (m *SynsetMutation) ResetDefinitions()
- func (m *SynsetMutation) ResetEdge(name string) error
- func (m *SynsetMutation) ResetField(name string) error
- func (m *SynsetMutation) ResetPartOfSpeech()
- func (m *SynsetMutation) ResetRelFrom()
- func (m *SynsetMutation) ResetRelTo()
- func (m *SynsetMutation) ResetSense()
- func (m *SynsetMutation) SenseCleared() bool
- func (m *SynsetMutation) SenseIDs() (ids []string)
- func (m *SynsetMutation) SetField(name string, value ent.Value) error
- func (m *SynsetMutation) SetID(id string)
- func (m *SynsetMutation) SetOp(op Op)
- func (m *SynsetMutation) SetPartOfSpeech(s string)
- func (m SynsetMutation) Tx() (*Tx, error)
- func (m *SynsetMutation) Type() string
- func (m *SynsetMutation) Where(ps ...predicate.Synset)
- func (m *SynsetMutation) WhereP(ps ...func(*sql.Selector))
- type SynsetQuery
- func (sq *SynsetQuery) Aggregate(fns ...AggregateFunc) *SynsetSelect
- func (sq *SynsetQuery) All(ctx context.Context) ([]*Synset, error)
- func (sq *SynsetQuery) AllX(ctx context.Context) []*Synset
- func (sq *SynsetQuery) Clone() *SynsetQuery
- func (sq *SynsetQuery) Count(ctx context.Context) (int, error)
- func (sq *SynsetQuery) CountX(ctx context.Context) int
- func (sq *SynsetQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SynsetQuery) ExistX(ctx context.Context) bool
- func (sq *SynsetQuery) First(ctx context.Context) (*Synset, error)
- func (sq *SynsetQuery) FirstID(ctx context.Context) (id string, err error)
- func (sq *SynsetQuery) FirstIDX(ctx context.Context) string
- func (sq *SynsetQuery) FirstX(ctx context.Context) *Synset
- func (sq *SynsetQuery) GroupBy(field string, fields ...string) *SynsetGroupBy
- func (sq *SynsetQuery) IDs(ctx context.Context) (ids []string, err error)
- func (sq *SynsetQuery) IDsX(ctx context.Context) []string
- func (sq *SynsetQuery) Limit(limit int) *SynsetQuery
- func (sq *SynsetQuery) Offset(offset int) *SynsetQuery
- func (sq *SynsetQuery) Only(ctx context.Context) (*Synset, error)
- func (sq *SynsetQuery) OnlyID(ctx context.Context) (id string, err error)
- func (sq *SynsetQuery) OnlyIDX(ctx context.Context) string
- func (sq *SynsetQuery) OnlyX(ctx context.Context) *Synset
- func (sq *SynsetQuery) Order(o ...synset.OrderOption) *SynsetQuery
- func (sq *SynsetQuery) QueryDefinitions() *DefinitionQuery
- func (sq *SynsetQuery) QueryRelFrom() *SynsetRelationQuery
- func (sq *SynsetQuery) QueryRelTo() *SynsetRelationQuery
- func (sq *SynsetQuery) QuerySense() *SenseQuery
- func (sq *SynsetQuery) Select(fields ...string) *SynsetSelect
- func (sq *SynsetQuery) Unique(unique bool) *SynsetQuery
- func (sq *SynsetQuery) Where(ps ...predicate.Synset) *SynsetQuery
- func (sq *SynsetQuery) WithDefinitions(opts ...func(*DefinitionQuery)) *SynsetQuery
- func (sq *SynsetQuery) WithRelFrom(opts ...func(*SynsetRelationQuery)) *SynsetQuery
- func (sq *SynsetQuery) WithRelTo(opts ...func(*SynsetRelationQuery)) *SynsetQuery
- func (sq *SynsetQuery) WithSense(opts ...func(*SenseQuery)) *SynsetQuery
- type SynsetRelation
- func (sr *SynsetRelation) QueryFrom() *SynsetQuery
- func (sr *SynsetRelation) QueryTo() *SynsetQuery
- func (sr *SynsetRelation) String() string
- func (sr *SynsetRelation) Unwrap() *SynsetRelation
- func (sr *SynsetRelation) Update() *SynsetRelationUpdateOne
- func (sr *SynsetRelation) Value(name string) (ent.Value, error)
- type SynsetRelationClient
- func (c *SynsetRelationClient) Create() *SynsetRelationCreate
- func (c *SynsetRelationClient) CreateBulk(builders ...*SynsetRelationCreate) *SynsetRelationCreateBulk
- func (c *SynsetRelationClient) Delete() *SynsetRelationDelete
- func (c *SynsetRelationClient) DeleteOne(sr *SynsetRelation) *SynsetRelationDeleteOne
- func (c *SynsetRelationClient) DeleteOneID(id int) *SynsetRelationDeleteOne
- func (c *SynsetRelationClient) Get(ctx context.Context, id int) (*SynsetRelation, error)
- func (c *SynsetRelationClient) GetX(ctx context.Context, id int) *SynsetRelation
- func (c *SynsetRelationClient) Hooks() []Hook
- func (c *SynsetRelationClient) Intercept(interceptors ...Interceptor)
- func (c *SynsetRelationClient) Interceptors() []Interceptor
- func (c *SynsetRelationClient) MapCreateBulk(slice any, setFunc func(*SynsetRelationCreate, int)) *SynsetRelationCreateBulk
- func (c *SynsetRelationClient) Query() *SynsetRelationQuery
- func (c *SynsetRelationClient) QueryFrom(sr *SynsetRelation) *SynsetQuery
- func (c *SynsetRelationClient) QueryTo(sr *SynsetRelation) *SynsetQuery
- func (c *SynsetRelationClient) Update() *SynsetRelationUpdate
- func (c *SynsetRelationClient) UpdateOne(sr *SynsetRelation) *SynsetRelationUpdateOne
- func (c *SynsetRelationClient) UpdateOneID(id int) *SynsetRelationUpdateOne
- func (c *SynsetRelationClient) Use(hooks ...Hook)
- type SynsetRelationCreate
- func (src *SynsetRelationCreate) Exec(ctx context.Context) error
- func (src *SynsetRelationCreate) ExecX(ctx context.Context)
- func (src *SynsetRelationCreate) Mutation() *SynsetRelationMutation
- func (src *SynsetRelationCreate) Save(ctx context.Context) (*SynsetRelation, error)
- func (src *SynsetRelationCreate) SaveX(ctx context.Context) *SynsetRelation
- func (src *SynsetRelationCreate) SetFrom(s *Synset) *SynsetRelationCreate
- func (src *SynsetRelationCreate) SetFromID(id string) *SynsetRelationCreate
- func (src *SynsetRelationCreate) SetRelType(s string) *SynsetRelationCreate
- func (src *SynsetRelationCreate) SetTo(s *Synset) *SynsetRelationCreate
- func (src *SynsetRelationCreate) SetToID(id string) *SynsetRelationCreate
- type SynsetRelationCreateBulk
- func (srcb *SynsetRelationCreateBulk) Exec(ctx context.Context) error
- func (srcb *SynsetRelationCreateBulk) ExecX(ctx context.Context)
- func (srcb *SynsetRelationCreateBulk) Save(ctx context.Context) ([]*SynsetRelation, error)
- func (srcb *SynsetRelationCreateBulk) SaveX(ctx context.Context) []*SynsetRelation
- type SynsetRelationDelete
- type SynsetRelationDeleteOne
- type SynsetRelationEdges
- type SynsetRelationGroupBy
- func (srgb *SynsetRelationGroupBy) Aggregate(fns ...AggregateFunc) *SynsetRelationGroupBy
- func (s *SynsetRelationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SynsetRelationGroupBy) BoolX(ctx context.Context) bool
- func (s *SynsetRelationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SynsetRelationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SynsetRelationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SynsetRelationGroupBy) Float64X(ctx context.Context) float64
- func (s *SynsetRelationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SynsetRelationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SynsetRelationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SynsetRelationGroupBy) IntX(ctx context.Context) int
- func (s *SynsetRelationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SynsetRelationGroupBy) IntsX(ctx context.Context) []int
- func (srgb *SynsetRelationGroupBy) Scan(ctx context.Context, v any) error
- func (s *SynsetRelationGroupBy) ScanX(ctx context.Context, v any)
- func (s *SynsetRelationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SynsetRelationGroupBy) StringX(ctx context.Context) string
- func (s *SynsetRelationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SynsetRelationGroupBy) StringsX(ctx context.Context) []string
- type SynsetRelationMutation
- func (m *SynsetRelationMutation) AddField(name string, value ent.Value) error
- func (m *SynsetRelationMutation) AddedEdges() []string
- func (m *SynsetRelationMutation) AddedField(name string) (ent.Value, bool)
- func (m *SynsetRelationMutation) AddedFields() []string
- func (m *SynsetRelationMutation) AddedIDs(name string) []ent.Value
- func (m *SynsetRelationMutation) ClearEdge(name string) error
- func (m *SynsetRelationMutation) ClearField(name string) error
- func (m *SynsetRelationMutation) ClearFrom()
- func (m *SynsetRelationMutation) ClearTo()
- func (m *SynsetRelationMutation) ClearedEdges() []string
- func (m *SynsetRelationMutation) ClearedFields() []string
- func (m SynsetRelationMutation) Client() *Client
- func (m *SynsetRelationMutation) EdgeCleared(name string) bool
- func (m *SynsetRelationMutation) Field(name string) (ent.Value, bool)
- func (m *SynsetRelationMutation) FieldCleared(name string) bool
- func (m *SynsetRelationMutation) Fields() []string
- func (m *SynsetRelationMutation) FromCleared() bool
- func (m *SynsetRelationMutation) FromID() (id string, exists bool)
- func (m *SynsetRelationMutation) FromIDs() (ids []string)
- func (m *SynsetRelationMutation) ID() (id int, exists bool)
- func (m *SynsetRelationMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SynsetRelationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SynsetRelationMutation) OldRelType(ctx context.Context) (v string, err error)
- func (m *SynsetRelationMutation) Op() Op
- func (m *SynsetRelationMutation) RelType() (r string, exists bool)
- func (m *SynsetRelationMutation) RemovedEdges() []string
- func (m *SynsetRelationMutation) RemovedIDs(name string) []ent.Value
- func (m *SynsetRelationMutation) ResetEdge(name string) error
- func (m *SynsetRelationMutation) ResetField(name string) error
- func (m *SynsetRelationMutation) ResetFrom()
- func (m *SynsetRelationMutation) ResetRelType()
- func (m *SynsetRelationMutation) ResetTo()
- func (m *SynsetRelationMutation) SetField(name string, value ent.Value) error
- func (m *SynsetRelationMutation) SetFromID(id string)
- func (m *SynsetRelationMutation) SetOp(op Op)
- func (m *SynsetRelationMutation) SetRelType(s string)
- func (m *SynsetRelationMutation) SetToID(id string)
- func (m *SynsetRelationMutation) ToCleared() bool
- func (m *SynsetRelationMutation) ToID() (id string, exists bool)
- func (m *SynsetRelationMutation) ToIDs() (ids []string)
- func (m SynsetRelationMutation) Tx() (*Tx, error)
- func (m *SynsetRelationMutation) Type() string
- func (m *SynsetRelationMutation) Where(ps ...predicate.SynsetRelation)
- func (m *SynsetRelationMutation) WhereP(ps ...func(*sql.Selector))
- type SynsetRelationQuery
- func (srq *SynsetRelationQuery) Aggregate(fns ...AggregateFunc) *SynsetRelationSelect
- func (srq *SynsetRelationQuery) All(ctx context.Context) ([]*SynsetRelation, error)
- func (srq *SynsetRelationQuery) AllX(ctx context.Context) []*SynsetRelation
- func (srq *SynsetRelationQuery) Clone() *SynsetRelationQuery
- func (srq *SynsetRelationQuery) Count(ctx context.Context) (int, error)
- func (srq *SynsetRelationQuery) CountX(ctx context.Context) int
- func (srq *SynsetRelationQuery) Exist(ctx context.Context) (bool, error)
- func (srq *SynsetRelationQuery) ExistX(ctx context.Context) bool
- func (srq *SynsetRelationQuery) First(ctx context.Context) (*SynsetRelation, error)
- func (srq *SynsetRelationQuery) FirstID(ctx context.Context) (id int, err error)
- func (srq *SynsetRelationQuery) FirstIDX(ctx context.Context) int
- func (srq *SynsetRelationQuery) FirstX(ctx context.Context) *SynsetRelation
- func (srq *SynsetRelationQuery) GroupBy(field string, fields ...string) *SynsetRelationGroupBy
- func (srq *SynsetRelationQuery) IDs(ctx context.Context) (ids []int, err error)
- func (srq *SynsetRelationQuery) IDsX(ctx context.Context) []int
- func (srq *SynsetRelationQuery) Limit(limit int) *SynsetRelationQuery
- func (srq *SynsetRelationQuery) Offset(offset int) *SynsetRelationQuery
- func (srq *SynsetRelationQuery) Only(ctx context.Context) (*SynsetRelation, error)
- func (srq *SynsetRelationQuery) OnlyID(ctx context.Context) (id int, err error)
- func (srq *SynsetRelationQuery) OnlyIDX(ctx context.Context) int
- func (srq *SynsetRelationQuery) OnlyX(ctx context.Context) *SynsetRelation
- func (srq *SynsetRelationQuery) Order(o ...synsetrelation.OrderOption) *SynsetRelationQuery
- func (srq *SynsetRelationQuery) QueryFrom() *SynsetQuery
- func (srq *SynsetRelationQuery) QueryTo() *SynsetQuery
- func (srq *SynsetRelationQuery) Select(fields ...string) *SynsetRelationSelect
- func (srq *SynsetRelationQuery) Unique(unique bool) *SynsetRelationQuery
- func (srq *SynsetRelationQuery) Where(ps ...predicate.SynsetRelation) *SynsetRelationQuery
- func (srq *SynsetRelationQuery) WithFrom(opts ...func(*SynsetQuery)) *SynsetRelationQuery
- func (srq *SynsetRelationQuery) WithTo(opts ...func(*SynsetQuery)) *SynsetRelationQuery
- type SynsetRelationSelect
- func (srs *SynsetRelationSelect) Aggregate(fns ...AggregateFunc) *SynsetRelationSelect
- func (s *SynsetRelationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SynsetRelationSelect) BoolX(ctx context.Context) bool
- func (s *SynsetRelationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SynsetRelationSelect) BoolsX(ctx context.Context) []bool
- func (s *SynsetRelationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SynsetRelationSelect) Float64X(ctx context.Context) float64
- func (s *SynsetRelationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SynsetRelationSelect) Float64sX(ctx context.Context) []float64
- func (s *SynsetRelationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SynsetRelationSelect) IntX(ctx context.Context) int
- func (s *SynsetRelationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SynsetRelationSelect) IntsX(ctx context.Context) []int
- func (srs *SynsetRelationSelect) Scan(ctx context.Context, v any) error
- func (s *SynsetRelationSelect) ScanX(ctx context.Context, v any)
- func (s *SynsetRelationSelect) String(ctx context.Context) (_ string, err error)
- func (s *SynsetRelationSelect) StringX(ctx context.Context) string
- func (s *SynsetRelationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SynsetRelationSelect) StringsX(ctx context.Context) []string
- type SynsetRelationUpdate
- func (sru *SynsetRelationUpdate) ClearFrom() *SynsetRelationUpdate
- func (sru *SynsetRelationUpdate) ClearTo() *SynsetRelationUpdate
- func (sru *SynsetRelationUpdate) Exec(ctx context.Context) error
- func (sru *SynsetRelationUpdate) ExecX(ctx context.Context)
- func (sru *SynsetRelationUpdate) Mutation() *SynsetRelationMutation
- func (sru *SynsetRelationUpdate) Save(ctx context.Context) (int, error)
- func (sru *SynsetRelationUpdate) SaveX(ctx context.Context) int
- func (sru *SynsetRelationUpdate) SetFrom(s *Synset) *SynsetRelationUpdate
- func (sru *SynsetRelationUpdate) SetFromID(id string) *SynsetRelationUpdate
- func (sru *SynsetRelationUpdate) SetNillableRelType(s *string) *SynsetRelationUpdate
- func (sru *SynsetRelationUpdate) SetRelType(s string) *SynsetRelationUpdate
- func (sru *SynsetRelationUpdate) SetTo(s *Synset) *SynsetRelationUpdate
- func (sru *SynsetRelationUpdate) SetToID(id string) *SynsetRelationUpdate
- func (sru *SynsetRelationUpdate) Where(ps ...predicate.SynsetRelation) *SynsetRelationUpdate
- type SynsetRelationUpdateOne
- func (sruo *SynsetRelationUpdateOne) ClearFrom() *SynsetRelationUpdateOne
- func (sruo *SynsetRelationUpdateOne) ClearTo() *SynsetRelationUpdateOne
- func (sruo *SynsetRelationUpdateOne) Exec(ctx context.Context) error
- func (sruo *SynsetRelationUpdateOne) ExecX(ctx context.Context)
- func (sruo *SynsetRelationUpdateOne) Mutation() *SynsetRelationMutation
- func (sruo *SynsetRelationUpdateOne) Save(ctx context.Context) (*SynsetRelation, error)
- func (sruo *SynsetRelationUpdateOne) SaveX(ctx context.Context) *SynsetRelation
- func (sruo *SynsetRelationUpdateOne) Select(field string, fields ...string) *SynsetRelationUpdateOne
- func (sruo *SynsetRelationUpdateOne) SetFrom(s *Synset) *SynsetRelationUpdateOne
- func (sruo *SynsetRelationUpdateOne) SetFromID(id string) *SynsetRelationUpdateOne
- func (sruo *SynsetRelationUpdateOne) SetNillableRelType(s *string) *SynsetRelationUpdateOne
- func (sruo *SynsetRelationUpdateOne) SetRelType(s string) *SynsetRelationUpdateOne
- func (sruo *SynsetRelationUpdateOne) SetTo(s *Synset) *SynsetRelationUpdateOne
- func (sruo *SynsetRelationUpdateOne) SetToID(id string) *SynsetRelationUpdateOne
- func (sruo *SynsetRelationUpdateOne) Where(ps ...predicate.SynsetRelation) *SynsetRelationUpdateOne
- type SynsetRelations
- type SynsetSelect
- func (ss *SynsetSelect) Aggregate(fns ...AggregateFunc) *SynsetSelect
- func (s *SynsetSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SynsetSelect) BoolX(ctx context.Context) bool
- func (s *SynsetSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SynsetSelect) BoolsX(ctx context.Context) []bool
- func (s *SynsetSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SynsetSelect) Float64X(ctx context.Context) float64
- func (s *SynsetSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SynsetSelect) Float64sX(ctx context.Context) []float64
- func (s *SynsetSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SynsetSelect) IntX(ctx context.Context) int
- func (s *SynsetSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SynsetSelect) IntsX(ctx context.Context) []int
- func (ss *SynsetSelect) Scan(ctx context.Context, v any) error
- func (s *SynsetSelect) ScanX(ctx context.Context, v any)
- func (s *SynsetSelect) String(ctx context.Context) (_ string, err error)
- func (s *SynsetSelect) StringX(ctx context.Context) string
- func (s *SynsetSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SynsetSelect) StringsX(ctx context.Context) []string
- type SynsetUpdate
- func (su *SynsetUpdate) AddDefinitionIDs(ids ...int) *SynsetUpdate
- func (su *SynsetUpdate) AddDefinitions(d ...*Definition) *SynsetUpdate
- func (su *SynsetUpdate) AddRelFrom(s ...*SynsetRelation) *SynsetUpdate
- func (su *SynsetUpdate) AddRelFromIDs(ids ...int) *SynsetUpdate
- func (su *SynsetUpdate) AddRelTo(s ...*SynsetRelation) *SynsetUpdate
- func (su *SynsetUpdate) AddRelToIDs(ids ...int) *SynsetUpdate
- func (su *SynsetUpdate) AddSense(s ...*Sense) *SynsetUpdate
- func (su *SynsetUpdate) AddSenseIDs(ids ...string) *SynsetUpdate
- func (su *SynsetUpdate) ClearDefinitions() *SynsetUpdate
- func (su *SynsetUpdate) ClearRelFrom() *SynsetUpdate
- func (su *SynsetUpdate) ClearRelTo() *SynsetUpdate
- func (su *SynsetUpdate) ClearSense() *SynsetUpdate
- func (su *SynsetUpdate) Exec(ctx context.Context) error
- func (su *SynsetUpdate) ExecX(ctx context.Context)
- func (su *SynsetUpdate) Mutation() *SynsetMutation
- func (su *SynsetUpdate) RemoveDefinitionIDs(ids ...int) *SynsetUpdate
- func (su *SynsetUpdate) RemoveDefinitions(d ...*Definition) *SynsetUpdate
- func (su *SynsetUpdate) RemoveRelFrom(s ...*SynsetRelation) *SynsetUpdate
- func (su *SynsetUpdate) RemoveRelFromIDs(ids ...int) *SynsetUpdate
- func (su *SynsetUpdate) RemoveRelTo(s ...*SynsetRelation) *SynsetUpdate
- func (su *SynsetUpdate) RemoveRelToIDs(ids ...int) *SynsetUpdate
- func (su *SynsetUpdate) RemoveSense(s ...*Sense) *SynsetUpdate
- func (su *SynsetUpdate) RemoveSenseIDs(ids ...string) *SynsetUpdate
- func (su *SynsetUpdate) Save(ctx context.Context) (int, error)
- func (su *SynsetUpdate) SaveX(ctx context.Context) int
- func (su *SynsetUpdate) SetNillablePartOfSpeech(s *string) *SynsetUpdate
- func (su *SynsetUpdate) SetPartOfSpeech(s string) *SynsetUpdate
- func (su *SynsetUpdate) Where(ps ...predicate.Synset) *SynsetUpdate
- type SynsetUpdateOne
- func (suo *SynsetUpdateOne) AddDefinitionIDs(ids ...int) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) AddDefinitions(d ...*Definition) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) AddRelFrom(s ...*SynsetRelation) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) AddRelFromIDs(ids ...int) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) AddRelTo(s ...*SynsetRelation) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) AddRelToIDs(ids ...int) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) AddSense(s ...*Sense) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) AddSenseIDs(ids ...string) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) ClearDefinitions() *SynsetUpdateOne
- func (suo *SynsetUpdateOne) ClearRelFrom() *SynsetUpdateOne
- func (suo *SynsetUpdateOne) ClearRelTo() *SynsetUpdateOne
- func (suo *SynsetUpdateOne) ClearSense() *SynsetUpdateOne
- func (suo *SynsetUpdateOne) Exec(ctx context.Context) error
- func (suo *SynsetUpdateOne) ExecX(ctx context.Context)
- func (suo *SynsetUpdateOne) Mutation() *SynsetMutation
- func (suo *SynsetUpdateOne) RemoveDefinitionIDs(ids ...int) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) RemoveDefinitions(d ...*Definition) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) RemoveRelFrom(s ...*SynsetRelation) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) RemoveRelFromIDs(ids ...int) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) RemoveRelTo(s ...*SynsetRelation) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) RemoveRelToIDs(ids ...int) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) RemoveSense(s ...*Sense) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) RemoveSenseIDs(ids ...string) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) Save(ctx context.Context) (*Synset, error)
- func (suo *SynsetUpdateOne) SaveX(ctx context.Context) *Synset
- func (suo *SynsetUpdateOne) Select(field string, fields ...string) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) SetNillablePartOfSpeech(s *string) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) SetPartOfSpeech(s string) *SynsetUpdateOne
- func (suo *SynsetUpdateOne) Where(ps ...predicate.Synset) *SynsetUpdateOne
- type Synsets
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeDefinition = "Definition" TypeLemma = "Lemma" TypeSense = "Sense" TypeSenseRelation = "SenseRelation" TypeSynset = "Synset" TypeSynsetRelation = "SynsetRelation" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Definition is the client for interacting with the Definition builders. Definition *DefinitionClient // Lemma is the client for interacting with the Lemma builders. Lemma *LemmaClient // Sense is the client for interacting with the Sense builders. Sense *SenseClient // SenseRelation is the client for interacting with the SenseRelation builders. SenseRelation *SenseRelationClient // Synset is the client for interacting with the Synset builders. Synset *SynsetClient // SynsetRelation is the client for interacting with the SynsetRelation builders. SynsetRelation *SynsetRelationClient // 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(). Definition. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Definition ¶
type Definition struct { // ID of the ent. ID int `json:"id,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DefinitionQuery when eager-loading is set. Edges DefinitionEdges `json:"edges"` // contains filtered or unexported fields }
Definition is the model entity for the Definition schema.
func (*Definition) QuerySynset ¶
func (d *Definition) QuerySynset() *SynsetQuery
QuerySynset queries the "synset" edge of the Definition entity.
func (*Definition) String ¶
func (d *Definition) String() string
String implements the fmt.Stringer.
func (*Definition) Unwrap ¶
func (d *Definition) Unwrap() *Definition
Unwrap unwraps the Definition 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 (*Definition) Update ¶
func (d *Definition) Update() *DefinitionUpdateOne
Update returns a builder for updating this Definition. Note that you need to call Definition.Unwrap() before calling this method if this Definition was returned from a transaction, and the transaction was committed or rolled back.
type DefinitionClient ¶
type DefinitionClient struct {
// contains filtered or unexported fields
}
DefinitionClient is a client for the Definition schema.
func NewDefinitionClient ¶
func NewDefinitionClient(c config) *DefinitionClient
NewDefinitionClient returns a client for the Definition from the given config.
func (*DefinitionClient) Create ¶
func (c *DefinitionClient) Create() *DefinitionCreate
Create returns a builder for creating a Definition entity.
func (*DefinitionClient) CreateBulk ¶
func (c *DefinitionClient) CreateBulk(builders ...*DefinitionCreate) *DefinitionCreateBulk
CreateBulk returns a builder for creating a bulk of Definition entities.
func (*DefinitionClient) Delete ¶
func (c *DefinitionClient) Delete() *DefinitionDelete
Delete returns a delete builder for Definition.
func (*DefinitionClient) DeleteOne ¶
func (c *DefinitionClient) DeleteOne(d *Definition) *DefinitionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DefinitionClient) DeleteOneID ¶
func (c *DefinitionClient) DeleteOneID(id int) *DefinitionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DefinitionClient) Get ¶
func (c *DefinitionClient) Get(ctx context.Context, id int) (*Definition, error)
Get returns a Definition entity by its id.
func (*DefinitionClient) GetX ¶
func (c *DefinitionClient) GetX(ctx context.Context, id int) *Definition
GetX is like Get, but panics if an error occurs.
func (*DefinitionClient) Hooks ¶
func (c *DefinitionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DefinitionClient) Intercept ¶
func (c *DefinitionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `definition.Intercept(f(g(h())))`.
func (*DefinitionClient) Interceptors ¶
func (c *DefinitionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DefinitionClient) MapCreateBulk ¶
func (c *DefinitionClient) MapCreateBulk(slice any, setFunc func(*DefinitionCreate, int)) *DefinitionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*DefinitionClient) Query ¶
func (c *DefinitionClient) Query() *DefinitionQuery
Query returns a query builder for Definition.
func (*DefinitionClient) QuerySynset ¶
func (c *DefinitionClient) QuerySynset(d *Definition) *SynsetQuery
QuerySynset queries the synset edge of a Definition.
func (*DefinitionClient) Update ¶
func (c *DefinitionClient) Update() *DefinitionUpdate
Update returns an update builder for Definition.
func (*DefinitionClient) UpdateOne ¶
func (c *DefinitionClient) UpdateOne(d *Definition) *DefinitionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DefinitionClient) UpdateOneID ¶
func (c *DefinitionClient) UpdateOneID(id int) *DefinitionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DefinitionClient) Use ¶
func (c *DefinitionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `definition.Hooks(f(g(h())))`.
type DefinitionCreate ¶
type DefinitionCreate struct {
// contains filtered or unexported fields
}
DefinitionCreate is the builder for creating a Definition entity.
func (*DefinitionCreate) Exec ¶
func (dc *DefinitionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DefinitionCreate) ExecX ¶
func (dc *DefinitionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DefinitionCreate) Mutation ¶
func (dc *DefinitionCreate) Mutation() *DefinitionMutation
Mutation returns the DefinitionMutation object of the builder.
func (*DefinitionCreate) Save ¶
func (dc *DefinitionCreate) Save(ctx context.Context) (*Definition, error)
Save creates the Definition in the database.
func (*DefinitionCreate) SaveX ¶
func (dc *DefinitionCreate) SaveX(ctx context.Context) *Definition
SaveX calls Save and panics if Save returns an error.
func (*DefinitionCreate) SetNillableSynsetID ¶
func (dc *DefinitionCreate) SetNillableSynsetID(id *string) *DefinitionCreate
SetNillableSynsetID sets the "synset" edge to the Synset entity by ID if the given value is not nil.
func (*DefinitionCreate) SetSynset ¶
func (dc *DefinitionCreate) SetSynset(s *Synset) *DefinitionCreate
SetSynset sets the "synset" edge to the Synset entity.
func (*DefinitionCreate) SetSynsetID ¶
func (dc *DefinitionCreate) SetSynsetID(id string) *DefinitionCreate
SetSynsetID sets the "synset" edge to the Synset entity by ID.
func (*DefinitionCreate) SetText ¶
func (dc *DefinitionCreate) SetText(s string) *DefinitionCreate
SetText sets the "text" field.
type DefinitionCreateBulk ¶
type DefinitionCreateBulk struct {
// contains filtered or unexported fields
}
DefinitionCreateBulk is the builder for creating many Definition entities in bulk.
func (*DefinitionCreateBulk) Exec ¶
func (dcb *DefinitionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DefinitionCreateBulk) ExecX ¶
func (dcb *DefinitionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DefinitionCreateBulk) Save ¶
func (dcb *DefinitionCreateBulk) Save(ctx context.Context) ([]*Definition, error)
Save creates the Definition entities in the database.
func (*DefinitionCreateBulk) SaveX ¶
func (dcb *DefinitionCreateBulk) SaveX(ctx context.Context) []*Definition
SaveX is like Save, but panics if an error occurs.
type DefinitionDelete ¶
type DefinitionDelete struct {
// contains filtered or unexported fields
}
DefinitionDelete is the builder for deleting a Definition entity.
func (*DefinitionDelete) Exec ¶
func (dd *DefinitionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DefinitionDelete) ExecX ¶
func (dd *DefinitionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DefinitionDelete) Where ¶
func (dd *DefinitionDelete) Where(ps ...predicate.Definition) *DefinitionDelete
Where appends a list predicates to the DefinitionDelete builder.
type DefinitionDeleteOne ¶
type DefinitionDeleteOne struct {
// contains filtered or unexported fields
}
DefinitionDeleteOne is the builder for deleting a single Definition entity.
func (*DefinitionDeleteOne) Exec ¶
func (ddo *DefinitionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DefinitionDeleteOne) ExecX ¶
func (ddo *DefinitionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DefinitionDeleteOne) Where ¶
func (ddo *DefinitionDeleteOne) Where(ps ...predicate.Definition) *DefinitionDeleteOne
Where appends a list predicates to the DefinitionDelete builder.
type DefinitionEdges ¶
type DefinitionEdges struct { // Synset holds the value of the synset edge. Synset *Synset `json:"synset,omitempty"` // contains filtered or unexported fields }
DefinitionEdges holds the relations/edges for other nodes in the graph.
func (DefinitionEdges) SynsetOrErr ¶
func (e DefinitionEdges) SynsetOrErr() (*Synset, error)
SynsetOrErr returns the Synset value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DefinitionGroupBy ¶
type DefinitionGroupBy struct {
// contains filtered or unexported fields
}
DefinitionGroupBy is the group-by builder for Definition entities.
func (*DefinitionGroupBy) Aggregate ¶
func (dgb *DefinitionGroupBy) Aggregate(fns ...AggregateFunc) *DefinitionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DefinitionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DefinitionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DefinitionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DefinitionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DefinitionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DefinitionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DefinitionGroupBy) Scan ¶
func (dgb *DefinitionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DefinitionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DefinitionMutation ¶
type DefinitionMutation struct {
// contains filtered or unexported fields
}
DefinitionMutation represents an operation that mutates the Definition nodes in the graph.
func (*DefinitionMutation) AddField ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) AddedEdges ¶
func (m *DefinitionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DefinitionMutation) AddedField ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) AddedFields ¶
func (m *DefinitionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DefinitionMutation) AddedIDs ¶
func (m *DefinitionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DefinitionMutation) ClearEdge ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) ClearField ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) ClearSynset ¶
func (m *DefinitionMutation) ClearSynset()
ClearSynset clears the "synset" edge to the Synset entity.
func (*DefinitionMutation) ClearedEdges ¶
func (m *DefinitionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DefinitionMutation) ClearedFields ¶
func (m *DefinitionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DefinitionMutation) Client ¶
func (m DefinitionMutation) 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 (*DefinitionMutation) EdgeCleared ¶
func (m *DefinitionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DefinitionMutation) Field ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) FieldCleared ¶
func (m *DefinitionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DefinitionMutation) Fields ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) ID ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) IDs ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) 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 (*DefinitionMutation) OldText ¶
func (m *DefinitionMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" field's value of the Definition entity. If the Definition 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 (*DefinitionMutation) RemovedEdges ¶
func (m *DefinitionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DefinitionMutation) RemovedIDs ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) ResetEdge ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) ResetField ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) ResetSynset ¶
func (m *DefinitionMutation) ResetSynset()
ResetSynset resets all changes to the "synset" edge.
func (*DefinitionMutation) ResetText ¶
func (m *DefinitionMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*DefinitionMutation) SetField ¶
func (m *DefinitionMutation) 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 (*DefinitionMutation) SetOp ¶
func (m *DefinitionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DefinitionMutation) SetSynsetID ¶
func (m *DefinitionMutation) SetSynsetID(id string)
SetSynsetID sets the "synset" edge to the Synset entity by id.
func (*DefinitionMutation) SetText ¶
func (m *DefinitionMutation) SetText(s string)
SetText sets the "text" field.
func (*DefinitionMutation) SynsetCleared ¶
func (m *DefinitionMutation) SynsetCleared() bool
SynsetCleared reports if the "synset" edge to the Synset entity was cleared.
func (*DefinitionMutation) SynsetID ¶
func (m *DefinitionMutation) SynsetID() (id string, exists bool)
SynsetID returns the "synset" edge ID in the mutation.
func (*DefinitionMutation) SynsetIDs ¶
func (m *DefinitionMutation) SynsetIDs() (ids []string)
SynsetIDs returns the "synset" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SynsetID instead. It exists only for internal usage by the builders.
func (*DefinitionMutation) Text ¶
func (m *DefinitionMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (DefinitionMutation) Tx ¶
func (m DefinitionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DefinitionMutation) Type ¶
func (m *DefinitionMutation) Type() string
Type returns the node type of this mutation (Definition).
func (*DefinitionMutation) Where ¶
func (m *DefinitionMutation) Where(ps ...predicate.Definition)
Where appends a list predicates to the DefinitionMutation builder.
func (*DefinitionMutation) WhereP ¶
func (m *DefinitionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DefinitionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DefinitionQuery ¶
type DefinitionQuery struct {
// contains filtered or unexported fields
}
DefinitionQuery is the builder for querying Definition entities.
func (*DefinitionQuery) Aggregate ¶
func (dq *DefinitionQuery) Aggregate(fns ...AggregateFunc) *DefinitionSelect
Aggregate returns a DefinitionSelect configured with the given aggregations.
func (*DefinitionQuery) All ¶
func (dq *DefinitionQuery) All(ctx context.Context) ([]*Definition, error)
All executes the query and returns a list of Definitions.
func (*DefinitionQuery) AllX ¶
func (dq *DefinitionQuery) AllX(ctx context.Context) []*Definition
AllX is like All, but panics if an error occurs.
func (*DefinitionQuery) Clone ¶
func (dq *DefinitionQuery) Clone() *DefinitionQuery
Clone returns a duplicate of the DefinitionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DefinitionQuery) Count ¶
func (dq *DefinitionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DefinitionQuery) CountX ¶
func (dq *DefinitionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DefinitionQuery) Exist ¶
func (dq *DefinitionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DefinitionQuery) ExistX ¶
func (dq *DefinitionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DefinitionQuery) First ¶
func (dq *DefinitionQuery) First(ctx context.Context) (*Definition, error)
First returns the first Definition entity from the query. Returns a *NotFoundError when no Definition was found.
func (*DefinitionQuery) FirstID ¶
func (dq *DefinitionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Definition ID from the query. Returns a *NotFoundError when no Definition ID was found.
func (*DefinitionQuery) FirstIDX ¶
func (dq *DefinitionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DefinitionQuery) FirstX ¶
func (dq *DefinitionQuery) FirstX(ctx context.Context) *Definition
FirstX is like First, but panics if an error occurs.
func (*DefinitionQuery) GroupBy ¶
func (dq *DefinitionQuery) GroupBy(field string, fields ...string) *DefinitionGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Text string `json:"text,omitempty"` Count int `json:"count,omitempty"` } client.Definition.Query(). GroupBy(definition.FieldText). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DefinitionQuery) IDs ¶
func (dq *DefinitionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Definition IDs.
func (*DefinitionQuery) IDsX ¶
func (dq *DefinitionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DefinitionQuery) Limit ¶
func (dq *DefinitionQuery) Limit(limit int) *DefinitionQuery
Limit the number of records to be returned by this query.
func (*DefinitionQuery) Offset ¶
func (dq *DefinitionQuery) Offset(offset int) *DefinitionQuery
Offset to start from.
func (*DefinitionQuery) Only ¶
func (dq *DefinitionQuery) Only(ctx context.Context) (*Definition, error)
Only returns a single Definition entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Definition entity is found. Returns a *NotFoundError when no Definition entities are found.
func (*DefinitionQuery) OnlyID ¶
func (dq *DefinitionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Definition ID in the query. Returns a *NotSingularError when more than one Definition ID is found. Returns a *NotFoundError when no entities are found.
func (*DefinitionQuery) OnlyIDX ¶
func (dq *DefinitionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DefinitionQuery) OnlyX ¶
func (dq *DefinitionQuery) OnlyX(ctx context.Context) *Definition
OnlyX is like Only, but panics if an error occurs.
func (*DefinitionQuery) Order ¶
func (dq *DefinitionQuery) Order(o ...definition.OrderOption) *DefinitionQuery
Order specifies how the records should be ordered.
func (*DefinitionQuery) QuerySynset ¶
func (dq *DefinitionQuery) QuerySynset() *SynsetQuery
QuerySynset chains the current query on the "synset" edge.
func (*DefinitionQuery) Select ¶
func (dq *DefinitionQuery) Select(fields ...string) *DefinitionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Text string `json:"text,omitempty"` } client.Definition.Query(). Select(definition.FieldText). Scan(ctx, &v)
func (*DefinitionQuery) Unique ¶
func (dq *DefinitionQuery) Unique(unique bool) *DefinitionQuery
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 (*DefinitionQuery) Where ¶
func (dq *DefinitionQuery) Where(ps ...predicate.Definition) *DefinitionQuery
Where adds a new predicate for the DefinitionQuery builder.
func (*DefinitionQuery) WithSynset ¶
func (dq *DefinitionQuery) WithSynset(opts ...func(*SynsetQuery)) *DefinitionQuery
WithSynset tells the query-builder to eager-load the nodes that are connected to the "synset" edge. The optional arguments are used to configure the query builder of the edge.
type DefinitionSelect ¶
type DefinitionSelect struct { *DefinitionQuery // contains filtered or unexported fields }
DefinitionSelect is the builder for selecting fields of Definition entities.
func (*DefinitionSelect) Aggregate ¶
func (ds *DefinitionSelect) Aggregate(fns ...AggregateFunc) *DefinitionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DefinitionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DefinitionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DefinitionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DefinitionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DefinitionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DefinitionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DefinitionSelect) Scan ¶
func (ds *DefinitionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DefinitionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DefinitionUpdate ¶
type DefinitionUpdate struct {
// contains filtered or unexported fields
}
DefinitionUpdate is the builder for updating Definition entities.
func (*DefinitionUpdate) ClearSynset ¶
func (du *DefinitionUpdate) ClearSynset() *DefinitionUpdate
ClearSynset clears the "synset" edge to the Synset entity.
func (*DefinitionUpdate) Exec ¶
func (du *DefinitionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DefinitionUpdate) ExecX ¶
func (du *DefinitionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DefinitionUpdate) Mutation ¶
func (du *DefinitionUpdate) Mutation() *DefinitionMutation
Mutation returns the DefinitionMutation object of the builder.
func (*DefinitionUpdate) Save ¶
func (du *DefinitionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DefinitionUpdate) SaveX ¶
func (du *DefinitionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DefinitionUpdate) SetNillableSynsetID ¶
func (du *DefinitionUpdate) SetNillableSynsetID(id *string) *DefinitionUpdate
SetNillableSynsetID sets the "synset" edge to the Synset entity by ID if the given value is not nil.
func (*DefinitionUpdate) SetNillableText ¶
func (du *DefinitionUpdate) SetNillableText(s *string) *DefinitionUpdate
SetNillableText sets the "text" field if the given value is not nil.
func (*DefinitionUpdate) SetSynset ¶
func (du *DefinitionUpdate) SetSynset(s *Synset) *DefinitionUpdate
SetSynset sets the "synset" edge to the Synset entity.
func (*DefinitionUpdate) SetSynsetID ¶
func (du *DefinitionUpdate) SetSynsetID(id string) *DefinitionUpdate
SetSynsetID sets the "synset" edge to the Synset entity by ID.
func (*DefinitionUpdate) SetText ¶
func (du *DefinitionUpdate) SetText(s string) *DefinitionUpdate
SetText sets the "text" field.
func (*DefinitionUpdate) Where ¶
func (du *DefinitionUpdate) Where(ps ...predicate.Definition) *DefinitionUpdate
Where appends a list predicates to the DefinitionUpdate builder.
type DefinitionUpdateOne ¶
type DefinitionUpdateOne struct {
// contains filtered or unexported fields
}
DefinitionUpdateOne is the builder for updating a single Definition entity.
func (*DefinitionUpdateOne) ClearSynset ¶
func (duo *DefinitionUpdateOne) ClearSynset() *DefinitionUpdateOne
ClearSynset clears the "synset" edge to the Synset entity.
func (*DefinitionUpdateOne) Exec ¶
func (duo *DefinitionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DefinitionUpdateOne) ExecX ¶
func (duo *DefinitionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DefinitionUpdateOne) Mutation ¶
func (duo *DefinitionUpdateOne) Mutation() *DefinitionMutation
Mutation returns the DefinitionMutation object of the builder.
func (*DefinitionUpdateOne) Save ¶
func (duo *DefinitionUpdateOne) Save(ctx context.Context) (*Definition, error)
Save executes the query and returns the updated Definition entity.
func (*DefinitionUpdateOne) SaveX ¶
func (duo *DefinitionUpdateOne) SaveX(ctx context.Context) *Definition
SaveX is like Save, but panics if an error occurs.
func (*DefinitionUpdateOne) Select ¶
func (duo *DefinitionUpdateOne) Select(field string, fields ...string) *DefinitionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DefinitionUpdateOne) SetNillableSynsetID ¶
func (duo *DefinitionUpdateOne) SetNillableSynsetID(id *string) *DefinitionUpdateOne
SetNillableSynsetID sets the "synset" edge to the Synset entity by ID if the given value is not nil.
func (*DefinitionUpdateOne) SetNillableText ¶
func (duo *DefinitionUpdateOne) SetNillableText(s *string) *DefinitionUpdateOne
SetNillableText sets the "text" field if the given value is not nil.
func (*DefinitionUpdateOne) SetSynset ¶
func (duo *DefinitionUpdateOne) SetSynset(s *Synset) *DefinitionUpdateOne
SetSynset sets the "synset" edge to the Synset entity.
func (*DefinitionUpdateOne) SetSynsetID ¶
func (duo *DefinitionUpdateOne) SetSynsetID(id string) *DefinitionUpdateOne
SetSynsetID sets the "synset" edge to the Synset entity by ID.
func (*DefinitionUpdateOne) SetText ¶
func (duo *DefinitionUpdateOne) SetText(s string) *DefinitionUpdateOne
SetText sets the "text" field.
func (*DefinitionUpdateOne) Where ¶
func (duo *DefinitionUpdateOne) Where(ps ...predicate.Definition) *DefinitionUpdateOne
Where appends a list predicates to the DefinitionUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type Lemma ¶
type Lemma struct { // ID of the ent. ID string `json:"id,omitempty"` // WrittenForm holds the value of the "writtenForm" field. WrittenForm string `json:"writtenForm,omitempty"` // PartOfSpeech holds the value of the "partOfSpeech" field. PartOfSpeech string `json:"partOfSpeech,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the LemmaQuery when eager-loading is set. Edges LemmaEdges `json:"edges"` // contains filtered or unexported fields }
Lemma is the model entity for the Lemma schema.
func (*Lemma) QuerySenses ¶
func (l *Lemma) QuerySenses() *SenseQuery
QuerySenses queries the "senses" edge of the Lemma entity.
func (*Lemma) Unwrap ¶
Unwrap unwraps the Lemma 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 (*Lemma) Update ¶
func (l *Lemma) Update() *LemmaUpdateOne
Update returns a builder for updating this Lemma. Note that you need to call Lemma.Unwrap() before calling this method if this Lemma was returned from a transaction, and the transaction was committed or rolled back.
type LemmaClient ¶
type LemmaClient struct {
// contains filtered or unexported fields
}
LemmaClient is a client for the Lemma schema.
func NewLemmaClient ¶
func NewLemmaClient(c config) *LemmaClient
NewLemmaClient returns a client for the Lemma from the given config.
func (*LemmaClient) Create ¶
func (c *LemmaClient) Create() *LemmaCreate
Create returns a builder for creating a Lemma entity.
func (*LemmaClient) CreateBulk ¶
func (c *LemmaClient) CreateBulk(builders ...*LemmaCreate) *LemmaCreateBulk
CreateBulk returns a builder for creating a bulk of Lemma entities.
func (*LemmaClient) Delete ¶
func (c *LemmaClient) Delete() *LemmaDelete
Delete returns a delete builder for Lemma.
func (*LemmaClient) DeleteOne ¶
func (c *LemmaClient) DeleteOne(l *Lemma) *LemmaDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LemmaClient) DeleteOneID ¶
func (c *LemmaClient) DeleteOneID(id string) *LemmaDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LemmaClient) GetX ¶
func (c *LemmaClient) GetX(ctx context.Context, id string) *Lemma
GetX is like Get, but panics if an error occurs.
func (*LemmaClient) Intercept ¶
func (c *LemmaClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `lemma.Intercept(f(g(h())))`.
func (*LemmaClient) Interceptors ¶
func (c *LemmaClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LemmaClient) MapCreateBulk ¶
func (c *LemmaClient) MapCreateBulk(slice any, setFunc func(*LemmaCreate, int)) *LemmaCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*LemmaClient) Query ¶
func (c *LemmaClient) Query() *LemmaQuery
Query returns a query builder for Lemma.
func (*LemmaClient) QuerySenses ¶
func (c *LemmaClient) QuerySenses(l *Lemma) *SenseQuery
QuerySenses queries the senses edge of a Lemma.
func (*LemmaClient) Update ¶
func (c *LemmaClient) Update() *LemmaUpdate
Update returns an update builder for Lemma.
func (*LemmaClient) UpdateOne ¶
func (c *LemmaClient) UpdateOne(l *Lemma) *LemmaUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LemmaClient) UpdateOneID ¶
func (c *LemmaClient) UpdateOneID(id string) *LemmaUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LemmaClient) Use ¶
func (c *LemmaClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `lemma.Hooks(f(g(h())))`.
type LemmaCreate ¶
type LemmaCreate struct {
// contains filtered or unexported fields
}
LemmaCreate is the builder for creating a Lemma entity.
func (*LemmaCreate) AddSenseIDs ¶
func (lc *LemmaCreate) AddSenseIDs(ids ...string) *LemmaCreate
AddSenseIDs adds the "senses" edge to the Sense entity by IDs.
func (*LemmaCreate) AddSenses ¶
func (lc *LemmaCreate) AddSenses(s ...*Sense) *LemmaCreate
AddSenses adds the "senses" edges to the Sense entity.
func (*LemmaCreate) Exec ¶
func (lc *LemmaCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LemmaCreate) ExecX ¶
func (lc *LemmaCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LemmaCreate) Mutation ¶
func (lc *LemmaCreate) Mutation() *LemmaMutation
Mutation returns the LemmaMutation object of the builder.
func (*LemmaCreate) Save ¶
func (lc *LemmaCreate) Save(ctx context.Context) (*Lemma, error)
Save creates the Lemma in the database.
func (*LemmaCreate) SaveX ¶
func (lc *LemmaCreate) SaveX(ctx context.Context) *Lemma
SaveX calls Save and panics if Save returns an error.
func (*LemmaCreate) SetID ¶
func (lc *LemmaCreate) SetID(s string) *LemmaCreate
SetID sets the "id" field.
func (*LemmaCreate) SetPartOfSpeech ¶
func (lc *LemmaCreate) SetPartOfSpeech(s string) *LemmaCreate
SetPartOfSpeech sets the "partOfSpeech" field.
func (*LemmaCreate) SetWrittenForm ¶
func (lc *LemmaCreate) SetWrittenForm(s string) *LemmaCreate
SetWrittenForm sets the "writtenForm" field.
type LemmaCreateBulk ¶
type LemmaCreateBulk struct {
// contains filtered or unexported fields
}
LemmaCreateBulk is the builder for creating many Lemma entities in bulk.
func (*LemmaCreateBulk) Exec ¶
func (lcb *LemmaCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LemmaCreateBulk) ExecX ¶
func (lcb *LemmaCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LemmaDelete ¶
type LemmaDelete struct {
// contains filtered or unexported fields
}
LemmaDelete is the builder for deleting a Lemma entity.
func (*LemmaDelete) Exec ¶
func (ld *LemmaDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LemmaDelete) ExecX ¶
func (ld *LemmaDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LemmaDelete) Where ¶
func (ld *LemmaDelete) Where(ps ...predicate.Lemma) *LemmaDelete
Where appends a list predicates to the LemmaDelete builder.
type LemmaDeleteOne ¶
type LemmaDeleteOne struct {
// contains filtered or unexported fields
}
LemmaDeleteOne is the builder for deleting a single Lemma entity.
func (*LemmaDeleteOne) Exec ¶
func (ldo *LemmaDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LemmaDeleteOne) ExecX ¶
func (ldo *LemmaDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LemmaDeleteOne) Where ¶
func (ldo *LemmaDeleteOne) Where(ps ...predicate.Lemma) *LemmaDeleteOne
Where appends a list predicates to the LemmaDelete builder.
type LemmaEdges ¶
type LemmaEdges struct { // Senses holds the value of the senses edge. Senses []*Sense `json:"senses,omitempty"` // contains filtered or unexported fields }
LemmaEdges holds the relations/edges for other nodes in the graph.
func (LemmaEdges) SensesOrErr ¶
func (e LemmaEdges) SensesOrErr() ([]*Sense, error)
SensesOrErr returns the Senses value or an error if the edge was not loaded in eager-loading.
type LemmaGroupBy ¶
type LemmaGroupBy struct {
// contains filtered or unexported fields
}
LemmaGroupBy is the group-by builder for Lemma entities.
func (*LemmaGroupBy) Aggregate ¶
func (lgb *LemmaGroupBy) Aggregate(fns ...AggregateFunc) *LemmaGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LemmaGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LemmaGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LemmaGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LemmaGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LemmaGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LemmaGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LemmaGroupBy) Scan ¶
func (lgb *LemmaGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LemmaGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LemmaMutation ¶
type LemmaMutation struct {
// contains filtered or unexported fields
}
LemmaMutation represents an operation that mutates the Lemma nodes in the graph.
func (*LemmaMutation) AddField ¶
func (m *LemmaMutation) 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 (*LemmaMutation) AddSenseIDs ¶
func (m *LemmaMutation) AddSenseIDs(ids ...string)
AddSenseIDs adds the "senses" edge to the Sense entity by ids.
func (*LemmaMutation) AddedEdges ¶
func (m *LemmaMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LemmaMutation) AddedField ¶
func (m *LemmaMutation) 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 (*LemmaMutation) AddedFields ¶
func (m *LemmaMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LemmaMutation) AddedIDs ¶
func (m *LemmaMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LemmaMutation) ClearEdge ¶
func (m *LemmaMutation) 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 (*LemmaMutation) ClearField ¶
func (m *LemmaMutation) 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 (*LemmaMutation) ClearSenses ¶
func (m *LemmaMutation) ClearSenses()
ClearSenses clears the "senses" edge to the Sense entity.
func (*LemmaMutation) ClearedEdges ¶
func (m *LemmaMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LemmaMutation) ClearedFields ¶
func (m *LemmaMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LemmaMutation) Client ¶
func (m LemmaMutation) 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 (*LemmaMutation) EdgeCleared ¶
func (m *LemmaMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LemmaMutation) Field ¶
func (m *LemmaMutation) 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 (*LemmaMutation) FieldCleared ¶
func (m *LemmaMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LemmaMutation) Fields ¶
func (m *LemmaMutation) 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 (*LemmaMutation) ID ¶
func (m *LemmaMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*LemmaMutation) IDs ¶
func (m *LemmaMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*LemmaMutation) 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 (*LemmaMutation) OldPartOfSpeech ¶
func (m *LemmaMutation) OldPartOfSpeech(ctx context.Context) (v string, err error)
OldPartOfSpeech returns the old "partOfSpeech" field's value of the Lemma entity. If the Lemma 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 (*LemmaMutation) OldWrittenForm ¶
func (m *LemmaMutation) OldWrittenForm(ctx context.Context) (v string, err error)
OldWrittenForm returns the old "writtenForm" field's value of the Lemma entity. If the Lemma 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 (*LemmaMutation) PartOfSpeech ¶
func (m *LemmaMutation) PartOfSpeech() (r string, exists bool)
PartOfSpeech returns the value of the "partOfSpeech" field in the mutation.
func (*LemmaMutation) RemoveSenseIDs ¶
func (m *LemmaMutation) RemoveSenseIDs(ids ...string)
RemoveSenseIDs removes the "senses" edge to the Sense entity by IDs.
func (*LemmaMutation) RemovedEdges ¶
func (m *LemmaMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LemmaMutation) RemovedIDs ¶
func (m *LemmaMutation) 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 (*LemmaMutation) RemovedSensesIDs ¶
func (m *LemmaMutation) RemovedSensesIDs() (ids []string)
RemovedSenses returns the removed IDs of the "senses" edge to the Sense entity.
func (*LemmaMutation) ResetEdge ¶
func (m *LemmaMutation) 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 (*LemmaMutation) ResetField ¶
func (m *LemmaMutation) 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 (*LemmaMutation) ResetPartOfSpeech ¶
func (m *LemmaMutation) ResetPartOfSpeech()
ResetPartOfSpeech resets all changes to the "partOfSpeech" field.
func (*LemmaMutation) ResetSenses ¶
func (m *LemmaMutation) ResetSenses()
ResetSenses resets all changes to the "senses" edge.
func (*LemmaMutation) ResetWrittenForm ¶
func (m *LemmaMutation) ResetWrittenForm()
ResetWrittenForm resets all changes to the "writtenForm" field.
func (*LemmaMutation) SensesCleared ¶
func (m *LemmaMutation) SensesCleared() bool
SensesCleared reports if the "senses" edge to the Sense entity was cleared.
func (*LemmaMutation) SensesIDs ¶
func (m *LemmaMutation) SensesIDs() (ids []string)
SensesIDs returns the "senses" edge IDs in the mutation.
func (*LemmaMutation) SetField ¶
func (m *LemmaMutation) 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 (*LemmaMutation) SetID ¶
func (m *LemmaMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Lemma entities.
func (*LemmaMutation) SetOp ¶
func (m *LemmaMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LemmaMutation) SetPartOfSpeech ¶
func (m *LemmaMutation) SetPartOfSpeech(s string)
SetPartOfSpeech sets the "partOfSpeech" field.
func (*LemmaMutation) SetWrittenForm ¶
func (m *LemmaMutation) SetWrittenForm(s string)
SetWrittenForm sets the "writtenForm" field.
func (LemmaMutation) Tx ¶
func (m LemmaMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LemmaMutation) Type ¶
func (m *LemmaMutation) Type() string
Type returns the node type of this mutation (Lemma).
func (*LemmaMutation) Where ¶
func (m *LemmaMutation) Where(ps ...predicate.Lemma)
Where appends a list predicates to the LemmaMutation builder.
func (*LemmaMutation) WhereP ¶
func (m *LemmaMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LemmaMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*LemmaMutation) WrittenForm ¶
func (m *LemmaMutation) WrittenForm() (r string, exists bool)
WrittenForm returns the value of the "writtenForm" field in the mutation.
type LemmaQuery ¶
type LemmaQuery struct {
// contains filtered or unexported fields
}
LemmaQuery is the builder for querying Lemma entities.
func (*LemmaQuery) Aggregate ¶
func (lq *LemmaQuery) Aggregate(fns ...AggregateFunc) *LemmaSelect
Aggregate returns a LemmaSelect configured with the given aggregations.
func (*LemmaQuery) All ¶
func (lq *LemmaQuery) All(ctx context.Context) ([]*Lemma, error)
All executes the query and returns a list of Lemmas.
func (*LemmaQuery) AllX ¶
func (lq *LemmaQuery) AllX(ctx context.Context) []*Lemma
AllX is like All, but panics if an error occurs.
func (*LemmaQuery) Clone ¶
func (lq *LemmaQuery) Clone() *LemmaQuery
Clone returns a duplicate of the LemmaQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LemmaQuery) Count ¶
func (lq *LemmaQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LemmaQuery) CountX ¶
func (lq *LemmaQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LemmaQuery) Exist ¶
func (lq *LemmaQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LemmaQuery) ExistX ¶
func (lq *LemmaQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LemmaQuery) First ¶
func (lq *LemmaQuery) First(ctx context.Context) (*Lemma, error)
First returns the first Lemma entity from the query. Returns a *NotFoundError when no Lemma was found.
func (*LemmaQuery) FirstID ¶
func (lq *LemmaQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Lemma ID from the query. Returns a *NotFoundError when no Lemma ID was found.
func (*LemmaQuery) FirstIDX ¶
func (lq *LemmaQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*LemmaQuery) FirstX ¶
func (lq *LemmaQuery) FirstX(ctx context.Context) *Lemma
FirstX is like First, but panics if an error occurs.
func (*LemmaQuery) GroupBy ¶
func (lq *LemmaQuery) GroupBy(field string, fields ...string) *LemmaGroupBy
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 { WrittenForm string `json:"writtenForm,omitempty"` Count int `json:"count,omitempty"` } client.Lemma.Query(). GroupBy(lemma.FieldWrittenForm). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LemmaQuery) IDs ¶
func (lq *LemmaQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of Lemma IDs.
func (*LemmaQuery) IDsX ¶
func (lq *LemmaQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*LemmaQuery) Limit ¶
func (lq *LemmaQuery) Limit(limit int) *LemmaQuery
Limit the number of records to be returned by this query.
func (*LemmaQuery) Offset ¶
func (lq *LemmaQuery) Offset(offset int) *LemmaQuery
Offset to start from.
func (*LemmaQuery) Only ¶
func (lq *LemmaQuery) Only(ctx context.Context) (*Lemma, error)
Only returns a single Lemma entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Lemma entity is found. Returns a *NotFoundError when no Lemma entities are found.
func (*LemmaQuery) OnlyID ¶
func (lq *LemmaQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Lemma ID in the query. Returns a *NotSingularError when more than one Lemma ID is found. Returns a *NotFoundError when no entities are found.
func (*LemmaQuery) OnlyIDX ¶
func (lq *LemmaQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LemmaQuery) OnlyX ¶
func (lq *LemmaQuery) OnlyX(ctx context.Context) *Lemma
OnlyX is like Only, but panics if an error occurs.
func (*LemmaQuery) Order ¶
func (lq *LemmaQuery) Order(o ...lemma.OrderOption) *LemmaQuery
Order specifies how the records should be ordered.
func (*LemmaQuery) QuerySenses ¶
func (lq *LemmaQuery) QuerySenses() *SenseQuery
QuerySenses chains the current query on the "senses" edge.
func (*LemmaQuery) Select ¶
func (lq *LemmaQuery) Select(fields ...string) *LemmaSelect
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 { WrittenForm string `json:"writtenForm,omitempty"` } client.Lemma.Query(). Select(lemma.FieldWrittenForm). Scan(ctx, &v)
func (*LemmaQuery) Unique ¶
func (lq *LemmaQuery) Unique(unique bool) *LemmaQuery
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 (*LemmaQuery) Where ¶
func (lq *LemmaQuery) Where(ps ...predicate.Lemma) *LemmaQuery
Where adds a new predicate for the LemmaQuery builder.
func (*LemmaQuery) WithSenses ¶
func (lq *LemmaQuery) WithSenses(opts ...func(*SenseQuery)) *LemmaQuery
WithSenses tells the query-builder to eager-load the nodes that are connected to the "senses" edge. The optional arguments are used to configure the query builder of the edge.
type LemmaSelect ¶
type LemmaSelect struct { *LemmaQuery // contains filtered or unexported fields }
LemmaSelect is the builder for selecting fields of Lemma entities.
func (*LemmaSelect) Aggregate ¶
func (ls *LemmaSelect) Aggregate(fns ...AggregateFunc) *LemmaSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LemmaSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LemmaSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LemmaSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LemmaSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LemmaSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LemmaSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LemmaSelect) Scan ¶
func (ls *LemmaSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LemmaSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LemmaUpdate ¶
type LemmaUpdate struct {
// contains filtered or unexported fields
}
LemmaUpdate is the builder for updating Lemma entities.
func (*LemmaUpdate) AddSenseIDs ¶
func (lu *LemmaUpdate) AddSenseIDs(ids ...string) *LemmaUpdate
AddSenseIDs adds the "senses" edge to the Sense entity by IDs.
func (*LemmaUpdate) AddSenses ¶
func (lu *LemmaUpdate) AddSenses(s ...*Sense) *LemmaUpdate
AddSenses adds the "senses" edges to the Sense entity.
func (*LemmaUpdate) ClearSenses ¶
func (lu *LemmaUpdate) ClearSenses() *LemmaUpdate
ClearSenses clears all "senses" edges to the Sense entity.
func (*LemmaUpdate) Exec ¶
func (lu *LemmaUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LemmaUpdate) ExecX ¶
func (lu *LemmaUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LemmaUpdate) Mutation ¶
func (lu *LemmaUpdate) Mutation() *LemmaMutation
Mutation returns the LemmaMutation object of the builder.
func (*LemmaUpdate) RemoveSenseIDs ¶
func (lu *LemmaUpdate) RemoveSenseIDs(ids ...string) *LemmaUpdate
RemoveSenseIDs removes the "senses" edge to Sense entities by IDs.
func (*LemmaUpdate) RemoveSenses ¶
func (lu *LemmaUpdate) RemoveSenses(s ...*Sense) *LemmaUpdate
RemoveSenses removes "senses" edges to Sense entities.
func (*LemmaUpdate) Save ¶
func (lu *LemmaUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LemmaUpdate) SaveX ¶
func (lu *LemmaUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LemmaUpdate) SetNillablePartOfSpeech ¶
func (lu *LemmaUpdate) SetNillablePartOfSpeech(s *string) *LemmaUpdate
SetNillablePartOfSpeech sets the "partOfSpeech" field if the given value is not nil.
func (*LemmaUpdate) SetNillableWrittenForm ¶
func (lu *LemmaUpdate) SetNillableWrittenForm(s *string) *LemmaUpdate
SetNillableWrittenForm sets the "writtenForm" field if the given value is not nil.
func (*LemmaUpdate) SetPartOfSpeech ¶
func (lu *LemmaUpdate) SetPartOfSpeech(s string) *LemmaUpdate
SetPartOfSpeech sets the "partOfSpeech" field.
func (*LemmaUpdate) SetWrittenForm ¶
func (lu *LemmaUpdate) SetWrittenForm(s string) *LemmaUpdate
SetWrittenForm sets the "writtenForm" field.
func (*LemmaUpdate) Where ¶
func (lu *LemmaUpdate) Where(ps ...predicate.Lemma) *LemmaUpdate
Where appends a list predicates to the LemmaUpdate builder.
type LemmaUpdateOne ¶
type LemmaUpdateOne struct {
// contains filtered or unexported fields
}
LemmaUpdateOne is the builder for updating a single Lemma entity.
func (*LemmaUpdateOne) AddSenseIDs ¶
func (luo *LemmaUpdateOne) AddSenseIDs(ids ...string) *LemmaUpdateOne
AddSenseIDs adds the "senses" edge to the Sense entity by IDs.
func (*LemmaUpdateOne) AddSenses ¶
func (luo *LemmaUpdateOne) AddSenses(s ...*Sense) *LemmaUpdateOne
AddSenses adds the "senses" edges to the Sense entity.
func (*LemmaUpdateOne) ClearSenses ¶
func (luo *LemmaUpdateOne) ClearSenses() *LemmaUpdateOne
ClearSenses clears all "senses" edges to the Sense entity.
func (*LemmaUpdateOne) Exec ¶
func (luo *LemmaUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LemmaUpdateOne) ExecX ¶
func (luo *LemmaUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LemmaUpdateOne) Mutation ¶
func (luo *LemmaUpdateOne) Mutation() *LemmaMutation
Mutation returns the LemmaMutation object of the builder.
func (*LemmaUpdateOne) RemoveSenseIDs ¶
func (luo *LemmaUpdateOne) RemoveSenseIDs(ids ...string) *LemmaUpdateOne
RemoveSenseIDs removes the "senses" edge to Sense entities by IDs.
func (*LemmaUpdateOne) RemoveSenses ¶
func (luo *LemmaUpdateOne) RemoveSenses(s ...*Sense) *LemmaUpdateOne
RemoveSenses removes "senses" edges to Sense entities.
func (*LemmaUpdateOne) Save ¶
func (luo *LemmaUpdateOne) Save(ctx context.Context) (*Lemma, error)
Save executes the query and returns the updated Lemma entity.
func (*LemmaUpdateOne) SaveX ¶
func (luo *LemmaUpdateOne) SaveX(ctx context.Context) *Lemma
SaveX is like Save, but panics if an error occurs.
func (*LemmaUpdateOne) Select ¶
func (luo *LemmaUpdateOne) Select(field string, fields ...string) *LemmaUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LemmaUpdateOne) SetNillablePartOfSpeech ¶
func (luo *LemmaUpdateOne) SetNillablePartOfSpeech(s *string) *LemmaUpdateOne
SetNillablePartOfSpeech sets the "partOfSpeech" field if the given value is not nil.
func (*LemmaUpdateOne) SetNillableWrittenForm ¶
func (luo *LemmaUpdateOne) SetNillableWrittenForm(s *string) *LemmaUpdateOne
SetNillableWrittenForm sets the "writtenForm" field if the given value is not nil.
func (*LemmaUpdateOne) SetPartOfSpeech ¶
func (luo *LemmaUpdateOne) SetPartOfSpeech(s string) *LemmaUpdateOne
SetPartOfSpeech sets the "partOfSpeech" field.
func (*LemmaUpdateOne) SetWrittenForm ¶
func (luo *LemmaUpdateOne) SetWrittenForm(s string) *LemmaUpdateOne
SetWrittenForm sets the "writtenForm" field.
func (*LemmaUpdateOne) Where ¶
func (luo *LemmaUpdateOne) Where(ps ...predicate.Lemma) *LemmaUpdateOne
Where appends a list predicates to the LemmaUpdate builder.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Sense ¶
type Sense struct { // ID of the ent. ID string `json:"id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SenseQuery when eager-loading is set. Edges SenseEdges `json:"edges"` // contains filtered or unexported fields }
Sense is the model entity for the Sense schema.
func (*Sense) QueryLemma ¶
func (s *Sense) QueryLemma() *LemmaQuery
QueryLemma queries the "lemma" edge of the Sense entity.
func (*Sense) QueryRelFrom ¶
func (s *Sense) QueryRelFrom() *SenseRelationQuery
QueryRelFrom queries the "relFrom" edge of the Sense entity.
func (*Sense) QueryRelTo ¶
func (s *Sense) QueryRelTo() *SenseRelationQuery
QueryRelTo queries the "relTo" edge of the Sense entity.
func (*Sense) QuerySynset ¶
func (s *Sense) QuerySynset() *SynsetQuery
QuerySynset queries the "synset" edge of the Sense entity.
func (*Sense) Unwrap ¶
Unwrap unwraps the Sense 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 (*Sense) Update ¶
func (s *Sense) Update() *SenseUpdateOne
Update returns a builder for updating this Sense. Note that you need to call Sense.Unwrap() before calling this method if this Sense was returned from a transaction, and the transaction was committed or rolled back.
type SenseClient ¶
type SenseClient struct {
// contains filtered or unexported fields
}
SenseClient is a client for the Sense schema.
func NewSenseClient ¶
func NewSenseClient(c config) *SenseClient
NewSenseClient returns a client for the Sense from the given config.
func (*SenseClient) Create ¶
func (c *SenseClient) Create() *SenseCreate
Create returns a builder for creating a Sense entity.
func (*SenseClient) CreateBulk ¶
func (c *SenseClient) CreateBulk(builders ...*SenseCreate) *SenseCreateBulk
CreateBulk returns a builder for creating a bulk of Sense entities.
func (*SenseClient) Delete ¶
func (c *SenseClient) Delete() *SenseDelete
Delete returns a delete builder for Sense.
func (*SenseClient) DeleteOne ¶
func (c *SenseClient) DeleteOne(s *Sense) *SenseDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SenseClient) DeleteOneID ¶
func (c *SenseClient) DeleteOneID(id string) *SenseDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SenseClient) GetX ¶
func (c *SenseClient) GetX(ctx context.Context, id string) *Sense
GetX is like Get, but panics if an error occurs.
func (*SenseClient) Intercept ¶
func (c *SenseClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `sense.Intercept(f(g(h())))`.
func (*SenseClient) Interceptors ¶
func (c *SenseClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SenseClient) MapCreateBulk ¶
func (c *SenseClient) MapCreateBulk(slice any, setFunc func(*SenseCreate, int)) *SenseCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SenseClient) Query ¶
func (c *SenseClient) Query() *SenseQuery
Query returns a query builder for Sense.
func (*SenseClient) QueryLemma ¶
func (c *SenseClient) QueryLemma(s *Sense) *LemmaQuery
QueryLemma queries the lemma edge of a Sense.
func (*SenseClient) QueryRelFrom ¶
func (c *SenseClient) QueryRelFrom(s *Sense) *SenseRelationQuery
QueryRelFrom queries the relFrom edge of a Sense.
func (*SenseClient) QueryRelTo ¶
func (c *SenseClient) QueryRelTo(s *Sense) *SenseRelationQuery
QueryRelTo queries the relTo edge of a Sense.
func (*SenseClient) QuerySynset ¶
func (c *SenseClient) QuerySynset(s *Sense) *SynsetQuery
QuerySynset queries the synset edge of a Sense.
func (*SenseClient) Update ¶
func (c *SenseClient) Update() *SenseUpdate
Update returns an update builder for Sense.
func (*SenseClient) UpdateOne ¶
func (c *SenseClient) UpdateOne(s *Sense) *SenseUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SenseClient) UpdateOneID ¶
func (c *SenseClient) UpdateOneID(id string) *SenseUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SenseClient) Use ¶
func (c *SenseClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sense.Hooks(f(g(h())))`.
type SenseCreate ¶
type SenseCreate struct {
// contains filtered or unexported fields
}
SenseCreate is the builder for creating a Sense entity.
func (*SenseCreate) AddRelFrom ¶
func (sc *SenseCreate) AddRelFrom(s ...*SenseRelation) *SenseCreate
AddRelFrom adds the "relFrom" edges to the SenseRelation entity.
func (*SenseCreate) AddRelFromIDs ¶
func (sc *SenseCreate) AddRelFromIDs(ids ...int) *SenseCreate
AddRelFromIDs adds the "relFrom" edge to the SenseRelation entity by IDs.
func (*SenseCreate) AddRelTo ¶
func (sc *SenseCreate) AddRelTo(s ...*SenseRelation) *SenseCreate
AddRelTo adds the "relTo" edges to the SenseRelation entity.
func (*SenseCreate) AddRelToIDs ¶
func (sc *SenseCreate) AddRelToIDs(ids ...int) *SenseCreate
AddRelToIDs adds the "relTo" edge to the SenseRelation entity by IDs.
func (*SenseCreate) Exec ¶
func (sc *SenseCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SenseCreate) ExecX ¶
func (sc *SenseCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SenseCreate) Mutation ¶
func (sc *SenseCreate) Mutation() *SenseMutation
Mutation returns the SenseMutation object of the builder.
func (*SenseCreate) Save ¶
func (sc *SenseCreate) Save(ctx context.Context) (*Sense, error)
Save creates the Sense in the database.
func (*SenseCreate) SaveX ¶
func (sc *SenseCreate) SaveX(ctx context.Context) *Sense
SaveX calls Save and panics if Save returns an error.
func (*SenseCreate) SetID ¶
func (sc *SenseCreate) SetID(s string) *SenseCreate
SetID sets the "id" field.
func (*SenseCreate) SetLemma ¶
func (sc *SenseCreate) SetLemma(l *Lemma) *SenseCreate
SetLemma sets the "lemma" edge to the Lemma entity.
func (*SenseCreate) SetLemmaID ¶
func (sc *SenseCreate) SetLemmaID(id string) *SenseCreate
SetLemmaID sets the "lemma" edge to the Lemma entity by ID.
func (*SenseCreate) SetNillableLemmaID ¶
func (sc *SenseCreate) SetNillableLemmaID(id *string) *SenseCreate
SetNillableLemmaID sets the "lemma" edge to the Lemma entity by ID if the given value is not nil.
func (*SenseCreate) SetNillableSynsetID ¶
func (sc *SenseCreate) SetNillableSynsetID(id *string) *SenseCreate
SetNillableSynsetID sets the "synset" edge to the Synset entity by ID if the given value is not nil.
func (*SenseCreate) SetSynset ¶
func (sc *SenseCreate) SetSynset(s *Synset) *SenseCreate
SetSynset sets the "synset" edge to the Synset entity.
func (*SenseCreate) SetSynsetID ¶
func (sc *SenseCreate) SetSynsetID(id string) *SenseCreate
SetSynsetID sets the "synset" edge to the Synset entity by ID.
type SenseCreateBulk ¶
type SenseCreateBulk struct {
// contains filtered or unexported fields
}
SenseCreateBulk is the builder for creating many Sense entities in bulk.
func (*SenseCreateBulk) Exec ¶
func (scb *SenseCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SenseCreateBulk) ExecX ¶
func (scb *SenseCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SenseDelete ¶
type SenseDelete struct {
// contains filtered or unexported fields
}
SenseDelete is the builder for deleting a Sense entity.
func (*SenseDelete) Exec ¶
func (sd *SenseDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SenseDelete) ExecX ¶
func (sd *SenseDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SenseDelete) Where ¶
func (sd *SenseDelete) Where(ps ...predicate.Sense) *SenseDelete
Where appends a list predicates to the SenseDelete builder.
type SenseDeleteOne ¶
type SenseDeleteOne struct {
// contains filtered or unexported fields
}
SenseDeleteOne is the builder for deleting a single Sense entity.
func (*SenseDeleteOne) Exec ¶
func (sdo *SenseDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SenseDeleteOne) ExecX ¶
func (sdo *SenseDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SenseDeleteOne) Where ¶
func (sdo *SenseDeleteOne) Where(ps ...predicate.Sense) *SenseDeleteOne
Where appends a list predicates to the SenseDelete builder.
type SenseEdges ¶
type SenseEdges struct { // Synset holds the value of the synset edge. Synset *Synset `json:"synset,omitempty"` // Lemma holds the value of the lemma edge. Lemma *Lemma `json:"lemma,omitempty"` // RelFrom holds the value of the relFrom edge. RelFrom []*SenseRelation `json:"relFrom,omitempty"` // RelTo holds the value of the relTo edge. RelTo []*SenseRelation `json:"relTo,omitempty"` // contains filtered or unexported fields }
SenseEdges holds the relations/edges for other nodes in the graph.
func (SenseEdges) LemmaOrErr ¶
func (e SenseEdges) LemmaOrErr() (*Lemma, error)
LemmaOrErr returns the Lemma value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SenseEdges) RelFromOrErr ¶
func (e SenseEdges) RelFromOrErr() ([]*SenseRelation, error)
RelFromOrErr returns the RelFrom value or an error if the edge was not loaded in eager-loading.
func (SenseEdges) RelToOrErr ¶
func (e SenseEdges) RelToOrErr() ([]*SenseRelation, error)
RelToOrErr returns the RelTo value or an error if the edge was not loaded in eager-loading.
func (SenseEdges) SynsetOrErr ¶
func (e SenseEdges) SynsetOrErr() (*Synset, error)
SynsetOrErr returns the Synset value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SenseGroupBy ¶
type SenseGroupBy struct {
// contains filtered or unexported fields
}
SenseGroupBy is the group-by builder for Sense entities.
func (*SenseGroupBy) Aggregate ¶
func (sgb *SenseGroupBy) Aggregate(fns ...AggregateFunc) *SenseGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SenseGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SenseGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SenseGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SenseGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SenseGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SenseGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SenseGroupBy) Scan ¶
func (sgb *SenseGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SenseGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SenseMutation ¶
type SenseMutation struct {
// contains filtered or unexported fields
}
SenseMutation represents an operation that mutates the Sense nodes in the graph.
func (*SenseMutation) AddField ¶
func (m *SenseMutation) 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 (*SenseMutation) AddRelFromIDs ¶
func (m *SenseMutation) AddRelFromIDs(ids ...int)
AddRelFromIDs adds the "relFrom" edge to the SenseRelation entity by ids.
func (*SenseMutation) AddRelToIDs ¶
func (m *SenseMutation) AddRelToIDs(ids ...int)
AddRelToIDs adds the "relTo" edge to the SenseRelation entity by ids.
func (*SenseMutation) AddedEdges ¶
func (m *SenseMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SenseMutation) AddedField ¶
func (m *SenseMutation) 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 (*SenseMutation) AddedFields ¶
func (m *SenseMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SenseMutation) AddedIDs ¶
func (m *SenseMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SenseMutation) ClearEdge ¶
func (m *SenseMutation) 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 (*SenseMutation) ClearField ¶
func (m *SenseMutation) 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 (*SenseMutation) ClearLemma ¶
func (m *SenseMutation) ClearLemma()
ClearLemma clears the "lemma" edge to the Lemma entity.
func (*SenseMutation) ClearRelFrom ¶
func (m *SenseMutation) ClearRelFrom()
ClearRelFrom clears the "relFrom" edge to the SenseRelation entity.
func (*SenseMutation) ClearRelTo ¶
func (m *SenseMutation) ClearRelTo()
ClearRelTo clears the "relTo" edge to the SenseRelation entity.
func (*SenseMutation) ClearSynset ¶
func (m *SenseMutation) ClearSynset()
ClearSynset clears the "synset" edge to the Synset entity.
func (*SenseMutation) ClearedEdges ¶
func (m *SenseMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SenseMutation) ClearedFields ¶
func (m *SenseMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SenseMutation) Client ¶
func (m SenseMutation) 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 (*SenseMutation) EdgeCleared ¶
func (m *SenseMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SenseMutation) Field ¶
func (m *SenseMutation) 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 (*SenseMutation) FieldCleared ¶
func (m *SenseMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SenseMutation) Fields ¶
func (m *SenseMutation) 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 (*SenseMutation) ID ¶
func (m *SenseMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SenseMutation) IDs ¶
func (m *SenseMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SenseMutation) LemmaCleared ¶
func (m *SenseMutation) LemmaCleared() bool
LemmaCleared reports if the "lemma" edge to the Lemma entity was cleared.
func (*SenseMutation) LemmaID ¶
func (m *SenseMutation) LemmaID() (id string, exists bool)
LemmaID returns the "lemma" edge ID in the mutation.
func (*SenseMutation) LemmaIDs ¶
func (m *SenseMutation) LemmaIDs() (ids []string)
LemmaIDs returns the "lemma" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use LemmaID instead. It exists only for internal usage by the builders.
func (*SenseMutation) 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 (*SenseMutation) RelFromCleared ¶
func (m *SenseMutation) RelFromCleared() bool
RelFromCleared reports if the "relFrom" edge to the SenseRelation entity was cleared.
func (*SenseMutation) RelFromIDs ¶
func (m *SenseMutation) RelFromIDs() (ids []int)
RelFromIDs returns the "relFrom" edge IDs in the mutation.
func (*SenseMutation) RelToCleared ¶
func (m *SenseMutation) RelToCleared() bool
RelToCleared reports if the "relTo" edge to the SenseRelation entity was cleared.
func (*SenseMutation) RelToIDs ¶
func (m *SenseMutation) RelToIDs() (ids []int)
RelToIDs returns the "relTo" edge IDs in the mutation.
func (*SenseMutation) RemoveRelFromIDs ¶
func (m *SenseMutation) RemoveRelFromIDs(ids ...int)
RemoveRelFromIDs removes the "relFrom" edge to the SenseRelation entity by IDs.
func (*SenseMutation) RemoveRelToIDs ¶
func (m *SenseMutation) RemoveRelToIDs(ids ...int)
RemoveRelToIDs removes the "relTo" edge to the SenseRelation entity by IDs.
func (*SenseMutation) RemovedEdges ¶
func (m *SenseMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SenseMutation) RemovedIDs ¶
func (m *SenseMutation) 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 (*SenseMutation) RemovedRelFromIDs ¶
func (m *SenseMutation) RemovedRelFromIDs() (ids []int)
RemovedRelFrom returns the removed IDs of the "relFrom" edge to the SenseRelation entity.
func (*SenseMutation) RemovedRelToIDs ¶
func (m *SenseMutation) RemovedRelToIDs() (ids []int)
RemovedRelTo returns the removed IDs of the "relTo" edge to the SenseRelation entity.
func (*SenseMutation) ResetEdge ¶
func (m *SenseMutation) 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 (*SenseMutation) ResetField ¶
func (m *SenseMutation) 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 (*SenseMutation) ResetLemma ¶
func (m *SenseMutation) ResetLemma()
ResetLemma resets all changes to the "lemma" edge.
func (*SenseMutation) ResetRelFrom ¶
func (m *SenseMutation) ResetRelFrom()
ResetRelFrom resets all changes to the "relFrom" edge.
func (*SenseMutation) ResetRelTo ¶
func (m *SenseMutation) ResetRelTo()
ResetRelTo resets all changes to the "relTo" edge.
func (*SenseMutation) ResetSynset ¶
func (m *SenseMutation) ResetSynset()
ResetSynset resets all changes to the "synset" edge.
func (*SenseMutation) SetField ¶
func (m *SenseMutation) 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 (*SenseMutation) SetID ¶
func (m *SenseMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Sense entities.
func (*SenseMutation) SetLemmaID ¶
func (m *SenseMutation) SetLemmaID(id string)
SetLemmaID sets the "lemma" edge to the Lemma entity by id.
func (*SenseMutation) SetOp ¶
func (m *SenseMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SenseMutation) SetSynsetID ¶
func (m *SenseMutation) SetSynsetID(id string)
SetSynsetID sets the "synset" edge to the Synset entity by id.
func (*SenseMutation) SynsetCleared ¶
func (m *SenseMutation) SynsetCleared() bool
SynsetCleared reports if the "synset" edge to the Synset entity was cleared.
func (*SenseMutation) SynsetID ¶
func (m *SenseMutation) SynsetID() (id string, exists bool)
SynsetID returns the "synset" edge ID in the mutation.
func (*SenseMutation) SynsetIDs ¶
func (m *SenseMutation) SynsetIDs() (ids []string)
SynsetIDs returns the "synset" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SynsetID instead. It exists only for internal usage by the builders.
func (SenseMutation) Tx ¶
func (m SenseMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SenseMutation) Type ¶
func (m *SenseMutation) Type() string
Type returns the node type of this mutation (Sense).
func (*SenseMutation) Where ¶
func (m *SenseMutation) Where(ps ...predicate.Sense)
Where appends a list predicates to the SenseMutation builder.
func (*SenseMutation) WhereP ¶
func (m *SenseMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SenseMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SenseQuery ¶
type SenseQuery struct {
// contains filtered or unexported fields
}
SenseQuery is the builder for querying Sense entities.
func (*SenseQuery) Aggregate ¶
func (sq *SenseQuery) Aggregate(fns ...AggregateFunc) *SenseSelect
Aggregate returns a SenseSelect configured with the given aggregations.
func (*SenseQuery) All ¶
func (sq *SenseQuery) All(ctx context.Context) ([]*Sense, error)
All executes the query and returns a list of Senses.
func (*SenseQuery) AllX ¶
func (sq *SenseQuery) AllX(ctx context.Context) []*Sense
AllX is like All, but panics if an error occurs.
func (*SenseQuery) Clone ¶
func (sq *SenseQuery) Clone() *SenseQuery
Clone returns a duplicate of the SenseQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SenseQuery) Count ¶
func (sq *SenseQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SenseQuery) CountX ¶
func (sq *SenseQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SenseQuery) Exist ¶
func (sq *SenseQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SenseQuery) ExistX ¶
func (sq *SenseQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SenseQuery) First ¶
func (sq *SenseQuery) First(ctx context.Context) (*Sense, error)
First returns the first Sense entity from the query. Returns a *NotFoundError when no Sense was found.
func (*SenseQuery) FirstID ¶
func (sq *SenseQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Sense ID from the query. Returns a *NotFoundError when no Sense ID was found.
func (*SenseQuery) FirstIDX ¶
func (sq *SenseQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*SenseQuery) FirstX ¶
func (sq *SenseQuery) FirstX(ctx context.Context) *Sense
FirstX is like First, but panics if an error occurs.
func (*SenseQuery) GroupBy ¶
func (sq *SenseQuery) GroupBy(field string, fields ...string) *SenseGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
func (*SenseQuery) IDs ¶
func (sq *SenseQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of Sense IDs.
func (*SenseQuery) IDsX ¶
func (sq *SenseQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*SenseQuery) Limit ¶
func (sq *SenseQuery) Limit(limit int) *SenseQuery
Limit the number of records to be returned by this query.
func (*SenseQuery) Offset ¶
func (sq *SenseQuery) Offset(offset int) *SenseQuery
Offset to start from.
func (*SenseQuery) Only ¶
func (sq *SenseQuery) Only(ctx context.Context) (*Sense, error)
Only returns a single Sense entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Sense entity is found. Returns a *NotFoundError when no Sense entities are found.
func (*SenseQuery) OnlyID ¶
func (sq *SenseQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Sense ID in the query. Returns a *NotSingularError when more than one Sense ID is found. Returns a *NotFoundError when no entities are found.
func (*SenseQuery) OnlyIDX ¶
func (sq *SenseQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SenseQuery) OnlyX ¶
func (sq *SenseQuery) OnlyX(ctx context.Context) *Sense
OnlyX is like Only, but panics if an error occurs.
func (*SenseQuery) Order ¶
func (sq *SenseQuery) Order(o ...sense.OrderOption) *SenseQuery
Order specifies how the records should be ordered.
func (*SenseQuery) QueryLemma ¶
func (sq *SenseQuery) QueryLemma() *LemmaQuery
QueryLemma chains the current query on the "lemma" edge.
func (*SenseQuery) QueryRelFrom ¶
func (sq *SenseQuery) QueryRelFrom() *SenseRelationQuery
QueryRelFrom chains the current query on the "relFrom" edge.
func (*SenseQuery) QueryRelTo ¶
func (sq *SenseQuery) QueryRelTo() *SenseRelationQuery
QueryRelTo chains the current query on the "relTo" edge.
func (*SenseQuery) QuerySynset ¶
func (sq *SenseQuery) QuerySynset() *SynsetQuery
QuerySynset chains the current query on the "synset" edge.
func (*SenseQuery) Select ¶
func (sq *SenseQuery) Select(fields ...string) *SenseSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*SenseQuery) Unique ¶
func (sq *SenseQuery) Unique(unique bool) *SenseQuery
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 (*SenseQuery) Where ¶
func (sq *SenseQuery) Where(ps ...predicate.Sense) *SenseQuery
Where adds a new predicate for the SenseQuery builder.
func (*SenseQuery) WithLemma ¶
func (sq *SenseQuery) WithLemma(opts ...func(*LemmaQuery)) *SenseQuery
WithLemma tells the query-builder to eager-load the nodes that are connected to the "lemma" edge. The optional arguments are used to configure the query builder of the edge.
func (*SenseQuery) WithRelFrom ¶
func (sq *SenseQuery) WithRelFrom(opts ...func(*SenseRelationQuery)) *SenseQuery
WithRelFrom tells the query-builder to eager-load the nodes that are connected to the "relFrom" edge. The optional arguments are used to configure the query builder of the edge.
func (*SenseQuery) WithRelTo ¶
func (sq *SenseQuery) WithRelTo(opts ...func(*SenseRelationQuery)) *SenseQuery
WithRelTo tells the query-builder to eager-load the nodes that are connected to the "relTo" edge. The optional arguments are used to configure the query builder of the edge.
func (*SenseQuery) WithSynset ¶
func (sq *SenseQuery) WithSynset(opts ...func(*SynsetQuery)) *SenseQuery
WithSynset tells the query-builder to eager-load the nodes that are connected to the "synset" edge. The optional arguments are used to configure the query builder of the edge.
type SenseRelation ¶
type SenseRelation struct { // ID of the ent. ID int `json:"id,omitempty"` // RelType holds the value of the "relType" field. RelType string `json:"relType,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SenseRelationQuery when eager-loading is set. Edges SenseRelationEdges `json:"edges"` // contains filtered or unexported fields }
SenseRelation is the model entity for the SenseRelation schema.
func (*SenseRelation) QueryFrom ¶
func (sr *SenseRelation) QueryFrom() *SenseQuery
QueryFrom queries the "from" edge of the SenseRelation entity.
func (*SenseRelation) QueryTo ¶
func (sr *SenseRelation) QueryTo() *SenseQuery
QueryTo queries the "to" edge of the SenseRelation entity.
func (*SenseRelation) String ¶
func (sr *SenseRelation) String() string
String implements the fmt.Stringer.
func (*SenseRelation) Unwrap ¶
func (sr *SenseRelation) Unwrap() *SenseRelation
Unwrap unwraps the SenseRelation 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 (*SenseRelation) Update ¶
func (sr *SenseRelation) Update() *SenseRelationUpdateOne
Update returns a builder for updating this SenseRelation. Note that you need to call SenseRelation.Unwrap() before calling this method if this SenseRelation was returned from a transaction, and the transaction was committed or rolled back.
type SenseRelationClient ¶
type SenseRelationClient struct {
// contains filtered or unexported fields
}
SenseRelationClient is a client for the SenseRelation schema.
func NewSenseRelationClient ¶
func NewSenseRelationClient(c config) *SenseRelationClient
NewSenseRelationClient returns a client for the SenseRelation from the given config.
func (*SenseRelationClient) Create ¶
func (c *SenseRelationClient) Create() *SenseRelationCreate
Create returns a builder for creating a SenseRelation entity.
func (*SenseRelationClient) CreateBulk ¶
func (c *SenseRelationClient) CreateBulk(builders ...*SenseRelationCreate) *SenseRelationCreateBulk
CreateBulk returns a builder for creating a bulk of SenseRelation entities.
func (*SenseRelationClient) Delete ¶
func (c *SenseRelationClient) Delete() *SenseRelationDelete
Delete returns a delete builder for SenseRelation.
func (*SenseRelationClient) DeleteOne ¶
func (c *SenseRelationClient) DeleteOne(sr *SenseRelation) *SenseRelationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SenseRelationClient) DeleteOneID ¶
func (c *SenseRelationClient) DeleteOneID(id int) *SenseRelationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SenseRelationClient) Get ¶
func (c *SenseRelationClient) Get(ctx context.Context, id int) (*SenseRelation, error)
Get returns a SenseRelation entity by its id.
func (*SenseRelationClient) GetX ¶
func (c *SenseRelationClient) GetX(ctx context.Context, id int) *SenseRelation
GetX is like Get, but panics if an error occurs.
func (*SenseRelationClient) Hooks ¶
func (c *SenseRelationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SenseRelationClient) Intercept ¶
func (c *SenseRelationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `senserelation.Intercept(f(g(h())))`.
func (*SenseRelationClient) Interceptors ¶
func (c *SenseRelationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SenseRelationClient) MapCreateBulk ¶
func (c *SenseRelationClient) MapCreateBulk(slice any, setFunc func(*SenseRelationCreate, int)) *SenseRelationCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SenseRelationClient) Query ¶
func (c *SenseRelationClient) Query() *SenseRelationQuery
Query returns a query builder for SenseRelation.
func (*SenseRelationClient) QueryFrom ¶
func (c *SenseRelationClient) QueryFrom(sr *SenseRelation) *SenseQuery
QueryFrom queries the from edge of a SenseRelation.
func (*SenseRelationClient) QueryTo ¶
func (c *SenseRelationClient) QueryTo(sr *SenseRelation) *SenseQuery
QueryTo queries the to edge of a SenseRelation.
func (*SenseRelationClient) Update ¶
func (c *SenseRelationClient) Update() *SenseRelationUpdate
Update returns an update builder for SenseRelation.
func (*SenseRelationClient) UpdateOne ¶
func (c *SenseRelationClient) UpdateOne(sr *SenseRelation) *SenseRelationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SenseRelationClient) UpdateOneID ¶
func (c *SenseRelationClient) UpdateOneID(id int) *SenseRelationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SenseRelationClient) Use ¶
func (c *SenseRelationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `senserelation.Hooks(f(g(h())))`.
type SenseRelationCreate ¶
type SenseRelationCreate struct {
// contains filtered or unexported fields
}
SenseRelationCreate is the builder for creating a SenseRelation entity.
func (*SenseRelationCreate) Exec ¶
func (src *SenseRelationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SenseRelationCreate) ExecX ¶
func (src *SenseRelationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SenseRelationCreate) Mutation ¶
func (src *SenseRelationCreate) Mutation() *SenseRelationMutation
Mutation returns the SenseRelationMutation object of the builder.
func (*SenseRelationCreate) Save ¶
func (src *SenseRelationCreate) Save(ctx context.Context) (*SenseRelation, error)
Save creates the SenseRelation in the database.
func (*SenseRelationCreate) SaveX ¶
func (src *SenseRelationCreate) SaveX(ctx context.Context) *SenseRelation
SaveX calls Save and panics if Save returns an error.
func (*SenseRelationCreate) SetFrom ¶
func (src *SenseRelationCreate) SetFrom(s *Sense) *SenseRelationCreate
SetFrom sets the "from" edge to the Sense entity.
func (*SenseRelationCreate) SetFromID ¶
func (src *SenseRelationCreate) SetFromID(id string) *SenseRelationCreate
SetFromID sets the "from" edge to the Sense entity by ID.
func (*SenseRelationCreate) SetRelType ¶
func (src *SenseRelationCreate) SetRelType(s string) *SenseRelationCreate
SetRelType sets the "relType" field.
func (*SenseRelationCreate) SetTo ¶
func (src *SenseRelationCreate) SetTo(s *Sense) *SenseRelationCreate
SetTo sets the "to" edge to the Sense entity.
func (*SenseRelationCreate) SetToID ¶
func (src *SenseRelationCreate) SetToID(id string) *SenseRelationCreate
SetToID sets the "to" edge to the Sense entity by ID.
type SenseRelationCreateBulk ¶
type SenseRelationCreateBulk struct {
// contains filtered or unexported fields
}
SenseRelationCreateBulk is the builder for creating many SenseRelation entities in bulk.
func (*SenseRelationCreateBulk) Exec ¶
func (srcb *SenseRelationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SenseRelationCreateBulk) ExecX ¶
func (srcb *SenseRelationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SenseRelationCreateBulk) Save ¶
func (srcb *SenseRelationCreateBulk) Save(ctx context.Context) ([]*SenseRelation, error)
Save creates the SenseRelation entities in the database.
func (*SenseRelationCreateBulk) SaveX ¶
func (srcb *SenseRelationCreateBulk) SaveX(ctx context.Context) []*SenseRelation
SaveX is like Save, but panics if an error occurs.
type SenseRelationDelete ¶
type SenseRelationDelete struct {
// contains filtered or unexported fields
}
SenseRelationDelete is the builder for deleting a SenseRelation entity.
func (*SenseRelationDelete) Exec ¶
func (srd *SenseRelationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SenseRelationDelete) ExecX ¶
func (srd *SenseRelationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SenseRelationDelete) Where ¶
func (srd *SenseRelationDelete) Where(ps ...predicate.SenseRelation) *SenseRelationDelete
Where appends a list predicates to the SenseRelationDelete builder.
type SenseRelationDeleteOne ¶
type SenseRelationDeleteOne struct {
// contains filtered or unexported fields
}
SenseRelationDeleteOne is the builder for deleting a single SenseRelation entity.
func (*SenseRelationDeleteOne) Exec ¶
func (srdo *SenseRelationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SenseRelationDeleteOne) ExecX ¶
func (srdo *SenseRelationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SenseRelationDeleteOne) Where ¶
func (srdo *SenseRelationDeleteOne) Where(ps ...predicate.SenseRelation) *SenseRelationDeleteOne
Where appends a list predicates to the SenseRelationDelete builder.
type SenseRelationEdges ¶
type SenseRelationEdges struct { // From holds the value of the from edge. From *Sense `json:"from,omitempty"` // To holds the value of the to edge. To *Sense `json:"to,omitempty"` // contains filtered or unexported fields }
SenseRelationEdges holds the relations/edges for other nodes in the graph.
func (SenseRelationEdges) FromOrErr ¶
func (e SenseRelationEdges) FromOrErr() (*Sense, error)
FromOrErr returns the From value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SenseRelationEdges) ToOrErr ¶
func (e SenseRelationEdges) ToOrErr() (*Sense, error)
ToOrErr returns the To value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SenseRelationGroupBy ¶
type SenseRelationGroupBy struct {
// contains filtered or unexported fields
}
SenseRelationGroupBy is the group-by builder for SenseRelation entities.
func (*SenseRelationGroupBy) Aggregate ¶
func (srgb *SenseRelationGroupBy) Aggregate(fns ...AggregateFunc) *SenseRelationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SenseRelationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SenseRelationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SenseRelationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SenseRelationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SenseRelationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SenseRelationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SenseRelationGroupBy) Scan ¶
func (srgb *SenseRelationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SenseRelationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SenseRelationMutation ¶
type SenseRelationMutation struct {
// contains filtered or unexported fields
}
SenseRelationMutation represents an operation that mutates the SenseRelation nodes in the graph.
func (*SenseRelationMutation) AddField ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) AddedEdges ¶
func (m *SenseRelationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SenseRelationMutation) AddedField ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) AddedFields ¶
func (m *SenseRelationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SenseRelationMutation) AddedIDs ¶
func (m *SenseRelationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SenseRelationMutation) ClearEdge ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) ClearField ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) ClearFrom ¶
func (m *SenseRelationMutation) ClearFrom()
ClearFrom clears the "from" edge to the Sense entity.
func (*SenseRelationMutation) ClearTo ¶
func (m *SenseRelationMutation) ClearTo()
ClearTo clears the "to" edge to the Sense entity.
func (*SenseRelationMutation) ClearedEdges ¶
func (m *SenseRelationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SenseRelationMutation) ClearedFields ¶
func (m *SenseRelationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SenseRelationMutation) Client ¶
func (m SenseRelationMutation) 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 (*SenseRelationMutation) EdgeCleared ¶
func (m *SenseRelationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SenseRelationMutation) Field ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) FieldCleared ¶
func (m *SenseRelationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SenseRelationMutation) Fields ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) FromCleared ¶
func (m *SenseRelationMutation) FromCleared() bool
FromCleared reports if the "from" edge to the Sense entity was cleared.
func (*SenseRelationMutation) FromID ¶
func (m *SenseRelationMutation) FromID() (id string, exists bool)
FromID returns the "from" edge ID in the mutation.
func (*SenseRelationMutation) FromIDs ¶
func (m *SenseRelationMutation) FromIDs() (ids []string)
FromIDs returns the "from" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FromID instead. It exists only for internal usage by the builders.
func (*SenseRelationMutation) ID ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) IDs ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) 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 (*SenseRelationMutation) OldRelType ¶
func (m *SenseRelationMutation) OldRelType(ctx context.Context) (v string, err error)
OldRelType returns the old "relType" field's value of the SenseRelation entity. If the SenseRelation 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 (*SenseRelationMutation) Op ¶
func (m *SenseRelationMutation) Op() Op
Op returns the operation name.
func (*SenseRelationMutation) RelType ¶
func (m *SenseRelationMutation) RelType() (r string, exists bool)
RelType returns the value of the "relType" field in the mutation.
func (*SenseRelationMutation) RemovedEdges ¶
func (m *SenseRelationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SenseRelationMutation) RemovedIDs ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) ResetEdge ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) ResetField ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) ResetFrom ¶
func (m *SenseRelationMutation) ResetFrom()
ResetFrom resets all changes to the "from" edge.
func (*SenseRelationMutation) ResetRelType ¶
func (m *SenseRelationMutation) ResetRelType()
ResetRelType resets all changes to the "relType" field.
func (*SenseRelationMutation) ResetTo ¶
func (m *SenseRelationMutation) ResetTo()
ResetTo resets all changes to the "to" edge.
func (*SenseRelationMutation) SetField ¶
func (m *SenseRelationMutation) 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 (*SenseRelationMutation) SetFromID ¶
func (m *SenseRelationMutation) SetFromID(id string)
SetFromID sets the "from" edge to the Sense entity by id.
func (*SenseRelationMutation) SetOp ¶
func (m *SenseRelationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SenseRelationMutation) SetRelType ¶
func (m *SenseRelationMutation) SetRelType(s string)
SetRelType sets the "relType" field.
func (*SenseRelationMutation) SetToID ¶
func (m *SenseRelationMutation) SetToID(id string)
SetToID sets the "to" edge to the Sense entity by id.
func (*SenseRelationMutation) ToCleared ¶
func (m *SenseRelationMutation) ToCleared() bool
ToCleared reports if the "to" edge to the Sense entity was cleared.
func (*SenseRelationMutation) ToID ¶
func (m *SenseRelationMutation) ToID() (id string, exists bool)
ToID returns the "to" edge ID in the mutation.
func (*SenseRelationMutation) ToIDs ¶
func (m *SenseRelationMutation) ToIDs() (ids []string)
ToIDs returns the "to" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ToID instead. It exists only for internal usage by the builders.
func (SenseRelationMutation) Tx ¶
func (m SenseRelationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SenseRelationMutation) Type ¶
func (m *SenseRelationMutation) Type() string
Type returns the node type of this mutation (SenseRelation).
func (*SenseRelationMutation) Where ¶
func (m *SenseRelationMutation) Where(ps ...predicate.SenseRelation)
Where appends a list predicates to the SenseRelationMutation builder.
func (*SenseRelationMutation) WhereP ¶
func (m *SenseRelationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SenseRelationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SenseRelationQuery ¶
type SenseRelationQuery struct {
// contains filtered or unexported fields
}
SenseRelationQuery is the builder for querying SenseRelation entities.
func (*SenseRelationQuery) Aggregate ¶
func (srq *SenseRelationQuery) Aggregate(fns ...AggregateFunc) *SenseRelationSelect
Aggregate returns a SenseRelationSelect configured with the given aggregations.
func (*SenseRelationQuery) All ¶
func (srq *SenseRelationQuery) All(ctx context.Context) ([]*SenseRelation, error)
All executes the query and returns a list of SenseRelations.
func (*SenseRelationQuery) AllX ¶
func (srq *SenseRelationQuery) AllX(ctx context.Context) []*SenseRelation
AllX is like All, but panics if an error occurs.
func (*SenseRelationQuery) Clone ¶
func (srq *SenseRelationQuery) Clone() *SenseRelationQuery
Clone returns a duplicate of the SenseRelationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SenseRelationQuery) Count ¶
func (srq *SenseRelationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SenseRelationQuery) CountX ¶
func (srq *SenseRelationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SenseRelationQuery) Exist ¶
func (srq *SenseRelationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SenseRelationQuery) ExistX ¶
func (srq *SenseRelationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SenseRelationQuery) First ¶
func (srq *SenseRelationQuery) First(ctx context.Context) (*SenseRelation, error)
First returns the first SenseRelation entity from the query. Returns a *NotFoundError when no SenseRelation was found.
func (*SenseRelationQuery) FirstID ¶
func (srq *SenseRelationQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first SenseRelation ID from the query. Returns a *NotFoundError when no SenseRelation ID was found.
func (*SenseRelationQuery) FirstIDX ¶
func (srq *SenseRelationQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SenseRelationQuery) FirstX ¶
func (srq *SenseRelationQuery) FirstX(ctx context.Context) *SenseRelation
FirstX is like First, but panics if an error occurs.
func (*SenseRelationQuery) GroupBy ¶
func (srq *SenseRelationQuery) GroupBy(field string, fields ...string) *SenseRelationGroupBy
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 { RelType string `json:"relType,omitempty"` Count int `json:"count,omitempty"` } client.SenseRelation.Query(). GroupBy(senserelation.FieldRelType). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SenseRelationQuery) IDs ¶
func (srq *SenseRelationQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of SenseRelation IDs.
func (*SenseRelationQuery) IDsX ¶
func (srq *SenseRelationQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SenseRelationQuery) Limit ¶
func (srq *SenseRelationQuery) Limit(limit int) *SenseRelationQuery
Limit the number of records to be returned by this query.
func (*SenseRelationQuery) Offset ¶
func (srq *SenseRelationQuery) Offset(offset int) *SenseRelationQuery
Offset to start from.
func (*SenseRelationQuery) Only ¶
func (srq *SenseRelationQuery) Only(ctx context.Context) (*SenseRelation, error)
Only returns a single SenseRelation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SenseRelation entity is found. Returns a *NotFoundError when no SenseRelation entities are found.
func (*SenseRelationQuery) OnlyID ¶
func (srq *SenseRelationQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only SenseRelation ID in the query. Returns a *NotSingularError when more than one SenseRelation ID is found. Returns a *NotFoundError when no entities are found.
func (*SenseRelationQuery) OnlyIDX ¶
func (srq *SenseRelationQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SenseRelationQuery) OnlyX ¶
func (srq *SenseRelationQuery) OnlyX(ctx context.Context) *SenseRelation
OnlyX is like Only, but panics if an error occurs.
func (*SenseRelationQuery) Order ¶
func (srq *SenseRelationQuery) Order(o ...senserelation.OrderOption) *SenseRelationQuery
Order specifies how the records should be ordered.
func (*SenseRelationQuery) QueryFrom ¶
func (srq *SenseRelationQuery) QueryFrom() *SenseQuery
QueryFrom chains the current query on the "from" edge.
func (*SenseRelationQuery) QueryTo ¶
func (srq *SenseRelationQuery) QueryTo() *SenseQuery
QueryTo chains the current query on the "to" edge.
func (*SenseRelationQuery) Select ¶
func (srq *SenseRelationQuery) Select(fields ...string) *SenseRelationSelect
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 { RelType string `json:"relType,omitempty"` } client.SenseRelation.Query(). Select(senserelation.FieldRelType). Scan(ctx, &v)
func (*SenseRelationQuery) Unique ¶
func (srq *SenseRelationQuery) Unique(unique bool) *SenseRelationQuery
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 (*SenseRelationQuery) Where ¶
func (srq *SenseRelationQuery) Where(ps ...predicate.SenseRelation) *SenseRelationQuery
Where adds a new predicate for the SenseRelationQuery builder.
func (*SenseRelationQuery) WithFrom ¶
func (srq *SenseRelationQuery) WithFrom(opts ...func(*SenseQuery)) *SenseRelationQuery
WithFrom tells the query-builder to eager-load the nodes that are connected to the "from" edge. The optional arguments are used to configure the query builder of the edge.
func (*SenseRelationQuery) WithTo ¶
func (srq *SenseRelationQuery) WithTo(opts ...func(*SenseQuery)) *SenseRelationQuery
WithTo tells the query-builder to eager-load the nodes that are connected to the "to" edge. The optional arguments are used to configure the query builder of the edge.
type SenseRelationSelect ¶
type SenseRelationSelect struct { *SenseRelationQuery // contains filtered or unexported fields }
SenseRelationSelect is the builder for selecting fields of SenseRelation entities.
func (*SenseRelationSelect) Aggregate ¶
func (srs *SenseRelationSelect) Aggregate(fns ...AggregateFunc) *SenseRelationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SenseRelationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SenseRelationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SenseRelationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SenseRelationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SenseRelationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SenseRelationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SenseRelationSelect) Scan ¶
func (srs *SenseRelationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SenseRelationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SenseRelationUpdate ¶
type SenseRelationUpdate struct {
// contains filtered or unexported fields
}
SenseRelationUpdate is the builder for updating SenseRelation entities.
func (*SenseRelationUpdate) ClearFrom ¶
func (sru *SenseRelationUpdate) ClearFrom() *SenseRelationUpdate
ClearFrom clears the "from" edge to the Sense entity.
func (*SenseRelationUpdate) ClearTo ¶
func (sru *SenseRelationUpdate) ClearTo() *SenseRelationUpdate
ClearTo clears the "to" edge to the Sense entity.
func (*SenseRelationUpdate) Exec ¶
func (sru *SenseRelationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SenseRelationUpdate) ExecX ¶
func (sru *SenseRelationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SenseRelationUpdate) Mutation ¶
func (sru *SenseRelationUpdate) Mutation() *SenseRelationMutation
Mutation returns the SenseRelationMutation object of the builder.
func (*SenseRelationUpdate) Save ¶
func (sru *SenseRelationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SenseRelationUpdate) SaveX ¶
func (sru *SenseRelationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SenseRelationUpdate) SetFrom ¶
func (sru *SenseRelationUpdate) SetFrom(s *Sense) *SenseRelationUpdate
SetFrom sets the "from" edge to the Sense entity.
func (*SenseRelationUpdate) SetFromID ¶
func (sru *SenseRelationUpdate) SetFromID(id string) *SenseRelationUpdate
SetFromID sets the "from" edge to the Sense entity by ID.
func (*SenseRelationUpdate) SetNillableRelType ¶
func (sru *SenseRelationUpdate) SetNillableRelType(s *string) *SenseRelationUpdate
SetNillableRelType sets the "relType" field if the given value is not nil.
func (*SenseRelationUpdate) SetRelType ¶
func (sru *SenseRelationUpdate) SetRelType(s string) *SenseRelationUpdate
SetRelType sets the "relType" field.
func (*SenseRelationUpdate) SetTo ¶
func (sru *SenseRelationUpdate) SetTo(s *Sense) *SenseRelationUpdate
SetTo sets the "to" edge to the Sense entity.
func (*SenseRelationUpdate) SetToID ¶
func (sru *SenseRelationUpdate) SetToID(id string) *SenseRelationUpdate
SetToID sets the "to" edge to the Sense entity by ID.
func (*SenseRelationUpdate) Where ¶
func (sru *SenseRelationUpdate) Where(ps ...predicate.SenseRelation) *SenseRelationUpdate
Where appends a list predicates to the SenseRelationUpdate builder.
type SenseRelationUpdateOne ¶
type SenseRelationUpdateOne struct {
// contains filtered or unexported fields
}
SenseRelationUpdateOne is the builder for updating a single SenseRelation entity.
func (*SenseRelationUpdateOne) ClearFrom ¶
func (sruo *SenseRelationUpdateOne) ClearFrom() *SenseRelationUpdateOne
ClearFrom clears the "from" edge to the Sense entity.
func (*SenseRelationUpdateOne) ClearTo ¶
func (sruo *SenseRelationUpdateOne) ClearTo() *SenseRelationUpdateOne
ClearTo clears the "to" edge to the Sense entity.
func (*SenseRelationUpdateOne) Exec ¶
func (sruo *SenseRelationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SenseRelationUpdateOne) ExecX ¶
func (sruo *SenseRelationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SenseRelationUpdateOne) Mutation ¶
func (sruo *SenseRelationUpdateOne) Mutation() *SenseRelationMutation
Mutation returns the SenseRelationMutation object of the builder.
func (*SenseRelationUpdateOne) Save ¶
func (sruo *SenseRelationUpdateOne) Save(ctx context.Context) (*SenseRelation, error)
Save executes the query and returns the updated SenseRelation entity.
func (*SenseRelationUpdateOne) SaveX ¶
func (sruo *SenseRelationUpdateOne) SaveX(ctx context.Context) *SenseRelation
SaveX is like Save, but panics if an error occurs.
func (*SenseRelationUpdateOne) Select ¶
func (sruo *SenseRelationUpdateOne) Select(field string, fields ...string) *SenseRelationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SenseRelationUpdateOne) SetFrom ¶
func (sruo *SenseRelationUpdateOne) SetFrom(s *Sense) *SenseRelationUpdateOne
SetFrom sets the "from" edge to the Sense entity.
func (*SenseRelationUpdateOne) SetFromID ¶
func (sruo *SenseRelationUpdateOne) SetFromID(id string) *SenseRelationUpdateOne
SetFromID sets the "from" edge to the Sense entity by ID.
func (*SenseRelationUpdateOne) SetNillableRelType ¶
func (sruo *SenseRelationUpdateOne) SetNillableRelType(s *string) *SenseRelationUpdateOne
SetNillableRelType sets the "relType" field if the given value is not nil.
func (*SenseRelationUpdateOne) SetRelType ¶
func (sruo *SenseRelationUpdateOne) SetRelType(s string) *SenseRelationUpdateOne
SetRelType sets the "relType" field.
func (*SenseRelationUpdateOne) SetTo ¶
func (sruo *SenseRelationUpdateOne) SetTo(s *Sense) *SenseRelationUpdateOne
SetTo sets the "to" edge to the Sense entity.
func (*SenseRelationUpdateOne) SetToID ¶
func (sruo *SenseRelationUpdateOne) SetToID(id string) *SenseRelationUpdateOne
SetToID sets the "to" edge to the Sense entity by ID.
func (*SenseRelationUpdateOne) Where ¶
func (sruo *SenseRelationUpdateOne) Where(ps ...predicate.SenseRelation) *SenseRelationUpdateOne
Where appends a list predicates to the SenseRelationUpdate builder.
type SenseRelations ¶
type SenseRelations []*SenseRelation
SenseRelations is a parsable slice of SenseRelation.
type SenseSelect ¶
type SenseSelect struct { *SenseQuery // contains filtered or unexported fields }
SenseSelect is the builder for selecting fields of Sense entities.
func (*SenseSelect) Aggregate ¶
func (ss *SenseSelect) Aggregate(fns ...AggregateFunc) *SenseSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SenseSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SenseSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SenseSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SenseSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SenseSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SenseSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SenseSelect) Scan ¶
func (ss *SenseSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SenseSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SenseUpdate ¶
type SenseUpdate struct {
// contains filtered or unexported fields
}
SenseUpdate is the builder for updating Sense entities.
func (*SenseUpdate) AddRelFrom ¶
func (su *SenseUpdate) AddRelFrom(s ...*SenseRelation) *SenseUpdate
AddRelFrom adds the "relFrom" edges to the SenseRelation entity.
func (*SenseUpdate) AddRelFromIDs ¶
func (su *SenseUpdate) AddRelFromIDs(ids ...int) *SenseUpdate
AddRelFromIDs adds the "relFrom" edge to the SenseRelation entity by IDs.
func (*SenseUpdate) AddRelTo ¶
func (su *SenseUpdate) AddRelTo(s ...*SenseRelation) *SenseUpdate
AddRelTo adds the "relTo" edges to the SenseRelation entity.
func (*SenseUpdate) AddRelToIDs ¶
func (su *SenseUpdate) AddRelToIDs(ids ...int) *SenseUpdate
AddRelToIDs adds the "relTo" edge to the SenseRelation entity by IDs.
func (*SenseUpdate) ClearLemma ¶
func (su *SenseUpdate) ClearLemma() *SenseUpdate
ClearLemma clears the "lemma" edge to the Lemma entity.
func (*SenseUpdate) ClearRelFrom ¶
func (su *SenseUpdate) ClearRelFrom() *SenseUpdate
ClearRelFrom clears all "relFrom" edges to the SenseRelation entity.
func (*SenseUpdate) ClearRelTo ¶
func (su *SenseUpdate) ClearRelTo() *SenseUpdate
ClearRelTo clears all "relTo" edges to the SenseRelation entity.
func (*SenseUpdate) ClearSynset ¶
func (su *SenseUpdate) ClearSynset() *SenseUpdate
ClearSynset clears the "synset" edge to the Synset entity.
func (*SenseUpdate) Exec ¶
func (su *SenseUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SenseUpdate) ExecX ¶
func (su *SenseUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SenseUpdate) Mutation ¶
func (su *SenseUpdate) Mutation() *SenseMutation
Mutation returns the SenseMutation object of the builder.
func (*SenseUpdate) RemoveRelFrom ¶
func (su *SenseUpdate) RemoveRelFrom(s ...*SenseRelation) *SenseUpdate
RemoveRelFrom removes "relFrom" edges to SenseRelation entities.
func (*SenseUpdate) RemoveRelFromIDs ¶
func (su *SenseUpdate) RemoveRelFromIDs(ids ...int) *SenseUpdate
RemoveRelFromIDs removes the "relFrom" edge to SenseRelation entities by IDs.
func (*SenseUpdate) RemoveRelTo ¶
func (su *SenseUpdate) RemoveRelTo(s ...*SenseRelation) *SenseUpdate
RemoveRelTo removes "relTo" edges to SenseRelation entities.
func (*SenseUpdate) RemoveRelToIDs ¶
func (su *SenseUpdate) RemoveRelToIDs(ids ...int) *SenseUpdate
RemoveRelToIDs removes the "relTo" edge to SenseRelation entities by IDs.
func (*SenseUpdate) Save ¶
func (su *SenseUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SenseUpdate) SaveX ¶
func (su *SenseUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SenseUpdate) SetLemma ¶
func (su *SenseUpdate) SetLemma(l *Lemma) *SenseUpdate
SetLemma sets the "lemma" edge to the Lemma entity.
func (*SenseUpdate) SetLemmaID ¶
func (su *SenseUpdate) SetLemmaID(id string) *SenseUpdate
SetLemmaID sets the "lemma" edge to the Lemma entity by ID.
func (*SenseUpdate) SetNillableLemmaID ¶
func (su *SenseUpdate) SetNillableLemmaID(id *string) *SenseUpdate
SetNillableLemmaID sets the "lemma" edge to the Lemma entity by ID if the given value is not nil.
func (*SenseUpdate) SetNillableSynsetID ¶
func (su *SenseUpdate) SetNillableSynsetID(id *string) *SenseUpdate
SetNillableSynsetID sets the "synset" edge to the Synset entity by ID if the given value is not nil.
func (*SenseUpdate) SetSynset ¶
func (su *SenseUpdate) SetSynset(s *Synset) *SenseUpdate
SetSynset sets the "synset" edge to the Synset entity.
func (*SenseUpdate) SetSynsetID ¶
func (su *SenseUpdate) SetSynsetID(id string) *SenseUpdate
SetSynsetID sets the "synset" edge to the Synset entity by ID.
func (*SenseUpdate) Where ¶
func (su *SenseUpdate) Where(ps ...predicate.Sense) *SenseUpdate
Where appends a list predicates to the SenseUpdate builder.
type SenseUpdateOne ¶
type SenseUpdateOne struct {
// contains filtered or unexported fields
}
SenseUpdateOne is the builder for updating a single Sense entity.
func (*SenseUpdateOne) AddRelFrom ¶
func (suo *SenseUpdateOne) AddRelFrom(s ...*SenseRelation) *SenseUpdateOne
AddRelFrom adds the "relFrom" edges to the SenseRelation entity.
func (*SenseUpdateOne) AddRelFromIDs ¶
func (suo *SenseUpdateOne) AddRelFromIDs(ids ...int) *SenseUpdateOne
AddRelFromIDs adds the "relFrom" edge to the SenseRelation entity by IDs.
func (*SenseUpdateOne) AddRelTo ¶
func (suo *SenseUpdateOne) AddRelTo(s ...*SenseRelation) *SenseUpdateOne
AddRelTo adds the "relTo" edges to the SenseRelation entity.
func (*SenseUpdateOne) AddRelToIDs ¶
func (suo *SenseUpdateOne) AddRelToIDs(ids ...int) *SenseUpdateOne
AddRelToIDs adds the "relTo" edge to the SenseRelation entity by IDs.
func (*SenseUpdateOne) ClearLemma ¶
func (suo *SenseUpdateOne) ClearLemma() *SenseUpdateOne
ClearLemma clears the "lemma" edge to the Lemma entity.
func (*SenseUpdateOne) ClearRelFrom ¶
func (suo *SenseUpdateOne) ClearRelFrom() *SenseUpdateOne
ClearRelFrom clears all "relFrom" edges to the SenseRelation entity.
func (*SenseUpdateOne) ClearRelTo ¶
func (suo *SenseUpdateOne) ClearRelTo() *SenseUpdateOne
ClearRelTo clears all "relTo" edges to the SenseRelation entity.
func (*SenseUpdateOne) ClearSynset ¶
func (suo *SenseUpdateOne) ClearSynset() *SenseUpdateOne
ClearSynset clears the "synset" edge to the Synset entity.
func (*SenseUpdateOne) Exec ¶
func (suo *SenseUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SenseUpdateOne) ExecX ¶
func (suo *SenseUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SenseUpdateOne) Mutation ¶
func (suo *SenseUpdateOne) Mutation() *SenseMutation
Mutation returns the SenseMutation object of the builder.
func (*SenseUpdateOne) RemoveRelFrom ¶
func (suo *SenseUpdateOne) RemoveRelFrom(s ...*SenseRelation) *SenseUpdateOne
RemoveRelFrom removes "relFrom" edges to SenseRelation entities.
func (*SenseUpdateOne) RemoveRelFromIDs ¶
func (suo *SenseUpdateOne) RemoveRelFromIDs(ids ...int) *SenseUpdateOne
RemoveRelFromIDs removes the "relFrom" edge to SenseRelation entities by IDs.
func (*SenseUpdateOne) RemoveRelTo ¶
func (suo *SenseUpdateOne) RemoveRelTo(s ...*SenseRelation) *SenseUpdateOne
RemoveRelTo removes "relTo" edges to SenseRelation entities.
func (*SenseUpdateOne) RemoveRelToIDs ¶
func (suo *SenseUpdateOne) RemoveRelToIDs(ids ...int) *SenseUpdateOne
RemoveRelToIDs removes the "relTo" edge to SenseRelation entities by IDs.
func (*SenseUpdateOne) Save ¶
func (suo *SenseUpdateOne) Save(ctx context.Context) (*Sense, error)
Save executes the query and returns the updated Sense entity.
func (*SenseUpdateOne) SaveX ¶
func (suo *SenseUpdateOne) SaveX(ctx context.Context) *Sense
SaveX is like Save, but panics if an error occurs.
func (*SenseUpdateOne) Select ¶
func (suo *SenseUpdateOne) Select(field string, fields ...string) *SenseUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SenseUpdateOne) SetLemma ¶
func (suo *SenseUpdateOne) SetLemma(l *Lemma) *SenseUpdateOne
SetLemma sets the "lemma" edge to the Lemma entity.
func (*SenseUpdateOne) SetLemmaID ¶
func (suo *SenseUpdateOne) SetLemmaID(id string) *SenseUpdateOne
SetLemmaID sets the "lemma" edge to the Lemma entity by ID.
func (*SenseUpdateOne) SetNillableLemmaID ¶
func (suo *SenseUpdateOne) SetNillableLemmaID(id *string) *SenseUpdateOne
SetNillableLemmaID sets the "lemma" edge to the Lemma entity by ID if the given value is not nil.
func (*SenseUpdateOne) SetNillableSynsetID ¶
func (suo *SenseUpdateOne) SetNillableSynsetID(id *string) *SenseUpdateOne
SetNillableSynsetID sets the "synset" edge to the Synset entity by ID if the given value is not nil.
func (*SenseUpdateOne) SetSynset ¶
func (suo *SenseUpdateOne) SetSynset(s *Synset) *SenseUpdateOne
SetSynset sets the "synset" edge to the Synset entity.
func (*SenseUpdateOne) SetSynsetID ¶
func (suo *SenseUpdateOne) SetSynsetID(id string) *SenseUpdateOne
SetSynsetID sets the "synset" edge to the Synset entity by ID.
func (*SenseUpdateOne) Where ¶
func (suo *SenseUpdateOne) Where(ps ...predicate.Sense) *SenseUpdateOne
Where appends a list predicates to the SenseUpdate builder.
type Synset ¶
type Synset struct { // ID of the ent. ID string `json:"id,omitempty"` // PartOfSpeech holds the value of the "partOfSpeech" field. PartOfSpeech string `json:"partOfSpeech,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SynsetQuery when eager-loading is set. Edges SynsetEdges `json:"edges"` // contains filtered or unexported fields }
Synset is the model entity for the Synset schema.
func (*Synset) QueryDefinitions ¶
func (s *Synset) QueryDefinitions() *DefinitionQuery
QueryDefinitions queries the "definitions" edge of the Synset entity.
func (*Synset) QueryRelFrom ¶
func (s *Synset) QueryRelFrom() *SynsetRelationQuery
QueryRelFrom queries the "relFrom" edge of the Synset entity.
func (*Synset) QueryRelTo ¶
func (s *Synset) QueryRelTo() *SynsetRelationQuery
QueryRelTo queries the "relTo" edge of the Synset entity.
func (*Synset) QuerySense ¶
func (s *Synset) QuerySense() *SenseQuery
QuerySense queries the "sense" edge of the Synset entity.
func (*Synset) Unwrap ¶
Unwrap unwraps the Synset 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 (*Synset) Update ¶
func (s *Synset) Update() *SynsetUpdateOne
Update returns a builder for updating this Synset. Note that you need to call Synset.Unwrap() before calling this method if this Synset was returned from a transaction, and the transaction was committed or rolled back.
type SynsetClient ¶
type SynsetClient struct {
// contains filtered or unexported fields
}
SynsetClient is a client for the Synset schema.
func NewSynsetClient ¶
func NewSynsetClient(c config) *SynsetClient
NewSynsetClient returns a client for the Synset from the given config.
func (*SynsetClient) Create ¶
func (c *SynsetClient) Create() *SynsetCreate
Create returns a builder for creating a Synset entity.
func (*SynsetClient) CreateBulk ¶
func (c *SynsetClient) CreateBulk(builders ...*SynsetCreate) *SynsetCreateBulk
CreateBulk returns a builder for creating a bulk of Synset entities.
func (*SynsetClient) Delete ¶
func (c *SynsetClient) Delete() *SynsetDelete
Delete returns a delete builder for Synset.
func (*SynsetClient) DeleteOne ¶
func (c *SynsetClient) DeleteOne(s *Synset) *SynsetDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SynsetClient) DeleteOneID ¶
func (c *SynsetClient) DeleteOneID(id string) *SynsetDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SynsetClient) GetX ¶
func (c *SynsetClient) GetX(ctx context.Context, id string) *Synset
GetX is like Get, but panics if an error occurs.
func (*SynsetClient) Intercept ¶
func (c *SynsetClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `synset.Intercept(f(g(h())))`.
func (*SynsetClient) Interceptors ¶
func (c *SynsetClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SynsetClient) MapCreateBulk ¶
func (c *SynsetClient) MapCreateBulk(slice any, setFunc func(*SynsetCreate, int)) *SynsetCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SynsetClient) Query ¶
func (c *SynsetClient) Query() *SynsetQuery
Query returns a query builder for Synset.
func (*SynsetClient) QueryDefinitions ¶
func (c *SynsetClient) QueryDefinitions(s *Synset) *DefinitionQuery
QueryDefinitions queries the definitions edge of a Synset.
func (*SynsetClient) QueryRelFrom ¶
func (c *SynsetClient) QueryRelFrom(s *Synset) *SynsetRelationQuery
QueryRelFrom queries the relFrom edge of a Synset.
func (*SynsetClient) QueryRelTo ¶
func (c *SynsetClient) QueryRelTo(s *Synset) *SynsetRelationQuery
QueryRelTo queries the relTo edge of a Synset.
func (*SynsetClient) QuerySense ¶
func (c *SynsetClient) QuerySense(s *Synset) *SenseQuery
QuerySense queries the sense edge of a Synset.
func (*SynsetClient) Update ¶
func (c *SynsetClient) Update() *SynsetUpdate
Update returns an update builder for Synset.
func (*SynsetClient) UpdateOne ¶
func (c *SynsetClient) UpdateOne(s *Synset) *SynsetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SynsetClient) UpdateOneID ¶
func (c *SynsetClient) UpdateOneID(id string) *SynsetUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SynsetClient) Use ¶
func (c *SynsetClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `synset.Hooks(f(g(h())))`.
type SynsetCreate ¶
type SynsetCreate struct {
// contains filtered or unexported fields
}
SynsetCreate is the builder for creating a Synset entity.
func (*SynsetCreate) AddDefinitionIDs ¶
func (sc *SynsetCreate) AddDefinitionIDs(ids ...int) *SynsetCreate
AddDefinitionIDs adds the "definitions" edge to the Definition entity by IDs.
func (*SynsetCreate) AddDefinitions ¶
func (sc *SynsetCreate) AddDefinitions(d ...*Definition) *SynsetCreate
AddDefinitions adds the "definitions" edges to the Definition entity.
func (*SynsetCreate) AddRelFrom ¶
func (sc *SynsetCreate) AddRelFrom(s ...*SynsetRelation) *SynsetCreate
AddRelFrom adds the "relFrom" edges to the SynsetRelation entity.
func (*SynsetCreate) AddRelFromIDs ¶
func (sc *SynsetCreate) AddRelFromIDs(ids ...int) *SynsetCreate
AddRelFromIDs adds the "relFrom" edge to the SynsetRelation entity by IDs.
func (*SynsetCreate) AddRelTo ¶
func (sc *SynsetCreate) AddRelTo(s ...*SynsetRelation) *SynsetCreate
AddRelTo adds the "relTo" edges to the SynsetRelation entity.
func (*SynsetCreate) AddRelToIDs ¶
func (sc *SynsetCreate) AddRelToIDs(ids ...int) *SynsetCreate
AddRelToIDs adds the "relTo" edge to the SynsetRelation entity by IDs.
func (*SynsetCreate) AddSense ¶
func (sc *SynsetCreate) AddSense(s ...*Sense) *SynsetCreate
AddSense adds the "sense" edges to the Sense entity.
func (*SynsetCreate) AddSenseIDs ¶
func (sc *SynsetCreate) AddSenseIDs(ids ...string) *SynsetCreate
AddSenseIDs adds the "sense" edge to the Sense entity by IDs.
func (*SynsetCreate) Exec ¶
func (sc *SynsetCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SynsetCreate) ExecX ¶
func (sc *SynsetCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SynsetCreate) Mutation ¶
func (sc *SynsetCreate) Mutation() *SynsetMutation
Mutation returns the SynsetMutation object of the builder.
func (*SynsetCreate) Save ¶
func (sc *SynsetCreate) Save(ctx context.Context) (*Synset, error)
Save creates the Synset in the database.
func (*SynsetCreate) SaveX ¶
func (sc *SynsetCreate) SaveX(ctx context.Context) *Synset
SaveX calls Save and panics if Save returns an error.
func (*SynsetCreate) SetID ¶
func (sc *SynsetCreate) SetID(s string) *SynsetCreate
SetID sets the "id" field.
func (*SynsetCreate) SetPartOfSpeech ¶
func (sc *SynsetCreate) SetPartOfSpeech(s string) *SynsetCreate
SetPartOfSpeech sets the "partOfSpeech" field.
type SynsetCreateBulk ¶
type SynsetCreateBulk struct {
// contains filtered or unexported fields
}
SynsetCreateBulk is the builder for creating many Synset entities in bulk.
func (*SynsetCreateBulk) Exec ¶
func (scb *SynsetCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SynsetCreateBulk) ExecX ¶
func (scb *SynsetCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SynsetDelete ¶
type SynsetDelete struct {
// contains filtered or unexported fields
}
SynsetDelete is the builder for deleting a Synset entity.
func (*SynsetDelete) Exec ¶
func (sd *SynsetDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SynsetDelete) ExecX ¶
func (sd *SynsetDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SynsetDelete) Where ¶
func (sd *SynsetDelete) Where(ps ...predicate.Synset) *SynsetDelete
Where appends a list predicates to the SynsetDelete builder.
type SynsetDeleteOne ¶
type SynsetDeleteOne struct {
// contains filtered or unexported fields
}
SynsetDeleteOne is the builder for deleting a single Synset entity.
func (*SynsetDeleteOne) Exec ¶
func (sdo *SynsetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SynsetDeleteOne) ExecX ¶
func (sdo *SynsetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SynsetDeleteOne) Where ¶
func (sdo *SynsetDeleteOne) Where(ps ...predicate.Synset) *SynsetDeleteOne
Where appends a list predicates to the SynsetDelete builder.
type SynsetEdges ¶
type SynsetEdges struct { // Definitions holds the value of the definitions edge. Definitions []*Definition `json:"definitions,omitempty"` // Sense holds the value of the sense edge. Sense []*Sense `json:"sense,omitempty"` // RelFrom holds the value of the relFrom edge. RelFrom []*SynsetRelation `json:"relFrom,omitempty"` // RelTo holds the value of the relTo edge. RelTo []*SynsetRelation `json:"relTo,omitempty"` // contains filtered or unexported fields }
SynsetEdges holds the relations/edges for other nodes in the graph.
func (SynsetEdges) DefinitionsOrErr ¶
func (e SynsetEdges) DefinitionsOrErr() ([]*Definition, error)
DefinitionsOrErr returns the Definitions value or an error if the edge was not loaded in eager-loading.
func (SynsetEdges) RelFromOrErr ¶
func (e SynsetEdges) RelFromOrErr() ([]*SynsetRelation, error)
RelFromOrErr returns the RelFrom value or an error if the edge was not loaded in eager-loading.
func (SynsetEdges) RelToOrErr ¶
func (e SynsetEdges) RelToOrErr() ([]*SynsetRelation, error)
RelToOrErr returns the RelTo value or an error if the edge was not loaded in eager-loading.
func (SynsetEdges) SenseOrErr ¶
func (e SynsetEdges) SenseOrErr() ([]*Sense, error)
SenseOrErr returns the Sense value or an error if the edge was not loaded in eager-loading.
type SynsetGroupBy ¶
type SynsetGroupBy struct {
// contains filtered or unexported fields
}
SynsetGroupBy is the group-by builder for Synset entities.
func (*SynsetGroupBy) Aggregate ¶
func (sgb *SynsetGroupBy) Aggregate(fns ...AggregateFunc) *SynsetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SynsetGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SynsetGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SynsetGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SynsetGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SynsetGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SynsetGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SynsetGroupBy) Scan ¶
func (sgb *SynsetGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SynsetGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SynsetMutation ¶
type SynsetMutation struct {
// contains filtered or unexported fields
}
SynsetMutation represents an operation that mutates the Synset nodes in the graph.
func (*SynsetMutation) AddDefinitionIDs ¶
func (m *SynsetMutation) AddDefinitionIDs(ids ...int)
AddDefinitionIDs adds the "definitions" edge to the Definition entity by ids.
func (*SynsetMutation) AddField ¶
func (m *SynsetMutation) 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 (*SynsetMutation) AddRelFromIDs ¶
func (m *SynsetMutation) AddRelFromIDs(ids ...int)
AddRelFromIDs adds the "relFrom" edge to the SynsetRelation entity by ids.
func (*SynsetMutation) AddRelToIDs ¶
func (m *SynsetMutation) AddRelToIDs(ids ...int)
AddRelToIDs adds the "relTo" edge to the SynsetRelation entity by ids.
func (*SynsetMutation) AddSenseIDs ¶
func (m *SynsetMutation) AddSenseIDs(ids ...string)
AddSenseIDs adds the "sense" edge to the Sense entity by ids.
func (*SynsetMutation) AddedEdges ¶
func (m *SynsetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SynsetMutation) AddedField ¶
func (m *SynsetMutation) 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 (*SynsetMutation) AddedFields ¶
func (m *SynsetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SynsetMutation) AddedIDs ¶
func (m *SynsetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SynsetMutation) ClearDefinitions ¶
func (m *SynsetMutation) ClearDefinitions()
ClearDefinitions clears the "definitions" edge to the Definition entity.
func (*SynsetMutation) ClearEdge ¶
func (m *SynsetMutation) 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 (*SynsetMutation) ClearField ¶
func (m *SynsetMutation) 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 (*SynsetMutation) ClearRelFrom ¶
func (m *SynsetMutation) ClearRelFrom()
ClearRelFrom clears the "relFrom" edge to the SynsetRelation entity.
func (*SynsetMutation) ClearRelTo ¶
func (m *SynsetMutation) ClearRelTo()
ClearRelTo clears the "relTo" edge to the SynsetRelation entity.
func (*SynsetMutation) ClearSense ¶
func (m *SynsetMutation) ClearSense()
ClearSense clears the "sense" edge to the Sense entity.
func (*SynsetMutation) ClearedEdges ¶
func (m *SynsetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SynsetMutation) ClearedFields ¶
func (m *SynsetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SynsetMutation) Client ¶
func (m SynsetMutation) 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 (*SynsetMutation) DefinitionsCleared ¶
func (m *SynsetMutation) DefinitionsCleared() bool
DefinitionsCleared reports if the "definitions" edge to the Definition entity was cleared.
func (*SynsetMutation) DefinitionsIDs ¶
func (m *SynsetMutation) DefinitionsIDs() (ids []int)
DefinitionsIDs returns the "definitions" edge IDs in the mutation.
func (*SynsetMutation) EdgeCleared ¶
func (m *SynsetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SynsetMutation) Field ¶
func (m *SynsetMutation) 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 (*SynsetMutation) FieldCleared ¶
func (m *SynsetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SynsetMutation) Fields ¶
func (m *SynsetMutation) 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 (*SynsetMutation) ID ¶
func (m *SynsetMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SynsetMutation) IDs ¶
func (m *SynsetMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SynsetMutation) 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 (*SynsetMutation) OldPartOfSpeech ¶
func (m *SynsetMutation) OldPartOfSpeech(ctx context.Context) (v string, err error)
OldPartOfSpeech returns the old "partOfSpeech" field's value of the Synset entity. If the Synset 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 (*SynsetMutation) PartOfSpeech ¶
func (m *SynsetMutation) PartOfSpeech() (r string, exists bool)
PartOfSpeech returns the value of the "partOfSpeech" field in the mutation.
func (*SynsetMutation) RelFromCleared ¶
func (m *SynsetMutation) RelFromCleared() bool
RelFromCleared reports if the "relFrom" edge to the SynsetRelation entity was cleared.
func (*SynsetMutation) RelFromIDs ¶
func (m *SynsetMutation) RelFromIDs() (ids []int)
RelFromIDs returns the "relFrom" edge IDs in the mutation.
func (*SynsetMutation) RelToCleared ¶
func (m *SynsetMutation) RelToCleared() bool
RelToCleared reports if the "relTo" edge to the SynsetRelation entity was cleared.
func (*SynsetMutation) RelToIDs ¶
func (m *SynsetMutation) RelToIDs() (ids []int)
RelToIDs returns the "relTo" edge IDs in the mutation.
func (*SynsetMutation) RemoveDefinitionIDs ¶
func (m *SynsetMutation) RemoveDefinitionIDs(ids ...int)
RemoveDefinitionIDs removes the "definitions" edge to the Definition entity by IDs.
func (*SynsetMutation) RemoveRelFromIDs ¶
func (m *SynsetMutation) RemoveRelFromIDs(ids ...int)
RemoveRelFromIDs removes the "relFrom" edge to the SynsetRelation entity by IDs.
func (*SynsetMutation) RemoveRelToIDs ¶
func (m *SynsetMutation) RemoveRelToIDs(ids ...int)
RemoveRelToIDs removes the "relTo" edge to the SynsetRelation entity by IDs.
func (*SynsetMutation) RemoveSenseIDs ¶
func (m *SynsetMutation) RemoveSenseIDs(ids ...string)
RemoveSenseIDs removes the "sense" edge to the Sense entity by IDs.
func (*SynsetMutation) RemovedDefinitionsIDs ¶
func (m *SynsetMutation) RemovedDefinitionsIDs() (ids []int)
RemovedDefinitions returns the removed IDs of the "definitions" edge to the Definition entity.
func (*SynsetMutation) RemovedEdges ¶
func (m *SynsetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SynsetMutation) RemovedIDs ¶
func (m *SynsetMutation) 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 (*SynsetMutation) RemovedRelFromIDs ¶
func (m *SynsetMutation) RemovedRelFromIDs() (ids []int)
RemovedRelFrom returns the removed IDs of the "relFrom" edge to the SynsetRelation entity.
func (*SynsetMutation) RemovedRelToIDs ¶
func (m *SynsetMutation) RemovedRelToIDs() (ids []int)
RemovedRelTo returns the removed IDs of the "relTo" edge to the SynsetRelation entity.
func (*SynsetMutation) RemovedSenseIDs ¶
func (m *SynsetMutation) RemovedSenseIDs() (ids []string)
RemovedSense returns the removed IDs of the "sense" edge to the Sense entity.
func (*SynsetMutation) ResetDefinitions ¶
func (m *SynsetMutation) ResetDefinitions()
ResetDefinitions resets all changes to the "definitions" edge.
func (*SynsetMutation) ResetEdge ¶
func (m *SynsetMutation) 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 (*SynsetMutation) ResetField ¶
func (m *SynsetMutation) 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 (*SynsetMutation) ResetPartOfSpeech ¶
func (m *SynsetMutation) ResetPartOfSpeech()
ResetPartOfSpeech resets all changes to the "partOfSpeech" field.
func (*SynsetMutation) ResetRelFrom ¶
func (m *SynsetMutation) ResetRelFrom()
ResetRelFrom resets all changes to the "relFrom" edge.
func (*SynsetMutation) ResetRelTo ¶
func (m *SynsetMutation) ResetRelTo()
ResetRelTo resets all changes to the "relTo" edge.
func (*SynsetMutation) ResetSense ¶
func (m *SynsetMutation) ResetSense()
ResetSense resets all changes to the "sense" edge.
func (*SynsetMutation) SenseCleared ¶
func (m *SynsetMutation) SenseCleared() bool
SenseCleared reports if the "sense" edge to the Sense entity was cleared.
func (*SynsetMutation) SenseIDs ¶
func (m *SynsetMutation) SenseIDs() (ids []string)
SenseIDs returns the "sense" edge IDs in the mutation.
func (*SynsetMutation) SetField ¶
func (m *SynsetMutation) 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 (*SynsetMutation) SetID ¶
func (m *SynsetMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Synset entities.
func (*SynsetMutation) SetOp ¶
func (m *SynsetMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SynsetMutation) SetPartOfSpeech ¶
func (m *SynsetMutation) SetPartOfSpeech(s string)
SetPartOfSpeech sets the "partOfSpeech" field.
func (SynsetMutation) Tx ¶
func (m SynsetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SynsetMutation) Type ¶
func (m *SynsetMutation) Type() string
Type returns the node type of this mutation (Synset).
func (*SynsetMutation) Where ¶
func (m *SynsetMutation) Where(ps ...predicate.Synset)
Where appends a list predicates to the SynsetMutation builder.
func (*SynsetMutation) WhereP ¶
func (m *SynsetMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SynsetMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SynsetQuery ¶
type SynsetQuery struct {
// contains filtered or unexported fields
}
SynsetQuery is the builder for querying Synset entities.
func (*SynsetQuery) Aggregate ¶
func (sq *SynsetQuery) Aggregate(fns ...AggregateFunc) *SynsetSelect
Aggregate returns a SynsetSelect configured with the given aggregations.
func (*SynsetQuery) All ¶
func (sq *SynsetQuery) All(ctx context.Context) ([]*Synset, error)
All executes the query and returns a list of Synsets.
func (*SynsetQuery) AllX ¶
func (sq *SynsetQuery) AllX(ctx context.Context) []*Synset
AllX is like All, but panics if an error occurs.
func (*SynsetQuery) Clone ¶
func (sq *SynsetQuery) Clone() *SynsetQuery
Clone returns a duplicate of the SynsetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SynsetQuery) Count ¶
func (sq *SynsetQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SynsetQuery) CountX ¶
func (sq *SynsetQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SynsetQuery) Exist ¶
func (sq *SynsetQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SynsetQuery) ExistX ¶
func (sq *SynsetQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SynsetQuery) First ¶
func (sq *SynsetQuery) First(ctx context.Context) (*Synset, error)
First returns the first Synset entity from the query. Returns a *NotFoundError when no Synset was found.
func (*SynsetQuery) FirstID ¶
func (sq *SynsetQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Synset ID from the query. Returns a *NotFoundError when no Synset ID was found.
func (*SynsetQuery) FirstIDX ¶
func (sq *SynsetQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*SynsetQuery) FirstX ¶
func (sq *SynsetQuery) FirstX(ctx context.Context) *Synset
FirstX is like First, but panics if an error occurs.
func (*SynsetQuery) GroupBy ¶
func (sq *SynsetQuery) GroupBy(field string, fields ...string) *SynsetGroupBy
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 { PartOfSpeech string `json:"partOfSpeech,omitempty"` Count int `json:"count,omitempty"` } client.Synset.Query(). GroupBy(synset.FieldPartOfSpeech). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SynsetQuery) IDs ¶
func (sq *SynsetQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of Synset IDs.
func (*SynsetQuery) IDsX ¶
func (sq *SynsetQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*SynsetQuery) Limit ¶
func (sq *SynsetQuery) Limit(limit int) *SynsetQuery
Limit the number of records to be returned by this query.
func (*SynsetQuery) Offset ¶
func (sq *SynsetQuery) Offset(offset int) *SynsetQuery
Offset to start from.
func (*SynsetQuery) Only ¶
func (sq *SynsetQuery) Only(ctx context.Context) (*Synset, error)
Only returns a single Synset entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Synset entity is found. Returns a *NotFoundError when no Synset entities are found.
func (*SynsetQuery) OnlyID ¶
func (sq *SynsetQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Synset ID in the query. Returns a *NotSingularError when more than one Synset ID is found. Returns a *NotFoundError when no entities are found.
func (*SynsetQuery) OnlyIDX ¶
func (sq *SynsetQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SynsetQuery) OnlyX ¶
func (sq *SynsetQuery) OnlyX(ctx context.Context) *Synset
OnlyX is like Only, but panics if an error occurs.
func (*SynsetQuery) Order ¶
func (sq *SynsetQuery) Order(o ...synset.OrderOption) *SynsetQuery
Order specifies how the records should be ordered.
func (*SynsetQuery) QueryDefinitions ¶
func (sq *SynsetQuery) QueryDefinitions() *DefinitionQuery
QueryDefinitions chains the current query on the "definitions" edge.
func (*SynsetQuery) QueryRelFrom ¶
func (sq *SynsetQuery) QueryRelFrom() *SynsetRelationQuery
QueryRelFrom chains the current query on the "relFrom" edge.
func (*SynsetQuery) QueryRelTo ¶
func (sq *SynsetQuery) QueryRelTo() *SynsetRelationQuery
QueryRelTo chains the current query on the "relTo" edge.
func (*SynsetQuery) QuerySense ¶
func (sq *SynsetQuery) QuerySense() *SenseQuery
QuerySense chains the current query on the "sense" edge.
func (*SynsetQuery) Select ¶
func (sq *SynsetQuery) Select(fields ...string) *SynsetSelect
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 { PartOfSpeech string `json:"partOfSpeech,omitempty"` } client.Synset.Query(). Select(synset.FieldPartOfSpeech). Scan(ctx, &v)
func (*SynsetQuery) Unique ¶
func (sq *SynsetQuery) Unique(unique bool) *SynsetQuery
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 (*SynsetQuery) Where ¶
func (sq *SynsetQuery) Where(ps ...predicate.Synset) *SynsetQuery
Where adds a new predicate for the SynsetQuery builder.
func (*SynsetQuery) WithDefinitions ¶
func (sq *SynsetQuery) WithDefinitions(opts ...func(*DefinitionQuery)) *SynsetQuery
WithDefinitions tells the query-builder to eager-load the nodes that are connected to the "definitions" edge. The optional arguments are used to configure the query builder of the edge.
func (*SynsetQuery) WithRelFrom ¶
func (sq *SynsetQuery) WithRelFrom(opts ...func(*SynsetRelationQuery)) *SynsetQuery
WithRelFrom tells the query-builder to eager-load the nodes that are connected to the "relFrom" edge. The optional arguments are used to configure the query builder of the edge.
func (*SynsetQuery) WithRelTo ¶
func (sq *SynsetQuery) WithRelTo(opts ...func(*SynsetRelationQuery)) *SynsetQuery
WithRelTo tells the query-builder to eager-load the nodes that are connected to the "relTo" edge. The optional arguments are used to configure the query builder of the edge.
func (*SynsetQuery) WithSense ¶
func (sq *SynsetQuery) WithSense(opts ...func(*SenseQuery)) *SynsetQuery
WithSense tells the query-builder to eager-load the nodes that are connected to the "sense" edge. The optional arguments are used to configure the query builder of the edge.
type SynsetRelation ¶
type SynsetRelation struct { // ID of the ent. ID int `json:"id,omitempty"` // RelType holds the value of the "relType" field. RelType string `json:"relType,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SynsetRelationQuery when eager-loading is set. Edges SynsetRelationEdges `json:"edges"` // contains filtered or unexported fields }
SynsetRelation is the model entity for the SynsetRelation schema.
func (*SynsetRelation) QueryFrom ¶
func (sr *SynsetRelation) QueryFrom() *SynsetQuery
QueryFrom queries the "from" edge of the SynsetRelation entity.
func (*SynsetRelation) QueryTo ¶
func (sr *SynsetRelation) QueryTo() *SynsetQuery
QueryTo queries the "to" edge of the SynsetRelation entity.
func (*SynsetRelation) String ¶
func (sr *SynsetRelation) String() string
String implements the fmt.Stringer.
func (*SynsetRelation) Unwrap ¶
func (sr *SynsetRelation) Unwrap() *SynsetRelation
Unwrap unwraps the SynsetRelation 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 (*SynsetRelation) Update ¶
func (sr *SynsetRelation) Update() *SynsetRelationUpdateOne
Update returns a builder for updating this SynsetRelation. Note that you need to call SynsetRelation.Unwrap() before calling this method if this SynsetRelation was returned from a transaction, and the transaction was committed or rolled back.
type SynsetRelationClient ¶
type SynsetRelationClient struct {
// contains filtered or unexported fields
}
SynsetRelationClient is a client for the SynsetRelation schema.
func NewSynsetRelationClient ¶
func NewSynsetRelationClient(c config) *SynsetRelationClient
NewSynsetRelationClient returns a client for the SynsetRelation from the given config.
func (*SynsetRelationClient) Create ¶
func (c *SynsetRelationClient) Create() *SynsetRelationCreate
Create returns a builder for creating a SynsetRelation entity.
func (*SynsetRelationClient) CreateBulk ¶
func (c *SynsetRelationClient) CreateBulk(builders ...*SynsetRelationCreate) *SynsetRelationCreateBulk
CreateBulk returns a builder for creating a bulk of SynsetRelation entities.
func (*SynsetRelationClient) Delete ¶
func (c *SynsetRelationClient) Delete() *SynsetRelationDelete
Delete returns a delete builder for SynsetRelation.
func (*SynsetRelationClient) DeleteOne ¶
func (c *SynsetRelationClient) DeleteOne(sr *SynsetRelation) *SynsetRelationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SynsetRelationClient) DeleteOneID ¶
func (c *SynsetRelationClient) DeleteOneID(id int) *SynsetRelationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SynsetRelationClient) Get ¶
func (c *SynsetRelationClient) Get(ctx context.Context, id int) (*SynsetRelation, error)
Get returns a SynsetRelation entity by its id.
func (*SynsetRelationClient) GetX ¶
func (c *SynsetRelationClient) GetX(ctx context.Context, id int) *SynsetRelation
GetX is like Get, but panics if an error occurs.
func (*SynsetRelationClient) Hooks ¶
func (c *SynsetRelationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SynsetRelationClient) Intercept ¶
func (c *SynsetRelationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `synsetrelation.Intercept(f(g(h())))`.
func (*SynsetRelationClient) Interceptors ¶
func (c *SynsetRelationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SynsetRelationClient) MapCreateBulk ¶
func (c *SynsetRelationClient) MapCreateBulk(slice any, setFunc func(*SynsetRelationCreate, int)) *SynsetRelationCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SynsetRelationClient) Query ¶
func (c *SynsetRelationClient) Query() *SynsetRelationQuery
Query returns a query builder for SynsetRelation.
func (*SynsetRelationClient) QueryFrom ¶
func (c *SynsetRelationClient) QueryFrom(sr *SynsetRelation) *SynsetQuery
QueryFrom queries the from edge of a SynsetRelation.
func (*SynsetRelationClient) QueryTo ¶
func (c *SynsetRelationClient) QueryTo(sr *SynsetRelation) *SynsetQuery
QueryTo queries the to edge of a SynsetRelation.
func (*SynsetRelationClient) Update ¶
func (c *SynsetRelationClient) Update() *SynsetRelationUpdate
Update returns an update builder for SynsetRelation.
func (*SynsetRelationClient) UpdateOne ¶
func (c *SynsetRelationClient) UpdateOne(sr *SynsetRelation) *SynsetRelationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SynsetRelationClient) UpdateOneID ¶
func (c *SynsetRelationClient) UpdateOneID(id int) *SynsetRelationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SynsetRelationClient) Use ¶
func (c *SynsetRelationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `synsetrelation.Hooks(f(g(h())))`.
type SynsetRelationCreate ¶
type SynsetRelationCreate struct {
// contains filtered or unexported fields
}
SynsetRelationCreate is the builder for creating a SynsetRelation entity.
func (*SynsetRelationCreate) Exec ¶
func (src *SynsetRelationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SynsetRelationCreate) ExecX ¶
func (src *SynsetRelationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SynsetRelationCreate) Mutation ¶
func (src *SynsetRelationCreate) Mutation() *SynsetRelationMutation
Mutation returns the SynsetRelationMutation object of the builder.
func (*SynsetRelationCreate) Save ¶
func (src *SynsetRelationCreate) Save(ctx context.Context) (*SynsetRelation, error)
Save creates the SynsetRelation in the database.
func (*SynsetRelationCreate) SaveX ¶
func (src *SynsetRelationCreate) SaveX(ctx context.Context) *SynsetRelation
SaveX calls Save and panics if Save returns an error.
func (*SynsetRelationCreate) SetFrom ¶
func (src *SynsetRelationCreate) SetFrom(s *Synset) *SynsetRelationCreate
SetFrom sets the "from" edge to the Synset entity.
func (*SynsetRelationCreate) SetFromID ¶
func (src *SynsetRelationCreate) SetFromID(id string) *SynsetRelationCreate
SetFromID sets the "from" edge to the Synset entity by ID.
func (*SynsetRelationCreate) SetRelType ¶
func (src *SynsetRelationCreate) SetRelType(s string) *SynsetRelationCreate
SetRelType sets the "relType" field.
func (*SynsetRelationCreate) SetTo ¶
func (src *SynsetRelationCreate) SetTo(s *Synset) *SynsetRelationCreate
SetTo sets the "to" edge to the Synset entity.
func (*SynsetRelationCreate) SetToID ¶
func (src *SynsetRelationCreate) SetToID(id string) *SynsetRelationCreate
SetToID sets the "to" edge to the Synset entity by ID.
type SynsetRelationCreateBulk ¶
type SynsetRelationCreateBulk struct {
// contains filtered or unexported fields
}
SynsetRelationCreateBulk is the builder for creating many SynsetRelation entities in bulk.
func (*SynsetRelationCreateBulk) Exec ¶
func (srcb *SynsetRelationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SynsetRelationCreateBulk) ExecX ¶
func (srcb *SynsetRelationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SynsetRelationCreateBulk) Save ¶
func (srcb *SynsetRelationCreateBulk) Save(ctx context.Context) ([]*SynsetRelation, error)
Save creates the SynsetRelation entities in the database.
func (*SynsetRelationCreateBulk) SaveX ¶
func (srcb *SynsetRelationCreateBulk) SaveX(ctx context.Context) []*SynsetRelation
SaveX is like Save, but panics if an error occurs.
type SynsetRelationDelete ¶
type SynsetRelationDelete struct {
// contains filtered or unexported fields
}
SynsetRelationDelete is the builder for deleting a SynsetRelation entity.
func (*SynsetRelationDelete) Exec ¶
func (srd *SynsetRelationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SynsetRelationDelete) ExecX ¶
func (srd *SynsetRelationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SynsetRelationDelete) Where ¶
func (srd *SynsetRelationDelete) Where(ps ...predicate.SynsetRelation) *SynsetRelationDelete
Where appends a list predicates to the SynsetRelationDelete builder.
type SynsetRelationDeleteOne ¶
type SynsetRelationDeleteOne struct {
// contains filtered or unexported fields
}
SynsetRelationDeleteOne is the builder for deleting a single SynsetRelation entity.
func (*SynsetRelationDeleteOne) Exec ¶
func (srdo *SynsetRelationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SynsetRelationDeleteOne) ExecX ¶
func (srdo *SynsetRelationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SynsetRelationDeleteOne) Where ¶
func (srdo *SynsetRelationDeleteOne) Where(ps ...predicate.SynsetRelation) *SynsetRelationDeleteOne
Where appends a list predicates to the SynsetRelationDelete builder.
type SynsetRelationEdges ¶
type SynsetRelationEdges struct { // From holds the value of the from edge. From *Synset `json:"from,omitempty"` // To holds the value of the to edge. To *Synset `json:"to,omitempty"` // contains filtered or unexported fields }
SynsetRelationEdges holds the relations/edges for other nodes in the graph.
func (SynsetRelationEdges) FromOrErr ¶
func (e SynsetRelationEdges) FromOrErr() (*Synset, error)
FromOrErr returns the From value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SynsetRelationEdges) ToOrErr ¶
func (e SynsetRelationEdges) ToOrErr() (*Synset, error)
ToOrErr returns the To value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SynsetRelationGroupBy ¶
type SynsetRelationGroupBy struct {
// contains filtered or unexported fields
}
SynsetRelationGroupBy is the group-by builder for SynsetRelation entities.
func (*SynsetRelationGroupBy) Aggregate ¶
func (srgb *SynsetRelationGroupBy) Aggregate(fns ...AggregateFunc) *SynsetRelationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SynsetRelationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SynsetRelationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SynsetRelationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SynsetRelationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SynsetRelationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*SynsetRelationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SynsetRelationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SynsetRelationGroupBy) Scan ¶
func (srgb *SynsetRelationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SynsetRelationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SynsetRelationMutation ¶
type SynsetRelationMutation struct {
// contains filtered or unexported fields
}
SynsetRelationMutation represents an operation that mutates the SynsetRelation nodes in the graph.
func (*SynsetRelationMutation) AddField ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) AddedEdges ¶
func (m *SynsetRelationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SynsetRelationMutation) AddedField ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) AddedFields ¶
func (m *SynsetRelationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SynsetRelationMutation) AddedIDs ¶
func (m *SynsetRelationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SynsetRelationMutation) ClearEdge ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) ClearField ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) ClearFrom ¶
func (m *SynsetRelationMutation) ClearFrom()
ClearFrom clears the "from" edge to the Synset entity.
func (*SynsetRelationMutation) ClearTo ¶
func (m *SynsetRelationMutation) ClearTo()
ClearTo clears the "to" edge to the Synset entity.
func (*SynsetRelationMutation) ClearedEdges ¶
func (m *SynsetRelationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SynsetRelationMutation) ClearedFields ¶
func (m *SynsetRelationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SynsetRelationMutation) Client ¶
func (m SynsetRelationMutation) 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 (*SynsetRelationMutation) EdgeCleared ¶
func (m *SynsetRelationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SynsetRelationMutation) Field ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) FieldCleared ¶
func (m *SynsetRelationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SynsetRelationMutation) Fields ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) FromCleared ¶
func (m *SynsetRelationMutation) FromCleared() bool
FromCleared reports if the "from" edge to the Synset entity was cleared.
func (*SynsetRelationMutation) FromID ¶
func (m *SynsetRelationMutation) FromID() (id string, exists bool)
FromID returns the "from" edge ID in the mutation.
func (*SynsetRelationMutation) FromIDs ¶
func (m *SynsetRelationMutation) FromIDs() (ids []string)
FromIDs returns the "from" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FromID instead. It exists only for internal usage by the builders.
func (*SynsetRelationMutation) ID ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) IDs ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) 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 (*SynsetRelationMutation) OldRelType ¶
func (m *SynsetRelationMutation) OldRelType(ctx context.Context) (v string, err error)
OldRelType returns the old "relType" field's value of the SynsetRelation entity. If the SynsetRelation 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 (*SynsetRelationMutation) Op ¶
func (m *SynsetRelationMutation) Op() Op
Op returns the operation name.
func (*SynsetRelationMutation) RelType ¶
func (m *SynsetRelationMutation) RelType() (r string, exists bool)
RelType returns the value of the "relType" field in the mutation.
func (*SynsetRelationMutation) RemovedEdges ¶
func (m *SynsetRelationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SynsetRelationMutation) RemovedIDs ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) ResetEdge ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) ResetField ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) ResetFrom ¶
func (m *SynsetRelationMutation) ResetFrom()
ResetFrom resets all changes to the "from" edge.
func (*SynsetRelationMutation) ResetRelType ¶
func (m *SynsetRelationMutation) ResetRelType()
ResetRelType resets all changes to the "relType" field.
func (*SynsetRelationMutation) ResetTo ¶
func (m *SynsetRelationMutation) ResetTo()
ResetTo resets all changes to the "to" edge.
func (*SynsetRelationMutation) SetField ¶
func (m *SynsetRelationMutation) 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 (*SynsetRelationMutation) SetFromID ¶
func (m *SynsetRelationMutation) SetFromID(id string)
SetFromID sets the "from" edge to the Synset entity by id.
func (*SynsetRelationMutation) SetOp ¶
func (m *SynsetRelationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SynsetRelationMutation) SetRelType ¶
func (m *SynsetRelationMutation) SetRelType(s string)
SetRelType sets the "relType" field.
func (*SynsetRelationMutation) SetToID ¶
func (m *SynsetRelationMutation) SetToID(id string)
SetToID sets the "to" edge to the Synset entity by id.
func (*SynsetRelationMutation) ToCleared ¶
func (m *SynsetRelationMutation) ToCleared() bool
ToCleared reports if the "to" edge to the Synset entity was cleared.
func (*SynsetRelationMutation) ToID ¶
func (m *SynsetRelationMutation) ToID() (id string, exists bool)
ToID returns the "to" edge ID in the mutation.
func (*SynsetRelationMutation) ToIDs ¶
func (m *SynsetRelationMutation) ToIDs() (ids []string)
ToIDs returns the "to" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ToID instead. It exists only for internal usage by the builders.
func (SynsetRelationMutation) Tx ¶
func (m SynsetRelationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SynsetRelationMutation) Type ¶
func (m *SynsetRelationMutation) Type() string
Type returns the node type of this mutation (SynsetRelation).
func (*SynsetRelationMutation) Where ¶
func (m *SynsetRelationMutation) Where(ps ...predicate.SynsetRelation)
Where appends a list predicates to the SynsetRelationMutation builder.
func (*SynsetRelationMutation) WhereP ¶
func (m *SynsetRelationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SynsetRelationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SynsetRelationQuery ¶
type SynsetRelationQuery struct {
// contains filtered or unexported fields
}
SynsetRelationQuery is the builder for querying SynsetRelation entities.
func (*SynsetRelationQuery) Aggregate ¶
func (srq *SynsetRelationQuery) Aggregate(fns ...AggregateFunc) *SynsetRelationSelect
Aggregate returns a SynsetRelationSelect configured with the given aggregations.
func (*SynsetRelationQuery) All ¶
func (srq *SynsetRelationQuery) All(ctx context.Context) ([]*SynsetRelation, error)
All executes the query and returns a list of SynsetRelations.
func (*SynsetRelationQuery) AllX ¶
func (srq *SynsetRelationQuery) AllX(ctx context.Context) []*SynsetRelation
AllX is like All, but panics if an error occurs.
func (*SynsetRelationQuery) Clone ¶
func (srq *SynsetRelationQuery) Clone() *SynsetRelationQuery
Clone returns a duplicate of the SynsetRelationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SynsetRelationQuery) Count ¶
func (srq *SynsetRelationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SynsetRelationQuery) CountX ¶
func (srq *SynsetRelationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SynsetRelationQuery) Exist ¶
func (srq *SynsetRelationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SynsetRelationQuery) ExistX ¶
func (srq *SynsetRelationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SynsetRelationQuery) First ¶
func (srq *SynsetRelationQuery) First(ctx context.Context) (*SynsetRelation, error)
First returns the first SynsetRelation entity from the query. Returns a *NotFoundError when no SynsetRelation was found.
func (*SynsetRelationQuery) FirstID ¶
func (srq *SynsetRelationQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first SynsetRelation ID from the query. Returns a *NotFoundError when no SynsetRelation ID was found.
func (*SynsetRelationQuery) FirstIDX ¶
func (srq *SynsetRelationQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SynsetRelationQuery) FirstX ¶
func (srq *SynsetRelationQuery) FirstX(ctx context.Context) *SynsetRelation
FirstX is like First, but panics if an error occurs.
func (*SynsetRelationQuery) GroupBy ¶
func (srq *SynsetRelationQuery) GroupBy(field string, fields ...string) *SynsetRelationGroupBy
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 { RelType string `json:"relType,omitempty"` Count int `json:"count,omitempty"` } client.SynsetRelation.Query(). GroupBy(synsetrelation.FieldRelType). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SynsetRelationQuery) IDs ¶
func (srq *SynsetRelationQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of SynsetRelation IDs.
func (*SynsetRelationQuery) IDsX ¶
func (srq *SynsetRelationQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SynsetRelationQuery) Limit ¶
func (srq *SynsetRelationQuery) Limit(limit int) *SynsetRelationQuery
Limit the number of records to be returned by this query.
func (*SynsetRelationQuery) Offset ¶
func (srq *SynsetRelationQuery) Offset(offset int) *SynsetRelationQuery
Offset to start from.
func (*SynsetRelationQuery) Only ¶
func (srq *SynsetRelationQuery) Only(ctx context.Context) (*SynsetRelation, error)
Only returns a single SynsetRelation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SynsetRelation entity is found. Returns a *NotFoundError when no SynsetRelation entities are found.
func (*SynsetRelationQuery) OnlyID ¶
func (srq *SynsetRelationQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only SynsetRelation ID in the query. Returns a *NotSingularError when more than one SynsetRelation ID is found. Returns a *NotFoundError when no entities are found.
func (*SynsetRelationQuery) OnlyIDX ¶
func (srq *SynsetRelationQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SynsetRelationQuery) OnlyX ¶
func (srq *SynsetRelationQuery) OnlyX(ctx context.Context) *SynsetRelation
OnlyX is like Only, but panics if an error occurs.
func (*SynsetRelationQuery) Order ¶
func (srq *SynsetRelationQuery) Order(o ...synsetrelation.OrderOption) *SynsetRelationQuery
Order specifies how the records should be ordered.
func (*SynsetRelationQuery) QueryFrom ¶
func (srq *SynsetRelationQuery) QueryFrom() *SynsetQuery
QueryFrom chains the current query on the "from" edge.
func (*SynsetRelationQuery) QueryTo ¶
func (srq *SynsetRelationQuery) QueryTo() *SynsetQuery
QueryTo chains the current query on the "to" edge.
func (*SynsetRelationQuery) Select ¶
func (srq *SynsetRelationQuery) Select(fields ...string) *SynsetRelationSelect
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 { RelType string `json:"relType,omitempty"` } client.SynsetRelation.Query(). Select(synsetrelation.FieldRelType). Scan(ctx, &v)
func (*SynsetRelationQuery) Unique ¶
func (srq *SynsetRelationQuery) Unique(unique bool) *SynsetRelationQuery
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 (*SynsetRelationQuery) Where ¶
func (srq *SynsetRelationQuery) Where(ps ...predicate.SynsetRelation) *SynsetRelationQuery
Where adds a new predicate for the SynsetRelationQuery builder.
func (*SynsetRelationQuery) WithFrom ¶
func (srq *SynsetRelationQuery) WithFrom(opts ...func(*SynsetQuery)) *SynsetRelationQuery
WithFrom tells the query-builder to eager-load the nodes that are connected to the "from" edge. The optional arguments are used to configure the query builder of the edge.
func (*SynsetRelationQuery) WithTo ¶
func (srq *SynsetRelationQuery) WithTo(opts ...func(*SynsetQuery)) *SynsetRelationQuery
WithTo tells the query-builder to eager-load the nodes that are connected to the "to" edge. The optional arguments are used to configure the query builder of the edge.
type SynsetRelationSelect ¶
type SynsetRelationSelect struct { *SynsetRelationQuery // contains filtered or unexported fields }
SynsetRelationSelect is the builder for selecting fields of SynsetRelation entities.
func (*SynsetRelationSelect) Aggregate ¶
func (srs *SynsetRelationSelect) Aggregate(fns ...AggregateFunc) *SynsetRelationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SynsetRelationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SynsetRelationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SynsetRelationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SynsetRelationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SynsetRelationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SynsetRelationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SynsetRelationSelect) Scan ¶
func (srs *SynsetRelationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SynsetRelationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SynsetRelationUpdate ¶
type SynsetRelationUpdate struct {
// contains filtered or unexported fields
}
SynsetRelationUpdate is the builder for updating SynsetRelation entities.
func (*SynsetRelationUpdate) ClearFrom ¶
func (sru *SynsetRelationUpdate) ClearFrom() *SynsetRelationUpdate
ClearFrom clears the "from" edge to the Synset entity.
func (*SynsetRelationUpdate) ClearTo ¶
func (sru *SynsetRelationUpdate) ClearTo() *SynsetRelationUpdate
ClearTo clears the "to" edge to the Synset entity.
func (*SynsetRelationUpdate) Exec ¶
func (sru *SynsetRelationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SynsetRelationUpdate) ExecX ¶
func (sru *SynsetRelationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SynsetRelationUpdate) Mutation ¶
func (sru *SynsetRelationUpdate) Mutation() *SynsetRelationMutation
Mutation returns the SynsetRelationMutation object of the builder.
func (*SynsetRelationUpdate) Save ¶
func (sru *SynsetRelationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SynsetRelationUpdate) SaveX ¶
func (sru *SynsetRelationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SynsetRelationUpdate) SetFrom ¶
func (sru *SynsetRelationUpdate) SetFrom(s *Synset) *SynsetRelationUpdate
SetFrom sets the "from" edge to the Synset entity.
func (*SynsetRelationUpdate) SetFromID ¶
func (sru *SynsetRelationUpdate) SetFromID(id string) *SynsetRelationUpdate
SetFromID sets the "from" edge to the Synset entity by ID.
func (*SynsetRelationUpdate) SetNillableRelType ¶
func (sru *SynsetRelationUpdate) SetNillableRelType(s *string) *SynsetRelationUpdate
SetNillableRelType sets the "relType" field if the given value is not nil.
func (*SynsetRelationUpdate) SetRelType ¶
func (sru *SynsetRelationUpdate) SetRelType(s string) *SynsetRelationUpdate
SetRelType sets the "relType" field.
func (*SynsetRelationUpdate) SetTo ¶
func (sru *SynsetRelationUpdate) SetTo(s *Synset) *SynsetRelationUpdate
SetTo sets the "to" edge to the Synset entity.
func (*SynsetRelationUpdate) SetToID ¶
func (sru *SynsetRelationUpdate) SetToID(id string) *SynsetRelationUpdate
SetToID sets the "to" edge to the Synset entity by ID.
func (*SynsetRelationUpdate) Where ¶
func (sru *SynsetRelationUpdate) Where(ps ...predicate.SynsetRelation) *SynsetRelationUpdate
Where appends a list predicates to the SynsetRelationUpdate builder.
type SynsetRelationUpdateOne ¶
type SynsetRelationUpdateOne struct {
// contains filtered or unexported fields
}
SynsetRelationUpdateOne is the builder for updating a single SynsetRelation entity.
func (*SynsetRelationUpdateOne) ClearFrom ¶
func (sruo *SynsetRelationUpdateOne) ClearFrom() *SynsetRelationUpdateOne
ClearFrom clears the "from" edge to the Synset entity.
func (*SynsetRelationUpdateOne) ClearTo ¶
func (sruo *SynsetRelationUpdateOne) ClearTo() *SynsetRelationUpdateOne
ClearTo clears the "to" edge to the Synset entity.
func (*SynsetRelationUpdateOne) Exec ¶
func (sruo *SynsetRelationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SynsetRelationUpdateOne) ExecX ¶
func (sruo *SynsetRelationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SynsetRelationUpdateOne) Mutation ¶
func (sruo *SynsetRelationUpdateOne) Mutation() *SynsetRelationMutation
Mutation returns the SynsetRelationMutation object of the builder.
func (*SynsetRelationUpdateOne) Save ¶
func (sruo *SynsetRelationUpdateOne) Save(ctx context.Context) (*SynsetRelation, error)
Save executes the query and returns the updated SynsetRelation entity.
func (*SynsetRelationUpdateOne) SaveX ¶
func (sruo *SynsetRelationUpdateOne) SaveX(ctx context.Context) *SynsetRelation
SaveX is like Save, but panics if an error occurs.
func (*SynsetRelationUpdateOne) Select ¶
func (sruo *SynsetRelationUpdateOne) Select(field string, fields ...string) *SynsetRelationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SynsetRelationUpdateOne) SetFrom ¶
func (sruo *SynsetRelationUpdateOne) SetFrom(s *Synset) *SynsetRelationUpdateOne
SetFrom sets the "from" edge to the Synset entity.
func (*SynsetRelationUpdateOne) SetFromID ¶
func (sruo *SynsetRelationUpdateOne) SetFromID(id string) *SynsetRelationUpdateOne
SetFromID sets the "from" edge to the Synset entity by ID.
func (*SynsetRelationUpdateOne) SetNillableRelType ¶
func (sruo *SynsetRelationUpdateOne) SetNillableRelType(s *string) *SynsetRelationUpdateOne
SetNillableRelType sets the "relType" field if the given value is not nil.
func (*SynsetRelationUpdateOne) SetRelType ¶
func (sruo *SynsetRelationUpdateOne) SetRelType(s string) *SynsetRelationUpdateOne
SetRelType sets the "relType" field.
func (*SynsetRelationUpdateOne) SetTo ¶
func (sruo *SynsetRelationUpdateOne) SetTo(s *Synset) *SynsetRelationUpdateOne
SetTo sets the "to" edge to the Synset entity.
func (*SynsetRelationUpdateOne) SetToID ¶
func (sruo *SynsetRelationUpdateOne) SetToID(id string) *SynsetRelationUpdateOne
SetToID sets the "to" edge to the Synset entity by ID.
func (*SynsetRelationUpdateOne) Where ¶
func (sruo *SynsetRelationUpdateOne) Where(ps ...predicate.SynsetRelation) *SynsetRelationUpdateOne
Where appends a list predicates to the SynsetRelationUpdate builder.
type SynsetRelations ¶
type SynsetRelations []*SynsetRelation
SynsetRelations is a parsable slice of SynsetRelation.
type SynsetSelect ¶
type SynsetSelect struct { *SynsetQuery // contains filtered or unexported fields }
SynsetSelect is the builder for selecting fields of Synset entities.
func (*SynsetSelect) Aggregate ¶
func (ss *SynsetSelect) Aggregate(fns ...AggregateFunc) *SynsetSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SynsetSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SynsetSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SynsetSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SynsetSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SynsetSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SynsetSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SynsetSelect) Scan ¶
func (ss *SynsetSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SynsetSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SynsetUpdate ¶
type SynsetUpdate struct {
// contains filtered or unexported fields
}
SynsetUpdate is the builder for updating Synset entities.
func (*SynsetUpdate) AddDefinitionIDs ¶
func (su *SynsetUpdate) AddDefinitionIDs(ids ...int) *SynsetUpdate
AddDefinitionIDs adds the "definitions" edge to the Definition entity by IDs.
func (*SynsetUpdate) AddDefinitions ¶
func (su *SynsetUpdate) AddDefinitions(d ...*Definition) *SynsetUpdate
AddDefinitions adds the "definitions" edges to the Definition entity.
func (*SynsetUpdate) AddRelFrom ¶
func (su *SynsetUpdate) AddRelFrom(s ...*SynsetRelation) *SynsetUpdate
AddRelFrom adds the "relFrom" edges to the SynsetRelation entity.
func (*SynsetUpdate) AddRelFromIDs ¶
func (su *SynsetUpdate) AddRelFromIDs(ids ...int) *SynsetUpdate
AddRelFromIDs adds the "relFrom" edge to the SynsetRelation entity by IDs.
func (*SynsetUpdate) AddRelTo ¶
func (su *SynsetUpdate) AddRelTo(s ...*SynsetRelation) *SynsetUpdate
AddRelTo adds the "relTo" edges to the SynsetRelation entity.
func (*SynsetUpdate) AddRelToIDs ¶
func (su *SynsetUpdate) AddRelToIDs(ids ...int) *SynsetUpdate
AddRelToIDs adds the "relTo" edge to the SynsetRelation entity by IDs.
func (*SynsetUpdate) AddSense ¶
func (su *SynsetUpdate) AddSense(s ...*Sense) *SynsetUpdate
AddSense adds the "sense" edges to the Sense entity.
func (*SynsetUpdate) AddSenseIDs ¶
func (su *SynsetUpdate) AddSenseIDs(ids ...string) *SynsetUpdate
AddSenseIDs adds the "sense" edge to the Sense entity by IDs.
func (*SynsetUpdate) ClearDefinitions ¶
func (su *SynsetUpdate) ClearDefinitions() *SynsetUpdate
ClearDefinitions clears all "definitions" edges to the Definition entity.
func (*SynsetUpdate) ClearRelFrom ¶
func (su *SynsetUpdate) ClearRelFrom() *SynsetUpdate
ClearRelFrom clears all "relFrom" edges to the SynsetRelation entity.
func (*SynsetUpdate) ClearRelTo ¶
func (su *SynsetUpdate) ClearRelTo() *SynsetUpdate
ClearRelTo clears all "relTo" edges to the SynsetRelation entity.
func (*SynsetUpdate) ClearSense ¶
func (su *SynsetUpdate) ClearSense() *SynsetUpdate
ClearSense clears all "sense" edges to the Sense entity.
func (*SynsetUpdate) Exec ¶
func (su *SynsetUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SynsetUpdate) ExecX ¶
func (su *SynsetUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SynsetUpdate) Mutation ¶
func (su *SynsetUpdate) Mutation() *SynsetMutation
Mutation returns the SynsetMutation object of the builder.
func (*SynsetUpdate) RemoveDefinitionIDs ¶
func (su *SynsetUpdate) RemoveDefinitionIDs(ids ...int) *SynsetUpdate
RemoveDefinitionIDs removes the "definitions" edge to Definition entities by IDs.
func (*SynsetUpdate) RemoveDefinitions ¶
func (su *SynsetUpdate) RemoveDefinitions(d ...*Definition) *SynsetUpdate
RemoveDefinitions removes "definitions" edges to Definition entities.
func (*SynsetUpdate) RemoveRelFrom ¶
func (su *SynsetUpdate) RemoveRelFrom(s ...*SynsetRelation) *SynsetUpdate
RemoveRelFrom removes "relFrom" edges to SynsetRelation entities.
func (*SynsetUpdate) RemoveRelFromIDs ¶
func (su *SynsetUpdate) RemoveRelFromIDs(ids ...int) *SynsetUpdate
RemoveRelFromIDs removes the "relFrom" edge to SynsetRelation entities by IDs.
func (*SynsetUpdate) RemoveRelTo ¶
func (su *SynsetUpdate) RemoveRelTo(s ...*SynsetRelation) *SynsetUpdate
RemoveRelTo removes "relTo" edges to SynsetRelation entities.
func (*SynsetUpdate) RemoveRelToIDs ¶
func (su *SynsetUpdate) RemoveRelToIDs(ids ...int) *SynsetUpdate
RemoveRelToIDs removes the "relTo" edge to SynsetRelation entities by IDs.
func (*SynsetUpdate) RemoveSense ¶
func (su *SynsetUpdate) RemoveSense(s ...*Sense) *SynsetUpdate
RemoveSense removes "sense" edges to Sense entities.
func (*SynsetUpdate) RemoveSenseIDs ¶
func (su *SynsetUpdate) RemoveSenseIDs(ids ...string) *SynsetUpdate
RemoveSenseIDs removes the "sense" edge to Sense entities by IDs.
func (*SynsetUpdate) Save ¶
func (su *SynsetUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SynsetUpdate) SaveX ¶
func (su *SynsetUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SynsetUpdate) SetNillablePartOfSpeech ¶
func (su *SynsetUpdate) SetNillablePartOfSpeech(s *string) *SynsetUpdate
SetNillablePartOfSpeech sets the "partOfSpeech" field if the given value is not nil.
func (*SynsetUpdate) SetPartOfSpeech ¶
func (su *SynsetUpdate) SetPartOfSpeech(s string) *SynsetUpdate
SetPartOfSpeech sets the "partOfSpeech" field.
func (*SynsetUpdate) Where ¶
func (su *SynsetUpdate) Where(ps ...predicate.Synset) *SynsetUpdate
Where appends a list predicates to the SynsetUpdate builder.
type SynsetUpdateOne ¶
type SynsetUpdateOne struct {
// contains filtered or unexported fields
}
SynsetUpdateOne is the builder for updating a single Synset entity.
func (*SynsetUpdateOne) AddDefinitionIDs ¶
func (suo *SynsetUpdateOne) AddDefinitionIDs(ids ...int) *SynsetUpdateOne
AddDefinitionIDs adds the "definitions" edge to the Definition entity by IDs.
func (*SynsetUpdateOne) AddDefinitions ¶
func (suo *SynsetUpdateOne) AddDefinitions(d ...*Definition) *SynsetUpdateOne
AddDefinitions adds the "definitions" edges to the Definition entity.
func (*SynsetUpdateOne) AddRelFrom ¶
func (suo *SynsetUpdateOne) AddRelFrom(s ...*SynsetRelation) *SynsetUpdateOne
AddRelFrom adds the "relFrom" edges to the SynsetRelation entity.
func (*SynsetUpdateOne) AddRelFromIDs ¶
func (suo *SynsetUpdateOne) AddRelFromIDs(ids ...int) *SynsetUpdateOne
AddRelFromIDs adds the "relFrom" edge to the SynsetRelation entity by IDs.
func (*SynsetUpdateOne) AddRelTo ¶
func (suo *SynsetUpdateOne) AddRelTo(s ...*SynsetRelation) *SynsetUpdateOne
AddRelTo adds the "relTo" edges to the SynsetRelation entity.
func (*SynsetUpdateOne) AddRelToIDs ¶
func (suo *SynsetUpdateOne) AddRelToIDs(ids ...int) *SynsetUpdateOne
AddRelToIDs adds the "relTo" edge to the SynsetRelation entity by IDs.
func (*SynsetUpdateOne) AddSense ¶
func (suo *SynsetUpdateOne) AddSense(s ...*Sense) *SynsetUpdateOne
AddSense adds the "sense" edges to the Sense entity.
func (*SynsetUpdateOne) AddSenseIDs ¶
func (suo *SynsetUpdateOne) AddSenseIDs(ids ...string) *SynsetUpdateOne
AddSenseIDs adds the "sense" edge to the Sense entity by IDs.
func (*SynsetUpdateOne) ClearDefinitions ¶
func (suo *SynsetUpdateOne) ClearDefinitions() *SynsetUpdateOne
ClearDefinitions clears all "definitions" edges to the Definition entity.
func (*SynsetUpdateOne) ClearRelFrom ¶
func (suo *SynsetUpdateOne) ClearRelFrom() *SynsetUpdateOne
ClearRelFrom clears all "relFrom" edges to the SynsetRelation entity.
func (*SynsetUpdateOne) ClearRelTo ¶
func (suo *SynsetUpdateOne) ClearRelTo() *SynsetUpdateOne
ClearRelTo clears all "relTo" edges to the SynsetRelation entity.
func (*SynsetUpdateOne) ClearSense ¶
func (suo *SynsetUpdateOne) ClearSense() *SynsetUpdateOne
ClearSense clears all "sense" edges to the Sense entity.
func (*SynsetUpdateOne) Exec ¶
func (suo *SynsetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SynsetUpdateOne) ExecX ¶
func (suo *SynsetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SynsetUpdateOne) Mutation ¶
func (suo *SynsetUpdateOne) Mutation() *SynsetMutation
Mutation returns the SynsetMutation object of the builder.
func (*SynsetUpdateOne) RemoveDefinitionIDs ¶
func (suo *SynsetUpdateOne) RemoveDefinitionIDs(ids ...int) *SynsetUpdateOne
RemoveDefinitionIDs removes the "definitions" edge to Definition entities by IDs.
func (*SynsetUpdateOne) RemoveDefinitions ¶
func (suo *SynsetUpdateOne) RemoveDefinitions(d ...*Definition) *SynsetUpdateOne
RemoveDefinitions removes "definitions" edges to Definition entities.
func (*SynsetUpdateOne) RemoveRelFrom ¶
func (suo *SynsetUpdateOne) RemoveRelFrom(s ...*SynsetRelation) *SynsetUpdateOne
RemoveRelFrom removes "relFrom" edges to SynsetRelation entities.
func (*SynsetUpdateOne) RemoveRelFromIDs ¶
func (suo *SynsetUpdateOne) RemoveRelFromIDs(ids ...int) *SynsetUpdateOne
RemoveRelFromIDs removes the "relFrom" edge to SynsetRelation entities by IDs.
func (*SynsetUpdateOne) RemoveRelTo ¶
func (suo *SynsetUpdateOne) RemoveRelTo(s ...*SynsetRelation) *SynsetUpdateOne
RemoveRelTo removes "relTo" edges to SynsetRelation entities.
func (*SynsetUpdateOne) RemoveRelToIDs ¶
func (suo *SynsetUpdateOne) RemoveRelToIDs(ids ...int) *SynsetUpdateOne
RemoveRelToIDs removes the "relTo" edge to SynsetRelation entities by IDs.
func (*SynsetUpdateOne) RemoveSense ¶
func (suo *SynsetUpdateOne) RemoveSense(s ...*Sense) *SynsetUpdateOne
RemoveSense removes "sense" edges to Sense entities.
func (*SynsetUpdateOne) RemoveSenseIDs ¶
func (suo *SynsetUpdateOne) RemoveSenseIDs(ids ...string) *SynsetUpdateOne
RemoveSenseIDs removes the "sense" edge to Sense entities by IDs.
func (*SynsetUpdateOne) Save ¶
func (suo *SynsetUpdateOne) Save(ctx context.Context) (*Synset, error)
Save executes the query and returns the updated Synset entity.
func (*SynsetUpdateOne) SaveX ¶
func (suo *SynsetUpdateOne) SaveX(ctx context.Context) *Synset
SaveX is like Save, but panics if an error occurs.
func (*SynsetUpdateOne) Select ¶
func (suo *SynsetUpdateOne) Select(field string, fields ...string) *SynsetUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SynsetUpdateOne) SetNillablePartOfSpeech ¶
func (suo *SynsetUpdateOne) SetNillablePartOfSpeech(s *string) *SynsetUpdateOne
SetNillablePartOfSpeech sets the "partOfSpeech" field if the given value is not nil.
func (*SynsetUpdateOne) SetPartOfSpeech ¶
func (suo *SynsetUpdateOne) SetPartOfSpeech(s string) *SynsetUpdateOne
SetPartOfSpeech sets the "partOfSpeech" field.
func (*SynsetUpdateOne) Where ¶
func (suo *SynsetUpdateOne) Where(ps ...predicate.Synset) *SynsetUpdateOne
Where appends a list predicates to the SynsetUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Definition is the client for interacting with the Definition builders. Definition *DefinitionClient // Lemma is the client for interacting with the Lemma builders. Lemma *LemmaClient // Sense is the client for interacting with the Sense builders. Sense *SenseClient // SenseRelation is the client for interacting with the SenseRelation builders. SenseRelation *SenseRelationClient // Synset is the client for interacting with the Synset builders. Synset *SynsetClient // SynsetRelation is the client for interacting with the SynsetRelation builders. SynsetRelation *SynsetRelationClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- definition.go
- definition_create.go
- definition_delete.go
- definition_query.go
- definition_update.go
- ent.go
- generate.go
- lemma.go
- lemma_create.go
- lemma_delete.go
- lemma_query.go
- lemma_update.go
- mutation.go
- runtime.go
- sense.go
- sense_create.go
- sense_delete.go
- sense_query.go
- sense_update.go
- senserelation.go
- senserelation_create.go
- senserelation_delete.go
- senserelation_query.go
- senserelation_update.go
- synset.go
- synset_create.go
- synset_delete.go
- synset_query.go
- synset_update.go
- synsetrelation.go
- synsetrelation_create.go
- synsetrelation_delete.go
- synsetrelation_query.go
- synsetrelation_update.go
- tx.go