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) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, 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 EmailLog
- func (c *EmailLog) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *EmailLog) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (el *EmailLog) String() string
- func (el *EmailLog) Unwrap() *EmailLog
- func (el *EmailLog) Update() *EmailLogUpdateOne
- func (el *EmailLog) Value(name string) (ent.Value, error)
- type EmailLogClient
- func (c *EmailLogClient) Create() *EmailLogCreate
- func (c *EmailLogClient) CreateBulk(builders ...*EmailLogCreate) *EmailLogCreateBulk
- func (c *EmailLogClient) Delete() *EmailLogDelete
- func (c *EmailLogClient) DeleteOne(el *EmailLog) *EmailLogDeleteOne
- func (c *EmailLogClient) DeleteOneID(id uuid.UUID) *EmailLogDeleteOne
- func (c *EmailLogClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *EmailLogClient) Get(ctx context.Context, id uuid.UUID) (*EmailLog, error)
- func (c *EmailLogClient) GetX(ctx context.Context, id uuid.UUID) *EmailLog
- func (c *EmailLogClient) Hooks() []Hook
- func (c *EmailLogClient) Intercept(interceptors ...Interceptor)
- func (c *EmailLogClient) Interceptors() []Interceptor
- func (c *EmailLogClient) Query() *EmailLogQuery
- func (c *EmailLogClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *EmailLogClient) Update() *EmailLogUpdate
- func (c *EmailLogClient) UpdateOne(el *EmailLog) *EmailLogUpdateOne
- func (c *EmailLogClient) UpdateOneID(id uuid.UUID) *EmailLogUpdateOne
- func (c *EmailLogClient) Use(hooks ...Hook)
- type EmailLogCreate
- func (elc *EmailLogCreate) Exec(ctx context.Context) error
- func (c *EmailLogCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (elc *EmailLogCreate) ExecX(ctx context.Context)
- func (elc *EmailLogCreate) Mutation() *EmailLogMutation
- func (c *EmailLogCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (elc *EmailLogCreate) Save(ctx context.Context) (*EmailLog, error)
- func (elc *EmailLogCreate) SaveX(ctx context.Context) *EmailLog
- func (elc *EmailLogCreate) SetContent(s string) *EmailLogCreate
- func (elc *EmailLogCreate) SetCreatedAt(t time.Time) *EmailLogCreate
- func (elc *EmailLogCreate) SetID(u uuid.UUID) *EmailLogCreate
- func (elc *EmailLogCreate) SetNillableCreatedAt(t *time.Time) *EmailLogCreate
- func (elc *EmailLogCreate) SetNillableID(u *uuid.UUID) *EmailLogCreate
- func (elc *EmailLogCreate) SetNillableUpdatedAt(t *time.Time) *EmailLogCreate
- func (el *EmailLogCreate) SetNotNilContent(value *string) *EmailLogCreate
- func (el *EmailLogCreate) SetNotNilSendStatus(value *uint8) *EmailLogCreate
- func (el *EmailLogCreate) SetNotNilSubject(value *string) *EmailLogCreate
- func (el *EmailLogCreate) SetNotNilTarget(value *string) *EmailLogCreate
- func (el *EmailLogCreate) SetNotNilUpdatedAt(value *time.Time) *EmailLogCreate
- func (elc *EmailLogCreate) SetSendStatus(u uint8) *EmailLogCreate
- func (elc *EmailLogCreate) SetSubject(s string) *EmailLogCreate
- func (elc *EmailLogCreate) SetTarget(s string) *EmailLogCreate
- func (elc *EmailLogCreate) SetUpdatedAt(t time.Time) *EmailLogCreate
- type EmailLogCreateBulk
- func (elcb *EmailLogCreateBulk) Exec(ctx context.Context) error
- func (c *EmailLogCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (elcb *EmailLogCreateBulk) ExecX(ctx context.Context)
- func (c *EmailLogCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (elcb *EmailLogCreateBulk) Save(ctx context.Context) ([]*EmailLog, error)
- func (elcb *EmailLogCreateBulk) SaveX(ctx context.Context) []*EmailLog
- type EmailLogDelete
- func (eld *EmailLogDelete) Exec(ctx context.Context) (int, error)
- func (c *EmailLogDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (eld *EmailLogDelete) ExecX(ctx context.Context) int
- func (c *EmailLogDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (eld *EmailLogDelete) Where(ps ...predicate.EmailLog) *EmailLogDelete
- type EmailLogDeleteOne
- type EmailLogGroupBy
- func (elgb *EmailLogGroupBy) Aggregate(fns ...AggregateFunc) *EmailLogGroupBy
- func (s *EmailLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EmailLogGroupBy) BoolX(ctx context.Context) bool
- func (s *EmailLogGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EmailLogGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EmailLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EmailLogGroupBy) Float64X(ctx context.Context) float64
- func (s *EmailLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EmailLogGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EmailLogGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EmailLogGroupBy) IntX(ctx context.Context) int
- func (s *EmailLogGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EmailLogGroupBy) IntsX(ctx context.Context) []int
- func (elgb *EmailLogGroupBy) Scan(ctx context.Context, v any) error
- func (s *EmailLogGroupBy) ScanX(ctx context.Context, v any)
- func (s *EmailLogGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EmailLogGroupBy) StringX(ctx context.Context) string
- func (s *EmailLogGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EmailLogGroupBy) StringsX(ctx context.Context) []string
- type EmailLogMutation
- func (m *EmailLogMutation) AddField(name string, value ent.Value) error
- func (m *EmailLogMutation) AddSendStatus(u int8)
- func (m *EmailLogMutation) AddedEdges() []string
- func (m *EmailLogMutation) AddedField(name string) (ent.Value, bool)
- func (m *EmailLogMutation) AddedFields() []string
- func (m *EmailLogMutation) AddedIDs(name string) []ent.Value
- func (m *EmailLogMutation) AddedSendStatus() (r int8, exists bool)
- func (m *EmailLogMutation) ClearEdge(name string) error
- func (m *EmailLogMutation) ClearField(name string) error
- func (m *EmailLogMutation) ClearedEdges() []string
- func (m *EmailLogMutation) ClearedFields() []string
- func (m EmailLogMutation) Client() *Client
- func (m *EmailLogMutation) Content() (r string, exists bool)
- func (m *EmailLogMutation) CreatedAt() (r time.Time, exists bool)
- func (m *EmailLogMutation) EdgeCleared(name string) bool
- func (c *EmailLogMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *EmailLogMutation) Field(name string) (ent.Value, bool)
- func (m *EmailLogMutation) FieldCleared(name string) bool
- func (m *EmailLogMutation) Fields() []string
- func (m *EmailLogMutation) ID() (id uuid.UUID, exists bool)
- func (m *EmailLogMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *EmailLogMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *EmailLogMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *EmailLogMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EmailLogMutation) OldSendStatus(ctx context.Context) (v uint8, err error)
- func (m *EmailLogMutation) OldSubject(ctx context.Context) (v string, err error)
- func (m *EmailLogMutation) OldTarget(ctx context.Context) (v string, err error)
- func (m *EmailLogMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *EmailLogMutation) Op() Op
- func (c *EmailLogMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *EmailLogMutation) RemovedEdges() []string
- func (m *EmailLogMutation) RemovedIDs(name string) []ent.Value
- func (m *EmailLogMutation) ResetContent()
- func (m *EmailLogMutation) ResetCreatedAt()
- func (m *EmailLogMutation) ResetEdge(name string) error
- func (m *EmailLogMutation) ResetField(name string) error
- func (m *EmailLogMutation) ResetSendStatus()
- func (m *EmailLogMutation) ResetSubject()
- func (m *EmailLogMutation) ResetTarget()
- func (m *EmailLogMutation) ResetUpdatedAt()
- func (m *EmailLogMutation) SendStatus() (r uint8, exists bool)
- func (m *EmailLogMutation) SetContent(s string)
- func (m *EmailLogMutation) SetCreatedAt(t time.Time)
- func (m *EmailLogMutation) SetField(name string, value ent.Value) error
- func (m *EmailLogMutation) SetID(id uuid.UUID)
- func (m *EmailLogMutation) SetOp(op Op)
- func (m *EmailLogMutation) SetSendStatus(u uint8)
- func (m *EmailLogMutation) SetSubject(s string)
- func (m *EmailLogMutation) SetTarget(s string)
- func (m *EmailLogMutation) SetUpdatedAt(t time.Time)
- func (m *EmailLogMutation) Subject() (r string, exists bool)
- func (m *EmailLogMutation) Target() (r string, exists bool)
- func (m EmailLogMutation) Tx() (*Tx, error)
- func (m *EmailLogMutation) Type() string
- func (m *EmailLogMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *EmailLogMutation) Where(ps ...predicate.EmailLog)
- func (m *EmailLogMutation) WhereP(ps ...func(*sql.Selector))
- type EmailLogPageList
- type EmailLogPager
- type EmailLogPaginateOption
- type EmailLogQuery
- func (elq *EmailLogQuery) Aggregate(fns ...AggregateFunc) *EmailLogSelect
- func (elq *EmailLogQuery) All(ctx context.Context) ([]*EmailLog, error)
- func (elq *EmailLogQuery) AllX(ctx context.Context) []*EmailLog
- func (elq *EmailLogQuery) Clone() *EmailLogQuery
- func (elq *EmailLogQuery) Count(ctx context.Context) (int, error)
- func (elq *EmailLogQuery) CountX(ctx context.Context) int
- func (c *EmailLogQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (elq *EmailLogQuery) Exist(ctx context.Context) (bool, error)
- func (elq *EmailLogQuery) ExistX(ctx context.Context) bool
- func (elq *EmailLogQuery) First(ctx context.Context) (*EmailLog, error)
- func (elq *EmailLogQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (elq *EmailLogQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (elq *EmailLogQuery) FirstX(ctx context.Context) *EmailLog
- func (elq *EmailLogQuery) GroupBy(field string, fields ...string) *EmailLogGroupBy
- func (elq *EmailLogQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (elq *EmailLogQuery) IDsX(ctx context.Context) []uuid.UUID
- func (elq *EmailLogQuery) Limit(limit int) *EmailLogQuery
- func (elq *EmailLogQuery) Offset(offset int) *EmailLogQuery
- func (elq *EmailLogQuery) Only(ctx context.Context) (*EmailLog, error)
- func (elq *EmailLogQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (elq *EmailLogQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (elq *EmailLogQuery) OnlyX(ctx context.Context) *EmailLog
- func (elq *EmailLogQuery) Order(o ...emaillog.OrderOption) *EmailLogQuery
- func (el *EmailLogQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*EmailLogPageList, error)
- func (c *EmailLogQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (elq *EmailLogQuery) Select(fields ...string) *EmailLogSelect
- func (elq *EmailLogQuery) Unique(unique bool) *EmailLogQuery
- func (elq *EmailLogQuery) Where(ps ...predicate.EmailLog) *EmailLogQuery
- type EmailLogSelect
- func (els *EmailLogSelect) Aggregate(fns ...AggregateFunc) *EmailLogSelect
- func (s *EmailLogSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EmailLogSelect) BoolX(ctx context.Context) bool
- func (s *EmailLogSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EmailLogSelect) BoolsX(ctx context.Context) []bool
- func (c EmailLogSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *EmailLogSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EmailLogSelect) Float64X(ctx context.Context) float64
- func (s *EmailLogSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EmailLogSelect) Float64sX(ctx context.Context) []float64
- func (s *EmailLogSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EmailLogSelect) IntX(ctx context.Context) int
- func (s *EmailLogSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EmailLogSelect) IntsX(ctx context.Context) []int
- func (c EmailLogSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (els *EmailLogSelect) Scan(ctx context.Context, v any) error
- func (s *EmailLogSelect) ScanX(ctx context.Context, v any)
- func (s *EmailLogSelect) String(ctx context.Context) (_ string, err error)
- func (s *EmailLogSelect) StringX(ctx context.Context) string
- func (s *EmailLogSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EmailLogSelect) StringsX(ctx context.Context) []string
- type EmailLogUpdate
- func (elu *EmailLogUpdate) AddSendStatus(u int8) *EmailLogUpdate
- func (elu *EmailLogUpdate) Exec(ctx context.Context) error
- func (c *EmailLogUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (elu *EmailLogUpdate) ExecX(ctx context.Context)
- func (elu *EmailLogUpdate) Mutation() *EmailLogMutation
- func (c *EmailLogUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (elu *EmailLogUpdate) Save(ctx context.Context) (int, error)
- func (elu *EmailLogUpdate) SaveX(ctx context.Context) int
- func (elu *EmailLogUpdate) SetContent(s string) *EmailLogUpdate
- func (el *EmailLogUpdate) SetNotNilContent(value *string) *EmailLogUpdate
- func (el *EmailLogUpdate) SetNotNilSendStatus(value *uint8) *EmailLogUpdate
- func (el *EmailLogUpdate) SetNotNilSubject(value *string) *EmailLogUpdate
- func (el *EmailLogUpdate) SetNotNilTarget(value *string) *EmailLogUpdate
- func (el *EmailLogUpdate) SetNotNilUpdatedAt(value *time.Time) *EmailLogUpdate
- func (elu *EmailLogUpdate) SetSendStatus(u uint8) *EmailLogUpdate
- func (elu *EmailLogUpdate) SetSubject(s string) *EmailLogUpdate
- func (elu *EmailLogUpdate) SetTarget(s string) *EmailLogUpdate
- func (elu *EmailLogUpdate) SetUpdatedAt(t time.Time) *EmailLogUpdate
- func (elu *EmailLogUpdate) Where(ps ...predicate.EmailLog) *EmailLogUpdate
- type EmailLogUpdateOne
- func (eluo *EmailLogUpdateOne) AddSendStatus(u int8) *EmailLogUpdateOne
- func (eluo *EmailLogUpdateOne) Exec(ctx context.Context) error
- func (c *EmailLogUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (eluo *EmailLogUpdateOne) ExecX(ctx context.Context)
- func (eluo *EmailLogUpdateOne) Mutation() *EmailLogMutation
- func (c *EmailLogUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (eluo *EmailLogUpdateOne) Save(ctx context.Context) (*EmailLog, error)
- func (eluo *EmailLogUpdateOne) SaveX(ctx context.Context) *EmailLog
- func (eluo *EmailLogUpdateOne) Select(field string, fields ...string) *EmailLogUpdateOne
- func (eluo *EmailLogUpdateOne) SetContent(s string) *EmailLogUpdateOne
- func (el *EmailLogUpdateOne) SetNotNilContent(value *string) *EmailLogUpdateOne
- func (el *EmailLogUpdateOne) SetNotNilSendStatus(value *uint8) *EmailLogUpdateOne
- func (el *EmailLogUpdateOne) SetNotNilSubject(value *string) *EmailLogUpdateOne
- func (el *EmailLogUpdateOne) SetNotNilTarget(value *string) *EmailLogUpdateOne
- func (el *EmailLogUpdateOne) SetNotNilUpdatedAt(value *time.Time) *EmailLogUpdateOne
- func (eluo *EmailLogUpdateOne) SetSendStatus(u uint8) *EmailLogUpdateOne
- func (eluo *EmailLogUpdateOne) SetSubject(s string) *EmailLogUpdateOne
- func (eluo *EmailLogUpdateOne) SetTarget(s string) *EmailLogUpdateOne
- func (eluo *EmailLogUpdateOne) SetUpdatedAt(t time.Time) *EmailLogUpdateOne
- func (eluo *EmailLogUpdateOne) Where(ps ...predicate.EmailLog) *EmailLogUpdateOne
- type EmailLogs
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageDetails
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type SmsLog
- func (c *SmsLog) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *SmsLog) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sl *SmsLog) String() string
- func (sl *SmsLog) Unwrap() *SmsLog
- func (sl *SmsLog) Update() *SmsLogUpdateOne
- func (sl *SmsLog) Value(name string) (ent.Value, error)
- type SmsLogClient
- func (c *SmsLogClient) Create() *SmsLogCreate
- func (c *SmsLogClient) CreateBulk(builders ...*SmsLogCreate) *SmsLogCreateBulk
- func (c *SmsLogClient) Delete() *SmsLogDelete
- func (c *SmsLogClient) DeleteOne(sl *SmsLog) *SmsLogDeleteOne
- func (c *SmsLogClient) DeleteOneID(id uuid.UUID) *SmsLogDeleteOne
- func (c *SmsLogClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *SmsLogClient) Get(ctx context.Context, id uuid.UUID) (*SmsLog, error)
- func (c *SmsLogClient) GetX(ctx context.Context, id uuid.UUID) *SmsLog
- func (c *SmsLogClient) Hooks() []Hook
- func (c *SmsLogClient) Intercept(interceptors ...Interceptor)
- func (c *SmsLogClient) Interceptors() []Interceptor
- func (c *SmsLogClient) Query() *SmsLogQuery
- func (c *SmsLogClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *SmsLogClient) Update() *SmsLogUpdate
- func (c *SmsLogClient) UpdateOne(sl *SmsLog) *SmsLogUpdateOne
- func (c *SmsLogClient) UpdateOneID(id uuid.UUID) *SmsLogUpdateOne
- func (c *SmsLogClient) Use(hooks ...Hook)
- type SmsLogCreate
- func (slc *SmsLogCreate) Exec(ctx context.Context) error
- func (c *SmsLogCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (slc *SmsLogCreate) ExecX(ctx context.Context)
- func (slc *SmsLogCreate) Mutation() *SmsLogMutation
- func (c *SmsLogCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (slc *SmsLogCreate) Save(ctx context.Context) (*SmsLog, error)
- func (slc *SmsLogCreate) SaveX(ctx context.Context) *SmsLog
- func (slc *SmsLogCreate) SetContent(s string) *SmsLogCreate
- func (slc *SmsLogCreate) SetCreatedAt(t time.Time) *SmsLogCreate
- func (slc *SmsLogCreate) SetID(u uuid.UUID) *SmsLogCreate
- func (slc *SmsLogCreate) SetNillableCreatedAt(t *time.Time) *SmsLogCreate
- func (slc *SmsLogCreate) SetNillableID(u *uuid.UUID) *SmsLogCreate
- func (slc *SmsLogCreate) SetNillableUpdatedAt(t *time.Time) *SmsLogCreate
- func (sl *SmsLogCreate) SetNotNilContent(value *string) *SmsLogCreate
- func (sl *SmsLogCreate) SetNotNilPhoneNumber(value *string) *SmsLogCreate
- func (sl *SmsLogCreate) SetNotNilProvider(value *string) *SmsLogCreate
- func (sl *SmsLogCreate) SetNotNilSendStatus(value *uint8) *SmsLogCreate
- func (sl *SmsLogCreate) SetNotNilUpdatedAt(value *time.Time) *SmsLogCreate
- func (slc *SmsLogCreate) SetPhoneNumber(s string) *SmsLogCreate
- func (slc *SmsLogCreate) SetProvider(s string) *SmsLogCreate
- func (slc *SmsLogCreate) SetSendStatus(u uint8) *SmsLogCreate
- func (slc *SmsLogCreate) SetUpdatedAt(t time.Time) *SmsLogCreate
- type SmsLogCreateBulk
- func (slcb *SmsLogCreateBulk) Exec(ctx context.Context) error
- func (c *SmsLogCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (slcb *SmsLogCreateBulk) ExecX(ctx context.Context)
- func (c *SmsLogCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (slcb *SmsLogCreateBulk) Save(ctx context.Context) ([]*SmsLog, error)
- func (slcb *SmsLogCreateBulk) SaveX(ctx context.Context) []*SmsLog
- type SmsLogDelete
- func (sld *SmsLogDelete) Exec(ctx context.Context) (int, error)
- func (c *SmsLogDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sld *SmsLogDelete) ExecX(ctx context.Context) int
- func (c *SmsLogDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sld *SmsLogDelete) Where(ps ...predicate.SmsLog) *SmsLogDelete
- type SmsLogDeleteOne
- type SmsLogGroupBy
- func (slgb *SmsLogGroupBy) Aggregate(fns ...AggregateFunc) *SmsLogGroupBy
- func (s *SmsLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SmsLogGroupBy) BoolX(ctx context.Context) bool
- func (s *SmsLogGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SmsLogGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SmsLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SmsLogGroupBy) Float64X(ctx context.Context) float64
- func (s *SmsLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SmsLogGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SmsLogGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SmsLogGroupBy) IntX(ctx context.Context) int
- func (s *SmsLogGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SmsLogGroupBy) IntsX(ctx context.Context) []int
- func (slgb *SmsLogGroupBy) Scan(ctx context.Context, v any) error
- func (s *SmsLogGroupBy) ScanX(ctx context.Context, v any)
- func (s *SmsLogGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SmsLogGroupBy) StringX(ctx context.Context) string
- func (s *SmsLogGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SmsLogGroupBy) StringsX(ctx context.Context) []string
- type SmsLogMutation
- func (m *SmsLogMutation) AddField(name string, value ent.Value) error
- func (m *SmsLogMutation) AddSendStatus(u int8)
- func (m *SmsLogMutation) AddedEdges() []string
- func (m *SmsLogMutation) AddedField(name string) (ent.Value, bool)
- func (m *SmsLogMutation) AddedFields() []string
- func (m *SmsLogMutation) AddedIDs(name string) []ent.Value
- func (m *SmsLogMutation) AddedSendStatus() (r int8, exists bool)
- func (m *SmsLogMutation) ClearEdge(name string) error
- func (m *SmsLogMutation) ClearField(name string) error
- func (m *SmsLogMutation) ClearedEdges() []string
- func (m *SmsLogMutation) ClearedFields() []string
- func (m SmsLogMutation) Client() *Client
- func (m *SmsLogMutation) Content() (r string, exists bool)
- func (m *SmsLogMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SmsLogMutation) EdgeCleared(name string) bool
- func (c *SmsLogMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *SmsLogMutation) Field(name string) (ent.Value, bool)
- func (m *SmsLogMutation) FieldCleared(name string) bool
- func (m *SmsLogMutation) Fields() []string
- func (m *SmsLogMutation) ID() (id uuid.UUID, exists bool)
- func (m *SmsLogMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *SmsLogMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *SmsLogMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SmsLogMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SmsLogMutation) OldPhoneNumber(ctx context.Context) (v string, err error)
- func (m *SmsLogMutation) OldProvider(ctx context.Context) (v string, err error)
- func (m *SmsLogMutation) OldSendStatus(ctx context.Context) (v uint8, err error)
- func (m *SmsLogMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SmsLogMutation) Op() Op
- func (m *SmsLogMutation) PhoneNumber() (r string, exists bool)
- func (m *SmsLogMutation) Provider() (r string, exists bool)
- func (c *SmsLogMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *SmsLogMutation) RemovedEdges() []string
- func (m *SmsLogMutation) RemovedIDs(name string) []ent.Value
- func (m *SmsLogMutation) ResetContent()
- func (m *SmsLogMutation) ResetCreatedAt()
- func (m *SmsLogMutation) ResetEdge(name string) error
- func (m *SmsLogMutation) ResetField(name string) error
- func (m *SmsLogMutation) ResetPhoneNumber()
- func (m *SmsLogMutation) ResetProvider()
- func (m *SmsLogMutation) ResetSendStatus()
- func (m *SmsLogMutation) ResetUpdatedAt()
- func (m *SmsLogMutation) SendStatus() (r uint8, exists bool)
- func (m *SmsLogMutation) SetContent(s string)
- func (m *SmsLogMutation) SetCreatedAt(t time.Time)
- func (m *SmsLogMutation) SetField(name string, value ent.Value) error
- func (m *SmsLogMutation) SetID(id uuid.UUID)
- func (m *SmsLogMutation) SetOp(op Op)
- func (m *SmsLogMutation) SetPhoneNumber(s string)
- func (m *SmsLogMutation) SetProvider(s string)
- func (m *SmsLogMutation) SetSendStatus(u uint8)
- func (m *SmsLogMutation) SetUpdatedAt(t time.Time)
- func (m SmsLogMutation) Tx() (*Tx, error)
- func (m *SmsLogMutation) Type() string
- func (m *SmsLogMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SmsLogMutation) Where(ps ...predicate.SmsLog)
- func (m *SmsLogMutation) WhereP(ps ...func(*sql.Selector))
- type SmsLogPageList
- type SmsLogPager
- type SmsLogPaginateOption
- type SmsLogQuery
- func (slq *SmsLogQuery) Aggregate(fns ...AggregateFunc) *SmsLogSelect
- func (slq *SmsLogQuery) All(ctx context.Context) ([]*SmsLog, error)
- func (slq *SmsLogQuery) AllX(ctx context.Context) []*SmsLog
- func (slq *SmsLogQuery) Clone() *SmsLogQuery
- func (slq *SmsLogQuery) Count(ctx context.Context) (int, error)
- func (slq *SmsLogQuery) CountX(ctx context.Context) int
- func (c *SmsLogQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (slq *SmsLogQuery) Exist(ctx context.Context) (bool, error)
- func (slq *SmsLogQuery) ExistX(ctx context.Context) bool
- func (slq *SmsLogQuery) First(ctx context.Context) (*SmsLog, error)
- func (slq *SmsLogQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (slq *SmsLogQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (slq *SmsLogQuery) FirstX(ctx context.Context) *SmsLog
- func (slq *SmsLogQuery) GroupBy(field string, fields ...string) *SmsLogGroupBy
- func (slq *SmsLogQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (slq *SmsLogQuery) IDsX(ctx context.Context) []uuid.UUID
- func (slq *SmsLogQuery) Limit(limit int) *SmsLogQuery
- func (slq *SmsLogQuery) Offset(offset int) *SmsLogQuery
- func (slq *SmsLogQuery) Only(ctx context.Context) (*SmsLog, error)
- func (slq *SmsLogQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (slq *SmsLogQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (slq *SmsLogQuery) OnlyX(ctx context.Context) *SmsLog
- func (slq *SmsLogQuery) Order(o ...smslog.OrderOption) *SmsLogQuery
- func (sl *SmsLogQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*SmsLogPageList, error)
- func (c *SmsLogQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (slq *SmsLogQuery) Select(fields ...string) *SmsLogSelect
- func (slq *SmsLogQuery) Unique(unique bool) *SmsLogQuery
- func (slq *SmsLogQuery) Where(ps ...predicate.SmsLog) *SmsLogQuery
- type SmsLogSelect
- func (sls *SmsLogSelect) Aggregate(fns ...AggregateFunc) *SmsLogSelect
- func (s *SmsLogSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SmsLogSelect) BoolX(ctx context.Context) bool
- func (s *SmsLogSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SmsLogSelect) BoolsX(ctx context.Context) []bool
- func (c SmsLogSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *SmsLogSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SmsLogSelect) Float64X(ctx context.Context) float64
- func (s *SmsLogSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SmsLogSelect) Float64sX(ctx context.Context) []float64
- func (s *SmsLogSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SmsLogSelect) IntX(ctx context.Context) int
- func (s *SmsLogSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SmsLogSelect) IntsX(ctx context.Context) []int
- func (c SmsLogSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sls *SmsLogSelect) Scan(ctx context.Context, v any) error
- func (s *SmsLogSelect) ScanX(ctx context.Context, v any)
- func (s *SmsLogSelect) String(ctx context.Context) (_ string, err error)
- func (s *SmsLogSelect) StringX(ctx context.Context) string
- func (s *SmsLogSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SmsLogSelect) StringsX(ctx context.Context) []string
- type SmsLogUpdate
- func (slu *SmsLogUpdate) AddSendStatus(u int8) *SmsLogUpdate
- func (slu *SmsLogUpdate) Exec(ctx context.Context) error
- func (c *SmsLogUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (slu *SmsLogUpdate) ExecX(ctx context.Context)
- func (slu *SmsLogUpdate) Mutation() *SmsLogMutation
- func (c *SmsLogUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (slu *SmsLogUpdate) Save(ctx context.Context) (int, error)
- func (slu *SmsLogUpdate) SaveX(ctx context.Context) int
- func (slu *SmsLogUpdate) SetContent(s string) *SmsLogUpdate
- func (sl *SmsLogUpdate) SetNotNilContent(value *string) *SmsLogUpdate
- func (sl *SmsLogUpdate) SetNotNilPhoneNumber(value *string) *SmsLogUpdate
- func (sl *SmsLogUpdate) SetNotNilProvider(value *string) *SmsLogUpdate
- func (sl *SmsLogUpdate) SetNotNilSendStatus(value *uint8) *SmsLogUpdate
- func (sl *SmsLogUpdate) SetNotNilUpdatedAt(value *time.Time) *SmsLogUpdate
- func (slu *SmsLogUpdate) SetPhoneNumber(s string) *SmsLogUpdate
- func (slu *SmsLogUpdate) SetProvider(s string) *SmsLogUpdate
- func (slu *SmsLogUpdate) SetSendStatus(u uint8) *SmsLogUpdate
- func (slu *SmsLogUpdate) SetUpdatedAt(t time.Time) *SmsLogUpdate
- func (slu *SmsLogUpdate) Where(ps ...predicate.SmsLog) *SmsLogUpdate
- type SmsLogUpdateOne
- func (sluo *SmsLogUpdateOne) AddSendStatus(u int8) *SmsLogUpdateOne
- func (sluo *SmsLogUpdateOne) Exec(ctx context.Context) error
- func (c *SmsLogUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sluo *SmsLogUpdateOne) ExecX(ctx context.Context)
- func (sluo *SmsLogUpdateOne) Mutation() *SmsLogMutation
- func (c *SmsLogUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sluo *SmsLogUpdateOne) Save(ctx context.Context) (*SmsLog, error)
- func (sluo *SmsLogUpdateOne) SaveX(ctx context.Context) *SmsLog
- func (sluo *SmsLogUpdateOne) Select(field string, fields ...string) *SmsLogUpdateOne
- func (sluo *SmsLogUpdateOne) SetContent(s string) *SmsLogUpdateOne
- func (sl *SmsLogUpdateOne) SetNotNilContent(value *string) *SmsLogUpdateOne
- func (sl *SmsLogUpdateOne) SetNotNilPhoneNumber(value *string) *SmsLogUpdateOne
- func (sl *SmsLogUpdateOne) SetNotNilProvider(value *string) *SmsLogUpdateOne
- func (sl *SmsLogUpdateOne) SetNotNilSendStatus(value *uint8) *SmsLogUpdateOne
- func (sl *SmsLogUpdateOne) SetNotNilUpdatedAt(value *time.Time) *SmsLogUpdateOne
- func (sluo *SmsLogUpdateOne) SetPhoneNumber(s string) *SmsLogUpdateOne
- func (sluo *SmsLogUpdateOne) SetProvider(s string) *SmsLogUpdateOne
- func (sluo *SmsLogUpdateOne) SetSendStatus(u uint8) *SmsLogUpdateOne
- func (sluo *SmsLogUpdateOne) SetUpdatedAt(t time.Time) *SmsLogUpdateOne
- func (sluo *SmsLogUpdateOne) Where(ps ...predicate.SmsLog) *SmsLogUpdateOne
- type SmsLogs
- type TraverseFunc
- type Traverser
- type Tx
- func (tx *Tx) Client() *Client
- func (tx *Tx) Commit() error
- func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tx *Tx) OnCommit(f CommitHook)
- func (tx *Tx) OnRollback(f RollbackHook)
- func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tx *Tx) Rollback() error
- 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. TypeEmailLog = "EmailLog" TypeSmsLog = "SmsLog" )
Variables ¶
var DefaultEmailLogOrder = Desc(emaillog.FieldID)
DefaultEmailLogOrder is the default ordering of EmailLog.
var DefaultSmsLogOrder = Desc(smslog.FieldID)
DefaultSmsLogOrder is the default ordering of SmsLog.
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 // EmailLog is the client for interacting with the EmailLog builders. EmailLog *EmailLogClient // SmsLog is the client for interacting with the SmsLog builders. SmsLog *SmsLogClient // 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(). EmailLog. Query(). Count(ctx)
func (*Client) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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(...)`.
func (*Client) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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 EmailLog ¶
type EmailLog struct { // ID of the ent. // UUID ID uuid.UUID `json:"id,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"` // The target email address | 目标邮箱地址 Target string `json:"target,omitempty"` // The subject | 发送的标题 Subject string `json:"subject,omitempty"` // The content | 发送的内容 Content string `json:"content,omitempty"` // The send status, 0 unknown 1 success 2 failed | 发送的状态, 0 未知, 1 成功, 2 失败 SendStatus uint8 `json:"send_status,omitempty"` // contains filtered or unexported fields }
EmailLog is the model entity for the EmailLog schema.
func (*EmailLog) ExecContext ¶
func (c *EmailLog) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EmailLog) QueryContext ¶
func (c *EmailLog) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EmailLog) Unwrap ¶
Unwrap unwraps the EmailLog 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 (*EmailLog) Update ¶
func (el *EmailLog) Update() *EmailLogUpdateOne
Update returns a builder for updating this EmailLog. Note that you need to call EmailLog.Unwrap() before calling this method if this EmailLog was returned from a transaction, and the transaction was committed or rolled back.
type EmailLogClient ¶
type EmailLogClient struct {
// contains filtered or unexported fields
}
EmailLogClient is a client for the EmailLog schema.
func NewEmailLogClient ¶
func NewEmailLogClient(c config) *EmailLogClient
NewEmailLogClient returns a client for the EmailLog from the given config.
func (*EmailLogClient) Create ¶
func (c *EmailLogClient) Create() *EmailLogCreate
Create returns a builder for creating a EmailLog entity.
func (*EmailLogClient) CreateBulk ¶
func (c *EmailLogClient) CreateBulk(builders ...*EmailLogCreate) *EmailLogCreateBulk
CreateBulk returns a builder for creating a bulk of EmailLog entities.
func (*EmailLogClient) Delete ¶
func (c *EmailLogClient) Delete() *EmailLogDelete
Delete returns a delete builder for EmailLog.
func (*EmailLogClient) DeleteOne ¶
func (c *EmailLogClient) DeleteOne(el *EmailLog) *EmailLogDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EmailLogClient) DeleteOneID ¶
func (c *EmailLogClient) DeleteOneID(id uuid.UUID) *EmailLogDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EmailLogClient) ExecContext ¶
func (c *EmailLogClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EmailLogClient) Hooks ¶
func (c *EmailLogClient) Hooks() []Hook
Hooks returns the client hooks.
func (*EmailLogClient) Intercept ¶
func (c *EmailLogClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `emaillog.Intercept(f(g(h())))`.
func (*EmailLogClient) Interceptors ¶
func (c *EmailLogClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EmailLogClient) Query ¶
func (c *EmailLogClient) Query() *EmailLogQuery
Query returns a query builder for EmailLog.
func (*EmailLogClient) QueryContext ¶
func (c *EmailLogClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EmailLogClient) Update ¶
func (c *EmailLogClient) Update() *EmailLogUpdate
Update returns an update builder for EmailLog.
func (*EmailLogClient) UpdateOne ¶
func (c *EmailLogClient) UpdateOne(el *EmailLog) *EmailLogUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EmailLogClient) UpdateOneID ¶
func (c *EmailLogClient) UpdateOneID(id uuid.UUID) *EmailLogUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EmailLogClient) Use ¶
func (c *EmailLogClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `emaillog.Hooks(f(g(h())))`.
type EmailLogCreate ¶
type EmailLogCreate struct {
// contains filtered or unexported fields
}
EmailLogCreate is the builder for creating a EmailLog entity.
func (*EmailLogCreate) Exec ¶
func (elc *EmailLogCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EmailLogCreate) ExecContext ¶
func (c *EmailLogCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EmailLogCreate) ExecX ¶
func (elc *EmailLogCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmailLogCreate) Mutation ¶
func (elc *EmailLogCreate) Mutation() *EmailLogMutation
Mutation returns the EmailLogMutation object of the builder.
func (*EmailLogCreate) QueryContext ¶
func (c *EmailLogCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EmailLogCreate) Save ¶
func (elc *EmailLogCreate) Save(ctx context.Context) (*EmailLog, error)
Save creates the EmailLog in the database.
func (*EmailLogCreate) SaveX ¶
func (elc *EmailLogCreate) SaveX(ctx context.Context) *EmailLog
SaveX calls Save and panics if Save returns an error.
func (*EmailLogCreate) SetContent ¶
func (elc *EmailLogCreate) SetContent(s string) *EmailLogCreate
SetContent sets the "content" field.
func (*EmailLogCreate) SetCreatedAt ¶
func (elc *EmailLogCreate) SetCreatedAt(t time.Time) *EmailLogCreate
SetCreatedAt sets the "created_at" field.
func (*EmailLogCreate) SetID ¶
func (elc *EmailLogCreate) SetID(u uuid.UUID) *EmailLogCreate
SetID sets the "id" field.
func (*EmailLogCreate) SetNillableCreatedAt ¶
func (elc *EmailLogCreate) SetNillableCreatedAt(t *time.Time) *EmailLogCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*EmailLogCreate) SetNillableID ¶
func (elc *EmailLogCreate) SetNillableID(u *uuid.UUID) *EmailLogCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*EmailLogCreate) SetNillableUpdatedAt ¶
func (elc *EmailLogCreate) SetNillableUpdatedAt(t *time.Time) *EmailLogCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*EmailLogCreate) SetNotNilContent ¶
func (el *EmailLogCreate) SetNotNilContent(value *string) *EmailLogCreate
set field if value's pointer is not nil.
func (*EmailLogCreate) SetNotNilSendStatus ¶
func (el *EmailLogCreate) SetNotNilSendStatus(value *uint8) *EmailLogCreate
set field if value's pointer is not nil.
func (*EmailLogCreate) SetNotNilSubject ¶
func (el *EmailLogCreate) SetNotNilSubject(value *string) *EmailLogCreate
set field if value's pointer is not nil.
func (*EmailLogCreate) SetNotNilTarget ¶
func (el *EmailLogCreate) SetNotNilTarget(value *string) *EmailLogCreate
set field if value's pointer is not nil.
func (*EmailLogCreate) SetNotNilUpdatedAt ¶
func (el *EmailLogCreate) SetNotNilUpdatedAt(value *time.Time) *EmailLogCreate
set field if value's pointer is not nil.
func (*EmailLogCreate) SetSendStatus ¶
func (elc *EmailLogCreate) SetSendStatus(u uint8) *EmailLogCreate
SetSendStatus sets the "send_status" field.
func (*EmailLogCreate) SetSubject ¶
func (elc *EmailLogCreate) SetSubject(s string) *EmailLogCreate
SetSubject sets the "subject" field.
func (*EmailLogCreate) SetTarget ¶
func (elc *EmailLogCreate) SetTarget(s string) *EmailLogCreate
SetTarget sets the "target" field.
func (*EmailLogCreate) SetUpdatedAt ¶
func (elc *EmailLogCreate) SetUpdatedAt(t time.Time) *EmailLogCreate
SetUpdatedAt sets the "updated_at" field.
type EmailLogCreateBulk ¶
type EmailLogCreateBulk struct {
// contains filtered or unexported fields
}
EmailLogCreateBulk is the builder for creating many EmailLog entities in bulk.
func (*EmailLogCreateBulk) Exec ¶
func (elcb *EmailLogCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EmailLogCreateBulk) ExecContext ¶
func (c *EmailLogCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EmailLogCreateBulk) ExecX ¶
func (elcb *EmailLogCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmailLogCreateBulk) QueryContext ¶
func (c *EmailLogCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type EmailLogDelete ¶
type EmailLogDelete struct {
// contains filtered or unexported fields
}
EmailLogDelete is the builder for deleting a EmailLog entity.
func (*EmailLogDelete) Exec ¶
func (eld *EmailLogDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EmailLogDelete) ExecContext ¶
func (c *EmailLogDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EmailLogDelete) ExecX ¶
func (eld *EmailLogDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EmailLogDelete) QueryContext ¶
func (c *EmailLogDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EmailLogDelete) Where ¶
func (eld *EmailLogDelete) Where(ps ...predicate.EmailLog) *EmailLogDelete
Where appends a list predicates to the EmailLogDelete builder.
type EmailLogDeleteOne ¶
type EmailLogDeleteOne struct {
// contains filtered or unexported fields
}
EmailLogDeleteOne is the builder for deleting a single EmailLog entity.
func (*EmailLogDeleteOne) Exec ¶
func (eldo *EmailLogDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EmailLogDeleteOne) ExecX ¶
func (eldo *EmailLogDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmailLogDeleteOne) Where ¶
func (eldo *EmailLogDeleteOne) Where(ps ...predicate.EmailLog) *EmailLogDeleteOne
Where appends a list predicates to the EmailLogDelete builder.
type EmailLogGroupBy ¶
type EmailLogGroupBy struct {
// contains filtered or unexported fields
}
EmailLogGroupBy is the group-by builder for EmailLog entities.
func (*EmailLogGroupBy) Aggregate ¶
func (elgb *EmailLogGroupBy) Aggregate(fns ...AggregateFunc) *EmailLogGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EmailLogGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EmailLogGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EmailLogGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EmailLogGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EmailLogGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EmailLogGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EmailLogGroupBy) Scan ¶
func (elgb *EmailLogGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EmailLogGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EmailLogMutation ¶
type EmailLogMutation struct {
// contains filtered or unexported fields
}
EmailLogMutation represents an operation that mutates the EmailLog nodes in the graph.
func (*EmailLogMutation) AddField ¶
func (m *EmailLogMutation) 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 (*EmailLogMutation) AddSendStatus ¶
func (m *EmailLogMutation) AddSendStatus(u int8)
AddSendStatus adds u to the "send_status" field.
func (*EmailLogMutation) AddedEdges ¶
func (m *EmailLogMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EmailLogMutation) AddedField ¶
func (m *EmailLogMutation) 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 (*EmailLogMutation) AddedFields ¶
func (m *EmailLogMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EmailLogMutation) AddedIDs ¶
func (m *EmailLogMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EmailLogMutation) AddedSendStatus ¶
func (m *EmailLogMutation) AddedSendStatus() (r int8, exists bool)
AddedSendStatus returns the value that was added to the "send_status" field in this mutation.
func (*EmailLogMutation) ClearEdge ¶
func (m *EmailLogMutation) 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 (*EmailLogMutation) ClearField ¶
func (m *EmailLogMutation) 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 (*EmailLogMutation) ClearedEdges ¶
func (m *EmailLogMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EmailLogMutation) ClearedFields ¶
func (m *EmailLogMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EmailLogMutation) Client ¶
func (m EmailLogMutation) 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 (*EmailLogMutation) Content ¶
func (m *EmailLogMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*EmailLogMutation) CreatedAt ¶
func (m *EmailLogMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*EmailLogMutation) EdgeCleared ¶
func (m *EmailLogMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EmailLogMutation) ExecContext ¶
func (c *EmailLogMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EmailLogMutation) Field ¶
func (m *EmailLogMutation) 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 (*EmailLogMutation) FieldCleared ¶
func (m *EmailLogMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EmailLogMutation) Fields ¶
func (m *EmailLogMutation) 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 (*EmailLogMutation) ID ¶
func (m *EmailLogMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*EmailLogMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*EmailLogMutation) OldContent ¶
func (m *EmailLogMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the EmailLog entity. If the EmailLog 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 (*EmailLogMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the EmailLog entity. If the EmailLog 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 (*EmailLogMutation) 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 (*EmailLogMutation) OldSendStatus ¶
func (m *EmailLogMutation) OldSendStatus(ctx context.Context) (v uint8, err error)
OldSendStatus returns the old "send_status" field's value of the EmailLog entity. If the EmailLog 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 (*EmailLogMutation) OldSubject ¶
func (m *EmailLogMutation) OldSubject(ctx context.Context) (v string, err error)
OldSubject returns the old "subject" field's value of the EmailLog entity. If the EmailLog 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 (*EmailLogMutation) OldTarget ¶
func (m *EmailLogMutation) OldTarget(ctx context.Context) (v string, err error)
OldTarget returns the old "target" field's value of the EmailLog entity. If the EmailLog 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 (*EmailLogMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the EmailLog entity. If the EmailLog 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 (*EmailLogMutation) QueryContext ¶
func (c *EmailLogMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EmailLogMutation) RemovedEdges ¶
func (m *EmailLogMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EmailLogMutation) RemovedIDs ¶
func (m *EmailLogMutation) 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 (*EmailLogMutation) ResetContent ¶
func (m *EmailLogMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*EmailLogMutation) ResetCreatedAt ¶
func (m *EmailLogMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*EmailLogMutation) ResetEdge ¶
func (m *EmailLogMutation) 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 (*EmailLogMutation) ResetField ¶
func (m *EmailLogMutation) 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 (*EmailLogMutation) ResetSendStatus ¶
func (m *EmailLogMutation) ResetSendStatus()
ResetSendStatus resets all changes to the "send_status" field.
func (*EmailLogMutation) ResetSubject ¶
func (m *EmailLogMutation) ResetSubject()
ResetSubject resets all changes to the "subject" field.
func (*EmailLogMutation) ResetTarget ¶
func (m *EmailLogMutation) ResetTarget()
ResetTarget resets all changes to the "target" field.
func (*EmailLogMutation) ResetUpdatedAt ¶
func (m *EmailLogMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*EmailLogMutation) SendStatus ¶
func (m *EmailLogMutation) SendStatus() (r uint8, exists bool)
SendStatus returns the value of the "send_status" field in the mutation.
func (*EmailLogMutation) SetContent ¶
func (m *EmailLogMutation) SetContent(s string)
SetContent sets the "content" field.
func (*EmailLogMutation) SetCreatedAt ¶
func (m *EmailLogMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*EmailLogMutation) SetField ¶
func (m *EmailLogMutation) 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 (*EmailLogMutation) SetID ¶
func (m *EmailLogMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of EmailLog entities.
func (*EmailLogMutation) SetOp ¶
func (m *EmailLogMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*EmailLogMutation) SetSendStatus ¶
func (m *EmailLogMutation) SetSendStatus(u uint8)
SetSendStatus sets the "send_status" field.
func (*EmailLogMutation) SetSubject ¶
func (m *EmailLogMutation) SetSubject(s string)
SetSubject sets the "subject" field.
func (*EmailLogMutation) SetTarget ¶
func (m *EmailLogMutation) SetTarget(s string)
SetTarget sets the "target" field.
func (*EmailLogMutation) SetUpdatedAt ¶
func (m *EmailLogMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*EmailLogMutation) Subject ¶
func (m *EmailLogMutation) Subject() (r string, exists bool)
Subject returns the value of the "subject" field in the mutation.
func (*EmailLogMutation) Target ¶
func (m *EmailLogMutation) Target() (r string, exists bool)
Target returns the value of the "target" field in the mutation.
func (EmailLogMutation) Tx ¶
func (m EmailLogMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EmailLogMutation) Type ¶
func (m *EmailLogMutation) Type() string
Type returns the node type of this mutation (EmailLog).
func (*EmailLogMutation) UpdatedAt ¶
func (m *EmailLogMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*EmailLogMutation) Where ¶
func (m *EmailLogMutation) Where(ps ...predicate.EmailLog)
Where appends a list predicates to the EmailLogMutation builder.
func (*EmailLogMutation) WhereP ¶
func (m *EmailLogMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EmailLogMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EmailLogPageList ¶
type EmailLogPageList struct { List []*EmailLog `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
EmailLogPageList is EmailLog PageList result.
type EmailLogPager ¶
type EmailLogPager struct { Order emaillog.OrderOption Filter func(*EmailLogQuery) (*EmailLogQuery, error) }
func (*EmailLogPager) ApplyFilter ¶
func (p *EmailLogPager) ApplyFilter(query *EmailLogQuery) (*EmailLogQuery, error)
type EmailLogPaginateOption ¶
type EmailLogPaginateOption func(*EmailLogPager)
EmailLogPaginateOption enables pagination customization.
type EmailLogQuery ¶
type EmailLogQuery struct {
// contains filtered or unexported fields
}
EmailLogQuery is the builder for querying EmailLog entities.
func (*EmailLogQuery) Aggregate ¶
func (elq *EmailLogQuery) Aggregate(fns ...AggregateFunc) *EmailLogSelect
Aggregate returns a EmailLogSelect configured with the given aggregations.
func (*EmailLogQuery) All ¶
func (elq *EmailLogQuery) All(ctx context.Context) ([]*EmailLog, error)
All executes the query and returns a list of EmailLogs.
func (*EmailLogQuery) AllX ¶
func (elq *EmailLogQuery) AllX(ctx context.Context) []*EmailLog
AllX is like All, but panics if an error occurs.
func (*EmailLogQuery) Clone ¶
func (elq *EmailLogQuery) Clone() *EmailLogQuery
Clone returns a duplicate of the EmailLogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EmailLogQuery) Count ¶
func (elq *EmailLogQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EmailLogQuery) CountX ¶
func (elq *EmailLogQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EmailLogQuery) ExecContext ¶
func (c *EmailLogQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EmailLogQuery) Exist ¶
func (elq *EmailLogQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EmailLogQuery) ExistX ¶
func (elq *EmailLogQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EmailLogQuery) First ¶
func (elq *EmailLogQuery) First(ctx context.Context) (*EmailLog, error)
First returns the first EmailLog entity from the query. Returns a *NotFoundError when no EmailLog was found.
func (*EmailLogQuery) FirstID ¶
FirstID returns the first EmailLog ID from the query. Returns a *NotFoundError when no EmailLog ID was found.
func (*EmailLogQuery) FirstIDX ¶
func (elq *EmailLogQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*EmailLogQuery) FirstX ¶
func (elq *EmailLogQuery) FirstX(ctx context.Context) *EmailLog
FirstX is like First, but panics if an error occurs.
func (*EmailLogQuery) GroupBy ¶
func (elq *EmailLogQuery) GroupBy(field string, fields ...string) *EmailLogGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.EmailLog.Query(). GroupBy(emaillog.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EmailLogQuery) IDsX ¶
func (elq *EmailLogQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*EmailLogQuery) Limit ¶
func (elq *EmailLogQuery) Limit(limit int) *EmailLogQuery
Limit the number of records to be returned by this query.
func (*EmailLogQuery) Offset ¶
func (elq *EmailLogQuery) Offset(offset int) *EmailLogQuery
Offset to start from.
func (*EmailLogQuery) Only ¶
func (elq *EmailLogQuery) Only(ctx context.Context) (*EmailLog, error)
Only returns a single EmailLog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one EmailLog entity is found. Returns a *NotFoundError when no EmailLog entities are found.
func (*EmailLogQuery) OnlyID ¶
OnlyID is like Only, but returns the only EmailLog ID in the query. Returns a *NotSingularError when more than one EmailLog ID is found. Returns a *NotFoundError when no entities are found.
func (*EmailLogQuery) OnlyIDX ¶
func (elq *EmailLogQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EmailLogQuery) OnlyX ¶
func (elq *EmailLogQuery) OnlyX(ctx context.Context) *EmailLog
OnlyX is like Only, but panics if an error occurs.
func (*EmailLogQuery) Order ¶
func (elq *EmailLogQuery) Order(o ...emaillog.OrderOption) *EmailLogQuery
Order specifies how the records should be ordered.
func (*EmailLogQuery) Page ¶
func (el *EmailLogQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...EmailLogPaginateOption, ) (*EmailLogPageList, error)
func (*EmailLogQuery) QueryContext ¶
func (c *EmailLogQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EmailLogQuery) Select ¶
func (elq *EmailLogQuery) Select(fields ...string) *EmailLogSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.EmailLog.Query(). Select(emaillog.FieldCreatedAt). Scan(ctx, &v)
func (*EmailLogQuery) Unique ¶
func (elq *EmailLogQuery) Unique(unique bool) *EmailLogQuery
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 (*EmailLogQuery) Where ¶
func (elq *EmailLogQuery) Where(ps ...predicate.EmailLog) *EmailLogQuery
Where adds a new predicate for the EmailLogQuery builder.
type EmailLogSelect ¶
type EmailLogSelect struct { *EmailLogQuery // contains filtered or unexported fields }
EmailLogSelect is the builder for selecting fields of EmailLog entities.
func (*EmailLogSelect) Aggregate ¶
func (els *EmailLogSelect) Aggregate(fns ...AggregateFunc) *EmailLogSelect
Aggregate adds the given aggregation functions to the selector query.
func (*EmailLogSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EmailLogSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (EmailLogSelect) ExecContext ¶
func (c EmailLogSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EmailLogSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EmailLogSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EmailLogSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EmailLogSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (EmailLogSelect) QueryContext ¶
func (c EmailLogSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EmailLogSelect) Scan ¶
func (els *EmailLogSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EmailLogSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EmailLogUpdate ¶
type EmailLogUpdate struct {
// contains filtered or unexported fields
}
EmailLogUpdate is the builder for updating EmailLog entities.
func (*EmailLogUpdate) AddSendStatus ¶
func (elu *EmailLogUpdate) AddSendStatus(u int8) *EmailLogUpdate
AddSendStatus adds u to the "send_status" field.
func (*EmailLogUpdate) Exec ¶
func (elu *EmailLogUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EmailLogUpdate) ExecContext ¶
func (c *EmailLogUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EmailLogUpdate) ExecX ¶
func (elu *EmailLogUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmailLogUpdate) Mutation ¶
func (elu *EmailLogUpdate) Mutation() *EmailLogMutation
Mutation returns the EmailLogMutation object of the builder.
func (*EmailLogUpdate) QueryContext ¶
func (c *EmailLogUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EmailLogUpdate) Save ¶
func (elu *EmailLogUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EmailLogUpdate) SaveX ¶
func (elu *EmailLogUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EmailLogUpdate) SetContent ¶
func (elu *EmailLogUpdate) SetContent(s string) *EmailLogUpdate
SetContent sets the "content" field.
func (*EmailLogUpdate) SetNotNilContent ¶
func (el *EmailLogUpdate) SetNotNilContent(value *string) *EmailLogUpdate
set field if value's pointer is not nil.
func (*EmailLogUpdate) SetNotNilSendStatus ¶
func (el *EmailLogUpdate) SetNotNilSendStatus(value *uint8) *EmailLogUpdate
set field if value's pointer is not nil.
func (*EmailLogUpdate) SetNotNilSubject ¶
func (el *EmailLogUpdate) SetNotNilSubject(value *string) *EmailLogUpdate
set field if value's pointer is not nil.
func (*EmailLogUpdate) SetNotNilTarget ¶
func (el *EmailLogUpdate) SetNotNilTarget(value *string) *EmailLogUpdate
set field if value's pointer is not nil.
func (*EmailLogUpdate) SetNotNilUpdatedAt ¶
func (el *EmailLogUpdate) SetNotNilUpdatedAt(value *time.Time) *EmailLogUpdate
set field if value's pointer is not nil.
func (*EmailLogUpdate) SetSendStatus ¶
func (elu *EmailLogUpdate) SetSendStatus(u uint8) *EmailLogUpdate
SetSendStatus sets the "send_status" field.
func (*EmailLogUpdate) SetSubject ¶
func (elu *EmailLogUpdate) SetSubject(s string) *EmailLogUpdate
SetSubject sets the "subject" field.
func (*EmailLogUpdate) SetTarget ¶
func (elu *EmailLogUpdate) SetTarget(s string) *EmailLogUpdate
SetTarget sets the "target" field.
func (*EmailLogUpdate) SetUpdatedAt ¶
func (elu *EmailLogUpdate) SetUpdatedAt(t time.Time) *EmailLogUpdate
SetUpdatedAt sets the "updated_at" field.
func (*EmailLogUpdate) Where ¶
func (elu *EmailLogUpdate) Where(ps ...predicate.EmailLog) *EmailLogUpdate
Where appends a list predicates to the EmailLogUpdate builder.
type EmailLogUpdateOne ¶
type EmailLogUpdateOne struct {
// contains filtered or unexported fields
}
EmailLogUpdateOne is the builder for updating a single EmailLog entity.
func (*EmailLogUpdateOne) AddSendStatus ¶
func (eluo *EmailLogUpdateOne) AddSendStatus(u int8) *EmailLogUpdateOne
AddSendStatus adds u to the "send_status" field.
func (*EmailLogUpdateOne) Exec ¶
func (eluo *EmailLogUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EmailLogUpdateOne) ExecContext ¶
func (c *EmailLogUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*EmailLogUpdateOne) ExecX ¶
func (eluo *EmailLogUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmailLogUpdateOne) Mutation ¶
func (eluo *EmailLogUpdateOne) Mutation() *EmailLogMutation
Mutation returns the EmailLogMutation object of the builder.
func (*EmailLogUpdateOne) QueryContext ¶
func (c *EmailLogUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*EmailLogUpdateOne) Save ¶
func (eluo *EmailLogUpdateOne) Save(ctx context.Context) (*EmailLog, error)
Save executes the query and returns the updated EmailLog entity.
func (*EmailLogUpdateOne) SaveX ¶
func (eluo *EmailLogUpdateOne) SaveX(ctx context.Context) *EmailLog
SaveX is like Save, but panics if an error occurs.
func (*EmailLogUpdateOne) Select ¶
func (eluo *EmailLogUpdateOne) Select(field string, fields ...string) *EmailLogUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EmailLogUpdateOne) SetContent ¶
func (eluo *EmailLogUpdateOne) SetContent(s string) *EmailLogUpdateOne
SetContent sets the "content" field.
func (*EmailLogUpdateOne) SetNotNilContent ¶
func (el *EmailLogUpdateOne) SetNotNilContent(value *string) *EmailLogUpdateOne
set field if value's pointer is not nil.
func (*EmailLogUpdateOne) SetNotNilSendStatus ¶
func (el *EmailLogUpdateOne) SetNotNilSendStatus(value *uint8) *EmailLogUpdateOne
set field if value's pointer is not nil.
func (*EmailLogUpdateOne) SetNotNilSubject ¶
func (el *EmailLogUpdateOne) SetNotNilSubject(value *string) *EmailLogUpdateOne
set field if value's pointer is not nil.
func (*EmailLogUpdateOne) SetNotNilTarget ¶
func (el *EmailLogUpdateOne) SetNotNilTarget(value *string) *EmailLogUpdateOne
set field if value's pointer is not nil.
func (*EmailLogUpdateOne) SetNotNilUpdatedAt ¶
func (el *EmailLogUpdateOne) SetNotNilUpdatedAt(value *time.Time) *EmailLogUpdateOne
set field if value's pointer is not nil.
func (*EmailLogUpdateOne) SetSendStatus ¶
func (eluo *EmailLogUpdateOne) SetSendStatus(u uint8) *EmailLogUpdateOne
SetSendStatus sets the "send_status" field.
func (*EmailLogUpdateOne) SetSubject ¶
func (eluo *EmailLogUpdateOne) SetSubject(s string) *EmailLogUpdateOne
SetSubject sets the "subject" field.
func (*EmailLogUpdateOne) SetTarget ¶
func (eluo *EmailLogUpdateOne) SetTarget(s string) *EmailLogUpdateOne
SetTarget sets the "target" field.
func (*EmailLogUpdateOne) SetUpdatedAt ¶
func (eluo *EmailLogUpdateOne) SetUpdatedAt(t time.Time) *EmailLogUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*EmailLogUpdateOne) Where ¶
func (eluo *EmailLogUpdateOne) Where(ps ...predicate.EmailLog) *EmailLogUpdateOne
Where appends a list predicates to the EmailLogUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type 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 OrderDirection ¶
type OrderDirection string
OrderDirection defines the directions in which to order a list of items.
const ( // OrderDirectionAsc specifies an ascending order. OrderDirectionAsc OrderDirection = "ASC" // OrderDirectionDesc specifies a descending order. OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) String ¶
func (o OrderDirection) String() string
String implements fmt.Stringer interface.
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
Validate the order direction value.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type PageDetails ¶
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 SmsLog ¶
type SmsLog struct { // ID of the ent. // UUID ID uuid.UUID `json:"id,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"` // The target phone number | 目标电话 PhoneNumber string `json:"phone_number,omitempty"` // The content | 发送的内容 Content string `json:"content,omitempty"` // The send status, 0 unknown 1 success 2 failed | 发送的状态, 0 未知, 1 成功, 2 失败 SendStatus uint8 `json:"send_status,omitempty"` // The sms service provider | 短信服务提供商 Provider string `json:"provider,omitempty"` // contains filtered or unexported fields }
SmsLog is the model entity for the SmsLog schema.
func (*SmsLog) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SmsLog) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SmsLog) Unwrap ¶
Unwrap unwraps the SmsLog 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 (*SmsLog) Update ¶
func (sl *SmsLog) Update() *SmsLogUpdateOne
Update returns a builder for updating this SmsLog. Note that you need to call SmsLog.Unwrap() before calling this method if this SmsLog was returned from a transaction, and the transaction was committed or rolled back.
type SmsLogClient ¶
type SmsLogClient struct {
// contains filtered or unexported fields
}
SmsLogClient is a client for the SmsLog schema.
func NewSmsLogClient ¶
func NewSmsLogClient(c config) *SmsLogClient
NewSmsLogClient returns a client for the SmsLog from the given config.
func (*SmsLogClient) Create ¶
func (c *SmsLogClient) Create() *SmsLogCreate
Create returns a builder for creating a SmsLog entity.
func (*SmsLogClient) CreateBulk ¶
func (c *SmsLogClient) CreateBulk(builders ...*SmsLogCreate) *SmsLogCreateBulk
CreateBulk returns a builder for creating a bulk of SmsLog entities.
func (*SmsLogClient) Delete ¶
func (c *SmsLogClient) Delete() *SmsLogDelete
Delete returns a delete builder for SmsLog.
func (*SmsLogClient) DeleteOne ¶
func (c *SmsLogClient) DeleteOne(sl *SmsLog) *SmsLogDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SmsLogClient) DeleteOneID ¶
func (c *SmsLogClient) DeleteOneID(id uuid.UUID) *SmsLogDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SmsLogClient) ExecContext ¶
func (c *SmsLogClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SmsLogClient) Intercept ¶
func (c *SmsLogClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `smslog.Intercept(f(g(h())))`.
func (*SmsLogClient) Interceptors ¶
func (c *SmsLogClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SmsLogClient) Query ¶
func (c *SmsLogClient) Query() *SmsLogQuery
Query returns a query builder for SmsLog.
func (*SmsLogClient) QueryContext ¶
func (c *SmsLogClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SmsLogClient) Update ¶
func (c *SmsLogClient) Update() *SmsLogUpdate
Update returns an update builder for SmsLog.
func (*SmsLogClient) UpdateOne ¶
func (c *SmsLogClient) UpdateOne(sl *SmsLog) *SmsLogUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SmsLogClient) UpdateOneID ¶
func (c *SmsLogClient) UpdateOneID(id uuid.UUID) *SmsLogUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SmsLogClient) Use ¶
func (c *SmsLogClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `smslog.Hooks(f(g(h())))`.
type SmsLogCreate ¶
type SmsLogCreate struct {
// contains filtered or unexported fields
}
SmsLogCreate is the builder for creating a SmsLog entity.
func (*SmsLogCreate) Exec ¶
func (slc *SmsLogCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SmsLogCreate) ExecContext ¶
func (c *SmsLogCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SmsLogCreate) ExecX ¶
func (slc *SmsLogCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SmsLogCreate) Mutation ¶
func (slc *SmsLogCreate) Mutation() *SmsLogMutation
Mutation returns the SmsLogMutation object of the builder.
func (*SmsLogCreate) QueryContext ¶
func (c *SmsLogCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SmsLogCreate) Save ¶
func (slc *SmsLogCreate) Save(ctx context.Context) (*SmsLog, error)
Save creates the SmsLog in the database.
func (*SmsLogCreate) SaveX ¶
func (slc *SmsLogCreate) SaveX(ctx context.Context) *SmsLog
SaveX calls Save and panics if Save returns an error.
func (*SmsLogCreate) SetContent ¶
func (slc *SmsLogCreate) SetContent(s string) *SmsLogCreate
SetContent sets the "content" field.
func (*SmsLogCreate) SetCreatedAt ¶
func (slc *SmsLogCreate) SetCreatedAt(t time.Time) *SmsLogCreate
SetCreatedAt sets the "created_at" field.
func (*SmsLogCreate) SetID ¶
func (slc *SmsLogCreate) SetID(u uuid.UUID) *SmsLogCreate
SetID sets the "id" field.
func (*SmsLogCreate) SetNillableCreatedAt ¶
func (slc *SmsLogCreate) SetNillableCreatedAt(t *time.Time) *SmsLogCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SmsLogCreate) SetNillableID ¶
func (slc *SmsLogCreate) SetNillableID(u *uuid.UUID) *SmsLogCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SmsLogCreate) SetNillableUpdatedAt ¶
func (slc *SmsLogCreate) SetNillableUpdatedAt(t *time.Time) *SmsLogCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SmsLogCreate) SetNotNilContent ¶
func (sl *SmsLogCreate) SetNotNilContent(value *string) *SmsLogCreate
set field if value's pointer is not nil.
func (*SmsLogCreate) SetNotNilPhoneNumber ¶
func (sl *SmsLogCreate) SetNotNilPhoneNumber(value *string) *SmsLogCreate
set field if value's pointer is not nil.
func (*SmsLogCreate) SetNotNilProvider ¶
func (sl *SmsLogCreate) SetNotNilProvider(value *string) *SmsLogCreate
set field if value's pointer is not nil.
func (*SmsLogCreate) SetNotNilSendStatus ¶
func (sl *SmsLogCreate) SetNotNilSendStatus(value *uint8) *SmsLogCreate
set field if value's pointer is not nil.
func (*SmsLogCreate) SetNotNilUpdatedAt ¶
func (sl *SmsLogCreate) SetNotNilUpdatedAt(value *time.Time) *SmsLogCreate
set field if value's pointer is not nil.
func (*SmsLogCreate) SetPhoneNumber ¶
func (slc *SmsLogCreate) SetPhoneNumber(s string) *SmsLogCreate
SetPhoneNumber sets the "phone_number" field.
func (*SmsLogCreate) SetProvider ¶
func (slc *SmsLogCreate) SetProvider(s string) *SmsLogCreate
SetProvider sets the "provider" field.
func (*SmsLogCreate) SetSendStatus ¶
func (slc *SmsLogCreate) SetSendStatus(u uint8) *SmsLogCreate
SetSendStatus sets the "send_status" field.
func (*SmsLogCreate) SetUpdatedAt ¶
func (slc *SmsLogCreate) SetUpdatedAt(t time.Time) *SmsLogCreate
SetUpdatedAt sets the "updated_at" field.
type SmsLogCreateBulk ¶
type SmsLogCreateBulk struct {
// contains filtered or unexported fields
}
SmsLogCreateBulk is the builder for creating many SmsLog entities in bulk.
func (*SmsLogCreateBulk) Exec ¶
func (slcb *SmsLogCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SmsLogCreateBulk) ExecContext ¶
func (c *SmsLogCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SmsLogCreateBulk) ExecX ¶
func (slcb *SmsLogCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SmsLogCreateBulk) QueryContext ¶
func (c *SmsLogCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type SmsLogDelete ¶
type SmsLogDelete struct {
// contains filtered or unexported fields
}
SmsLogDelete is the builder for deleting a SmsLog entity.
func (*SmsLogDelete) Exec ¶
func (sld *SmsLogDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SmsLogDelete) ExecContext ¶
func (c *SmsLogDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SmsLogDelete) ExecX ¶
func (sld *SmsLogDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SmsLogDelete) QueryContext ¶
func (c *SmsLogDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SmsLogDelete) Where ¶
func (sld *SmsLogDelete) Where(ps ...predicate.SmsLog) *SmsLogDelete
Where appends a list predicates to the SmsLogDelete builder.
type SmsLogDeleteOne ¶
type SmsLogDeleteOne struct {
// contains filtered or unexported fields
}
SmsLogDeleteOne is the builder for deleting a single SmsLog entity.
func (*SmsLogDeleteOne) Exec ¶
func (sldo *SmsLogDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SmsLogDeleteOne) ExecX ¶
func (sldo *SmsLogDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SmsLogDeleteOne) Where ¶
func (sldo *SmsLogDeleteOne) Where(ps ...predicate.SmsLog) *SmsLogDeleteOne
Where appends a list predicates to the SmsLogDelete builder.
type SmsLogGroupBy ¶
type SmsLogGroupBy struct {
// contains filtered or unexported fields
}
SmsLogGroupBy is the group-by builder for SmsLog entities.
func (*SmsLogGroupBy) Aggregate ¶
func (slgb *SmsLogGroupBy) Aggregate(fns ...AggregateFunc) *SmsLogGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SmsLogGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SmsLogGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SmsLogGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SmsLogGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SmsLogGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SmsLogGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SmsLogGroupBy) Scan ¶
func (slgb *SmsLogGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SmsLogGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SmsLogMutation ¶
type SmsLogMutation struct {
// contains filtered or unexported fields
}
SmsLogMutation represents an operation that mutates the SmsLog nodes in the graph.
func (*SmsLogMutation) AddField ¶
func (m *SmsLogMutation) 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 (*SmsLogMutation) AddSendStatus ¶
func (m *SmsLogMutation) AddSendStatus(u int8)
AddSendStatus adds u to the "send_status" field.
func (*SmsLogMutation) AddedEdges ¶
func (m *SmsLogMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SmsLogMutation) AddedField ¶
func (m *SmsLogMutation) 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 (*SmsLogMutation) AddedFields ¶
func (m *SmsLogMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SmsLogMutation) AddedIDs ¶
func (m *SmsLogMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SmsLogMutation) AddedSendStatus ¶
func (m *SmsLogMutation) AddedSendStatus() (r int8, exists bool)
AddedSendStatus returns the value that was added to the "send_status" field in this mutation.
func (*SmsLogMutation) ClearEdge ¶
func (m *SmsLogMutation) 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 (*SmsLogMutation) ClearField ¶
func (m *SmsLogMutation) 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 (*SmsLogMutation) ClearedEdges ¶
func (m *SmsLogMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SmsLogMutation) ClearedFields ¶
func (m *SmsLogMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SmsLogMutation) Client ¶
func (m SmsLogMutation) 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 (*SmsLogMutation) Content ¶
func (m *SmsLogMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*SmsLogMutation) CreatedAt ¶
func (m *SmsLogMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SmsLogMutation) EdgeCleared ¶
func (m *SmsLogMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SmsLogMutation) ExecContext ¶
func (c *SmsLogMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SmsLogMutation) Field ¶
func (m *SmsLogMutation) 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 (*SmsLogMutation) FieldCleared ¶
func (m *SmsLogMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SmsLogMutation) Fields ¶
func (m *SmsLogMutation) 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 (*SmsLogMutation) ID ¶
func (m *SmsLogMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SmsLogMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SmsLogMutation) OldContent ¶
func (m *SmsLogMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the SmsLog entity. If the SmsLog 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 (*SmsLogMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the SmsLog entity. If the SmsLog 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 (*SmsLogMutation) 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 (*SmsLogMutation) OldPhoneNumber ¶
func (m *SmsLogMutation) OldPhoneNumber(ctx context.Context) (v string, err error)
OldPhoneNumber returns the old "phone_number" field's value of the SmsLog entity. If the SmsLog 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 (*SmsLogMutation) OldProvider ¶
func (m *SmsLogMutation) OldProvider(ctx context.Context) (v string, err error)
OldProvider returns the old "provider" field's value of the SmsLog entity. If the SmsLog 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 (*SmsLogMutation) OldSendStatus ¶
func (m *SmsLogMutation) OldSendStatus(ctx context.Context) (v uint8, err error)
OldSendStatus returns the old "send_status" field's value of the SmsLog entity. If the SmsLog 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 (*SmsLogMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the SmsLog entity. If the SmsLog 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 (*SmsLogMutation) PhoneNumber ¶
func (m *SmsLogMutation) PhoneNumber() (r string, exists bool)
PhoneNumber returns the value of the "phone_number" field in the mutation.
func (*SmsLogMutation) Provider ¶
func (m *SmsLogMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*SmsLogMutation) QueryContext ¶
func (c *SmsLogMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SmsLogMutation) RemovedEdges ¶
func (m *SmsLogMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SmsLogMutation) RemovedIDs ¶
func (m *SmsLogMutation) 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 (*SmsLogMutation) ResetContent ¶
func (m *SmsLogMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*SmsLogMutation) ResetCreatedAt ¶
func (m *SmsLogMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SmsLogMutation) ResetEdge ¶
func (m *SmsLogMutation) 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 (*SmsLogMutation) ResetField ¶
func (m *SmsLogMutation) 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 (*SmsLogMutation) ResetPhoneNumber ¶
func (m *SmsLogMutation) ResetPhoneNumber()
ResetPhoneNumber resets all changes to the "phone_number" field.
func (*SmsLogMutation) ResetProvider ¶
func (m *SmsLogMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*SmsLogMutation) ResetSendStatus ¶
func (m *SmsLogMutation) ResetSendStatus()
ResetSendStatus resets all changes to the "send_status" field.
func (*SmsLogMutation) ResetUpdatedAt ¶
func (m *SmsLogMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SmsLogMutation) SendStatus ¶
func (m *SmsLogMutation) SendStatus() (r uint8, exists bool)
SendStatus returns the value of the "send_status" field in the mutation.
func (*SmsLogMutation) SetContent ¶
func (m *SmsLogMutation) SetContent(s string)
SetContent sets the "content" field.
func (*SmsLogMutation) SetCreatedAt ¶
func (m *SmsLogMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SmsLogMutation) SetField ¶
func (m *SmsLogMutation) 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 (*SmsLogMutation) SetID ¶
func (m *SmsLogMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of SmsLog entities.
func (*SmsLogMutation) SetOp ¶
func (m *SmsLogMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SmsLogMutation) SetPhoneNumber ¶
func (m *SmsLogMutation) SetPhoneNumber(s string)
SetPhoneNumber sets the "phone_number" field.
func (*SmsLogMutation) SetProvider ¶
func (m *SmsLogMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*SmsLogMutation) SetSendStatus ¶
func (m *SmsLogMutation) SetSendStatus(u uint8)
SetSendStatus sets the "send_status" field.
func (*SmsLogMutation) SetUpdatedAt ¶
func (m *SmsLogMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (SmsLogMutation) Tx ¶
func (m SmsLogMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SmsLogMutation) Type ¶
func (m *SmsLogMutation) Type() string
Type returns the node type of this mutation (SmsLog).
func (*SmsLogMutation) UpdatedAt ¶
func (m *SmsLogMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SmsLogMutation) Where ¶
func (m *SmsLogMutation) Where(ps ...predicate.SmsLog)
Where appends a list predicates to the SmsLogMutation builder.
func (*SmsLogMutation) WhereP ¶
func (m *SmsLogMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SmsLogMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SmsLogPageList ¶
type SmsLogPageList struct { List []*SmsLog `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
SmsLogPageList is SmsLog PageList result.
type SmsLogPager ¶
type SmsLogPager struct { Order smslog.OrderOption Filter func(*SmsLogQuery) (*SmsLogQuery, error) }
func (*SmsLogPager) ApplyFilter ¶
func (p *SmsLogPager) ApplyFilter(query *SmsLogQuery) (*SmsLogQuery, error)
type SmsLogPaginateOption ¶
type SmsLogPaginateOption func(*SmsLogPager)
SmsLogPaginateOption enables pagination customization.
type SmsLogQuery ¶
type SmsLogQuery struct {
// contains filtered or unexported fields
}
SmsLogQuery is the builder for querying SmsLog entities.
func (*SmsLogQuery) Aggregate ¶
func (slq *SmsLogQuery) Aggregate(fns ...AggregateFunc) *SmsLogSelect
Aggregate returns a SmsLogSelect configured with the given aggregations.
func (*SmsLogQuery) All ¶
func (slq *SmsLogQuery) All(ctx context.Context) ([]*SmsLog, error)
All executes the query and returns a list of SmsLogs.
func (*SmsLogQuery) AllX ¶
func (slq *SmsLogQuery) AllX(ctx context.Context) []*SmsLog
AllX is like All, but panics if an error occurs.
func (*SmsLogQuery) Clone ¶
func (slq *SmsLogQuery) Clone() *SmsLogQuery
Clone returns a duplicate of the SmsLogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SmsLogQuery) Count ¶
func (slq *SmsLogQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SmsLogQuery) CountX ¶
func (slq *SmsLogQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SmsLogQuery) ExecContext ¶
func (c *SmsLogQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SmsLogQuery) Exist ¶
func (slq *SmsLogQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SmsLogQuery) ExistX ¶
func (slq *SmsLogQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SmsLogQuery) First ¶
func (slq *SmsLogQuery) First(ctx context.Context) (*SmsLog, error)
First returns the first SmsLog entity from the query. Returns a *NotFoundError when no SmsLog was found.
func (*SmsLogQuery) FirstID ¶
FirstID returns the first SmsLog ID from the query. Returns a *NotFoundError when no SmsLog ID was found.
func (*SmsLogQuery) FirstIDX ¶
func (slq *SmsLogQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*SmsLogQuery) FirstX ¶
func (slq *SmsLogQuery) FirstX(ctx context.Context) *SmsLog
FirstX is like First, but panics if an error occurs.
func (*SmsLogQuery) GroupBy ¶
func (slq *SmsLogQuery) GroupBy(field string, fields ...string) *SmsLogGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.SmsLog.Query(). GroupBy(smslog.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SmsLogQuery) IDsX ¶
func (slq *SmsLogQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SmsLogQuery) Limit ¶
func (slq *SmsLogQuery) Limit(limit int) *SmsLogQuery
Limit the number of records to be returned by this query.
func (*SmsLogQuery) Offset ¶
func (slq *SmsLogQuery) Offset(offset int) *SmsLogQuery
Offset to start from.
func (*SmsLogQuery) Only ¶
func (slq *SmsLogQuery) Only(ctx context.Context) (*SmsLog, error)
Only returns a single SmsLog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SmsLog entity is found. Returns a *NotFoundError when no SmsLog entities are found.
func (*SmsLogQuery) OnlyID ¶
OnlyID is like Only, but returns the only SmsLog ID in the query. Returns a *NotSingularError when more than one SmsLog ID is found. Returns a *NotFoundError when no entities are found.
func (*SmsLogQuery) OnlyIDX ¶
func (slq *SmsLogQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SmsLogQuery) OnlyX ¶
func (slq *SmsLogQuery) OnlyX(ctx context.Context) *SmsLog
OnlyX is like Only, but panics if an error occurs.
func (*SmsLogQuery) Order ¶
func (slq *SmsLogQuery) Order(o ...smslog.OrderOption) *SmsLogQuery
Order specifies how the records should be ordered.
func (*SmsLogQuery) Page ¶
func (sl *SmsLogQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...SmsLogPaginateOption, ) (*SmsLogPageList, error)
func (*SmsLogQuery) QueryContext ¶
func (c *SmsLogQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SmsLogQuery) Select ¶
func (slq *SmsLogQuery) Select(fields ...string) *SmsLogSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.SmsLog.Query(). Select(smslog.FieldCreatedAt). Scan(ctx, &v)
func (*SmsLogQuery) Unique ¶
func (slq *SmsLogQuery) Unique(unique bool) *SmsLogQuery
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 (*SmsLogQuery) Where ¶
func (slq *SmsLogQuery) Where(ps ...predicate.SmsLog) *SmsLogQuery
Where adds a new predicate for the SmsLogQuery builder.
type SmsLogSelect ¶
type SmsLogSelect struct { *SmsLogQuery // contains filtered or unexported fields }
SmsLogSelect is the builder for selecting fields of SmsLog entities.
func (*SmsLogSelect) Aggregate ¶
func (sls *SmsLogSelect) Aggregate(fns ...AggregateFunc) *SmsLogSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SmsLogSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SmsLogSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (SmsLogSelect) ExecContext ¶
func (c SmsLogSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SmsLogSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SmsLogSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SmsLogSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SmsLogSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (SmsLogSelect) QueryContext ¶
func (c SmsLogSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SmsLogSelect) Scan ¶
func (sls *SmsLogSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SmsLogSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SmsLogUpdate ¶
type SmsLogUpdate struct {
// contains filtered or unexported fields
}
SmsLogUpdate is the builder for updating SmsLog entities.
func (*SmsLogUpdate) AddSendStatus ¶
func (slu *SmsLogUpdate) AddSendStatus(u int8) *SmsLogUpdate
AddSendStatus adds u to the "send_status" field.
func (*SmsLogUpdate) Exec ¶
func (slu *SmsLogUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SmsLogUpdate) ExecContext ¶
func (c *SmsLogUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SmsLogUpdate) ExecX ¶
func (slu *SmsLogUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SmsLogUpdate) Mutation ¶
func (slu *SmsLogUpdate) Mutation() *SmsLogMutation
Mutation returns the SmsLogMutation object of the builder.
func (*SmsLogUpdate) QueryContext ¶
func (c *SmsLogUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SmsLogUpdate) Save ¶
func (slu *SmsLogUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SmsLogUpdate) SaveX ¶
func (slu *SmsLogUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SmsLogUpdate) SetContent ¶
func (slu *SmsLogUpdate) SetContent(s string) *SmsLogUpdate
SetContent sets the "content" field.
func (*SmsLogUpdate) SetNotNilContent ¶
func (sl *SmsLogUpdate) SetNotNilContent(value *string) *SmsLogUpdate
set field if value's pointer is not nil.
func (*SmsLogUpdate) SetNotNilPhoneNumber ¶
func (sl *SmsLogUpdate) SetNotNilPhoneNumber(value *string) *SmsLogUpdate
set field if value's pointer is not nil.
func (*SmsLogUpdate) SetNotNilProvider ¶
func (sl *SmsLogUpdate) SetNotNilProvider(value *string) *SmsLogUpdate
set field if value's pointer is not nil.
func (*SmsLogUpdate) SetNotNilSendStatus ¶
func (sl *SmsLogUpdate) SetNotNilSendStatus(value *uint8) *SmsLogUpdate
set field if value's pointer is not nil.
func (*SmsLogUpdate) SetNotNilUpdatedAt ¶
func (sl *SmsLogUpdate) SetNotNilUpdatedAt(value *time.Time) *SmsLogUpdate
set field if value's pointer is not nil.
func (*SmsLogUpdate) SetPhoneNumber ¶
func (slu *SmsLogUpdate) SetPhoneNumber(s string) *SmsLogUpdate
SetPhoneNumber sets the "phone_number" field.
func (*SmsLogUpdate) SetProvider ¶
func (slu *SmsLogUpdate) SetProvider(s string) *SmsLogUpdate
SetProvider sets the "provider" field.
func (*SmsLogUpdate) SetSendStatus ¶
func (slu *SmsLogUpdate) SetSendStatus(u uint8) *SmsLogUpdate
SetSendStatus sets the "send_status" field.
func (*SmsLogUpdate) SetUpdatedAt ¶
func (slu *SmsLogUpdate) SetUpdatedAt(t time.Time) *SmsLogUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SmsLogUpdate) Where ¶
func (slu *SmsLogUpdate) Where(ps ...predicate.SmsLog) *SmsLogUpdate
Where appends a list predicates to the SmsLogUpdate builder.
type SmsLogUpdateOne ¶
type SmsLogUpdateOne struct {
// contains filtered or unexported fields
}
SmsLogUpdateOne is the builder for updating a single SmsLog entity.
func (*SmsLogUpdateOne) AddSendStatus ¶
func (sluo *SmsLogUpdateOne) AddSendStatus(u int8) *SmsLogUpdateOne
AddSendStatus adds u to the "send_status" field.
func (*SmsLogUpdateOne) Exec ¶
func (sluo *SmsLogUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SmsLogUpdateOne) ExecContext ¶
func (c *SmsLogUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SmsLogUpdateOne) ExecX ¶
func (sluo *SmsLogUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SmsLogUpdateOne) Mutation ¶
func (sluo *SmsLogUpdateOne) Mutation() *SmsLogMutation
Mutation returns the SmsLogMutation object of the builder.
func (*SmsLogUpdateOne) QueryContext ¶
func (c *SmsLogUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SmsLogUpdateOne) Save ¶
func (sluo *SmsLogUpdateOne) Save(ctx context.Context) (*SmsLog, error)
Save executes the query and returns the updated SmsLog entity.
func (*SmsLogUpdateOne) SaveX ¶
func (sluo *SmsLogUpdateOne) SaveX(ctx context.Context) *SmsLog
SaveX is like Save, but panics if an error occurs.
func (*SmsLogUpdateOne) Select ¶
func (sluo *SmsLogUpdateOne) Select(field string, fields ...string) *SmsLogUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SmsLogUpdateOne) SetContent ¶
func (sluo *SmsLogUpdateOne) SetContent(s string) *SmsLogUpdateOne
SetContent sets the "content" field.
func (*SmsLogUpdateOne) SetNotNilContent ¶
func (sl *SmsLogUpdateOne) SetNotNilContent(value *string) *SmsLogUpdateOne
set field if value's pointer is not nil.
func (*SmsLogUpdateOne) SetNotNilPhoneNumber ¶
func (sl *SmsLogUpdateOne) SetNotNilPhoneNumber(value *string) *SmsLogUpdateOne
set field if value's pointer is not nil.
func (*SmsLogUpdateOne) SetNotNilProvider ¶
func (sl *SmsLogUpdateOne) SetNotNilProvider(value *string) *SmsLogUpdateOne
set field if value's pointer is not nil.
func (*SmsLogUpdateOne) SetNotNilSendStatus ¶
func (sl *SmsLogUpdateOne) SetNotNilSendStatus(value *uint8) *SmsLogUpdateOne
set field if value's pointer is not nil.
func (*SmsLogUpdateOne) SetNotNilUpdatedAt ¶
func (sl *SmsLogUpdateOne) SetNotNilUpdatedAt(value *time.Time) *SmsLogUpdateOne
set field if value's pointer is not nil.
func (*SmsLogUpdateOne) SetPhoneNumber ¶
func (sluo *SmsLogUpdateOne) SetPhoneNumber(s string) *SmsLogUpdateOne
SetPhoneNumber sets the "phone_number" field.
func (*SmsLogUpdateOne) SetProvider ¶
func (sluo *SmsLogUpdateOne) SetProvider(s string) *SmsLogUpdateOne
SetProvider sets the "provider" field.
func (*SmsLogUpdateOne) SetSendStatus ¶
func (sluo *SmsLogUpdateOne) SetSendStatus(u uint8) *SmsLogUpdateOne
SetSendStatus sets the "send_status" field.
func (*SmsLogUpdateOne) SetUpdatedAt ¶
func (sluo *SmsLogUpdateOne) SetUpdatedAt(t time.Time) *SmsLogUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SmsLogUpdateOne) Where ¶
func (sluo *SmsLogUpdateOne) Where(ps ...predicate.SmsLog) *SmsLogUpdateOne
Where appends a list predicates to the SmsLogUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // EmailLog is the client for interacting with the EmailLog builders. EmailLog *EmailLogClient // SmsLog is the client for interacting with the SmsLog builders. SmsLog *SmsLogClient // 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) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (*Tx) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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.