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 EmailTemplate
- type EmailTemplateClient
- func (c *EmailTemplateClient) Create() *EmailTemplateCreate
- func (c *EmailTemplateClient) CreateBulk(builders ...*EmailTemplateCreate) *EmailTemplateCreateBulk
- func (c *EmailTemplateClient) Delete() *EmailTemplateDelete
- func (c *EmailTemplateClient) DeleteOne(et *EmailTemplate) *EmailTemplateDeleteOne
- func (c *EmailTemplateClient) DeleteOneID(id int) *EmailTemplateDeleteOne
- func (c *EmailTemplateClient) Get(ctx context.Context, id int) (*EmailTemplate, error)
- func (c *EmailTemplateClient) GetX(ctx context.Context, id int) *EmailTemplate
- func (c *EmailTemplateClient) Hooks() []Hook
- func (c *EmailTemplateClient) Intercept(interceptors ...Interceptor)
- func (c *EmailTemplateClient) Interceptors() []Interceptor
- func (c *EmailTemplateClient) MapCreateBulk(slice any, setFunc func(*EmailTemplateCreate, int)) *EmailTemplateCreateBulk
- func (c *EmailTemplateClient) Query() *EmailTemplateQuery
- func (c *EmailTemplateClient) Update() *EmailTemplateUpdate
- func (c *EmailTemplateClient) UpdateOne(et *EmailTemplate) *EmailTemplateUpdateOne
- func (c *EmailTemplateClient) UpdateOneID(id int) *EmailTemplateUpdateOne
- func (c *EmailTemplateClient) Use(hooks ...Hook)
- type EmailTemplateCreate
- func (etc *EmailTemplateCreate) Exec(ctx context.Context) error
- func (etc *EmailTemplateCreate) ExecX(ctx context.Context)
- func (etc *EmailTemplateCreate) Mutation() *EmailTemplateMutation
- func (etc *EmailTemplateCreate) Save(ctx context.Context) (*EmailTemplate, error)
- func (etc *EmailTemplateCreate) SaveX(ctx context.Context) *EmailTemplate
- func (etc *EmailTemplateCreate) SetContent(s string) *EmailTemplateCreate
- func (etc *EmailTemplateCreate) SetNillableContent(s *string) *EmailTemplateCreate
- func (etc *EmailTemplateCreate) SetNillableTemplateCode(s *string) *EmailTemplateCreate
- func (etc *EmailTemplateCreate) SetTemplateCode(s string) *EmailTemplateCreate
- type EmailTemplateCreateBulk
- func (etcb *EmailTemplateCreateBulk) Exec(ctx context.Context) error
- func (etcb *EmailTemplateCreateBulk) ExecX(ctx context.Context)
- func (etcb *EmailTemplateCreateBulk) Save(ctx context.Context) ([]*EmailTemplate, error)
- func (etcb *EmailTemplateCreateBulk) SaveX(ctx context.Context) []*EmailTemplate
- type EmailTemplateDelete
- type EmailTemplateDeleteOne
- type EmailTemplateGroupBy
- func (etgb *EmailTemplateGroupBy) Aggregate(fns ...AggregateFunc) *EmailTemplateGroupBy
- func (s *EmailTemplateGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EmailTemplateGroupBy) BoolX(ctx context.Context) bool
- func (s *EmailTemplateGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EmailTemplateGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EmailTemplateGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EmailTemplateGroupBy) Float64X(ctx context.Context) float64
- func (s *EmailTemplateGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EmailTemplateGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EmailTemplateGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EmailTemplateGroupBy) IntX(ctx context.Context) int
- func (s *EmailTemplateGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EmailTemplateGroupBy) IntsX(ctx context.Context) []int
- func (etgb *EmailTemplateGroupBy) Scan(ctx context.Context, v any) error
- func (s *EmailTemplateGroupBy) ScanX(ctx context.Context, v any)
- func (s *EmailTemplateGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EmailTemplateGroupBy) StringX(ctx context.Context) string
- func (s *EmailTemplateGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EmailTemplateGroupBy) StringsX(ctx context.Context) []string
- type EmailTemplateMutation
- func (m *EmailTemplateMutation) AddField(name string, value ent.Value) error
- func (m *EmailTemplateMutation) AddedEdges() []string
- func (m *EmailTemplateMutation) AddedField(name string) (ent.Value, bool)
- func (m *EmailTemplateMutation) AddedFields() []string
- func (m *EmailTemplateMutation) AddedIDs(name string) []ent.Value
- func (m *EmailTemplateMutation) ClearEdge(name string) error
- func (m *EmailTemplateMutation) ClearField(name string) error
- func (m *EmailTemplateMutation) ClearedEdges() []string
- func (m *EmailTemplateMutation) ClearedFields() []string
- func (m EmailTemplateMutation) Client() *Client
- func (m *EmailTemplateMutation) Content() (r string, exists bool)
- func (m *EmailTemplateMutation) EdgeCleared(name string) bool
- func (m *EmailTemplateMutation) Field(name string) (ent.Value, bool)
- func (m *EmailTemplateMutation) FieldCleared(name string) bool
- func (m *EmailTemplateMutation) Fields() []string
- func (m *EmailTemplateMutation) ID() (id int, exists bool)
- func (m *EmailTemplateMutation) IDs(ctx context.Context) ([]int, error)
- func (m *EmailTemplateMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *EmailTemplateMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EmailTemplateMutation) OldTemplateCode(ctx context.Context) (v string, err error)
- func (m *EmailTemplateMutation) Op() Op
- func (m *EmailTemplateMutation) RemovedEdges() []string
- func (m *EmailTemplateMutation) RemovedIDs(name string) []ent.Value
- func (m *EmailTemplateMutation) ResetContent()
- func (m *EmailTemplateMutation) ResetEdge(name string) error
- func (m *EmailTemplateMutation) ResetField(name string) error
- func (m *EmailTemplateMutation) ResetTemplateCode()
- func (m *EmailTemplateMutation) SetContent(s string)
- func (m *EmailTemplateMutation) SetField(name string, value ent.Value) error
- func (m *EmailTemplateMutation) SetOp(op Op)
- func (m *EmailTemplateMutation) SetTemplateCode(s string)
- func (m *EmailTemplateMutation) TemplateCode() (r string, exists bool)
- func (m EmailTemplateMutation) Tx() (*Tx, error)
- func (m *EmailTemplateMutation) Type() string
- func (m *EmailTemplateMutation) Where(ps ...predicate.EmailTemplate)
- func (m *EmailTemplateMutation) WhereP(ps ...func(*sql.Selector))
- type EmailTemplateQuery
- func (etq *EmailTemplateQuery) Aggregate(fns ...AggregateFunc) *EmailTemplateSelect
- func (etq *EmailTemplateQuery) All(ctx context.Context) ([]*EmailTemplate, error)
- func (etq *EmailTemplateQuery) AllX(ctx context.Context) []*EmailTemplate
- func (etq *EmailTemplateQuery) Clone() *EmailTemplateQuery
- func (etq *EmailTemplateQuery) Count(ctx context.Context) (int, error)
- func (etq *EmailTemplateQuery) CountX(ctx context.Context) int
- func (etq *EmailTemplateQuery) Exist(ctx context.Context) (bool, error)
- func (etq *EmailTemplateQuery) ExistX(ctx context.Context) bool
- func (etq *EmailTemplateQuery) First(ctx context.Context) (*EmailTemplate, error)
- func (etq *EmailTemplateQuery) FirstID(ctx context.Context) (id int, err error)
- func (etq *EmailTemplateQuery) FirstIDX(ctx context.Context) int
- func (etq *EmailTemplateQuery) FirstX(ctx context.Context) *EmailTemplate
- func (etq *EmailTemplateQuery) GroupBy(field string, fields ...string) *EmailTemplateGroupBy
- func (etq *EmailTemplateQuery) IDs(ctx context.Context) (ids []int, err error)
- func (etq *EmailTemplateQuery) IDsX(ctx context.Context) []int
- func (etq *EmailTemplateQuery) Limit(limit int) *EmailTemplateQuery
- func (etq *EmailTemplateQuery) Offset(offset int) *EmailTemplateQuery
- func (etq *EmailTemplateQuery) Only(ctx context.Context) (*EmailTemplate, error)
- func (etq *EmailTemplateQuery) OnlyID(ctx context.Context) (id int, err error)
- func (etq *EmailTemplateQuery) OnlyIDX(ctx context.Context) int
- func (etq *EmailTemplateQuery) OnlyX(ctx context.Context) *EmailTemplate
- func (etq *EmailTemplateQuery) Order(o ...emailtemplate.OrderOption) *EmailTemplateQuery
- func (etq *EmailTemplateQuery) Select(fields ...string) *EmailTemplateSelect
- func (etq *EmailTemplateQuery) Unique(unique bool) *EmailTemplateQuery
- func (etq *EmailTemplateQuery) Where(ps ...predicate.EmailTemplate) *EmailTemplateQuery
- type EmailTemplateSelect
- func (ets *EmailTemplateSelect) Aggregate(fns ...AggregateFunc) *EmailTemplateSelect
- func (s *EmailTemplateSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EmailTemplateSelect) BoolX(ctx context.Context) bool
- func (s *EmailTemplateSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EmailTemplateSelect) BoolsX(ctx context.Context) []bool
- func (s *EmailTemplateSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EmailTemplateSelect) Float64X(ctx context.Context) float64
- func (s *EmailTemplateSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EmailTemplateSelect) Float64sX(ctx context.Context) []float64
- func (s *EmailTemplateSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EmailTemplateSelect) IntX(ctx context.Context) int
- func (s *EmailTemplateSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EmailTemplateSelect) IntsX(ctx context.Context) []int
- func (ets *EmailTemplateSelect) Scan(ctx context.Context, v any) error
- func (s *EmailTemplateSelect) ScanX(ctx context.Context, v any)
- func (s *EmailTemplateSelect) String(ctx context.Context) (_ string, err error)
- func (s *EmailTemplateSelect) StringX(ctx context.Context) string
- func (s *EmailTemplateSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EmailTemplateSelect) StringsX(ctx context.Context) []string
- type EmailTemplateUpdate
- func (etu *EmailTemplateUpdate) Exec(ctx context.Context) error
- func (etu *EmailTemplateUpdate) ExecX(ctx context.Context)
- func (etu *EmailTemplateUpdate) Mutation() *EmailTemplateMutation
- func (etu *EmailTemplateUpdate) Save(ctx context.Context) (int, error)
- func (etu *EmailTemplateUpdate) SaveX(ctx context.Context) int
- func (etu *EmailTemplateUpdate) SetContent(s string) *EmailTemplateUpdate
- func (etu *EmailTemplateUpdate) SetNillableContent(s *string) *EmailTemplateUpdate
- func (etu *EmailTemplateUpdate) SetNillableTemplateCode(s *string) *EmailTemplateUpdate
- func (etu *EmailTemplateUpdate) SetTemplateCode(s string) *EmailTemplateUpdate
- func (etu *EmailTemplateUpdate) Where(ps ...predicate.EmailTemplate) *EmailTemplateUpdate
- type EmailTemplateUpdateOne
- func (etuo *EmailTemplateUpdateOne) Exec(ctx context.Context) error
- func (etuo *EmailTemplateUpdateOne) ExecX(ctx context.Context)
- func (etuo *EmailTemplateUpdateOne) Mutation() *EmailTemplateMutation
- func (etuo *EmailTemplateUpdateOne) Save(ctx context.Context) (*EmailTemplate, error)
- func (etuo *EmailTemplateUpdateOne) SaveX(ctx context.Context) *EmailTemplate
- func (etuo *EmailTemplateUpdateOne) Select(field string, fields ...string) *EmailTemplateUpdateOne
- func (etuo *EmailTemplateUpdateOne) SetContent(s string) *EmailTemplateUpdateOne
- func (etuo *EmailTemplateUpdateOne) SetNillableContent(s *string) *EmailTemplateUpdateOne
- func (etuo *EmailTemplateUpdateOne) SetNillableTemplateCode(s *string) *EmailTemplateUpdateOne
- func (etuo *EmailTemplateUpdateOne) SetTemplateCode(s string) *EmailTemplateUpdateOne
- func (etuo *EmailTemplateUpdateOne) Where(ps ...predicate.EmailTemplate) *EmailTemplateUpdateOne
- type EmailTemplates
- 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 UserEmailLang
- type UserEmailLangClient
- func (c *UserEmailLangClient) Create() *UserEmailLangCreate
- func (c *UserEmailLangClient) CreateBulk(builders ...*UserEmailLangCreate) *UserEmailLangCreateBulk
- func (c *UserEmailLangClient) Delete() *UserEmailLangDelete
- func (c *UserEmailLangClient) DeleteOne(uel *UserEmailLang) *UserEmailLangDeleteOne
- func (c *UserEmailLangClient) DeleteOneID(id int) *UserEmailLangDeleteOne
- func (c *UserEmailLangClient) Get(ctx context.Context, id int) (*UserEmailLang, error)
- func (c *UserEmailLangClient) GetX(ctx context.Context, id int) *UserEmailLang
- func (c *UserEmailLangClient) Hooks() []Hook
- func (c *UserEmailLangClient) Intercept(interceptors ...Interceptor)
- func (c *UserEmailLangClient) Interceptors() []Interceptor
- func (c *UserEmailLangClient) MapCreateBulk(slice any, setFunc func(*UserEmailLangCreate, int)) *UserEmailLangCreateBulk
- func (c *UserEmailLangClient) Query() *UserEmailLangQuery
- func (c *UserEmailLangClient) Update() *UserEmailLangUpdate
- func (c *UserEmailLangClient) UpdateOne(uel *UserEmailLang) *UserEmailLangUpdateOne
- func (c *UserEmailLangClient) UpdateOneID(id int) *UserEmailLangUpdateOne
- func (c *UserEmailLangClient) Use(hooks ...Hook)
- type UserEmailLangCreate
- func (uelc *UserEmailLangCreate) Exec(ctx context.Context) error
- func (uelc *UserEmailLangCreate) ExecX(ctx context.Context)
- func (uelc *UserEmailLangCreate) Mutation() *UserEmailLangMutation
- func (uelc *UserEmailLangCreate) Save(ctx context.Context) (*UserEmailLang, error)
- func (uelc *UserEmailLangCreate) SaveX(ctx context.Context) *UserEmailLang
- func (uelc *UserEmailLangCreate) SetCountry(s string) *UserEmailLangCreate
- func (uelc *UserEmailLangCreate) SetEmail(s string) *UserEmailLangCreate
- func (uelc *UserEmailLangCreate) SetNillableCountry(s *string) *UserEmailLangCreate
- func (uelc *UserEmailLangCreate) SetNillableEmail(s *string) *UserEmailLangCreate
- type UserEmailLangCreateBulk
- func (uelcb *UserEmailLangCreateBulk) Exec(ctx context.Context) error
- func (uelcb *UserEmailLangCreateBulk) ExecX(ctx context.Context)
- func (uelcb *UserEmailLangCreateBulk) Save(ctx context.Context) ([]*UserEmailLang, error)
- func (uelcb *UserEmailLangCreateBulk) SaveX(ctx context.Context) []*UserEmailLang
- type UserEmailLangDelete
- type UserEmailLangDeleteOne
- type UserEmailLangGroupBy
- func (uelgb *UserEmailLangGroupBy) Aggregate(fns ...AggregateFunc) *UserEmailLangGroupBy
- func (s *UserEmailLangGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserEmailLangGroupBy) BoolX(ctx context.Context) bool
- func (s *UserEmailLangGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserEmailLangGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserEmailLangGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserEmailLangGroupBy) Float64X(ctx context.Context) float64
- func (s *UserEmailLangGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserEmailLangGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserEmailLangGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserEmailLangGroupBy) IntX(ctx context.Context) int
- func (s *UserEmailLangGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserEmailLangGroupBy) IntsX(ctx context.Context) []int
- func (uelgb *UserEmailLangGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserEmailLangGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserEmailLangGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserEmailLangGroupBy) StringX(ctx context.Context) string
- func (s *UserEmailLangGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserEmailLangGroupBy) StringsX(ctx context.Context) []string
- type UserEmailLangMutation
- func (m *UserEmailLangMutation) AddField(name string, value ent.Value) error
- func (m *UserEmailLangMutation) AddedEdges() []string
- func (m *UserEmailLangMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserEmailLangMutation) AddedFields() []string
- func (m *UserEmailLangMutation) AddedIDs(name string) []ent.Value
- func (m *UserEmailLangMutation) ClearEdge(name string) error
- func (m *UserEmailLangMutation) ClearField(name string) error
- func (m *UserEmailLangMutation) ClearedEdges() []string
- func (m *UserEmailLangMutation) ClearedFields() []string
- func (m UserEmailLangMutation) Client() *Client
- func (m *UserEmailLangMutation) Country() (r string, exists bool)
- func (m *UserEmailLangMutation) EdgeCleared(name string) bool
- func (m *UserEmailLangMutation) Email() (r string, exists bool)
- func (m *UserEmailLangMutation) Field(name string) (ent.Value, bool)
- func (m *UserEmailLangMutation) FieldCleared(name string) bool
- func (m *UserEmailLangMutation) Fields() []string
- func (m *UserEmailLangMutation) ID() (id int, exists bool)
- func (m *UserEmailLangMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserEmailLangMutation) OldCountry(ctx context.Context) (v string, err error)
- func (m *UserEmailLangMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserEmailLangMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserEmailLangMutation) Op() Op
- func (m *UserEmailLangMutation) RemovedEdges() []string
- func (m *UserEmailLangMutation) RemovedIDs(name string) []ent.Value
- func (m *UserEmailLangMutation) ResetCountry()
- func (m *UserEmailLangMutation) ResetEdge(name string) error
- func (m *UserEmailLangMutation) ResetEmail()
- func (m *UserEmailLangMutation) ResetField(name string) error
- func (m *UserEmailLangMutation) SetCountry(s string)
- func (m *UserEmailLangMutation) SetEmail(s string)
- func (m *UserEmailLangMutation) SetField(name string, value ent.Value) error
- func (m *UserEmailLangMutation) SetOp(op Op)
- func (m UserEmailLangMutation) Tx() (*Tx, error)
- func (m *UserEmailLangMutation) Type() string
- func (m *UserEmailLangMutation) Where(ps ...predicate.UserEmailLang)
- func (m *UserEmailLangMutation) WhereP(ps ...func(*sql.Selector))
- type UserEmailLangQuery
- func (uelq *UserEmailLangQuery) Aggregate(fns ...AggregateFunc) *UserEmailLangSelect
- func (uelq *UserEmailLangQuery) All(ctx context.Context) ([]*UserEmailLang, error)
- func (uelq *UserEmailLangQuery) AllX(ctx context.Context) []*UserEmailLang
- func (uelq *UserEmailLangQuery) Clone() *UserEmailLangQuery
- func (uelq *UserEmailLangQuery) Count(ctx context.Context) (int, error)
- func (uelq *UserEmailLangQuery) CountX(ctx context.Context) int
- func (uelq *UserEmailLangQuery) Exist(ctx context.Context) (bool, error)
- func (uelq *UserEmailLangQuery) ExistX(ctx context.Context) bool
- func (uelq *UserEmailLangQuery) First(ctx context.Context) (*UserEmailLang, error)
- func (uelq *UserEmailLangQuery) FirstID(ctx context.Context) (id int, err error)
- func (uelq *UserEmailLangQuery) FirstIDX(ctx context.Context) int
- func (uelq *UserEmailLangQuery) FirstX(ctx context.Context) *UserEmailLang
- func (uelq *UserEmailLangQuery) GroupBy(field string, fields ...string) *UserEmailLangGroupBy
- func (uelq *UserEmailLangQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uelq *UserEmailLangQuery) IDsX(ctx context.Context) []int
- func (uelq *UserEmailLangQuery) Limit(limit int) *UserEmailLangQuery
- func (uelq *UserEmailLangQuery) Offset(offset int) *UserEmailLangQuery
- func (uelq *UserEmailLangQuery) Only(ctx context.Context) (*UserEmailLang, error)
- func (uelq *UserEmailLangQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uelq *UserEmailLangQuery) OnlyIDX(ctx context.Context) int
- func (uelq *UserEmailLangQuery) OnlyX(ctx context.Context) *UserEmailLang
- func (uelq *UserEmailLangQuery) Order(o ...useremaillang.OrderOption) *UserEmailLangQuery
- func (uelq *UserEmailLangQuery) Select(fields ...string) *UserEmailLangSelect
- func (uelq *UserEmailLangQuery) Unique(unique bool) *UserEmailLangQuery
- func (uelq *UserEmailLangQuery) Where(ps ...predicate.UserEmailLang) *UserEmailLangQuery
- type UserEmailLangSelect
- func (uels *UserEmailLangSelect) Aggregate(fns ...AggregateFunc) *UserEmailLangSelect
- func (s *UserEmailLangSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserEmailLangSelect) BoolX(ctx context.Context) bool
- func (s *UserEmailLangSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserEmailLangSelect) BoolsX(ctx context.Context) []bool
- func (s *UserEmailLangSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserEmailLangSelect) Float64X(ctx context.Context) float64
- func (s *UserEmailLangSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserEmailLangSelect) Float64sX(ctx context.Context) []float64
- func (s *UserEmailLangSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserEmailLangSelect) IntX(ctx context.Context) int
- func (s *UserEmailLangSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserEmailLangSelect) IntsX(ctx context.Context) []int
- func (uels *UserEmailLangSelect) Scan(ctx context.Context, v any) error
- func (s *UserEmailLangSelect) ScanX(ctx context.Context, v any)
- func (s *UserEmailLangSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserEmailLangSelect) StringX(ctx context.Context) string
- func (s *UserEmailLangSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserEmailLangSelect) StringsX(ctx context.Context) []string
- type UserEmailLangUpdate
- func (uelu *UserEmailLangUpdate) Exec(ctx context.Context) error
- func (uelu *UserEmailLangUpdate) ExecX(ctx context.Context)
- func (uelu *UserEmailLangUpdate) Mutation() *UserEmailLangMutation
- func (uelu *UserEmailLangUpdate) Save(ctx context.Context) (int, error)
- func (uelu *UserEmailLangUpdate) SaveX(ctx context.Context) int
- func (uelu *UserEmailLangUpdate) SetCountry(s string) *UserEmailLangUpdate
- func (uelu *UserEmailLangUpdate) SetEmail(s string) *UserEmailLangUpdate
- func (uelu *UserEmailLangUpdate) SetNillableCountry(s *string) *UserEmailLangUpdate
- func (uelu *UserEmailLangUpdate) SetNillableEmail(s *string) *UserEmailLangUpdate
- func (uelu *UserEmailLangUpdate) Where(ps ...predicate.UserEmailLang) *UserEmailLangUpdate
- type UserEmailLangUpdateOne
- func (ueluo *UserEmailLangUpdateOne) Exec(ctx context.Context) error
- func (ueluo *UserEmailLangUpdateOne) ExecX(ctx context.Context)
- func (ueluo *UserEmailLangUpdateOne) Mutation() *UserEmailLangMutation
- func (ueluo *UserEmailLangUpdateOne) Save(ctx context.Context) (*UserEmailLang, error)
- func (ueluo *UserEmailLangUpdateOne) SaveX(ctx context.Context) *UserEmailLang
- func (ueluo *UserEmailLangUpdateOne) Select(field string, fields ...string) *UserEmailLangUpdateOne
- func (ueluo *UserEmailLangUpdateOne) SetCountry(s string) *UserEmailLangUpdateOne
- func (ueluo *UserEmailLangUpdateOne) SetEmail(s string) *UserEmailLangUpdateOne
- func (ueluo *UserEmailLangUpdateOne) SetNillableCountry(s *string) *UserEmailLangUpdateOne
- func (ueluo *UserEmailLangUpdateOne) SetNillableEmail(s *string) *UserEmailLangUpdateOne
- func (ueluo *UserEmailLangUpdateOne) Where(ps ...predicate.UserEmailLang) *UserEmailLangUpdateOne
- type UserEmailLangs
- 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. TypeEmailTemplate = "EmailTemplate" TypeUserEmailLang = "UserEmailLang" )
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 // EmailTemplate is the client for interacting with the EmailTemplate builders. EmailTemplate *EmailTemplateClient // UserEmailLang is the client for interacting with the UserEmailLang builders. UserEmailLang *UserEmailLangClient // 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(). EmailTemplate. 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 EmailTemplate ¶
type EmailTemplate struct { // ID of the ent. ID int `json:"id,omitempty"` // TemplateCode holds the value of the "template_code" field. TemplateCode string `json:"template_code,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,omitempty"` // contains filtered or unexported fields }
EmailTemplate is the model entity for the EmailTemplate schema.
func (*EmailTemplate) String ¶
func (et *EmailTemplate) String() string
String implements the fmt.Stringer.
func (*EmailTemplate) Unwrap ¶
func (et *EmailTemplate) Unwrap() *EmailTemplate
Unwrap unwraps the EmailTemplate 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 (*EmailTemplate) Update ¶
func (et *EmailTemplate) Update() *EmailTemplateUpdateOne
Update returns a builder for updating this EmailTemplate. Note that you need to call EmailTemplate.Unwrap() before calling this method if this EmailTemplate was returned from a transaction, and the transaction was committed or rolled back.
type EmailTemplateClient ¶
type EmailTemplateClient struct {
// contains filtered or unexported fields
}
EmailTemplateClient is a client for the EmailTemplate schema.
func NewEmailTemplateClient ¶
func NewEmailTemplateClient(c config) *EmailTemplateClient
NewEmailTemplateClient returns a client for the EmailTemplate from the given config.
func (*EmailTemplateClient) Create ¶
func (c *EmailTemplateClient) Create() *EmailTemplateCreate
Create returns a builder for creating a EmailTemplate entity.
func (*EmailTemplateClient) CreateBulk ¶
func (c *EmailTemplateClient) CreateBulk(builders ...*EmailTemplateCreate) *EmailTemplateCreateBulk
CreateBulk returns a builder for creating a bulk of EmailTemplate entities.
func (*EmailTemplateClient) Delete ¶
func (c *EmailTemplateClient) Delete() *EmailTemplateDelete
Delete returns a delete builder for EmailTemplate.
func (*EmailTemplateClient) DeleteOne ¶
func (c *EmailTemplateClient) DeleteOne(et *EmailTemplate) *EmailTemplateDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EmailTemplateClient) DeleteOneID ¶
func (c *EmailTemplateClient) DeleteOneID(id int) *EmailTemplateDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EmailTemplateClient) Get ¶
func (c *EmailTemplateClient) Get(ctx context.Context, id int) (*EmailTemplate, error)
Get returns a EmailTemplate entity by its id.
func (*EmailTemplateClient) GetX ¶
func (c *EmailTemplateClient) GetX(ctx context.Context, id int) *EmailTemplate
GetX is like Get, but panics if an error occurs.
func (*EmailTemplateClient) Hooks ¶
func (c *EmailTemplateClient) Hooks() []Hook
Hooks returns the client hooks.
func (*EmailTemplateClient) Intercept ¶
func (c *EmailTemplateClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `emailtemplate.Intercept(f(g(h())))`.
func (*EmailTemplateClient) Interceptors ¶
func (c *EmailTemplateClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EmailTemplateClient) MapCreateBulk ¶
func (c *EmailTemplateClient) MapCreateBulk(slice any, setFunc func(*EmailTemplateCreate, int)) *EmailTemplateCreateBulk
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 (*EmailTemplateClient) Query ¶
func (c *EmailTemplateClient) Query() *EmailTemplateQuery
Query returns a query builder for EmailTemplate.
func (*EmailTemplateClient) Update ¶
func (c *EmailTemplateClient) Update() *EmailTemplateUpdate
Update returns an update builder for EmailTemplate.
func (*EmailTemplateClient) UpdateOne ¶
func (c *EmailTemplateClient) UpdateOne(et *EmailTemplate) *EmailTemplateUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EmailTemplateClient) UpdateOneID ¶
func (c *EmailTemplateClient) UpdateOneID(id int) *EmailTemplateUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EmailTemplateClient) Use ¶
func (c *EmailTemplateClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `emailtemplate.Hooks(f(g(h())))`.
type EmailTemplateCreate ¶
type EmailTemplateCreate struct {
// contains filtered or unexported fields
}
EmailTemplateCreate is the builder for creating a EmailTemplate entity.
func (*EmailTemplateCreate) Exec ¶
func (etc *EmailTemplateCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EmailTemplateCreate) ExecX ¶
func (etc *EmailTemplateCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmailTemplateCreate) Mutation ¶
func (etc *EmailTemplateCreate) Mutation() *EmailTemplateMutation
Mutation returns the EmailTemplateMutation object of the builder.
func (*EmailTemplateCreate) Save ¶
func (etc *EmailTemplateCreate) Save(ctx context.Context) (*EmailTemplate, error)
Save creates the EmailTemplate in the database.
func (*EmailTemplateCreate) SaveX ¶
func (etc *EmailTemplateCreate) SaveX(ctx context.Context) *EmailTemplate
SaveX calls Save and panics if Save returns an error.
func (*EmailTemplateCreate) SetContent ¶
func (etc *EmailTemplateCreate) SetContent(s string) *EmailTemplateCreate
SetContent sets the "content" field.
func (*EmailTemplateCreate) SetNillableContent ¶
func (etc *EmailTemplateCreate) SetNillableContent(s *string) *EmailTemplateCreate
SetNillableContent sets the "content" field if the given value is not nil.
func (*EmailTemplateCreate) SetNillableTemplateCode ¶
func (etc *EmailTemplateCreate) SetNillableTemplateCode(s *string) *EmailTemplateCreate
SetNillableTemplateCode sets the "template_code" field if the given value is not nil.
func (*EmailTemplateCreate) SetTemplateCode ¶
func (etc *EmailTemplateCreate) SetTemplateCode(s string) *EmailTemplateCreate
SetTemplateCode sets the "template_code" field.
type EmailTemplateCreateBulk ¶
type EmailTemplateCreateBulk struct {
// contains filtered or unexported fields
}
EmailTemplateCreateBulk is the builder for creating many EmailTemplate entities in bulk.
func (*EmailTemplateCreateBulk) Exec ¶
func (etcb *EmailTemplateCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EmailTemplateCreateBulk) ExecX ¶
func (etcb *EmailTemplateCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmailTemplateCreateBulk) Save ¶
func (etcb *EmailTemplateCreateBulk) Save(ctx context.Context) ([]*EmailTemplate, error)
Save creates the EmailTemplate entities in the database.
func (*EmailTemplateCreateBulk) SaveX ¶
func (etcb *EmailTemplateCreateBulk) SaveX(ctx context.Context) []*EmailTemplate
SaveX is like Save, but panics if an error occurs.
type EmailTemplateDelete ¶
type EmailTemplateDelete struct {
// contains filtered or unexported fields
}
EmailTemplateDelete is the builder for deleting a EmailTemplate entity.
func (*EmailTemplateDelete) Exec ¶
func (etd *EmailTemplateDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EmailTemplateDelete) ExecX ¶
func (etd *EmailTemplateDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EmailTemplateDelete) Where ¶
func (etd *EmailTemplateDelete) Where(ps ...predicate.EmailTemplate) *EmailTemplateDelete
Where appends a list predicates to the EmailTemplateDelete builder.
type EmailTemplateDeleteOne ¶
type EmailTemplateDeleteOne struct {
// contains filtered or unexported fields
}
EmailTemplateDeleteOne is the builder for deleting a single EmailTemplate entity.
func (*EmailTemplateDeleteOne) Exec ¶
func (etdo *EmailTemplateDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EmailTemplateDeleteOne) ExecX ¶
func (etdo *EmailTemplateDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmailTemplateDeleteOne) Where ¶
func (etdo *EmailTemplateDeleteOne) Where(ps ...predicate.EmailTemplate) *EmailTemplateDeleteOne
Where appends a list predicates to the EmailTemplateDelete builder.
type EmailTemplateGroupBy ¶
type EmailTemplateGroupBy struct {
// contains filtered or unexported fields
}
EmailTemplateGroupBy is the group-by builder for EmailTemplate entities.
func (*EmailTemplateGroupBy) Aggregate ¶
func (etgb *EmailTemplateGroupBy) Aggregate(fns ...AggregateFunc) *EmailTemplateGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EmailTemplateGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EmailTemplateGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EmailTemplateGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EmailTemplateGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EmailTemplateGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EmailTemplateGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EmailTemplateGroupBy) Scan ¶
func (etgb *EmailTemplateGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EmailTemplateGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EmailTemplateMutation ¶
type EmailTemplateMutation struct {
// contains filtered or unexported fields
}
EmailTemplateMutation represents an operation that mutates the EmailTemplate nodes in the graph.
func (*EmailTemplateMutation) AddField ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) AddedEdges ¶
func (m *EmailTemplateMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EmailTemplateMutation) AddedField ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) AddedFields ¶
func (m *EmailTemplateMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EmailTemplateMutation) AddedIDs ¶
func (m *EmailTemplateMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EmailTemplateMutation) ClearEdge ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) ClearField ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) ClearedEdges ¶
func (m *EmailTemplateMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EmailTemplateMutation) ClearedFields ¶
func (m *EmailTemplateMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EmailTemplateMutation) Client ¶
func (m EmailTemplateMutation) 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 (*EmailTemplateMutation) Content ¶
func (m *EmailTemplateMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*EmailTemplateMutation) EdgeCleared ¶
func (m *EmailTemplateMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EmailTemplateMutation) Field ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) FieldCleared ¶
func (m *EmailTemplateMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EmailTemplateMutation) Fields ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) ID ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) IDs ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) OldContent ¶
func (m *EmailTemplateMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the EmailTemplate entity. If the EmailTemplate 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 (*EmailTemplateMutation) 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 (*EmailTemplateMutation) OldTemplateCode ¶
func (m *EmailTemplateMutation) OldTemplateCode(ctx context.Context) (v string, err error)
OldTemplateCode returns the old "template_code" field's value of the EmailTemplate entity. If the EmailTemplate 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 (*EmailTemplateMutation) Op ¶
func (m *EmailTemplateMutation) Op() Op
Op returns the operation name.
func (*EmailTemplateMutation) RemovedEdges ¶
func (m *EmailTemplateMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EmailTemplateMutation) RemovedIDs ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) ResetContent ¶
func (m *EmailTemplateMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*EmailTemplateMutation) ResetEdge ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) ResetField ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) ResetTemplateCode ¶
func (m *EmailTemplateMutation) ResetTemplateCode()
ResetTemplateCode resets all changes to the "template_code" field.
func (*EmailTemplateMutation) SetContent ¶
func (m *EmailTemplateMutation) SetContent(s string)
SetContent sets the "content" field.
func (*EmailTemplateMutation) SetField ¶
func (m *EmailTemplateMutation) 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 (*EmailTemplateMutation) SetOp ¶
func (m *EmailTemplateMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*EmailTemplateMutation) SetTemplateCode ¶
func (m *EmailTemplateMutation) SetTemplateCode(s string)
SetTemplateCode sets the "template_code" field.
func (*EmailTemplateMutation) TemplateCode ¶
func (m *EmailTemplateMutation) TemplateCode() (r string, exists bool)
TemplateCode returns the value of the "template_code" field in the mutation.
func (EmailTemplateMutation) Tx ¶
func (m EmailTemplateMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EmailTemplateMutation) Type ¶
func (m *EmailTemplateMutation) Type() string
Type returns the node type of this mutation (EmailTemplate).
func (*EmailTemplateMutation) Where ¶
func (m *EmailTemplateMutation) Where(ps ...predicate.EmailTemplate)
Where appends a list predicates to the EmailTemplateMutation builder.
func (*EmailTemplateMutation) WhereP ¶
func (m *EmailTemplateMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EmailTemplateMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EmailTemplateQuery ¶
type EmailTemplateQuery struct {
// contains filtered or unexported fields
}
EmailTemplateQuery is the builder for querying EmailTemplate entities.
func (*EmailTemplateQuery) Aggregate ¶
func (etq *EmailTemplateQuery) Aggregate(fns ...AggregateFunc) *EmailTemplateSelect
Aggregate returns a EmailTemplateSelect configured with the given aggregations.
func (*EmailTemplateQuery) All ¶
func (etq *EmailTemplateQuery) All(ctx context.Context) ([]*EmailTemplate, error)
All executes the query and returns a list of EmailTemplates.
func (*EmailTemplateQuery) AllX ¶
func (etq *EmailTemplateQuery) AllX(ctx context.Context) []*EmailTemplate
AllX is like All, but panics if an error occurs.
func (*EmailTemplateQuery) Clone ¶
func (etq *EmailTemplateQuery) Clone() *EmailTemplateQuery
Clone returns a duplicate of the EmailTemplateQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EmailTemplateQuery) Count ¶
func (etq *EmailTemplateQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EmailTemplateQuery) CountX ¶
func (etq *EmailTemplateQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EmailTemplateQuery) Exist ¶
func (etq *EmailTemplateQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EmailTemplateQuery) ExistX ¶
func (etq *EmailTemplateQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EmailTemplateQuery) First ¶
func (etq *EmailTemplateQuery) First(ctx context.Context) (*EmailTemplate, error)
First returns the first EmailTemplate entity from the query. Returns a *NotFoundError when no EmailTemplate was found.
func (*EmailTemplateQuery) FirstID ¶
func (etq *EmailTemplateQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first EmailTemplate ID from the query. Returns a *NotFoundError when no EmailTemplate ID was found.
func (*EmailTemplateQuery) FirstIDX ¶
func (etq *EmailTemplateQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EmailTemplateQuery) FirstX ¶
func (etq *EmailTemplateQuery) FirstX(ctx context.Context) *EmailTemplate
FirstX is like First, but panics if an error occurs.
func (*EmailTemplateQuery) GroupBy ¶
func (etq *EmailTemplateQuery) GroupBy(field string, fields ...string) *EmailTemplateGroupBy
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 { TemplateCode string `json:"template_code,omitempty"` Count int `json:"count,omitempty"` } client.EmailTemplate.Query(). GroupBy(emailtemplate.FieldTemplateCode). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EmailTemplateQuery) IDs ¶
func (etq *EmailTemplateQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of EmailTemplate IDs.
func (*EmailTemplateQuery) IDsX ¶
func (etq *EmailTemplateQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EmailTemplateQuery) Limit ¶
func (etq *EmailTemplateQuery) Limit(limit int) *EmailTemplateQuery
Limit the number of records to be returned by this query.
func (*EmailTemplateQuery) Offset ¶
func (etq *EmailTemplateQuery) Offset(offset int) *EmailTemplateQuery
Offset to start from.
func (*EmailTemplateQuery) Only ¶
func (etq *EmailTemplateQuery) Only(ctx context.Context) (*EmailTemplate, error)
Only returns a single EmailTemplate entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one EmailTemplate entity is found. Returns a *NotFoundError when no EmailTemplate entities are found.
func (*EmailTemplateQuery) OnlyID ¶
func (etq *EmailTemplateQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only EmailTemplate ID in the query. Returns a *NotSingularError when more than one EmailTemplate ID is found. Returns a *NotFoundError when no entities are found.
func (*EmailTemplateQuery) OnlyIDX ¶
func (etq *EmailTemplateQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EmailTemplateQuery) OnlyX ¶
func (etq *EmailTemplateQuery) OnlyX(ctx context.Context) *EmailTemplate
OnlyX is like Only, but panics if an error occurs.
func (*EmailTemplateQuery) Order ¶
func (etq *EmailTemplateQuery) Order(o ...emailtemplate.OrderOption) *EmailTemplateQuery
Order specifies how the records should be ordered.
func (*EmailTemplateQuery) Select ¶
func (etq *EmailTemplateQuery) Select(fields ...string) *EmailTemplateSelect
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 { TemplateCode string `json:"template_code,omitempty"` } client.EmailTemplate.Query(). Select(emailtemplate.FieldTemplateCode). Scan(ctx, &v)
func (*EmailTemplateQuery) Unique ¶
func (etq *EmailTemplateQuery) Unique(unique bool) *EmailTemplateQuery
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 (*EmailTemplateQuery) Where ¶
func (etq *EmailTemplateQuery) Where(ps ...predicate.EmailTemplate) *EmailTemplateQuery
Where adds a new predicate for the EmailTemplateQuery builder.
type EmailTemplateSelect ¶
type EmailTemplateSelect struct { *EmailTemplateQuery // contains filtered or unexported fields }
EmailTemplateSelect is the builder for selecting fields of EmailTemplate entities.
func (*EmailTemplateSelect) Aggregate ¶
func (ets *EmailTemplateSelect) Aggregate(fns ...AggregateFunc) *EmailTemplateSelect
Aggregate adds the given aggregation functions to the selector query.
func (*EmailTemplateSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EmailTemplateSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EmailTemplateSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EmailTemplateSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EmailTemplateSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EmailTemplateSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EmailTemplateSelect) Scan ¶
func (ets *EmailTemplateSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EmailTemplateSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EmailTemplateUpdate ¶
type EmailTemplateUpdate struct {
// contains filtered or unexported fields
}
EmailTemplateUpdate is the builder for updating EmailTemplate entities.
func (*EmailTemplateUpdate) Exec ¶
func (etu *EmailTemplateUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EmailTemplateUpdate) ExecX ¶
func (etu *EmailTemplateUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmailTemplateUpdate) Mutation ¶
func (etu *EmailTemplateUpdate) Mutation() *EmailTemplateMutation
Mutation returns the EmailTemplateMutation object of the builder.
func (*EmailTemplateUpdate) Save ¶
func (etu *EmailTemplateUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EmailTemplateUpdate) SaveX ¶
func (etu *EmailTemplateUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EmailTemplateUpdate) SetContent ¶
func (etu *EmailTemplateUpdate) SetContent(s string) *EmailTemplateUpdate
SetContent sets the "content" field.
func (*EmailTemplateUpdate) SetNillableContent ¶
func (etu *EmailTemplateUpdate) SetNillableContent(s *string) *EmailTemplateUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*EmailTemplateUpdate) SetNillableTemplateCode ¶
func (etu *EmailTemplateUpdate) SetNillableTemplateCode(s *string) *EmailTemplateUpdate
SetNillableTemplateCode sets the "template_code" field if the given value is not nil.
func (*EmailTemplateUpdate) SetTemplateCode ¶
func (etu *EmailTemplateUpdate) SetTemplateCode(s string) *EmailTemplateUpdate
SetTemplateCode sets the "template_code" field.
func (*EmailTemplateUpdate) Where ¶
func (etu *EmailTemplateUpdate) Where(ps ...predicate.EmailTemplate) *EmailTemplateUpdate
Where appends a list predicates to the EmailTemplateUpdate builder.
type EmailTemplateUpdateOne ¶
type EmailTemplateUpdateOne struct {
// contains filtered or unexported fields
}
EmailTemplateUpdateOne is the builder for updating a single EmailTemplate entity.
func (*EmailTemplateUpdateOne) Exec ¶
func (etuo *EmailTemplateUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EmailTemplateUpdateOne) ExecX ¶
func (etuo *EmailTemplateUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmailTemplateUpdateOne) Mutation ¶
func (etuo *EmailTemplateUpdateOne) Mutation() *EmailTemplateMutation
Mutation returns the EmailTemplateMutation object of the builder.
func (*EmailTemplateUpdateOne) Save ¶
func (etuo *EmailTemplateUpdateOne) Save(ctx context.Context) (*EmailTemplate, error)
Save executes the query and returns the updated EmailTemplate entity.
func (*EmailTemplateUpdateOne) SaveX ¶
func (etuo *EmailTemplateUpdateOne) SaveX(ctx context.Context) *EmailTemplate
SaveX is like Save, but panics if an error occurs.
func (*EmailTemplateUpdateOne) Select ¶
func (etuo *EmailTemplateUpdateOne) Select(field string, fields ...string) *EmailTemplateUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EmailTemplateUpdateOne) SetContent ¶
func (etuo *EmailTemplateUpdateOne) SetContent(s string) *EmailTemplateUpdateOne
SetContent sets the "content" field.
func (*EmailTemplateUpdateOne) SetNillableContent ¶
func (etuo *EmailTemplateUpdateOne) SetNillableContent(s *string) *EmailTemplateUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*EmailTemplateUpdateOne) SetNillableTemplateCode ¶
func (etuo *EmailTemplateUpdateOne) SetNillableTemplateCode(s *string) *EmailTemplateUpdateOne
SetNillableTemplateCode sets the "template_code" field if the given value is not nil.
func (*EmailTemplateUpdateOne) SetTemplateCode ¶
func (etuo *EmailTemplateUpdateOne) SetTemplateCode(s string) *EmailTemplateUpdateOne
SetTemplateCode sets the "template_code" field.
func (*EmailTemplateUpdateOne) Where ¶
func (etuo *EmailTemplateUpdateOne) Where(ps ...predicate.EmailTemplate) *EmailTemplateUpdateOne
Where appends a list predicates to the EmailTemplateUpdate builder.
type EmailTemplates ¶
type EmailTemplates []*EmailTemplate
EmailTemplates is a parsable slice of EmailTemplate.
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 { // EmailTemplate is the client for interacting with the EmailTemplate builders. EmailTemplate *EmailTemplateClient // UserEmailLang is the client for interacting with the UserEmailLang builders. UserEmailLang *UserEmailLangClient // 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 UserEmailLang ¶
type UserEmailLang struct { // ID of the ent. ID int `json:"id,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Country holds the value of the "country" field. Country string `json:"country,omitempty"` // contains filtered or unexported fields }
UserEmailLang is the model entity for the UserEmailLang schema.
func (*UserEmailLang) String ¶
func (uel *UserEmailLang) String() string
String implements the fmt.Stringer.
func (*UserEmailLang) Unwrap ¶
func (uel *UserEmailLang) Unwrap() *UserEmailLang
Unwrap unwraps the UserEmailLang 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 (*UserEmailLang) Update ¶
func (uel *UserEmailLang) Update() *UserEmailLangUpdateOne
Update returns a builder for updating this UserEmailLang. Note that you need to call UserEmailLang.Unwrap() before calling this method if this UserEmailLang was returned from a transaction, and the transaction was committed or rolled back.
type UserEmailLangClient ¶
type UserEmailLangClient struct {
// contains filtered or unexported fields
}
UserEmailLangClient is a client for the UserEmailLang schema.
func NewUserEmailLangClient ¶
func NewUserEmailLangClient(c config) *UserEmailLangClient
NewUserEmailLangClient returns a client for the UserEmailLang from the given config.
func (*UserEmailLangClient) Create ¶
func (c *UserEmailLangClient) Create() *UserEmailLangCreate
Create returns a builder for creating a UserEmailLang entity.
func (*UserEmailLangClient) CreateBulk ¶
func (c *UserEmailLangClient) CreateBulk(builders ...*UserEmailLangCreate) *UserEmailLangCreateBulk
CreateBulk returns a builder for creating a bulk of UserEmailLang entities.
func (*UserEmailLangClient) Delete ¶
func (c *UserEmailLangClient) Delete() *UserEmailLangDelete
Delete returns a delete builder for UserEmailLang.
func (*UserEmailLangClient) DeleteOne ¶
func (c *UserEmailLangClient) DeleteOne(uel *UserEmailLang) *UserEmailLangDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserEmailLangClient) DeleteOneID ¶
func (c *UserEmailLangClient) DeleteOneID(id int) *UserEmailLangDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserEmailLangClient) Get ¶
func (c *UserEmailLangClient) Get(ctx context.Context, id int) (*UserEmailLang, error)
Get returns a UserEmailLang entity by its id.
func (*UserEmailLangClient) GetX ¶
func (c *UserEmailLangClient) GetX(ctx context.Context, id int) *UserEmailLang
GetX is like Get, but panics if an error occurs.
func (*UserEmailLangClient) Hooks ¶
func (c *UserEmailLangClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserEmailLangClient) Intercept ¶
func (c *UserEmailLangClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `useremaillang.Intercept(f(g(h())))`.
func (*UserEmailLangClient) Interceptors ¶
func (c *UserEmailLangClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserEmailLangClient) MapCreateBulk ¶
func (c *UserEmailLangClient) MapCreateBulk(slice any, setFunc func(*UserEmailLangCreate, int)) *UserEmailLangCreateBulk
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 (*UserEmailLangClient) Query ¶
func (c *UserEmailLangClient) Query() *UserEmailLangQuery
Query returns a query builder for UserEmailLang.
func (*UserEmailLangClient) Update ¶
func (c *UserEmailLangClient) Update() *UserEmailLangUpdate
Update returns an update builder for UserEmailLang.
func (*UserEmailLangClient) UpdateOne ¶
func (c *UserEmailLangClient) UpdateOne(uel *UserEmailLang) *UserEmailLangUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserEmailLangClient) UpdateOneID ¶
func (c *UserEmailLangClient) UpdateOneID(id int) *UserEmailLangUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserEmailLangClient) Use ¶
func (c *UserEmailLangClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `useremaillang.Hooks(f(g(h())))`.
type UserEmailLangCreate ¶
type UserEmailLangCreate struct {
// contains filtered or unexported fields
}
UserEmailLangCreate is the builder for creating a UserEmailLang entity.
func (*UserEmailLangCreate) Exec ¶
func (uelc *UserEmailLangCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserEmailLangCreate) ExecX ¶
func (uelc *UserEmailLangCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailLangCreate) Mutation ¶
func (uelc *UserEmailLangCreate) Mutation() *UserEmailLangMutation
Mutation returns the UserEmailLangMutation object of the builder.
func (*UserEmailLangCreate) Save ¶
func (uelc *UserEmailLangCreate) Save(ctx context.Context) (*UserEmailLang, error)
Save creates the UserEmailLang in the database.
func (*UserEmailLangCreate) SaveX ¶
func (uelc *UserEmailLangCreate) SaveX(ctx context.Context) *UserEmailLang
SaveX calls Save and panics if Save returns an error.
func (*UserEmailLangCreate) SetCountry ¶
func (uelc *UserEmailLangCreate) SetCountry(s string) *UserEmailLangCreate
SetCountry sets the "country" field.
func (*UserEmailLangCreate) SetEmail ¶
func (uelc *UserEmailLangCreate) SetEmail(s string) *UserEmailLangCreate
SetEmail sets the "email" field.
func (*UserEmailLangCreate) SetNillableCountry ¶
func (uelc *UserEmailLangCreate) SetNillableCountry(s *string) *UserEmailLangCreate
SetNillableCountry sets the "country" field if the given value is not nil.
func (*UserEmailLangCreate) SetNillableEmail ¶
func (uelc *UserEmailLangCreate) SetNillableEmail(s *string) *UserEmailLangCreate
SetNillableEmail sets the "email" field if the given value is not nil.
type UserEmailLangCreateBulk ¶
type UserEmailLangCreateBulk struct {
// contains filtered or unexported fields
}
UserEmailLangCreateBulk is the builder for creating many UserEmailLang entities in bulk.
func (*UserEmailLangCreateBulk) Exec ¶
func (uelcb *UserEmailLangCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserEmailLangCreateBulk) ExecX ¶
func (uelcb *UserEmailLangCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailLangCreateBulk) Save ¶
func (uelcb *UserEmailLangCreateBulk) Save(ctx context.Context) ([]*UserEmailLang, error)
Save creates the UserEmailLang entities in the database.
func (*UserEmailLangCreateBulk) SaveX ¶
func (uelcb *UserEmailLangCreateBulk) SaveX(ctx context.Context) []*UserEmailLang
SaveX is like Save, but panics if an error occurs.
type UserEmailLangDelete ¶
type UserEmailLangDelete struct {
// contains filtered or unexported fields
}
UserEmailLangDelete is the builder for deleting a UserEmailLang entity.
func (*UserEmailLangDelete) Exec ¶
func (ueld *UserEmailLangDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserEmailLangDelete) ExecX ¶
func (ueld *UserEmailLangDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailLangDelete) Where ¶
func (ueld *UserEmailLangDelete) Where(ps ...predicate.UserEmailLang) *UserEmailLangDelete
Where appends a list predicates to the UserEmailLangDelete builder.
type UserEmailLangDeleteOne ¶
type UserEmailLangDeleteOne struct {
// contains filtered or unexported fields
}
UserEmailLangDeleteOne is the builder for deleting a single UserEmailLang entity.
func (*UserEmailLangDeleteOne) Exec ¶
func (ueldo *UserEmailLangDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserEmailLangDeleteOne) ExecX ¶
func (ueldo *UserEmailLangDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailLangDeleteOne) Where ¶
func (ueldo *UserEmailLangDeleteOne) Where(ps ...predicate.UserEmailLang) *UserEmailLangDeleteOne
Where appends a list predicates to the UserEmailLangDelete builder.
type UserEmailLangGroupBy ¶
type UserEmailLangGroupBy struct {
// contains filtered or unexported fields
}
UserEmailLangGroupBy is the group-by builder for UserEmailLang entities.
func (*UserEmailLangGroupBy) Aggregate ¶
func (uelgb *UserEmailLangGroupBy) Aggregate(fns ...AggregateFunc) *UserEmailLangGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserEmailLangGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserEmailLangGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserEmailLangGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserEmailLangGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserEmailLangGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserEmailLangGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserEmailLangGroupBy) Scan ¶
func (uelgb *UserEmailLangGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserEmailLangGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserEmailLangMutation ¶
type UserEmailLangMutation struct {
// contains filtered or unexported fields
}
UserEmailLangMutation represents an operation that mutates the UserEmailLang nodes in the graph.
func (*UserEmailLangMutation) AddField ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) AddedEdges ¶
func (m *UserEmailLangMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserEmailLangMutation) AddedField ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) AddedFields ¶
func (m *UserEmailLangMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserEmailLangMutation) AddedIDs ¶
func (m *UserEmailLangMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserEmailLangMutation) ClearEdge ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) ClearField ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) ClearedEdges ¶
func (m *UserEmailLangMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserEmailLangMutation) ClearedFields ¶
func (m *UserEmailLangMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserEmailLangMutation) Client ¶
func (m UserEmailLangMutation) 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 (*UserEmailLangMutation) Country ¶
func (m *UserEmailLangMutation) Country() (r string, exists bool)
Country returns the value of the "country" field in the mutation.
func (*UserEmailLangMutation) EdgeCleared ¶
func (m *UserEmailLangMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserEmailLangMutation) Email ¶
func (m *UserEmailLangMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserEmailLangMutation) Field ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) FieldCleared ¶
func (m *UserEmailLangMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserEmailLangMutation) Fields ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) ID ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) IDs ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) OldCountry ¶
func (m *UserEmailLangMutation) OldCountry(ctx context.Context) (v string, err error)
OldCountry returns the old "country" field's value of the UserEmailLang entity. If the UserEmailLang 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 (*UserEmailLangMutation) OldEmail ¶
func (m *UserEmailLangMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the UserEmailLang entity. If the UserEmailLang 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 (*UserEmailLangMutation) 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 (*UserEmailLangMutation) Op ¶
func (m *UserEmailLangMutation) Op() Op
Op returns the operation name.
func (*UserEmailLangMutation) RemovedEdges ¶
func (m *UserEmailLangMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserEmailLangMutation) RemovedIDs ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) ResetCountry ¶
func (m *UserEmailLangMutation) ResetCountry()
ResetCountry resets all changes to the "country" field.
func (*UserEmailLangMutation) ResetEdge ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) ResetEmail ¶
func (m *UserEmailLangMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserEmailLangMutation) ResetField ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) SetCountry ¶
func (m *UserEmailLangMutation) SetCountry(s string)
SetCountry sets the "country" field.
func (*UserEmailLangMutation) SetEmail ¶
func (m *UserEmailLangMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserEmailLangMutation) SetField ¶
func (m *UserEmailLangMutation) 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 (*UserEmailLangMutation) SetOp ¶
func (m *UserEmailLangMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (UserEmailLangMutation) Tx ¶
func (m UserEmailLangMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserEmailLangMutation) Type ¶
func (m *UserEmailLangMutation) Type() string
Type returns the node type of this mutation (UserEmailLang).
func (*UserEmailLangMutation) Where ¶
func (m *UserEmailLangMutation) Where(ps ...predicate.UserEmailLang)
Where appends a list predicates to the UserEmailLangMutation builder.
func (*UserEmailLangMutation) WhereP ¶
func (m *UserEmailLangMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserEmailLangMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserEmailLangQuery ¶
type UserEmailLangQuery struct {
// contains filtered or unexported fields
}
UserEmailLangQuery is the builder for querying UserEmailLang entities.
func (*UserEmailLangQuery) Aggregate ¶
func (uelq *UserEmailLangQuery) Aggregate(fns ...AggregateFunc) *UserEmailLangSelect
Aggregate returns a UserEmailLangSelect configured with the given aggregations.
func (*UserEmailLangQuery) All ¶
func (uelq *UserEmailLangQuery) All(ctx context.Context) ([]*UserEmailLang, error)
All executes the query and returns a list of UserEmailLangs.
func (*UserEmailLangQuery) AllX ¶
func (uelq *UserEmailLangQuery) AllX(ctx context.Context) []*UserEmailLang
AllX is like All, but panics if an error occurs.
func (*UserEmailLangQuery) Clone ¶
func (uelq *UserEmailLangQuery) Clone() *UserEmailLangQuery
Clone returns a duplicate of the UserEmailLangQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserEmailLangQuery) Count ¶
func (uelq *UserEmailLangQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserEmailLangQuery) CountX ¶
func (uelq *UserEmailLangQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserEmailLangQuery) Exist ¶
func (uelq *UserEmailLangQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserEmailLangQuery) ExistX ¶
func (uelq *UserEmailLangQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserEmailLangQuery) First ¶
func (uelq *UserEmailLangQuery) First(ctx context.Context) (*UserEmailLang, error)
First returns the first UserEmailLang entity from the query. Returns a *NotFoundError when no UserEmailLang was found.
func (*UserEmailLangQuery) FirstID ¶
func (uelq *UserEmailLangQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserEmailLang ID from the query. Returns a *NotFoundError when no UserEmailLang ID was found.
func (*UserEmailLangQuery) FirstIDX ¶
func (uelq *UserEmailLangQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserEmailLangQuery) FirstX ¶
func (uelq *UserEmailLangQuery) FirstX(ctx context.Context) *UserEmailLang
FirstX is like First, but panics if an error occurs.
func (*UserEmailLangQuery) GroupBy ¶
func (uelq *UserEmailLangQuery) GroupBy(field string, fields ...string) *UserEmailLangGroupBy
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 { Email string `json:"email,omitempty"` Count int `json:"count,omitempty"` } client.UserEmailLang.Query(). GroupBy(useremaillang.FieldEmail). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserEmailLangQuery) IDs ¶
func (uelq *UserEmailLangQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of UserEmailLang IDs.
func (*UserEmailLangQuery) IDsX ¶
func (uelq *UserEmailLangQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserEmailLangQuery) Limit ¶
func (uelq *UserEmailLangQuery) Limit(limit int) *UserEmailLangQuery
Limit the number of records to be returned by this query.
func (*UserEmailLangQuery) Offset ¶
func (uelq *UserEmailLangQuery) Offset(offset int) *UserEmailLangQuery
Offset to start from.
func (*UserEmailLangQuery) Only ¶
func (uelq *UserEmailLangQuery) Only(ctx context.Context) (*UserEmailLang, error)
Only returns a single UserEmailLang entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserEmailLang entity is found. Returns a *NotFoundError when no UserEmailLang entities are found.
func (*UserEmailLangQuery) OnlyID ¶
func (uelq *UserEmailLangQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserEmailLang ID in the query. Returns a *NotSingularError when more than one UserEmailLang ID is found. Returns a *NotFoundError when no entities are found.
func (*UserEmailLangQuery) OnlyIDX ¶
func (uelq *UserEmailLangQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserEmailLangQuery) OnlyX ¶
func (uelq *UserEmailLangQuery) OnlyX(ctx context.Context) *UserEmailLang
OnlyX is like Only, but panics if an error occurs.
func (*UserEmailLangQuery) Order ¶
func (uelq *UserEmailLangQuery) Order(o ...useremaillang.OrderOption) *UserEmailLangQuery
Order specifies how the records should be ordered.
func (*UserEmailLangQuery) Select ¶
func (uelq *UserEmailLangQuery) Select(fields ...string) *UserEmailLangSelect
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 { Email string `json:"email,omitempty"` } client.UserEmailLang.Query(). Select(useremaillang.FieldEmail). Scan(ctx, &v)
func (*UserEmailLangQuery) Unique ¶
func (uelq *UserEmailLangQuery) Unique(unique bool) *UserEmailLangQuery
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 (*UserEmailLangQuery) Where ¶
func (uelq *UserEmailLangQuery) Where(ps ...predicate.UserEmailLang) *UserEmailLangQuery
Where adds a new predicate for the UserEmailLangQuery builder.
type UserEmailLangSelect ¶
type UserEmailLangSelect struct { *UserEmailLangQuery // contains filtered or unexported fields }
UserEmailLangSelect is the builder for selecting fields of UserEmailLang entities.
func (*UserEmailLangSelect) Aggregate ¶
func (uels *UserEmailLangSelect) Aggregate(fns ...AggregateFunc) *UserEmailLangSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserEmailLangSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserEmailLangSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserEmailLangSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserEmailLangSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserEmailLangSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserEmailLangSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserEmailLangSelect) Scan ¶
func (uels *UserEmailLangSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserEmailLangSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserEmailLangUpdate ¶
type UserEmailLangUpdate struct {
// contains filtered or unexported fields
}
UserEmailLangUpdate is the builder for updating UserEmailLang entities.
func (*UserEmailLangUpdate) Exec ¶
func (uelu *UserEmailLangUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserEmailLangUpdate) ExecX ¶
func (uelu *UserEmailLangUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailLangUpdate) Mutation ¶
func (uelu *UserEmailLangUpdate) Mutation() *UserEmailLangMutation
Mutation returns the UserEmailLangMutation object of the builder.
func (*UserEmailLangUpdate) Save ¶
func (uelu *UserEmailLangUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserEmailLangUpdate) SaveX ¶
func (uelu *UserEmailLangUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserEmailLangUpdate) SetCountry ¶
func (uelu *UserEmailLangUpdate) SetCountry(s string) *UserEmailLangUpdate
SetCountry sets the "country" field.
func (*UserEmailLangUpdate) SetEmail ¶
func (uelu *UserEmailLangUpdate) SetEmail(s string) *UserEmailLangUpdate
SetEmail sets the "email" field.
func (*UserEmailLangUpdate) SetNillableCountry ¶
func (uelu *UserEmailLangUpdate) SetNillableCountry(s *string) *UserEmailLangUpdate
SetNillableCountry sets the "country" field if the given value is not nil.
func (*UserEmailLangUpdate) SetNillableEmail ¶
func (uelu *UserEmailLangUpdate) SetNillableEmail(s *string) *UserEmailLangUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserEmailLangUpdate) Where ¶
func (uelu *UserEmailLangUpdate) Where(ps ...predicate.UserEmailLang) *UserEmailLangUpdate
Where appends a list predicates to the UserEmailLangUpdate builder.
type UserEmailLangUpdateOne ¶
type UserEmailLangUpdateOne struct {
// contains filtered or unexported fields
}
UserEmailLangUpdateOne is the builder for updating a single UserEmailLang entity.
func (*UserEmailLangUpdateOne) Exec ¶
func (ueluo *UserEmailLangUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserEmailLangUpdateOne) ExecX ¶
func (ueluo *UserEmailLangUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailLangUpdateOne) Mutation ¶
func (ueluo *UserEmailLangUpdateOne) Mutation() *UserEmailLangMutation
Mutation returns the UserEmailLangMutation object of the builder.
func (*UserEmailLangUpdateOne) Save ¶
func (ueluo *UserEmailLangUpdateOne) Save(ctx context.Context) (*UserEmailLang, error)
Save executes the query and returns the updated UserEmailLang entity.
func (*UserEmailLangUpdateOne) SaveX ¶
func (ueluo *UserEmailLangUpdateOne) SaveX(ctx context.Context) *UserEmailLang
SaveX is like Save, but panics if an error occurs.
func (*UserEmailLangUpdateOne) Select ¶
func (ueluo *UserEmailLangUpdateOne) Select(field string, fields ...string) *UserEmailLangUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserEmailLangUpdateOne) SetCountry ¶
func (ueluo *UserEmailLangUpdateOne) SetCountry(s string) *UserEmailLangUpdateOne
SetCountry sets the "country" field.
func (*UserEmailLangUpdateOne) SetEmail ¶
func (ueluo *UserEmailLangUpdateOne) SetEmail(s string) *UserEmailLangUpdateOne
SetEmail sets the "email" field.
func (*UserEmailLangUpdateOne) SetNillableCountry ¶
func (ueluo *UserEmailLangUpdateOne) SetNillableCountry(s *string) *UserEmailLangUpdateOne
SetNillableCountry sets the "country" field if the given value is not nil.
func (*UserEmailLangUpdateOne) SetNillableEmail ¶
func (ueluo *UserEmailLangUpdateOne) SetNillableEmail(s *string) *UserEmailLangUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserEmailLangUpdateOne) Where ¶
func (ueluo *UserEmailLangUpdateOne) Where(ps ...predicate.UserEmailLang) *UserEmailLangUpdateOne
Where appends a list predicates to the UserEmailLangUpdate builder.
type UserEmailLangs ¶
type UserEmailLangs []*UserEmailLang
UserEmailLangs is a parsable slice of UserEmailLang.
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.