Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type 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 TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
- type Words
- type WordsClient
- func (c *WordsClient) Create() *WordsCreate
- func (c *WordsClient) CreateBulk(builders ...*WordsCreate) *WordsCreateBulk
- func (c *WordsClient) Delete() *WordsDelete
- func (c *WordsClient) DeleteOne(w *Words) *WordsDeleteOne
- func (c *WordsClient) DeleteOneID(id int64) *WordsDeleteOne
- func (c *WordsClient) Get(ctx context.Context, id int64) (*Words, error)
- func (c *WordsClient) GetX(ctx context.Context, id int64) *Words
- func (c *WordsClient) Hooks() []Hook
- func (c *WordsClient) Intercept(interceptors ...Interceptor)
- func (c *WordsClient) Interceptors() []Interceptor
- func (c *WordsClient) MapCreateBulk(slice any, setFunc func(*WordsCreate, int)) *WordsCreateBulk
- func (c *WordsClient) Query() *WordsQuery
- func (c *WordsClient) Update() *WordsUpdate
- func (c *WordsClient) UpdateOne(w *Words) *WordsUpdateOne
- func (c *WordsClient) UpdateOneID(id int64) *WordsUpdateOne
- func (c *WordsClient) Use(hooks ...Hook)
- type WordsCreate
- func (wc *WordsCreate) Exec(ctx context.Context) error
- func (wc *WordsCreate) ExecX(ctx context.Context)
- func (wc *WordsCreate) Mutation() *WordsMutation
- func (wc *WordsCreate) Save(ctx context.Context) (*Words, error)
- func (wc *WordsCreate) SaveX(ctx context.Context) *Words
- func (wc *WordsCreate) SetCreatedAt(t time.Time) *WordsCreate
- func (wc *WordsCreate) SetGroup(s string) *WordsCreate
- func (wc *WordsCreate) SetID(i int64) *WordsCreate
- func (wc *WordsCreate) SetNillableCreatedAt(t *time.Time) *WordsCreate
- func (wc *WordsCreate) SetNillableUpdatedAt(t *time.Time) *WordsCreate
- func (wc *WordsCreate) SetUpdatedAt(t time.Time) *WordsCreate
- func (wc *WordsCreate) SetWord(s string) *WordsCreate
- type WordsCreateBulk
- type WordsDelete
- type WordsDeleteOne
- type WordsGroupBy
- func (wgb *WordsGroupBy) Aggregate(fns ...AggregateFunc) *WordsGroupBy
- func (s *WordsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WordsGroupBy) BoolX(ctx context.Context) bool
- func (s *WordsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WordsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WordsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WordsGroupBy) Float64X(ctx context.Context) float64
- func (s *WordsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WordsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WordsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WordsGroupBy) IntX(ctx context.Context) int
- func (s *WordsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WordsGroupBy) IntsX(ctx context.Context) []int
- func (wgb *WordsGroupBy) Scan(ctx context.Context, v any) error
- func (s *WordsGroupBy) ScanX(ctx context.Context, v any)
- func (s *WordsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WordsGroupBy) StringX(ctx context.Context) string
- func (s *WordsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WordsGroupBy) StringsX(ctx context.Context) []string
- type WordsMutation
- func (m *WordsMutation) AddField(name string, value ent.Value) error
- func (m *WordsMutation) AddedEdges() []string
- func (m *WordsMutation) AddedField(name string) (ent.Value, bool)
- func (m *WordsMutation) AddedFields() []string
- func (m *WordsMutation) AddedIDs(name string) []ent.Value
- func (m *WordsMutation) ClearEdge(name string) error
- func (m *WordsMutation) ClearField(name string) error
- func (m *WordsMutation) ClearedEdges() []string
- func (m *WordsMutation) ClearedFields() []string
- func (m WordsMutation) Client() *Client
- func (m *WordsMutation) CreatedAt() (r time.Time, exists bool)
- func (m *WordsMutation) EdgeCleared(name string) bool
- func (m *WordsMutation) Field(name string) (ent.Value, bool)
- func (m *WordsMutation) FieldCleared(name string) bool
- func (m *WordsMutation) Fields() []string
- func (m *WordsMutation) Group() (r string, exists bool)
- func (m *WordsMutation) ID() (id int64, exists bool)
- func (m *WordsMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *WordsMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *WordsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WordsMutation) OldGroup(ctx context.Context) (v string, err error)
- func (m *WordsMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *WordsMutation) OldWord(ctx context.Context) (v string, err error)
- func (m *WordsMutation) Op() Op
- func (m *WordsMutation) RemovedEdges() []string
- func (m *WordsMutation) RemovedIDs(name string) []ent.Value
- func (m *WordsMutation) ResetCreatedAt()
- func (m *WordsMutation) ResetEdge(name string) error
- func (m *WordsMutation) ResetField(name string) error
- func (m *WordsMutation) ResetGroup()
- func (m *WordsMutation) ResetUpdatedAt()
- func (m *WordsMutation) ResetWord()
- func (m *WordsMutation) SetCreatedAt(t time.Time)
- func (m *WordsMutation) SetField(name string, value ent.Value) error
- func (m *WordsMutation) SetGroup(s string)
- func (m *WordsMutation) SetID(id int64)
- func (m *WordsMutation) SetOp(op Op)
- func (m *WordsMutation) SetUpdatedAt(t time.Time)
- func (m *WordsMutation) SetWord(s string)
- func (m WordsMutation) Tx() (*Tx, error)
- func (m *WordsMutation) Type() string
- func (m *WordsMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *WordsMutation) Where(ps ...predicate.Words)
- func (m *WordsMutation) WhereP(ps ...func(*sql.Selector))
- func (m *WordsMutation) Word() (r string, exists bool)
- type WordsQuery
- func (wq *WordsQuery) Aggregate(fns ...AggregateFunc) *WordsSelect
- func (wq *WordsQuery) All(ctx context.Context) ([]*Words, error)
- func (wq *WordsQuery) AllX(ctx context.Context) []*Words
- func (wq *WordsQuery) Clone() *WordsQuery
- func (wq *WordsQuery) Count(ctx context.Context) (int, error)
- func (wq *WordsQuery) CountX(ctx context.Context) int
- func (wq *WordsQuery) Exist(ctx context.Context) (bool, error)
- func (wq *WordsQuery) ExistX(ctx context.Context) bool
- func (wq *WordsQuery) First(ctx context.Context) (*Words, error)
- func (wq *WordsQuery) FirstID(ctx context.Context) (id int64, err error)
- func (wq *WordsQuery) FirstIDX(ctx context.Context) int64
- func (wq *WordsQuery) FirstX(ctx context.Context) *Words
- func (wq *WordsQuery) GroupBy(field string, fields ...string) *WordsGroupBy
- func (wq *WordsQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (wq *WordsQuery) IDsX(ctx context.Context) []int64
- func (wq *WordsQuery) Limit(limit int) *WordsQuery
- func (wq *WordsQuery) Offset(offset int) *WordsQuery
- func (wq *WordsQuery) Only(ctx context.Context) (*Words, error)
- func (wq *WordsQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (wq *WordsQuery) OnlyIDX(ctx context.Context) int64
- func (wq *WordsQuery) OnlyX(ctx context.Context) *Words
- func (wq *WordsQuery) Order(o ...words.OrderOption) *WordsQuery
- func (wq *WordsQuery) Select(fields ...string) *WordsSelect
- func (wq *WordsQuery) Unique(unique bool) *WordsQuery
- func (wq *WordsQuery) Where(ps ...predicate.Words) *WordsQuery
- type WordsSelect
- func (ws *WordsSelect) Aggregate(fns ...AggregateFunc) *WordsSelect
- func (s *WordsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WordsSelect) BoolX(ctx context.Context) bool
- func (s *WordsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WordsSelect) BoolsX(ctx context.Context) []bool
- func (s *WordsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WordsSelect) Float64X(ctx context.Context) float64
- func (s *WordsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WordsSelect) Float64sX(ctx context.Context) []float64
- func (s *WordsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WordsSelect) IntX(ctx context.Context) int
- func (s *WordsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WordsSelect) IntsX(ctx context.Context) []int
- func (ws *WordsSelect) Scan(ctx context.Context, v any) error
- func (s *WordsSelect) ScanX(ctx context.Context, v any)
- func (s *WordsSelect) String(ctx context.Context) (_ string, err error)
- func (s *WordsSelect) StringX(ctx context.Context) string
- func (s *WordsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WordsSelect) StringsX(ctx context.Context) []string
- type WordsSlice
- type WordsUpdate
- func (wu *WordsUpdate) Exec(ctx context.Context) error
- func (wu *WordsUpdate) ExecX(ctx context.Context)
- func (wu *WordsUpdate) Mutation() *WordsMutation
- func (wu *WordsUpdate) Save(ctx context.Context) (int, error)
- func (wu *WordsUpdate) SaveX(ctx context.Context) int
- func (wu *WordsUpdate) SetCreatedAt(t time.Time) *WordsUpdate
- func (wu *WordsUpdate) SetGroup(s string) *WordsUpdate
- func (wu *WordsUpdate) SetNillableCreatedAt(t *time.Time) *WordsUpdate
- func (wu *WordsUpdate) SetNillableGroup(s *string) *WordsUpdate
- func (wu *WordsUpdate) SetNillableUpdatedAt(t *time.Time) *WordsUpdate
- func (wu *WordsUpdate) SetNillableWord(s *string) *WordsUpdate
- func (wu *WordsUpdate) SetUpdatedAt(t time.Time) *WordsUpdate
- func (wu *WordsUpdate) SetWord(s string) *WordsUpdate
- func (wu *WordsUpdate) Where(ps ...predicate.Words) *WordsUpdate
- type WordsUpdateOne
- func (wuo *WordsUpdateOne) Exec(ctx context.Context) error
- func (wuo *WordsUpdateOne) ExecX(ctx context.Context)
- func (wuo *WordsUpdateOne) Mutation() *WordsMutation
- func (wuo *WordsUpdateOne) Save(ctx context.Context) (*Words, error)
- func (wuo *WordsUpdateOne) SaveX(ctx context.Context) *Words
- func (wuo *WordsUpdateOne) Select(field string, fields ...string) *WordsUpdateOne
- func (wuo *WordsUpdateOne) SetCreatedAt(t time.Time) *WordsUpdateOne
- func (wuo *WordsUpdateOne) SetGroup(s string) *WordsUpdateOne
- func (wuo *WordsUpdateOne) SetNillableCreatedAt(t *time.Time) *WordsUpdateOne
- func (wuo *WordsUpdateOne) SetNillableGroup(s *string) *WordsUpdateOne
- func (wuo *WordsUpdateOne) SetNillableUpdatedAt(t *time.Time) *WordsUpdateOne
- func (wuo *WordsUpdateOne) SetNillableWord(s *string) *WordsUpdateOne
- func (wuo *WordsUpdateOne) SetUpdatedAt(t time.Time) *WordsUpdateOne
- func (wuo *WordsUpdateOne) SetWord(s string) *WordsUpdateOne
- func (wuo *WordsUpdateOne) Where(ps ...predicate.Words) *WordsUpdateOne
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeWords = "Words" )
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 // Words is the client for interacting with the Words builders. Words *WordsClient // 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(). Words. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type 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 TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Words is the client for interacting with the Words builders. Words *WordsClient // 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.
type Words ¶
type Words struct { // ID of the ent. ID int64 `json:"id,omitempty"` // 分组 Group string `json:"group,omitempty"` // Word holds the value of the "word" field. Word string `json:"word,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // contains filtered or unexported fields }
单词表
func (*Words) Unwrap ¶
Unwrap unwraps the Words 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 (*Words) Update ¶
func (w *Words) Update() *WordsUpdateOne
Update returns a builder for updating this Words. Note that you need to call Words.Unwrap() before calling this method if this Words was returned from a transaction, and the transaction was committed or rolled back.
type WordsClient ¶
type WordsClient struct {
// contains filtered or unexported fields
}
WordsClient is a client for the Words schema.
func NewWordsClient ¶
func NewWordsClient(c config) *WordsClient
NewWordsClient returns a client for the Words from the given config.
func (*WordsClient) Create ¶
func (c *WordsClient) Create() *WordsCreate
Create returns a builder for creating a Words entity.
func (*WordsClient) CreateBulk ¶
func (c *WordsClient) CreateBulk(builders ...*WordsCreate) *WordsCreateBulk
CreateBulk returns a builder for creating a bulk of Words entities.
func (*WordsClient) Delete ¶
func (c *WordsClient) Delete() *WordsDelete
Delete returns a delete builder for Words.
func (*WordsClient) DeleteOne ¶
func (c *WordsClient) DeleteOne(w *Words) *WordsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WordsClient) DeleteOneID ¶
func (c *WordsClient) DeleteOneID(id int64) *WordsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*WordsClient) GetX ¶
func (c *WordsClient) GetX(ctx context.Context, id int64) *Words
GetX is like Get, but panics if an error occurs.
func (*WordsClient) Intercept ¶
func (c *WordsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `words.Intercept(f(g(h())))`.
func (*WordsClient) Interceptors ¶
func (c *WordsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*WordsClient) MapCreateBulk ¶
func (c *WordsClient) MapCreateBulk(slice any, setFunc func(*WordsCreate, int)) *WordsCreateBulk
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 (*WordsClient) Query ¶
func (c *WordsClient) Query() *WordsQuery
Query returns a query builder for Words.
func (*WordsClient) Update ¶
func (c *WordsClient) Update() *WordsUpdate
Update returns an update builder for Words.
func (*WordsClient) UpdateOne ¶
func (c *WordsClient) UpdateOne(w *Words) *WordsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WordsClient) UpdateOneID ¶
func (c *WordsClient) UpdateOneID(id int64) *WordsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WordsClient) Use ¶
func (c *WordsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `words.Hooks(f(g(h())))`.
type WordsCreate ¶
type WordsCreate struct {
// contains filtered or unexported fields
}
WordsCreate is the builder for creating a Words entity.
func (*WordsCreate) Exec ¶
func (wc *WordsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WordsCreate) ExecX ¶
func (wc *WordsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WordsCreate) Mutation ¶
func (wc *WordsCreate) Mutation() *WordsMutation
Mutation returns the WordsMutation object of the builder.
func (*WordsCreate) Save ¶
func (wc *WordsCreate) Save(ctx context.Context) (*Words, error)
Save creates the Words in the database.
func (*WordsCreate) SaveX ¶
func (wc *WordsCreate) SaveX(ctx context.Context) *Words
SaveX calls Save and panics if Save returns an error.
func (*WordsCreate) SetCreatedAt ¶
func (wc *WordsCreate) SetCreatedAt(t time.Time) *WordsCreate
SetCreatedAt sets the "created_at" field.
func (*WordsCreate) SetGroup ¶
func (wc *WordsCreate) SetGroup(s string) *WordsCreate
SetGroup sets the "group" field.
func (*WordsCreate) SetID ¶
func (wc *WordsCreate) SetID(i int64) *WordsCreate
SetID sets the "id" field.
func (*WordsCreate) SetNillableCreatedAt ¶
func (wc *WordsCreate) SetNillableCreatedAt(t *time.Time) *WordsCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*WordsCreate) SetNillableUpdatedAt ¶
func (wc *WordsCreate) SetNillableUpdatedAt(t *time.Time) *WordsCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*WordsCreate) SetUpdatedAt ¶
func (wc *WordsCreate) SetUpdatedAt(t time.Time) *WordsCreate
SetUpdatedAt sets the "updated_at" field.
func (*WordsCreate) SetWord ¶
func (wc *WordsCreate) SetWord(s string) *WordsCreate
SetWord sets the "word" field.
type WordsCreateBulk ¶
type WordsCreateBulk struct {
// contains filtered or unexported fields
}
WordsCreateBulk is the builder for creating many Words entities in bulk.
func (*WordsCreateBulk) Exec ¶
func (wcb *WordsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WordsCreateBulk) ExecX ¶
func (wcb *WordsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type WordsDelete ¶
type WordsDelete struct {
// contains filtered or unexported fields
}
WordsDelete is the builder for deleting a Words entity.
func (*WordsDelete) Exec ¶
func (wd *WordsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WordsDelete) ExecX ¶
func (wd *WordsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WordsDelete) Where ¶
func (wd *WordsDelete) Where(ps ...predicate.Words) *WordsDelete
Where appends a list predicates to the WordsDelete builder.
type WordsDeleteOne ¶
type WordsDeleteOne struct {
// contains filtered or unexported fields
}
WordsDeleteOne is the builder for deleting a single Words entity.
func (*WordsDeleteOne) Exec ¶
func (wdo *WordsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WordsDeleteOne) ExecX ¶
func (wdo *WordsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WordsDeleteOne) Where ¶
func (wdo *WordsDeleteOne) Where(ps ...predicate.Words) *WordsDeleteOne
Where appends a list predicates to the WordsDelete builder.
type WordsGroupBy ¶
type WordsGroupBy struct {
// contains filtered or unexported fields
}
WordsGroupBy is the group-by builder for Words entities.
func (*WordsGroupBy) Aggregate ¶
func (wgb *WordsGroupBy) Aggregate(fns ...AggregateFunc) *WordsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WordsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WordsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WordsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WordsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WordsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WordsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WordsGroupBy) Scan ¶
func (wgb *WordsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WordsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WordsMutation ¶
type WordsMutation struct {
// contains filtered or unexported fields
}
WordsMutation represents an operation that mutates the Words nodes in the graph.
func (*WordsMutation) AddField ¶
func (m *WordsMutation) 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 (*WordsMutation) AddedEdges ¶
func (m *WordsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WordsMutation) AddedField ¶
func (m *WordsMutation) 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 (*WordsMutation) AddedFields ¶
func (m *WordsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WordsMutation) AddedIDs ¶
func (m *WordsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WordsMutation) ClearEdge ¶
func (m *WordsMutation) 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 (*WordsMutation) ClearField ¶
func (m *WordsMutation) 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 (*WordsMutation) ClearedEdges ¶
func (m *WordsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WordsMutation) ClearedFields ¶
func (m *WordsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WordsMutation) Client ¶
func (m WordsMutation) 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 (*WordsMutation) CreatedAt ¶
func (m *WordsMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*WordsMutation) EdgeCleared ¶
func (m *WordsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WordsMutation) Field ¶
func (m *WordsMutation) 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 (*WordsMutation) FieldCleared ¶
func (m *WordsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WordsMutation) Fields ¶
func (m *WordsMutation) 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 (*WordsMutation) Group ¶
func (m *WordsMutation) Group() (r string, exists bool)
Group returns the value of the "group" field in the mutation.
func (*WordsMutation) ID ¶
func (m *WordsMutation) ID() (id int64, 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 (*WordsMutation) IDs ¶
func (m *WordsMutation) IDs(ctx context.Context) ([]int64, 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 (*WordsMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Words entity. If the Words 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 (*WordsMutation) 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 (*WordsMutation) OldGroup ¶
func (m *WordsMutation) OldGroup(ctx context.Context) (v string, err error)
OldGroup returns the old "group" field's value of the Words entity. If the Words 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 (*WordsMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Words entity. If the Words 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 (*WordsMutation) OldWord ¶
func (m *WordsMutation) OldWord(ctx context.Context) (v string, err error)
OldWord returns the old "word" field's value of the Words entity. If the Words 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 (*WordsMutation) RemovedEdges ¶
func (m *WordsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WordsMutation) RemovedIDs ¶
func (m *WordsMutation) 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 (*WordsMutation) ResetCreatedAt ¶
func (m *WordsMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*WordsMutation) ResetEdge ¶
func (m *WordsMutation) 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 (*WordsMutation) ResetField ¶
func (m *WordsMutation) 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 (*WordsMutation) ResetGroup ¶
func (m *WordsMutation) ResetGroup()
ResetGroup resets all changes to the "group" field.
func (*WordsMutation) ResetUpdatedAt ¶
func (m *WordsMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*WordsMutation) ResetWord ¶
func (m *WordsMutation) ResetWord()
ResetWord resets all changes to the "word" field.
func (*WordsMutation) SetCreatedAt ¶
func (m *WordsMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*WordsMutation) SetField ¶
func (m *WordsMutation) 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 (*WordsMutation) SetGroup ¶
func (m *WordsMutation) SetGroup(s string)
SetGroup sets the "group" field.
func (*WordsMutation) SetID ¶
func (m *WordsMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Words entities.
func (*WordsMutation) SetOp ¶
func (m *WordsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*WordsMutation) SetUpdatedAt ¶
func (m *WordsMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*WordsMutation) SetWord ¶
func (m *WordsMutation) SetWord(s string)
SetWord sets the "word" field.
func (WordsMutation) Tx ¶
func (m WordsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WordsMutation) Type ¶
func (m *WordsMutation) Type() string
Type returns the node type of this mutation (Words).
func (*WordsMutation) UpdatedAt ¶
func (m *WordsMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*WordsMutation) Where ¶
func (m *WordsMutation) Where(ps ...predicate.Words)
Where appends a list predicates to the WordsMutation builder.
func (*WordsMutation) WhereP ¶
func (m *WordsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the WordsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*WordsMutation) Word ¶
func (m *WordsMutation) Word() (r string, exists bool)
Word returns the value of the "word" field in the mutation.
type WordsQuery ¶
type WordsQuery struct {
// contains filtered or unexported fields
}
WordsQuery is the builder for querying Words entities.
func (*WordsQuery) Aggregate ¶
func (wq *WordsQuery) Aggregate(fns ...AggregateFunc) *WordsSelect
Aggregate returns a WordsSelect configured with the given aggregations.
func (*WordsQuery) All ¶
func (wq *WordsQuery) All(ctx context.Context) ([]*Words, error)
All executes the query and returns a list of WordsSlice.
func (*WordsQuery) AllX ¶
func (wq *WordsQuery) AllX(ctx context.Context) []*Words
AllX is like All, but panics if an error occurs.
func (*WordsQuery) Clone ¶
func (wq *WordsQuery) Clone() *WordsQuery
Clone returns a duplicate of the WordsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WordsQuery) Count ¶
func (wq *WordsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WordsQuery) CountX ¶
func (wq *WordsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WordsQuery) Exist ¶
func (wq *WordsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WordsQuery) ExistX ¶
func (wq *WordsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WordsQuery) First ¶
func (wq *WordsQuery) First(ctx context.Context) (*Words, error)
First returns the first Words entity from the query. Returns a *NotFoundError when no Words was found.
func (*WordsQuery) FirstID ¶
func (wq *WordsQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first Words ID from the query. Returns a *NotFoundError when no Words ID was found.
func (*WordsQuery) FirstIDX ¶
func (wq *WordsQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*WordsQuery) FirstX ¶
func (wq *WordsQuery) FirstX(ctx context.Context) *Words
FirstX is like First, but panics if an error occurs.
func (*WordsQuery) GroupBy ¶
func (wq *WordsQuery) GroupBy(field string, fields ...string) *WordsGroupBy
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 { Group string `json:"group,omitempty"` Count int `json:"count,omitempty"` } client.Words.Query(). GroupBy(words.FieldGroup). Aggregate(ent.Count()). Scan(ctx, &v)
func (*WordsQuery) IDs ¶
func (wq *WordsQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of Words IDs.
func (*WordsQuery) IDsX ¶
func (wq *WordsQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*WordsQuery) Limit ¶
func (wq *WordsQuery) Limit(limit int) *WordsQuery
Limit the number of records to be returned by this query.
func (*WordsQuery) Offset ¶
func (wq *WordsQuery) Offset(offset int) *WordsQuery
Offset to start from.
func (*WordsQuery) Only ¶
func (wq *WordsQuery) Only(ctx context.Context) (*Words, error)
Only returns a single Words entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Words entity is found. Returns a *NotFoundError when no Words entities are found.
func (*WordsQuery) OnlyID ¶
func (wq *WordsQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only Words ID in the query. Returns a *NotSingularError when more than one Words ID is found. Returns a *NotFoundError when no entities are found.
func (*WordsQuery) OnlyIDX ¶
func (wq *WordsQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WordsQuery) OnlyX ¶
func (wq *WordsQuery) OnlyX(ctx context.Context) *Words
OnlyX is like Only, but panics if an error occurs.
func (*WordsQuery) Order ¶
func (wq *WordsQuery) Order(o ...words.OrderOption) *WordsQuery
Order specifies how the records should be ordered.
func (*WordsQuery) Select ¶
func (wq *WordsQuery) Select(fields ...string) *WordsSelect
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 { Group string `json:"group,omitempty"` } client.Words.Query(). Select(words.FieldGroup). Scan(ctx, &v)
func (*WordsQuery) Unique ¶
func (wq *WordsQuery) Unique(unique bool) *WordsQuery
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 (*WordsQuery) Where ¶
func (wq *WordsQuery) Where(ps ...predicate.Words) *WordsQuery
Where adds a new predicate for the WordsQuery builder.
type WordsSelect ¶
type WordsSelect struct { *WordsQuery // contains filtered or unexported fields }
WordsSelect is the builder for selecting fields of Words entities.
func (*WordsSelect) Aggregate ¶
func (ws *WordsSelect) Aggregate(fns ...AggregateFunc) *WordsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*WordsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WordsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WordsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WordsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WordsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WordsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WordsSelect) Scan ¶
func (ws *WordsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WordsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WordsUpdate ¶
type WordsUpdate struct {
// contains filtered or unexported fields
}
WordsUpdate is the builder for updating Words entities.
func (*WordsUpdate) Exec ¶
func (wu *WordsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WordsUpdate) ExecX ¶
func (wu *WordsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WordsUpdate) Mutation ¶
func (wu *WordsUpdate) Mutation() *WordsMutation
Mutation returns the WordsMutation object of the builder.
func (*WordsUpdate) Save ¶
func (wu *WordsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WordsUpdate) SaveX ¶
func (wu *WordsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WordsUpdate) SetCreatedAt ¶
func (wu *WordsUpdate) SetCreatedAt(t time.Time) *WordsUpdate
SetCreatedAt sets the "created_at" field.
func (*WordsUpdate) SetGroup ¶
func (wu *WordsUpdate) SetGroup(s string) *WordsUpdate
SetGroup sets the "group" field.
func (*WordsUpdate) SetNillableCreatedAt ¶
func (wu *WordsUpdate) SetNillableCreatedAt(t *time.Time) *WordsUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*WordsUpdate) SetNillableGroup ¶
func (wu *WordsUpdate) SetNillableGroup(s *string) *WordsUpdate
SetNillableGroup sets the "group" field if the given value is not nil.
func (*WordsUpdate) SetNillableUpdatedAt ¶
func (wu *WordsUpdate) SetNillableUpdatedAt(t *time.Time) *WordsUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*WordsUpdate) SetNillableWord ¶
func (wu *WordsUpdate) SetNillableWord(s *string) *WordsUpdate
SetNillableWord sets the "word" field if the given value is not nil.
func (*WordsUpdate) SetUpdatedAt ¶
func (wu *WordsUpdate) SetUpdatedAt(t time.Time) *WordsUpdate
SetUpdatedAt sets the "updated_at" field.
func (*WordsUpdate) SetWord ¶
func (wu *WordsUpdate) SetWord(s string) *WordsUpdate
SetWord sets the "word" field.
func (*WordsUpdate) Where ¶
func (wu *WordsUpdate) Where(ps ...predicate.Words) *WordsUpdate
Where appends a list predicates to the WordsUpdate builder.
type WordsUpdateOne ¶
type WordsUpdateOne struct {
// contains filtered or unexported fields
}
WordsUpdateOne is the builder for updating a single Words entity.
func (*WordsUpdateOne) Exec ¶
func (wuo *WordsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WordsUpdateOne) ExecX ¶
func (wuo *WordsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WordsUpdateOne) Mutation ¶
func (wuo *WordsUpdateOne) Mutation() *WordsMutation
Mutation returns the WordsMutation object of the builder.
func (*WordsUpdateOne) Save ¶
func (wuo *WordsUpdateOne) Save(ctx context.Context) (*Words, error)
Save executes the query and returns the updated Words entity.
func (*WordsUpdateOne) SaveX ¶
func (wuo *WordsUpdateOne) SaveX(ctx context.Context) *Words
SaveX is like Save, but panics if an error occurs.
func (*WordsUpdateOne) Select ¶
func (wuo *WordsUpdateOne) Select(field string, fields ...string) *WordsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WordsUpdateOne) SetCreatedAt ¶
func (wuo *WordsUpdateOne) SetCreatedAt(t time.Time) *WordsUpdateOne
SetCreatedAt sets the "created_at" field.
func (*WordsUpdateOne) SetGroup ¶
func (wuo *WordsUpdateOne) SetGroup(s string) *WordsUpdateOne
SetGroup sets the "group" field.
func (*WordsUpdateOne) SetNillableCreatedAt ¶
func (wuo *WordsUpdateOne) SetNillableCreatedAt(t *time.Time) *WordsUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*WordsUpdateOne) SetNillableGroup ¶
func (wuo *WordsUpdateOne) SetNillableGroup(s *string) *WordsUpdateOne
SetNillableGroup sets the "group" field if the given value is not nil.
func (*WordsUpdateOne) SetNillableUpdatedAt ¶
func (wuo *WordsUpdateOne) SetNillableUpdatedAt(t *time.Time) *WordsUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*WordsUpdateOne) SetNillableWord ¶
func (wuo *WordsUpdateOne) SetNillableWord(s *string) *WordsUpdateOne
SetNillableWord sets the "word" field if the given value is not nil.
func (*WordsUpdateOne) SetUpdatedAt ¶
func (wuo *WordsUpdateOne) SetUpdatedAt(t time.Time) *WordsUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*WordsUpdateOne) SetWord ¶
func (wuo *WordsUpdateOne) SetWord(s string) *WordsUpdateOne
SetWord sets the "word" field.
func (*WordsUpdateOne) Where ¶
func (wuo *WordsUpdateOne) Where(ps ...predicate.Words) *WordsUpdateOne
Where appends a list predicates to the WordsUpdate builder.