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 Account
- func (c *Account) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_m *Account) QueryContacts() *ContactQuery
- func (c *Account) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *Account) QueryNotifyRules() *NotifyRuleQuery
- func (_m *Account) QueryPendingOps() *PendingOpQuery
- func (_m *Account) QuerySecrets() *SecretQuery
- func (_m *Account) QueryThreads() *ThreadQuery
- func (_m *Account) String() string
- func (_m *Account) Unwrap() *Account
- func (_m *Account) Update() *AccountUpdateOne
- func (_m *Account) Value(name string) (ent.Value, error)
- type AccountClient
- func (c *AccountClient) Create() *AccountCreate
- func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk
- func (c *AccountClient) Delete() *AccountDelete
- func (c *AccountClient) DeleteOne(_m *Account) *AccountDeleteOne
- func (c *AccountClient) DeleteOneID(id uuid.UUID) *AccountDeleteOne
- func (c *AccountClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *AccountClient) Get(ctx context.Context, id uuid.UUID) (*Account, error)
- func (c *AccountClient) GetX(ctx context.Context, id uuid.UUID) *Account
- func (c *AccountClient) Hooks() []Hook
- func (c *AccountClient) Intercept(interceptors ...Interceptor)
- func (c *AccountClient) Interceptors() []Interceptor
- func (c *AccountClient) MapCreateBulk(slice any, setFunc func(*AccountCreate, int)) *AccountCreateBulk
- func (c *AccountClient) Query() *AccountQuery
- func (c *AccountClient) QueryContacts(_m *Account) *ContactQuery
- func (c *AccountClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *AccountClient) QueryNotifyRules(_m *Account) *NotifyRuleQuery
- func (c *AccountClient) QueryPendingOps(_m *Account) *PendingOpQuery
- func (c *AccountClient) QuerySecrets(_m *Account) *SecretQuery
- func (c *AccountClient) QueryThreads(_m *Account) *ThreadQuery
- func (c *AccountClient) Update() *AccountUpdate
- func (c *AccountClient) UpdateOne(_m *Account) *AccountUpdateOne
- func (c *AccountClient) UpdateOneID(id uuid.UUID) *AccountUpdateOne
- func (c *AccountClient) Use(hooks ...Hook)
- type AccountCreate
- func (_c *AccountCreate) AddContactIDs(ids ...int) *AccountCreate
- func (_c *AccountCreate) AddContacts(v ...*Contact) *AccountCreate
- func (_c *AccountCreate) AddNotifyRuleIDs(ids ...int) *AccountCreate
- func (_c *AccountCreate) AddNotifyRules(v ...*NotifyRule) *AccountCreate
- func (_c *AccountCreate) AddPendingOpIDs(ids ...int) *AccountCreate
- func (_c *AccountCreate) AddPendingOps(v ...*PendingOp) *AccountCreate
- func (_c *AccountCreate) AddSecretIDs(ids ...uuid.UUID) *AccountCreate
- func (_c *AccountCreate) AddSecrets(v ...*Secret) *AccountCreate
- func (_c *AccountCreate) AddThreadIDs(ids ...int) *AccountCreate
- func (_c *AccountCreate) AddThreads(v ...*Thread) *AccountCreate
- func (_c *AccountCreate) Exec(ctx context.Context) error
- func (c *AccountCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *AccountCreate) ExecX(ctx context.Context)
- func (_c *AccountCreate) Mutation() *AccountMutation
- func (_c *AccountCreate) OnConflict(opts ...sql.ConflictOption) *AccountUpsertOne
- func (_c *AccountCreate) OnConflictColumns(columns ...string) *AccountUpsertOne
- func (c *AccountCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *AccountCreate) Save(ctx context.Context) (*Account, error)
- func (_c *AccountCreate) SaveX(ctx context.Context) *Account
- func (_c *AccountCreate) SetAuthError(v string) *AccountCreate
- func (_c *AccountCreate) SetConfig(v map[string]interface{}) *AccountCreate
- func (_c *AccountCreate) SetCreatedAt(v time.Time) *AccountCreate
- func (_c *AccountCreate) SetDisplayName(v string) *AccountCreate
- func (_c *AccountCreate) SetEmail(v string) *AccountCreate
- func (_c *AccountCreate) SetID(v uuid.UUID) *AccountCreate
- func (_c *AccountCreate) SetLastError(v string) *AccountCreate
- func (_c *AccountCreate) SetLastSyncAt(v time.Time) *AccountCreate
- func (_c *AccountCreate) SetNeedsReauth(v bool) *AccountCreate
- func (_c *AccountCreate) SetNillableAuthError(v *string) *AccountCreate
- func (_c *AccountCreate) SetNillableCreatedAt(v *time.Time) *AccountCreate
- func (_c *AccountCreate) SetNillableDisplayName(v *string) *AccountCreate
- func (_c *AccountCreate) SetNillableID(v *uuid.UUID) *AccountCreate
- func (_c *AccountCreate) SetNillableLastError(v *string) *AccountCreate
- func (_c *AccountCreate) SetNillableLastSyncAt(v *time.Time) *AccountCreate
- func (_c *AccountCreate) SetNillableNeedsReauth(v *bool) *AccountCreate
- func (_c *AccountCreate) SetNillableStatus(v *account.Status) *AccountCreate
- func (_c *AccountCreate) SetNillableSyncCursor(v *string) *AccountCreate
- func (_c *AccountCreate) SetNillableSyncNotice(v *string) *AccountCreate
- func (_c *AccountCreate) SetStatus(v account.Status) *AccountCreate
- func (_c *AccountCreate) SetSyncCursor(v string) *AccountCreate
- func (_c *AccountCreate) SetSyncNotice(v string) *AccountCreate
- func (_c *AccountCreate) SetType(v account.Type) *AccountCreate
- type AccountCreateBulk
- func (_c *AccountCreateBulk) Exec(ctx context.Context) error
- func (c *AccountCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *AccountCreateBulk) ExecX(ctx context.Context)
- func (_c *AccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *AccountUpsertBulk
- func (_c *AccountCreateBulk) OnConflictColumns(columns ...string) *AccountUpsertBulk
- func (c *AccountCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *AccountCreateBulk) Save(ctx context.Context) ([]*Account, error)
- func (_c *AccountCreateBulk) SaveX(ctx context.Context) []*Account
- type AccountDelete
- func (_d *AccountDelete) Exec(ctx context.Context) (int, error)
- func (c *AccountDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *AccountDelete) ExecX(ctx context.Context) int
- func (c *AccountDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *AccountDelete) Where(ps ...predicate.Account) *AccountDelete
- type AccountDeleteOne
- type AccountEdges
- type AccountGroupBy
- func (_g *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy
- func (s *AccountGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountGroupBy) BoolX(ctx context.Context) bool
- func (s *AccountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AccountGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountGroupBy) Float64X(ctx context.Context) float64
- func (s *AccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AccountGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AccountGroupBy) IntX(ctx context.Context) int
- func (s *AccountGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AccountGroupBy) IntsX(ctx context.Context) []int
- func (_g *AccountGroupBy) Scan(ctx context.Context, v any) error
- func (s *AccountGroupBy) ScanX(ctx context.Context, v any)
- func (s *AccountGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AccountGroupBy) StringX(ctx context.Context) string
- func (s *AccountGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AccountGroupBy) StringsX(ctx context.Context) []string
- type AccountMutation
- func (m *AccountMutation) AddContactIDs(ids ...int)
- func (m *AccountMutation) AddField(name string, value ent.Value) error
- func (m *AccountMutation) AddNotifyRuleIDs(ids ...int)
- func (m *AccountMutation) AddPendingOpIDs(ids ...int)
- func (m *AccountMutation) AddSecretIDs(ids ...uuid.UUID)
- func (m *AccountMutation) AddThreadIDs(ids ...int)
- func (m *AccountMutation) AddedEdges() []string
- func (m *AccountMutation) AddedField(name string) (ent.Value, bool)
- func (m *AccountMutation) AddedFields() []string
- func (m *AccountMutation) AddedIDs(name string) []ent.Value
- func (m *AccountMutation) AuthError() (r string, exists bool)
- func (m *AccountMutation) AuthErrorCleared() bool
- func (m *AccountMutation) ClearAuthError()
- func (m *AccountMutation) ClearContacts()
- func (m *AccountMutation) ClearEdge(name string) error
- func (m *AccountMutation) ClearField(name string) error
- func (m *AccountMutation) ClearLastSyncAt()
- func (m *AccountMutation) ClearNotifyRules()
- func (m *AccountMutation) ClearPendingOps()
- func (m *AccountMutation) ClearSecrets()
- func (m *AccountMutation) ClearSyncNotice()
- func (m *AccountMutation) ClearThreads()
- func (m *AccountMutation) ClearedEdges() []string
- func (m *AccountMutation) ClearedFields() []string
- func (m AccountMutation) Client() *Client
- func (m *AccountMutation) Config() (r map[string]interface{}, exists bool)
- func (m *AccountMutation) ContactsCleared() bool
- func (m *AccountMutation) ContactsIDs() (ids []int)
- func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AccountMutation) DisplayName() (r string, exists bool)
- func (m *AccountMutation) EdgeCleared(name string) bool
- func (m *AccountMutation) Email() (r string, exists bool)
- func (c *AccountMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *AccountMutation) Field(name string) (ent.Value, bool)
- func (m *AccountMutation) FieldCleared(name string) bool
- func (m *AccountMutation) Fields() []string
- func (m *AccountMutation) GetType() (r account.Type, exists bool)
- func (m *AccountMutation) ID() (id uuid.UUID, exists bool)
- func (m *AccountMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AccountMutation) LastError() (r string, exists bool)
- func (m *AccountMutation) LastSyncAt() (r time.Time, exists bool)
- func (m *AccountMutation) LastSyncAtCleared() bool
- func (m *AccountMutation) NeedsReauth() (r bool, exists bool)
- func (m *AccountMutation) NotifyRulesCleared() bool
- func (m *AccountMutation) NotifyRulesIDs() (ids []int)
- func (m *AccountMutation) OldAuthError(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldConfig(ctx context.Context) (v map[string]interface{}, err error)
- func (m *AccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccountMutation) OldDisplayName(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AccountMutation) OldLastError(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldLastSyncAt(ctx context.Context) (v *time.Time, err error)
- func (m *AccountMutation) OldNeedsReauth(ctx context.Context) (v bool, err error)
- func (m *AccountMutation) OldStatus(ctx context.Context) (v account.Status, err error)
- func (m *AccountMutation) OldSyncCursor(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldSyncNotice(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldType(ctx context.Context) (v account.Type, err error)
- func (m *AccountMutation) Op() Op
- func (m *AccountMutation) PendingOpsCleared() bool
- func (m *AccountMutation) PendingOpsIDs() (ids []int)
- func (c *AccountMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *AccountMutation) RemoveContactIDs(ids ...int)
- func (m *AccountMutation) RemoveNotifyRuleIDs(ids ...int)
- func (m *AccountMutation) RemovePendingOpIDs(ids ...int)
- func (m *AccountMutation) RemoveSecretIDs(ids ...uuid.UUID)
- func (m *AccountMutation) RemoveThreadIDs(ids ...int)
- func (m *AccountMutation) RemovedContactsIDs() (ids []int)
- func (m *AccountMutation) RemovedEdges() []string
- func (m *AccountMutation) RemovedIDs(name string) []ent.Value
- func (m *AccountMutation) RemovedNotifyRulesIDs() (ids []int)
- func (m *AccountMutation) RemovedPendingOpsIDs() (ids []int)
- func (m *AccountMutation) RemovedSecretsIDs() (ids []uuid.UUID)
- func (m *AccountMutation) RemovedThreadsIDs() (ids []int)
- func (m *AccountMutation) ResetAuthError()
- func (m *AccountMutation) ResetConfig()
- func (m *AccountMutation) ResetContacts()
- func (m *AccountMutation) ResetCreatedAt()
- func (m *AccountMutation) ResetDisplayName()
- func (m *AccountMutation) ResetEdge(name string) error
- func (m *AccountMutation) ResetEmail()
- func (m *AccountMutation) ResetField(name string) error
- func (m *AccountMutation) ResetLastError()
- func (m *AccountMutation) ResetLastSyncAt()
- func (m *AccountMutation) ResetNeedsReauth()
- func (m *AccountMutation) ResetNotifyRules()
- func (m *AccountMutation) ResetPendingOps()
- func (m *AccountMutation) ResetSecrets()
- func (m *AccountMutation) ResetStatus()
- func (m *AccountMutation) ResetSyncCursor()
- func (m *AccountMutation) ResetSyncNotice()
- func (m *AccountMutation) ResetThreads()
- func (m *AccountMutation) ResetType()
- func (m *AccountMutation) SecretsCleared() bool
- func (m *AccountMutation) SecretsIDs() (ids []uuid.UUID)
- func (m *AccountMutation) SetAuthError(s string)
- func (m *AccountMutation) SetConfig(value map[string]interface{})
- func (m *AccountMutation) SetCreatedAt(t time.Time)
- func (m *AccountMutation) SetDisplayName(s string)
- func (m *AccountMutation) SetEmail(s string)
- func (m *AccountMutation) SetField(name string, value ent.Value) error
- func (m *AccountMutation) SetID(id uuid.UUID)
- func (m *AccountMutation) SetLastError(s string)
- func (m *AccountMutation) SetLastSyncAt(t time.Time)
- func (m *AccountMutation) SetNeedsReauth(b bool)
- func (m *AccountMutation) SetOp(op Op)
- func (m *AccountMutation) SetStatus(a account.Status)
- func (m *AccountMutation) SetSyncCursor(s string)
- func (m *AccountMutation) SetSyncNotice(s string)
- func (m *AccountMutation) SetType(a account.Type)
- func (m *AccountMutation) Status() (r account.Status, exists bool)
- func (m *AccountMutation) SyncCursor() (r string, exists bool)
- func (m *AccountMutation) SyncNotice() (r string, exists bool)
- func (m *AccountMutation) SyncNoticeCleared() bool
- func (m *AccountMutation) ThreadsCleared() bool
- func (m *AccountMutation) ThreadsIDs() (ids []int)
- func (m AccountMutation) Tx() (*Tx, error)
- func (m *AccountMutation) Type() string
- func (m *AccountMutation) Where(ps ...predicate.Account)
- func (m *AccountMutation) WhereP(ps ...func(*sql.Selector))
- type AccountQuery
- func (_q *AccountQuery) Aggregate(fns ...AggregateFunc) *AccountSelect
- func (_q *AccountQuery) All(ctx context.Context) ([]*Account, error)
- func (_q *AccountQuery) AllX(ctx context.Context) []*Account
- func (_q *AccountQuery) Clone() *AccountQuery
- func (_q *AccountQuery) Count(ctx context.Context) (int, error)
- func (_q *AccountQuery) CountX(ctx context.Context) int
- func (c *AccountQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *AccountQuery) Exist(ctx context.Context) (bool, error)
- func (_q *AccountQuery) ExistX(ctx context.Context) bool
- func (_q *AccountQuery) First(ctx context.Context) (*Account, error)
- func (_q *AccountQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *AccountQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *AccountQuery) FirstX(ctx context.Context) *Account
- func (_q *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy
- func (_q *AccountQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *AccountQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *AccountQuery) Limit(limit int) *AccountQuery
- func (_q *AccountQuery) Modify(modifiers ...func(s *sql.Selector)) *AccountSelect
- func (_q *AccountQuery) Offset(offset int) *AccountQuery
- func (_q *AccountQuery) Only(ctx context.Context) (*Account, error)
- func (_q *AccountQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *AccountQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *AccountQuery) OnlyX(ctx context.Context) *Account
- func (_q *AccountQuery) Order(o ...account.OrderOption) *AccountQuery
- func (_q *AccountQuery) QueryContacts() *ContactQuery
- func (c *AccountQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *AccountQuery) QueryNotifyRules() *NotifyRuleQuery
- func (_q *AccountQuery) QueryPendingOps() *PendingOpQuery
- func (_q *AccountQuery) QuerySecrets() *SecretQuery
- func (_q *AccountQuery) QueryThreads() *ThreadQuery
- func (_q *AccountQuery) Select(fields ...string) *AccountSelect
- func (_q *AccountQuery) Unique(unique bool) *AccountQuery
- func (_q *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
- func (_q *AccountQuery) WithContacts(opts ...func(*ContactQuery)) *AccountQuery
- func (_q *AccountQuery) WithNotifyRules(opts ...func(*NotifyRuleQuery)) *AccountQuery
- func (_q *AccountQuery) WithPendingOps(opts ...func(*PendingOpQuery)) *AccountQuery
- func (_q *AccountQuery) WithSecrets(opts ...func(*SecretQuery)) *AccountQuery
- func (_q *AccountQuery) WithThreads(opts ...func(*ThreadQuery)) *AccountQuery
- type AccountSelect
- func (_s *AccountSelect) Aggregate(fns ...AggregateFunc) *AccountSelect
- func (s *AccountSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountSelect) BoolX(ctx context.Context) bool
- func (s *AccountSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountSelect) BoolsX(ctx context.Context) []bool
- func (c AccountSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *AccountSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountSelect) Float64X(ctx context.Context) float64
- func (s *AccountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountSelect) Float64sX(ctx context.Context) []float64
- func (s *AccountSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AccountSelect) IntX(ctx context.Context) int
- func (s *AccountSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AccountSelect) IntsX(ctx context.Context) []int
- func (_s *AccountSelect) Modify(modifiers ...func(s *sql.Selector)) *AccountSelect
- func (c AccountSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *AccountSelect) Scan(ctx context.Context, v any) error
- func (s *AccountSelect) ScanX(ctx context.Context, v any)
- func (s *AccountSelect) String(ctx context.Context) (_ string, err error)
- func (s *AccountSelect) StringX(ctx context.Context) string
- func (s *AccountSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AccountSelect) StringsX(ctx context.Context) []string
- type AccountUpdate
- func (_u *AccountUpdate) AddContactIDs(ids ...int) *AccountUpdate
- func (_u *AccountUpdate) AddContacts(v ...*Contact) *AccountUpdate
- func (_u *AccountUpdate) AddNotifyRuleIDs(ids ...int) *AccountUpdate
- func (_u *AccountUpdate) AddNotifyRules(v ...*NotifyRule) *AccountUpdate
- func (_u *AccountUpdate) AddPendingOpIDs(ids ...int) *AccountUpdate
- func (_u *AccountUpdate) AddPendingOps(v ...*PendingOp) *AccountUpdate
- func (_u *AccountUpdate) AddSecretIDs(ids ...uuid.UUID) *AccountUpdate
- func (_u *AccountUpdate) AddSecrets(v ...*Secret) *AccountUpdate
- func (_u *AccountUpdate) AddThreadIDs(ids ...int) *AccountUpdate
- func (_u *AccountUpdate) AddThreads(v ...*Thread) *AccountUpdate
- func (_u *AccountUpdate) ClearAuthError() *AccountUpdate
- func (_u *AccountUpdate) ClearContacts() *AccountUpdate
- func (_u *AccountUpdate) ClearLastSyncAt() *AccountUpdate
- func (_u *AccountUpdate) ClearNotifyRules() *AccountUpdate
- func (_u *AccountUpdate) ClearPendingOps() *AccountUpdate
- func (_u *AccountUpdate) ClearSecrets() *AccountUpdate
- func (_u *AccountUpdate) ClearSyncNotice() *AccountUpdate
- func (_u *AccountUpdate) ClearThreads() *AccountUpdate
- func (_u *AccountUpdate) Exec(ctx context.Context) error
- func (c *AccountUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *AccountUpdate) ExecX(ctx context.Context)
- func (_u *AccountUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUpdate
- func (_u *AccountUpdate) Mutation() *AccountMutation
- func (c *AccountUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *AccountUpdate) RemoveContactIDs(ids ...int) *AccountUpdate
- func (_u *AccountUpdate) RemoveContacts(v ...*Contact) *AccountUpdate
- func (_u *AccountUpdate) RemoveNotifyRuleIDs(ids ...int) *AccountUpdate
- func (_u *AccountUpdate) RemoveNotifyRules(v ...*NotifyRule) *AccountUpdate
- func (_u *AccountUpdate) RemovePendingOpIDs(ids ...int) *AccountUpdate
- func (_u *AccountUpdate) RemovePendingOps(v ...*PendingOp) *AccountUpdate
- func (_u *AccountUpdate) RemoveSecretIDs(ids ...uuid.UUID) *AccountUpdate
- func (_u *AccountUpdate) RemoveSecrets(v ...*Secret) *AccountUpdate
- func (_u *AccountUpdate) RemoveThreadIDs(ids ...int) *AccountUpdate
- func (_u *AccountUpdate) RemoveThreads(v ...*Thread) *AccountUpdate
- func (_u *AccountUpdate) Save(ctx context.Context) (int, error)
- func (_u *AccountUpdate) SaveX(ctx context.Context) int
- func (_u *AccountUpdate) SetAuthError(v string) *AccountUpdate
- func (_u *AccountUpdate) SetConfig(v map[string]interface{}) *AccountUpdate
- func (_u *AccountUpdate) SetDisplayName(v string) *AccountUpdate
- func (_u *AccountUpdate) SetEmail(v string) *AccountUpdate
- func (_u *AccountUpdate) SetLastError(v string) *AccountUpdate
- func (_u *AccountUpdate) SetLastSyncAt(v time.Time) *AccountUpdate
- func (_u *AccountUpdate) SetNeedsReauth(v bool) *AccountUpdate
- func (_u *AccountUpdate) SetNillableAuthError(v *string) *AccountUpdate
- func (_u *AccountUpdate) SetNillableDisplayName(v *string) *AccountUpdate
- func (_u *AccountUpdate) SetNillableEmail(v *string) *AccountUpdate
- func (_u *AccountUpdate) SetNillableLastError(v *string) *AccountUpdate
- func (_u *AccountUpdate) SetNillableLastSyncAt(v *time.Time) *AccountUpdate
- func (_u *AccountUpdate) SetNillableNeedsReauth(v *bool) *AccountUpdate
- func (_u *AccountUpdate) SetNillableStatus(v *account.Status) *AccountUpdate
- func (_u *AccountUpdate) SetNillableSyncCursor(v *string) *AccountUpdate
- func (_u *AccountUpdate) SetNillableSyncNotice(v *string) *AccountUpdate
- func (_u *AccountUpdate) SetNillableType(v *account.Type) *AccountUpdate
- func (_u *AccountUpdate) SetStatus(v account.Status) *AccountUpdate
- func (_u *AccountUpdate) SetSyncCursor(v string) *AccountUpdate
- func (_u *AccountUpdate) SetSyncNotice(v string) *AccountUpdate
- func (_u *AccountUpdate) SetType(v account.Type) *AccountUpdate
- func (_u *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
- type AccountUpdateOne
- func (_u *AccountUpdateOne) AddContactIDs(ids ...int) *AccountUpdateOne
- func (_u *AccountUpdateOne) AddContacts(v ...*Contact) *AccountUpdateOne
- func (_u *AccountUpdateOne) AddNotifyRuleIDs(ids ...int) *AccountUpdateOne
- func (_u *AccountUpdateOne) AddNotifyRules(v ...*NotifyRule) *AccountUpdateOne
- func (_u *AccountUpdateOne) AddPendingOpIDs(ids ...int) *AccountUpdateOne
- func (_u *AccountUpdateOne) AddPendingOps(v ...*PendingOp) *AccountUpdateOne
- func (_u *AccountUpdateOne) AddSecretIDs(ids ...uuid.UUID) *AccountUpdateOne
- func (_u *AccountUpdateOne) AddSecrets(v ...*Secret) *AccountUpdateOne
- func (_u *AccountUpdateOne) AddThreadIDs(ids ...int) *AccountUpdateOne
- func (_u *AccountUpdateOne) AddThreads(v ...*Thread) *AccountUpdateOne
- func (_u *AccountUpdateOne) ClearAuthError() *AccountUpdateOne
- func (_u *AccountUpdateOne) ClearContacts() *AccountUpdateOne
- func (_u *AccountUpdateOne) ClearLastSyncAt() *AccountUpdateOne
- func (_u *AccountUpdateOne) ClearNotifyRules() *AccountUpdateOne
- func (_u *AccountUpdateOne) ClearPendingOps() *AccountUpdateOne
- func (_u *AccountUpdateOne) ClearSecrets() *AccountUpdateOne
- func (_u *AccountUpdateOne) ClearSyncNotice() *AccountUpdateOne
- func (_u *AccountUpdateOne) ClearThreads() *AccountUpdateOne
- func (_u *AccountUpdateOne) Exec(ctx context.Context) error
- func (c *AccountUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *AccountUpdateOne) ExecX(ctx context.Context)
- func (_u *AccountUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUpdateOne
- func (_u *AccountUpdateOne) Mutation() *AccountMutation
- func (c *AccountUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *AccountUpdateOne) RemoveContactIDs(ids ...int) *AccountUpdateOne
- func (_u *AccountUpdateOne) RemoveContacts(v ...*Contact) *AccountUpdateOne
- func (_u *AccountUpdateOne) RemoveNotifyRuleIDs(ids ...int) *AccountUpdateOne
- func (_u *AccountUpdateOne) RemoveNotifyRules(v ...*NotifyRule) *AccountUpdateOne
- func (_u *AccountUpdateOne) RemovePendingOpIDs(ids ...int) *AccountUpdateOne
- func (_u *AccountUpdateOne) RemovePendingOps(v ...*PendingOp) *AccountUpdateOne
- func (_u *AccountUpdateOne) RemoveSecretIDs(ids ...uuid.UUID) *AccountUpdateOne
- func (_u *AccountUpdateOne) RemoveSecrets(v ...*Secret) *AccountUpdateOne
- func (_u *AccountUpdateOne) RemoveThreadIDs(ids ...int) *AccountUpdateOne
- func (_u *AccountUpdateOne) RemoveThreads(v ...*Thread) *AccountUpdateOne
- func (_u *AccountUpdateOne) Save(ctx context.Context) (*Account, error)
- func (_u *AccountUpdateOne) SaveX(ctx context.Context) *Account
- func (_u *AccountUpdateOne) Select(field string, fields ...string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetAuthError(v string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetConfig(v map[string]interface{}) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetDisplayName(v string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetEmail(v string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetLastError(v string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetLastSyncAt(v time.Time) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetNeedsReauth(v bool) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetNillableAuthError(v *string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetNillableDisplayName(v *string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetNillableEmail(v *string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetNillableLastError(v *string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetNillableLastSyncAt(v *time.Time) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetNillableNeedsReauth(v *bool) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetNillableStatus(v *account.Status) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetNillableSyncCursor(v *string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetNillableSyncNotice(v *string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetNillableType(v *account.Type) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetStatus(v account.Status) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetSyncCursor(v string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetSyncNotice(v string) *AccountUpdateOne
- func (_u *AccountUpdateOne) SetType(v account.Type) *AccountUpdateOne
- func (_u *AccountUpdateOne) Where(ps ...predicate.Account) *AccountUpdateOne
- type AccountUpsert
- func (u *AccountUpsert) ClearAuthError() *AccountUpsert
- func (u *AccountUpsert) ClearLastSyncAt() *AccountUpsert
- func (u *AccountUpsert) ClearSyncNotice() *AccountUpsert
- func (u *AccountUpsert) SetAuthError(v string) *AccountUpsert
- func (u *AccountUpsert) SetConfig(v map[string]interface{}) *AccountUpsert
- func (u *AccountUpsert) SetDisplayName(v string) *AccountUpsert
- func (u *AccountUpsert) SetEmail(v string) *AccountUpsert
- func (u *AccountUpsert) SetLastError(v string) *AccountUpsert
- func (u *AccountUpsert) SetLastSyncAt(v time.Time) *AccountUpsert
- func (u *AccountUpsert) SetNeedsReauth(v bool) *AccountUpsert
- func (u *AccountUpsert) SetStatus(v account.Status) *AccountUpsert
- func (u *AccountUpsert) SetSyncCursor(v string) *AccountUpsert
- func (u *AccountUpsert) SetSyncNotice(v string) *AccountUpsert
- func (u *AccountUpsert) SetType(v account.Type) *AccountUpsert
- func (u *AccountUpsert) UpdateAuthError() *AccountUpsert
- func (u *AccountUpsert) UpdateConfig() *AccountUpsert
- func (u *AccountUpsert) UpdateDisplayName() *AccountUpsert
- func (u *AccountUpsert) UpdateEmail() *AccountUpsert
- func (u *AccountUpsert) UpdateLastError() *AccountUpsert
- func (u *AccountUpsert) UpdateLastSyncAt() *AccountUpsert
- func (u *AccountUpsert) UpdateNeedsReauth() *AccountUpsert
- func (u *AccountUpsert) UpdateStatus() *AccountUpsert
- func (u *AccountUpsert) UpdateSyncCursor() *AccountUpsert
- func (u *AccountUpsert) UpdateSyncNotice() *AccountUpsert
- func (u *AccountUpsert) UpdateType() *AccountUpsert
- type AccountUpsertBulk
- func (u *AccountUpsertBulk) ClearAuthError() *AccountUpsertBulk
- func (u *AccountUpsertBulk) ClearLastSyncAt() *AccountUpsertBulk
- func (u *AccountUpsertBulk) ClearSyncNotice() *AccountUpsertBulk
- func (u *AccountUpsertBulk) DoNothing() *AccountUpsertBulk
- func (u *AccountUpsertBulk) Exec(ctx context.Context) error
- func (u *AccountUpsertBulk) ExecX(ctx context.Context)
- func (u *AccountUpsertBulk) Ignore() *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetAuthError(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetConfig(v map[string]interface{}) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetDisplayName(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetEmail(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetLastError(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetLastSyncAt(v time.Time) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetNeedsReauth(v bool) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetStatus(v account.Status) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetSyncCursor(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetSyncNotice(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetType(v account.Type) *AccountUpsertBulk
- func (u *AccountUpsertBulk) Update(set func(*AccountUpsert)) *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateAuthError() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateConfig() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateDisplayName() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateEmail() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateLastError() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateLastSyncAt() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateNeedsReauth() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateNewValues() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateStatus() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateSyncCursor() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateSyncNotice() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateType() *AccountUpsertBulk
- type AccountUpsertOne
- func (u *AccountUpsertOne) ClearAuthError() *AccountUpsertOne
- func (u *AccountUpsertOne) ClearLastSyncAt() *AccountUpsertOne
- func (u *AccountUpsertOne) ClearSyncNotice() *AccountUpsertOne
- func (u *AccountUpsertOne) DoNothing() *AccountUpsertOne
- func (u *AccountUpsertOne) Exec(ctx context.Context) error
- func (u *AccountUpsertOne) ExecX(ctx context.Context)
- func (u *AccountUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *AccountUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *AccountUpsertOne) Ignore() *AccountUpsertOne
- func (u *AccountUpsertOne) SetAuthError(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetConfig(v map[string]interface{}) *AccountUpsertOne
- func (u *AccountUpsertOne) SetDisplayName(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetEmail(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetLastError(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetLastSyncAt(v time.Time) *AccountUpsertOne
- func (u *AccountUpsertOne) SetNeedsReauth(v bool) *AccountUpsertOne
- func (u *AccountUpsertOne) SetStatus(v account.Status) *AccountUpsertOne
- func (u *AccountUpsertOne) SetSyncCursor(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetSyncNotice(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetType(v account.Type) *AccountUpsertOne
- func (u *AccountUpsertOne) Update(set func(*AccountUpsert)) *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateAuthError() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateConfig() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateDisplayName() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateEmail() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateLastError() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateLastSyncAt() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateNeedsReauth() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateNewValues() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateStatus() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateSyncCursor() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateSyncNotice() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateType() *AccountUpsertOne
- type Accounts
- 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 Contact
- func (c *Contact) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_m *Contact) QueryAccount() *AccountQuery
- func (c *Contact) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *Contact) String() string
- func (_m *Contact) Unwrap() *Contact
- func (_m *Contact) Update() *ContactUpdateOne
- func (_m *Contact) Value(name string) (ent.Value, error)
- type ContactClient
- func (c *ContactClient) Create() *ContactCreate
- func (c *ContactClient) CreateBulk(builders ...*ContactCreate) *ContactCreateBulk
- func (c *ContactClient) Delete() *ContactDelete
- func (c *ContactClient) DeleteOne(_m *Contact) *ContactDeleteOne
- func (c *ContactClient) DeleteOneID(id int) *ContactDeleteOne
- func (c *ContactClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *ContactClient) Get(ctx context.Context, id int) (*Contact, error)
- func (c *ContactClient) GetX(ctx context.Context, id int) *Contact
- func (c *ContactClient) Hooks() []Hook
- func (c *ContactClient) Intercept(interceptors ...Interceptor)
- func (c *ContactClient) Interceptors() []Interceptor
- func (c *ContactClient) MapCreateBulk(slice any, setFunc func(*ContactCreate, int)) *ContactCreateBulk
- func (c *ContactClient) Query() *ContactQuery
- func (c *ContactClient) QueryAccount(_m *Contact) *AccountQuery
- func (c *ContactClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *ContactClient) Update() *ContactUpdate
- func (c *ContactClient) UpdateOne(_m *Contact) *ContactUpdateOne
- func (c *ContactClient) UpdateOneID(id int) *ContactUpdateOne
- func (c *ContactClient) Use(hooks ...Hook)
- type ContactCreate
- func (_c *ContactCreate) Exec(ctx context.Context) error
- func (c *ContactCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *ContactCreate) ExecX(ctx context.Context)
- func (_c *ContactCreate) Mutation() *ContactMutation
- func (_c *ContactCreate) OnConflict(opts ...sql.ConflictOption) *ContactUpsertOne
- func (_c *ContactCreate) OnConflictColumns(columns ...string) *ContactUpsertOne
- func (c *ContactCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *ContactCreate) Save(ctx context.Context) (*Contact, error)
- func (_c *ContactCreate) SaveX(ctx context.Context) *Contact
- func (_c *ContactCreate) SetAccount(v *Account) *ContactCreate
- func (_c *ContactCreate) SetAccountID(id uuid.UUID) *ContactCreate
- func (_c *ContactCreate) SetEmail(v string) *ContactCreate
- func (_c *ContactCreate) SetLastSeen(v time.Time) *ContactCreate
- func (_c *ContactCreate) SetName(v string) *ContactCreate
- func (_c *ContactCreate) SetNillableLastSeen(v *time.Time) *ContactCreate
- func (_c *ContactCreate) SetNillableName(v *string) *ContactCreate
- func (_c *ContactCreate) SetNillableWeight(v *int) *ContactCreate
- func (_c *ContactCreate) SetSource(v contact.Source) *ContactCreate
- func (_c *ContactCreate) SetWeight(v int) *ContactCreate
- type ContactCreateBulk
- func (_c *ContactCreateBulk) Exec(ctx context.Context) error
- func (c *ContactCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *ContactCreateBulk) ExecX(ctx context.Context)
- func (_c *ContactCreateBulk) OnConflict(opts ...sql.ConflictOption) *ContactUpsertBulk
- func (_c *ContactCreateBulk) OnConflictColumns(columns ...string) *ContactUpsertBulk
- func (c *ContactCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *ContactCreateBulk) Save(ctx context.Context) ([]*Contact, error)
- func (_c *ContactCreateBulk) SaveX(ctx context.Context) []*Contact
- type ContactDelete
- func (_d *ContactDelete) Exec(ctx context.Context) (int, error)
- func (c *ContactDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *ContactDelete) ExecX(ctx context.Context) int
- func (c *ContactDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *ContactDelete) Where(ps ...predicate.Contact) *ContactDelete
- type ContactDeleteOne
- type ContactEdges
- type ContactGroupBy
- func (_g *ContactGroupBy) Aggregate(fns ...AggregateFunc) *ContactGroupBy
- func (s *ContactGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContactGroupBy) BoolX(ctx context.Context) bool
- func (s *ContactGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ContactGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ContactGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContactGroupBy) Float64X(ctx context.Context) float64
- func (s *ContactGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContactGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ContactGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ContactGroupBy) IntX(ctx context.Context) int
- func (s *ContactGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ContactGroupBy) IntsX(ctx context.Context) []int
- func (_g *ContactGroupBy) Scan(ctx context.Context, v any) error
- func (s *ContactGroupBy) ScanX(ctx context.Context, v any)
- func (s *ContactGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ContactGroupBy) StringX(ctx context.Context) string
- func (s *ContactGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ContactGroupBy) StringsX(ctx context.Context) []string
- type ContactMutation
- func (m *ContactMutation) AccountCleared() bool
- func (m *ContactMutation) AccountID() (id uuid.UUID, exists bool)
- func (m *ContactMutation) AccountIDs() (ids []uuid.UUID)
- func (m *ContactMutation) AddField(name string, value ent.Value) error
- func (m *ContactMutation) AddWeight(i int)
- func (m *ContactMutation) AddedEdges() []string
- func (m *ContactMutation) AddedField(name string) (ent.Value, bool)
- func (m *ContactMutation) AddedFields() []string
- func (m *ContactMutation) AddedIDs(name string) []ent.Value
- func (m *ContactMutation) AddedWeight() (r int, exists bool)
- func (m *ContactMutation) ClearAccount()
- func (m *ContactMutation) ClearEdge(name string) error
- func (m *ContactMutation) ClearField(name string) error
- func (m *ContactMutation) ClearedEdges() []string
- func (m *ContactMutation) ClearedFields() []string
- func (m ContactMutation) Client() *Client
- func (m *ContactMutation) EdgeCleared(name string) bool
- func (m *ContactMutation) Email() (r string, exists bool)
- func (c *ContactMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *ContactMutation) Field(name string) (ent.Value, bool)
- func (m *ContactMutation) FieldCleared(name string) bool
- func (m *ContactMutation) Fields() []string
- func (m *ContactMutation) ID() (id int, exists bool)
- func (m *ContactMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ContactMutation) LastSeen() (r time.Time, exists bool)
- func (m *ContactMutation) Name() (r string, exists bool)
- func (m *ContactMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ContactMutation) OldLastSeen(ctx context.Context) (v time.Time, err error)
- func (m *ContactMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldSource(ctx context.Context) (v contact.Source, err error)
- func (m *ContactMutation) OldWeight(ctx context.Context) (v int, err error)
- func (m *ContactMutation) Op() Op
- func (c *ContactMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *ContactMutation) RemovedEdges() []string
- func (m *ContactMutation) RemovedIDs(name string) []ent.Value
- func (m *ContactMutation) ResetAccount()
- func (m *ContactMutation) ResetEdge(name string) error
- func (m *ContactMutation) ResetEmail()
- func (m *ContactMutation) ResetField(name string) error
- func (m *ContactMutation) ResetLastSeen()
- func (m *ContactMutation) ResetName()
- func (m *ContactMutation) ResetSource()
- func (m *ContactMutation) ResetWeight()
- func (m *ContactMutation) SetAccountID(id uuid.UUID)
- func (m *ContactMutation) SetEmail(s string)
- func (m *ContactMutation) SetField(name string, value ent.Value) error
- func (m *ContactMutation) SetLastSeen(t time.Time)
- func (m *ContactMutation) SetName(s string)
- func (m *ContactMutation) SetOp(op Op)
- func (m *ContactMutation) SetSource(c contact.Source)
- func (m *ContactMutation) SetWeight(i int)
- func (m *ContactMutation) Source() (r contact.Source, exists bool)
- func (m ContactMutation) Tx() (*Tx, error)
- func (m *ContactMutation) Type() string
- func (m *ContactMutation) Weight() (r int, exists bool)
- func (m *ContactMutation) Where(ps ...predicate.Contact)
- func (m *ContactMutation) WhereP(ps ...func(*sql.Selector))
- type ContactQuery
- func (_q *ContactQuery) Aggregate(fns ...AggregateFunc) *ContactSelect
- func (_q *ContactQuery) All(ctx context.Context) ([]*Contact, error)
- func (_q *ContactQuery) AllX(ctx context.Context) []*Contact
- func (_q *ContactQuery) Clone() *ContactQuery
- func (_q *ContactQuery) Count(ctx context.Context) (int, error)
- func (_q *ContactQuery) CountX(ctx context.Context) int
- func (c *ContactQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *ContactQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ContactQuery) ExistX(ctx context.Context) bool
- func (_q *ContactQuery) First(ctx context.Context) (*Contact, error)
- func (_q *ContactQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *ContactQuery) FirstIDX(ctx context.Context) int
- func (_q *ContactQuery) FirstX(ctx context.Context) *Contact
- func (_q *ContactQuery) GroupBy(field string, fields ...string) *ContactGroupBy
- func (_q *ContactQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *ContactQuery) IDsX(ctx context.Context) []int
- func (_q *ContactQuery) Limit(limit int) *ContactQuery
- func (_q *ContactQuery) Modify(modifiers ...func(s *sql.Selector)) *ContactSelect
- func (_q *ContactQuery) Offset(offset int) *ContactQuery
- func (_q *ContactQuery) Only(ctx context.Context) (*Contact, error)
- func (_q *ContactQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *ContactQuery) OnlyIDX(ctx context.Context) int
- func (_q *ContactQuery) OnlyX(ctx context.Context) *Contact
- func (_q *ContactQuery) Order(o ...contact.OrderOption) *ContactQuery
- func (_q *ContactQuery) QueryAccount() *AccountQuery
- func (c *ContactQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *ContactQuery) Select(fields ...string) *ContactSelect
- func (_q *ContactQuery) Unique(unique bool) *ContactQuery
- func (_q *ContactQuery) Where(ps ...predicate.Contact) *ContactQuery
- func (_q *ContactQuery) WithAccount(opts ...func(*AccountQuery)) *ContactQuery
- type ContactSelect
- func (_s *ContactSelect) Aggregate(fns ...AggregateFunc) *ContactSelect
- func (s *ContactSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContactSelect) BoolX(ctx context.Context) bool
- func (s *ContactSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ContactSelect) BoolsX(ctx context.Context) []bool
- func (c ContactSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *ContactSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContactSelect) Float64X(ctx context.Context) float64
- func (s *ContactSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContactSelect) Float64sX(ctx context.Context) []float64
- func (s *ContactSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ContactSelect) IntX(ctx context.Context) int
- func (s *ContactSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ContactSelect) IntsX(ctx context.Context) []int
- func (_s *ContactSelect) Modify(modifiers ...func(s *sql.Selector)) *ContactSelect
- func (c ContactSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *ContactSelect) Scan(ctx context.Context, v any) error
- func (s *ContactSelect) ScanX(ctx context.Context, v any)
- func (s *ContactSelect) String(ctx context.Context) (_ string, err error)
- func (s *ContactSelect) StringX(ctx context.Context) string
- func (s *ContactSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ContactSelect) StringsX(ctx context.Context) []string
- type ContactUpdate
- func (_u *ContactUpdate) AddWeight(v int) *ContactUpdate
- func (_u *ContactUpdate) ClearAccount() *ContactUpdate
- func (_u *ContactUpdate) Exec(ctx context.Context) error
- func (c *ContactUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *ContactUpdate) ExecX(ctx context.Context)
- func (_u *ContactUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ContactUpdate
- func (_u *ContactUpdate) Mutation() *ContactMutation
- func (c *ContactUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *ContactUpdate) Save(ctx context.Context) (int, error)
- func (_u *ContactUpdate) SaveX(ctx context.Context) int
- func (_u *ContactUpdate) SetAccount(v *Account) *ContactUpdate
- func (_u *ContactUpdate) SetAccountID(id uuid.UUID) *ContactUpdate
- func (_u *ContactUpdate) SetEmail(v string) *ContactUpdate
- func (_u *ContactUpdate) SetLastSeen(v time.Time) *ContactUpdate
- func (_u *ContactUpdate) SetName(v string) *ContactUpdate
- func (_u *ContactUpdate) SetNillableEmail(v *string) *ContactUpdate
- func (_u *ContactUpdate) SetNillableLastSeen(v *time.Time) *ContactUpdate
- func (_u *ContactUpdate) SetNillableName(v *string) *ContactUpdate
- func (_u *ContactUpdate) SetNillableSource(v *contact.Source) *ContactUpdate
- func (_u *ContactUpdate) SetNillableWeight(v *int) *ContactUpdate
- func (_u *ContactUpdate) SetSource(v contact.Source) *ContactUpdate
- func (_u *ContactUpdate) SetWeight(v int) *ContactUpdate
- func (_u *ContactUpdate) Where(ps ...predicate.Contact) *ContactUpdate
- type ContactUpdateOne
- func (_u *ContactUpdateOne) AddWeight(v int) *ContactUpdateOne
- func (_u *ContactUpdateOne) ClearAccount() *ContactUpdateOne
- func (_u *ContactUpdateOne) Exec(ctx context.Context) error
- func (c *ContactUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *ContactUpdateOne) ExecX(ctx context.Context)
- func (_u *ContactUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ContactUpdateOne
- func (_u *ContactUpdateOne) Mutation() *ContactMutation
- func (c *ContactUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *ContactUpdateOne) Save(ctx context.Context) (*Contact, error)
- func (_u *ContactUpdateOne) SaveX(ctx context.Context) *Contact
- func (_u *ContactUpdateOne) Select(field string, fields ...string) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetAccount(v *Account) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetAccountID(id uuid.UUID) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetEmail(v string) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetLastSeen(v time.Time) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetName(v string) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetNillableEmail(v *string) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetNillableLastSeen(v *time.Time) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetNillableName(v *string) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetNillableSource(v *contact.Source) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetNillableWeight(v *int) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetSource(v contact.Source) *ContactUpdateOne
- func (_u *ContactUpdateOne) SetWeight(v int) *ContactUpdateOne
- func (_u *ContactUpdateOne) Where(ps ...predicate.Contact) *ContactUpdateOne
- type ContactUpsert
- func (u *ContactUpsert) AddWeight(v int) *ContactUpsert
- func (u *ContactUpsert) SetEmail(v string) *ContactUpsert
- func (u *ContactUpsert) SetLastSeen(v time.Time) *ContactUpsert
- func (u *ContactUpsert) SetName(v string) *ContactUpsert
- func (u *ContactUpsert) SetSource(v contact.Source) *ContactUpsert
- func (u *ContactUpsert) SetWeight(v int) *ContactUpsert
- func (u *ContactUpsert) UpdateEmail() *ContactUpsert
- func (u *ContactUpsert) UpdateLastSeen() *ContactUpsert
- func (u *ContactUpsert) UpdateName() *ContactUpsert
- func (u *ContactUpsert) UpdateSource() *ContactUpsert
- func (u *ContactUpsert) UpdateWeight() *ContactUpsert
- type ContactUpsertBulk
- func (u *ContactUpsertBulk) AddWeight(v int) *ContactUpsertBulk
- func (u *ContactUpsertBulk) DoNothing() *ContactUpsertBulk
- func (u *ContactUpsertBulk) Exec(ctx context.Context) error
- func (u *ContactUpsertBulk) ExecX(ctx context.Context)
- func (u *ContactUpsertBulk) Ignore() *ContactUpsertBulk
- func (u *ContactUpsertBulk) SetEmail(v string) *ContactUpsertBulk
- func (u *ContactUpsertBulk) SetLastSeen(v time.Time) *ContactUpsertBulk
- func (u *ContactUpsertBulk) SetName(v string) *ContactUpsertBulk
- func (u *ContactUpsertBulk) SetSource(v contact.Source) *ContactUpsertBulk
- func (u *ContactUpsertBulk) SetWeight(v int) *ContactUpsertBulk
- func (u *ContactUpsertBulk) Update(set func(*ContactUpsert)) *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateEmail() *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateLastSeen() *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateName() *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateNewValues() *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateSource() *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateWeight() *ContactUpsertBulk
- type ContactUpsertOne
- func (u *ContactUpsertOne) AddWeight(v int) *ContactUpsertOne
- func (u *ContactUpsertOne) DoNothing() *ContactUpsertOne
- func (u *ContactUpsertOne) Exec(ctx context.Context) error
- func (u *ContactUpsertOne) ExecX(ctx context.Context)
- func (u *ContactUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *ContactUpsertOne) IDX(ctx context.Context) int
- func (u *ContactUpsertOne) Ignore() *ContactUpsertOne
- func (u *ContactUpsertOne) SetEmail(v string) *ContactUpsertOne
- func (u *ContactUpsertOne) SetLastSeen(v time.Time) *ContactUpsertOne
- func (u *ContactUpsertOne) SetName(v string) *ContactUpsertOne
- func (u *ContactUpsertOne) SetSource(v contact.Source) *ContactUpsertOne
- func (u *ContactUpsertOne) SetWeight(v int) *ContactUpsertOne
- func (u *ContactUpsertOne) Update(set func(*ContactUpsert)) *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateEmail() *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateLastSeen() *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateName() *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateNewValues() *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateSource() *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateWeight() *ContactUpsertOne
- type Contacts
- type Hook
- type InterceptFunc
- type Interceptor
- type Message
- func (c *Message) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Message) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *Message) QueryThread() *ThreadQuery
- func (_m *Message) String() string
- func (_m *Message) Unwrap() *Message
- func (_m *Message) Update() *MessageUpdateOne
- func (_m *Message) Value(name string) (ent.Value, error)
- type MessageClient
- func (c *MessageClient) Create() *MessageCreate
- func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
- func (c *MessageClient) Delete() *MessageDelete
- func (c *MessageClient) DeleteOne(_m *Message) *MessageDeleteOne
- func (c *MessageClient) DeleteOneID(id int) *MessageDeleteOne
- func (c *MessageClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *MessageClient) Get(ctx context.Context, id int) (*Message, error)
- func (c *MessageClient) GetX(ctx context.Context, id int) *Message
- func (c *MessageClient) Hooks() []Hook
- func (c *MessageClient) Intercept(interceptors ...Interceptor)
- func (c *MessageClient) Interceptors() []Interceptor
- func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
- func (c *MessageClient) Query() *MessageQuery
- func (c *MessageClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *MessageClient) QueryThread(_m *Message) *ThreadQuery
- func (c *MessageClient) Update() *MessageUpdate
- func (c *MessageClient) UpdateOne(_m *Message) *MessageUpdateOne
- func (c *MessageClient) UpdateOneID(id int) *MessageUpdateOne
- func (c *MessageClient) Use(hooks ...Hook)
- type MessageCreate
- func (_c *MessageCreate) Exec(ctx context.Context) error
- func (c *MessageCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *MessageCreate) ExecX(ctx context.Context)
- func (_c *MessageCreate) Mutation() *MessageMutation
- func (_c *MessageCreate) OnConflict(opts ...sql.ConflictOption) *MessageUpsertOne
- func (_c *MessageCreate) OnConflictColumns(columns ...string) *MessageUpsertOne
- func (c *MessageCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *MessageCreate) Save(ctx context.Context) (*Message, error)
- func (_c *MessageCreate) SaveX(ctx context.Context) *Message
- func (_c *MessageCreate) SetAttachments(v []provider.AttachmentMeta) *MessageCreate
- func (_c *MessageCreate) SetBodyText(v string) *MessageCreate
- func (_c *MessageCreate) SetCc(v []string) *MessageCreate
- func (_c *MessageCreate) SetDate(v time.Time) *MessageCreate
- func (_c *MessageCreate) SetFrom(v string) *MessageCreate
- func (_c *MessageCreate) SetIsSent(v bool) *MessageCreate
- func (_c *MessageCreate) SetNillableBodyText(v *string) *MessageCreate
- func (_c *MessageCreate) SetNillableFrom(v *string) *MessageCreate
- func (_c *MessageCreate) SetNillableIsSent(v *bool) *MessageCreate
- func (_c *MessageCreate) SetNillableRfc822MessageID(v *string) *MessageCreate
- func (_c *MessageCreate) SetNillableSnippet(v *string) *MessageCreate
- func (_c *MessageCreate) SetProviderMessageID(v string) *MessageCreate
- func (_c *MessageCreate) SetReplyHeaders(v map[string]string) *MessageCreate
- func (_c *MessageCreate) SetRfc822MessageID(v string) *MessageCreate
- func (_c *MessageCreate) SetSnippet(v string) *MessageCreate
- func (_c *MessageCreate) SetThread(v *Thread) *MessageCreate
- func (_c *MessageCreate) SetThreadID(id int) *MessageCreate
- func (_c *MessageCreate) SetTo(v []string) *MessageCreate
- type MessageCreateBulk
- func (_c *MessageCreateBulk) Exec(ctx context.Context) error
- func (c *MessageCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *MessageCreateBulk) ExecX(ctx context.Context)
- func (_c *MessageCreateBulk) OnConflict(opts ...sql.ConflictOption) *MessageUpsertBulk
- func (_c *MessageCreateBulk) OnConflictColumns(columns ...string) *MessageUpsertBulk
- func (c *MessageCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *MessageCreateBulk) Save(ctx context.Context) ([]*Message, error)
- func (_c *MessageCreateBulk) SaveX(ctx context.Context) []*Message
- type MessageDelete
- func (_d *MessageDelete) Exec(ctx context.Context) (int, error)
- func (c *MessageDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *MessageDelete) ExecX(ctx context.Context) int
- func (c *MessageDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *MessageDelete) Where(ps ...predicate.Message) *MessageDelete
- type MessageDeleteOne
- type MessageEdges
- type MessageGroupBy
- func (_g *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
- func (s *MessageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageGroupBy) BoolX(ctx context.Context) bool
- func (s *MessageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MessageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageGroupBy) Float64X(ctx context.Context) float64
- func (s *MessageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MessageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MessageGroupBy) IntX(ctx context.Context) int
- func (s *MessageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MessageGroupBy) IntsX(ctx context.Context) []int
- func (_g *MessageGroupBy) Scan(ctx context.Context, v any) error
- func (s *MessageGroupBy) ScanX(ctx context.Context, v any)
- func (s *MessageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MessageGroupBy) StringX(ctx context.Context) string
- func (s *MessageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MessageGroupBy) StringsX(ctx context.Context) []string
- type MessageMutation
- func (m *MessageMutation) AddField(name string, value ent.Value) error
- func (m *MessageMutation) AddedEdges() []string
- func (m *MessageMutation) AddedField(name string) (ent.Value, bool)
- func (m *MessageMutation) AddedFields() []string
- func (m *MessageMutation) AddedIDs(name string) []ent.Value
- func (m *MessageMutation) AppendAttachments(pm []provider.AttachmentMeta)
- func (m *MessageMutation) AppendCc(s []string)
- func (m *MessageMutation) AppendTo(s []string)
- func (m *MessageMutation) AppendedAttachments() ([]provider.AttachmentMeta, bool)
- func (m *MessageMutation) AppendedCc() ([]string, bool)
- func (m *MessageMutation) AppendedTo() ([]string, bool)
- func (m *MessageMutation) Attachments() (r []provider.AttachmentMeta, exists bool)
- func (m *MessageMutation) AttachmentsCleared() bool
- func (m *MessageMutation) BodyText() (r string, exists bool)
- func (m *MessageMutation) Cc() (r []string, exists bool)
- func (m *MessageMutation) ClearAttachments()
- func (m *MessageMutation) ClearEdge(name string) error
- func (m *MessageMutation) ClearField(name string) error
- func (m *MessageMutation) ClearThread()
- func (m *MessageMutation) ClearedEdges() []string
- func (m *MessageMutation) ClearedFields() []string
- func (m MessageMutation) Client() *Client
- func (m *MessageMutation) Date() (r time.Time, exists bool)
- func (m *MessageMutation) EdgeCleared(name string) bool
- func (c *MessageMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *MessageMutation) Field(name string) (ent.Value, bool)
- func (m *MessageMutation) FieldCleared(name string) bool
- func (m *MessageMutation) Fields() []string
- func (m *MessageMutation) From() (r string, exists bool)
- func (m *MessageMutation) ID() (id int, exists bool)
- func (m *MessageMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MessageMutation) IsSent() (r bool, exists bool)
- func (m *MessageMutation) OldAttachments(ctx context.Context) (v []provider.AttachmentMeta, err error)
- func (m *MessageMutation) OldBodyText(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldCc(ctx context.Context) (v []string, err error)
- func (m *MessageMutation) OldDate(ctx context.Context) (v time.Time, err error)
- func (m *MessageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MessageMutation) OldFrom(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldIsSent(ctx context.Context) (v bool, err error)
- func (m *MessageMutation) OldProviderMessageID(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldReplyHeaders(ctx context.Context) (v map[string]string, err error)
- func (m *MessageMutation) OldRfc822MessageID(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldSnippet(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldTo(ctx context.Context) (v []string, err error)
- func (m *MessageMutation) Op() Op
- func (m *MessageMutation) ProviderMessageID() (r string, exists bool)
- func (c *MessageMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *MessageMutation) RemovedEdges() []string
- func (m *MessageMutation) RemovedIDs(name string) []ent.Value
- func (m *MessageMutation) ReplyHeaders() (r map[string]string, exists bool)
- func (m *MessageMutation) ResetAttachments()
- func (m *MessageMutation) ResetBodyText()
- func (m *MessageMutation) ResetCc()
- func (m *MessageMutation) ResetDate()
- func (m *MessageMutation) ResetEdge(name string) error
- func (m *MessageMutation) ResetField(name string) error
- func (m *MessageMutation) ResetFrom()
- func (m *MessageMutation) ResetIsSent()
- func (m *MessageMutation) ResetProviderMessageID()
- func (m *MessageMutation) ResetReplyHeaders()
- func (m *MessageMutation) ResetRfc822MessageID()
- func (m *MessageMutation) ResetSnippet()
- func (m *MessageMutation) ResetThread()
- func (m *MessageMutation) ResetTo()
- func (m *MessageMutation) Rfc822MessageID() (r string, exists bool)
- func (m *MessageMutation) SetAttachments(pm []provider.AttachmentMeta)
- func (m *MessageMutation) SetBodyText(s string)
- func (m *MessageMutation) SetCc(s []string)
- func (m *MessageMutation) SetDate(t time.Time)
- func (m *MessageMutation) SetField(name string, value ent.Value) error
- func (m *MessageMutation) SetFrom(s string)
- func (m *MessageMutation) SetIsSent(b bool)
- func (m *MessageMutation) SetOp(op Op)
- func (m *MessageMutation) SetProviderMessageID(s string)
- func (m *MessageMutation) SetReplyHeaders(value map[string]string)
- func (m *MessageMutation) SetRfc822MessageID(s string)
- func (m *MessageMutation) SetSnippet(s string)
- func (m *MessageMutation) SetThreadID(id int)
- func (m *MessageMutation) SetTo(s []string)
- func (m *MessageMutation) Snippet() (r string, exists bool)
- func (m *MessageMutation) ThreadCleared() bool
- func (m *MessageMutation) ThreadID() (id int, exists bool)
- func (m *MessageMutation) ThreadIDs() (ids []int)
- func (m *MessageMutation) To() (r []string, exists bool)
- func (m MessageMutation) Tx() (*Tx, error)
- func (m *MessageMutation) Type() string
- func (m *MessageMutation) Where(ps ...predicate.Message)
- func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
- type MessageQuery
- func (_q *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (_q *MessageQuery) All(ctx context.Context) ([]*Message, error)
- func (_q *MessageQuery) AllX(ctx context.Context) []*Message
- func (_q *MessageQuery) Clone() *MessageQuery
- func (_q *MessageQuery) Count(ctx context.Context) (int, error)
- func (_q *MessageQuery) CountX(ctx context.Context) int
- func (c *MessageQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *MessageQuery) Exist(ctx context.Context) (bool, error)
- func (_q *MessageQuery) ExistX(ctx context.Context) bool
- func (_q *MessageQuery) First(ctx context.Context) (*Message, error)
- func (_q *MessageQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *MessageQuery) FirstIDX(ctx context.Context) int
- func (_q *MessageQuery) FirstX(ctx context.Context) *Message
- func (_q *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
- func (_q *MessageQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *MessageQuery) IDsX(ctx context.Context) []int
- func (_q *MessageQuery) Limit(limit int) *MessageQuery
- func (_q *MessageQuery) Modify(modifiers ...func(s *sql.Selector)) *MessageSelect
- func (_q *MessageQuery) Offset(offset int) *MessageQuery
- func (_q *MessageQuery) Only(ctx context.Context) (*Message, error)
- func (_q *MessageQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *MessageQuery) OnlyIDX(ctx context.Context) int
- func (_q *MessageQuery) OnlyX(ctx context.Context) *Message
- func (_q *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
- func (c *MessageQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *MessageQuery) QueryThread() *ThreadQuery
- func (_q *MessageQuery) Select(fields ...string) *MessageSelect
- func (_q *MessageQuery) Unique(unique bool) *MessageQuery
- func (_q *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
- func (_q *MessageQuery) WithThread(opts ...func(*ThreadQuery)) *MessageQuery
- type MessageSelect
- func (_s *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (s *MessageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageSelect) BoolX(ctx context.Context) bool
- func (s *MessageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageSelect) BoolsX(ctx context.Context) []bool
- func (c MessageSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *MessageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageSelect) Float64X(ctx context.Context) float64
- func (s *MessageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageSelect) Float64sX(ctx context.Context) []float64
- func (s *MessageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MessageSelect) IntX(ctx context.Context) int
- func (s *MessageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MessageSelect) IntsX(ctx context.Context) []int
- func (_s *MessageSelect) Modify(modifiers ...func(s *sql.Selector)) *MessageSelect
- func (c MessageSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *MessageSelect) Scan(ctx context.Context, v any) error
- func (s *MessageSelect) ScanX(ctx context.Context, v any)
- func (s *MessageSelect) String(ctx context.Context) (_ string, err error)
- func (s *MessageSelect) StringX(ctx context.Context) string
- func (s *MessageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MessageSelect) StringsX(ctx context.Context) []string
- type MessageUpdate
- func (_u *MessageUpdate) AppendAttachments(v []provider.AttachmentMeta) *MessageUpdate
- func (_u *MessageUpdate) AppendCc(v []string) *MessageUpdate
- func (_u *MessageUpdate) AppendTo(v []string) *MessageUpdate
- func (_u *MessageUpdate) ClearAttachments() *MessageUpdate
- func (_u *MessageUpdate) ClearThread() *MessageUpdate
- func (_u *MessageUpdate) Exec(ctx context.Context) error
- func (c *MessageUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *MessageUpdate) ExecX(ctx context.Context)
- func (_u *MessageUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MessageUpdate
- func (_u *MessageUpdate) Mutation() *MessageMutation
- func (c *MessageUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *MessageUpdate) Save(ctx context.Context) (int, error)
- func (_u *MessageUpdate) SaveX(ctx context.Context) int
- func (_u *MessageUpdate) SetAttachments(v []provider.AttachmentMeta) *MessageUpdate
- func (_u *MessageUpdate) SetBodyText(v string) *MessageUpdate
- func (_u *MessageUpdate) SetCc(v []string) *MessageUpdate
- func (_u *MessageUpdate) SetDate(v time.Time) *MessageUpdate
- func (_u *MessageUpdate) SetFrom(v string) *MessageUpdate
- func (_u *MessageUpdate) SetIsSent(v bool) *MessageUpdate
- func (_u *MessageUpdate) SetNillableBodyText(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableDate(v *time.Time) *MessageUpdate
- func (_u *MessageUpdate) SetNillableFrom(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableIsSent(v *bool) *MessageUpdate
- func (_u *MessageUpdate) SetNillableProviderMessageID(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableRfc822MessageID(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableSnippet(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetProviderMessageID(v string) *MessageUpdate
- func (_u *MessageUpdate) SetReplyHeaders(v map[string]string) *MessageUpdate
- func (_u *MessageUpdate) SetRfc822MessageID(v string) *MessageUpdate
- func (_u *MessageUpdate) SetSnippet(v string) *MessageUpdate
- func (_u *MessageUpdate) SetThread(v *Thread) *MessageUpdate
- func (_u *MessageUpdate) SetThreadID(id int) *MessageUpdate
- func (_u *MessageUpdate) SetTo(v []string) *MessageUpdate
- func (_u *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
- type MessageUpdateOne
- func (_u *MessageUpdateOne) AppendAttachments(v []provider.AttachmentMeta) *MessageUpdateOne
- func (_u *MessageUpdateOne) AppendCc(v []string) *MessageUpdateOne
- func (_u *MessageUpdateOne) AppendTo(v []string) *MessageUpdateOne
- func (_u *MessageUpdateOne) ClearAttachments() *MessageUpdateOne
- func (_u *MessageUpdateOne) ClearThread() *MessageUpdateOne
- func (_u *MessageUpdateOne) Exec(ctx context.Context) error
- func (c *MessageUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *MessageUpdateOne) ExecX(ctx context.Context)
- func (_u *MessageUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MessageUpdateOne
- func (_u *MessageUpdateOne) Mutation() *MessageMutation
- func (c *MessageUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
- func (_u *MessageUpdateOne) SaveX(ctx context.Context) *Message
- func (_u *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetAttachments(v []provider.AttachmentMeta) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetBodyText(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetCc(v []string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetDate(v time.Time) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetFrom(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetIsSent(v bool) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableBodyText(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableDate(v *time.Time) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableFrom(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableIsSent(v *bool) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableProviderMessageID(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableRfc822MessageID(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableSnippet(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetProviderMessageID(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetReplyHeaders(v map[string]string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetRfc822MessageID(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetSnippet(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetThread(v *Thread) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetThreadID(id int) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetTo(v []string) *MessageUpdateOne
- func (_u *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
- type MessageUpsert
- func (u *MessageUpsert) ClearAttachments() *MessageUpsert
- func (u *MessageUpsert) SetAttachments(v []provider.AttachmentMeta) *MessageUpsert
- func (u *MessageUpsert) SetBodyText(v string) *MessageUpsert
- func (u *MessageUpsert) SetCc(v []string) *MessageUpsert
- func (u *MessageUpsert) SetDate(v time.Time) *MessageUpsert
- func (u *MessageUpsert) SetFrom(v string) *MessageUpsert
- func (u *MessageUpsert) SetIsSent(v bool) *MessageUpsert
- func (u *MessageUpsert) SetProviderMessageID(v string) *MessageUpsert
- func (u *MessageUpsert) SetReplyHeaders(v map[string]string) *MessageUpsert
- func (u *MessageUpsert) SetRfc822MessageID(v string) *MessageUpsert
- func (u *MessageUpsert) SetSnippet(v string) *MessageUpsert
- func (u *MessageUpsert) SetTo(v []string) *MessageUpsert
- func (u *MessageUpsert) UpdateAttachments() *MessageUpsert
- func (u *MessageUpsert) UpdateBodyText() *MessageUpsert
- func (u *MessageUpsert) UpdateCc() *MessageUpsert
- func (u *MessageUpsert) UpdateDate() *MessageUpsert
- func (u *MessageUpsert) UpdateFrom() *MessageUpsert
- func (u *MessageUpsert) UpdateIsSent() *MessageUpsert
- func (u *MessageUpsert) UpdateProviderMessageID() *MessageUpsert
- func (u *MessageUpsert) UpdateReplyHeaders() *MessageUpsert
- func (u *MessageUpsert) UpdateRfc822MessageID() *MessageUpsert
- func (u *MessageUpsert) UpdateSnippet() *MessageUpsert
- func (u *MessageUpsert) UpdateTo() *MessageUpsert
- type MessageUpsertBulk
- func (u *MessageUpsertBulk) ClearAttachments() *MessageUpsertBulk
- func (u *MessageUpsertBulk) DoNothing() *MessageUpsertBulk
- func (u *MessageUpsertBulk) Exec(ctx context.Context) error
- func (u *MessageUpsertBulk) ExecX(ctx context.Context)
- func (u *MessageUpsertBulk) Ignore() *MessageUpsertBulk
- func (u *MessageUpsertBulk) SetAttachments(v []provider.AttachmentMeta) *MessageUpsertBulk
- func (u *MessageUpsertBulk) SetBodyText(v string) *MessageUpsertBulk
- func (u *MessageUpsertBulk) SetCc(v []string) *MessageUpsertBulk
- func (u *MessageUpsertBulk) SetDate(v time.Time) *MessageUpsertBulk
- func (u *MessageUpsertBulk) SetFrom(v string) *MessageUpsertBulk
- func (u *MessageUpsertBulk) SetIsSent(v bool) *MessageUpsertBulk
- func (u *MessageUpsertBulk) SetProviderMessageID(v string) *MessageUpsertBulk
- func (u *MessageUpsertBulk) SetReplyHeaders(v map[string]string) *MessageUpsertBulk
- func (u *MessageUpsertBulk) SetRfc822MessageID(v string) *MessageUpsertBulk
- func (u *MessageUpsertBulk) SetSnippet(v string) *MessageUpsertBulk
- func (u *MessageUpsertBulk) SetTo(v []string) *MessageUpsertBulk
- func (u *MessageUpsertBulk) Update(set func(*MessageUpsert)) *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateAttachments() *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateBodyText() *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateCc() *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateDate() *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateFrom() *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateIsSent() *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateNewValues() *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateProviderMessageID() *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateReplyHeaders() *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateRfc822MessageID() *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateSnippet() *MessageUpsertBulk
- func (u *MessageUpsertBulk) UpdateTo() *MessageUpsertBulk
- type MessageUpsertOne
- func (u *MessageUpsertOne) ClearAttachments() *MessageUpsertOne
- func (u *MessageUpsertOne) DoNothing() *MessageUpsertOne
- func (u *MessageUpsertOne) Exec(ctx context.Context) error
- func (u *MessageUpsertOne) ExecX(ctx context.Context)
- func (u *MessageUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *MessageUpsertOne) IDX(ctx context.Context) int
- func (u *MessageUpsertOne) Ignore() *MessageUpsertOne
- func (u *MessageUpsertOne) SetAttachments(v []provider.AttachmentMeta) *MessageUpsertOne
- func (u *MessageUpsertOne) SetBodyText(v string) *MessageUpsertOne
- func (u *MessageUpsertOne) SetCc(v []string) *MessageUpsertOne
- func (u *MessageUpsertOne) SetDate(v time.Time) *MessageUpsertOne
- func (u *MessageUpsertOne) SetFrom(v string) *MessageUpsertOne
- func (u *MessageUpsertOne) SetIsSent(v bool) *MessageUpsertOne
- func (u *MessageUpsertOne) SetProviderMessageID(v string) *MessageUpsertOne
- func (u *MessageUpsertOne) SetReplyHeaders(v map[string]string) *MessageUpsertOne
- func (u *MessageUpsertOne) SetRfc822MessageID(v string) *MessageUpsertOne
- func (u *MessageUpsertOne) SetSnippet(v string) *MessageUpsertOne
- func (u *MessageUpsertOne) SetTo(v []string) *MessageUpsertOne
- func (u *MessageUpsertOne) Update(set func(*MessageUpsert)) *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateAttachments() *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateBodyText() *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateCc() *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateDate() *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateFrom() *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateIsSent() *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateNewValues() *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateProviderMessageID() *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateReplyHeaders() *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateRfc822MessageID() *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateSnippet() *MessageUpsertOne
- func (u *MessageUpsertOne) UpdateTo() *MessageUpsertOne
- type Messages
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type NotifyRule
- func (c *NotifyRule) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_m *NotifyRule) QueryAccount() *AccountQuery
- func (c *NotifyRule) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *NotifyRule) String() string
- func (_m *NotifyRule) Unwrap() *NotifyRule
- func (_m *NotifyRule) Update() *NotifyRuleUpdateOne
- func (_m *NotifyRule) Value(name string) (ent.Value, error)
- type NotifyRuleClient
- func (c *NotifyRuleClient) Create() *NotifyRuleCreate
- func (c *NotifyRuleClient) CreateBulk(builders ...*NotifyRuleCreate) *NotifyRuleCreateBulk
- func (c *NotifyRuleClient) Delete() *NotifyRuleDelete
- func (c *NotifyRuleClient) DeleteOne(_m *NotifyRule) *NotifyRuleDeleteOne
- func (c *NotifyRuleClient) DeleteOneID(id int) *NotifyRuleDeleteOne
- func (c *NotifyRuleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *NotifyRuleClient) Get(ctx context.Context, id int) (*NotifyRule, error)
- func (c *NotifyRuleClient) GetX(ctx context.Context, id int) *NotifyRule
- func (c *NotifyRuleClient) Hooks() []Hook
- func (c *NotifyRuleClient) Intercept(interceptors ...Interceptor)
- func (c *NotifyRuleClient) Interceptors() []Interceptor
- func (c *NotifyRuleClient) MapCreateBulk(slice any, setFunc func(*NotifyRuleCreate, int)) *NotifyRuleCreateBulk
- func (c *NotifyRuleClient) Query() *NotifyRuleQuery
- func (c *NotifyRuleClient) QueryAccount(_m *NotifyRule) *AccountQuery
- func (c *NotifyRuleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *NotifyRuleClient) Update() *NotifyRuleUpdate
- func (c *NotifyRuleClient) UpdateOne(_m *NotifyRule) *NotifyRuleUpdateOne
- func (c *NotifyRuleClient) UpdateOneID(id int) *NotifyRuleUpdateOne
- func (c *NotifyRuleClient) Use(hooks ...Hook)
- type NotifyRuleCreate
- func (_c *NotifyRuleCreate) Exec(ctx context.Context) error
- func (c *NotifyRuleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *NotifyRuleCreate) ExecX(ctx context.Context)
- func (_c *NotifyRuleCreate) Mutation() *NotifyRuleMutation
- func (_c *NotifyRuleCreate) OnConflict(opts ...sql.ConflictOption) *NotifyRuleUpsertOne
- func (_c *NotifyRuleCreate) OnConflictColumns(columns ...string) *NotifyRuleUpsertOne
- func (c *NotifyRuleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *NotifyRuleCreate) Save(ctx context.Context) (*NotifyRule, error)
- func (_c *NotifyRuleCreate) SaveX(ctx context.Context) *NotifyRule
- func (_c *NotifyRuleCreate) SetAccount(v *Account) *NotifyRuleCreate
- func (_c *NotifyRuleCreate) SetAccountID(id uuid.UUID) *NotifyRuleCreate
- func (_c *NotifyRuleCreate) SetEnabled(v bool) *NotifyRuleCreate
- func (_c *NotifyRuleCreate) SetLabel(v string) *NotifyRuleCreate
- func (_c *NotifyRuleCreate) SetNillableEnabled(v *bool) *NotifyRuleCreate
- func (_c *NotifyRuleCreate) SetNillableNotify(v *bool) *NotifyRuleCreate
- func (_c *NotifyRuleCreate) SetNillableSound(v *string) *NotifyRuleCreate
- func (_c *NotifyRuleCreate) SetNillableUrgency(v *notifyrule.Urgency) *NotifyRuleCreate
- func (_c *NotifyRuleCreate) SetNotify(v bool) *NotifyRuleCreate
- func (_c *NotifyRuleCreate) SetSound(v string) *NotifyRuleCreate
- func (_c *NotifyRuleCreate) SetUrgency(v notifyrule.Urgency) *NotifyRuleCreate
- type NotifyRuleCreateBulk
- func (_c *NotifyRuleCreateBulk) Exec(ctx context.Context) error
- func (c *NotifyRuleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *NotifyRuleCreateBulk) ExecX(ctx context.Context)
- func (_c *NotifyRuleCreateBulk) OnConflict(opts ...sql.ConflictOption) *NotifyRuleUpsertBulk
- func (_c *NotifyRuleCreateBulk) OnConflictColumns(columns ...string) *NotifyRuleUpsertBulk
- func (c *NotifyRuleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *NotifyRuleCreateBulk) Save(ctx context.Context) ([]*NotifyRule, error)
- func (_c *NotifyRuleCreateBulk) SaveX(ctx context.Context) []*NotifyRule
- type NotifyRuleDelete
- func (_d *NotifyRuleDelete) Exec(ctx context.Context) (int, error)
- func (c *NotifyRuleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *NotifyRuleDelete) ExecX(ctx context.Context) int
- func (c *NotifyRuleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *NotifyRuleDelete) Where(ps ...predicate.NotifyRule) *NotifyRuleDelete
- type NotifyRuleDeleteOne
- type NotifyRuleEdges
- type NotifyRuleGroupBy
- func (_g *NotifyRuleGroupBy) Aggregate(fns ...AggregateFunc) *NotifyRuleGroupBy
- func (s *NotifyRuleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NotifyRuleGroupBy) BoolX(ctx context.Context) bool
- func (s *NotifyRuleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NotifyRuleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NotifyRuleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NotifyRuleGroupBy) Float64X(ctx context.Context) float64
- func (s *NotifyRuleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NotifyRuleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NotifyRuleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NotifyRuleGroupBy) IntX(ctx context.Context) int
- func (s *NotifyRuleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NotifyRuleGroupBy) IntsX(ctx context.Context) []int
- func (_g *NotifyRuleGroupBy) Scan(ctx context.Context, v any) error
- func (s *NotifyRuleGroupBy) ScanX(ctx context.Context, v any)
- func (s *NotifyRuleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NotifyRuleGroupBy) StringX(ctx context.Context) string
- func (s *NotifyRuleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NotifyRuleGroupBy) StringsX(ctx context.Context) []string
- type NotifyRuleMutation
- func (m *NotifyRuleMutation) AccountCleared() bool
- func (m *NotifyRuleMutation) AccountID() (id uuid.UUID, exists bool)
- func (m *NotifyRuleMutation) AccountIDs() (ids []uuid.UUID)
- func (m *NotifyRuleMutation) AddField(name string, value ent.Value) error
- func (m *NotifyRuleMutation) AddedEdges() []string
- func (m *NotifyRuleMutation) AddedField(name string) (ent.Value, bool)
- func (m *NotifyRuleMutation) AddedFields() []string
- func (m *NotifyRuleMutation) AddedIDs(name string) []ent.Value
- func (m *NotifyRuleMutation) ClearAccount()
- func (m *NotifyRuleMutation) ClearEdge(name string) error
- func (m *NotifyRuleMutation) ClearField(name string) error
- func (m *NotifyRuleMutation) ClearedEdges() []string
- func (m *NotifyRuleMutation) ClearedFields() []string
- func (m NotifyRuleMutation) Client() *Client
- func (m *NotifyRuleMutation) EdgeCleared(name string) bool
- func (m *NotifyRuleMutation) Enabled() (r bool, exists bool)
- func (c *NotifyRuleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *NotifyRuleMutation) Field(name string) (ent.Value, bool)
- func (m *NotifyRuleMutation) FieldCleared(name string) bool
- func (m *NotifyRuleMutation) Fields() []string
- func (m *NotifyRuleMutation) ID() (id int, exists bool)
- func (m *NotifyRuleMutation) IDs(ctx context.Context) ([]int, error)
- func (m *NotifyRuleMutation) Label() (r string, exists bool)
- func (m *NotifyRuleMutation) Notify() (r bool, exists bool)
- func (m *NotifyRuleMutation) OldEnabled(ctx context.Context) (v bool, err error)
- func (m *NotifyRuleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NotifyRuleMutation) OldLabel(ctx context.Context) (v string, err error)
- func (m *NotifyRuleMutation) OldNotify(ctx context.Context) (v bool, err error)
- func (m *NotifyRuleMutation) OldSound(ctx context.Context) (v string, err error)
- func (m *NotifyRuleMutation) OldUrgency(ctx context.Context) (v notifyrule.Urgency, err error)
- func (m *NotifyRuleMutation) Op() Op
- func (c *NotifyRuleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *NotifyRuleMutation) RemovedEdges() []string
- func (m *NotifyRuleMutation) RemovedIDs(name string) []ent.Value
- func (m *NotifyRuleMutation) ResetAccount()
- func (m *NotifyRuleMutation) ResetEdge(name string) error
- func (m *NotifyRuleMutation) ResetEnabled()
- func (m *NotifyRuleMutation) ResetField(name string) error
- func (m *NotifyRuleMutation) ResetLabel()
- func (m *NotifyRuleMutation) ResetNotify()
- func (m *NotifyRuleMutation) ResetSound()
- func (m *NotifyRuleMutation) ResetUrgency()
- func (m *NotifyRuleMutation) SetAccountID(id uuid.UUID)
- func (m *NotifyRuleMutation) SetEnabled(b bool)
- func (m *NotifyRuleMutation) SetField(name string, value ent.Value) error
- func (m *NotifyRuleMutation) SetLabel(s string)
- func (m *NotifyRuleMutation) SetNotify(b bool)
- func (m *NotifyRuleMutation) SetOp(op Op)
- func (m *NotifyRuleMutation) SetSound(s string)
- func (m *NotifyRuleMutation) SetUrgency(n notifyrule.Urgency)
- func (m *NotifyRuleMutation) Sound() (r string, exists bool)
- func (m NotifyRuleMutation) Tx() (*Tx, error)
- func (m *NotifyRuleMutation) Type() string
- func (m *NotifyRuleMutation) Urgency() (r notifyrule.Urgency, exists bool)
- func (m *NotifyRuleMutation) Where(ps ...predicate.NotifyRule)
- func (m *NotifyRuleMutation) WhereP(ps ...func(*sql.Selector))
- type NotifyRuleQuery
- func (_q *NotifyRuleQuery) Aggregate(fns ...AggregateFunc) *NotifyRuleSelect
- func (_q *NotifyRuleQuery) All(ctx context.Context) ([]*NotifyRule, error)
- func (_q *NotifyRuleQuery) AllX(ctx context.Context) []*NotifyRule
- func (_q *NotifyRuleQuery) Clone() *NotifyRuleQuery
- func (_q *NotifyRuleQuery) Count(ctx context.Context) (int, error)
- func (_q *NotifyRuleQuery) CountX(ctx context.Context) int
- func (c *NotifyRuleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *NotifyRuleQuery) Exist(ctx context.Context) (bool, error)
- func (_q *NotifyRuleQuery) ExistX(ctx context.Context) bool
- func (_q *NotifyRuleQuery) First(ctx context.Context) (*NotifyRule, error)
- func (_q *NotifyRuleQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *NotifyRuleQuery) FirstIDX(ctx context.Context) int
- func (_q *NotifyRuleQuery) FirstX(ctx context.Context) *NotifyRule
- func (_q *NotifyRuleQuery) GroupBy(field string, fields ...string) *NotifyRuleGroupBy
- func (_q *NotifyRuleQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *NotifyRuleQuery) IDsX(ctx context.Context) []int
- func (_q *NotifyRuleQuery) Limit(limit int) *NotifyRuleQuery
- func (_q *NotifyRuleQuery) Modify(modifiers ...func(s *sql.Selector)) *NotifyRuleSelect
- func (_q *NotifyRuleQuery) Offset(offset int) *NotifyRuleQuery
- func (_q *NotifyRuleQuery) Only(ctx context.Context) (*NotifyRule, error)
- func (_q *NotifyRuleQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *NotifyRuleQuery) OnlyIDX(ctx context.Context) int
- func (_q *NotifyRuleQuery) OnlyX(ctx context.Context) *NotifyRule
- func (_q *NotifyRuleQuery) Order(o ...notifyrule.OrderOption) *NotifyRuleQuery
- func (_q *NotifyRuleQuery) QueryAccount() *AccountQuery
- func (c *NotifyRuleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *NotifyRuleQuery) Select(fields ...string) *NotifyRuleSelect
- func (_q *NotifyRuleQuery) Unique(unique bool) *NotifyRuleQuery
- func (_q *NotifyRuleQuery) Where(ps ...predicate.NotifyRule) *NotifyRuleQuery
- func (_q *NotifyRuleQuery) WithAccount(opts ...func(*AccountQuery)) *NotifyRuleQuery
- type NotifyRuleSelect
- func (_s *NotifyRuleSelect) Aggregate(fns ...AggregateFunc) *NotifyRuleSelect
- func (s *NotifyRuleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NotifyRuleSelect) BoolX(ctx context.Context) bool
- func (s *NotifyRuleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NotifyRuleSelect) BoolsX(ctx context.Context) []bool
- func (c NotifyRuleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *NotifyRuleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NotifyRuleSelect) Float64X(ctx context.Context) float64
- func (s *NotifyRuleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NotifyRuleSelect) Float64sX(ctx context.Context) []float64
- func (s *NotifyRuleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NotifyRuleSelect) IntX(ctx context.Context) int
- func (s *NotifyRuleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NotifyRuleSelect) IntsX(ctx context.Context) []int
- func (_s *NotifyRuleSelect) Modify(modifiers ...func(s *sql.Selector)) *NotifyRuleSelect
- func (c NotifyRuleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *NotifyRuleSelect) Scan(ctx context.Context, v any) error
- func (s *NotifyRuleSelect) ScanX(ctx context.Context, v any)
- func (s *NotifyRuleSelect) String(ctx context.Context) (_ string, err error)
- func (s *NotifyRuleSelect) StringX(ctx context.Context) string
- func (s *NotifyRuleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NotifyRuleSelect) StringsX(ctx context.Context) []string
- type NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) ClearAccount() *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) Exec(ctx context.Context) error
- func (c *NotifyRuleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *NotifyRuleUpdate) ExecX(ctx context.Context)
- func (_u *NotifyRuleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) Mutation() *NotifyRuleMutation
- func (c *NotifyRuleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *NotifyRuleUpdate) Save(ctx context.Context) (int, error)
- func (_u *NotifyRuleUpdate) SaveX(ctx context.Context) int
- func (_u *NotifyRuleUpdate) SetAccount(v *Account) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) SetAccountID(id uuid.UUID) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) SetEnabled(v bool) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) SetLabel(v string) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) SetNillableEnabled(v *bool) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) SetNillableLabel(v *string) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) SetNillableNotify(v *bool) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) SetNillableSound(v *string) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) SetNillableUrgency(v *notifyrule.Urgency) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) SetNotify(v bool) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) SetSound(v string) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) SetUrgency(v notifyrule.Urgency) *NotifyRuleUpdate
- func (_u *NotifyRuleUpdate) Where(ps ...predicate.NotifyRule) *NotifyRuleUpdate
- type NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) ClearAccount() *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) Exec(ctx context.Context) error
- func (c *NotifyRuleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *NotifyRuleUpdateOne) ExecX(ctx context.Context)
- func (_u *NotifyRuleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) Mutation() *NotifyRuleMutation
- func (c *NotifyRuleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *NotifyRuleUpdateOne) Save(ctx context.Context) (*NotifyRule, error)
- func (_u *NotifyRuleUpdateOne) SaveX(ctx context.Context) *NotifyRule
- func (_u *NotifyRuleUpdateOne) Select(field string, fields ...string) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetAccount(v *Account) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetAccountID(id uuid.UUID) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetEnabled(v bool) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetLabel(v string) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetNillableEnabled(v *bool) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetNillableLabel(v *string) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetNillableNotify(v *bool) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetNillableSound(v *string) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetNillableUrgency(v *notifyrule.Urgency) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetNotify(v bool) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetSound(v string) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) SetUrgency(v notifyrule.Urgency) *NotifyRuleUpdateOne
- func (_u *NotifyRuleUpdateOne) Where(ps ...predicate.NotifyRule) *NotifyRuleUpdateOne
- type NotifyRuleUpsert
- func (u *NotifyRuleUpsert) SetEnabled(v bool) *NotifyRuleUpsert
- func (u *NotifyRuleUpsert) SetLabel(v string) *NotifyRuleUpsert
- func (u *NotifyRuleUpsert) SetNotify(v bool) *NotifyRuleUpsert
- func (u *NotifyRuleUpsert) SetSound(v string) *NotifyRuleUpsert
- func (u *NotifyRuleUpsert) SetUrgency(v notifyrule.Urgency) *NotifyRuleUpsert
- func (u *NotifyRuleUpsert) UpdateEnabled() *NotifyRuleUpsert
- func (u *NotifyRuleUpsert) UpdateLabel() *NotifyRuleUpsert
- func (u *NotifyRuleUpsert) UpdateNotify() *NotifyRuleUpsert
- func (u *NotifyRuleUpsert) UpdateSound() *NotifyRuleUpsert
- func (u *NotifyRuleUpsert) UpdateUrgency() *NotifyRuleUpsert
- type NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) DoNothing() *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) Exec(ctx context.Context) error
- func (u *NotifyRuleUpsertBulk) ExecX(ctx context.Context)
- func (u *NotifyRuleUpsertBulk) Ignore() *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) SetEnabled(v bool) *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) SetLabel(v string) *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) SetNotify(v bool) *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) SetSound(v string) *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) SetUrgency(v notifyrule.Urgency) *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) Update(set func(*NotifyRuleUpsert)) *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) UpdateEnabled() *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) UpdateLabel() *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) UpdateNewValues() *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) UpdateNotify() *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) UpdateSound() *NotifyRuleUpsertBulk
- func (u *NotifyRuleUpsertBulk) UpdateUrgency() *NotifyRuleUpsertBulk
- type NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) DoNothing() *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) Exec(ctx context.Context) error
- func (u *NotifyRuleUpsertOne) ExecX(ctx context.Context)
- func (u *NotifyRuleUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *NotifyRuleUpsertOne) IDX(ctx context.Context) int
- func (u *NotifyRuleUpsertOne) Ignore() *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) SetEnabled(v bool) *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) SetLabel(v string) *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) SetNotify(v bool) *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) SetSound(v string) *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) SetUrgency(v notifyrule.Urgency) *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) Update(set func(*NotifyRuleUpsert)) *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) UpdateEnabled() *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) UpdateLabel() *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) UpdateNewValues() *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) UpdateNotify() *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) UpdateSound() *NotifyRuleUpsertOne
- func (u *NotifyRuleUpsertOne) UpdateUrgency() *NotifyRuleUpsertOne
- type NotifyRules
- type Op
- type Option
- type OrderFunc
- type PendingOp
- func (c *PendingOp) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_m *PendingOp) QueryAccount() *AccountQuery
- func (c *PendingOp) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *PendingOp) String() string
- func (_m *PendingOp) Unwrap() *PendingOp
- func (_m *PendingOp) Update() *PendingOpUpdateOne
- func (_m *PendingOp) Value(name string) (ent.Value, error)
- type PendingOpClient
- func (c *PendingOpClient) Create() *PendingOpCreate
- func (c *PendingOpClient) CreateBulk(builders ...*PendingOpCreate) *PendingOpCreateBulk
- func (c *PendingOpClient) Delete() *PendingOpDelete
- func (c *PendingOpClient) DeleteOne(_m *PendingOp) *PendingOpDeleteOne
- func (c *PendingOpClient) DeleteOneID(id int) *PendingOpDeleteOne
- func (c *PendingOpClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *PendingOpClient) Get(ctx context.Context, id int) (*PendingOp, error)
- func (c *PendingOpClient) GetX(ctx context.Context, id int) *PendingOp
- func (c *PendingOpClient) Hooks() []Hook
- func (c *PendingOpClient) Intercept(interceptors ...Interceptor)
- func (c *PendingOpClient) Interceptors() []Interceptor
- func (c *PendingOpClient) MapCreateBulk(slice any, setFunc func(*PendingOpCreate, int)) *PendingOpCreateBulk
- func (c *PendingOpClient) Query() *PendingOpQuery
- func (c *PendingOpClient) QueryAccount(_m *PendingOp) *AccountQuery
- func (c *PendingOpClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *PendingOpClient) Update() *PendingOpUpdate
- func (c *PendingOpClient) UpdateOne(_m *PendingOp) *PendingOpUpdateOne
- func (c *PendingOpClient) UpdateOneID(id int) *PendingOpUpdateOne
- func (c *PendingOpClient) Use(hooks ...Hook)
- type PendingOpCreate
- func (_c *PendingOpCreate) Exec(ctx context.Context) error
- func (c *PendingOpCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *PendingOpCreate) ExecX(ctx context.Context)
- func (_c *PendingOpCreate) Mutation() *PendingOpMutation
- func (_c *PendingOpCreate) OnConflict(opts ...sql.ConflictOption) *PendingOpUpsertOne
- func (_c *PendingOpCreate) OnConflictColumns(columns ...string) *PendingOpUpsertOne
- func (c *PendingOpCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *PendingOpCreate) Save(ctx context.Context) (*PendingOp, error)
- func (_c *PendingOpCreate) SaveX(ctx context.Context) *PendingOp
- func (_c *PendingOpCreate) SetAccount(v *Account) *PendingOpCreate
- func (_c *PendingOpCreate) SetAccountID(id uuid.UUID) *PendingOpCreate
- func (_c *PendingOpCreate) SetAttempts(v int) *PendingOpCreate
- func (_c *PendingOpCreate) SetCreatedAt(v time.Time) *PendingOpCreate
- func (_c *PendingOpCreate) SetLastError(v string) *PendingOpCreate
- func (_c *PendingOpCreate) SetNextAttemptAt(v time.Time) *PendingOpCreate
- func (_c *PendingOpCreate) SetNillableAttempts(v *int) *PendingOpCreate
- func (_c *PendingOpCreate) SetNillableCreatedAt(v *time.Time) *PendingOpCreate
- func (_c *PendingOpCreate) SetNillableLastError(v *string) *PendingOpCreate
- func (_c *PendingOpCreate) SetNillableNextAttemptAt(v *time.Time) *PendingOpCreate
- func (_c *PendingOpCreate) SetNillableState(v *pendingop.State) *PendingOpCreate
- func (_c *PendingOpCreate) SetOpType(v pendingop.OpType) *PendingOpCreate
- func (_c *PendingOpCreate) SetPayload(v map[string]interface{}) *PendingOpCreate
- func (_c *PendingOpCreate) SetProviderThreadIds(v []string) *PendingOpCreate
- func (_c *PendingOpCreate) SetState(v pendingop.State) *PendingOpCreate
- type PendingOpCreateBulk
- func (_c *PendingOpCreateBulk) Exec(ctx context.Context) error
- func (c *PendingOpCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *PendingOpCreateBulk) ExecX(ctx context.Context)
- func (_c *PendingOpCreateBulk) OnConflict(opts ...sql.ConflictOption) *PendingOpUpsertBulk
- func (_c *PendingOpCreateBulk) OnConflictColumns(columns ...string) *PendingOpUpsertBulk
- func (c *PendingOpCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *PendingOpCreateBulk) Save(ctx context.Context) ([]*PendingOp, error)
- func (_c *PendingOpCreateBulk) SaveX(ctx context.Context) []*PendingOp
- type PendingOpDelete
- func (_d *PendingOpDelete) Exec(ctx context.Context) (int, error)
- func (c *PendingOpDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *PendingOpDelete) ExecX(ctx context.Context) int
- func (c *PendingOpDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *PendingOpDelete) Where(ps ...predicate.PendingOp) *PendingOpDelete
- type PendingOpDeleteOne
- type PendingOpEdges
- type PendingOpGroupBy
- func (_g *PendingOpGroupBy) Aggregate(fns ...AggregateFunc) *PendingOpGroupBy
- func (s *PendingOpGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PendingOpGroupBy) BoolX(ctx context.Context) bool
- func (s *PendingOpGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PendingOpGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PendingOpGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PendingOpGroupBy) Float64X(ctx context.Context) float64
- func (s *PendingOpGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PendingOpGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PendingOpGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PendingOpGroupBy) IntX(ctx context.Context) int
- func (s *PendingOpGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PendingOpGroupBy) IntsX(ctx context.Context) []int
- func (_g *PendingOpGroupBy) Scan(ctx context.Context, v any) error
- func (s *PendingOpGroupBy) ScanX(ctx context.Context, v any)
- func (s *PendingOpGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PendingOpGroupBy) StringX(ctx context.Context) string
- func (s *PendingOpGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PendingOpGroupBy) StringsX(ctx context.Context) []string
- type PendingOpMutation
- func (m *PendingOpMutation) AccountCleared() bool
- func (m *PendingOpMutation) AccountID() (id uuid.UUID, exists bool)
- func (m *PendingOpMutation) AccountIDs() (ids []uuid.UUID)
- func (m *PendingOpMutation) AddAttempts(i int)
- func (m *PendingOpMutation) AddField(name string, value ent.Value) error
- func (m *PendingOpMutation) AddedAttempts() (r int, exists bool)
- func (m *PendingOpMutation) AddedEdges() []string
- func (m *PendingOpMutation) AddedField(name string) (ent.Value, bool)
- func (m *PendingOpMutation) AddedFields() []string
- func (m *PendingOpMutation) AddedIDs(name string) []ent.Value
- func (m *PendingOpMutation) AppendProviderThreadIds(s []string)
- func (m *PendingOpMutation) AppendedProviderThreadIds() ([]string, bool)
- func (m *PendingOpMutation) Attempts() (r int, exists bool)
- func (m *PendingOpMutation) ClearAccount()
- func (m *PendingOpMutation) ClearEdge(name string) error
- func (m *PendingOpMutation) ClearField(name string) error
- func (m *PendingOpMutation) ClearNextAttemptAt()
- func (m *PendingOpMutation) ClearedEdges() []string
- func (m *PendingOpMutation) ClearedFields() []string
- func (m PendingOpMutation) Client() *Client
- func (m *PendingOpMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PendingOpMutation) EdgeCleared(name string) bool
- func (c *PendingOpMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *PendingOpMutation) Field(name string) (ent.Value, bool)
- func (m *PendingOpMutation) FieldCleared(name string) bool
- func (m *PendingOpMutation) Fields() []string
- func (m *PendingOpMutation) ID() (id int, exists bool)
- func (m *PendingOpMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PendingOpMutation) LastError() (r string, exists bool)
- func (m *PendingOpMutation) NextAttemptAt() (r time.Time, exists bool)
- func (m *PendingOpMutation) NextAttemptAtCleared() bool
- func (m *PendingOpMutation) OldAttempts(ctx context.Context) (v int, err error)
- func (m *PendingOpMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PendingOpMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PendingOpMutation) OldLastError(ctx context.Context) (v string, err error)
- func (m *PendingOpMutation) OldNextAttemptAt(ctx context.Context) (v *time.Time, err error)
- func (m *PendingOpMutation) OldOpType(ctx context.Context) (v pendingop.OpType, err error)
- func (m *PendingOpMutation) OldPayload(ctx context.Context) (v map[string]interface{}, err error)
- func (m *PendingOpMutation) OldProviderThreadIds(ctx context.Context) (v []string, err error)
- func (m *PendingOpMutation) OldState(ctx context.Context) (v pendingop.State, err error)
- func (m *PendingOpMutation) Op() Op
- func (m *PendingOpMutation) OpType() (r pendingop.OpType, exists bool)
- func (m *PendingOpMutation) Payload() (r map[string]interface{}, exists bool)
- func (m *PendingOpMutation) ProviderThreadIds() (r []string, exists bool)
- func (c *PendingOpMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *PendingOpMutation) RemovedEdges() []string
- func (m *PendingOpMutation) RemovedIDs(name string) []ent.Value
- func (m *PendingOpMutation) ResetAccount()
- func (m *PendingOpMutation) ResetAttempts()
- func (m *PendingOpMutation) ResetCreatedAt()
- func (m *PendingOpMutation) ResetEdge(name string) error
- func (m *PendingOpMutation) ResetField(name string) error
- func (m *PendingOpMutation) ResetLastError()
- func (m *PendingOpMutation) ResetNextAttemptAt()
- func (m *PendingOpMutation) ResetOpType()
- func (m *PendingOpMutation) ResetPayload()
- func (m *PendingOpMutation) ResetProviderThreadIds()
- func (m *PendingOpMutation) ResetState()
- func (m *PendingOpMutation) SetAccountID(id uuid.UUID)
- func (m *PendingOpMutation) SetAttempts(i int)
- func (m *PendingOpMutation) SetCreatedAt(t time.Time)
- func (m *PendingOpMutation) SetField(name string, value ent.Value) error
- func (m *PendingOpMutation) SetLastError(s string)
- func (m *PendingOpMutation) SetNextAttemptAt(t time.Time)
- func (m *PendingOpMutation) SetOp(op Op)
- func (m *PendingOpMutation) SetOpType(pt pendingop.OpType)
- func (m *PendingOpMutation) SetPayload(value map[string]interface{})
- func (m *PendingOpMutation) SetProviderThreadIds(s []string)
- func (m *PendingOpMutation) SetState(pe pendingop.State)
- func (m *PendingOpMutation) State() (r pendingop.State, exists bool)
- func (m PendingOpMutation) Tx() (*Tx, error)
- func (m *PendingOpMutation) Type() string
- func (m *PendingOpMutation) Where(ps ...predicate.PendingOp)
- func (m *PendingOpMutation) WhereP(ps ...func(*sql.Selector))
- type PendingOpQuery
- func (_q *PendingOpQuery) Aggregate(fns ...AggregateFunc) *PendingOpSelect
- func (_q *PendingOpQuery) All(ctx context.Context) ([]*PendingOp, error)
- func (_q *PendingOpQuery) AllX(ctx context.Context) []*PendingOp
- func (_q *PendingOpQuery) Clone() *PendingOpQuery
- func (_q *PendingOpQuery) Count(ctx context.Context) (int, error)
- func (_q *PendingOpQuery) CountX(ctx context.Context) int
- func (c *PendingOpQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *PendingOpQuery) Exist(ctx context.Context) (bool, error)
- func (_q *PendingOpQuery) ExistX(ctx context.Context) bool
- func (_q *PendingOpQuery) First(ctx context.Context) (*PendingOp, error)
- func (_q *PendingOpQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *PendingOpQuery) FirstIDX(ctx context.Context) int
- func (_q *PendingOpQuery) FirstX(ctx context.Context) *PendingOp
- func (_q *PendingOpQuery) GroupBy(field string, fields ...string) *PendingOpGroupBy
- func (_q *PendingOpQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *PendingOpQuery) IDsX(ctx context.Context) []int
- func (_q *PendingOpQuery) Limit(limit int) *PendingOpQuery
- func (_q *PendingOpQuery) Modify(modifiers ...func(s *sql.Selector)) *PendingOpSelect
- func (_q *PendingOpQuery) Offset(offset int) *PendingOpQuery
- func (_q *PendingOpQuery) Only(ctx context.Context) (*PendingOp, error)
- func (_q *PendingOpQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *PendingOpQuery) OnlyIDX(ctx context.Context) int
- func (_q *PendingOpQuery) OnlyX(ctx context.Context) *PendingOp
- func (_q *PendingOpQuery) Order(o ...pendingop.OrderOption) *PendingOpQuery
- func (_q *PendingOpQuery) QueryAccount() *AccountQuery
- func (c *PendingOpQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *PendingOpQuery) Select(fields ...string) *PendingOpSelect
- func (_q *PendingOpQuery) Unique(unique bool) *PendingOpQuery
- func (_q *PendingOpQuery) Where(ps ...predicate.PendingOp) *PendingOpQuery
- func (_q *PendingOpQuery) WithAccount(opts ...func(*AccountQuery)) *PendingOpQuery
- type PendingOpSelect
- func (_s *PendingOpSelect) Aggregate(fns ...AggregateFunc) *PendingOpSelect
- func (s *PendingOpSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PendingOpSelect) BoolX(ctx context.Context) bool
- func (s *PendingOpSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PendingOpSelect) BoolsX(ctx context.Context) []bool
- func (c PendingOpSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *PendingOpSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PendingOpSelect) Float64X(ctx context.Context) float64
- func (s *PendingOpSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PendingOpSelect) Float64sX(ctx context.Context) []float64
- func (s *PendingOpSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PendingOpSelect) IntX(ctx context.Context) int
- func (s *PendingOpSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PendingOpSelect) IntsX(ctx context.Context) []int
- func (_s *PendingOpSelect) Modify(modifiers ...func(s *sql.Selector)) *PendingOpSelect
- func (c PendingOpSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *PendingOpSelect) Scan(ctx context.Context, v any) error
- func (s *PendingOpSelect) ScanX(ctx context.Context, v any)
- func (s *PendingOpSelect) String(ctx context.Context) (_ string, err error)
- func (s *PendingOpSelect) StringX(ctx context.Context) string
- func (s *PendingOpSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PendingOpSelect) StringsX(ctx context.Context) []string
- type PendingOpUpdate
- func (_u *PendingOpUpdate) AddAttempts(v int) *PendingOpUpdate
- func (_u *PendingOpUpdate) AppendProviderThreadIds(v []string) *PendingOpUpdate
- func (_u *PendingOpUpdate) ClearAccount() *PendingOpUpdate
- func (_u *PendingOpUpdate) ClearNextAttemptAt() *PendingOpUpdate
- func (_u *PendingOpUpdate) Exec(ctx context.Context) error
- func (c *PendingOpUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *PendingOpUpdate) ExecX(ctx context.Context)
- func (_u *PendingOpUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PendingOpUpdate
- func (_u *PendingOpUpdate) Mutation() *PendingOpMutation
- func (c *PendingOpUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *PendingOpUpdate) Save(ctx context.Context) (int, error)
- func (_u *PendingOpUpdate) SaveX(ctx context.Context) int
- func (_u *PendingOpUpdate) SetAccount(v *Account) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetAccountID(id uuid.UUID) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetAttempts(v int) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetLastError(v string) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetNextAttemptAt(v time.Time) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetNillableAttempts(v *int) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetNillableLastError(v *string) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetNillableNextAttemptAt(v *time.Time) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetNillableOpType(v *pendingop.OpType) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetNillableState(v *pendingop.State) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetOpType(v pendingop.OpType) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetPayload(v map[string]interface{}) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetProviderThreadIds(v []string) *PendingOpUpdate
- func (_u *PendingOpUpdate) SetState(v pendingop.State) *PendingOpUpdate
- func (_u *PendingOpUpdate) Where(ps ...predicate.PendingOp) *PendingOpUpdate
- type PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) AddAttempts(v int) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) AppendProviderThreadIds(v []string) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) ClearAccount() *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) ClearNextAttemptAt() *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) Exec(ctx context.Context) error
- func (c *PendingOpUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *PendingOpUpdateOne) ExecX(ctx context.Context)
- func (_u *PendingOpUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) Mutation() *PendingOpMutation
- func (c *PendingOpUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *PendingOpUpdateOne) Save(ctx context.Context) (*PendingOp, error)
- func (_u *PendingOpUpdateOne) SaveX(ctx context.Context) *PendingOp
- func (_u *PendingOpUpdateOne) Select(field string, fields ...string) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetAccount(v *Account) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetAccountID(id uuid.UUID) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetAttempts(v int) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetLastError(v string) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetNextAttemptAt(v time.Time) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetNillableAttempts(v *int) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetNillableLastError(v *string) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetNillableNextAttemptAt(v *time.Time) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetNillableOpType(v *pendingop.OpType) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetNillableState(v *pendingop.State) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetOpType(v pendingop.OpType) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetPayload(v map[string]interface{}) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetProviderThreadIds(v []string) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) SetState(v pendingop.State) *PendingOpUpdateOne
- func (_u *PendingOpUpdateOne) Where(ps ...predicate.PendingOp) *PendingOpUpdateOne
- type PendingOpUpsert
- func (u *PendingOpUpsert) AddAttempts(v int) *PendingOpUpsert
- func (u *PendingOpUpsert) ClearNextAttemptAt() *PendingOpUpsert
- func (u *PendingOpUpsert) SetAttempts(v int) *PendingOpUpsert
- func (u *PendingOpUpsert) SetLastError(v string) *PendingOpUpsert
- func (u *PendingOpUpsert) SetNextAttemptAt(v time.Time) *PendingOpUpsert
- func (u *PendingOpUpsert) SetOpType(v pendingop.OpType) *PendingOpUpsert
- func (u *PendingOpUpsert) SetPayload(v map[string]interface{}) *PendingOpUpsert
- func (u *PendingOpUpsert) SetProviderThreadIds(v []string) *PendingOpUpsert
- func (u *PendingOpUpsert) SetState(v pendingop.State) *PendingOpUpsert
- func (u *PendingOpUpsert) UpdateAttempts() *PendingOpUpsert
- func (u *PendingOpUpsert) UpdateLastError() *PendingOpUpsert
- func (u *PendingOpUpsert) UpdateNextAttemptAt() *PendingOpUpsert
- func (u *PendingOpUpsert) UpdateOpType() *PendingOpUpsert
- func (u *PendingOpUpsert) UpdatePayload() *PendingOpUpsert
- func (u *PendingOpUpsert) UpdateProviderThreadIds() *PendingOpUpsert
- func (u *PendingOpUpsert) UpdateState() *PendingOpUpsert
- type PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) AddAttempts(v int) *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) ClearNextAttemptAt() *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) DoNothing() *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) Exec(ctx context.Context) error
- func (u *PendingOpUpsertBulk) ExecX(ctx context.Context)
- func (u *PendingOpUpsertBulk) Ignore() *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) SetAttempts(v int) *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) SetLastError(v string) *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) SetNextAttemptAt(v time.Time) *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) SetOpType(v pendingop.OpType) *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) SetPayload(v map[string]interface{}) *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) SetProviderThreadIds(v []string) *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) SetState(v pendingop.State) *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) Update(set func(*PendingOpUpsert)) *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) UpdateAttempts() *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) UpdateLastError() *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) UpdateNewValues() *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) UpdateNextAttemptAt() *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) UpdateOpType() *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) UpdatePayload() *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) UpdateProviderThreadIds() *PendingOpUpsertBulk
- func (u *PendingOpUpsertBulk) UpdateState() *PendingOpUpsertBulk
- type PendingOpUpsertOne
- func (u *PendingOpUpsertOne) AddAttempts(v int) *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) ClearNextAttemptAt() *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) DoNothing() *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) Exec(ctx context.Context) error
- func (u *PendingOpUpsertOne) ExecX(ctx context.Context)
- func (u *PendingOpUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *PendingOpUpsertOne) IDX(ctx context.Context) int
- func (u *PendingOpUpsertOne) Ignore() *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) SetAttempts(v int) *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) SetLastError(v string) *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) SetNextAttemptAt(v time.Time) *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) SetOpType(v pendingop.OpType) *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) SetPayload(v map[string]interface{}) *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) SetProviderThreadIds(v []string) *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) SetState(v pendingop.State) *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) Update(set func(*PendingOpUpsert)) *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) UpdateAttempts() *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) UpdateLastError() *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) UpdateNewValues() *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) UpdateNextAttemptAt() *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) UpdateOpType() *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) UpdatePayload() *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) UpdateProviderThreadIds() *PendingOpUpsertOne
- func (u *PendingOpUpsertOne) UpdateState() *PendingOpUpsertOne
- type PendingOps
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Secret
- func (c *Secret) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_m *Secret) GetValue(name string) (ent.Value, error)
- func (_m *Secret) QueryAccount() *AccountQuery
- func (c *Secret) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *Secret) String() string
- func (_m *Secret) Unwrap() *Secret
- func (_m *Secret) Update() *SecretUpdateOne
- type SecretClient
- func (c *SecretClient) Create() *SecretCreate
- func (c *SecretClient) CreateBulk(builders ...*SecretCreate) *SecretCreateBulk
- func (c *SecretClient) Delete() *SecretDelete
- func (c *SecretClient) DeleteOne(_m *Secret) *SecretDeleteOne
- func (c *SecretClient) DeleteOneID(id uuid.UUID) *SecretDeleteOne
- func (c *SecretClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *SecretClient) Get(ctx context.Context, id uuid.UUID) (*Secret, error)
- func (c *SecretClient) GetX(ctx context.Context, id uuid.UUID) *Secret
- func (c *SecretClient) Hooks() []Hook
- func (c *SecretClient) Intercept(interceptors ...Interceptor)
- func (c *SecretClient) Interceptors() []Interceptor
- func (c *SecretClient) MapCreateBulk(slice any, setFunc func(*SecretCreate, int)) *SecretCreateBulk
- func (c *SecretClient) Query() *SecretQuery
- func (c *SecretClient) QueryAccount(_m *Secret) *AccountQuery
- func (c *SecretClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *SecretClient) Update() *SecretUpdate
- func (c *SecretClient) UpdateOne(_m *Secret) *SecretUpdateOne
- func (c *SecretClient) UpdateOneID(id uuid.UUID) *SecretUpdateOne
- func (c *SecretClient) Use(hooks ...Hook)
- type SecretCreate
- func (_c *SecretCreate) Exec(ctx context.Context) error
- func (c *SecretCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *SecretCreate) ExecX(ctx context.Context)
- func (_c *SecretCreate) Mutation() *SecretMutation
- func (_c *SecretCreate) OnConflict(opts ...sql.ConflictOption) *SecretUpsertOne
- func (_c *SecretCreate) OnConflictColumns(columns ...string) *SecretUpsertOne
- func (c *SecretCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *SecretCreate) Save(ctx context.Context) (*Secret, error)
- func (_c *SecretCreate) SaveX(ctx context.Context) *Secret
- func (_c *SecretCreate) SetAccount(v *Account) *SecretCreate
- func (_c *SecretCreate) SetAccountID(id uuid.UUID) *SecretCreate
- func (_c *SecretCreate) SetCreatedAt(v time.Time) *SecretCreate
- func (_c *SecretCreate) SetID(v uuid.UUID) *SecretCreate
- func (_c *SecretCreate) SetKey(v string) *SecretCreate
- func (_c *SecretCreate) SetNillableCreatedAt(v *time.Time) *SecretCreate
- func (_c *SecretCreate) SetNillableID(v *uuid.UUID) *SecretCreate
- func (_c *SecretCreate) SetNillableUpdatedAt(v *time.Time) *SecretCreate
- func (_c *SecretCreate) SetUpdatedAt(v time.Time) *SecretCreate
- func (_c *SecretCreate) SetValue(v []byte) *SecretCreate
- type SecretCreateBulk
- func (_c *SecretCreateBulk) Exec(ctx context.Context) error
- func (c *SecretCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *SecretCreateBulk) ExecX(ctx context.Context)
- func (_c *SecretCreateBulk) OnConflict(opts ...sql.ConflictOption) *SecretUpsertBulk
- func (_c *SecretCreateBulk) OnConflictColumns(columns ...string) *SecretUpsertBulk
- func (c *SecretCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *SecretCreateBulk) Save(ctx context.Context) ([]*Secret, error)
- func (_c *SecretCreateBulk) SaveX(ctx context.Context) []*Secret
- type SecretDelete
- func (_d *SecretDelete) Exec(ctx context.Context) (int, error)
- func (c *SecretDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *SecretDelete) ExecX(ctx context.Context) int
- func (c *SecretDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *SecretDelete) Where(ps ...predicate.Secret) *SecretDelete
- type SecretDeleteOne
- type SecretEdges
- type SecretGroupBy
- func (_g *SecretGroupBy) Aggregate(fns ...AggregateFunc) *SecretGroupBy
- func (s *SecretGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SecretGroupBy) BoolX(ctx context.Context) bool
- func (s *SecretGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SecretGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SecretGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SecretGroupBy) Float64X(ctx context.Context) float64
- func (s *SecretGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SecretGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SecretGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SecretGroupBy) IntX(ctx context.Context) int
- func (s *SecretGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SecretGroupBy) IntsX(ctx context.Context) []int
- func (_g *SecretGroupBy) Scan(ctx context.Context, v any) error
- func (s *SecretGroupBy) ScanX(ctx context.Context, v any)
- func (s *SecretGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SecretGroupBy) StringX(ctx context.Context) string
- func (s *SecretGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SecretGroupBy) StringsX(ctx context.Context) []string
- type SecretMutation
- func (m *SecretMutation) AccountCleared() bool
- func (m *SecretMutation) AccountID() (id uuid.UUID, exists bool)
- func (m *SecretMutation) AccountIDs() (ids []uuid.UUID)
- func (m *SecretMutation) AddField(name string, value ent.Value) error
- func (m *SecretMutation) AddedEdges() []string
- func (m *SecretMutation) AddedField(name string) (ent.Value, bool)
- func (m *SecretMutation) AddedFields() []string
- func (m *SecretMutation) AddedIDs(name string) []ent.Value
- func (m *SecretMutation) ClearAccount()
- func (m *SecretMutation) ClearEdge(name string) error
- func (m *SecretMutation) ClearField(name string) error
- func (m *SecretMutation) ClearedEdges() []string
- func (m *SecretMutation) ClearedFields() []string
- func (m SecretMutation) Client() *Client
- func (m *SecretMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SecretMutation) EdgeCleared(name string) bool
- func (c *SecretMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *SecretMutation) Field(name string) (ent.Value, bool)
- func (m *SecretMutation) FieldCleared(name string) bool
- func (m *SecretMutation) Fields() []string
- func (m *SecretMutation) ID() (id uuid.UUID, exists bool)
- func (m *SecretMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *SecretMutation) Key() (r string, exists bool)
- func (m *SecretMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SecretMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SecretMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *SecretMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SecretMutation) OldValue(ctx context.Context) (v []byte, err error)
- func (m *SecretMutation) Op() Op
- func (c *SecretMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *SecretMutation) RemovedEdges() []string
- func (m *SecretMutation) RemovedIDs(name string) []ent.Value
- func (m *SecretMutation) ResetAccount()
- func (m *SecretMutation) ResetCreatedAt()
- func (m *SecretMutation) ResetEdge(name string) error
- func (m *SecretMutation) ResetField(name string) error
- func (m *SecretMutation) ResetKey()
- func (m *SecretMutation) ResetUpdatedAt()
- func (m *SecretMutation) ResetValue()
- func (m *SecretMutation) SetAccountID(id uuid.UUID)
- func (m *SecretMutation) SetCreatedAt(t time.Time)
- func (m *SecretMutation) SetField(name string, value ent.Value) error
- func (m *SecretMutation) SetID(id uuid.UUID)
- func (m *SecretMutation) SetKey(s string)
- func (m *SecretMutation) SetOp(op Op)
- func (m *SecretMutation) SetUpdatedAt(t time.Time)
- func (m *SecretMutation) SetValue(b []byte)
- func (m SecretMutation) Tx() (*Tx, error)
- func (m *SecretMutation) Type() string
- func (m *SecretMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SecretMutation) Value() (r []byte, exists bool)
- func (m *SecretMutation) Where(ps ...predicate.Secret)
- func (m *SecretMutation) WhereP(ps ...func(*sql.Selector))
- type SecretQuery
- func (_q *SecretQuery) Aggregate(fns ...AggregateFunc) *SecretSelect
- func (_q *SecretQuery) All(ctx context.Context) ([]*Secret, error)
- func (_q *SecretQuery) AllX(ctx context.Context) []*Secret
- func (_q *SecretQuery) Clone() *SecretQuery
- func (_q *SecretQuery) Count(ctx context.Context) (int, error)
- func (_q *SecretQuery) CountX(ctx context.Context) int
- func (c *SecretQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *SecretQuery) Exist(ctx context.Context) (bool, error)
- func (_q *SecretQuery) ExistX(ctx context.Context) bool
- func (_q *SecretQuery) First(ctx context.Context) (*Secret, error)
- func (_q *SecretQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *SecretQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *SecretQuery) FirstX(ctx context.Context) *Secret
- func (_q *SecretQuery) GroupBy(field string, fields ...string) *SecretGroupBy
- func (_q *SecretQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *SecretQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *SecretQuery) Limit(limit int) *SecretQuery
- func (_q *SecretQuery) Modify(modifiers ...func(s *sql.Selector)) *SecretSelect
- func (_q *SecretQuery) Offset(offset int) *SecretQuery
- func (_q *SecretQuery) Only(ctx context.Context) (*Secret, error)
- func (_q *SecretQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *SecretQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *SecretQuery) OnlyX(ctx context.Context) *Secret
- func (_q *SecretQuery) Order(o ...secret.OrderOption) *SecretQuery
- func (_q *SecretQuery) QueryAccount() *AccountQuery
- func (c *SecretQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *SecretQuery) Select(fields ...string) *SecretSelect
- func (_q *SecretQuery) Unique(unique bool) *SecretQuery
- func (_q *SecretQuery) Where(ps ...predicate.Secret) *SecretQuery
- func (_q *SecretQuery) WithAccount(opts ...func(*AccountQuery)) *SecretQuery
- type SecretSelect
- func (_s *SecretSelect) Aggregate(fns ...AggregateFunc) *SecretSelect
- func (s *SecretSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SecretSelect) BoolX(ctx context.Context) bool
- func (s *SecretSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SecretSelect) BoolsX(ctx context.Context) []bool
- func (c SecretSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *SecretSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SecretSelect) Float64X(ctx context.Context) float64
- func (s *SecretSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SecretSelect) Float64sX(ctx context.Context) []float64
- func (s *SecretSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SecretSelect) IntX(ctx context.Context) int
- func (s *SecretSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SecretSelect) IntsX(ctx context.Context) []int
- func (_s *SecretSelect) Modify(modifiers ...func(s *sql.Selector)) *SecretSelect
- func (c SecretSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *SecretSelect) Scan(ctx context.Context, v any) error
- func (s *SecretSelect) ScanX(ctx context.Context, v any)
- func (s *SecretSelect) String(ctx context.Context) (_ string, err error)
- func (s *SecretSelect) StringX(ctx context.Context) string
- func (s *SecretSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SecretSelect) StringsX(ctx context.Context) []string
- type SecretUpdate
- func (_u *SecretUpdate) ClearAccount() *SecretUpdate
- func (_u *SecretUpdate) Exec(ctx context.Context) error
- func (c *SecretUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *SecretUpdate) ExecX(ctx context.Context)
- func (_u *SecretUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SecretUpdate
- func (_u *SecretUpdate) Mutation() *SecretMutation
- func (c *SecretUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *SecretUpdate) Save(ctx context.Context) (int, error)
- func (_u *SecretUpdate) SaveX(ctx context.Context) int
- func (_u *SecretUpdate) SetAccount(v *Account) *SecretUpdate
- func (_u *SecretUpdate) SetAccountID(id uuid.UUID) *SecretUpdate
- func (_u *SecretUpdate) SetKey(v string) *SecretUpdate
- func (_u *SecretUpdate) SetNillableKey(v *string) *SecretUpdate
- func (_u *SecretUpdate) SetUpdatedAt(v time.Time) *SecretUpdate
- func (_u *SecretUpdate) SetValue(v []byte) *SecretUpdate
- func (_u *SecretUpdate) Where(ps ...predicate.Secret) *SecretUpdate
- type SecretUpdateOne
- func (_u *SecretUpdateOne) ClearAccount() *SecretUpdateOne
- func (_u *SecretUpdateOne) Exec(ctx context.Context) error
- func (c *SecretUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *SecretUpdateOne) ExecX(ctx context.Context)
- func (_u *SecretUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SecretUpdateOne
- func (_u *SecretUpdateOne) Mutation() *SecretMutation
- func (c *SecretUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *SecretUpdateOne) Save(ctx context.Context) (*Secret, error)
- func (_u *SecretUpdateOne) SaveX(ctx context.Context) *Secret
- func (_u *SecretUpdateOne) Select(field string, fields ...string) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetAccount(v *Account) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetAccountID(id uuid.UUID) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetKey(v string) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetNillableKey(v *string) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetUpdatedAt(v time.Time) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetValue(v []byte) *SecretUpdateOne
- func (_u *SecretUpdateOne) Where(ps ...predicate.Secret) *SecretUpdateOne
- type SecretUpsert
- func (u *SecretUpsert) SetKey(v string) *SecretUpsert
- func (u *SecretUpsert) SetUpdatedAt(v time.Time) *SecretUpsert
- func (u *SecretUpsert) SetValue(v []byte) *SecretUpsert
- func (u *SecretUpsert) UpdateKey() *SecretUpsert
- func (u *SecretUpsert) UpdateUpdatedAt() *SecretUpsert
- func (u *SecretUpsert) UpdateValue() *SecretUpsert
- type SecretUpsertBulk
- func (u *SecretUpsertBulk) DoNothing() *SecretUpsertBulk
- func (u *SecretUpsertBulk) Exec(ctx context.Context) error
- func (u *SecretUpsertBulk) ExecX(ctx context.Context)
- func (u *SecretUpsertBulk) Ignore() *SecretUpsertBulk
- func (u *SecretUpsertBulk) SetKey(v string) *SecretUpsertBulk
- func (u *SecretUpsertBulk) SetUpdatedAt(v time.Time) *SecretUpsertBulk
- func (u *SecretUpsertBulk) SetValue(v []byte) *SecretUpsertBulk
- func (u *SecretUpsertBulk) Update(set func(*SecretUpsert)) *SecretUpsertBulk
- func (u *SecretUpsertBulk) UpdateKey() *SecretUpsertBulk
- func (u *SecretUpsertBulk) UpdateNewValues() *SecretUpsertBulk
- func (u *SecretUpsertBulk) UpdateUpdatedAt() *SecretUpsertBulk
- func (u *SecretUpsertBulk) UpdateValue() *SecretUpsertBulk
- type SecretUpsertOne
- func (u *SecretUpsertOne) DoNothing() *SecretUpsertOne
- func (u *SecretUpsertOne) Exec(ctx context.Context) error
- func (u *SecretUpsertOne) ExecX(ctx context.Context)
- func (u *SecretUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *SecretUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *SecretUpsertOne) Ignore() *SecretUpsertOne
- func (u *SecretUpsertOne) SetKey(v string) *SecretUpsertOne
- func (u *SecretUpsertOne) SetUpdatedAt(v time.Time) *SecretUpsertOne
- func (u *SecretUpsertOne) SetValue(v []byte) *SecretUpsertOne
- func (u *SecretUpsertOne) Update(set func(*SecretUpsert)) *SecretUpsertOne
- func (u *SecretUpsertOne) UpdateKey() *SecretUpsertOne
- func (u *SecretUpsertOne) UpdateNewValues() *SecretUpsertOne
- func (u *SecretUpsertOne) UpdateUpdatedAt() *SecretUpsertOne
- func (u *SecretUpsertOne) UpdateValue() *SecretUpsertOne
- type Secrets
- type Thread
- func (c *Thread) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_m *Thread) QueryAccount() *AccountQuery
- func (c *Thread) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *Thread) QueryMessages() *MessageQuery
- func (_m *Thread) String() string
- func (_m *Thread) Unwrap() *Thread
- func (_m *Thread) Update() *ThreadUpdateOne
- func (_m *Thread) Value(name string) (ent.Value, error)
- type ThreadClient
- func (c *ThreadClient) Create() *ThreadCreate
- func (c *ThreadClient) CreateBulk(builders ...*ThreadCreate) *ThreadCreateBulk
- func (c *ThreadClient) Delete() *ThreadDelete
- func (c *ThreadClient) DeleteOne(_m *Thread) *ThreadDeleteOne
- func (c *ThreadClient) DeleteOneID(id int) *ThreadDeleteOne
- func (c *ThreadClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *ThreadClient) Get(ctx context.Context, id int) (*Thread, error)
- func (c *ThreadClient) GetX(ctx context.Context, id int) *Thread
- func (c *ThreadClient) Hooks() []Hook
- func (c *ThreadClient) Intercept(interceptors ...Interceptor)
- func (c *ThreadClient) Interceptors() []Interceptor
- func (c *ThreadClient) MapCreateBulk(slice any, setFunc func(*ThreadCreate, int)) *ThreadCreateBulk
- func (c *ThreadClient) Query() *ThreadQuery
- func (c *ThreadClient) QueryAccount(_m *Thread) *AccountQuery
- func (c *ThreadClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *ThreadClient) QueryMessages(_m *Thread) *MessageQuery
- func (c *ThreadClient) Update() *ThreadUpdate
- func (c *ThreadClient) UpdateOne(_m *Thread) *ThreadUpdateOne
- func (c *ThreadClient) UpdateOneID(id int) *ThreadUpdateOne
- func (c *ThreadClient) Use(hooks ...Hook)
- type ThreadCreate
- func (_c *ThreadCreate) AddMessageIDs(ids ...int) *ThreadCreate
- func (_c *ThreadCreate) AddMessages(v ...*Message) *ThreadCreate
- func (_c *ThreadCreate) Exec(ctx context.Context) error
- func (c *ThreadCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *ThreadCreate) ExecX(ctx context.Context)
- func (_c *ThreadCreate) Mutation() *ThreadMutation
- func (_c *ThreadCreate) OnConflict(opts ...sql.ConflictOption) *ThreadUpsertOne
- func (_c *ThreadCreate) OnConflictColumns(columns ...string) *ThreadUpsertOne
- func (c *ThreadCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *ThreadCreate) Save(ctx context.Context) (*Thread, error)
- func (_c *ThreadCreate) SaveX(ctx context.Context) *Thread
- func (_c *ThreadCreate) SetAccount(v *Account) *ThreadCreate
- func (_c *ThreadCreate) SetAccountID(id uuid.UUID) *ThreadCreate
- func (_c *ThreadCreate) SetHasAttachments(v bool) *ThreadCreate
- func (_c *ThreadCreate) SetHistoryLoadedAt(v time.Time) *ThreadCreate
- func (_c *ThreadCreate) SetInInbox(v bool) *ThreadCreate
- func (_c *ThreadCreate) SetLabels(v []string) *ThreadCreate
- func (_c *ThreadCreate) SetLastMessageAt(v time.Time) *ThreadCreate
- func (_c *ThreadCreate) SetMessageCount(v int) *ThreadCreate
- func (_c *ThreadCreate) SetNillableHasAttachments(v *bool) *ThreadCreate
- func (_c *ThreadCreate) SetNillableHistoryLoadedAt(v *time.Time) *ThreadCreate
- func (_c *ThreadCreate) SetNillableInInbox(v *bool) *ThreadCreate
- func (_c *ThreadCreate) SetNillableMessageCount(v *int) *ThreadCreate
- func (_c *ThreadCreate) SetNillableSnippet(v *string) *ThreadCreate
- func (_c *ThreadCreate) SetNillableSnoozedUntil(v *time.Time) *ThreadCreate
- func (_c *ThreadCreate) SetNillableStarred(v *bool) *ThreadCreate
- func (_c *ThreadCreate) SetNillableSubject(v *string) *ThreadCreate
- func (_c *ThreadCreate) SetNillableUnread(v *bool) *ThreadCreate
- func (_c *ThreadCreate) SetParticipants(v []string) *ThreadCreate
- func (_c *ThreadCreate) SetProviderThreadID(v string) *ThreadCreate
- func (_c *ThreadCreate) SetSnippet(v string) *ThreadCreate
- func (_c *ThreadCreate) SetSnoozedUntil(v time.Time) *ThreadCreate
- func (_c *ThreadCreate) SetStarred(v bool) *ThreadCreate
- func (_c *ThreadCreate) SetSubject(v string) *ThreadCreate
- func (_c *ThreadCreate) SetUnread(v bool) *ThreadCreate
- type ThreadCreateBulk
- func (_c *ThreadCreateBulk) Exec(ctx context.Context) error
- func (c *ThreadCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *ThreadCreateBulk) ExecX(ctx context.Context)
- func (_c *ThreadCreateBulk) OnConflict(opts ...sql.ConflictOption) *ThreadUpsertBulk
- func (_c *ThreadCreateBulk) OnConflictColumns(columns ...string) *ThreadUpsertBulk
- func (c *ThreadCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *ThreadCreateBulk) Save(ctx context.Context) ([]*Thread, error)
- func (_c *ThreadCreateBulk) SaveX(ctx context.Context) []*Thread
- type ThreadDelete
- func (_d *ThreadDelete) Exec(ctx context.Context) (int, error)
- func (c *ThreadDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *ThreadDelete) ExecX(ctx context.Context) int
- func (c *ThreadDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *ThreadDelete) Where(ps ...predicate.Thread) *ThreadDelete
- type ThreadDeleteOne
- type ThreadEdges
- type ThreadGroupBy
- func (_g *ThreadGroupBy) Aggregate(fns ...AggregateFunc) *ThreadGroupBy
- func (s *ThreadGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ThreadGroupBy) BoolX(ctx context.Context) bool
- func (s *ThreadGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ThreadGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ThreadGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ThreadGroupBy) Float64X(ctx context.Context) float64
- func (s *ThreadGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ThreadGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ThreadGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ThreadGroupBy) IntX(ctx context.Context) int
- func (s *ThreadGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ThreadGroupBy) IntsX(ctx context.Context) []int
- func (_g *ThreadGroupBy) Scan(ctx context.Context, v any) error
- func (s *ThreadGroupBy) ScanX(ctx context.Context, v any)
- func (s *ThreadGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ThreadGroupBy) StringX(ctx context.Context) string
- func (s *ThreadGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ThreadGroupBy) StringsX(ctx context.Context) []string
- type ThreadMutation
- func (m *ThreadMutation) AccountCleared() bool
- func (m *ThreadMutation) AccountID() (id uuid.UUID, exists bool)
- func (m *ThreadMutation) AccountIDs() (ids []uuid.UUID)
- func (m *ThreadMutation) AddField(name string, value ent.Value) error
- func (m *ThreadMutation) AddMessageCount(i int)
- func (m *ThreadMutation) AddMessageIDs(ids ...int)
- func (m *ThreadMutation) AddedEdges() []string
- func (m *ThreadMutation) AddedField(name string) (ent.Value, bool)
- func (m *ThreadMutation) AddedFields() []string
- func (m *ThreadMutation) AddedIDs(name string) []ent.Value
- func (m *ThreadMutation) AddedMessageCount() (r int, exists bool)
- func (m *ThreadMutation) AppendLabels(s []string)
- func (m *ThreadMutation) AppendParticipants(s []string)
- func (m *ThreadMutation) AppendedLabels() ([]string, bool)
- func (m *ThreadMutation) AppendedParticipants() ([]string, bool)
- func (m *ThreadMutation) ClearAccount()
- func (m *ThreadMutation) ClearEdge(name string) error
- func (m *ThreadMutation) ClearField(name string) error
- func (m *ThreadMutation) ClearHistoryLoadedAt()
- func (m *ThreadMutation) ClearMessages()
- func (m *ThreadMutation) ClearSnoozedUntil()
- func (m *ThreadMutation) ClearedEdges() []string
- func (m *ThreadMutation) ClearedFields() []string
- func (m ThreadMutation) Client() *Client
- func (m *ThreadMutation) EdgeCleared(name string) bool
- func (c *ThreadMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *ThreadMutation) Field(name string) (ent.Value, bool)
- func (m *ThreadMutation) FieldCleared(name string) bool
- func (m *ThreadMutation) Fields() []string
- func (m *ThreadMutation) HasAttachments() (r bool, exists bool)
- func (m *ThreadMutation) HistoryLoadedAt() (r time.Time, exists bool)
- func (m *ThreadMutation) HistoryLoadedAtCleared() bool
- func (m *ThreadMutation) ID() (id int, exists bool)
- func (m *ThreadMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ThreadMutation) InInbox() (r bool, exists bool)
- func (m *ThreadMutation) Labels() (r []string, exists bool)
- func (m *ThreadMutation) LastMessageAt() (r time.Time, exists bool)
- func (m *ThreadMutation) MessageCount() (r int, exists bool)
- func (m *ThreadMutation) MessagesCleared() bool
- func (m *ThreadMutation) MessagesIDs() (ids []int)
- func (m *ThreadMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ThreadMutation) OldHasAttachments(ctx context.Context) (v bool, err error)
- func (m *ThreadMutation) OldHistoryLoadedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ThreadMutation) OldInInbox(ctx context.Context) (v bool, err error)
- func (m *ThreadMutation) OldLabels(ctx context.Context) (v []string, err error)
- func (m *ThreadMutation) OldLastMessageAt(ctx context.Context) (v time.Time, err error)
- func (m *ThreadMutation) OldMessageCount(ctx context.Context) (v int, err error)
- func (m *ThreadMutation) OldParticipants(ctx context.Context) (v []string, err error)
- func (m *ThreadMutation) OldProviderThreadID(ctx context.Context) (v string, err error)
- func (m *ThreadMutation) OldSnippet(ctx context.Context) (v string, err error)
- func (m *ThreadMutation) OldSnoozedUntil(ctx context.Context) (v *time.Time, err error)
- func (m *ThreadMutation) OldStarred(ctx context.Context) (v bool, err error)
- func (m *ThreadMutation) OldSubject(ctx context.Context) (v string, err error)
- func (m *ThreadMutation) OldUnread(ctx context.Context) (v bool, err error)
- func (m *ThreadMutation) Op() Op
- func (m *ThreadMutation) Participants() (r []string, exists bool)
- func (m *ThreadMutation) ProviderThreadID() (r string, exists bool)
- func (c *ThreadMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *ThreadMutation) RemoveMessageIDs(ids ...int)
- func (m *ThreadMutation) RemovedEdges() []string
- func (m *ThreadMutation) RemovedIDs(name string) []ent.Value
- func (m *ThreadMutation) RemovedMessagesIDs() (ids []int)
- func (m *ThreadMutation) ResetAccount()
- func (m *ThreadMutation) ResetEdge(name string) error
- func (m *ThreadMutation) ResetField(name string) error
- func (m *ThreadMutation) ResetHasAttachments()
- func (m *ThreadMutation) ResetHistoryLoadedAt()
- func (m *ThreadMutation) ResetInInbox()
- func (m *ThreadMutation) ResetLabels()
- func (m *ThreadMutation) ResetLastMessageAt()
- func (m *ThreadMutation) ResetMessageCount()
- func (m *ThreadMutation) ResetMessages()
- func (m *ThreadMutation) ResetParticipants()
- func (m *ThreadMutation) ResetProviderThreadID()
- func (m *ThreadMutation) ResetSnippet()
- func (m *ThreadMutation) ResetSnoozedUntil()
- func (m *ThreadMutation) ResetStarred()
- func (m *ThreadMutation) ResetSubject()
- func (m *ThreadMutation) ResetUnread()
- func (m *ThreadMutation) SetAccountID(id uuid.UUID)
- func (m *ThreadMutation) SetField(name string, value ent.Value) error
- func (m *ThreadMutation) SetHasAttachments(b bool)
- func (m *ThreadMutation) SetHistoryLoadedAt(t time.Time)
- func (m *ThreadMutation) SetInInbox(b bool)
- func (m *ThreadMutation) SetLabels(s []string)
- func (m *ThreadMutation) SetLastMessageAt(t time.Time)
- func (m *ThreadMutation) SetMessageCount(i int)
- func (m *ThreadMutation) SetOp(op Op)
- func (m *ThreadMutation) SetParticipants(s []string)
- func (m *ThreadMutation) SetProviderThreadID(s string)
- func (m *ThreadMutation) SetSnippet(s string)
- func (m *ThreadMutation) SetSnoozedUntil(t time.Time)
- func (m *ThreadMutation) SetStarred(b bool)
- func (m *ThreadMutation) SetSubject(s string)
- func (m *ThreadMutation) SetUnread(b bool)
- func (m *ThreadMutation) Snippet() (r string, exists bool)
- func (m *ThreadMutation) SnoozedUntil() (r time.Time, exists bool)
- func (m *ThreadMutation) SnoozedUntilCleared() bool
- func (m *ThreadMutation) Starred() (r bool, exists bool)
- func (m *ThreadMutation) Subject() (r string, exists bool)
- func (m ThreadMutation) Tx() (*Tx, error)
- func (m *ThreadMutation) Type() string
- func (m *ThreadMutation) Unread() (r bool, exists bool)
- func (m *ThreadMutation) Where(ps ...predicate.Thread)
- func (m *ThreadMutation) WhereP(ps ...func(*sql.Selector))
- type ThreadQuery
- func (_q *ThreadQuery) Aggregate(fns ...AggregateFunc) *ThreadSelect
- func (_q *ThreadQuery) All(ctx context.Context) ([]*Thread, error)
- func (_q *ThreadQuery) AllX(ctx context.Context) []*Thread
- func (_q *ThreadQuery) Clone() *ThreadQuery
- func (_q *ThreadQuery) Count(ctx context.Context) (int, error)
- func (_q *ThreadQuery) CountX(ctx context.Context) int
- func (c *ThreadQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *ThreadQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ThreadQuery) ExistX(ctx context.Context) bool
- func (_q *ThreadQuery) First(ctx context.Context) (*Thread, error)
- func (_q *ThreadQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *ThreadQuery) FirstIDX(ctx context.Context) int
- func (_q *ThreadQuery) FirstX(ctx context.Context) *Thread
- func (_q *ThreadQuery) GroupBy(field string, fields ...string) *ThreadGroupBy
- func (_q *ThreadQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *ThreadQuery) IDsX(ctx context.Context) []int
- func (_q *ThreadQuery) Limit(limit int) *ThreadQuery
- func (_q *ThreadQuery) Modify(modifiers ...func(s *sql.Selector)) *ThreadSelect
- func (_q *ThreadQuery) Offset(offset int) *ThreadQuery
- func (_q *ThreadQuery) Only(ctx context.Context) (*Thread, error)
- func (_q *ThreadQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *ThreadQuery) OnlyIDX(ctx context.Context) int
- func (_q *ThreadQuery) OnlyX(ctx context.Context) *Thread
- func (_q *ThreadQuery) Order(o ...thread.OrderOption) *ThreadQuery
- func (_q *ThreadQuery) QueryAccount() *AccountQuery
- func (c *ThreadQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *ThreadQuery) QueryMessages() *MessageQuery
- func (_q *ThreadQuery) Select(fields ...string) *ThreadSelect
- func (_q *ThreadQuery) Unique(unique bool) *ThreadQuery
- func (_q *ThreadQuery) Where(ps ...predicate.Thread) *ThreadQuery
- func (_q *ThreadQuery) WithAccount(opts ...func(*AccountQuery)) *ThreadQuery
- func (_q *ThreadQuery) WithMessages(opts ...func(*MessageQuery)) *ThreadQuery
- type ThreadSelect
- func (_s *ThreadSelect) Aggregate(fns ...AggregateFunc) *ThreadSelect
- func (s *ThreadSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ThreadSelect) BoolX(ctx context.Context) bool
- func (s *ThreadSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ThreadSelect) BoolsX(ctx context.Context) []bool
- func (c ThreadSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *ThreadSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ThreadSelect) Float64X(ctx context.Context) float64
- func (s *ThreadSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ThreadSelect) Float64sX(ctx context.Context) []float64
- func (s *ThreadSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ThreadSelect) IntX(ctx context.Context) int
- func (s *ThreadSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ThreadSelect) IntsX(ctx context.Context) []int
- func (_s *ThreadSelect) Modify(modifiers ...func(s *sql.Selector)) *ThreadSelect
- func (c ThreadSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *ThreadSelect) Scan(ctx context.Context, v any) error
- func (s *ThreadSelect) ScanX(ctx context.Context, v any)
- func (s *ThreadSelect) String(ctx context.Context) (_ string, err error)
- func (s *ThreadSelect) StringX(ctx context.Context) string
- func (s *ThreadSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ThreadSelect) StringsX(ctx context.Context) []string
- type ThreadUpdate
- func (_u *ThreadUpdate) AddMessageCount(v int) *ThreadUpdate
- func (_u *ThreadUpdate) AddMessageIDs(ids ...int) *ThreadUpdate
- func (_u *ThreadUpdate) AddMessages(v ...*Message) *ThreadUpdate
- func (_u *ThreadUpdate) AppendLabels(v []string) *ThreadUpdate
- func (_u *ThreadUpdate) AppendParticipants(v []string) *ThreadUpdate
- func (_u *ThreadUpdate) ClearAccount() *ThreadUpdate
- func (_u *ThreadUpdate) ClearHistoryLoadedAt() *ThreadUpdate
- func (_u *ThreadUpdate) ClearMessages() *ThreadUpdate
- func (_u *ThreadUpdate) ClearSnoozedUntil() *ThreadUpdate
- func (_u *ThreadUpdate) Exec(ctx context.Context) error
- func (c *ThreadUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *ThreadUpdate) ExecX(ctx context.Context)
- func (_u *ThreadUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ThreadUpdate
- func (_u *ThreadUpdate) Mutation() *ThreadMutation
- func (c *ThreadUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *ThreadUpdate) RemoveMessageIDs(ids ...int) *ThreadUpdate
- func (_u *ThreadUpdate) RemoveMessages(v ...*Message) *ThreadUpdate
- func (_u *ThreadUpdate) Save(ctx context.Context) (int, error)
- func (_u *ThreadUpdate) SaveX(ctx context.Context) int
- func (_u *ThreadUpdate) SetAccount(v *Account) *ThreadUpdate
- func (_u *ThreadUpdate) SetAccountID(id uuid.UUID) *ThreadUpdate
- func (_u *ThreadUpdate) SetHasAttachments(v bool) *ThreadUpdate
- func (_u *ThreadUpdate) SetHistoryLoadedAt(v time.Time) *ThreadUpdate
- func (_u *ThreadUpdate) SetInInbox(v bool) *ThreadUpdate
- func (_u *ThreadUpdate) SetLabels(v []string) *ThreadUpdate
- func (_u *ThreadUpdate) SetLastMessageAt(v time.Time) *ThreadUpdate
- func (_u *ThreadUpdate) SetMessageCount(v int) *ThreadUpdate
- func (_u *ThreadUpdate) SetNillableHasAttachments(v *bool) *ThreadUpdate
- func (_u *ThreadUpdate) SetNillableHistoryLoadedAt(v *time.Time) *ThreadUpdate
- func (_u *ThreadUpdate) SetNillableInInbox(v *bool) *ThreadUpdate
- func (_u *ThreadUpdate) SetNillableLastMessageAt(v *time.Time) *ThreadUpdate
- func (_u *ThreadUpdate) SetNillableMessageCount(v *int) *ThreadUpdate
- func (_u *ThreadUpdate) SetNillableProviderThreadID(v *string) *ThreadUpdate
- func (_u *ThreadUpdate) SetNillableSnippet(v *string) *ThreadUpdate
- func (_u *ThreadUpdate) SetNillableSnoozedUntil(v *time.Time) *ThreadUpdate
- func (_u *ThreadUpdate) SetNillableStarred(v *bool) *ThreadUpdate
- func (_u *ThreadUpdate) SetNillableSubject(v *string) *ThreadUpdate
- func (_u *ThreadUpdate) SetNillableUnread(v *bool) *ThreadUpdate
- func (_u *ThreadUpdate) SetParticipants(v []string) *ThreadUpdate
- func (_u *ThreadUpdate) SetProviderThreadID(v string) *ThreadUpdate
- func (_u *ThreadUpdate) SetSnippet(v string) *ThreadUpdate
- func (_u *ThreadUpdate) SetSnoozedUntil(v time.Time) *ThreadUpdate
- func (_u *ThreadUpdate) SetStarred(v bool) *ThreadUpdate
- func (_u *ThreadUpdate) SetSubject(v string) *ThreadUpdate
- func (_u *ThreadUpdate) SetUnread(v bool) *ThreadUpdate
- func (_u *ThreadUpdate) Where(ps ...predicate.Thread) *ThreadUpdate
- type ThreadUpdateOne
- func (_u *ThreadUpdateOne) AddMessageCount(v int) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) AddMessageIDs(ids ...int) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) AddMessages(v ...*Message) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) AppendLabels(v []string) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) AppendParticipants(v []string) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) ClearAccount() *ThreadUpdateOne
- func (_u *ThreadUpdateOne) ClearHistoryLoadedAt() *ThreadUpdateOne
- func (_u *ThreadUpdateOne) ClearMessages() *ThreadUpdateOne
- func (_u *ThreadUpdateOne) ClearSnoozedUntil() *ThreadUpdateOne
- func (_u *ThreadUpdateOne) Exec(ctx context.Context) error
- func (c *ThreadUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *ThreadUpdateOne) ExecX(ctx context.Context)
- func (_u *ThreadUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) Mutation() *ThreadMutation
- func (c *ThreadUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *ThreadUpdateOne) RemoveMessageIDs(ids ...int) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) RemoveMessages(v ...*Message) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) Save(ctx context.Context) (*Thread, error)
- func (_u *ThreadUpdateOne) SaveX(ctx context.Context) *Thread
- func (_u *ThreadUpdateOne) Select(field string, fields ...string) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetAccount(v *Account) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetAccountID(id uuid.UUID) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetHasAttachments(v bool) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetHistoryLoadedAt(v time.Time) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetInInbox(v bool) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetLabels(v []string) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetLastMessageAt(v time.Time) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetMessageCount(v int) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetNillableHasAttachments(v *bool) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetNillableHistoryLoadedAt(v *time.Time) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetNillableInInbox(v *bool) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetNillableLastMessageAt(v *time.Time) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetNillableMessageCount(v *int) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetNillableProviderThreadID(v *string) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetNillableSnippet(v *string) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetNillableSnoozedUntil(v *time.Time) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetNillableStarred(v *bool) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetNillableSubject(v *string) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetNillableUnread(v *bool) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetParticipants(v []string) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetProviderThreadID(v string) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetSnippet(v string) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetSnoozedUntil(v time.Time) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetStarred(v bool) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetSubject(v string) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) SetUnread(v bool) *ThreadUpdateOne
- func (_u *ThreadUpdateOne) Where(ps ...predicate.Thread) *ThreadUpdateOne
- type ThreadUpsert
- func (u *ThreadUpsert) AddMessageCount(v int) *ThreadUpsert
- func (u *ThreadUpsert) ClearHistoryLoadedAt() *ThreadUpsert
- func (u *ThreadUpsert) ClearSnoozedUntil() *ThreadUpsert
- func (u *ThreadUpsert) SetHasAttachments(v bool) *ThreadUpsert
- func (u *ThreadUpsert) SetHistoryLoadedAt(v time.Time) *ThreadUpsert
- func (u *ThreadUpsert) SetInInbox(v bool) *ThreadUpsert
- func (u *ThreadUpsert) SetLabels(v []string) *ThreadUpsert
- func (u *ThreadUpsert) SetLastMessageAt(v time.Time) *ThreadUpsert
- func (u *ThreadUpsert) SetMessageCount(v int) *ThreadUpsert
- func (u *ThreadUpsert) SetParticipants(v []string) *ThreadUpsert
- func (u *ThreadUpsert) SetProviderThreadID(v string) *ThreadUpsert
- func (u *ThreadUpsert) SetSnippet(v string) *ThreadUpsert
- func (u *ThreadUpsert) SetSnoozedUntil(v time.Time) *ThreadUpsert
- func (u *ThreadUpsert) SetStarred(v bool) *ThreadUpsert
- func (u *ThreadUpsert) SetSubject(v string) *ThreadUpsert
- func (u *ThreadUpsert) SetUnread(v bool) *ThreadUpsert
- func (u *ThreadUpsert) UpdateHasAttachments() *ThreadUpsert
- func (u *ThreadUpsert) UpdateHistoryLoadedAt() *ThreadUpsert
- func (u *ThreadUpsert) UpdateInInbox() *ThreadUpsert
- func (u *ThreadUpsert) UpdateLabels() *ThreadUpsert
- func (u *ThreadUpsert) UpdateLastMessageAt() *ThreadUpsert
- func (u *ThreadUpsert) UpdateMessageCount() *ThreadUpsert
- func (u *ThreadUpsert) UpdateParticipants() *ThreadUpsert
- func (u *ThreadUpsert) UpdateProviderThreadID() *ThreadUpsert
- func (u *ThreadUpsert) UpdateSnippet() *ThreadUpsert
- func (u *ThreadUpsert) UpdateSnoozedUntil() *ThreadUpsert
- func (u *ThreadUpsert) UpdateStarred() *ThreadUpsert
- func (u *ThreadUpsert) UpdateSubject() *ThreadUpsert
- func (u *ThreadUpsert) UpdateUnread() *ThreadUpsert
- type ThreadUpsertBulk
- func (u *ThreadUpsertBulk) AddMessageCount(v int) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) ClearHistoryLoadedAt() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) ClearSnoozedUntil() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) DoNothing() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) Exec(ctx context.Context) error
- func (u *ThreadUpsertBulk) ExecX(ctx context.Context)
- func (u *ThreadUpsertBulk) Ignore() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetHasAttachments(v bool) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetHistoryLoadedAt(v time.Time) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetInInbox(v bool) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetLabels(v []string) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetLastMessageAt(v time.Time) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetMessageCount(v int) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetParticipants(v []string) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetProviderThreadID(v string) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetSnippet(v string) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetSnoozedUntil(v time.Time) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetStarred(v bool) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetSubject(v string) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) SetUnread(v bool) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) Update(set func(*ThreadUpsert)) *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateHasAttachments() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateHistoryLoadedAt() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateInInbox() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateLabels() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateLastMessageAt() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateMessageCount() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateNewValues() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateParticipants() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateProviderThreadID() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateSnippet() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateSnoozedUntil() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateStarred() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateSubject() *ThreadUpsertBulk
- func (u *ThreadUpsertBulk) UpdateUnread() *ThreadUpsertBulk
- type ThreadUpsertOne
- func (u *ThreadUpsertOne) AddMessageCount(v int) *ThreadUpsertOne
- func (u *ThreadUpsertOne) ClearHistoryLoadedAt() *ThreadUpsertOne
- func (u *ThreadUpsertOne) ClearSnoozedUntil() *ThreadUpsertOne
- func (u *ThreadUpsertOne) DoNothing() *ThreadUpsertOne
- func (u *ThreadUpsertOne) Exec(ctx context.Context) error
- func (u *ThreadUpsertOne) ExecX(ctx context.Context)
- func (u *ThreadUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *ThreadUpsertOne) IDX(ctx context.Context) int
- func (u *ThreadUpsertOne) Ignore() *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetHasAttachments(v bool) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetHistoryLoadedAt(v time.Time) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetInInbox(v bool) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetLabels(v []string) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetLastMessageAt(v time.Time) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetMessageCount(v int) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetParticipants(v []string) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetProviderThreadID(v string) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetSnippet(v string) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetSnoozedUntil(v time.Time) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetStarred(v bool) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetSubject(v string) *ThreadUpsertOne
- func (u *ThreadUpsertOne) SetUnread(v bool) *ThreadUpsertOne
- func (u *ThreadUpsertOne) Update(set func(*ThreadUpsert)) *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateHasAttachments() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateHistoryLoadedAt() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateInInbox() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateLabels() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateLastMessageAt() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateMessageCount() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateNewValues() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateParticipants() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateProviderThreadID() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateSnippet() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateSnoozedUntil() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateStarred() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateSubject() *ThreadUpsertOne
- func (u *ThreadUpsertOne) UpdateUnread() *ThreadUpsertOne
- type Threads
- 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. TypeAccount = "Account" TypeContact = "Contact" TypeMessage = "Message" TypeNotifyRule = "NotifyRule" TypePendingOp = "PendingOp" TypeSecret = "Secret" TypeThread = "Thread" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Account ¶
type Account struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Type holds the value of the "type" field.
Type account.Type `json:"type,omitempty"`
// Email holds the value of the "email" field.
Email string `json:"email,omitempty"`
// DisplayName holds the value of the "display_name" field.
DisplayName string `json:"display_name,omitempty"`
// Config holds the value of the "config" field.
Config map[string]interface{} `json:"config,omitempty"`
// SyncCursor holds the value of the "sync_cursor" field.
SyncCursor string `json:"sync_cursor,omitempty"`
// Status holds the value of the "status" field.
Status account.Status `json:"status,omitempty"`
// NeedsReauth holds the value of the "needs_reauth" field.
NeedsReauth bool `json:"needs_reauth,omitempty"`
// AuthError holds the value of the "auth_error" field.
AuthError string `json:"auth_error,omitempty"`
// SyncNotice holds the value of the "sync_notice" field.
SyncNotice string `json:"sync_notice,omitempty"`
// LastSyncAt holds the value of the "last_sync_at" field.
LastSyncAt *time.Time `json:"last_sync_at,omitempty"`
// LastError holds the value of the "last_error" field.
LastError string `json:"last_error,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the AccountQuery when eager-loading is set.
Edges AccountEdges `json:"edges"`
// contains filtered or unexported fields
}
Account is the model entity for the Account schema.
func (*Account) ExecContext ¶
func (c *Account) 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 (*Account) QueryContacts ¶
func (_m *Account) QueryContacts() *ContactQuery
QueryContacts queries the "contacts" edge of the Account entity.
func (*Account) QueryContext ¶
func (c *Account) 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 (*Account) QueryNotifyRules ¶
func (_m *Account) QueryNotifyRules() *NotifyRuleQuery
QueryNotifyRules queries the "notify_rules" edge of the Account entity.
func (*Account) QueryPendingOps ¶
func (_m *Account) QueryPendingOps() *PendingOpQuery
QueryPendingOps queries the "pending_ops" edge of the Account entity.
func (*Account) QuerySecrets ¶
func (_m *Account) QuerySecrets() *SecretQuery
QuerySecrets queries the "secrets" edge of the Account entity.
func (*Account) QueryThreads ¶
func (_m *Account) QueryThreads() *ThreadQuery
QueryThreads queries the "threads" edge of the Account entity.
func (*Account) Unwrap ¶
Unwrap unwraps the Account 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 (*Account) Update ¶
func (_m *Account) Update() *AccountUpdateOne
Update returns a builder for updating this Account. Note that you need to call Account.Unwrap() before calling this method if this Account was returned from a transaction, and the transaction was committed or rolled back.
type AccountClient ¶
type AccountClient struct {
// contains filtered or unexported fields
}
AccountClient is a client for the Account schema.
func NewAccountClient ¶
func NewAccountClient(c config) *AccountClient
NewAccountClient returns a client for the Account from the given config.
func (*AccountClient) Create ¶
func (c *AccountClient) Create() *AccountCreate
Create returns a builder for creating a Account entity.
func (*AccountClient) CreateBulk ¶
func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk
CreateBulk returns a builder for creating a bulk of Account entities.
func (*AccountClient) Delete ¶
func (c *AccountClient) Delete() *AccountDelete
Delete returns a delete builder for Account.
func (*AccountClient) DeleteOne ¶
func (c *AccountClient) DeleteOne(_m *Account) *AccountDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AccountClient) DeleteOneID ¶
func (c *AccountClient) DeleteOneID(id uuid.UUID) *AccountDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AccountClient) ExecContext ¶
func (c *AccountClient) 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 (*AccountClient) Hooks ¶
func (c *AccountClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AccountClient) Intercept ¶
func (c *AccountClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `account.Intercept(f(g(h())))`.
func (*AccountClient) Interceptors ¶
func (c *AccountClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AccountClient) MapCreateBulk ¶
func (c *AccountClient) MapCreateBulk(slice any, setFunc func(*AccountCreate, int)) *AccountCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*AccountClient) Query ¶
func (c *AccountClient) Query() *AccountQuery
Query returns a query builder for Account.
func (*AccountClient) QueryContacts ¶
func (c *AccountClient) QueryContacts(_m *Account) *ContactQuery
QueryContacts queries the contacts edge of a Account.
func (*AccountClient) QueryContext ¶
func (c *AccountClient) 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 (*AccountClient) QueryNotifyRules ¶
func (c *AccountClient) QueryNotifyRules(_m *Account) *NotifyRuleQuery
QueryNotifyRules queries the notify_rules edge of a Account.
func (*AccountClient) QueryPendingOps ¶
func (c *AccountClient) QueryPendingOps(_m *Account) *PendingOpQuery
QueryPendingOps queries the pending_ops edge of a Account.
func (*AccountClient) QuerySecrets ¶
func (c *AccountClient) QuerySecrets(_m *Account) *SecretQuery
QuerySecrets queries the secrets edge of a Account.
func (*AccountClient) QueryThreads ¶
func (c *AccountClient) QueryThreads(_m *Account) *ThreadQuery
QueryThreads queries the threads edge of a Account.
func (*AccountClient) Update ¶
func (c *AccountClient) Update() *AccountUpdate
Update returns an update builder for Account.
func (*AccountClient) UpdateOne ¶
func (c *AccountClient) UpdateOne(_m *Account) *AccountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AccountClient) UpdateOneID ¶
func (c *AccountClient) UpdateOneID(id uuid.UUID) *AccountUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AccountClient) Use ¶
func (c *AccountClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `account.Hooks(f(g(h())))`.
type AccountCreate ¶
type AccountCreate struct {
// contains filtered or unexported fields
}
AccountCreate is the builder for creating a Account entity.
func (*AccountCreate) AddContactIDs ¶
func (_c *AccountCreate) AddContactIDs(ids ...int) *AccountCreate
AddContactIDs adds the "contacts" edge to the Contact entity by IDs.
func (*AccountCreate) AddContacts ¶
func (_c *AccountCreate) AddContacts(v ...*Contact) *AccountCreate
AddContacts adds the "contacts" edges to the Contact entity.
func (*AccountCreate) AddNotifyRuleIDs ¶
func (_c *AccountCreate) AddNotifyRuleIDs(ids ...int) *AccountCreate
AddNotifyRuleIDs adds the "notify_rules" edge to the NotifyRule entity by IDs.
func (*AccountCreate) AddNotifyRules ¶
func (_c *AccountCreate) AddNotifyRules(v ...*NotifyRule) *AccountCreate
AddNotifyRules adds the "notify_rules" edges to the NotifyRule entity.
func (*AccountCreate) AddPendingOpIDs ¶
func (_c *AccountCreate) AddPendingOpIDs(ids ...int) *AccountCreate
AddPendingOpIDs adds the "pending_ops" edge to the PendingOp entity by IDs.
func (*AccountCreate) AddPendingOps ¶
func (_c *AccountCreate) AddPendingOps(v ...*PendingOp) *AccountCreate
AddPendingOps adds the "pending_ops" edges to the PendingOp entity.
func (*AccountCreate) AddSecretIDs ¶
func (_c *AccountCreate) AddSecretIDs(ids ...uuid.UUID) *AccountCreate
AddSecretIDs adds the "secrets" edge to the Secret entity by IDs.
func (*AccountCreate) AddSecrets ¶
func (_c *AccountCreate) AddSecrets(v ...*Secret) *AccountCreate
AddSecrets adds the "secrets" edges to the Secret entity.
func (*AccountCreate) AddThreadIDs ¶
func (_c *AccountCreate) AddThreadIDs(ids ...int) *AccountCreate
AddThreadIDs adds the "threads" edge to the Thread entity by IDs.
func (*AccountCreate) AddThreads ¶
func (_c *AccountCreate) AddThreads(v ...*Thread) *AccountCreate
AddThreads adds the "threads" edges to the Thread entity.
func (*AccountCreate) Exec ¶
func (_c *AccountCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountCreate) ExecContext ¶
func (c *AccountCreate) 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 (*AccountCreate) ExecX ¶
func (_c *AccountCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountCreate) Mutation ¶
func (_c *AccountCreate) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountCreate) OnConflict ¶
func (_c *AccountCreate) OnConflict(opts ...sql.ConflictOption) *AccountUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Account.Create().
SetType(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.AccountUpsert) {
SetType(v+v).
}).
Exec(ctx)
func (*AccountCreate) OnConflictColumns ¶
func (_c *AccountCreate) OnConflictColumns(columns ...string) *AccountUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Account.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AccountCreate) QueryContext ¶
func (c *AccountCreate) 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 (*AccountCreate) Save ¶
func (_c *AccountCreate) Save(ctx context.Context) (*Account, error)
Save creates the Account in the database.
func (*AccountCreate) SaveX ¶
func (_c *AccountCreate) SaveX(ctx context.Context) *Account
SaveX calls Save and panics if Save returns an error.
func (*AccountCreate) SetAuthError ¶
func (_c *AccountCreate) SetAuthError(v string) *AccountCreate
SetAuthError sets the "auth_error" field.
func (*AccountCreate) SetConfig ¶
func (_c *AccountCreate) SetConfig(v map[string]interface{}) *AccountCreate
SetConfig sets the "config" field.
func (*AccountCreate) SetCreatedAt ¶
func (_c *AccountCreate) SetCreatedAt(v time.Time) *AccountCreate
SetCreatedAt sets the "created_at" field.
func (*AccountCreate) SetDisplayName ¶
func (_c *AccountCreate) SetDisplayName(v string) *AccountCreate
SetDisplayName sets the "display_name" field.
func (*AccountCreate) SetEmail ¶
func (_c *AccountCreate) SetEmail(v string) *AccountCreate
SetEmail sets the "email" field.
func (*AccountCreate) SetID ¶
func (_c *AccountCreate) SetID(v uuid.UUID) *AccountCreate
SetID sets the "id" field.
func (*AccountCreate) SetLastError ¶
func (_c *AccountCreate) SetLastError(v string) *AccountCreate
SetLastError sets the "last_error" field.
func (*AccountCreate) SetLastSyncAt ¶
func (_c *AccountCreate) SetLastSyncAt(v time.Time) *AccountCreate
SetLastSyncAt sets the "last_sync_at" field.
func (*AccountCreate) SetNeedsReauth ¶
func (_c *AccountCreate) SetNeedsReauth(v bool) *AccountCreate
SetNeedsReauth sets the "needs_reauth" field.
func (*AccountCreate) SetNillableAuthError ¶
func (_c *AccountCreate) SetNillableAuthError(v *string) *AccountCreate
SetNillableAuthError sets the "auth_error" field if the given value is not nil.
func (*AccountCreate) SetNillableCreatedAt ¶
func (_c *AccountCreate) SetNillableCreatedAt(v *time.Time) *AccountCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccountCreate) SetNillableDisplayName ¶
func (_c *AccountCreate) SetNillableDisplayName(v *string) *AccountCreate
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*AccountCreate) SetNillableID ¶
func (_c *AccountCreate) SetNillableID(v *uuid.UUID) *AccountCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AccountCreate) SetNillableLastError ¶
func (_c *AccountCreate) SetNillableLastError(v *string) *AccountCreate
SetNillableLastError sets the "last_error" field if the given value is not nil.
func (*AccountCreate) SetNillableLastSyncAt ¶
func (_c *AccountCreate) SetNillableLastSyncAt(v *time.Time) *AccountCreate
SetNillableLastSyncAt sets the "last_sync_at" field if the given value is not nil.
func (*AccountCreate) SetNillableNeedsReauth ¶
func (_c *AccountCreate) SetNillableNeedsReauth(v *bool) *AccountCreate
SetNillableNeedsReauth sets the "needs_reauth" field if the given value is not nil.
func (*AccountCreate) SetNillableStatus ¶
func (_c *AccountCreate) SetNillableStatus(v *account.Status) *AccountCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*AccountCreate) SetNillableSyncCursor ¶
func (_c *AccountCreate) SetNillableSyncCursor(v *string) *AccountCreate
SetNillableSyncCursor sets the "sync_cursor" field if the given value is not nil.
func (*AccountCreate) SetNillableSyncNotice ¶
func (_c *AccountCreate) SetNillableSyncNotice(v *string) *AccountCreate
SetNillableSyncNotice sets the "sync_notice" field if the given value is not nil.
func (*AccountCreate) SetStatus ¶
func (_c *AccountCreate) SetStatus(v account.Status) *AccountCreate
SetStatus sets the "status" field.
func (*AccountCreate) SetSyncCursor ¶
func (_c *AccountCreate) SetSyncCursor(v string) *AccountCreate
SetSyncCursor sets the "sync_cursor" field.
func (*AccountCreate) SetSyncNotice ¶
func (_c *AccountCreate) SetSyncNotice(v string) *AccountCreate
SetSyncNotice sets the "sync_notice" field.
func (*AccountCreate) SetType ¶
func (_c *AccountCreate) SetType(v account.Type) *AccountCreate
SetType sets the "type" field.
type AccountCreateBulk ¶
type AccountCreateBulk struct {
// contains filtered or unexported fields
}
AccountCreateBulk is the builder for creating many Account entities in bulk.
func (*AccountCreateBulk) Exec ¶
func (_c *AccountCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountCreateBulk) ExecContext ¶
func (c *AccountCreateBulk) 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 (*AccountCreateBulk) ExecX ¶
func (_c *AccountCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountCreateBulk) OnConflict ¶
func (_c *AccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *AccountUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Account.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.AccountUpsert) {
SetType(v+v).
}).
Exec(ctx)
func (*AccountCreateBulk) OnConflictColumns ¶
func (_c *AccountCreateBulk) OnConflictColumns(columns ...string) *AccountUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Account.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AccountCreateBulk) QueryContext ¶
func (c *AccountCreateBulk) 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 AccountDelete ¶
type AccountDelete struct {
// contains filtered or unexported fields
}
AccountDelete is the builder for deleting a Account entity.
func (*AccountDelete) Exec ¶
func (_d *AccountDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AccountDelete) ExecContext ¶
func (c *AccountDelete) 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 (*AccountDelete) ExecX ¶
func (_d *AccountDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AccountDelete) QueryContext ¶
func (c *AccountDelete) 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 (*AccountDelete) Where ¶
func (_d *AccountDelete) Where(ps ...predicate.Account) *AccountDelete
Where appends a list predicates to the AccountDelete builder.
type AccountDeleteOne ¶
type AccountDeleteOne struct {
// contains filtered or unexported fields
}
AccountDeleteOne is the builder for deleting a single Account entity.
func (*AccountDeleteOne) Exec ¶
func (_d *AccountDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AccountDeleteOne) ExecX ¶
func (_d *AccountDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountDeleteOne) Where ¶
func (_d *AccountDeleteOne) Where(ps ...predicate.Account) *AccountDeleteOne
Where appends a list predicates to the AccountDelete builder.
type AccountEdges ¶
type AccountEdges struct {
// Threads holds the value of the threads edge.
Threads []*Thread `json:"threads,omitempty"`
// PendingOps holds the value of the pending_ops edge.
PendingOps []*PendingOp `json:"pending_ops,omitempty"`
// NotifyRules holds the value of the notify_rules edge.
NotifyRules []*NotifyRule `json:"notify_rules,omitempty"`
// Contacts holds the value of the contacts edge.
Contacts []*Contact `json:"contacts,omitempty"`
// Secrets holds the value of the secrets edge.
Secrets []*Secret `json:"secrets,omitempty"`
// contains filtered or unexported fields
}
AccountEdges holds the relations/edges for other nodes in the graph.
func (AccountEdges) ContactsOrErr ¶
func (e AccountEdges) ContactsOrErr() ([]*Contact, error)
ContactsOrErr returns the Contacts value or an error if the edge was not loaded in eager-loading.
func (AccountEdges) NotifyRulesOrErr ¶
func (e AccountEdges) NotifyRulesOrErr() ([]*NotifyRule, error)
NotifyRulesOrErr returns the NotifyRules value or an error if the edge was not loaded in eager-loading.
func (AccountEdges) PendingOpsOrErr ¶
func (e AccountEdges) PendingOpsOrErr() ([]*PendingOp, error)
PendingOpsOrErr returns the PendingOps value or an error if the edge was not loaded in eager-loading.
func (AccountEdges) SecretsOrErr ¶
func (e AccountEdges) SecretsOrErr() ([]*Secret, error)
SecretsOrErr returns the Secrets value or an error if the edge was not loaded in eager-loading.
func (AccountEdges) ThreadsOrErr ¶
func (e AccountEdges) ThreadsOrErr() ([]*Thread, error)
ThreadsOrErr returns the Threads value or an error if the edge was not loaded in eager-loading.
type AccountGroupBy ¶
type AccountGroupBy struct {
// contains filtered or unexported fields
}
AccountGroupBy is the group-by builder for Account entities.
func (*AccountGroupBy) Aggregate ¶
func (_g *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AccountGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Scan ¶
func (_g *AccountGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccountGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccountMutation ¶
type AccountMutation struct {
// contains filtered or unexported fields
}
AccountMutation represents an operation that mutates the Account nodes in the graph.
func (*AccountMutation) AddContactIDs ¶
func (m *AccountMutation) AddContactIDs(ids ...int)
AddContactIDs adds the "contacts" edge to the Contact entity by ids.
func (*AccountMutation) AddField ¶
func (m *AccountMutation) 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 (*AccountMutation) AddNotifyRuleIDs ¶
func (m *AccountMutation) AddNotifyRuleIDs(ids ...int)
AddNotifyRuleIDs adds the "notify_rules" edge to the NotifyRule entity by ids.
func (*AccountMutation) AddPendingOpIDs ¶
func (m *AccountMutation) AddPendingOpIDs(ids ...int)
AddPendingOpIDs adds the "pending_ops" edge to the PendingOp entity by ids.
func (*AccountMutation) AddSecretIDs ¶
func (m *AccountMutation) AddSecretIDs(ids ...uuid.UUID)
AddSecretIDs adds the "secrets" edge to the Secret entity by ids.
func (*AccountMutation) AddThreadIDs ¶
func (m *AccountMutation) AddThreadIDs(ids ...int)
AddThreadIDs adds the "threads" edge to the Thread entity by ids.
func (*AccountMutation) AddedEdges ¶
func (m *AccountMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AccountMutation) AddedField ¶
func (m *AccountMutation) 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 (*AccountMutation) AddedFields ¶
func (m *AccountMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AccountMutation) AddedIDs ¶
func (m *AccountMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AccountMutation) AuthError ¶
func (m *AccountMutation) AuthError() (r string, exists bool)
AuthError returns the value of the "auth_error" field in the mutation.
func (*AccountMutation) AuthErrorCleared ¶
func (m *AccountMutation) AuthErrorCleared() bool
AuthErrorCleared returns if the "auth_error" field was cleared in this mutation.
func (*AccountMutation) ClearAuthError ¶
func (m *AccountMutation) ClearAuthError()
ClearAuthError clears the value of the "auth_error" field.
func (*AccountMutation) ClearContacts ¶
func (m *AccountMutation) ClearContacts()
ClearContacts clears the "contacts" edge to the Contact entity.
func (*AccountMutation) ClearEdge ¶
func (m *AccountMutation) 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 (*AccountMutation) ClearField ¶
func (m *AccountMutation) 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 (*AccountMutation) ClearLastSyncAt ¶
func (m *AccountMutation) ClearLastSyncAt()
ClearLastSyncAt clears the value of the "last_sync_at" field.
func (*AccountMutation) ClearNotifyRules ¶
func (m *AccountMutation) ClearNotifyRules()
ClearNotifyRules clears the "notify_rules" edge to the NotifyRule entity.
func (*AccountMutation) ClearPendingOps ¶
func (m *AccountMutation) ClearPendingOps()
ClearPendingOps clears the "pending_ops" edge to the PendingOp entity.
func (*AccountMutation) ClearSecrets ¶
func (m *AccountMutation) ClearSecrets()
ClearSecrets clears the "secrets" edge to the Secret entity.
func (*AccountMutation) ClearSyncNotice ¶
func (m *AccountMutation) ClearSyncNotice()
ClearSyncNotice clears the value of the "sync_notice" field.
func (*AccountMutation) ClearThreads ¶
func (m *AccountMutation) ClearThreads()
ClearThreads clears the "threads" edge to the Thread entity.
func (*AccountMutation) ClearedEdges ¶
func (m *AccountMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AccountMutation) ClearedFields ¶
func (m *AccountMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AccountMutation) Client ¶
func (m AccountMutation) 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 (*AccountMutation) Config ¶
func (m *AccountMutation) Config() (r map[string]interface{}, exists bool)
Config returns the value of the "config" field in the mutation.
func (*AccountMutation) ContactsCleared ¶
func (m *AccountMutation) ContactsCleared() bool
ContactsCleared reports if the "contacts" edge to the Contact entity was cleared.
func (*AccountMutation) ContactsIDs ¶
func (m *AccountMutation) ContactsIDs() (ids []int)
ContactsIDs returns the "contacts" edge IDs in the mutation.
func (*AccountMutation) CreatedAt ¶
func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AccountMutation) DisplayName ¶
func (m *AccountMutation) DisplayName() (r string, exists bool)
DisplayName returns the value of the "display_name" field in the mutation.
func (*AccountMutation) EdgeCleared ¶
func (m *AccountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AccountMutation) Email ¶
func (m *AccountMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*AccountMutation) ExecContext ¶
func (c *AccountMutation) 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 (*AccountMutation) Field ¶
func (m *AccountMutation) 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 (*AccountMutation) FieldCleared ¶
func (m *AccountMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AccountMutation) Fields ¶
func (m *AccountMutation) 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 (*AccountMutation) GetType ¶
func (m *AccountMutation) GetType() (r account.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*AccountMutation) ID ¶
func (m *AccountMutation) 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 (*AccountMutation) 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 (*AccountMutation) LastError ¶
func (m *AccountMutation) LastError() (r string, exists bool)
LastError returns the value of the "last_error" field in the mutation.
func (*AccountMutation) LastSyncAt ¶
func (m *AccountMutation) LastSyncAt() (r time.Time, exists bool)
LastSyncAt returns the value of the "last_sync_at" field in the mutation.
func (*AccountMutation) LastSyncAtCleared ¶
func (m *AccountMutation) LastSyncAtCleared() bool
LastSyncAtCleared returns if the "last_sync_at" field was cleared in this mutation.
func (*AccountMutation) NeedsReauth ¶
func (m *AccountMutation) NeedsReauth() (r bool, exists bool)
NeedsReauth returns the value of the "needs_reauth" field in the mutation.
func (*AccountMutation) NotifyRulesCleared ¶
func (m *AccountMutation) NotifyRulesCleared() bool
NotifyRulesCleared reports if the "notify_rules" edge to the NotifyRule entity was cleared.
func (*AccountMutation) NotifyRulesIDs ¶
func (m *AccountMutation) NotifyRulesIDs() (ids []int)
NotifyRulesIDs returns the "notify_rules" edge IDs in the mutation.
func (*AccountMutation) OldAuthError ¶
func (m *AccountMutation) OldAuthError(ctx context.Context) (v string, err error)
OldAuthError returns the old "auth_error" field's value of the Account entity. If the Account 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 (*AccountMutation) OldConfig ¶
func (m *AccountMutation) OldConfig(ctx context.Context) (v map[string]interface{}, err error)
OldConfig returns the old "config" field's value of the Account entity. If the Account 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 (*AccountMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Account entity. If the Account 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 (*AccountMutation) OldDisplayName ¶
func (m *AccountMutation) OldDisplayName(ctx context.Context) (v string, err error)
OldDisplayName returns the old "display_name" field's value of the Account entity. If the Account 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 (*AccountMutation) OldEmail ¶
func (m *AccountMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Account entity. If the Account 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 (*AccountMutation) 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 (*AccountMutation) OldLastError ¶
func (m *AccountMutation) OldLastError(ctx context.Context) (v string, err error)
OldLastError returns the old "last_error" field's value of the Account entity. If the Account 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 (*AccountMutation) OldLastSyncAt ¶
OldLastSyncAt returns the old "last_sync_at" field's value of the Account entity. If the Account 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 (*AccountMutation) OldNeedsReauth ¶
func (m *AccountMutation) OldNeedsReauth(ctx context.Context) (v bool, err error)
OldNeedsReauth returns the old "needs_reauth" field's value of the Account entity. If the Account 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 (*AccountMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Account entity. If the Account 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 (*AccountMutation) OldSyncCursor ¶
func (m *AccountMutation) OldSyncCursor(ctx context.Context) (v string, err error)
OldSyncCursor returns the old "sync_cursor" field's value of the Account entity. If the Account 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 (*AccountMutation) OldSyncNotice ¶
func (m *AccountMutation) OldSyncNotice(ctx context.Context) (v string, err error)
OldSyncNotice returns the old "sync_notice" field's value of the Account entity. If the Account 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 (*AccountMutation) OldType ¶
OldType returns the old "type" field's value of the Account entity. If the Account 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 (*AccountMutation) PendingOpsCleared ¶
func (m *AccountMutation) PendingOpsCleared() bool
PendingOpsCleared reports if the "pending_ops" edge to the PendingOp entity was cleared.
func (*AccountMutation) PendingOpsIDs ¶
func (m *AccountMutation) PendingOpsIDs() (ids []int)
PendingOpsIDs returns the "pending_ops" edge IDs in the mutation.
func (*AccountMutation) QueryContext ¶
func (c *AccountMutation) 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 (*AccountMutation) RemoveContactIDs ¶
func (m *AccountMutation) RemoveContactIDs(ids ...int)
RemoveContactIDs removes the "contacts" edge to the Contact entity by IDs.
func (*AccountMutation) RemoveNotifyRuleIDs ¶
func (m *AccountMutation) RemoveNotifyRuleIDs(ids ...int)
RemoveNotifyRuleIDs removes the "notify_rules" edge to the NotifyRule entity by IDs.
func (*AccountMutation) RemovePendingOpIDs ¶
func (m *AccountMutation) RemovePendingOpIDs(ids ...int)
RemovePendingOpIDs removes the "pending_ops" edge to the PendingOp entity by IDs.
func (*AccountMutation) RemoveSecretIDs ¶
func (m *AccountMutation) RemoveSecretIDs(ids ...uuid.UUID)
RemoveSecretIDs removes the "secrets" edge to the Secret entity by IDs.
func (*AccountMutation) RemoveThreadIDs ¶
func (m *AccountMutation) RemoveThreadIDs(ids ...int)
RemoveThreadIDs removes the "threads" edge to the Thread entity by IDs.
func (*AccountMutation) RemovedContactsIDs ¶
func (m *AccountMutation) RemovedContactsIDs() (ids []int)
RemovedContacts returns the removed IDs of the "contacts" edge to the Contact entity.
func (*AccountMutation) RemovedEdges ¶
func (m *AccountMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AccountMutation) RemovedIDs ¶
func (m *AccountMutation) 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 (*AccountMutation) RemovedNotifyRulesIDs ¶
func (m *AccountMutation) RemovedNotifyRulesIDs() (ids []int)
RemovedNotifyRules returns the removed IDs of the "notify_rules" edge to the NotifyRule entity.
func (*AccountMutation) RemovedPendingOpsIDs ¶
func (m *AccountMutation) RemovedPendingOpsIDs() (ids []int)
RemovedPendingOps returns the removed IDs of the "pending_ops" edge to the PendingOp entity.
func (*AccountMutation) RemovedSecretsIDs ¶
func (m *AccountMutation) RemovedSecretsIDs() (ids []uuid.UUID)
RemovedSecrets returns the removed IDs of the "secrets" edge to the Secret entity.
func (*AccountMutation) RemovedThreadsIDs ¶
func (m *AccountMutation) RemovedThreadsIDs() (ids []int)
RemovedThreads returns the removed IDs of the "threads" edge to the Thread entity.
func (*AccountMutation) ResetAuthError ¶
func (m *AccountMutation) ResetAuthError()
ResetAuthError resets all changes to the "auth_error" field.
func (*AccountMutation) ResetConfig ¶
func (m *AccountMutation) ResetConfig()
ResetConfig resets all changes to the "config" field.
func (*AccountMutation) ResetContacts ¶
func (m *AccountMutation) ResetContacts()
ResetContacts resets all changes to the "contacts" edge.
func (*AccountMutation) ResetCreatedAt ¶
func (m *AccountMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AccountMutation) ResetDisplayName ¶
func (m *AccountMutation) ResetDisplayName()
ResetDisplayName resets all changes to the "display_name" field.
func (*AccountMutation) ResetEdge ¶
func (m *AccountMutation) 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 (*AccountMutation) ResetEmail ¶
func (m *AccountMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*AccountMutation) ResetField ¶
func (m *AccountMutation) 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 (*AccountMutation) ResetLastError ¶
func (m *AccountMutation) ResetLastError()
ResetLastError resets all changes to the "last_error" field.
func (*AccountMutation) ResetLastSyncAt ¶
func (m *AccountMutation) ResetLastSyncAt()
ResetLastSyncAt resets all changes to the "last_sync_at" field.
func (*AccountMutation) ResetNeedsReauth ¶
func (m *AccountMutation) ResetNeedsReauth()
ResetNeedsReauth resets all changes to the "needs_reauth" field.
func (*AccountMutation) ResetNotifyRules ¶
func (m *AccountMutation) ResetNotifyRules()
ResetNotifyRules resets all changes to the "notify_rules" edge.
func (*AccountMutation) ResetPendingOps ¶
func (m *AccountMutation) ResetPendingOps()
ResetPendingOps resets all changes to the "pending_ops" edge.
func (*AccountMutation) ResetSecrets ¶
func (m *AccountMutation) ResetSecrets()
ResetSecrets resets all changes to the "secrets" edge.
func (*AccountMutation) ResetStatus ¶
func (m *AccountMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*AccountMutation) ResetSyncCursor ¶
func (m *AccountMutation) ResetSyncCursor()
ResetSyncCursor resets all changes to the "sync_cursor" field.
func (*AccountMutation) ResetSyncNotice ¶
func (m *AccountMutation) ResetSyncNotice()
ResetSyncNotice resets all changes to the "sync_notice" field.
func (*AccountMutation) ResetThreads ¶
func (m *AccountMutation) ResetThreads()
ResetThreads resets all changes to the "threads" edge.
func (*AccountMutation) ResetType ¶
func (m *AccountMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*AccountMutation) SecretsCleared ¶
func (m *AccountMutation) SecretsCleared() bool
SecretsCleared reports if the "secrets" edge to the Secret entity was cleared.
func (*AccountMutation) SecretsIDs ¶
func (m *AccountMutation) SecretsIDs() (ids []uuid.UUID)
SecretsIDs returns the "secrets" edge IDs in the mutation.
func (*AccountMutation) SetAuthError ¶
func (m *AccountMutation) SetAuthError(s string)
SetAuthError sets the "auth_error" field.
func (*AccountMutation) SetConfig ¶
func (m *AccountMutation) SetConfig(value map[string]interface{})
SetConfig sets the "config" field.
func (*AccountMutation) SetCreatedAt ¶
func (m *AccountMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AccountMutation) SetDisplayName ¶
func (m *AccountMutation) SetDisplayName(s string)
SetDisplayName sets the "display_name" field.
func (*AccountMutation) SetEmail ¶
func (m *AccountMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*AccountMutation) SetField ¶
func (m *AccountMutation) 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 (*AccountMutation) SetID ¶
func (m *AccountMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Account entities.
func (*AccountMutation) SetLastError ¶
func (m *AccountMutation) SetLastError(s string)
SetLastError sets the "last_error" field.
func (*AccountMutation) SetLastSyncAt ¶
func (m *AccountMutation) SetLastSyncAt(t time.Time)
SetLastSyncAt sets the "last_sync_at" field.
func (*AccountMutation) SetNeedsReauth ¶
func (m *AccountMutation) SetNeedsReauth(b bool)
SetNeedsReauth sets the "needs_reauth" field.
func (*AccountMutation) SetOp ¶
func (m *AccountMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AccountMutation) SetStatus ¶
func (m *AccountMutation) SetStatus(a account.Status)
SetStatus sets the "status" field.
func (*AccountMutation) SetSyncCursor ¶
func (m *AccountMutation) SetSyncCursor(s string)
SetSyncCursor sets the "sync_cursor" field.
func (*AccountMutation) SetSyncNotice ¶
func (m *AccountMutation) SetSyncNotice(s string)
SetSyncNotice sets the "sync_notice" field.
func (*AccountMutation) SetType ¶
func (m *AccountMutation) SetType(a account.Type)
SetType sets the "type" field.
func (*AccountMutation) Status ¶
func (m *AccountMutation) Status() (r account.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*AccountMutation) SyncCursor ¶
func (m *AccountMutation) SyncCursor() (r string, exists bool)
SyncCursor returns the value of the "sync_cursor" field in the mutation.
func (*AccountMutation) SyncNotice ¶
func (m *AccountMutation) SyncNotice() (r string, exists bool)
SyncNotice returns the value of the "sync_notice" field in the mutation.
func (*AccountMutation) SyncNoticeCleared ¶
func (m *AccountMutation) SyncNoticeCleared() bool
SyncNoticeCleared returns if the "sync_notice" field was cleared in this mutation.
func (*AccountMutation) ThreadsCleared ¶
func (m *AccountMutation) ThreadsCleared() bool
ThreadsCleared reports if the "threads" edge to the Thread entity was cleared.
func (*AccountMutation) ThreadsIDs ¶
func (m *AccountMutation) ThreadsIDs() (ids []int)
ThreadsIDs returns the "threads" edge IDs in the mutation.
func (AccountMutation) Tx ¶
func (m AccountMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AccountMutation) Type ¶
func (m *AccountMutation) Type() string
Type returns the node type of this mutation (Account).
func (*AccountMutation) Where ¶
func (m *AccountMutation) Where(ps ...predicate.Account)
Where appends a list predicates to the AccountMutation builder.
func (*AccountMutation) WhereP ¶
func (m *AccountMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AccountMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AccountQuery ¶
type AccountQuery struct {
// contains filtered or unexported fields
}
AccountQuery is the builder for querying Account entities.
func (*AccountQuery) Aggregate ¶
func (_q *AccountQuery) Aggregate(fns ...AggregateFunc) *AccountSelect
Aggregate returns a AccountSelect configured with the given aggregations.
func (*AccountQuery) All ¶
func (_q *AccountQuery) All(ctx context.Context) ([]*Account, error)
All executes the query and returns a list of Accounts.
func (*AccountQuery) AllX ¶
func (_q *AccountQuery) AllX(ctx context.Context) []*Account
AllX is like All, but panics if an error occurs.
func (*AccountQuery) Clone ¶
func (_q *AccountQuery) Clone() *AccountQuery
Clone returns a duplicate of the AccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AccountQuery) Count ¶
func (_q *AccountQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AccountQuery) CountX ¶
func (_q *AccountQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AccountQuery) ExecContext ¶
func (c *AccountQuery) 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 (*AccountQuery) Exist ¶
func (_q *AccountQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AccountQuery) ExistX ¶
func (_q *AccountQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AccountQuery) First ¶
func (_q *AccountQuery) First(ctx context.Context) (*Account, error)
First returns the first Account entity from the query. Returns a *NotFoundError when no Account was found.
func (*AccountQuery) FirstID ¶
FirstID returns the first Account ID from the query. Returns a *NotFoundError when no Account ID was found.
func (*AccountQuery) FirstIDX ¶
func (_q *AccountQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AccountQuery) FirstX ¶
func (_q *AccountQuery) FirstX(ctx context.Context) *Account
FirstX is like First, but panics if an error occurs.
func (*AccountQuery) GroupBy ¶
func (_q *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy
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 {
Type account.Type `json:"type,omitempty"`
Count int `json:"count,omitempty"`
}
client.Account.Query().
GroupBy(account.FieldType).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*AccountQuery) IDsX ¶
func (_q *AccountQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AccountQuery) Limit ¶
func (_q *AccountQuery) Limit(limit int) *AccountQuery
Limit the number of records to be returned by this query.
func (*AccountQuery) Modify ¶
func (_q *AccountQuery) Modify(modifiers ...func(s *sql.Selector)) *AccountSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*AccountQuery) Offset ¶
func (_q *AccountQuery) Offset(offset int) *AccountQuery
Offset to start from.
func (*AccountQuery) Only ¶
func (_q *AccountQuery) Only(ctx context.Context) (*Account, error)
Only returns a single Account entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Account entity is found. Returns a *NotFoundError when no Account entities are found.
func (*AccountQuery) OnlyID ¶
OnlyID is like Only, but returns the only Account ID in the query. Returns a *NotSingularError when more than one Account ID is found. Returns a *NotFoundError when no entities are found.
func (*AccountQuery) OnlyIDX ¶
func (_q *AccountQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AccountQuery) OnlyX ¶
func (_q *AccountQuery) OnlyX(ctx context.Context) *Account
OnlyX is like Only, but panics if an error occurs.
func (*AccountQuery) Order ¶
func (_q *AccountQuery) Order(o ...account.OrderOption) *AccountQuery
Order specifies how the records should be ordered.
func (*AccountQuery) QueryContacts ¶
func (_q *AccountQuery) QueryContacts() *ContactQuery
QueryContacts chains the current query on the "contacts" edge.
func (*AccountQuery) QueryContext ¶
func (c *AccountQuery) 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 (*AccountQuery) QueryNotifyRules ¶
func (_q *AccountQuery) QueryNotifyRules() *NotifyRuleQuery
QueryNotifyRules chains the current query on the "notify_rules" edge.
func (*AccountQuery) QueryPendingOps ¶
func (_q *AccountQuery) QueryPendingOps() *PendingOpQuery
QueryPendingOps chains the current query on the "pending_ops" edge.
func (*AccountQuery) QuerySecrets ¶
func (_q *AccountQuery) QuerySecrets() *SecretQuery
QuerySecrets chains the current query on the "secrets" edge.
func (*AccountQuery) QueryThreads ¶
func (_q *AccountQuery) QueryThreads() *ThreadQuery
QueryThreads chains the current query on the "threads" edge.
func (*AccountQuery) Select ¶
func (_q *AccountQuery) Select(fields ...string) *AccountSelect
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 {
Type account.Type `json:"type,omitempty"`
}
client.Account.Query().
Select(account.FieldType).
Scan(ctx, &v)
func (*AccountQuery) Unique ¶
func (_q *AccountQuery) Unique(unique bool) *AccountQuery
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 (*AccountQuery) Where ¶
func (_q *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
Where adds a new predicate for the AccountQuery builder.
func (*AccountQuery) WithContacts ¶
func (_q *AccountQuery) WithContacts(opts ...func(*ContactQuery)) *AccountQuery
WithContacts tells the query-builder to eager-load the nodes that are connected to the "contacts" edge. The optional arguments are used to configure the query builder of the edge.
func (*AccountQuery) WithNotifyRules ¶
func (_q *AccountQuery) WithNotifyRules(opts ...func(*NotifyRuleQuery)) *AccountQuery
WithNotifyRules tells the query-builder to eager-load the nodes that are connected to the "notify_rules" edge. The optional arguments are used to configure the query builder of the edge.
func (*AccountQuery) WithPendingOps ¶
func (_q *AccountQuery) WithPendingOps(opts ...func(*PendingOpQuery)) *AccountQuery
WithPendingOps tells the query-builder to eager-load the nodes that are connected to the "pending_ops" edge. The optional arguments are used to configure the query builder of the edge.
func (*AccountQuery) WithSecrets ¶
func (_q *AccountQuery) WithSecrets(opts ...func(*SecretQuery)) *AccountQuery
WithSecrets tells the query-builder to eager-load the nodes that are connected to the "secrets" edge. The optional arguments are used to configure the query builder of the edge.
func (*AccountQuery) WithThreads ¶
func (_q *AccountQuery) WithThreads(opts ...func(*ThreadQuery)) *AccountQuery
WithThreads tells the query-builder to eager-load the nodes that are connected to the "threads" edge. The optional arguments are used to configure the query builder of the edge.
type AccountSelect ¶
type AccountSelect struct {
*AccountQuery
// contains filtered or unexported fields
}
AccountSelect is the builder for selecting fields of Account entities.
func (*AccountSelect) Aggregate ¶
func (_s *AccountSelect) Aggregate(fns ...AggregateFunc) *AccountSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AccountSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (AccountSelect) ExecContext ¶
func (c AccountSelect) 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 (*AccountSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Modify ¶
func (_s *AccountSelect) Modify(modifiers ...func(s *sql.Selector)) *AccountSelect
Modify adds a query modifier for attaching custom logic to queries.
func (AccountSelect) QueryContext ¶
func (c AccountSelect) 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 (*AccountSelect) Scan ¶
func (_s *AccountSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccountSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccountUpdate ¶
type AccountUpdate struct {
// contains filtered or unexported fields
}
AccountUpdate is the builder for updating Account entities.
func (*AccountUpdate) AddContactIDs ¶
func (_u *AccountUpdate) AddContactIDs(ids ...int) *AccountUpdate
AddContactIDs adds the "contacts" edge to the Contact entity by IDs.
func (*AccountUpdate) AddContacts ¶
func (_u *AccountUpdate) AddContacts(v ...*Contact) *AccountUpdate
AddContacts adds the "contacts" edges to the Contact entity.
func (*AccountUpdate) AddNotifyRuleIDs ¶
func (_u *AccountUpdate) AddNotifyRuleIDs(ids ...int) *AccountUpdate
AddNotifyRuleIDs adds the "notify_rules" edge to the NotifyRule entity by IDs.
func (*AccountUpdate) AddNotifyRules ¶
func (_u *AccountUpdate) AddNotifyRules(v ...*NotifyRule) *AccountUpdate
AddNotifyRules adds the "notify_rules" edges to the NotifyRule entity.
func (*AccountUpdate) AddPendingOpIDs ¶
func (_u *AccountUpdate) AddPendingOpIDs(ids ...int) *AccountUpdate
AddPendingOpIDs adds the "pending_ops" edge to the PendingOp entity by IDs.
func (*AccountUpdate) AddPendingOps ¶
func (_u *AccountUpdate) AddPendingOps(v ...*PendingOp) *AccountUpdate
AddPendingOps adds the "pending_ops" edges to the PendingOp entity.
func (*AccountUpdate) AddSecretIDs ¶
func (_u *AccountUpdate) AddSecretIDs(ids ...uuid.UUID) *AccountUpdate
AddSecretIDs adds the "secrets" edge to the Secret entity by IDs.
func (*AccountUpdate) AddSecrets ¶
func (_u *AccountUpdate) AddSecrets(v ...*Secret) *AccountUpdate
AddSecrets adds the "secrets" edges to the Secret entity.
func (*AccountUpdate) AddThreadIDs ¶
func (_u *AccountUpdate) AddThreadIDs(ids ...int) *AccountUpdate
AddThreadIDs adds the "threads" edge to the Thread entity by IDs.
func (*AccountUpdate) AddThreads ¶
func (_u *AccountUpdate) AddThreads(v ...*Thread) *AccountUpdate
AddThreads adds the "threads" edges to the Thread entity.
func (*AccountUpdate) ClearAuthError ¶
func (_u *AccountUpdate) ClearAuthError() *AccountUpdate
ClearAuthError clears the value of the "auth_error" field.
func (*AccountUpdate) ClearContacts ¶
func (_u *AccountUpdate) ClearContacts() *AccountUpdate
ClearContacts clears all "contacts" edges to the Contact entity.
func (*AccountUpdate) ClearLastSyncAt ¶
func (_u *AccountUpdate) ClearLastSyncAt() *AccountUpdate
ClearLastSyncAt clears the value of the "last_sync_at" field.
func (*AccountUpdate) ClearNotifyRules ¶
func (_u *AccountUpdate) ClearNotifyRules() *AccountUpdate
ClearNotifyRules clears all "notify_rules" edges to the NotifyRule entity.
func (*AccountUpdate) ClearPendingOps ¶
func (_u *AccountUpdate) ClearPendingOps() *AccountUpdate
ClearPendingOps clears all "pending_ops" edges to the PendingOp entity.
func (*AccountUpdate) ClearSecrets ¶
func (_u *AccountUpdate) ClearSecrets() *AccountUpdate
ClearSecrets clears all "secrets" edges to the Secret entity.
func (*AccountUpdate) ClearSyncNotice ¶
func (_u *AccountUpdate) ClearSyncNotice() *AccountUpdate
ClearSyncNotice clears the value of the "sync_notice" field.
func (*AccountUpdate) ClearThreads ¶
func (_u *AccountUpdate) ClearThreads() *AccountUpdate
ClearThreads clears all "threads" edges to the Thread entity.
func (*AccountUpdate) Exec ¶
func (_u *AccountUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUpdate) ExecContext ¶
func (c *AccountUpdate) 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 (*AccountUpdate) ExecX ¶
func (_u *AccountUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpdate) Modify ¶
func (_u *AccountUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*AccountUpdate) Mutation ¶
func (_u *AccountUpdate) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountUpdate) QueryContext ¶
func (c *AccountUpdate) 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 (*AccountUpdate) RemoveContactIDs ¶
func (_u *AccountUpdate) RemoveContactIDs(ids ...int) *AccountUpdate
RemoveContactIDs removes the "contacts" edge to Contact entities by IDs.
func (*AccountUpdate) RemoveContacts ¶
func (_u *AccountUpdate) RemoveContacts(v ...*Contact) *AccountUpdate
RemoveContacts removes "contacts" edges to Contact entities.
func (*AccountUpdate) RemoveNotifyRuleIDs ¶
func (_u *AccountUpdate) RemoveNotifyRuleIDs(ids ...int) *AccountUpdate
RemoveNotifyRuleIDs removes the "notify_rules" edge to NotifyRule entities by IDs.
func (*AccountUpdate) RemoveNotifyRules ¶
func (_u *AccountUpdate) RemoveNotifyRules(v ...*NotifyRule) *AccountUpdate
RemoveNotifyRules removes "notify_rules" edges to NotifyRule entities.
func (*AccountUpdate) RemovePendingOpIDs ¶
func (_u *AccountUpdate) RemovePendingOpIDs(ids ...int) *AccountUpdate
RemovePendingOpIDs removes the "pending_ops" edge to PendingOp entities by IDs.
func (*AccountUpdate) RemovePendingOps ¶
func (_u *AccountUpdate) RemovePendingOps(v ...*PendingOp) *AccountUpdate
RemovePendingOps removes "pending_ops" edges to PendingOp entities.
func (*AccountUpdate) RemoveSecretIDs ¶
func (_u *AccountUpdate) RemoveSecretIDs(ids ...uuid.UUID) *AccountUpdate
RemoveSecretIDs removes the "secrets" edge to Secret entities by IDs.
func (*AccountUpdate) RemoveSecrets ¶
func (_u *AccountUpdate) RemoveSecrets(v ...*Secret) *AccountUpdate
RemoveSecrets removes "secrets" edges to Secret entities.
func (*AccountUpdate) RemoveThreadIDs ¶
func (_u *AccountUpdate) RemoveThreadIDs(ids ...int) *AccountUpdate
RemoveThreadIDs removes the "threads" edge to Thread entities by IDs.
func (*AccountUpdate) RemoveThreads ¶
func (_u *AccountUpdate) RemoveThreads(v ...*Thread) *AccountUpdate
RemoveThreads removes "threads" edges to Thread entities.
func (*AccountUpdate) Save ¶
func (_u *AccountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AccountUpdate) SaveX ¶
func (_u *AccountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdate) SetAuthError ¶
func (_u *AccountUpdate) SetAuthError(v string) *AccountUpdate
SetAuthError sets the "auth_error" field.
func (*AccountUpdate) SetConfig ¶
func (_u *AccountUpdate) SetConfig(v map[string]interface{}) *AccountUpdate
SetConfig sets the "config" field.
func (*AccountUpdate) SetDisplayName ¶
func (_u *AccountUpdate) SetDisplayName(v string) *AccountUpdate
SetDisplayName sets the "display_name" field.
func (*AccountUpdate) SetEmail ¶
func (_u *AccountUpdate) SetEmail(v string) *AccountUpdate
SetEmail sets the "email" field.
func (*AccountUpdate) SetLastError ¶
func (_u *AccountUpdate) SetLastError(v string) *AccountUpdate
SetLastError sets the "last_error" field.
func (*AccountUpdate) SetLastSyncAt ¶
func (_u *AccountUpdate) SetLastSyncAt(v time.Time) *AccountUpdate
SetLastSyncAt sets the "last_sync_at" field.
func (*AccountUpdate) SetNeedsReauth ¶
func (_u *AccountUpdate) SetNeedsReauth(v bool) *AccountUpdate
SetNeedsReauth sets the "needs_reauth" field.
func (*AccountUpdate) SetNillableAuthError ¶
func (_u *AccountUpdate) SetNillableAuthError(v *string) *AccountUpdate
SetNillableAuthError sets the "auth_error" field if the given value is not nil.
func (*AccountUpdate) SetNillableDisplayName ¶
func (_u *AccountUpdate) SetNillableDisplayName(v *string) *AccountUpdate
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*AccountUpdate) SetNillableEmail ¶
func (_u *AccountUpdate) SetNillableEmail(v *string) *AccountUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*AccountUpdate) SetNillableLastError ¶
func (_u *AccountUpdate) SetNillableLastError(v *string) *AccountUpdate
SetNillableLastError sets the "last_error" field if the given value is not nil.
func (*AccountUpdate) SetNillableLastSyncAt ¶
func (_u *AccountUpdate) SetNillableLastSyncAt(v *time.Time) *AccountUpdate
SetNillableLastSyncAt sets the "last_sync_at" field if the given value is not nil.
func (*AccountUpdate) SetNillableNeedsReauth ¶
func (_u *AccountUpdate) SetNillableNeedsReauth(v *bool) *AccountUpdate
SetNillableNeedsReauth sets the "needs_reauth" field if the given value is not nil.
func (*AccountUpdate) SetNillableStatus ¶
func (_u *AccountUpdate) SetNillableStatus(v *account.Status) *AccountUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*AccountUpdate) SetNillableSyncCursor ¶
func (_u *AccountUpdate) SetNillableSyncCursor(v *string) *AccountUpdate
SetNillableSyncCursor sets the "sync_cursor" field if the given value is not nil.
func (*AccountUpdate) SetNillableSyncNotice ¶
func (_u *AccountUpdate) SetNillableSyncNotice(v *string) *AccountUpdate
SetNillableSyncNotice sets the "sync_notice" field if the given value is not nil.
func (*AccountUpdate) SetNillableType ¶
func (_u *AccountUpdate) SetNillableType(v *account.Type) *AccountUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*AccountUpdate) SetStatus ¶
func (_u *AccountUpdate) SetStatus(v account.Status) *AccountUpdate
SetStatus sets the "status" field.
func (*AccountUpdate) SetSyncCursor ¶
func (_u *AccountUpdate) SetSyncCursor(v string) *AccountUpdate
SetSyncCursor sets the "sync_cursor" field.
func (*AccountUpdate) SetSyncNotice ¶
func (_u *AccountUpdate) SetSyncNotice(v string) *AccountUpdate
SetSyncNotice sets the "sync_notice" field.
func (*AccountUpdate) SetType ¶
func (_u *AccountUpdate) SetType(v account.Type) *AccountUpdate
SetType sets the "type" field.
func (*AccountUpdate) Where ¶
func (_u *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
Where appends a list predicates to the AccountUpdate builder.
type AccountUpdateOne ¶
type AccountUpdateOne struct {
// contains filtered or unexported fields
}
AccountUpdateOne is the builder for updating a single Account entity.
func (*AccountUpdateOne) AddContactIDs ¶
func (_u *AccountUpdateOne) AddContactIDs(ids ...int) *AccountUpdateOne
AddContactIDs adds the "contacts" edge to the Contact entity by IDs.
func (*AccountUpdateOne) AddContacts ¶
func (_u *AccountUpdateOne) AddContacts(v ...*Contact) *AccountUpdateOne
AddContacts adds the "contacts" edges to the Contact entity.
func (*AccountUpdateOne) AddNotifyRuleIDs ¶
func (_u *AccountUpdateOne) AddNotifyRuleIDs(ids ...int) *AccountUpdateOne
AddNotifyRuleIDs adds the "notify_rules" edge to the NotifyRule entity by IDs.
func (*AccountUpdateOne) AddNotifyRules ¶
func (_u *AccountUpdateOne) AddNotifyRules(v ...*NotifyRule) *AccountUpdateOne
AddNotifyRules adds the "notify_rules" edges to the NotifyRule entity.
func (*AccountUpdateOne) AddPendingOpIDs ¶
func (_u *AccountUpdateOne) AddPendingOpIDs(ids ...int) *AccountUpdateOne
AddPendingOpIDs adds the "pending_ops" edge to the PendingOp entity by IDs.
func (*AccountUpdateOne) AddPendingOps ¶
func (_u *AccountUpdateOne) AddPendingOps(v ...*PendingOp) *AccountUpdateOne
AddPendingOps adds the "pending_ops" edges to the PendingOp entity.
func (*AccountUpdateOne) AddSecretIDs ¶
func (_u *AccountUpdateOne) AddSecretIDs(ids ...uuid.UUID) *AccountUpdateOne
AddSecretIDs adds the "secrets" edge to the Secret entity by IDs.
func (*AccountUpdateOne) AddSecrets ¶
func (_u *AccountUpdateOne) AddSecrets(v ...*Secret) *AccountUpdateOne
AddSecrets adds the "secrets" edges to the Secret entity.
func (*AccountUpdateOne) AddThreadIDs ¶
func (_u *AccountUpdateOne) AddThreadIDs(ids ...int) *AccountUpdateOne
AddThreadIDs adds the "threads" edge to the Thread entity by IDs.
func (*AccountUpdateOne) AddThreads ¶
func (_u *AccountUpdateOne) AddThreads(v ...*Thread) *AccountUpdateOne
AddThreads adds the "threads" edges to the Thread entity.
func (*AccountUpdateOne) ClearAuthError ¶
func (_u *AccountUpdateOne) ClearAuthError() *AccountUpdateOne
ClearAuthError clears the value of the "auth_error" field.
func (*AccountUpdateOne) ClearContacts ¶
func (_u *AccountUpdateOne) ClearContacts() *AccountUpdateOne
ClearContacts clears all "contacts" edges to the Contact entity.
func (*AccountUpdateOne) ClearLastSyncAt ¶
func (_u *AccountUpdateOne) ClearLastSyncAt() *AccountUpdateOne
ClearLastSyncAt clears the value of the "last_sync_at" field.
func (*AccountUpdateOne) ClearNotifyRules ¶
func (_u *AccountUpdateOne) ClearNotifyRules() *AccountUpdateOne
ClearNotifyRules clears all "notify_rules" edges to the NotifyRule entity.
func (*AccountUpdateOne) ClearPendingOps ¶
func (_u *AccountUpdateOne) ClearPendingOps() *AccountUpdateOne
ClearPendingOps clears all "pending_ops" edges to the PendingOp entity.
func (*AccountUpdateOne) ClearSecrets ¶
func (_u *AccountUpdateOne) ClearSecrets() *AccountUpdateOne
ClearSecrets clears all "secrets" edges to the Secret entity.
func (*AccountUpdateOne) ClearSyncNotice ¶
func (_u *AccountUpdateOne) ClearSyncNotice() *AccountUpdateOne
ClearSyncNotice clears the value of the "sync_notice" field.
func (*AccountUpdateOne) ClearThreads ¶
func (_u *AccountUpdateOne) ClearThreads() *AccountUpdateOne
ClearThreads clears all "threads" edges to the Thread entity.
func (*AccountUpdateOne) Exec ¶
func (_u *AccountUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AccountUpdateOne) ExecContext ¶
func (c *AccountUpdateOne) 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 (*AccountUpdateOne) ExecX ¶
func (_u *AccountUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpdateOne) Modify ¶
func (_u *AccountUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*AccountUpdateOne) Mutation ¶
func (_u *AccountUpdateOne) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountUpdateOne) QueryContext ¶
func (c *AccountUpdateOne) 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 (*AccountUpdateOne) RemoveContactIDs ¶
func (_u *AccountUpdateOne) RemoveContactIDs(ids ...int) *AccountUpdateOne
RemoveContactIDs removes the "contacts" edge to Contact entities by IDs.
func (*AccountUpdateOne) RemoveContacts ¶
func (_u *AccountUpdateOne) RemoveContacts(v ...*Contact) *AccountUpdateOne
RemoveContacts removes "contacts" edges to Contact entities.
func (*AccountUpdateOne) RemoveNotifyRuleIDs ¶
func (_u *AccountUpdateOne) RemoveNotifyRuleIDs(ids ...int) *AccountUpdateOne
RemoveNotifyRuleIDs removes the "notify_rules" edge to NotifyRule entities by IDs.
func (*AccountUpdateOne) RemoveNotifyRules ¶
func (_u *AccountUpdateOne) RemoveNotifyRules(v ...*NotifyRule) *AccountUpdateOne
RemoveNotifyRules removes "notify_rules" edges to NotifyRule entities.
func (*AccountUpdateOne) RemovePendingOpIDs ¶
func (_u *AccountUpdateOne) RemovePendingOpIDs(ids ...int) *AccountUpdateOne
RemovePendingOpIDs removes the "pending_ops" edge to PendingOp entities by IDs.
func (*AccountUpdateOne) RemovePendingOps ¶
func (_u *AccountUpdateOne) RemovePendingOps(v ...*PendingOp) *AccountUpdateOne
RemovePendingOps removes "pending_ops" edges to PendingOp entities.
func (*AccountUpdateOne) RemoveSecretIDs ¶
func (_u *AccountUpdateOne) RemoveSecretIDs(ids ...uuid.UUID) *AccountUpdateOne
RemoveSecretIDs removes the "secrets" edge to Secret entities by IDs.
func (*AccountUpdateOne) RemoveSecrets ¶
func (_u *AccountUpdateOne) RemoveSecrets(v ...*Secret) *AccountUpdateOne
RemoveSecrets removes "secrets" edges to Secret entities.
func (*AccountUpdateOne) RemoveThreadIDs ¶
func (_u *AccountUpdateOne) RemoveThreadIDs(ids ...int) *AccountUpdateOne
RemoveThreadIDs removes the "threads" edge to Thread entities by IDs.
func (*AccountUpdateOne) RemoveThreads ¶
func (_u *AccountUpdateOne) RemoveThreads(v ...*Thread) *AccountUpdateOne
RemoveThreads removes "threads" edges to Thread entities.
func (*AccountUpdateOne) Save ¶
func (_u *AccountUpdateOne) Save(ctx context.Context) (*Account, error)
Save executes the query and returns the updated Account entity.
func (*AccountUpdateOne) SaveX ¶
func (_u *AccountUpdateOne) SaveX(ctx context.Context) *Account
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdateOne) Select ¶
func (_u *AccountUpdateOne) Select(field string, fields ...string) *AccountUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AccountUpdateOne) SetAuthError ¶
func (_u *AccountUpdateOne) SetAuthError(v string) *AccountUpdateOne
SetAuthError sets the "auth_error" field.
func (*AccountUpdateOne) SetConfig ¶
func (_u *AccountUpdateOne) SetConfig(v map[string]interface{}) *AccountUpdateOne
SetConfig sets the "config" field.
func (*AccountUpdateOne) SetDisplayName ¶
func (_u *AccountUpdateOne) SetDisplayName(v string) *AccountUpdateOne
SetDisplayName sets the "display_name" field.
func (*AccountUpdateOne) SetEmail ¶
func (_u *AccountUpdateOne) SetEmail(v string) *AccountUpdateOne
SetEmail sets the "email" field.
func (*AccountUpdateOne) SetLastError ¶
func (_u *AccountUpdateOne) SetLastError(v string) *AccountUpdateOne
SetLastError sets the "last_error" field.
func (*AccountUpdateOne) SetLastSyncAt ¶
func (_u *AccountUpdateOne) SetLastSyncAt(v time.Time) *AccountUpdateOne
SetLastSyncAt sets the "last_sync_at" field.
func (*AccountUpdateOne) SetNeedsReauth ¶
func (_u *AccountUpdateOne) SetNeedsReauth(v bool) *AccountUpdateOne
SetNeedsReauth sets the "needs_reauth" field.
func (*AccountUpdateOne) SetNillableAuthError ¶
func (_u *AccountUpdateOne) SetNillableAuthError(v *string) *AccountUpdateOne
SetNillableAuthError sets the "auth_error" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableDisplayName ¶
func (_u *AccountUpdateOne) SetNillableDisplayName(v *string) *AccountUpdateOne
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableEmail ¶
func (_u *AccountUpdateOne) SetNillableEmail(v *string) *AccountUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableLastError ¶
func (_u *AccountUpdateOne) SetNillableLastError(v *string) *AccountUpdateOne
SetNillableLastError sets the "last_error" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableLastSyncAt ¶
func (_u *AccountUpdateOne) SetNillableLastSyncAt(v *time.Time) *AccountUpdateOne
SetNillableLastSyncAt sets the "last_sync_at" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableNeedsReauth ¶
func (_u *AccountUpdateOne) SetNillableNeedsReauth(v *bool) *AccountUpdateOne
SetNillableNeedsReauth sets the "needs_reauth" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableStatus ¶
func (_u *AccountUpdateOne) SetNillableStatus(v *account.Status) *AccountUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableSyncCursor ¶
func (_u *AccountUpdateOne) SetNillableSyncCursor(v *string) *AccountUpdateOne
SetNillableSyncCursor sets the "sync_cursor" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableSyncNotice ¶
func (_u *AccountUpdateOne) SetNillableSyncNotice(v *string) *AccountUpdateOne
SetNillableSyncNotice sets the "sync_notice" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableType ¶
func (_u *AccountUpdateOne) SetNillableType(v *account.Type) *AccountUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*AccountUpdateOne) SetStatus ¶
func (_u *AccountUpdateOne) SetStatus(v account.Status) *AccountUpdateOne
SetStatus sets the "status" field.
func (*AccountUpdateOne) SetSyncCursor ¶
func (_u *AccountUpdateOne) SetSyncCursor(v string) *AccountUpdateOne
SetSyncCursor sets the "sync_cursor" field.
func (*AccountUpdateOne) SetSyncNotice ¶
func (_u *AccountUpdateOne) SetSyncNotice(v string) *AccountUpdateOne
SetSyncNotice sets the "sync_notice" field.
func (*AccountUpdateOne) SetType ¶
func (_u *AccountUpdateOne) SetType(v account.Type) *AccountUpdateOne
SetType sets the "type" field.
func (*AccountUpdateOne) Where ¶
func (_u *AccountUpdateOne) Where(ps ...predicate.Account) *AccountUpdateOne
Where appends a list predicates to the AccountUpdate builder.
type AccountUpsert ¶
AccountUpsert is the "OnConflict" setter.
func (*AccountUpsert) ClearAuthError ¶
func (u *AccountUpsert) ClearAuthError() *AccountUpsert
ClearAuthError clears the value of the "auth_error" field.
func (*AccountUpsert) ClearLastSyncAt ¶
func (u *AccountUpsert) ClearLastSyncAt() *AccountUpsert
ClearLastSyncAt clears the value of the "last_sync_at" field.
func (*AccountUpsert) ClearSyncNotice ¶
func (u *AccountUpsert) ClearSyncNotice() *AccountUpsert
ClearSyncNotice clears the value of the "sync_notice" field.
func (*AccountUpsert) SetAuthError ¶
func (u *AccountUpsert) SetAuthError(v string) *AccountUpsert
SetAuthError sets the "auth_error" field.
func (*AccountUpsert) SetConfig ¶
func (u *AccountUpsert) SetConfig(v map[string]interface{}) *AccountUpsert
SetConfig sets the "config" field.
func (*AccountUpsert) SetDisplayName ¶
func (u *AccountUpsert) SetDisplayName(v string) *AccountUpsert
SetDisplayName sets the "display_name" field.
func (*AccountUpsert) SetEmail ¶
func (u *AccountUpsert) SetEmail(v string) *AccountUpsert
SetEmail sets the "email" field.
func (*AccountUpsert) SetLastError ¶
func (u *AccountUpsert) SetLastError(v string) *AccountUpsert
SetLastError sets the "last_error" field.
func (*AccountUpsert) SetLastSyncAt ¶
func (u *AccountUpsert) SetLastSyncAt(v time.Time) *AccountUpsert
SetLastSyncAt sets the "last_sync_at" field.
func (*AccountUpsert) SetNeedsReauth ¶
func (u *AccountUpsert) SetNeedsReauth(v bool) *AccountUpsert
SetNeedsReauth sets the "needs_reauth" field.
func (*AccountUpsert) SetStatus ¶
func (u *AccountUpsert) SetStatus(v account.Status) *AccountUpsert
SetStatus sets the "status" field.
func (*AccountUpsert) SetSyncCursor ¶
func (u *AccountUpsert) SetSyncCursor(v string) *AccountUpsert
SetSyncCursor sets the "sync_cursor" field.
func (*AccountUpsert) SetSyncNotice ¶
func (u *AccountUpsert) SetSyncNotice(v string) *AccountUpsert
SetSyncNotice sets the "sync_notice" field.
func (*AccountUpsert) SetType ¶
func (u *AccountUpsert) SetType(v account.Type) *AccountUpsert
SetType sets the "type" field.
func (*AccountUpsert) UpdateAuthError ¶
func (u *AccountUpsert) UpdateAuthError() *AccountUpsert
UpdateAuthError sets the "auth_error" field to the value that was provided on create.
func (*AccountUpsert) UpdateConfig ¶
func (u *AccountUpsert) UpdateConfig() *AccountUpsert
UpdateConfig sets the "config" field to the value that was provided on create.
func (*AccountUpsert) UpdateDisplayName ¶
func (u *AccountUpsert) UpdateDisplayName() *AccountUpsert
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*AccountUpsert) UpdateEmail ¶
func (u *AccountUpsert) UpdateEmail() *AccountUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AccountUpsert) UpdateLastError ¶
func (u *AccountUpsert) UpdateLastError() *AccountUpsert
UpdateLastError sets the "last_error" field to the value that was provided on create.
func (*AccountUpsert) UpdateLastSyncAt ¶
func (u *AccountUpsert) UpdateLastSyncAt() *AccountUpsert
UpdateLastSyncAt sets the "last_sync_at" field to the value that was provided on create.
func (*AccountUpsert) UpdateNeedsReauth ¶
func (u *AccountUpsert) UpdateNeedsReauth() *AccountUpsert
UpdateNeedsReauth sets the "needs_reauth" field to the value that was provided on create.
func (*AccountUpsert) UpdateStatus ¶
func (u *AccountUpsert) UpdateStatus() *AccountUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*AccountUpsert) UpdateSyncCursor ¶
func (u *AccountUpsert) UpdateSyncCursor() *AccountUpsert
UpdateSyncCursor sets the "sync_cursor" field to the value that was provided on create.
func (*AccountUpsert) UpdateSyncNotice ¶
func (u *AccountUpsert) UpdateSyncNotice() *AccountUpsert
UpdateSyncNotice sets the "sync_notice" field to the value that was provided on create.
func (*AccountUpsert) UpdateType ¶
func (u *AccountUpsert) UpdateType() *AccountUpsert
UpdateType sets the "type" field to the value that was provided on create.
type AccountUpsertBulk ¶
type AccountUpsertBulk struct {
// contains filtered or unexported fields
}
AccountUpsertBulk is the builder for "upsert"-ing a bulk of Account nodes.
func (*AccountUpsertBulk) ClearAuthError ¶
func (u *AccountUpsertBulk) ClearAuthError() *AccountUpsertBulk
ClearAuthError clears the value of the "auth_error" field.
func (*AccountUpsertBulk) ClearLastSyncAt ¶
func (u *AccountUpsertBulk) ClearLastSyncAt() *AccountUpsertBulk
ClearLastSyncAt clears the value of the "last_sync_at" field.
func (*AccountUpsertBulk) ClearSyncNotice ¶
func (u *AccountUpsertBulk) ClearSyncNotice() *AccountUpsertBulk
ClearSyncNotice clears the value of the "sync_notice" field.
func (*AccountUpsertBulk) DoNothing ¶
func (u *AccountUpsertBulk) DoNothing() *AccountUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AccountUpsertBulk) Exec ¶
func (u *AccountUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUpsertBulk) ExecX ¶
func (u *AccountUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpsertBulk) Ignore ¶
func (u *AccountUpsertBulk) Ignore() *AccountUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Account.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AccountUpsertBulk) SetAuthError ¶
func (u *AccountUpsertBulk) SetAuthError(v string) *AccountUpsertBulk
SetAuthError sets the "auth_error" field.
func (*AccountUpsertBulk) SetConfig ¶
func (u *AccountUpsertBulk) SetConfig(v map[string]interface{}) *AccountUpsertBulk
SetConfig sets the "config" field.
func (*AccountUpsertBulk) SetDisplayName ¶
func (u *AccountUpsertBulk) SetDisplayName(v string) *AccountUpsertBulk
SetDisplayName sets the "display_name" field.
func (*AccountUpsertBulk) SetEmail ¶
func (u *AccountUpsertBulk) SetEmail(v string) *AccountUpsertBulk
SetEmail sets the "email" field.
func (*AccountUpsertBulk) SetLastError ¶
func (u *AccountUpsertBulk) SetLastError(v string) *AccountUpsertBulk
SetLastError sets the "last_error" field.
func (*AccountUpsertBulk) SetLastSyncAt ¶
func (u *AccountUpsertBulk) SetLastSyncAt(v time.Time) *AccountUpsertBulk
SetLastSyncAt sets the "last_sync_at" field.
func (*AccountUpsertBulk) SetNeedsReauth ¶
func (u *AccountUpsertBulk) SetNeedsReauth(v bool) *AccountUpsertBulk
SetNeedsReauth sets the "needs_reauth" field.
func (*AccountUpsertBulk) SetStatus ¶
func (u *AccountUpsertBulk) SetStatus(v account.Status) *AccountUpsertBulk
SetStatus sets the "status" field.
func (*AccountUpsertBulk) SetSyncCursor ¶
func (u *AccountUpsertBulk) SetSyncCursor(v string) *AccountUpsertBulk
SetSyncCursor sets the "sync_cursor" field.
func (*AccountUpsertBulk) SetSyncNotice ¶
func (u *AccountUpsertBulk) SetSyncNotice(v string) *AccountUpsertBulk
SetSyncNotice sets the "sync_notice" field.
func (*AccountUpsertBulk) SetType ¶
func (u *AccountUpsertBulk) SetType(v account.Type) *AccountUpsertBulk
SetType sets the "type" field.
func (*AccountUpsertBulk) Update ¶
func (u *AccountUpsertBulk) Update(set func(*AccountUpsert)) *AccountUpsertBulk
Update allows overriding fields `UPDATE` values. See the AccountCreateBulk.OnConflict documentation for more info.
func (*AccountUpsertBulk) UpdateAuthError ¶
func (u *AccountUpsertBulk) UpdateAuthError() *AccountUpsertBulk
UpdateAuthError sets the "auth_error" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateConfig ¶
func (u *AccountUpsertBulk) UpdateConfig() *AccountUpsertBulk
UpdateConfig sets the "config" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateDisplayName ¶
func (u *AccountUpsertBulk) UpdateDisplayName() *AccountUpsertBulk
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateEmail ¶
func (u *AccountUpsertBulk) UpdateEmail() *AccountUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateLastError ¶
func (u *AccountUpsertBulk) UpdateLastError() *AccountUpsertBulk
UpdateLastError sets the "last_error" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateLastSyncAt ¶
func (u *AccountUpsertBulk) UpdateLastSyncAt() *AccountUpsertBulk
UpdateLastSyncAt sets the "last_sync_at" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateNeedsReauth ¶
func (u *AccountUpsertBulk) UpdateNeedsReauth() *AccountUpsertBulk
UpdateNeedsReauth sets the "needs_reauth" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateNewValues ¶
func (u *AccountUpsertBulk) UpdateNewValues() *AccountUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Account.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(account.FieldID)
}),
).
Exec(ctx)
func (*AccountUpsertBulk) UpdateStatus ¶
func (u *AccountUpsertBulk) UpdateStatus() *AccountUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateSyncCursor ¶
func (u *AccountUpsertBulk) UpdateSyncCursor() *AccountUpsertBulk
UpdateSyncCursor sets the "sync_cursor" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateSyncNotice ¶
func (u *AccountUpsertBulk) UpdateSyncNotice() *AccountUpsertBulk
UpdateSyncNotice sets the "sync_notice" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateType ¶
func (u *AccountUpsertBulk) UpdateType() *AccountUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
type AccountUpsertOne ¶
type AccountUpsertOne struct {
// contains filtered or unexported fields
}
AccountUpsertOne is the builder for "upsert"-ing
one Account node.
func (*AccountUpsertOne) ClearAuthError ¶
func (u *AccountUpsertOne) ClearAuthError() *AccountUpsertOne
ClearAuthError clears the value of the "auth_error" field.
func (*AccountUpsertOne) ClearLastSyncAt ¶
func (u *AccountUpsertOne) ClearLastSyncAt() *AccountUpsertOne
ClearLastSyncAt clears the value of the "last_sync_at" field.
func (*AccountUpsertOne) ClearSyncNotice ¶
func (u *AccountUpsertOne) ClearSyncNotice() *AccountUpsertOne
ClearSyncNotice clears the value of the "sync_notice" field.
func (*AccountUpsertOne) DoNothing ¶
func (u *AccountUpsertOne) DoNothing() *AccountUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AccountUpsertOne) Exec ¶
func (u *AccountUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUpsertOne) ExecX ¶
func (u *AccountUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpsertOne) IDX ¶
func (u *AccountUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*AccountUpsertOne) Ignore ¶
func (u *AccountUpsertOne) Ignore() *AccountUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Account.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*AccountUpsertOne) SetAuthError ¶
func (u *AccountUpsertOne) SetAuthError(v string) *AccountUpsertOne
SetAuthError sets the "auth_error" field.
func (*AccountUpsertOne) SetConfig ¶
func (u *AccountUpsertOne) SetConfig(v map[string]interface{}) *AccountUpsertOne
SetConfig sets the "config" field.
func (*AccountUpsertOne) SetDisplayName ¶
func (u *AccountUpsertOne) SetDisplayName(v string) *AccountUpsertOne
SetDisplayName sets the "display_name" field.
func (*AccountUpsertOne) SetEmail ¶
func (u *AccountUpsertOne) SetEmail(v string) *AccountUpsertOne
SetEmail sets the "email" field.
func (*AccountUpsertOne) SetLastError ¶
func (u *AccountUpsertOne) SetLastError(v string) *AccountUpsertOne
SetLastError sets the "last_error" field.
func (*AccountUpsertOne) SetLastSyncAt ¶
func (u *AccountUpsertOne) SetLastSyncAt(v time.Time) *AccountUpsertOne
SetLastSyncAt sets the "last_sync_at" field.
func (*AccountUpsertOne) SetNeedsReauth ¶
func (u *AccountUpsertOne) SetNeedsReauth(v bool) *AccountUpsertOne
SetNeedsReauth sets the "needs_reauth" field.
func (*AccountUpsertOne) SetStatus ¶
func (u *AccountUpsertOne) SetStatus(v account.Status) *AccountUpsertOne
SetStatus sets the "status" field.
func (*AccountUpsertOne) SetSyncCursor ¶
func (u *AccountUpsertOne) SetSyncCursor(v string) *AccountUpsertOne
SetSyncCursor sets the "sync_cursor" field.
func (*AccountUpsertOne) SetSyncNotice ¶
func (u *AccountUpsertOne) SetSyncNotice(v string) *AccountUpsertOne
SetSyncNotice sets the "sync_notice" field.
func (*AccountUpsertOne) SetType ¶
func (u *AccountUpsertOne) SetType(v account.Type) *AccountUpsertOne
SetType sets the "type" field.
func (*AccountUpsertOne) Update ¶
func (u *AccountUpsertOne) Update(set func(*AccountUpsert)) *AccountUpsertOne
Update allows overriding fields `UPDATE` values. See the AccountCreate.OnConflict documentation for more info.
func (*AccountUpsertOne) UpdateAuthError ¶
func (u *AccountUpsertOne) UpdateAuthError() *AccountUpsertOne
UpdateAuthError sets the "auth_error" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateConfig ¶
func (u *AccountUpsertOne) UpdateConfig() *AccountUpsertOne
UpdateConfig sets the "config" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateDisplayName ¶
func (u *AccountUpsertOne) UpdateDisplayName() *AccountUpsertOne
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateEmail ¶
func (u *AccountUpsertOne) UpdateEmail() *AccountUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateLastError ¶
func (u *AccountUpsertOne) UpdateLastError() *AccountUpsertOne
UpdateLastError sets the "last_error" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateLastSyncAt ¶
func (u *AccountUpsertOne) UpdateLastSyncAt() *AccountUpsertOne
UpdateLastSyncAt sets the "last_sync_at" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateNeedsReauth ¶
func (u *AccountUpsertOne) UpdateNeedsReauth() *AccountUpsertOne
UpdateNeedsReauth sets the "needs_reauth" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateNewValues ¶
func (u *AccountUpsertOne) UpdateNewValues() *AccountUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Account.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(account.FieldID)
}),
).
Exec(ctx)
func (*AccountUpsertOne) UpdateStatus ¶
func (u *AccountUpsertOne) UpdateStatus() *AccountUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateSyncCursor ¶
func (u *AccountUpsertOne) UpdateSyncCursor() *AccountUpsertOne
UpdateSyncCursor sets the "sync_cursor" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateSyncNotice ¶
func (u *AccountUpsertOne) UpdateSyncNotice() *AccountUpsertOne
UpdateSyncNotice sets the "sync_notice" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateType ¶
func (u *AccountUpsertOne) UpdateType() *AccountUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
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
// Account is the client for interacting with the Account builders.
Account *AccountClient
// Contact is the client for interacting with the Contact builders.
Contact *ContactClient
// Message is the client for interacting with the Message builders.
Message *MessageClient
// NotifyRule is the client for interacting with the NotifyRule builders.
NotifyRule *NotifyRuleClient
// PendingOp is the client for interacting with the PendingOp builders.
PendingOp *PendingOpClient
// Secret is the client for interacting with the Secret builders.
Secret *SecretClient
// Thread is the client for interacting with the Thread builders.
Thread *ThreadClient
// 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(). Account. 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 Contact ¶
type Contact struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Email holds the value of the "email" field.
Email string `json:"email,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Source holds the value of the "source" field.
Source contact.Source `json:"source,omitempty"`
// Weight holds the value of the "weight" field.
Weight int `json:"weight,omitempty"`
// LastSeen holds the value of the "last_seen" field.
LastSeen time.Time `json:"last_seen,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ContactQuery when eager-loading is set.
Edges ContactEdges `json:"edges"`
// contains filtered or unexported fields
}
Contact is the model entity for the Contact schema.
func (*Contact) ExecContext ¶
func (c *Contact) 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 (*Contact) QueryAccount ¶
func (_m *Contact) QueryAccount() *AccountQuery
QueryAccount queries the "account" edge of the Contact entity.
func (*Contact) QueryContext ¶
func (c *Contact) 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 (*Contact) Unwrap ¶
Unwrap unwraps the Contact 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 (*Contact) Update ¶
func (_m *Contact) Update() *ContactUpdateOne
Update returns a builder for updating this Contact. Note that you need to call Contact.Unwrap() before calling this method if this Contact was returned from a transaction, and the transaction was committed or rolled back.
type ContactClient ¶
type ContactClient struct {
// contains filtered or unexported fields
}
ContactClient is a client for the Contact schema.
func NewContactClient ¶
func NewContactClient(c config) *ContactClient
NewContactClient returns a client for the Contact from the given config.
func (*ContactClient) Create ¶
func (c *ContactClient) Create() *ContactCreate
Create returns a builder for creating a Contact entity.
func (*ContactClient) CreateBulk ¶
func (c *ContactClient) CreateBulk(builders ...*ContactCreate) *ContactCreateBulk
CreateBulk returns a builder for creating a bulk of Contact entities.
func (*ContactClient) Delete ¶
func (c *ContactClient) Delete() *ContactDelete
Delete returns a delete builder for Contact.
func (*ContactClient) DeleteOne ¶
func (c *ContactClient) DeleteOne(_m *Contact) *ContactDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ContactClient) DeleteOneID ¶
func (c *ContactClient) DeleteOneID(id int) *ContactDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ContactClient) ExecContext ¶
func (c *ContactClient) 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 (*ContactClient) GetX ¶
func (c *ContactClient) GetX(ctx context.Context, id int) *Contact
GetX is like Get, but panics if an error occurs.
func (*ContactClient) Hooks ¶
func (c *ContactClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ContactClient) Intercept ¶
func (c *ContactClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `contact.Intercept(f(g(h())))`.
func (*ContactClient) Interceptors ¶
func (c *ContactClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ContactClient) MapCreateBulk ¶
func (c *ContactClient) MapCreateBulk(slice any, setFunc func(*ContactCreate, int)) *ContactCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ContactClient) Query ¶
func (c *ContactClient) Query() *ContactQuery
Query returns a query builder for Contact.
func (*ContactClient) QueryAccount ¶
func (c *ContactClient) QueryAccount(_m *Contact) *AccountQuery
QueryAccount queries the account edge of a Contact.
func (*ContactClient) QueryContext ¶
func (c *ContactClient) 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 (*ContactClient) Update ¶
func (c *ContactClient) Update() *ContactUpdate
Update returns an update builder for Contact.
func (*ContactClient) UpdateOne ¶
func (c *ContactClient) UpdateOne(_m *Contact) *ContactUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ContactClient) UpdateOneID ¶
func (c *ContactClient) UpdateOneID(id int) *ContactUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ContactClient) Use ¶
func (c *ContactClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `contact.Hooks(f(g(h())))`.
type ContactCreate ¶
type ContactCreate struct {
// contains filtered or unexported fields
}
ContactCreate is the builder for creating a Contact entity.
func (*ContactCreate) Exec ¶
func (_c *ContactCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactCreate) ExecContext ¶
func (c *ContactCreate) 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 (*ContactCreate) ExecX ¶
func (_c *ContactCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactCreate) Mutation ¶
func (_c *ContactCreate) Mutation() *ContactMutation
Mutation returns the ContactMutation object of the builder.
func (*ContactCreate) OnConflict ¶
func (_c *ContactCreate) OnConflict(opts ...sql.ConflictOption) *ContactUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Contact.Create().
SetEmail(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ContactUpsert) {
SetEmail(v+v).
}).
Exec(ctx)
func (*ContactCreate) OnConflictColumns ¶
func (_c *ContactCreate) OnConflictColumns(columns ...string) *ContactUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Contact.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ContactCreate) QueryContext ¶
func (c *ContactCreate) 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 (*ContactCreate) Save ¶
func (_c *ContactCreate) Save(ctx context.Context) (*Contact, error)
Save creates the Contact in the database.
func (*ContactCreate) SaveX ¶
func (_c *ContactCreate) SaveX(ctx context.Context) *Contact
SaveX calls Save and panics if Save returns an error.
func (*ContactCreate) SetAccount ¶
func (_c *ContactCreate) SetAccount(v *Account) *ContactCreate
SetAccount sets the "account" edge to the Account entity.
func (*ContactCreate) SetAccountID ¶
func (_c *ContactCreate) SetAccountID(id uuid.UUID) *ContactCreate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*ContactCreate) SetEmail ¶
func (_c *ContactCreate) SetEmail(v string) *ContactCreate
SetEmail sets the "email" field.
func (*ContactCreate) SetLastSeen ¶
func (_c *ContactCreate) SetLastSeen(v time.Time) *ContactCreate
SetLastSeen sets the "last_seen" field.
func (*ContactCreate) SetName ¶
func (_c *ContactCreate) SetName(v string) *ContactCreate
SetName sets the "name" field.
func (*ContactCreate) SetNillableLastSeen ¶
func (_c *ContactCreate) SetNillableLastSeen(v *time.Time) *ContactCreate
SetNillableLastSeen sets the "last_seen" field if the given value is not nil.
func (*ContactCreate) SetNillableName ¶
func (_c *ContactCreate) SetNillableName(v *string) *ContactCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*ContactCreate) SetNillableWeight ¶
func (_c *ContactCreate) SetNillableWeight(v *int) *ContactCreate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*ContactCreate) SetSource ¶
func (_c *ContactCreate) SetSource(v contact.Source) *ContactCreate
SetSource sets the "source" field.
func (*ContactCreate) SetWeight ¶
func (_c *ContactCreate) SetWeight(v int) *ContactCreate
SetWeight sets the "weight" field.
type ContactCreateBulk ¶
type ContactCreateBulk struct {
// contains filtered or unexported fields
}
ContactCreateBulk is the builder for creating many Contact entities in bulk.
func (*ContactCreateBulk) Exec ¶
func (_c *ContactCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactCreateBulk) ExecContext ¶
func (c *ContactCreateBulk) 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 (*ContactCreateBulk) ExecX ¶
func (_c *ContactCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactCreateBulk) OnConflict ¶
func (_c *ContactCreateBulk) OnConflict(opts ...sql.ConflictOption) *ContactUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Contact.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ContactUpsert) {
SetEmail(v+v).
}).
Exec(ctx)
func (*ContactCreateBulk) OnConflictColumns ¶
func (_c *ContactCreateBulk) OnConflictColumns(columns ...string) *ContactUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Contact.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ContactCreateBulk) QueryContext ¶
func (c *ContactCreateBulk) 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 ContactDelete ¶
type ContactDelete struct {
// contains filtered or unexported fields
}
ContactDelete is the builder for deleting a Contact entity.
func (*ContactDelete) Exec ¶
func (_d *ContactDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ContactDelete) ExecContext ¶
func (c *ContactDelete) 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 (*ContactDelete) ExecX ¶
func (_d *ContactDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ContactDelete) QueryContext ¶
func (c *ContactDelete) 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 (*ContactDelete) Where ¶
func (_d *ContactDelete) Where(ps ...predicate.Contact) *ContactDelete
Where appends a list predicates to the ContactDelete builder.
type ContactDeleteOne ¶
type ContactDeleteOne struct {
// contains filtered or unexported fields
}
ContactDeleteOne is the builder for deleting a single Contact entity.
func (*ContactDeleteOne) Exec ¶
func (_d *ContactDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ContactDeleteOne) ExecX ¶
func (_d *ContactDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactDeleteOne) Where ¶
func (_d *ContactDeleteOne) Where(ps ...predicate.Contact) *ContactDeleteOne
Where appends a list predicates to the ContactDelete builder.
type ContactEdges ¶
type ContactEdges struct {
// Account holds the value of the account edge.
Account *Account `json:"account,omitempty"`
// contains filtered or unexported fields
}
ContactEdges holds the relations/edges for other nodes in the graph.
func (ContactEdges) AccountOrErr ¶
func (e ContactEdges) AccountOrErr() (*Account, error)
AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ContactGroupBy ¶
type ContactGroupBy struct {
// contains filtered or unexported fields
}
ContactGroupBy is the group-by builder for Contact entities.
func (*ContactGroupBy) Aggregate ¶
func (_g *ContactGroupBy) Aggregate(fns ...AggregateFunc) *ContactGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ContactGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContactGroupBy) Scan ¶
func (_g *ContactGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ContactGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContactMutation ¶
type ContactMutation struct {
// contains filtered or unexported fields
}
ContactMutation represents an operation that mutates the Contact nodes in the graph.
func (*ContactMutation) AccountCleared ¶
func (m *ContactMutation) AccountCleared() bool
AccountCleared reports if the "account" edge to the Account entity was cleared.
func (*ContactMutation) AccountID ¶
func (m *ContactMutation) AccountID() (id uuid.UUID, exists bool)
AccountID returns the "account" edge ID in the mutation.
func (*ContactMutation) AccountIDs ¶
func (m *ContactMutation) AccountIDs() (ids []uuid.UUID)
AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.
func (*ContactMutation) AddField ¶
func (m *ContactMutation) 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 (*ContactMutation) AddWeight ¶
func (m *ContactMutation) AddWeight(i int)
AddWeight adds i to the "weight" field.
func (*ContactMutation) AddedEdges ¶
func (m *ContactMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ContactMutation) AddedField ¶
func (m *ContactMutation) 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 (*ContactMutation) AddedFields ¶
func (m *ContactMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ContactMutation) AddedIDs ¶
func (m *ContactMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ContactMutation) AddedWeight ¶
func (m *ContactMutation) AddedWeight() (r int, exists bool)
AddedWeight returns the value that was added to the "weight" field in this mutation.
func (*ContactMutation) ClearAccount ¶
func (m *ContactMutation) ClearAccount()
ClearAccount clears the "account" edge to the Account entity.
func (*ContactMutation) ClearEdge ¶
func (m *ContactMutation) 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 (*ContactMutation) ClearField ¶
func (m *ContactMutation) 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 (*ContactMutation) ClearedEdges ¶
func (m *ContactMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ContactMutation) ClearedFields ¶
func (m *ContactMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ContactMutation) Client ¶
func (m ContactMutation) 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 (*ContactMutation) EdgeCleared ¶
func (m *ContactMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ContactMutation) Email ¶
func (m *ContactMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*ContactMutation) ExecContext ¶
func (c *ContactMutation) 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 (*ContactMutation) Field ¶
func (m *ContactMutation) 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 (*ContactMutation) FieldCleared ¶
func (m *ContactMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ContactMutation) Fields ¶
func (m *ContactMutation) 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 (*ContactMutation) ID ¶
func (m *ContactMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ContactMutation) IDs ¶
func (m *ContactMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ContactMutation) LastSeen ¶
func (m *ContactMutation) LastSeen() (r time.Time, exists bool)
LastSeen returns the value of the "last_seen" field in the mutation.
func (*ContactMutation) Name ¶
func (m *ContactMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ContactMutation) OldEmail ¶
func (m *ContactMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Contact entity. If the Contact 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 (*ContactMutation) 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 (*ContactMutation) OldLastSeen ¶
OldLastSeen returns the old "last_seen" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldName ¶
func (m *ContactMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldSource ¶
OldSource returns the old "source" field's value of the Contact entity. If the Contact 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 (*ContactMutation) OldWeight ¶
func (m *ContactMutation) OldWeight(ctx context.Context) (v int, err error)
OldWeight returns the old "weight" field's value of the Contact entity. If the Contact 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 (*ContactMutation) QueryContext ¶
func (c *ContactMutation) 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 (*ContactMutation) RemovedEdges ¶
func (m *ContactMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ContactMutation) RemovedIDs ¶
func (m *ContactMutation) 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 (*ContactMutation) ResetAccount ¶
func (m *ContactMutation) ResetAccount()
ResetAccount resets all changes to the "account" edge.
func (*ContactMutation) ResetEdge ¶
func (m *ContactMutation) 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 (*ContactMutation) ResetEmail ¶
func (m *ContactMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*ContactMutation) ResetField ¶
func (m *ContactMutation) 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 (*ContactMutation) ResetLastSeen ¶
func (m *ContactMutation) ResetLastSeen()
ResetLastSeen resets all changes to the "last_seen" field.
func (*ContactMutation) ResetName ¶
func (m *ContactMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ContactMutation) ResetSource ¶
func (m *ContactMutation) ResetSource()
ResetSource resets all changes to the "source" field.
func (*ContactMutation) ResetWeight ¶
func (m *ContactMutation) ResetWeight()
ResetWeight resets all changes to the "weight" field.
func (*ContactMutation) SetAccountID ¶
func (m *ContactMutation) SetAccountID(id uuid.UUID)
SetAccountID sets the "account" edge to the Account entity by id.
func (*ContactMutation) SetEmail ¶
func (m *ContactMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*ContactMutation) SetField ¶
func (m *ContactMutation) 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 (*ContactMutation) SetLastSeen ¶
func (m *ContactMutation) SetLastSeen(t time.Time)
SetLastSeen sets the "last_seen" field.
func (*ContactMutation) SetName ¶
func (m *ContactMutation) SetName(s string)
SetName sets the "name" field.
func (*ContactMutation) SetOp ¶
func (m *ContactMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ContactMutation) SetSource ¶
func (m *ContactMutation) SetSource(c contact.Source)
SetSource sets the "source" field.
func (*ContactMutation) SetWeight ¶
func (m *ContactMutation) SetWeight(i int)
SetWeight sets the "weight" field.
func (*ContactMutation) Source ¶
func (m *ContactMutation) Source() (r contact.Source, exists bool)
Source returns the value of the "source" field in the mutation.
func (ContactMutation) Tx ¶
func (m ContactMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ContactMutation) Type ¶
func (m *ContactMutation) Type() string
Type returns the node type of this mutation (Contact).
func (*ContactMutation) Weight ¶
func (m *ContactMutation) Weight() (r int, exists bool)
Weight returns the value of the "weight" field in the mutation.
func (*ContactMutation) Where ¶
func (m *ContactMutation) Where(ps ...predicate.Contact)
Where appends a list predicates to the ContactMutation builder.
func (*ContactMutation) WhereP ¶
func (m *ContactMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ContactMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ContactQuery ¶
type ContactQuery struct {
// contains filtered or unexported fields
}
ContactQuery is the builder for querying Contact entities.
func (*ContactQuery) Aggregate ¶
func (_q *ContactQuery) Aggregate(fns ...AggregateFunc) *ContactSelect
Aggregate returns a ContactSelect configured with the given aggregations.
func (*ContactQuery) All ¶
func (_q *ContactQuery) All(ctx context.Context) ([]*Contact, error)
All executes the query and returns a list of Contacts.
func (*ContactQuery) AllX ¶
func (_q *ContactQuery) AllX(ctx context.Context) []*Contact
AllX is like All, but panics if an error occurs.
func (*ContactQuery) Clone ¶
func (_q *ContactQuery) Clone() *ContactQuery
Clone returns a duplicate of the ContactQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ContactQuery) Count ¶
func (_q *ContactQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ContactQuery) CountX ¶
func (_q *ContactQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ContactQuery) ExecContext ¶
func (c *ContactQuery) 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 (*ContactQuery) Exist ¶
func (_q *ContactQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ContactQuery) ExistX ¶
func (_q *ContactQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ContactQuery) First ¶
func (_q *ContactQuery) First(ctx context.Context) (*Contact, error)
First returns the first Contact entity from the query. Returns a *NotFoundError when no Contact was found.
func (*ContactQuery) FirstID ¶
func (_q *ContactQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Contact ID from the query. Returns a *NotFoundError when no Contact ID was found.
func (*ContactQuery) FirstIDX ¶
func (_q *ContactQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ContactQuery) FirstX ¶
func (_q *ContactQuery) FirstX(ctx context.Context) *Contact
FirstX is like First, but panics if an error occurs.
func (*ContactQuery) GroupBy ¶
func (_q *ContactQuery) GroupBy(field string, fields ...string) *ContactGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Email string `json:"email,omitempty"`
Count int `json:"count,omitempty"`
}
client.Contact.Query().
GroupBy(contact.FieldEmail).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ContactQuery) IDs ¶
func (_q *ContactQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Contact IDs.
func (*ContactQuery) IDsX ¶
func (_q *ContactQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ContactQuery) Limit ¶
func (_q *ContactQuery) Limit(limit int) *ContactQuery
Limit the number of records to be returned by this query.
func (*ContactQuery) Modify ¶
func (_q *ContactQuery) Modify(modifiers ...func(s *sql.Selector)) *ContactSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ContactQuery) Offset ¶
func (_q *ContactQuery) Offset(offset int) *ContactQuery
Offset to start from.
func (*ContactQuery) Only ¶
func (_q *ContactQuery) Only(ctx context.Context) (*Contact, error)
Only returns a single Contact entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Contact entity is found. Returns a *NotFoundError when no Contact entities are found.
func (*ContactQuery) OnlyID ¶
func (_q *ContactQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Contact ID in the query. Returns a *NotSingularError when more than one Contact ID is found. Returns a *NotFoundError when no entities are found.
func (*ContactQuery) OnlyIDX ¶
func (_q *ContactQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ContactQuery) OnlyX ¶
func (_q *ContactQuery) OnlyX(ctx context.Context) *Contact
OnlyX is like Only, but panics if an error occurs.
func (*ContactQuery) Order ¶
func (_q *ContactQuery) Order(o ...contact.OrderOption) *ContactQuery
Order specifies how the records should be ordered.
func (*ContactQuery) QueryAccount ¶
func (_q *ContactQuery) QueryAccount() *AccountQuery
QueryAccount chains the current query on the "account" edge.
func (*ContactQuery) QueryContext ¶
func (c *ContactQuery) 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 (*ContactQuery) Select ¶
func (_q *ContactQuery) Select(fields ...string) *ContactSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Email string `json:"email,omitempty"`
}
client.Contact.Query().
Select(contact.FieldEmail).
Scan(ctx, &v)
func (*ContactQuery) Unique ¶
func (_q *ContactQuery) Unique(unique bool) *ContactQuery
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 (*ContactQuery) Where ¶
func (_q *ContactQuery) Where(ps ...predicate.Contact) *ContactQuery
Where adds a new predicate for the ContactQuery builder.
func (*ContactQuery) WithAccount ¶
func (_q *ContactQuery) WithAccount(opts ...func(*AccountQuery)) *ContactQuery
WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.
type ContactSelect ¶
type ContactSelect struct {
*ContactQuery
// contains filtered or unexported fields
}
ContactSelect is the builder for selecting fields of Contact entities.
func (*ContactSelect) Aggregate ¶
func (_s *ContactSelect) Aggregate(fns ...AggregateFunc) *ContactSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ContactSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContactSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (ContactSelect) ExecContext ¶
func (c ContactSelect) 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 (*ContactSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContactSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContactSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContactSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContactSelect) Modify ¶
func (_s *ContactSelect) Modify(modifiers ...func(s *sql.Selector)) *ContactSelect
Modify adds a query modifier for attaching custom logic to queries.
func (ContactSelect) QueryContext ¶
func (c ContactSelect) 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 (*ContactSelect) Scan ¶
func (_s *ContactSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ContactSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContactUpdate ¶
type ContactUpdate struct {
// contains filtered or unexported fields
}
ContactUpdate is the builder for updating Contact entities.
func (*ContactUpdate) AddWeight ¶
func (_u *ContactUpdate) AddWeight(v int) *ContactUpdate
AddWeight adds value to the "weight" field.
func (*ContactUpdate) ClearAccount ¶
func (_u *ContactUpdate) ClearAccount() *ContactUpdate
ClearAccount clears the "account" edge to the Account entity.
func (*ContactUpdate) Exec ¶
func (_u *ContactUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactUpdate) ExecContext ¶
func (c *ContactUpdate) 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 (*ContactUpdate) ExecX ¶
func (_u *ContactUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactUpdate) Modify ¶
func (_u *ContactUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ContactUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ContactUpdate) Mutation ¶
func (_u *ContactUpdate) Mutation() *ContactMutation
Mutation returns the ContactMutation object of the builder.
func (*ContactUpdate) QueryContext ¶
func (c *ContactUpdate) 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 (*ContactUpdate) Save ¶
func (_u *ContactUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ContactUpdate) SaveX ¶
func (_u *ContactUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ContactUpdate) SetAccount ¶
func (_u *ContactUpdate) SetAccount(v *Account) *ContactUpdate
SetAccount sets the "account" edge to the Account entity.
func (*ContactUpdate) SetAccountID ¶
func (_u *ContactUpdate) SetAccountID(id uuid.UUID) *ContactUpdate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*ContactUpdate) SetEmail ¶
func (_u *ContactUpdate) SetEmail(v string) *ContactUpdate
SetEmail sets the "email" field.
func (*ContactUpdate) SetLastSeen ¶
func (_u *ContactUpdate) SetLastSeen(v time.Time) *ContactUpdate
SetLastSeen sets the "last_seen" field.
func (*ContactUpdate) SetName ¶
func (_u *ContactUpdate) SetName(v string) *ContactUpdate
SetName sets the "name" field.
func (*ContactUpdate) SetNillableEmail ¶
func (_u *ContactUpdate) SetNillableEmail(v *string) *ContactUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*ContactUpdate) SetNillableLastSeen ¶
func (_u *ContactUpdate) SetNillableLastSeen(v *time.Time) *ContactUpdate
SetNillableLastSeen sets the "last_seen" field if the given value is not nil.
func (*ContactUpdate) SetNillableName ¶
func (_u *ContactUpdate) SetNillableName(v *string) *ContactUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ContactUpdate) SetNillableSource ¶
func (_u *ContactUpdate) SetNillableSource(v *contact.Source) *ContactUpdate
SetNillableSource sets the "source" field if the given value is not nil.
func (*ContactUpdate) SetNillableWeight ¶
func (_u *ContactUpdate) SetNillableWeight(v *int) *ContactUpdate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*ContactUpdate) SetSource ¶
func (_u *ContactUpdate) SetSource(v contact.Source) *ContactUpdate
SetSource sets the "source" field.
func (*ContactUpdate) SetWeight ¶
func (_u *ContactUpdate) SetWeight(v int) *ContactUpdate
SetWeight sets the "weight" field.
func (*ContactUpdate) Where ¶
func (_u *ContactUpdate) Where(ps ...predicate.Contact) *ContactUpdate
Where appends a list predicates to the ContactUpdate builder.
type ContactUpdateOne ¶
type ContactUpdateOne struct {
// contains filtered or unexported fields
}
ContactUpdateOne is the builder for updating a single Contact entity.
func (*ContactUpdateOne) AddWeight ¶
func (_u *ContactUpdateOne) AddWeight(v int) *ContactUpdateOne
AddWeight adds value to the "weight" field.
func (*ContactUpdateOne) ClearAccount ¶
func (_u *ContactUpdateOne) ClearAccount() *ContactUpdateOne
ClearAccount clears the "account" edge to the Account entity.
func (*ContactUpdateOne) Exec ¶
func (_u *ContactUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ContactUpdateOne) ExecContext ¶
func (c *ContactUpdateOne) 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 (*ContactUpdateOne) ExecX ¶
func (_u *ContactUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactUpdateOne) Modify ¶
func (_u *ContactUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ContactUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ContactUpdateOne) Mutation ¶
func (_u *ContactUpdateOne) Mutation() *ContactMutation
Mutation returns the ContactMutation object of the builder.
func (*ContactUpdateOne) QueryContext ¶
func (c *ContactUpdateOne) 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 (*ContactUpdateOne) Save ¶
func (_u *ContactUpdateOne) Save(ctx context.Context) (*Contact, error)
Save executes the query and returns the updated Contact entity.
func (*ContactUpdateOne) SaveX ¶
func (_u *ContactUpdateOne) SaveX(ctx context.Context) *Contact
SaveX is like Save, but panics if an error occurs.
func (*ContactUpdateOne) Select ¶
func (_u *ContactUpdateOne) Select(field string, fields ...string) *ContactUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ContactUpdateOne) SetAccount ¶
func (_u *ContactUpdateOne) SetAccount(v *Account) *ContactUpdateOne
SetAccount sets the "account" edge to the Account entity.
func (*ContactUpdateOne) SetAccountID ¶
func (_u *ContactUpdateOne) SetAccountID(id uuid.UUID) *ContactUpdateOne
SetAccountID sets the "account" edge to the Account entity by ID.
func (*ContactUpdateOne) SetEmail ¶
func (_u *ContactUpdateOne) SetEmail(v string) *ContactUpdateOne
SetEmail sets the "email" field.
func (*ContactUpdateOne) SetLastSeen ¶
func (_u *ContactUpdateOne) SetLastSeen(v time.Time) *ContactUpdateOne
SetLastSeen sets the "last_seen" field.
func (*ContactUpdateOne) SetName ¶
func (_u *ContactUpdateOne) SetName(v string) *ContactUpdateOne
SetName sets the "name" field.
func (*ContactUpdateOne) SetNillableEmail ¶
func (_u *ContactUpdateOne) SetNillableEmail(v *string) *ContactUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableLastSeen ¶
func (_u *ContactUpdateOne) SetNillableLastSeen(v *time.Time) *ContactUpdateOne
SetNillableLastSeen sets the "last_seen" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableName ¶
func (_u *ContactUpdateOne) SetNillableName(v *string) *ContactUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableSource ¶
func (_u *ContactUpdateOne) SetNillableSource(v *contact.Source) *ContactUpdateOne
SetNillableSource sets the "source" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableWeight ¶
func (_u *ContactUpdateOne) SetNillableWeight(v *int) *ContactUpdateOne
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*ContactUpdateOne) SetSource ¶
func (_u *ContactUpdateOne) SetSource(v contact.Source) *ContactUpdateOne
SetSource sets the "source" field.
func (*ContactUpdateOne) SetWeight ¶
func (_u *ContactUpdateOne) SetWeight(v int) *ContactUpdateOne
SetWeight sets the "weight" field.
func (*ContactUpdateOne) Where ¶
func (_u *ContactUpdateOne) Where(ps ...predicate.Contact) *ContactUpdateOne
Where appends a list predicates to the ContactUpdate builder.
type ContactUpsert ¶
ContactUpsert is the "OnConflict" setter.
func (*ContactUpsert) AddWeight ¶
func (u *ContactUpsert) AddWeight(v int) *ContactUpsert
AddWeight adds v to the "weight" field.
func (*ContactUpsert) SetEmail ¶
func (u *ContactUpsert) SetEmail(v string) *ContactUpsert
SetEmail sets the "email" field.
func (*ContactUpsert) SetLastSeen ¶
func (u *ContactUpsert) SetLastSeen(v time.Time) *ContactUpsert
SetLastSeen sets the "last_seen" field.
func (*ContactUpsert) SetName ¶
func (u *ContactUpsert) SetName(v string) *ContactUpsert
SetName sets the "name" field.
func (*ContactUpsert) SetSource ¶
func (u *ContactUpsert) SetSource(v contact.Source) *ContactUpsert
SetSource sets the "source" field.
func (*ContactUpsert) SetWeight ¶
func (u *ContactUpsert) SetWeight(v int) *ContactUpsert
SetWeight sets the "weight" field.
func (*ContactUpsert) UpdateEmail ¶
func (u *ContactUpsert) UpdateEmail() *ContactUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*ContactUpsert) UpdateLastSeen ¶
func (u *ContactUpsert) UpdateLastSeen() *ContactUpsert
UpdateLastSeen sets the "last_seen" field to the value that was provided on create.
func (*ContactUpsert) UpdateName ¶
func (u *ContactUpsert) UpdateName() *ContactUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*ContactUpsert) UpdateSource ¶
func (u *ContactUpsert) UpdateSource() *ContactUpsert
UpdateSource sets the "source" field to the value that was provided on create.
func (*ContactUpsert) UpdateWeight ¶
func (u *ContactUpsert) UpdateWeight() *ContactUpsert
UpdateWeight sets the "weight" field to the value that was provided on create.
type ContactUpsertBulk ¶
type ContactUpsertBulk struct {
// contains filtered or unexported fields
}
ContactUpsertBulk is the builder for "upsert"-ing a bulk of Contact nodes.
func (*ContactUpsertBulk) AddWeight ¶
func (u *ContactUpsertBulk) AddWeight(v int) *ContactUpsertBulk
AddWeight adds v to the "weight" field.
func (*ContactUpsertBulk) DoNothing ¶
func (u *ContactUpsertBulk) DoNothing() *ContactUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ContactUpsertBulk) Exec ¶
func (u *ContactUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactUpsertBulk) ExecX ¶
func (u *ContactUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactUpsertBulk) Ignore ¶
func (u *ContactUpsertBulk) Ignore() *ContactUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Contact.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ContactUpsertBulk) SetEmail ¶
func (u *ContactUpsertBulk) SetEmail(v string) *ContactUpsertBulk
SetEmail sets the "email" field.
func (*ContactUpsertBulk) SetLastSeen ¶
func (u *ContactUpsertBulk) SetLastSeen(v time.Time) *ContactUpsertBulk
SetLastSeen sets the "last_seen" field.
func (*ContactUpsertBulk) SetName ¶
func (u *ContactUpsertBulk) SetName(v string) *ContactUpsertBulk
SetName sets the "name" field.
func (*ContactUpsertBulk) SetSource ¶
func (u *ContactUpsertBulk) SetSource(v contact.Source) *ContactUpsertBulk
SetSource sets the "source" field.
func (*ContactUpsertBulk) SetWeight ¶
func (u *ContactUpsertBulk) SetWeight(v int) *ContactUpsertBulk
SetWeight sets the "weight" field.
func (*ContactUpsertBulk) Update ¶
func (u *ContactUpsertBulk) Update(set func(*ContactUpsert)) *ContactUpsertBulk
Update allows overriding fields `UPDATE` values. See the ContactCreateBulk.OnConflict documentation for more info.
func (*ContactUpsertBulk) UpdateEmail ¶
func (u *ContactUpsertBulk) UpdateEmail() *ContactUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*ContactUpsertBulk) UpdateLastSeen ¶
func (u *ContactUpsertBulk) UpdateLastSeen() *ContactUpsertBulk
UpdateLastSeen sets the "last_seen" field to the value that was provided on create.
func (*ContactUpsertBulk) UpdateName ¶
func (u *ContactUpsertBulk) UpdateName() *ContactUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*ContactUpsertBulk) UpdateNewValues ¶
func (u *ContactUpsertBulk) UpdateNewValues() *ContactUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Contact.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ContactUpsertBulk) UpdateSource ¶
func (u *ContactUpsertBulk) UpdateSource() *ContactUpsertBulk
UpdateSource sets the "source" field to the value that was provided on create.
func (*ContactUpsertBulk) UpdateWeight ¶
func (u *ContactUpsertBulk) UpdateWeight() *ContactUpsertBulk
UpdateWeight sets the "weight" field to the value that was provided on create.
type ContactUpsertOne ¶
type ContactUpsertOne struct {
// contains filtered or unexported fields
}
ContactUpsertOne is the builder for "upsert"-ing
one Contact node.
func (*ContactUpsertOne) AddWeight ¶
func (u *ContactUpsertOne) AddWeight(v int) *ContactUpsertOne
AddWeight adds v to the "weight" field.
func (*ContactUpsertOne) DoNothing ¶
func (u *ContactUpsertOne) DoNothing() *ContactUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ContactUpsertOne) Exec ¶
func (u *ContactUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactUpsertOne) ExecX ¶
func (u *ContactUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactUpsertOne) ID ¶
func (u *ContactUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ContactUpsertOne) IDX ¶
func (u *ContactUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*ContactUpsertOne) Ignore ¶
func (u *ContactUpsertOne) Ignore() *ContactUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Contact.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*ContactUpsertOne) SetEmail ¶
func (u *ContactUpsertOne) SetEmail(v string) *ContactUpsertOne
SetEmail sets the "email" field.
func (*ContactUpsertOne) SetLastSeen ¶
func (u *ContactUpsertOne) SetLastSeen(v time.Time) *ContactUpsertOne
SetLastSeen sets the "last_seen" field.
func (*ContactUpsertOne) SetName ¶
func (u *ContactUpsertOne) SetName(v string) *ContactUpsertOne
SetName sets the "name" field.
func (*ContactUpsertOne) SetSource ¶
func (u *ContactUpsertOne) SetSource(v contact.Source) *ContactUpsertOne
SetSource sets the "source" field.
func (*ContactUpsertOne) SetWeight ¶
func (u *ContactUpsertOne) SetWeight(v int) *ContactUpsertOne
SetWeight sets the "weight" field.
func (*ContactUpsertOne) Update ¶
func (u *ContactUpsertOne) Update(set func(*ContactUpsert)) *ContactUpsertOne
Update allows overriding fields `UPDATE` values. See the ContactCreate.OnConflict documentation for more info.
func (*ContactUpsertOne) UpdateEmail ¶
func (u *ContactUpsertOne) UpdateEmail() *ContactUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*ContactUpsertOne) UpdateLastSeen ¶
func (u *ContactUpsertOne) UpdateLastSeen() *ContactUpsertOne
UpdateLastSeen sets the "last_seen" field to the value that was provided on create.
func (*ContactUpsertOne) UpdateName ¶
func (u *ContactUpsertOne) UpdateName() *ContactUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*ContactUpsertOne) UpdateNewValues ¶
func (u *ContactUpsertOne) UpdateNewValues() *ContactUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Contact.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ContactUpsertOne) UpdateSource ¶
func (u *ContactUpsertOne) UpdateSource() *ContactUpsertOne
UpdateSource sets the "source" field to the value that was provided on create.
func (*ContactUpsertOne) UpdateWeight ¶
func (u *ContactUpsertOne) UpdateWeight() *ContactUpsertOne
UpdateWeight sets the "weight" field to the value that was provided on create.
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 Message ¶
type Message struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// ProviderMessageID holds the value of the "provider_message_id" field.
ProviderMessageID string `json:"provider_message_id,omitempty"`
// Rfc822MessageID holds the value of the "rfc822_message_id" field.
Rfc822MessageID string `json:"rfc822_message_id,omitempty"`
// From holds the value of the "from" field.
From string `json:"from,omitempty"`
// To holds the value of the "to" field.
To []string `json:"to,omitempty"`
// Cc holds the value of the "cc" field.
Cc []string `json:"cc,omitempty"`
// Date holds the value of the "date" field.
Date time.Time `json:"date,omitempty"`
// IsSent holds the value of the "is_sent" field.
IsSent bool `json:"is_sent,omitempty"`
// Snippet holds the value of the "snippet" field.
Snippet string `json:"snippet,omitempty"`
// BodyText holds the value of the "body_text" field.
BodyText string `json:"body_text,omitempty"`
// ReplyHeaders holds the value of the "reply_headers" field.
ReplyHeaders map[string]string `json:"reply_headers,omitempty"`
// Attachments holds the value of the "attachments" field.
Attachments []provider.AttachmentMeta `json:"attachments,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the MessageQuery when eager-loading is set.
Edges MessageEdges `json:"edges"`
// contains filtered or unexported fields
}
Message is the model entity for the Message schema.
func (*Message) ExecContext ¶
func (c *Message) 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 (*Message) QueryContext ¶
func (c *Message) 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 (*Message) QueryThread ¶
func (_m *Message) QueryThread() *ThreadQuery
QueryThread queries the "thread" edge of the Message entity.
func (*Message) Unwrap ¶
Unwrap unwraps the Message 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 (*Message) Update ¶
func (_m *Message) Update() *MessageUpdateOne
Update returns a builder for updating this Message. Note that you need to call Message.Unwrap() before calling this method if this Message was returned from a transaction, and the transaction was committed or rolled back.
type MessageClient ¶
type MessageClient struct {
// contains filtered or unexported fields
}
MessageClient is a client for the Message schema.
func NewMessageClient ¶
func NewMessageClient(c config) *MessageClient
NewMessageClient returns a client for the Message from the given config.
func (*MessageClient) Create ¶
func (c *MessageClient) Create() *MessageCreate
Create returns a builder for creating a Message entity.
func (*MessageClient) CreateBulk ¶
func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
CreateBulk returns a builder for creating a bulk of Message entities.
func (*MessageClient) Delete ¶
func (c *MessageClient) Delete() *MessageDelete
Delete returns a delete builder for Message.
func (*MessageClient) DeleteOne ¶
func (c *MessageClient) DeleteOne(_m *Message) *MessageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MessageClient) DeleteOneID ¶
func (c *MessageClient) DeleteOneID(id int) *MessageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MessageClient) ExecContext ¶
func (c *MessageClient) 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 (*MessageClient) GetX ¶
func (c *MessageClient) GetX(ctx context.Context, id int) *Message
GetX is like Get, but panics if an error occurs.
func (*MessageClient) Hooks ¶
func (c *MessageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MessageClient) Intercept ¶
func (c *MessageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `message.Intercept(f(g(h())))`.
func (*MessageClient) Interceptors ¶
func (c *MessageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MessageClient) MapCreateBulk ¶
func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*MessageClient) Query ¶
func (c *MessageClient) Query() *MessageQuery
Query returns a query builder for Message.
func (*MessageClient) QueryContext ¶
func (c *MessageClient) 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 (*MessageClient) QueryThread ¶
func (c *MessageClient) QueryThread(_m *Message) *ThreadQuery
QueryThread queries the thread edge of a Message.
func (*MessageClient) Update ¶
func (c *MessageClient) Update() *MessageUpdate
Update returns an update builder for Message.
func (*MessageClient) UpdateOne ¶
func (c *MessageClient) UpdateOne(_m *Message) *MessageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MessageClient) UpdateOneID ¶
func (c *MessageClient) UpdateOneID(id int) *MessageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MessageClient) Use ¶
func (c *MessageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `message.Hooks(f(g(h())))`.
type MessageCreate ¶
type MessageCreate struct {
// contains filtered or unexported fields
}
MessageCreate is the builder for creating a Message entity.
func (*MessageCreate) Exec ¶
func (_c *MessageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreate) ExecContext ¶
func (c *MessageCreate) 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 (*MessageCreate) ExecX ¶
func (_c *MessageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageCreate) Mutation ¶
func (_c *MessageCreate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageCreate) OnConflict ¶
func (_c *MessageCreate) OnConflict(opts ...sql.ConflictOption) *MessageUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Message.Create().
SetProviderMessageID(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.MessageUpsert) {
SetProviderMessageID(v+v).
}).
Exec(ctx)
func (*MessageCreate) OnConflictColumns ¶
func (_c *MessageCreate) OnConflictColumns(columns ...string) *MessageUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Message.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*MessageCreate) QueryContext ¶
func (c *MessageCreate) 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 (*MessageCreate) Save ¶
func (_c *MessageCreate) Save(ctx context.Context) (*Message, error)
Save creates the Message in the database.
func (*MessageCreate) SaveX ¶
func (_c *MessageCreate) SaveX(ctx context.Context) *Message
SaveX calls Save and panics if Save returns an error.
func (*MessageCreate) SetAttachments ¶
func (_c *MessageCreate) SetAttachments(v []provider.AttachmentMeta) *MessageCreate
SetAttachments sets the "attachments" field.
func (*MessageCreate) SetBodyText ¶
func (_c *MessageCreate) SetBodyText(v string) *MessageCreate
SetBodyText sets the "body_text" field.
func (*MessageCreate) SetCc ¶
func (_c *MessageCreate) SetCc(v []string) *MessageCreate
SetCc sets the "cc" field.
func (*MessageCreate) SetDate ¶
func (_c *MessageCreate) SetDate(v time.Time) *MessageCreate
SetDate sets the "date" field.
func (*MessageCreate) SetFrom ¶
func (_c *MessageCreate) SetFrom(v string) *MessageCreate
SetFrom sets the "from" field.
func (*MessageCreate) SetIsSent ¶
func (_c *MessageCreate) SetIsSent(v bool) *MessageCreate
SetIsSent sets the "is_sent" field.
func (*MessageCreate) SetNillableBodyText ¶
func (_c *MessageCreate) SetNillableBodyText(v *string) *MessageCreate
SetNillableBodyText sets the "body_text" field if the given value is not nil.
func (*MessageCreate) SetNillableFrom ¶
func (_c *MessageCreate) SetNillableFrom(v *string) *MessageCreate
SetNillableFrom sets the "from" field if the given value is not nil.
func (*MessageCreate) SetNillableIsSent ¶
func (_c *MessageCreate) SetNillableIsSent(v *bool) *MessageCreate
SetNillableIsSent sets the "is_sent" field if the given value is not nil.
func (*MessageCreate) SetNillableRfc822MessageID ¶
func (_c *MessageCreate) SetNillableRfc822MessageID(v *string) *MessageCreate
SetNillableRfc822MessageID sets the "rfc822_message_id" field if the given value is not nil.
func (*MessageCreate) SetNillableSnippet ¶
func (_c *MessageCreate) SetNillableSnippet(v *string) *MessageCreate
SetNillableSnippet sets the "snippet" field if the given value is not nil.
func (*MessageCreate) SetProviderMessageID ¶
func (_c *MessageCreate) SetProviderMessageID(v string) *MessageCreate
SetProviderMessageID sets the "provider_message_id" field.
func (*MessageCreate) SetReplyHeaders ¶
func (_c *MessageCreate) SetReplyHeaders(v map[string]string) *MessageCreate
SetReplyHeaders sets the "reply_headers" field.
func (*MessageCreate) SetRfc822MessageID ¶
func (_c *MessageCreate) SetRfc822MessageID(v string) *MessageCreate
SetRfc822MessageID sets the "rfc822_message_id" field.
func (*MessageCreate) SetSnippet ¶
func (_c *MessageCreate) SetSnippet(v string) *MessageCreate
SetSnippet sets the "snippet" field.
func (*MessageCreate) SetThread ¶
func (_c *MessageCreate) SetThread(v *Thread) *MessageCreate
SetThread sets the "thread" edge to the Thread entity.
func (*MessageCreate) SetThreadID ¶
func (_c *MessageCreate) SetThreadID(id int) *MessageCreate
SetThreadID sets the "thread" edge to the Thread entity by ID.
func (*MessageCreate) SetTo ¶
func (_c *MessageCreate) SetTo(v []string) *MessageCreate
SetTo sets the "to" field.
type MessageCreateBulk ¶
type MessageCreateBulk struct {
// contains filtered or unexported fields
}
MessageCreateBulk is the builder for creating many Message entities in bulk.
func (*MessageCreateBulk) Exec ¶
func (_c *MessageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreateBulk) ExecContext ¶
func (c *MessageCreateBulk) 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 (*MessageCreateBulk) ExecX ¶
func (_c *MessageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageCreateBulk) OnConflict ¶
func (_c *MessageCreateBulk) OnConflict(opts ...sql.ConflictOption) *MessageUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Message.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.MessageUpsert) {
SetProviderMessageID(v+v).
}).
Exec(ctx)
func (*MessageCreateBulk) OnConflictColumns ¶
func (_c *MessageCreateBulk) OnConflictColumns(columns ...string) *MessageUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Message.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*MessageCreateBulk) QueryContext ¶
func (c *MessageCreateBulk) 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 MessageDelete ¶
type MessageDelete struct {
// contains filtered or unexported fields
}
MessageDelete is the builder for deleting a Message entity.
func (*MessageDelete) Exec ¶
func (_d *MessageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MessageDelete) ExecContext ¶
func (c *MessageDelete) 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 (*MessageDelete) ExecX ¶
func (_d *MessageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MessageDelete) QueryContext ¶
func (c *MessageDelete) 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 (*MessageDelete) Where ¶
func (_d *MessageDelete) Where(ps ...predicate.Message) *MessageDelete
Where appends a list predicates to the MessageDelete builder.
type MessageDeleteOne ¶
type MessageDeleteOne struct {
// contains filtered or unexported fields
}
MessageDeleteOne is the builder for deleting a single Message entity.
func (*MessageDeleteOne) Exec ¶
func (_d *MessageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MessageDeleteOne) ExecX ¶
func (_d *MessageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageDeleteOne) Where ¶
func (_d *MessageDeleteOne) Where(ps ...predicate.Message) *MessageDeleteOne
Where appends a list predicates to the MessageDelete builder.
type MessageEdges ¶
type MessageEdges struct {
// Thread holds the value of the thread edge.
Thread *Thread `json:"thread,omitempty"`
// contains filtered or unexported fields
}
MessageEdges holds the relations/edges for other nodes in the graph.
func (MessageEdges) ThreadOrErr ¶
func (e MessageEdges) ThreadOrErr() (*Thread, error)
ThreadOrErr returns the Thread value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MessageGroupBy ¶
type MessageGroupBy struct {
// contains filtered or unexported fields
}
MessageGroupBy is the group-by builder for Message entities.
func (*MessageGroupBy) Aggregate ¶
func (_g *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MessageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Scan ¶
func (_g *MessageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageMutation ¶
type MessageMutation struct {
// contains filtered or unexported fields
}
MessageMutation represents an operation that mutates the Message nodes in the graph.
func (*MessageMutation) AddField ¶
func (m *MessageMutation) 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 (*MessageMutation) AddedEdges ¶
func (m *MessageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MessageMutation) AddedField ¶
func (m *MessageMutation) 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 (*MessageMutation) AddedFields ¶
func (m *MessageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MessageMutation) AddedIDs ¶
func (m *MessageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MessageMutation) AppendAttachments ¶
func (m *MessageMutation) AppendAttachments(pm []provider.AttachmentMeta)
AppendAttachments adds pm to the "attachments" field.
func (*MessageMutation) AppendCc ¶
func (m *MessageMutation) AppendCc(s []string)
AppendCc adds s to the "cc" field.
func (*MessageMutation) AppendTo ¶
func (m *MessageMutation) AppendTo(s []string)
AppendTo adds s to the "to" field.
func (*MessageMutation) AppendedAttachments ¶
func (m *MessageMutation) AppendedAttachments() ([]provider.AttachmentMeta, bool)
AppendedAttachments returns the list of values that were appended to the "attachments" field in this mutation.
func (*MessageMutation) AppendedCc ¶
func (m *MessageMutation) AppendedCc() ([]string, bool)
AppendedCc returns the list of values that were appended to the "cc" field in this mutation.
func (*MessageMutation) AppendedTo ¶
func (m *MessageMutation) AppendedTo() ([]string, bool)
AppendedTo returns the list of values that were appended to the "to" field in this mutation.
func (*MessageMutation) Attachments ¶
func (m *MessageMutation) Attachments() (r []provider.AttachmentMeta, exists bool)
Attachments returns the value of the "attachments" field in the mutation.
func (*MessageMutation) AttachmentsCleared ¶
func (m *MessageMutation) AttachmentsCleared() bool
AttachmentsCleared returns if the "attachments" field was cleared in this mutation.
func (*MessageMutation) BodyText ¶
func (m *MessageMutation) BodyText() (r string, exists bool)
BodyText returns the value of the "body_text" field in the mutation.
func (*MessageMutation) Cc ¶
func (m *MessageMutation) Cc() (r []string, exists bool)
Cc returns the value of the "cc" field in the mutation.
func (*MessageMutation) ClearAttachments ¶
func (m *MessageMutation) ClearAttachments()
ClearAttachments clears the value of the "attachments" field.
func (*MessageMutation) ClearEdge ¶
func (m *MessageMutation) 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 (*MessageMutation) ClearField ¶
func (m *MessageMutation) 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 (*MessageMutation) ClearThread ¶
func (m *MessageMutation) ClearThread()
ClearThread clears the "thread" edge to the Thread entity.
func (*MessageMutation) ClearedEdges ¶
func (m *MessageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MessageMutation) ClearedFields ¶
func (m *MessageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MessageMutation) Client ¶
func (m MessageMutation) 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 (*MessageMutation) Date ¶
func (m *MessageMutation) Date() (r time.Time, exists bool)
Date returns the value of the "date" field in the mutation.
func (*MessageMutation) EdgeCleared ¶
func (m *MessageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MessageMutation) ExecContext ¶
func (c *MessageMutation) 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 (*MessageMutation) Field ¶
func (m *MessageMutation) 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 (*MessageMutation) FieldCleared ¶
func (m *MessageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MessageMutation) Fields ¶
func (m *MessageMutation) 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 (*MessageMutation) From ¶
func (m *MessageMutation) From() (r string, exists bool)
From returns the value of the "from" field in the mutation.
func (*MessageMutation) ID ¶
func (m *MessageMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MessageMutation) IDs ¶
func (m *MessageMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MessageMutation) IsSent ¶
func (m *MessageMutation) IsSent() (r bool, exists bool)
IsSent returns the value of the "is_sent" field in the mutation.
func (*MessageMutation) OldAttachments ¶
func (m *MessageMutation) OldAttachments(ctx context.Context) (v []provider.AttachmentMeta, err error)
OldAttachments returns the old "attachments" field's value of the Message entity. If the Message 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 (*MessageMutation) OldBodyText ¶
func (m *MessageMutation) OldBodyText(ctx context.Context) (v string, err error)
OldBodyText returns the old "body_text" field's value of the Message entity. If the Message 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 (*MessageMutation) OldCc ¶
func (m *MessageMutation) OldCc(ctx context.Context) (v []string, err error)
OldCc returns the old "cc" field's value of the Message entity. If the Message 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 (*MessageMutation) OldDate ¶
OldDate returns the old "date" field's value of the Message entity. If the Message 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 (*MessageMutation) 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 (*MessageMutation) OldFrom ¶
func (m *MessageMutation) OldFrom(ctx context.Context) (v string, err error)
OldFrom returns the old "from" field's value of the Message entity. If the Message 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 (*MessageMutation) OldIsSent ¶
func (m *MessageMutation) OldIsSent(ctx context.Context) (v bool, err error)
OldIsSent returns the old "is_sent" field's value of the Message entity. If the Message 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 (*MessageMutation) OldProviderMessageID ¶
func (m *MessageMutation) OldProviderMessageID(ctx context.Context) (v string, err error)
OldProviderMessageID returns the old "provider_message_id" field's value of the Message entity. If the Message 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 (*MessageMutation) OldReplyHeaders ¶
OldReplyHeaders returns the old "reply_headers" field's value of the Message entity. If the Message 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 (*MessageMutation) OldRfc822MessageID ¶
func (m *MessageMutation) OldRfc822MessageID(ctx context.Context) (v string, err error)
OldRfc822MessageID returns the old "rfc822_message_id" field's value of the Message entity. If the Message 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 (*MessageMutation) OldSnippet ¶
func (m *MessageMutation) OldSnippet(ctx context.Context) (v string, err error)
OldSnippet returns the old "snippet" field's value of the Message entity. If the Message 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 (*MessageMutation) OldTo ¶
func (m *MessageMutation) OldTo(ctx context.Context) (v []string, err error)
OldTo returns the old "to" field's value of the Message entity. If the Message 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 (*MessageMutation) ProviderMessageID ¶
func (m *MessageMutation) ProviderMessageID() (r string, exists bool)
ProviderMessageID returns the value of the "provider_message_id" field in the mutation.
func (*MessageMutation) QueryContext ¶
func (c *MessageMutation) 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 (*MessageMutation) RemovedEdges ¶
func (m *MessageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MessageMutation) RemovedIDs ¶
func (m *MessageMutation) 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 (*MessageMutation) ReplyHeaders ¶
func (m *MessageMutation) ReplyHeaders() (r map[string]string, exists bool)
ReplyHeaders returns the value of the "reply_headers" field in the mutation.
func (*MessageMutation) ResetAttachments ¶
func (m *MessageMutation) ResetAttachments()
ResetAttachments resets all changes to the "attachments" field.
func (*MessageMutation) ResetBodyText ¶
func (m *MessageMutation) ResetBodyText()
ResetBodyText resets all changes to the "body_text" field.
func (*MessageMutation) ResetCc ¶
func (m *MessageMutation) ResetCc()
ResetCc resets all changes to the "cc" field.
func (*MessageMutation) ResetDate ¶
func (m *MessageMutation) ResetDate()
ResetDate resets all changes to the "date" field.
func (*MessageMutation) ResetEdge ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetField ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetFrom ¶
func (m *MessageMutation) ResetFrom()
ResetFrom resets all changes to the "from" field.
func (*MessageMutation) ResetIsSent ¶
func (m *MessageMutation) ResetIsSent()
ResetIsSent resets all changes to the "is_sent" field.
func (*MessageMutation) ResetProviderMessageID ¶
func (m *MessageMutation) ResetProviderMessageID()
ResetProviderMessageID resets all changes to the "provider_message_id" field.
func (*MessageMutation) ResetReplyHeaders ¶
func (m *MessageMutation) ResetReplyHeaders()
ResetReplyHeaders resets all changes to the "reply_headers" field.
func (*MessageMutation) ResetRfc822MessageID ¶
func (m *MessageMutation) ResetRfc822MessageID()
ResetRfc822MessageID resets all changes to the "rfc822_message_id" field.
func (*MessageMutation) ResetSnippet ¶
func (m *MessageMutation) ResetSnippet()
ResetSnippet resets all changes to the "snippet" field.
func (*MessageMutation) ResetThread ¶
func (m *MessageMutation) ResetThread()
ResetThread resets all changes to the "thread" edge.
func (*MessageMutation) ResetTo ¶
func (m *MessageMutation) ResetTo()
ResetTo resets all changes to the "to" field.
func (*MessageMutation) Rfc822MessageID ¶
func (m *MessageMutation) Rfc822MessageID() (r string, exists bool)
Rfc822MessageID returns the value of the "rfc822_message_id" field in the mutation.
func (*MessageMutation) SetAttachments ¶
func (m *MessageMutation) SetAttachments(pm []provider.AttachmentMeta)
SetAttachments sets the "attachments" field.
func (*MessageMutation) SetBodyText ¶
func (m *MessageMutation) SetBodyText(s string)
SetBodyText sets the "body_text" field.
func (*MessageMutation) SetCc ¶
func (m *MessageMutation) SetCc(s []string)
SetCc sets the "cc" field.
func (*MessageMutation) SetDate ¶
func (m *MessageMutation) SetDate(t time.Time)
SetDate sets the "date" field.
func (*MessageMutation) SetField ¶
func (m *MessageMutation) 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 (*MessageMutation) SetFrom ¶
func (m *MessageMutation) SetFrom(s string)
SetFrom sets the "from" field.
func (*MessageMutation) SetIsSent ¶
func (m *MessageMutation) SetIsSent(b bool)
SetIsSent sets the "is_sent" field.
func (*MessageMutation) SetOp ¶
func (m *MessageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MessageMutation) SetProviderMessageID ¶
func (m *MessageMutation) SetProviderMessageID(s string)
SetProviderMessageID sets the "provider_message_id" field.
func (*MessageMutation) SetReplyHeaders ¶
func (m *MessageMutation) SetReplyHeaders(value map[string]string)
SetReplyHeaders sets the "reply_headers" field.
func (*MessageMutation) SetRfc822MessageID ¶
func (m *MessageMutation) SetRfc822MessageID(s string)
SetRfc822MessageID sets the "rfc822_message_id" field.
func (*MessageMutation) SetSnippet ¶
func (m *MessageMutation) SetSnippet(s string)
SetSnippet sets the "snippet" field.
func (*MessageMutation) SetThreadID ¶
func (m *MessageMutation) SetThreadID(id int)
SetThreadID sets the "thread" edge to the Thread entity by id.
func (*MessageMutation) SetTo ¶
func (m *MessageMutation) SetTo(s []string)
SetTo sets the "to" field.
func (*MessageMutation) Snippet ¶
func (m *MessageMutation) Snippet() (r string, exists bool)
Snippet returns the value of the "snippet" field in the mutation.
func (*MessageMutation) ThreadCleared ¶
func (m *MessageMutation) ThreadCleared() bool
ThreadCleared reports if the "thread" edge to the Thread entity was cleared.
func (*MessageMutation) ThreadID ¶
func (m *MessageMutation) ThreadID() (id int, exists bool)
ThreadID returns the "thread" edge ID in the mutation.
func (*MessageMutation) ThreadIDs ¶
func (m *MessageMutation) ThreadIDs() (ids []int)
ThreadIDs returns the "thread" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ThreadID instead. It exists only for internal usage by the builders.
func (*MessageMutation) To ¶
func (m *MessageMutation) To() (r []string, exists bool)
To returns the value of the "to" field in the mutation.
func (MessageMutation) Tx ¶
func (m MessageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MessageMutation) Type ¶
func (m *MessageMutation) Type() string
Type returns the node type of this mutation (Message).
func (*MessageMutation) Where ¶
func (m *MessageMutation) Where(ps ...predicate.Message)
Where appends a list predicates to the MessageMutation builder.
func (*MessageMutation) WhereP ¶
func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MessageQuery ¶
type MessageQuery struct {
// contains filtered or unexported fields
}
MessageQuery is the builder for querying Message entities.
func (*MessageQuery) Aggregate ¶
func (_q *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate returns a MessageSelect configured with the given aggregations.
func (*MessageQuery) All ¶
func (_q *MessageQuery) All(ctx context.Context) ([]*Message, error)
All executes the query and returns a list of Messages.
func (*MessageQuery) AllX ¶
func (_q *MessageQuery) AllX(ctx context.Context) []*Message
AllX is like All, but panics if an error occurs.
func (*MessageQuery) Clone ¶
func (_q *MessageQuery) Clone() *MessageQuery
Clone returns a duplicate of the MessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MessageQuery) Count ¶
func (_q *MessageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MessageQuery) CountX ¶
func (_q *MessageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MessageQuery) ExecContext ¶
func (c *MessageQuery) 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 (*MessageQuery) Exist ¶
func (_q *MessageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MessageQuery) ExistX ¶
func (_q *MessageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MessageQuery) First ¶
func (_q *MessageQuery) First(ctx context.Context) (*Message, error)
First returns the first Message entity from the query. Returns a *NotFoundError when no Message was found.
func (*MessageQuery) FirstID ¶
func (_q *MessageQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Message ID from the query. Returns a *NotFoundError when no Message ID was found.
func (*MessageQuery) FirstIDX ¶
func (_q *MessageQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MessageQuery) FirstX ¶
func (_q *MessageQuery) FirstX(ctx context.Context) *Message
FirstX is like First, but panics if an error occurs.
func (*MessageQuery) GroupBy ¶
func (_q *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
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 {
ProviderMessageID string `json:"provider_message_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Message.Query().
GroupBy(message.FieldProviderMessageID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*MessageQuery) IDs ¶
func (_q *MessageQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Message IDs.
func (*MessageQuery) IDsX ¶
func (_q *MessageQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MessageQuery) Limit ¶
func (_q *MessageQuery) Limit(limit int) *MessageQuery
Limit the number of records to be returned by this query.
func (*MessageQuery) Modify ¶
func (_q *MessageQuery) Modify(modifiers ...func(s *sql.Selector)) *MessageSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*MessageQuery) Offset ¶
func (_q *MessageQuery) Offset(offset int) *MessageQuery
Offset to start from.
func (*MessageQuery) Only ¶
func (_q *MessageQuery) Only(ctx context.Context) (*Message, error)
Only returns a single Message entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Message entity is found. Returns a *NotFoundError when no Message entities are found.
func (*MessageQuery) OnlyID ¶
func (_q *MessageQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Message ID in the query. Returns a *NotSingularError when more than one Message ID is found. Returns a *NotFoundError when no entities are found.
func (*MessageQuery) OnlyIDX ¶
func (_q *MessageQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MessageQuery) OnlyX ¶
func (_q *MessageQuery) OnlyX(ctx context.Context) *Message
OnlyX is like Only, but panics if an error occurs.
func (*MessageQuery) Order ¶
func (_q *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
Order specifies how the records should be ordered.
func (*MessageQuery) QueryContext ¶
func (c *MessageQuery) 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 (*MessageQuery) QueryThread ¶
func (_q *MessageQuery) QueryThread() *ThreadQuery
QueryThread chains the current query on the "thread" edge.
func (*MessageQuery) Select ¶
func (_q *MessageQuery) Select(fields ...string) *MessageSelect
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 {
ProviderMessageID string `json:"provider_message_id,omitempty"`
}
client.Message.Query().
Select(message.FieldProviderMessageID).
Scan(ctx, &v)
func (*MessageQuery) Unique ¶
func (_q *MessageQuery) Unique(unique bool) *MessageQuery
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 (*MessageQuery) Where ¶
func (_q *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
Where adds a new predicate for the MessageQuery builder.
func (*MessageQuery) WithThread ¶
func (_q *MessageQuery) WithThread(opts ...func(*ThreadQuery)) *MessageQuery
WithThread tells the query-builder to eager-load the nodes that are connected to the "thread" edge. The optional arguments are used to configure the query builder of the edge.
type MessageSelect ¶
type MessageSelect struct {
*MessageQuery
// contains filtered or unexported fields
}
MessageSelect is the builder for selecting fields of Message entities.
func (*MessageSelect) Aggregate ¶
func (_s *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MessageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (MessageSelect) ExecContext ¶
func (c MessageSelect) 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 (*MessageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Modify ¶
func (_s *MessageSelect) Modify(modifiers ...func(s *sql.Selector)) *MessageSelect
Modify adds a query modifier for attaching custom logic to queries.
func (MessageSelect) QueryContext ¶
func (c MessageSelect) 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 (*MessageSelect) Scan ¶
func (_s *MessageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageUpdate ¶
type MessageUpdate struct {
// contains filtered or unexported fields
}
MessageUpdate is the builder for updating Message entities.
func (*MessageUpdate) AppendAttachments ¶
func (_u *MessageUpdate) AppendAttachments(v []provider.AttachmentMeta) *MessageUpdate
AppendAttachments appends value to the "attachments" field.
func (*MessageUpdate) AppendCc ¶
func (_u *MessageUpdate) AppendCc(v []string) *MessageUpdate
AppendCc appends value to the "cc" field.
func (*MessageUpdate) AppendTo ¶
func (_u *MessageUpdate) AppendTo(v []string) *MessageUpdate
AppendTo appends value to the "to" field.
func (*MessageUpdate) ClearAttachments ¶
func (_u *MessageUpdate) ClearAttachments() *MessageUpdate
ClearAttachments clears the value of the "attachments" field.
func (*MessageUpdate) ClearThread ¶
func (_u *MessageUpdate) ClearThread() *MessageUpdate
ClearThread clears the "thread" edge to the Thread entity.
func (*MessageUpdate) Exec ¶
func (_u *MessageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageUpdate) ExecContext ¶
func (c *MessageUpdate) 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 (*MessageUpdate) ExecX ¶
func (_u *MessageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdate) Modify ¶
func (_u *MessageUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MessageUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*MessageUpdate) Mutation ¶
func (_u *MessageUpdate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdate) QueryContext ¶
func (c *MessageUpdate) 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 (*MessageUpdate) Save ¶
func (_u *MessageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MessageUpdate) SaveX ¶
func (_u *MessageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdate) SetAttachments ¶
func (_u *MessageUpdate) SetAttachments(v []provider.AttachmentMeta) *MessageUpdate
SetAttachments sets the "attachments" field.
func (*MessageUpdate) SetBodyText ¶
func (_u *MessageUpdate) SetBodyText(v string) *MessageUpdate
SetBodyText sets the "body_text" field.
func (*MessageUpdate) SetCc ¶
func (_u *MessageUpdate) SetCc(v []string) *MessageUpdate
SetCc sets the "cc" field.
func (*MessageUpdate) SetDate ¶
func (_u *MessageUpdate) SetDate(v time.Time) *MessageUpdate
SetDate sets the "date" field.
func (*MessageUpdate) SetFrom ¶
func (_u *MessageUpdate) SetFrom(v string) *MessageUpdate
SetFrom sets the "from" field.
func (*MessageUpdate) SetIsSent ¶
func (_u *MessageUpdate) SetIsSent(v bool) *MessageUpdate
SetIsSent sets the "is_sent" field.
func (*MessageUpdate) SetNillableBodyText ¶
func (_u *MessageUpdate) SetNillableBodyText(v *string) *MessageUpdate
SetNillableBodyText sets the "body_text" field if the given value is not nil.
func (*MessageUpdate) SetNillableDate ¶
func (_u *MessageUpdate) SetNillableDate(v *time.Time) *MessageUpdate
SetNillableDate sets the "date" field if the given value is not nil.
func (*MessageUpdate) SetNillableFrom ¶
func (_u *MessageUpdate) SetNillableFrom(v *string) *MessageUpdate
SetNillableFrom sets the "from" field if the given value is not nil.
func (*MessageUpdate) SetNillableIsSent ¶
func (_u *MessageUpdate) SetNillableIsSent(v *bool) *MessageUpdate
SetNillableIsSent sets the "is_sent" field if the given value is not nil.
func (*MessageUpdate) SetNillableProviderMessageID ¶
func (_u *MessageUpdate) SetNillableProviderMessageID(v *string) *MessageUpdate
SetNillableProviderMessageID sets the "provider_message_id" field if the given value is not nil.
func (*MessageUpdate) SetNillableRfc822MessageID ¶
func (_u *MessageUpdate) SetNillableRfc822MessageID(v *string) *MessageUpdate
SetNillableRfc822MessageID sets the "rfc822_message_id" field if the given value is not nil.
func (*MessageUpdate) SetNillableSnippet ¶
func (_u *MessageUpdate) SetNillableSnippet(v *string) *MessageUpdate
SetNillableSnippet sets the "snippet" field if the given value is not nil.
func (*MessageUpdate) SetProviderMessageID ¶
func (_u *MessageUpdate) SetProviderMessageID(v string) *MessageUpdate
SetProviderMessageID sets the "provider_message_id" field.
func (*MessageUpdate) SetReplyHeaders ¶
func (_u *MessageUpdate) SetReplyHeaders(v map[string]string) *MessageUpdate
SetReplyHeaders sets the "reply_headers" field.
func (*MessageUpdate) SetRfc822MessageID ¶
func (_u *MessageUpdate) SetRfc822MessageID(v string) *MessageUpdate
SetRfc822MessageID sets the "rfc822_message_id" field.
func (*MessageUpdate) SetSnippet ¶
func (_u *MessageUpdate) SetSnippet(v string) *MessageUpdate
SetSnippet sets the "snippet" field.
func (*MessageUpdate) SetThread ¶
func (_u *MessageUpdate) SetThread(v *Thread) *MessageUpdate
SetThread sets the "thread" edge to the Thread entity.
func (*MessageUpdate) SetThreadID ¶
func (_u *MessageUpdate) SetThreadID(id int) *MessageUpdate
SetThreadID sets the "thread" edge to the Thread entity by ID.
func (*MessageUpdate) SetTo ¶
func (_u *MessageUpdate) SetTo(v []string) *MessageUpdate
SetTo sets the "to" field.
func (*MessageUpdate) Where ¶
func (_u *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
Where appends a list predicates to the MessageUpdate builder.
type MessageUpdateOne ¶
type MessageUpdateOne struct {
// contains filtered or unexported fields
}
MessageUpdateOne is the builder for updating a single Message entity.
func (*MessageUpdateOne) AppendAttachments ¶
func (_u *MessageUpdateOne) AppendAttachments(v []provider.AttachmentMeta) *MessageUpdateOne
AppendAttachments appends value to the "attachments" field.
func (*MessageUpdateOne) AppendCc ¶
func (_u *MessageUpdateOne) AppendCc(v []string) *MessageUpdateOne
AppendCc appends value to the "cc" field.
func (*MessageUpdateOne) AppendTo ¶
func (_u *MessageUpdateOne) AppendTo(v []string) *MessageUpdateOne
AppendTo appends value to the "to" field.
func (*MessageUpdateOne) ClearAttachments ¶
func (_u *MessageUpdateOne) ClearAttachments() *MessageUpdateOne
ClearAttachments clears the value of the "attachments" field.
func (*MessageUpdateOne) ClearThread ¶
func (_u *MessageUpdateOne) ClearThread() *MessageUpdateOne
ClearThread clears the "thread" edge to the Thread entity.
func (*MessageUpdateOne) Exec ¶
func (_u *MessageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MessageUpdateOne) ExecContext ¶
func (c *MessageUpdateOne) 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 (*MessageUpdateOne) ExecX ¶
func (_u *MessageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdateOne) Modify ¶
func (_u *MessageUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MessageUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*MessageUpdateOne) Mutation ¶
func (_u *MessageUpdateOne) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdateOne) QueryContext ¶
func (c *MessageUpdateOne) 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 (*MessageUpdateOne) Save ¶
func (_u *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
Save executes the query and returns the updated Message entity.
func (*MessageUpdateOne) SaveX ¶
func (_u *MessageUpdateOne) SaveX(ctx context.Context) *Message
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdateOne) Select ¶
func (_u *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MessageUpdateOne) SetAttachments ¶
func (_u *MessageUpdateOne) SetAttachments(v []provider.AttachmentMeta) *MessageUpdateOne
SetAttachments sets the "attachments" field.
func (*MessageUpdateOne) SetBodyText ¶
func (_u *MessageUpdateOne) SetBodyText(v string) *MessageUpdateOne
SetBodyText sets the "body_text" field.
func (*MessageUpdateOne) SetCc ¶
func (_u *MessageUpdateOne) SetCc(v []string) *MessageUpdateOne
SetCc sets the "cc" field.
func (*MessageUpdateOne) SetDate ¶
func (_u *MessageUpdateOne) SetDate(v time.Time) *MessageUpdateOne
SetDate sets the "date" field.
func (*MessageUpdateOne) SetFrom ¶
func (_u *MessageUpdateOne) SetFrom(v string) *MessageUpdateOne
SetFrom sets the "from" field.
func (*MessageUpdateOne) SetIsSent ¶
func (_u *MessageUpdateOne) SetIsSent(v bool) *MessageUpdateOne
SetIsSent sets the "is_sent" field.
func (*MessageUpdateOne) SetNillableBodyText ¶
func (_u *MessageUpdateOne) SetNillableBodyText(v *string) *MessageUpdateOne
SetNillableBodyText sets the "body_text" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableDate ¶
func (_u *MessageUpdateOne) SetNillableDate(v *time.Time) *MessageUpdateOne
SetNillableDate sets the "date" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableFrom ¶
func (_u *MessageUpdateOne) SetNillableFrom(v *string) *MessageUpdateOne
SetNillableFrom sets the "from" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableIsSent ¶
func (_u *MessageUpdateOne) SetNillableIsSent(v *bool) *MessageUpdateOne
SetNillableIsSent sets the "is_sent" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableProviderMessageID ¶
func (_u *MessageUpdateOne) SetNillableProviderMessageID(v *string) *MessageUpdateOne
SetNillableProviderMessageID sets the "provider_message_id" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableRfc822MessageID ¶
func (_u *MessageUpdateOne) SetNillableRfc822MessageID(v *string) *MessageUpdateOne
SetNillableRfc822MessageID sets the "rfc822_message_id" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableSnippet ¶
func (_u *MessageUpdateOne) SetNillableSnippet(v *string) *MessageUpdateOne
SetNillableSnippet sets the "snippet" field if the given value is not nil.
func (*MessageUpdateOne) SetProviderMessageID ¶
func (_u *MessageUpdateOne) SetProviderMessageID(v string) *MessageUpdateOne
SetProviderMessageID sets the "provider_message_id" field.
func (*MessageUpdateOne) SetReplyHeaders ¶
func (_u *MessageUpdateOne) SetReplyHeaders(v map[string]string) *MessageUpdateOne
SetReplyHeaders sets the "reply_headers" field.
func (*MessageUpdateOne) SetRfc822MessageID ¶
func (_u *MessageUpdateOne) SetRfc822MessageID(v string) *MessageUpdateOne
SetRfc822MessageID sets the "rfc822_message_id" field.
func (*MessageUpdateOne) SetSnippet ¶
func (_u *MessageUpdateOne) SetSnippet(v string) *MessageUpdateOne
SetSnippet sets the "snippet" field.
func (*MessageUpdateOne) SetThread ¶
func (_u *MessageUpdateOne) SetThread(v *Thread) *MessageUpdateOne
SetThread sets the "thread" edge to the Thread entity.
func (*MessageUpdateOne) SetThreadID ¶
func (_u *MessageUpdateOne) SetThreadID(id int) *MessageUpdateOne
SetThreadID sets the "thread" edge to the Thread entity by ID.
func (*MessageUpdateOne) SetTo ¶
func (_u *MessageUpdateOne) SetTo(v []string) *MessageUpdateOne
SetTo sets the "to" field.
func (*MessageUpdateOne) Where ¶
func (_u *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
Where appends a list predicates to the MessageUpdate builder.
type MessageUpsert ¶
MessageUpsert is the "OnConflict" setter.
func (*MessageUpsert) ClearAttachments ¶
func (u *MessageUpsert) ClearAttachments() *MessageUpsert
ClearAttachments clears the value of the "attachments" field.
func (*MessageUpsert) SetAttachments ¶
func (u *MessageUpsert) SetAttachments(v []provider.AttachmentMeta) *MessageUpsert
SetAttachments sets the "attachments" field.
func (*MessageUpsert) SetBodyText ¶
func (u *MessageUpsert) SetBodyText(v string) *MessageUpsert
SetBodyText sets the "body_text" field.
func (*MessageUpsert) SetCc ¶
func (u *MessageUpsert) SetCc(v []string) *MessageUpsert
SetCc sets the "cc" field.
func (*MessageUpsert) SetDate ¶
func (u *MessageUpsert) SetDate(v time.Time) *MessageUpsert
SetDate sets the "date" field.
func (*MessageUpsert) SetFrom ¶
func (u *MessageUpsert) SetFrom(v string) *MessageUpsert
SetFrom sets the "from" field.
func (*MessageUpsert) SetIsSent ¶
func (u *MessageUpsert) SetIsSent(v bool) *MessageUpsert
SetIsSent sets the "is_sent" field.
func (*MessageUpsert) SetProviderMessageID ¶
func (u *MessageUpsert) SetProviderMessageID(v string) *MessageUpsert
SetProviderMessageID sets the "provider_message_id" field.
func (*MessageUpsert) SetReplyHeaders ¶
func (u *MessageUpsert) SetReplyHeaders(v map[string]string) *MessageUpsert
SetReplyHeaders sets the "reply_headers" field.
func (*MessageUpsert) SetRfc822MessageID ¶
func (u *MessageUpsert) SetRfc822MessageID(v string) *MessageUpsert
SetRfc822MessageID sets the "rfc822_message_id" field.
func (*MessageUpsert) SetSnippet ¶
func (u *MessageUpsert) SetSnippet(v string) *MessageUpsert
SetSnippet sets the "snippet" field.
func (*MessageUpsert) SetTo ¶
func (u *MessageUpsert) SetTo(v []string) *MessageUpsert
SetTo sets the "to" field.
func (*MessageUpsert) UpdateAttachments ¶
func (u *MessageUpsert) UpdateAttachments() *MessageUpsert
UpdateAttachments sets the "attachments" field to the value that was provided on create.
func (*MessageUpsert) UpdateBodyText ¶
func (u *MessageUpsert) UpdateBodyText() *MessageUpsert
UpdateBodyText sets the "body_text" field to the value that was provided on create.
func (*MessageUpsert) UpdateCc ¶
func (u *MessageUpsert) UpdateCc() *MessageUpsert
UpdateCc sets the "cc" field to the value that was provided on create.
func (*MessageUpsert) UpdateDate ¶
func (u *MessageUpsert) UpdateDate() *MessageUpsert
UpdateDate sets the "date" field to the value that was provided on create.
func (*MessageUpsert) UpdateFrom ¶
func (u *MessageUpsert) UpdateFrom() *MessageUpsert
UpdateFrom sets the "from" field to the value that was provided on create.
func (*MessageUpsert) UpdateIsSent ¶
func (u *MessageUpsert) UpdateIsSent() *MessageUpsert
UpdateIsSent sets the "is_sent" field to the value that was provided on create.
func (*MessageUpsert) UpdateProviderMessageID ¶
func (u *MessageUpsert) UpdateProviderMessageID() *MessageUpsert
UpdateProviderMessageID sets the "provider_message_id" field to the value that was provided on create.
func (*MessageUpsert) UpdateReplyHeaders ¶
func (u *MessageUpsert) UpdateReplyHeaders() *MessageUpsert
UpdateReplyHeaders sets the "reply_headers" field to the value that was provided on create.
func (*MessageUpsert) UpdateRfc822MessageID ¶
func (u *MessageUpsert) UpdateRfc822MessageID() *MessageUpsert
UpdateRfc822MessageID sets the "rfc822_message_id" field to the value that was provided on create.
func (*MessageUpsert) UpdateSnippet ¶
func (u *MessageUpsert) UpdateSnippet() *MessageUpsert
UpdateSnippet sets the "snippet" field to the value that was provided on create.
func (*MessageUpsert) UpdateTo ¶
func (u *MessageUpsert) UpdateTo() *MessageUpsert
UpdateTo sets the "to" field to the value that was provided on create.
type MessageUpsertBulk ¶
type MessageUpsertBulk struct {
// contains filtered or unexported fields
}
MessageUpsertBulk is the builder for "upsert"-ing a bulk of Message nodes.
func (*MessageUpsertBulk) ClearAttachments ¶
func (u *MessageUpsertBulk) ClearAttachments() *MessageUpsertBulk
ClearAttachments clears the value of the "attachments" field.
func (*MessageUpsertBulk) DoNothing ¶
func (u *MessageUpsertBulk) DoNothing() *MessageUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MessageUpsertBulk) Exec ¶
func (u *MessageUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageUpsertBulk) ExecX ¶
func (u *MessageUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpsertBulk) Ignore ¶
func (u *MessageUpsertBulk) Ignore() *MessageUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Message.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MessageUpsertBulk) SetAttachments ¶
func (u *MessageUpsertBulk) SetAttachments(v []provider.AttachmentMeta) *MessageUpsertBulk
SetAttachments sets the "attachments" field.
func (*MessageUpsertBulk) SetBodyText ¶
func (u *MessageUpsertBulk) SetBodyText(v string) *MessageUpsertBulk
SetBodyText sets the "body_text" field.
func (*MessageUpsertBulk) SetCc ¶
func (u *MessageUpsertBulk) SetCc(v []string) *MessageUpsertBulk
SetCc sets the "cc" field.
func (*MessageUpsertBulk) SetDate ¶
func (u *MessageUpsertBulk) SetDate(v time.Time) *MessageUpsertBulk
SetDate sets the "date" field.
func (*MessageUpsertBulk) SetFrom ¶
func (u *MessageUpsertBulk) SetFrom(v string) *MessageUpsertBulk
SetFrom sets the "from" field.
func (*MessageUpsertBulk) SetIsSent ¶
func (u *MessageUpsertBulk) SetIsSent(v bool) *MessageUpsertBulk
SetIsSent sets the "is_sent" field.
func (*MessageUpsertBulk) SetProviderMessageID ¶
func (u *MessageUpsertBulk) SetProviderMessageID(v string) *MessageUpsertBulk
SetProviderMessageID sets the "provider_message_id" field.
func (*MessageUpsertBulk) SetReplyHeaders ¶
func (u *MessageUpsertBulk) SetReplyHeaders(v map[string]string) *MessageUpsertBulk
SetReplyHeaders sets the "reply_headers" field.
func (*MessageUpsertBulk) SetRfc822MessageID ¶
func (u *MessageUpsertBulk) SetRfc822MessageID(v string) *MessageUpsertBulk
SetRfc822MessageID sets the "rfc822_message_id" field.
func (*MessageUpsertBulk) SetSnippet ¶
func (u *MessageUpsertBulk) SetSnippet(v string) *MessageUpsertBulk
SetSnippet sets the "snippet" field.
func (*MessageUpsertBulk) SetTo ¶
func (u *MessageUpsertBulk) SetTo(v []string) *MessageUpsertBulk
SetTo sets the "to" field.
func (*MessageUpsertBulk) Update ¶
func (u *MessageUpsertBulk) Update(set func(*MessageUpsert)) *MessageUpsertBulk
Update allows overriding fields `UPDATE` values. See the MessageCreateBulk.OnConflict documentation for more info.
func (*MessageUpsertBulk) UpdateAttachments ¶
func (u *MessageUpsertBulk) UpdateAttachments() *MessageUpsertBulk
UpdateAttachments sets the "attachments" field to the value that was provided on create.
func (*MessageUpsertBulk) UpdateBodyText ¶
func (u *MessageUpsertBulk) UpdateBodyText() *MessageUpsertBulk
UpdateBodyText sets the "body_text" field to the value that was provided on create.
func (*MessageUpsertBulk) UpdateCc ¶
func (u *MessageUpsertBulk) UpdateCc() *MessageUpsertBulk
UpdateCc sets the "cc" field to the value that was provided on create.
func (*MessageUpsertBulk) UpdateDate ¶
func (u *MessageUpsertBulk) UpdateDate() *MessageUpsertBulk
UpdateDate sets the "date" field to the value that was provided on create.
func (*MessageUpsertBulk) UpdateFrom ¶
func (u *MessageUpsertBulk) UpdateFrom() *MessageUpsertBulk
UpdateFrom sets the "from" field to the value that was provided on create.
func (*MessageUpsertBulk) UpdateIsSent ¶
func (u *MessageUpsertBulk) UpdateIsSent() *MessageUpsertBulk
UpdateIsSent sets the "is_sent" field to the value that was provided on create.
func (*MessageUpsertBulk) UpdateNewValues ¶
func (u *MessageUpsertBulk) UpdateNewValues() *MessageUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Message.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*MessageUpsertBulk) UpdateProviderMessageID ¶
func (u *MessageUpsertBulk) UpdateProviderMessageID() *MessageUpsertBulk
UpdateProviderMessageID sets the "provider_message_id" field to the value that was provided on create.
func (*MessageUpsertBulk) UpdateReplyHeaders ¶
func (u *MessageUpsertBulk) UpdateReplyHeaders() *MessageUpsertBulk
UpdateReplyHeaders sets the "reply_headers" field to the value that was provided on create.
func (*MessageUpsertBulk) UpdateRfc822MessageID ¶
func (u *MessageUpsertBulk) UpdateRfc822MessageID() *MessageUpsertBulk
UpdateRfc822MessageID sets the "rfc822_message_id" field to the value that was provided on create.
func (*MessageUpsertBulk) UpdateSnippet ¶
func (u *MessageUpsertBulk) UpdateSnippet() *MessageUpsertBulk
UpdateSnippet sets the "snippet" field to the value that was provided on create.
func (*MessageUpsertBulk) UpdateTo ¶
func (u *MessageUpsertBulk) UpdateTo() *MessageUpsertBulk
UpdateTo sets the "to" field to the value that was provided on create.
type MessageUpsertOne ¶
type MessageUpsertOne struct {
// contains filtered or unexported fields
}
MessageUpsertOne is the builder for "upsert"-ing
one Message node.
func (*MessageUpsertOne) ClearAttachments ¶
func (u *MessageUpsertOne) ClearAttachments() *MessageUpsertOne
ClearAttachments clears the value of the "attachments" field.
func (*MessageUpsertOne) DoNothing ¶
func (u *MessageUpsertOne) DoNothing() *MessageUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MessageUpsertOne) Exec ¶
func (u *MessageUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageUpsertOne) ExecX ¶
func (u *MessageUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpsertOne) ID ¶
func (u *MessageUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*MessageUpsertOne) IDX ¶
func (u *MessageUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*MessageUpsertOne) Ignore ¶
func (u *MessageUpsertOne) Ignore() *MessageUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Message.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*MessageUpsertOne) SetAttachments ¶
func (u *MessageUpsertOne) SetAttachments(v []provider.AttachmentMeta) *MessageUpsertOne
SetAttachments sets the "attachments" field.
func (*MessageUpsertOne) SetBodyText ¶
func (u *MessageUpsertOne) SetBodyText(v string) *MessageUpsertOne
SetBodyText sets the "body_text" field.
func (*MessageUpsertOne) SetCc ¶
func (u *MessageUpsertOne) SetCc(v []string) *MessageUpsertOne
SetCc sets the "cc" field.
func (*MessageUpsertOne) SetDate ¶
func (u *MessageUpsertOne) SetDate(v time.Time) *MessageUpsertOne
SetDate sets the "date" field.
func (*MessageUpsertOne) SetFrom ¶
func (u *MessageUpsertOne) SetFrom(v string) *MessageUpsertOne
SetFrom sets the "from" field.
func (*MessageUpsertOne) SetIsSent ¶
func (u *MessageUpsertOne) SetIsSent(v bool) *MessageUpsertOne
SetIsSent sets the "is_sent" field.
func (*MessageUpsertOne) SetProviderMessageID ¶
func (u *MessageUpsertOne) SetProviderMessageID(v string) *MessageUpsertOne
SetProviderMessageID sets the "provider_message_id" field.
func (*MessageUpsertOne) SetReplyHeaders ¶
func (u *MessageUpsertOne) SetReplyHeaders(v map[string]string) *MessageUpsertOne
SetReplyHeaders sets the "reply_headers" field.
func (*MessageUpsertOne) SetRfc822MessageID ¶
func (u *MessageUpsertOne) SetRfc822MessageID(v string) *MessageUpsertOne
SetRfc822MessageID sets the "rfc822_message_id" field.
func (*MessageUpsertOne) SetSnippet ¶
func (u *MessageUpsertOne) SetSnippet(v string) *MessageUpsertOne
SetSnippet sets the "snippet" field.
func (*MessageUpsertOne) SetTo ¶
func (u *MessageUpsertOne) SetTo(v []string) *MessageUpsertOne
SetTo sets the "to" field.
func (*MessageUpsertOne) Update ¶
func (u *MessageUpsertOne) Update(set func(*MessageUpsert)) *MessageUpsertOne
Update allows overriding fields `UPDATE` values. See the MessageCreate.OnConflict documentation for more info.
func (*MessageUpsertOne) UpdateAttachments ¶
func (u *MessageUpsertOne) UpdateAttachments() *MessageUpsertOne
UpdateAttachments sets the "attachments" field to the value that was provided on create.
func (*MessageUpsertOne) UpdateBodyText ¶
func (u *MessageUpsertOne) UpdateBodyText() *MessageUpsertOne
UpdateBodyText sets the "body_text" field to the value that was provided on create.
func (*MessageUpsertOne) UpdateCc ¶
func (u *MessageUpsertOne) UpdateCc() *MessageUpsertOne
UpdateCc sets the "cc" field to the value that was provided on create.
func (*MessageUpsertOne) UpdateDate ¶
func (u *MessageUpsertOne) UpdateDate() *MessageUpsertOne
UpdateDate sets the "date" field to the value that was provided on create.
func (*MessageUpsertOne) UpdateFrom ¶
func (u *MessageUpsertOne) UpdateFrom() *MessageUpsertOne
UpdateFrom sets the "from" field to the value that was provided on create.
func (*MessageUpsertOne) UpdateIsSent ¶
func (u *MessageUpsertOne) UpdateIsSent() *MessageUpsertOne
UpdateIsSent sets the "is_sent" field to the value that was provided on create.
func (*MessageUpsertOne) UpdateNewValues ¶
func (u *MessageUpsertOne) UpdateNewValues() *MessageUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Message.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*MessageUpsertOne) UpdateProviderMessageID ¶
func (u *MessageUpsertOne) UpdateProviderMessageID() *MessageUpsertOne
UpdateProviderMessageID sets the "provider_message_id" field to the value that was provided on create.
func (*MessageUpsertOne) UpdateReplyHeaders ¶
func (u *MessageUpsertOne) UpdateReplyHeaders() *MessageUpsertOne
UpdateReplyHeaders sets the "reply_headers" field to the value that was provided on create.
func (*MessageUpsertOne) UpdateRfc822MessageID ¶
func (u *MessageUpsertOne) UpdateRfc822MessageID() *MessageUpsertOne
UpdateRfc822MessageID sets the "rfc822_message_id" field to the value that was provided on create.
func (*MessageUpsertOne) UpdateSnippet ¶
func (u *MessageUpsertOne) UpdateSnippet() *MessageUpsertOne
UpdateSnippet sets the "snippet" field to the value that was provided on create.
func (*MessageUpsertOne) UpdateTo ¶
func (u *MessageUpsertOne) UpdateTo() *MessageUpsertOne
UpdateTo sets the "to" field to the value that was provided on create.
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 NotifyRule ¶
type NotifyRule struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Label holds the value of the "label" field.
Label string `json:"label,omitempty"`
// Enabled holds the value of the "enabled" field.
Enabled bool `json:"enabled,omitempty"`
// Notify holds the value of the "notify" field.
Notify bool `json:"notify,omitempty"`
// Sound holds the value of the "sound" field.
Sound string `json:"sound,omitempty"`
// Urgency holds the value of the "urgency" field.
Urgency notifyrule.Urgency `json:"urgency,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the NotifyRuleQuery when eager-loading is set.
Edges NotifyRuleEdges `json:"edges"`
// contains filtered or unexported fields
}
NotifyRule is the model entity for the NotifyRule schema.
func (*NotifyRule) ExecContext ¶
func (c *NotifyRule) 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 (*NotifyRule) QueryAccount ¶
func (_m *NotifyRule) QueryAccount() *AccountQuery
QueryAccount queries the "account" edge of the NotifyRule entity.
func (*NotifyRule) QueryContext ¶
func (c *NotifyRule) 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 (*NotifyRule) String ¶
func (_m *NotifyRule) String() string
String implements the fmt.Stringer.
func (*NotifyRule) Unwrap ¶
func (_m *NotifyRule) Unwrap() *NotifyRule
Unwrap unwraps the NotifyRule 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 (*NotifyRule) Update ¶
func (_m *NotifyRule) Update() *NotifyRuleUpdateOne
Update returns a builder for updating this NotifyRule. Note that you need to call NotifyRule.Unwrap() before calling this method if this NotifyRule was returned from a transaction, and the transaction was committed or rolled back.
type NotifyRuleClient ¶
type NotifyRuleClient struct {
// contains filtered or unexported fields
}
NotifyRuleClient is a client for the NotifyRule schema.
func NewNotifyRuleClient ¶
func NewNotifyRuleClient(c config) *NotifyRuleClient
NewNotifyRuleClient returns a client for the NotifyRule from the given config.
func (*NotifyRuleClient) Create ¶
func (c *NotifyRuleClient) Create() *NotifyRuleCreate
Create returns a builder for creating a NotifyRule entity.
func (*NotifyRuleClient) CreateBulk ¶
func (c *NotifyRuleClient) CreateBulk(builders ...*NotifyRuleCreate) *NotifyRuleCreateBulk
CreateBulk returns a builder for creating a bulk of NotifyRule entities.
func (*NotifyRuleClient) Delete ¶
func (c *NotifyRuleClient) Delete() *NotifyRuleDelete
Delete returns a delete builder for NotifyRule.
func (*NotifyRuleClient) DeleteOne ¶
func (c *NotifyRuleClient) DeleteOne(_m *NotifyRule) *NotifyRuleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NotifyRuleClient) DeleteOneID ¶
func (c *NotifyRuleClient) DeleteOneID(id int) *NotifyRuleDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NotifyRuleClient) ExecContext ¶
func (c *NotifyRuleClient) 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 (*NotifyRuleClient) Get ¶
func (c *NotifyRuleClient) Get(ctx context.Context, id int) (*NotifyRule, error)
Get returns a NotifyRule entity by its id.
func (*NotifyRuleClient) GetX ¶
func (c *NotifyRuleClient) GetX(ctx context.Context, id int) *NotifyRule
GetX is like Get, but panics if an error occurs.
func (*NotifyRuleClient) Hooks ¶
func (c *NotifyRuleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NotifyRuleClient) Intercept ¶
func (c *NotifyRuleClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `notifyrule.Intercept(f(g(h())))`.
func (*NotifyRuleClient) Interceptors ¶
func (c *NotifyRuleClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NotifyRuleClient) MapCreateBulk ¶
func (c *NotifyRuleClient) MapCreateBulk(slice any, setFunc func(*NotifyRuleCreate, int)) *NotifyRuleCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*NotifyRuleClient) Query ¶
func (c *NotifyRuleClient) Query() *NotifyRuleQuery
Query returns a query builder for NotifyRule.
func (*NotifyRuleClient) QueryAccount ¶
func (c *NotifyRuleClient) QueryAccount(_m *NotifyRule) *AccountQuery
QueryAccount queries the account edge of a NotifyRule.
func (*NotifyRuleClient) QueryContext ¶
func (c *NotifyRuleClient) 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 (*NotifyRuleClient) Update ¶
func (c *NotifyRuleClient) Update() *NotifyRuleUpdate
Update returns an update builder for NotifyRule.
func (*NotifyRuleClient) UpdateOne ¶
func (c *NotifyRuleClient) UpdateOne(_m *NotifyRule) *NotifyRuleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NotifyRuleClient) UpdateOneID ¶
func (c *NotifyRuleClient) UpdateOneID(id int) *NotifyRuleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NotifyRuleClient) Use ¶
func (c *NotifyRuleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `notifyrule.Hooks(f(g(h())))`.
type NotifyRuleCreate ¶
type NotifyRuleCreate struct {
// contains filtered or unexported fields
}
NotifyRuleCreate is the builder for creating a NotifyRule entity.
func (*NotifyRuleCreate) Exec ¶
func (_c *NotifyRuleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NotifyRuleCreate) ExecContext ¶
func (c *NotifyRuleCreate) 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 (*NotifyRuleCreate) ExecX ¶
func (_c *NotifyRuleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotifyRuleCreate) Mutation ¶
func (_c *NotifyRuleCreate) Mutation() *NotifyRuleMutation
Mutation returns the NotifyRuleMutation object of the builder.
func (*NotifyRuleCreate) OnConflict ¶
func (_c *NotifyRuleCreate) OnConflict(opts ...sql.ConflictOption) *NotifyRuleUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.NotifyRule.Create().
SetLabel(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.NotifyRuleUpsert) {
SetLabel(v+v).
}).
Exec(ctx)
func (*NotifyRuleCreate) OnConflictColumns ¶
func (_c *NotifyRuleCreate) OnConflictColumns(columns ...string) *NotifyRuleUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.NotifyRule.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*NotifyRuleCreate) QueryContext ¶
func (c *NotifyRuleCreate) 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 (*NotifyRuleCreate) Save ¶
func (_c *NotifyRuleCreate) Save(ctx context.Context) (*NotifyRule, error)
Save creates the NotifyRule in the database.
func (*NotifyRuleCreate) SaveX ¶
func (_c *NotifyRuleCreate) SaveX(ctx context.Context) *NotifyRule
SaveX calls Save and panics if Save returns an error.
func (*NotifyRuleCreate) SetAccount ¶
func (_c *NotifyRuleCreate) SetAccount(v *Account) *NotifyRuleCreate
SetAccount sets the "account" edge to the Account entity.
func (*NotifyRuleCreate) SetAccountID ¶
func (_c *NotifyRuleCreate) SetAccountID(id uuid.UUID) *NotifyRuleCreate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*NotifyRuleCreate) SetEnabled ¶
func (_c *NotifyRuleCreate) SetEnabled(v bool) *NotifyRuleCreate
SetEnabled sets the "enabled" field.
func (*NotifyRuleCreate) SetLabel ¶
func (_c *NotifyRuleCreate) SetLabel(v string) *NotifyRuleCreate
SetLabel sets the "label" field.
func (*NotifyRuleCreate) SetNillableEnabled ¶
func (_c *NotifyRuleCreate) SetNillableEnabled(v *bool) *NotifyRuleCreate
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*NotifyRuleCreate) SetNillableNotify ¶
func (_c *NotifyRuleCreate) SetNillableNotify(v *bool) *NotifyRuleCreate
SetNillableNotify sets the "notify" field if the given value is not nil.
func (*NotifyRuleCreate) SetNillableSound ¶
func (_c *NotifyRuleCreate) SetNillableSound(v *string) *NotifyRuleCreate
SetNillableSound sets the "sound" field if the given value is not nil.
func (*NotifyRuleCreate) SetNillableUrgency ¶
func (_c *NotifyRuleCreate) SetNillableUrgency(v *notifyrule.Urgency) *NotifyRuleCreate
SetNillableUrgency sets the "urgency" field if the given value is not nil.
func (*NotifyRuleCreate) SetNotify ¶
func (_c *NotifyRuleCreate) SetNotify(v bool) *NotifyRuleCreate
SetNotify sets the "notify" field.
func (*NotifyRuleCreate) SetSound ¶
func (_c *NotifyRuleCreate) SetSound(v string) *NotifyRuleCreate
SetSound sets the "sound" field.
func (*NotifyRuleCreate) SetUrgency ¶
func (_c *NotifyRuleCreate) SetUrgency(v notifyrule.Urgency) *NotifyRuleCreate
SetUrgency sets the "urgency" field.
type NotifyRuleCreateBulk ¶
type NotifyRuleCreateBulk struct {
// contains filtered or unexported fields
}
NotifyRuleCreateBulk is the builder for creating many NotifyRule entities in bulk.
func (*NotifyRuleCreateBulk) Exec ¶
func (_c *NotifyRuleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NotifyRuleCreateBulk) ExecContext ¶
func (c *NotifyRuleCreateBulk) 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 (*NotifyRuleCreateBulk) ExecX ¶
func (_c *NotifyRuleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotifyRuleCreateBulk) OnConflict ¶
func (_c *NotifyRuleCreateBulk) OnConflict(opts ...sql.ConflictOption) *NotifyRuleUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.NotifyRule.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.NotifyRuleUpsert) {
SetLabel(v+v).
}).
Exec(ctx)
func (*NotifyRuleCreateBulk) OnConflictColumns ¶
func (_c *NotifyRuleCreateBulk) OnConflictColumns(columns ...string) *NotifyRuleUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.NotifyRule.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*NotifyRuleCreateBulk) QueryContext ¶
func (c *NotifyRuleCreateBulk) 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 (*NotifyRuleCreateBulk) Save ¶
func (_c *NotifyRuleCreateBulk) Save(ctx context.Context) ([]*NotifyRule, error)
Save creates the NotifyRule entities in the database.
func (*NotifyRuleCreateBulk) SaveX ¶
func (_c *NotifyRuleCreateBulk) SaveX(ctx context.Context) []*NotifyRule
SaveX is like Save, but panics if an error occurs.
type NotifyRuleDelete ¶
type NotifyRuleDelete struct {
// contains filtered or unexported fields
}
NotifyRuleDelete is the builder for deleting a NotifyRule entity.
func (*NotifyRuleDelete) Exec ¶
func (_d *NotifyRuleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NotifyRuleDelete) ExecContext ¶
func (c *NotifyRuleDelete) 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 (*NotifyRuleDelete) ExecX ¶
func (_d *NotifyRuleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NotifyRuleDelete) QueryContext ¶
func (c *NotifyRuleDelete) 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 (*NotifyRuleDelete) Where ¶
func (_d *NotifyRuleDelete) Where(ps ...predicate.NotifyRule) *NotifyRuleDelete
Where appends a list predicates to the NotifyRuleDelete builder.
type NotifyRuleDeleteOne ¶
type NotifyRuleDeleteOne struct {
// contains filtered or unexported fields
}
NotifyRuleDeleteOne is the builder for deleting a single NotifyRule entity.
func (*NotifyRuleDeleteOne) Exec ¶
func (_d *NotifyRuleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NotifyRuleDeleteOne) ExecX ¶
func (_d *NotifyRuleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotifyRuleDeleteOne) Where ¶
func (_d *NotifyRuleDeleteOne) Where(ps ...predicate.NotifyRule) *NotifyRuleDeleteOne
Where appends a list predicates to the NotifyRuleDelete builder.
type NotifyRuleEdges ¶
type NotifyRuleEdges struct {
// Account holds the value of the account edge.
Account *Account `json:"account,omitempty"`
// contains filtered or unexported fields
}
NotifyRuleEdges holds the relations/edges for other nodes in the graph.
func (NotifyRuleEdges) AccountOrErr ¶
func (e NotifyRuleEdges) AccountOrErr() (*Account, error)
AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NotifyRuleGroupBy ¶
type NotifyRuleGroupBy struct {
// contains filtered or unexported fields
}
NotifyRuleGroupBy is the group-by builder for NotifyRule entities.
func (*NotifyRuleGroupBy) Aggregate ¶
func (_g *NotifyRuleGroupBy) Aggregate(fns ...AggregateFunc) *NotifyRuleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NotifyRuleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NotifyRuleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NotifyRuleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NotifyRuleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NotifyRuleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NotifyRuleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NotifyRuleGroupBy) Scan ¶
func (_g *NotifyRuleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NotifyRuleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NotifyRuleMutation ¶
type NotifyRuleMutation struct {
// contains filtered or unexported fields
}
NotifyRuleMutation represents an operation that mutates the NotifyRule nodes in the graph.
func (*NotifyRuleMutation) AccountCleared ¶
func (m *NotifyRuleMutation) AccountCleared() bool
AccountCleared reports if the "account" edge to the Account entity was cleared.
func (*NotifyRuleMutation) AccountID ¶
func (m *NotifyRuleMutation) AccountID() (id uuid.UUID, exists bool)
AccountID returns the "account" edge ID in the mutation.
func (*NotifyRuleMutation) AccountIDs ¶
func (m *NotifyRuleMutation) AccountIDs() (ids []uuid.UUID)
AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.
func (*NotifyRuleMutation) AddField ¶
func (m *NotifyRuleMutation) 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 (*NotifyRuleMutation) AddedEdges ¶
func (m *NotifyRuleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NotifyRuleMutation) AddedField ¶
func (m *NotifyRuleMutation) 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 (*NotifyRuleMutation) AddedFields ¶
func (m *NotifyRuleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NotifyRuleMutation) AddedIDs ¶
func (m *NotifyRuleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NotifyRuleMutation) ClearAccount ¶
func (m *NotifyRuleMutation) ClearAccount()
ClearAccount clears the "account" edge to the Account entity.
func (*NotifyRuleMutation) ClearEdge ¶
func (m *NotifyRuleMutation) 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 (*NotifyRuleMutation) ClearField ¶
func (m *NotifyRuleMutation) 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 (*NotifyRuleMutation) ClearedEdges ¶
func (m *NotifyRuleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NotifyRuleMutation) ClearedFields ¶
func (m *NotifyRuleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NotifyRuleMutation) Client ¶
func (m NotifyRuleMutation) 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 (*NotifyRuleMutation) EdgeCleared ¶
func (m *NotifyRuleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NotifyRuleMutation) Enabled ¶
func (m *NotifyRuleMutation) Enabled() (r bool, exists bool)
Enabled returns the value of the "enabled" field in the mutation.
func (*NotifyRuleMutation) ExecContext ¶
func (c *NotifyRuleMutation) 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 (*NotifyRuleMutation) Field ¶
func (m *NotifyRuleMutation) 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 (*NotifyRuleMutation) FieldCleared ¶
func (m *NotifyRuleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NotifyRuleMutation) Fields ¶
func (m *NotifyRuleMutation) 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 (*NotifyRuleMutation) ID ¶
func (m *NotifyRuleMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*NotifyRuleMutation) IDs ¶
func (m *NotifyRuleMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*NotifyRuleMutation) Label ¶
func (m *NotifyRuleMutation) Label() (r string, exists bool)
Label returns the value of the "label" field in the mutation.
func (*NotifyRuleMutation) Notify ¶
func (m *NotifyRuleMutation) Notify() (r bool, exists bool)
Notify returns the value of the "notify" field in the mutation.
func (*NotifyRuleMutation) OldEnabled ¶
func (m *NotifyRuleMutation) OldEnabled(ctx context.Context) (v bool, err error)
OldEnabled returns the old "enabled" field's value of the NotifyRule entity. If the NotifyRule 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 (*NotifyRuleMutation) 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 (*NotifyRuleMutation) OldLabel ¶
func (m *NotifyRuleMutation) OldLabel(ctx context.Context) (v string, err error)
OldLabel returns the old "label" field's value of the NotifyRule entity. If the NotifyRule 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 (*NotifyRuleMutation) OldNotify ¶
func (m *NotifyRuleMutation) OldNotify(ctx context.Context) (v bool, err error)
OldNotify returns the old "notify" field's value of the NotifyRule entity. If the NotifyRule 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 (*NotifyRuleMutation) OldSound ¶
func (m *NotifyRuleMutation) OldSound(ctx context.Context) (v string, err error)
OldSound returns the old "sound" field's value of the NotifyRule entity. If the NotifyRule 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 (*NotifyRuleMutation) OldUrgency ¶
func (m *NotifyRuleMutation) OldUrgency(ctx context.Context) (v notifyrule.Urgency, err error)
OldUrgency returns the old "urgency" field's value of the NotifyRule entity. If the NotifyRule 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 (*NotifyRuleMutation) QueryContext ¶
func (c *NotifyRuleMutation) 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 (*NotifyRuleMutation) RemovedEdges ¶
func (m *NotifyRuleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NotifyRuleMutation) RemovedIDs ¶
func (m *NotifyRuleMutation) 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 (*NotifyRuleMutation) ResetAccount ¶
func (m *NotifyRuleMutation) ResetAccount()
ResetAccount resets all changes to the "account" edge.
func (*NotifyRuleMutation) ResetEdge ¶
func (m *NotifyRuleMutation) 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 (*NotifyRuleMutation) ResetEnabled ¶
func (m *NotifyRuleMutation) ResetEnabled()
ResetEnabled resets all changes to the "enabled" field.
func (*NotifyRuleMutation) ResetField ¶
func (m *NotifyRuleMutation) 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 (*NotifyRuleMutation) ResetLabel ¶
func (m *NotifyRuleMutation) ResetLabel()
ResetLabel resets all changes to the "label" field.
func (*NotifyRuleMutation) ResetNotify ¶
func (m *NotifyRuleMutation) ResetNotify()
ResetNotify resets all changes to the "notify" field.
func (*NotifyRuleMutation) ResetSound ¶
func (m *NotifyRuleMutation) ResetSound()
ResetSound resets all changes to the "sound" field.
func (*NotifyRuleMutation) ResetUrgency ¶
func (m *NotifyRuleMutation) ResetUrgency()
ResetUrgency resets all changes to the "urgency" field.
func (*NotifyRuleMutation) SetAccountID ¶
func (m *NotifyRuleMutation) SetAccountID(id uuid.UUID)
SetAccountID sets the "account" edge to the Account entity by id.
func (*NotifyRuleMutation) SetEnabled ¶
func (m *NotifyRuleMutation) SetEnabled(b bool)
SetEnabled sets the "enabled" field.
func (*NotifyRuleMutation) SetField ¶
func (m *NotifyRuleMutation) 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 (*NotifyRuleMutation) SetLabel ¶
func (m *NotifyRuleMutation) SetLabel(s string)
SetLabel sets the "label" field.
func (*NotifyRuleMutation) SetNotify ¶
func (m *NotifyRuleMutation) SetNotify(b bool)
SetNotify sets the "notify" field.
func (*NotifyRuleMutation) SetOp ¶
func (m *NotifyRuleMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NotifyRuleMutation) SetSound ¶
func (m *NotifyRuleMutation) SetSound(s string)
SetSound sets the "sound" field.
func (*NotifyRuleMutation) SetUrgency ¶
func (m *NotifyRuleMutation) SetUrgency(n notifyrule.Urgency)
SetUrgency sets the "urgency" field.
func (*NotifyRuleMutation) Sound ¶
func (m *NotifyRuleMutation) Sound() (r string, exists bool)
Sound returns the value of the "sound" field in the mutation.
func (NotifyRuleMutation) Tx ¶
func (m NotifyRuleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NotifyRuleMutation) Type ¶
func (m *NotifyRuleMutation) Type() string
Type returns the node type of this mutation (NotifyRule).
func (*NotifyRuleMutation) Urgency ¶
func (m *NotifyRuleMutation) Urgency() (r notifyrule.Urgency, exists bool)
Urgency returns the value of the "urgency" field in the mutation.
func (*NotifyRuleMutation) Where ¶
func (m *NotifyRuleMutation) Where(ps ...predicate.NotifyRule)
Where appends a list predicates to the NotifyRuleMutation builder.
func (*NotifyRuleMutation) WhereP ¶
func (m *NotifyRuleMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NotifyRuleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NotifyRuleQuery ¶
type NotifyRuleQuery struct {
// contains filtered or unexported fields
}
NotifyRuleQuery is the builder for querying NotifyRule entities.
func (*NotifyRuleQuery) Aggregate ¶
func (_q *NotifyRuleQuery) Aggregate(fns ...AggregateFunc) *NotifyRuleSelect
Aggregate returns a NotifyRuleSelect configured with the given aggregations.
func (*NotifyRuleQuery) All ¶
func (_q *NotifyRuleQuery) All(ctx context.Context) ([]*NotifyRule, error)
All executes the query and returns a list of NotifyRules.
func (*NotifyRuleQuery) AllX ¶
func (_q *NotifyRuleQuery) AllX(ctx context.Context) []*NotifyRule
AllX is like All, but panics if an error occurs.
func (*NotifyRuleQuery) Clone ¶
func (_q *NotifyRuleQuery) Clone() *NotifyRuleQuery
Clone returns a duplicate of the NotifyRuleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NotifyRuleQuery) Count ¶
func (_q *NotifyRuleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NotifyRuleQuery) CountX ¶
func (_q *NotifyRuleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NotifyRuleQuery) ExecContext ¶
func (c *NotifyRuleQuery) 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 (*NotifyRuleQuery) Exist ¶
func (_q *NotifyRuleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NotifyRuleQuery) ExistX ¶
func (_q *NotifyRuleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NotifyRuleQuery) First ¶
func (_q *NotifyRuleQuery) First(ctx context.Context) (*NotifyRule, error)
First returns the first NotifyRule entity from the query. Returns a *NotFoundError when no NotifyRule was found.
func (*NotifyRuleQuery) FirstID ¶
func (_q *NotifyRuleQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NotifyRule ID from the query. Returns a *NotFoundError when no NotifyRule ID was found.
func (*NotifyRuleQuery) FirstIDX ¶
func (_q *NotifyRuleQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NotifyRuleQuery) FirstX ¶
func (_q *NotifyRuleQuery) FirstX(ctx context.Context) *NotifyRule
FirstX is like First, but panics if an error occurs.
func (*NotifyRuleQuery) GroupBy ¶
func (_q *NotifyRuleQuery) GroupBy(field string, fields ...string) *NotifyRuleGroupBy
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 {
Label string `json:"label,omitempty"`
Count int `json:"count,omitempty"`
}
client.NotifyRule.Query().
GroupBy(notifyrule.FieldLabel).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*NotifyRuleQuery) IDs ¶
func (_q *NotifyRuleQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of NotifyRule IDs.
func (*NotifyRuleQuery) IDsX ¶
func (_q *NotifyRuleQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NotifyRuleQuery) Limit ¶
func (_q *NotifyRuleQuery) Limit(limit int) *NotifyRuleQuery
Limit the number of records to be returned by this query.
func (*NotifyRuleQuery) Modify ¶
func (_q *NotifyRuleQuery) Modify(modifiers ...func(s *sql.Selector)) *NotifyRuleSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*NotifyRuleQuery) Offset ¶
func (_q *NotifyRuleQuery) Offset(offset int) *NotifyRuleQuery
Offset to start from.
func (*NotifyRuleQuery) Only ¶
func (_q *NotifyRuleQuery) Only(ctx context.Context) (*NotifyRule, error)
Only returns a single NotifyRule entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NotifyRule entity is found. Returns a *NotFoundError when no NotifyRule entities are found.
func (*NotifyRuleQuery) OnlyID ¶
func (_q *NotifyRuleQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only NotifyRule ID in the query. Returns a *NotSingularError when more than one NotifyRule ID is found. Returns a *NotFoundError when no entities are found.
func (*NotifyRuleQuery) OnlyIDX ¶
func (_q *NotifyRuleQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NotifyRuleQuery) OnlyX ¶
func (_q *NotifyRuleQuery) OnlyX(ctx context.Context) *NotifyRule
OnlyX is like Only, but panics if an error occurs.
func (*NotifyRuleQuery) Order ¶
func (_q *NotifyRuleQuery) Order(o ...notifyrule.OrderOption) *NotifyRuleQuery
Order specifies how the records should be ordered.
func (*NotifyRuleQuery) QueryAccount ¶
func (_q *NotifyRuleQuery) QueryAccount() *AccountQuery
QueryAccount chains the current query on the "account" edge.
func (*NotifyRuleQuery) QueryContext ¶
func (c *NotifyRuleQuery) 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 (*NotifyRuleQuery) Select ¶
func (_q *NotifyRuleQuery) Select(fields ...string) *NotifyRuleSelect
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 {
Label string `json:"label,omitempty"`
}
client.NotifyRule.Query().
Select(notifyrule.FieldLabel).
Scan(ctx, &v)
func (*NotifyRuleQuery) Unique ¶
func (_q *NotifyRuleQuery) Unique(unique bool) *NotifyRuleQuery
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 (*NotifyRuleQuery) Where ¶
func (_q *NotifyRuleQuery) Where(ps ...predicate.NotifyRule) *NotifyRuleQuery
Where adds a new predicate for the NotifyRuleQuery builder.
func (*NotifyRuleQuery) WithAccount ¶
func (_q *NotifyRuleQuery) WithAccount(opts ...func(*AccountQuery)) *NotifyRuleQuery
WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.
type NotifyRuleSelect ¶
type NotifyRuleSelect struct {
*NotifyRuleQuery
// contains filtered or unexported fields
}
NotifyRuleSelect is the builder for selecting fields of NotifyRule entities.
func (*NotifyRuleSelect) Aggregate ¶
func (_s *NotifyRuleSelect) Aggregate(fns ...AggregateFunc) *NotifyRuleSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NotifyRuleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NotifyRuleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (NotifyRuleSelect) ExecContext ¶
func (c NotifyRuleSelect) 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 (*NotifyRuleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NotifyRuleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NotifyRuleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NotifyRuleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NotifyRuleSelect) Modify ¶
func (_s *NotifyRuleSelect) Modify(modifiers ...func(s *sql.Selector)) *NotifyRuleSelect
Modify adds a query modifier for attaching custom logic to queries.
func (NotifyRuleSelect) QueryContext ¶
func (c NotifyRuleSelect) 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 (*NotifyRuleSelect) Scan ¶
func (_s *NotifyRuleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NotifyRuleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NotifyRuleUpdate ¶
type NotifyRuleUpdate struct {
// contains filtered or unexported fields
}
NotifyRuleUpdate is the builder for updating NotifyRule entities.
func (*NotifyRuleUpdate) ClearAccount ¶
func (_u *NotifyRuleUpdate) ClearAccount() *NotifyRuleUpdate
ClearAccount clears the "account" edge to the Account entity.
func (*NotifyRuleUpdate) Exec ¶
func (_u *NotifyRuleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NotifyRuleUpdate) ExecContext ¶
func (c *NotifyRuleUpdate) 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 (*NotifyRuleUpdate) ExecX ¶
func (_u *NotifyRuleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotifyRuleUpdate) Modify ¶
func (_u *NotifyRuleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *NotifyRuleUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*NotifyRuleUpdate) Mutation ¶
func (_u *NotifyRuleUpdate) Mutation() *NotifyRuleMutation
Mutation returns the NotifyRuleMutation object of the builder.
func (*NotifyRuleUpdate) QueryContext ¶
func (c *NotifyRuleUpdate) 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 (*NotifyRuleUpdate) Save ¶
func (_u *NotifyRuleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NotifyRuleUpdate) SaveX ¶
func (_u *NotifyRuleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NotifyRuleUpdate) SetAccount ¶
func (_u *NotifyRuleUpdate) SetAccount(v *Account) *NotifyRuleUpdate
SetAccount sets the "account" edge to the Account entity.
func (*NotifyRuleUpdate) SetAccountID ¶
func (_u *NotifyRuleUpdate) SetAccountID(id uuid.UUID) *NotifyRuleUpdate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*NotifyRuleUpdate) SetEnabled ¶
func (_u *NotifyRuleUpdate) SetEnabled(v bool) *NotifyRuleUpdate
SetEnabled sets the "enabled" field.
func (*NotifyRuleUpdate) SetLabel ¶
func (_u *NotifyRuleUpdate) SetLabel(v string) *NotifyRuleUpdate
SetLabel sets the "label" field.
func (*NotifyRuleUpdate) SetNillableEnabled ¶
func (_u *NotifyRuleUpdate) SetNillableEnabled(v *bool) *NotifyRuleUpdate
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*NotifyRuleUpdate) SetNillableLabel ¶
func (_u *NotifyRuleUpdate) SetNillableLabel(v *string) *NotifyRuleUpdate
SetNillableLabel sets the "label" field if the given value is not nil.
func (*NotifyRuleUpdate) SetNillableNotify ¶
func (_u *NotifyRuleUpdate) SetNillableNotify(v *bool) *NotifyRuleUpdate
SetNillableNotify sets the "notify" field if the given value is not nil.
func (*NotifyRuleUpdate) SetNillableSound ¶
func (_u *NotifyRuleUpdate) SetNillableSound(v *string) *NotifyRuleUpdate
SetNillableSound sets the "sound" field if the given value is not nil.
func (*NotifyRuleUpdate) SetNillableUrgency ¶
func (_u *NotifyRuleUpdate) SetNillableUrgency(v *notifyrule.Urgency) *NotifyRuleUpdate
SetNillableUrgency sets the "urgency" field if the given value is not nil.
func (*NotifyRuleUpdate) SetNotify ¶
func (_u *NotifyRuleUpdate) SetNotify(v bool) *NotifyRuleUpdate
SetNotify sets the "notify" field.
func (*NotifyRuleUpdate) SetSound ¶
func (_u *NotifyRuleUpdate) SetSound(v string) *NotifyRuleUpdate
SetSound sets the "sound" field.
func (*NotifyRuleUpdate) SetUrgency ¶
func (_u *NotifyRuleUpdate) SetUrgency(v notifyrule.Urgency) *NotifyRuleUpdate
SetUrgency sets the "urgency" field.
func (*NotifyRuleUpdate) Where ¶
func (_u *NotifyRuleUpdate) Where(ps ...predicate.NotifyRule) *NotifyRuleUpdate
Where appends a list predicates to the NotifyRuleUpdate builder.
type NotifyRuleUpdateOne ¶
type NotifyRuleUpdateOne struct {
// contains filtered or unexported fields
}
NotifyRuleUpdateOne is the builder for updating a single NotifyRule entity.
func (*NotifyRuleUpdateOne) ClearAccount ¶
func (_u *NotifyRuleUpdateOne) ClearAccount() *NotifyRuleUpdateOne
ClearAccount clears the "account" edge to the Account entity.
func (*NotifyRuleUpdateOne) Exec ¶
func (_u *NotifyRuleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NotifyRuleUpdateOne) ExecContext ¶
func (c *NotifyRuleUpdateOne) 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 (*NotifyRuleUpdateOne) ExecX ¶
func (_u *NotifyRuleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotifyRuleUpdateOne) Modify ¶
func (_u *NotifyRuleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *NotifyRuleUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*NotifyRuleUpdateOne) Mutation ¶
func (_u *NotifyRuleUpdateOne) Mutation() *NotifyRuleMutation
Mutation returns the NotifyRuleMutation object of the builder.
func (*NotifyRuleUpdateOne) QueryContext ¶
func (c *NotifyRuleUpdateOne) 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 (*NotifyRuleUpdateOne) Save ¶
func (_u *NotifyRuleUpdateOne) Save(ctx context.Context) (*NotifyRule, error)
Save executes the query and returns the updated NotifyRule entity.
func (*NotifyRuleUpdateOne) SaveX ¶
func (_u *NotifyRuleUpdateOne) SaveX(ctx context.Context) *NotifyRule
SaveX is like Save, but panics if an error occurs.
func (*NotifyRuleUpdateOne) Select ¶
func (_u *NotifyRuleUpdateOne) Select(field string, fields ...string) *NotifyRuleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NotifyRuleUpdateOne) SetAccount ¶
func (_u *NotifyRuleUpdateOne) SetAccount(v *Account) *NotifyRuleUpdateOne
SetAccount sets the "account" edge to the Account entity.
func (*NotifyRuleUpdateOne) SetAccountID ¶
func (_u *NotifyRuleUpdateOne) SetAccountID(id uuid.UUID) *NotifyRuleUpdateOne
SetAccountID sets the "account" edge to the Account entity by ID.
func (*NotifyRuleUpdateOne) SetEnabled ¶
func (_u *NotifyRuleUpdateOne) SetEnabled(v bool) *NotifyRuleUpdateOne
SetEnabled sets the "enabled" field.
func (*NotifyRuleUpdateOne) SetLabel ¶
func (_u *NotifyRuleUpdateOne) SetLabel(v string) *NotifyRuleUpdateOne
SetLabel sets the "label" field.
func (*NotifyRuleUpdateOne) SetNillableEnabled ¶
func (_u *NotifyRuleUpdateOne) SetNillableEnabled(v *bool) *NotifyRuleUpdateOne
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*NotifyRuleUpdateOne) SetNillableLabel ¶
func (_u *NotifyRuleUpdateOne) SetNillableLabel(v *string) *NotifyRuleUpdateOne
SetNillableLabel sets the "label" field if the given value is not nil.
func (*NotifyRuleUpdateOne) SetNillableNotify ¶
func (_u *NotifyRuleUpdateOne) SetNillableNotify(v *bool) *NotifyRuleUpdateOne
SetNillableNotify sets the "notify" field if the given value is not nil.
func (*NotifyRuleUpdateOne) SetNillableSound ¶
func (_u *NotifyRuleUpdateOne) SetNillableSound(v *string) *NotifyRuleUpdateOne
SetNillableSound sets the "sound" field if the given value is not nil.
func (*NotifyRuleUpdateOne) SetNillableUrgency ¶
func (_u *NotifyRuleUpdateOne) SetNillableUrgency(v *notifyrule.Urgency) *NotifyRuleUpdateOne
SetNillableUrgency sets the "urgency" field if the given value is not nil.
func (*NotifyRuleUpdateOne) SetNotify ¶
func (_u *NotifyRuleUpdateOne) SetNotify(v bool) *NotifyRuleUpdateOne
SetNotify sets the "notify" field.
func (*NotifyRuleUpdateOne) SetSound ¶
func (_u *NotifyRuleUpdateOne) SetSound(v string) *NotifyRuleUpdateOne
SetSound sets the "sound" field.
func (*NotifyRuleUpdateOne) SetUrgency ¶
func (_u *NotifyRuleUpdateOne) SetUrgency(v notifyrule.Urgency) *NotifyRuleUpdateOne
SetUrgency sets the "urgency" field.
func (*NotifyRuleUpdateOne) Where ¶
func (_u *NotifyRuleUpdateOne) Where(ps ...predicate.NotifyRule) *NotifyRuleUpdateOne
Where appends a list predicates to the NotifyRuleUpdate builder.
type NotifyRuleUpsert ¶
NotifyRuleUpsert is the "OnConflict" setter.
func (*NotifyRuleUpsert) SetEnabled ¶
func (u *NotifyRuleUpsert) SetEnabled(v bool) *NotifyRuleUpsert
SetEnabled sets the "enabled" field.
func (*NotifyRuleUpsert) SetLabel ¶
func (u *NotifyRuleUpsert) SetLabel(v string) *NotifyRuleUpsert
SetLabel sets the "label" field.
func (*NotifyRuleUpsert) SetNotify ¶
func (u *NotifyRuleUpsert) SetNotify(v bool) *NotifyRuleUpsert
SetNotify sets the "notify" field.
func (*NotifyRuleUpsert) SetSound ¶
func (u *NotifyRuleUpsert) SetSound(v string) *NotifyRuleUpsert
SetSound sets the "sound" field.
func (*NotifyRuleUpsert) SetUrgency ¶
func (u *NotifyRuleUpsert) SetUrgency(v notifyrule.Urgency) *NotifyRuleUpsert
SetUrgency sets the "urgency" field.
func (*NotifyRuleUpsert) UpdateEnabled ¶
func (u *NotifyRuleUpsert) UpdateEnabled() *NotifyRuleUpsert
UpdateEnabled sets the "enabled" field to the value that was provided on create.
func (*NotifyRuleUpsert) UpdateLabel ¶
func (u *NotifyRuleUpsert) UpdateLabel() *NotifyRuleUpsert
UpdateLabel sets the "label" field to the value that was provided on create.
func (*NotifyRuleUpsert) UpdateNotify ¶
func (u *NotifyRuleUpsert) UpdateNotify() *NotifyRuleUpsert
UpdateNotify sets the "notify" field to the value that was provided on create.
func (*NotifyRuleUpsert) UpdateSound ¶
func (u *NotifyRuleUpsert) UpdateSound() *NotifyRuleUpsert
UpdateSound sets the "sound" field to the value that was provided on create.
func (*NotifyRuleUpsert) UpdateUrgency ¶
func (u *NotifyRuleUpsert) UpdateUrgency() *NotifyRuleUpsert
UpdateUrgency sets the "urgency" field to the value that was provided on create.
type NotifyRuleUpsertBulk ¶
type NotifyRuleUpsertBulk struct {
// contains filtered or unexported fields
}
NotifyRuleUpsertBulk is the builder for "upsert"-ing a bulk of NotifyRule nodes.
func (*NotifyRuleUpsertBulk) DoNothing ¶
func (u *NotifyRuleUpsertBulk) DoNothing() *NotifyRuleUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*NotifyRuleUpsertBulk) Exec ¶
func (u *NotifyRuleUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NotifyRuleUpsertBulk) ExecX ¶
func (u *NotifyRuleUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotifyRuleUpsertBulk) Ignore ¶
func (u *NotifyRuleUpsertBulk) Ignore() *NotifyRuleUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.NotifyRule.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*NotifyRuleUpsertBulk) SetEnabled ¶
func (u *NotifyRuleUpsertBulk) SetEnabled(v bool) *NotifyRuleUpsertBulk
SetEnabled sets the "enabled" field.
func (*NotifyRuleUpsertBulk) SetLabel ¶
func (u *NotifyRuleUpsertBulk) SetLabel(v string) *NotifyRuleUpsertBulk
SetLabel sets the "label" field.
func (*NotifyRuleUpsertBulk) SetNotify ¶
func (u *NotifyRuleUpsertBulk) SetNotify(v bool) *NotifyRuleUpsertBulk
SetNotify sets the "notify" field.
func (*NotifyRuleUpsertBulk) SetSound ¶
func (u *NotifyRuleUpsertBulk) SetSound(v string) *NotifyRuleUpsertBulk
SetSound sets the "sound" field.
func (*NotifyRuleUpsertBulk) SetUrgency ¶
func (u *NotifyRuleUpsertBulk) SetUrgency(v notifyrule.Urgency) *NotifyRuleUpsertBulk
SetUrgency sets the "urgency" field.
func (*NotifyRuleUpsertBulk) Update ¶
func (u *NotifyRuleUpsertBulk) Update(set func(*NotifyRuleUpsert)) *NotifyRuleUpsertBulk
Update allows overriding fields `UPDATE` values. See the NotifyRuleCreateBulk.OnConflict documentation for more info.
func (*NotifyRuleUpsertBulk) UpdateEnabled ¶
func (u *NotifyRuleUpsertBulk) UpdateEnabled() *NotifyRuleUpsertBulk
UpdateEnabled sets the "enabled" field to the value that was provided on create.
func (*NotifyRuleUpsertBulk) UpdateLabel ¶
func (u *NotifyRuleUpsertBulk) UpdateLabel() *NotifyRuleUpsertBulk
UpdateLabel sets the "label" field to the value that was provided on create.
func (*NotifyRuleUpsertBulk) UpdateNewValues ¶
func (u *NotifyRuleUpsertBulk) UpdateNewValues() *NotifyRuleUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.NotifyRule.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*NotifyRuleUpsertBulk) UpdateNotify ¶
func (u *NotifyRuleUpsertBulk) UpdateNotify() *NotifyRuleUpsertBulk
UpdateNotify sets the "notify" field to the value that was provided on create.
func (*NotifyRuleUpsertBulk) UpdateSound ¶
func (u *NotifyRuleUpsertBulk) UpdateSound() *NotifyRuleUpsertBulk
UpdateSound sets the "sound" field to the value that was provided on create.
func (*NotifyRuleUpsertBulk) UpdateUrgency ¶
func (u *NotifyRuleUpsertBulk) UpdateUrgency() *NotifyRuleUpsertBulk
UpdateUrgency sets the "urgency" field to the value that was provided on create.
type NotifyRuleUpsertOne ¶
type NotifyRuleUpsertOne struct {
// contains filtered or unexported fields
}
NotifyRuleUpsertOne is the builder for "upsert"-ing
one NotifyRule node.
func (*NotifyRuleUpsertOne) DoNothing ¶
func (u *NotifyRuleUpsertOne) DoNothing() *NotifyRuleUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*NotifyRuleUpsertOne) Exec ¶
func (u *NotifyRuleUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*NotifyRuleUpsertOne) ExecX ¶
func (u *NotifyRuleUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotifyRuleUpsertOne) ID ¶
func (u *NotifyRuleUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*NotifyRuleUpsertOne) IDX ¶
func (u *NotifyRuleUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*NotifyRuleUpsertOne) Ignore ¶
func (u *NotifyRuleUpsertOne) Ignore() *NotifyRuleUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.NotifyRule.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*NotifyRuleUpsertOne) SetEnabled ¶
func (u *NotifyRuleUpsertOne) SetEnabled(v bool) *NotifyRuleUpsertOne
SetEnabled sets the "enabled" field.
func (*NotifyRuleUpsertOne) SetLabel ¶
func (u *NotifyRuleUpsertOne) SetLabel(v string) *NotifyRuleUpsertOne
SetLabel sets the "label" field.
func (*NotifyRuleUpsertOne) SetNotify ¶
func (u *NotifyRuleUpsertOne) SetNotify(v bool) *NotifyRuleUpsertOne
SetNotify sets the "notify" field.
func (*NotifyRuleUpsertOne) SetSound ¶
func (u *NotifyRuleUpsertOne) SetSound(v string) *NotifyRuleUpsertOne
SetSound sets the "sound" field.
func (*NotifyRuleUpsertOne) SetUrgency ¶
func (u *NotifyRuleUpsertOne) SetUrgency(v notifyrule.Urgency) *NotifyRuleUpsertOne
SetUrgency sets the "urgency" field.
func (*NotifyRuleUpsertOne) Update ¶
func (u *NotifyRuleUpsertOne) Update(set func(*NotifyRuleUpsert)) *NotifyRuleUpsertOne
Update allows overriding fields `UPDATE` values. See the NotifyRuleCreate.OnConflict documentation for more info.
func (*NotifyRuleUpsertOne) UpdateEnabled ¶
func (u *NotifyRuleUpsertOne) UpdateEnabled() *NotifyRuleUpsertOne
UpdateEnabled sets the "enabled" field to the value that was provided on create.
func (*NotifyRuleUpsertOne) UpdateLabel ¶
func (u *NotifyRuleUpsertOne) UpdateLabel() *NotifyRuleUpsertOne
UpdateLabel sets the "label" field to the value that was provided on create.
func (*NotifyRuleUpsertOne) UpdateNewValues ¶
func (u *NotifyRuleUpsertOne) UpdateNewValues() *NotifyRuleUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.NotifyRule.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*NotifyRuleUpsertOne) UpdateNotify ¶
func (u *NotifyRuleUpsertOne) UpdateNotify() *NotifyRuleUpsertOne
UpdateNotify sets the "notify" field to the value that was provided on create.
func (*NotifyRuleUpsertOne) UpdateSound ¶
func (u *NotifyRuleUpsertOne) UpdateSound() *NotifyRuleUpsertOne
UpdateSound sets the "sound" field to the value that was provided on create.
func (*NotifyRuleUpsertOne) UpdateUrgency ¶
func (u *NotifyRuleUpsertOne) UpdateUrgency() *NotifyRuleUpsertOne
UpdateUrgency sets the "urgency" field to the value that was provided on create.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type PendingOp ¶
type PendingOp struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// ProviderThreadIds holds the value of the "provider_thread_ids" field.
ProviderThreadIds []string `json:"provider_thread_ids,omitempty"`
// OpType holds the value of the "op_type" field.
OpType pendingop.OpType `json:"op_type,omitempty"`
// Payload holds the value of the "payload" field.
Payload map[string]interface{} `json:"payload,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Attempts holds the value of the "attempts" field.
Attempts int `json:"attempts,omitempty"`
// NextAttemptAt holds the value of the "next_attempt_at" field.
NextAttemptAt *time.Time `json:"next_attempt_at,omitempty"`
// LastError holds the value of the "last_error" field.
LastError string `json:"last_error,omitempty"`
// State holds the value of the "state" field.
State pendingop.State `json:"state,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the PendingOpQuery when eager-loading is set.
Edges PendingOpEdges `json:"edges"`
// contains filtered or unexported fields
}
PendingOp is the model entity for the PendingOp schema.
func (*PendingOp) ExecContext ¶
func (c *PendingOp) 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 (*PendingOp) QueryAccount ¶
func (_m *PendingOp) QueryAccount() *AccountQuery
QueryAccount queries the "account" edge of the PendingOp entity.
func (*PendingOp) QueryContext ¶
func (c *PendingOp) 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 (*PendingOp) Unwrap ¶
Unwrap unwraps the PendingOp 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 (*PendingOp) Update ¶
func (_m *PendingOp) Update() *PendingOpUpdateOne
Update returns a builder for updating this PendingOp. Note that you need to call PendingOp.Unwrap() before calling this method if this PendingOp was returned from a transaction, and the transaction was committed or rolled back.
type PendingOpClient ¶
type PendingOpClient struct {
// contains filtered or unexported fields
}
PendingOpClient is a client for the PendingOp schema.
func NewPendingOpClient ¶
func NewPendingOpClient(c config) *PendingOpClient
NewPendingOpClient returns a client for the PendingOp from the given config.
func (*PendingOpClient) Create ¶
func (c *PendingOpClient) Create() *PendingOpCreate
Create returns a builder for creating a PendingOp entity.
func (*PendingOpClient) CreateBulk ¶
func (c *PendingOpClient) CreateBulk(builders ...*PendingOpCreate) *PendingOpCreateBulk
CreateBulk returns a builder for creating a bulk of PendingOp entities.
func (*PendingOpClient) Delete ¶
func (c *PendingOpClient) Delete() *PendingOpDelete
Delete returns a delete builder for PendingOp.
func (*PendingOpClient) DeleteOne ¶
func (c *PendingOpClient) DeleteOne(_m *PendingOp) *PendingOpDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PendingOpClient) DeleteOneID ¶
func (c *PendingOpClient) DeleteOneID(id int) *PendingOpDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PendingOpClient) ExecContext ¶
func (c *PendingOpClient) 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 (*PendingOpClient) GetX ¶
func (c *PendingOpClient) GetX(ctx context.Context, id int) *PendingOp
GetX is like Get, but panics if an error occurs.
func (*PendingOpClient) Hooks ¶
func (c *PendingOpClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PendingOpClient) Intercept ¶
func (c *PendingOpClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `pendingop.Intercept(f(g(h())))`.
func (*PendingOpClient) Interceptors ¶
func (c *PendingOpClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PendingOpClient) MapCreateBulk ¶
func (c *PendingOpClient) MapCreateBulk(slice any, setFunc func(*PendingOpCreate, int)) *PendingOpCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PendingOpClient) Query ¶
func (c *PendingOpClient) Query() *PendingOpQuery
Query returns a query builder for PendingOp.
func (*PendingOpClient) QueryAccount ¶
func (c *PendingOpClient) QueryAccount(_m *PendingOp) *AccountQuery
QueryAccount queries the account edge of a PendingOp.
func (*PendingOpClient) QueryContext ¶
func (c *PendingOpClient) 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 (*PendingOpClient) Update ¶
func (c *PendingOpClient) Update() *PendingOpUpdate
Update returns an update builder for PendingOp.
func (*PendingOpClient) UpdateOne ¶
func (c *PendingOpClient) UpdateOne(_m *PendingOp) *PendingOpUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PendingOpClient) UpdateOneID ¶
func (c *PendingOpClient) UpdateOneID(id int) *PendingOpUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PendingOpClient) Use ¶
func (c *PendingOpClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `pendingop.Hooks(f(g(h())))`.
type PendingOpCreate ¶
type PendingOpCreate struct {
// contains filtered or unexported fields
}
PendingOpCreate is the builder for creating a PendingOp entity.
func (*PendingOpCreate) Exec ¶
func (_c *PendingOpCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PendingOpCreate) ExecContext ¶
func (c *PendingOpCreate) 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 (*PendingOpCreate) ExecX ¶
func (_c *PendingOpCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PendingOpCreate) Mutation ¶
func (_c *PendingOpCreate) Mutation() *PendingOpMutation
Mutation returns the PendingOpMutation object of the builder.
func (*PendingOpCreate) OnConflict ¶
func (_c *PendingOpCreate) OnConflict(opts ...sql.ConflictOption) *PendingOpUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.PendingOp.Create().
SetProviderThreadIds(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.PendingOpUpsert) {
SetProviderThreadIds(v+v).
}).
Exec(ctx)
func (*PendingOpCreate) OnConflictColumns ¶
func (_c *PendingOpCreate) OnConflictColumns(columns ...string) *PendingOpUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.PendingOp.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*PendingOpCreate) QueryContext ¶
func (c *PendingOpCreate) 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 (*PendingOpCreate) Save ¶
func (_c *PendingOpCreate) Save(ctx context.Context) (*PendingOp, error)
Save creates the PendingOp in the database.
func (*PendingOpCreate) SaveX ¶
func (_c *PendingOpCreate) SaveX(ctx context.Context) *PendingOp
SaveX calls Save and panics if Save returns an error.
func (*PendingOpCreate) SetAccount ¶
func (_c *PendingOpCreate) SetAccount(v *Account) *PendingOpCreate
SetAccount sets the "account" edge to the Account entity.
func (*PendingOpCreate) SetAccountID ¶
func (_c *PendingOpCreate) SetAccountID(id uuid.UUID) *PendingOpCreate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*PendingOpCreate) SetAttempts ¶
func (_c *PendingOpCreate) SetAttempts(v int) *PendingOpCreate
SetAttempts sets the "attempts" field.
func (*PendingOpCreate) SetCreatedAt ¶
func (_c *PendingOpCreate) SetCreatedAt(v time.Time) *PendingOpCreate
SetCreatedAt sets the "created_at" field.
func (*PendingOpCreate) SetLastError ¶
func (_c *PendingOpCreate) SetLastError(v string) *PendingOpCreate
SetLastError sets the "last_error" field.
func (*PendingOpCreate) SetNextAttemptAt ¶
func (_c *PendingOpCreate) SetNextAttemptAt(v time.Time) *PendingOpCreate
SetNextAttemptAt sets the "next_attempt_at" field.
func (*PendingOpCreate) SetNillableAttempts ¶
func (_c *PendingOpCreate) SetNillableAttempts(v *int) *PendingOpCreate
SetNillableAttempts sets the "attempts" field if the given value is not nil.
func (*PendingOpCreate) SetNillableCreatedAt ¶
func (_c *PendingOpCreate) SetNillableCreatedAt(v *time.Time) *PendingOpCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PendingOpCreate) SetNillableLastError ¶
func (_c *PendingOpCreate) SetNillableLastError(v *string) *PendingOpCreate
SetNillableLastError sets the "last_error" field if the given value is not nil.
func (*PendingOpCreate) SetNillableNextAttemptAt ¶
func (_c *PendingOpCreate) SetNillableNextAttemptAt(v *time.Time) *PendingOpCreate
SetNillableNextAttemptAt sets the "next_attempt_at" field if the given value is not nil.
func (*PendingOpCreate) SetNillableState ¶
func (_c *PendingOpCreate) SetNillableState(v *pendingop.State) *PendingOpCreate
SetNillableState sets the "state" field if the given value is not nil.
func (*PendingOpCreate) SetOpType ¶
func (_c *PendingOpCreate) SetOpType(v pendingop.OpType) *PendingOpCreate
SetOpType sets the "op_type" field.
func (*PendingOpCreate) SetPayload ¶
func (_c *PendingOpCreate) SetPayload(v map[string]interface{}) *PendingOpCreate
SetPayload sets the "payload" field.
func (*PendingOpCreate) SetProviderThreadIds ¶
func (_c *PendingOpCreate) SetProviderThreadIds(v []string) *PendingOpCreate
SetProviderThreadIds sets the "provider_thread_ids" field.
func (*PendingOpCreate) SetState ¶
func (_c *PendingOpCreate) SetState(v pendingop.State) *PendingOpCreate
SetState sets the "state" field.
type PendingOpCreateBulk ¶
type PendingOpCreateBulk struct {
// contains filtered or unexported fields
}
PendingOpCreateBulk is the builder for creating many PendingOp entities in bulk.
func (*PendingOpCreateBulk) Exec ¶
func (_c *PendingOpCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PendingOpCreateBulk) ExecContext ¶
func (c *PendingOpCreateBulk) 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 (*PendingOpCreateBulk) ExecX ¶
func (_c *PendingOpCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PendingOpCreateBulk) OnConflict ¶
func (_c *PendingOpCreateBulk) OnConflict(opts ...sql.ConflictOption) *PendingOpUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.PendingOp.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.PendingOpUpsert) {
SetProviderThreadIds(v+v).
}).
Exec(ctx)
func (*PendingOpCreateBulk) OnConflictColumns ¶
func (_c *PendingOpCreateBulk) OnConflictColumns(columns ...string) *PendingOpUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.PendingOp.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*PendingOpCreateBulk) QueryContext ¶
func (c *PendingOpCreateBulk) 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 PendingOpDelete ¶
type PendingOpDelete struct {
// contains filtered or unexported fields
}
PendingOpDelete is the builder for deleting a PendingOp entity.
func (*PendingOpDelete) Exec ¶
func (_d *PendingOpDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PendingOpDelete) ExecContext ¶
func (c *PendingOpDelete) 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 (*PendingOpDelete) ExecX ¶
func (_d *PendingOpDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PendingOpDelete) QueryContext ¶
func (c *PendingOpDelete) 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 (*PendingOpDelete) Where ¶
func (_d *PendingOpDelete) Where(ps ...predicate.PendingOp) *PendingOpDelete
Where appends a list predicates to the PendingOpDelete builder.
type PendingOpDeleteOne ¶
type PendingOpDeleteOne struct {
// contains filtered or unexported fields
}
PendingOpDeleteOne is the builder for deleting a single PendingOp entity.
func (*PendingOpDeleteOne) Exec ¶
func (_d *PendingOpDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PendingOpDeleteOne) ExecX ¶
func (_d *PendingOpDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PendingOpDeleteOne) Where ¶
func (_d *PendingOpDeleteOne) Where(ps ...predicate.PendingOp) *PendingOpDeleteOne
Where appends a list predicates to the PendingOpDelete builder.
type PendingOpEdges ¶
type PendingOpEdges struct {
// Account holds the value of the account edge.
Account *Account `json:"account,omitempty"`
// contains filtered or unexported fields
}
PendingOpEdges holds the relations/edges for other nodes in the graph.
func (PendingOpEdges) AccountOrErr ¶
func (e PendingOpEdges) AccountOrErr() (*Account, error)
AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PendingOpGroupBy ¶
type PendingOpGroupBy struct {
// contains filtered or unexported fields
}
PendingOpGroupBy is the group-by builder for PendingOp entities.
func (*PendingOpGroupBy) Aggregate ¶
func (_g *PendingOpGroupBy) Aggregate(fns ...AggregateFunc) *PendingOpGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PendingOpGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PendingOpGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PendingOpGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PendingOpGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PendingOpGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PendingOpGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PendingOpGroupBy) Scan ¶
func (_g *PendingOpGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PendingOpGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PendingOpMutation ¶
type PendingOpMutation struct {
// contains filtered or unexported fields
}
PendingOpMutation represents an operation that mutates the PendingOp nodes in the graph.
func (*PendingOpMutation) AccountCleared ¶
func (m *PendingOpMutation) AccountCleared() bool
AccountCleared reports if the "account" edge to the Account entity was cleared.
func (*PendingOpMutation) AccountID ¶
func (m *PendingOpMutation) AccountID() (id uuid.UUID, exists bool)
AccountID returns the "account" edge ID in the mutation.
func (*PendingOpMutation) AccountIDs ¶
func (m *PendingOpMutation) AccountIDs() (ids []uuid.UUID)
AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.
func (*PendingOpMutation) AddAttempts ¶
func (m *PendingOpMutation) AddAttempts(i int)
AddAttempts adds i to the "attempts" field.
func (*PendingOpMutation) AddField ¶
func (m *PendingOpMutation) 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 (*PendingOpMutation) AddedAttempts ¶
func (m *PendingOpMutation) AddedAttempts() (r int, exists bool)
AddedAttempts returns the value that was added to the "attempts" field in this mutation.
func (*PendingOpMutation) AddedEdges ¶
func (m *PendingOpMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PendingOpMutation) AddedField ¶
func (m *PendingOpMutation) 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 (*PendingOpMutation) AddedFields ¶
func (m *PendingOpMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PendingOpMutation) AddedIDs ¶
func (m *PendingOpMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PendingOpMutation) AppendProviderThreadIds ¶
func (m *PendingOpMutation) AppendProviderThreadIds(s []string)
AppendProviderThreadIds adds s to the "provider_thread_ids" field.
func (*PendingOpMutation) AppendedProviderThreadIds ¶
func (m *PendingOpMutation) AppendedProviderThreadIds() ([]string, bool)
AppendedProviderThreadIds returns the list of values that were appended to the "provider_thread_ids" field in this mutation.
func (*PendingOpMutation) Attempts ¶
func (m *PendingOpMutation) Attempts() (r int, exists bool)
Attempts returns the value of the "attempts" field in the mutation.
func (*PendingOpMutation) ClearAccount ¶
func (m *PendingOpMutation) ClearAccount()
ClearAccount clears the "account" edge to the Account entity.
func (*PendingOpMutation) ClearEdge ¶
func (m *PendingOpMutation) 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 (*PendingOpMutation) ClearField ¶
func (m *PendingOpMutation) 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 (*PendingOpMutation) ClearNextAttemptAt ¶
func (m *PendingOpMutation) ClearNextAttemptAt()
ClearNextAttemptAt clears the value of the "next_attempt_at" field.
func (*PendingOpMutation) ClearedEdges ¶
func (m *PendingOpMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PendingOpMutation) ClearedFields ¶
func (m *PendingOpMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PendingOpMutation) Client ¶
func (m PendingOpMutation) 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 (*PendingOpMutation) CreatedAt ¶
func (m *PendingOpMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PendingOpMutation) EdgeCleared ¶
func (m *PendingOpMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PendingOpMutation) ExecContext ¶
func (c *PendingOpMutation) 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 (*PendingOpMutation) Field ¶
func (m *PendingOpMutation) 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 (*PendingOpMutation) FieldCleared ¶
func (m *PendingOpMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PendingOpMutation) Fields ¶
func (m *PendingOpMutation) 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 (*PendingOpMutation) ID ¶
func (m *PendingOpMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PendingOpMutation) IDs ¶
func (m *PendingOpMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PendingOpMutation) LastError ¶
func (m *PendingOpMutation) LastError() (r string, exists bool)
LastError returns the value of the "last_error" field in the mutation.
func (*PendingOpMutation) NextAttemptAt ¶
func (m *PendingOpMutation) NextAttemptAt() (r time.Time, exists bool)
NextAttemptAt returns the value of the "next_attempt_at" field in the mutation.
func (*PendingOpMutation) NextAttemptAtCleared ¶
func (m *PendingOpMutation) NextAttemptAtCleared() bool
NextAttemptAtCleared returns if the "next_attempt_at" field was cleared in this mutation.
func (*PendingOpMutation) OldAttempts ¶
func (m *PendingOpMutation) OldAttempts(ctx context.Context) (v int, err error)
OldAttempts returns the old "attempts" field's value of the PendingOp entity. If the PendingOp 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 (*PendingOpMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the PendingOp entity. If the PendingOp 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 (*PendingOpMutation) 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 (*PendingOpMutation) OldLastError ¶
func (m *PendingOpMutation) OldLastError(ctx context.Context) (v string, err error)
OldLastError returns the old "last_error" field's value of the PendingOp entity. If the PendingOp 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 (*PendingOpMutation) OldNextAttemptAt ¶
OldNextAttemptAt returns the old "next_attempt_at" field's value of the PendingOp entity. If the PendingOp 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 (*PendingOpMutation) OldOpType ¶
OldOpType returns the old "op_type" field's value of the PendingOp entity. If the PendingOp 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 (*PendingOpMutation) OldPayload ¶
func (m *PendingOpMutation) OldPayload(ctx context.Context) (v map[string]interface{}, err error)
OldPayload returns the old "payload" field's value of the PendingOp entity. If the PendingOp 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 (*PendingOpMutation) OldProviderThreadIds ¶
func (m *PendingOpMutation) OldProviderThreadIds(ctx context.Context) (v []string, err error)
OldProviderThreadIds returns the old "provider_thread_ids" field's value of the PendingOp entity. If the PendingOp 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 (*PendingOpMutation) OldState ¶
OldState returns the old "state" field's value of the PendingOp entity. If the PendingOp 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 (*PendingOpMutation) OpType ¶
func (m *PendingOpMutation) OpType() (r pendingop.OpType, exists bool)
OpType returns the value of the "op_type" field in the mutation.
func (*PendingOpMutation) Payload ¶
func (m *PendingOpMutation) Payload() (r map[string]interface{}, exists bool)
Payload returns the value of the "payload" field in the mutation.
func (*PendingOpMutation) ProviderThreadIds ¶
func (m *PendingOpMutation) ProviderThreadIds() (r []string, exists bool)
ProviderThreadIds returns the value of the "provider_thread_ids" field in the mutation.
func (*PendingOpMutation) QueryContext ¶
func (c *PendingOpMutation) 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 (*PendingOpMutation) RemovedEdges ¶
func (m *PendingOpMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PendingOpMutation) RemovedIDs ¶
func (m *PendingOpMutation) 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 (*PendingOpMutation) ResetAccount ¶
func (m *PendingOpMutation) ResetAccount()
ResetAccount resets all changes to the "account" edge.
func (*PendingOpMutation) ResetAttempts ¶
func (m *PendingOpMutation) ResetAttempts()
ResetAttempts resets all changes to the "attempts" field.
func (*PendingOpMutation) ResetCreatedAt ¶
func (m *PendingOpMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PendingOpMutation) ResetEdge ¶
func (m *PendingOpMutation) 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 (*PendingOpMutation) ResetField ¶
func (m *PendingOpMutation) 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 (*PendingOpMutation) ResetLastError ¶
func (m *PendingOpMutation) ResetLastError()
ResetLastError resets all changes to the "last_error" field.
func (*PendingOpMutation) ResetNextAttemptAt ¶
func (m *PendingOpMutation) ResetNextAttemptAt()
ResetNextAttemptAt resets all changes to the "next_attempt_at" field.
func (*PendingOpMutation) ResetOpType ¶
func (m *PendingOpMutation) ResetOpType()
ResetOpType resets all changes to the "op_type" field.
func (*PendingOpMutation) ResetPayload ¶
func (m *PendingOpMutation) ResetPayload()
ResetPayload resets all changes to the "payload" field.
func (*PendingOpMutation) ResetProviderThreadIds ¶
func (m *PendingOpMutation) ResetProviderThreadIds()
ResetProviderThreadIds resets all changes to the "provider_thread_ids" field.
func (*PendingOpMutation) ResetState ¶
func (m *PendingOpMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*PendingOpMutation) SetAccountID ¶
func (m *PendingOpMutation) SetAccountID(id uuid.UUID)
SetAccountID sets the "account" edge to the Account entity by id.
func (*PendingOpMutation) SetAttempts ¶
func (m *PendingOpMutation) SetAttempts(i int)
SetAttempts sets the "attempts" field.
func (*PendingOpMutation) SetCreatedAt ¶
func (m *PendingOpMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PendingOpMutation) SetField ¶
func (m *PendingOpMutation) 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 (*PendingOpMutation) SetLastError ¶
func (m *PendingOpMutation) SetLastError(s string)
SetLastError sets the "last_error" field.
func (*PendingOpMutation) SetNextAttemptAt ¶
func (m *PendingOpMutation) SetNextAttemptAt(t time.Time)
SetNextAttemptAt sets the "next_attempt_at" field.
func (*PendingOpMutation) SetOp ¶
func (m *PendingOpMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PendingOpMutation) SetOpType ¶
func (m *PendingOpMutation) SetOpType(pt pendingop.OpType)
SetOpType sets the "op_type" field.
func (*PendingOpMutation) SetPayload ¶
func (m *PendingOpMutation) SetPayload(value map[string]interface{})
SetPayload sets the "payload" field.
func (*PendingOpMutation) SetProviderThreadIds ¶
func (m *PendingOpMutation) SetProviderThreadIds(s []string)
SetProviderThreadIds sets the "provider_thread_ids" field.
func (*PendingOpMutation) SetState ¶
func (m *PendingOpMutation) SetState(pe pendingop.State)
SetState sets the "state" field.
func (*PendingOpMutation) State ¶
func (m *PendingOpMutation) State() (r pendingop.State, exists bool)
State returns the value of the "state" field in the mutation.
func (PendingOpMutation) Tx ¶
func (m PendingOpMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PendingOpMutation) Type ¶
func (m *PendingOpMutation) Type() string
Type returns the node type of this mutation (PendingOp).
func (*PendingOpMutation) Where ¶
func (m *PendingOpMutation) Where(ps ...predicate.PendingOp)
Where appends a list predicates to the PendingOpMutation builder.
func (*PendingOpMutation) WhereP ¶
func (m *PendingOpMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PendingOpMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PendingOpQuery ¶
type PendingOpQuery struct {
// contains filtered or unexported fields
}
PendingOpQuery is the builder for querying PendingOp entities.
func (*PendingOpQuery) Aggregate ¶
func (_q *PendingOpQuery) Aggregate(fns ...AggregateFunc) *PendingOpSelect
Aggregate returns a PendingOpSelect configured with the given aggregations.
func (*PendingOpQuery) All ¶
func (_q *PendingOpQuery) All(ctx context.Context) ([]*PendingOp, error)
All executes the query and returns a list of PendingOps.
func (*PendingOpQuery) AllX ¶
func (_q *PendingOpQuery) AllX(ctx context.Context) []*PendingOp
AllX is like All, but panics if an error occurs.
func (*PendingOpQuery) Clone ¶
func (_q *PendingOpQuery) Clone() *PendingOpQuery
Clone returns a duplicate of the PendingOpQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PendingOpQuery) Count ¶
func (_q *PendingOpQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PendingOpQuery) CountX ¶
func (_q *PendingOpQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PendingOpQuery) ExecContext ¶
func (c *PendingOpQuery) 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 (*PendingOpQuery) Exist ¶
func (_q *PendingOpQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PendingOpQuery) ExistX ¶
func (_q *PendingOpQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PendingOpQuery) First ¶
func (_q *PendingOpQuery) First(ctx context.Context) (*PendingOp, error)
First returns the first PendingOp entity from the query. Returns a *NotFoundError when no PendingOp was found.
func (*PendingOpQuery) FirstID ¶
func (_q *PendingOpQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PendingOp ID from the query. Returns a *NotFoundError when no PendingOp ID was found.
func (*PendingOpQuery) FirstIDX ¶
func (_q *PendingOpQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PendingOpQuery) FirstX ¶
func (_q *PendingOpQuery) FirstX(ctx context.Context) *PendingOp
FirstX is like First, but panics if an error occurs.
func (*PendingOpQuery) GroupBy ¶
func (_q *PendingOpQuery) GroupBy(field string, fields ...string) *PendingOpGroupBy
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 {
ProviderThreadIds []string `json:"provider_thread_ids,omitempty"`
Count int `json:"count,omitempty"`
}
client.PendingOp.Query().
GroupBy(pendingop.FieldProviderThreadIds).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*PendingOpQuery) IDs ¶
func (_q *PendingOpQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of PendingOp IDs.
func (*PendingOpQuery) IDsX ¶
func (_q *PendingOpQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PendingOpQuery) Limit ¶
func (_q *PendingOpQuery) Limit(limit int) *PendingOpQuery
Limit the number of records to be returned by this query.
func (*PendingOpQuery) Modify ¶
func (_q *PendingOpQuery) Modify(modifiers ...func(s *sql.Selector)) *PendingOpSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*PendingOpQuery) Offset ¶
func (_q *PendingOpQuery) Offset(offset int) *PendingOpQuery
Offset to start from.
func (*PendingOpQuery) Only ¶
func (_q *PendingOpQuery) Only(ctx context.Context) (*PendingOp, error)
Only returns a single PendingOp entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PendingOp entity is found. Returns a *NotFoundError when no PendingOp entities are found.
func (*PendingOpQuery) OnlyID ¶
func (_q *PendingOpQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only PendingOp ID in the query. Returns a *NotSingularError when more than one PendingOp ID is found. Returns a *NotFoundError when no entities are found.
func (*PendingOpQuery) OnlyIDX ¶
func (_q *PendingOpQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PendingOpQuery) OnlyX ¶
func (_q *PendingOpQuery) OnlyX(ctx context.Context) *PendingOp
OnlyX is like Only, but panics if an error occurs.
func (*PendingOpQuery) Order ¶
func (_q *PendingOpQuery) Order(o ...pendingop.OrderOption) *PendingOpQuery
Order specifies how the records should be ordered.
func (*PendingOpQuery) QueryAccount ¶
func (_q *PendingOpQuery) QueryAccount() *AccountQuery
QueryAccount chains the current query on the "account" edge.
func (*PendingOpQuery) QueryContext ¶
func (c *PendingOpQuery) 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 (*PendingOpQuery) Select ¶
func (_q *PendingOpQuery) Select(fields ...string) *PendingOpSelect
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 {
ProviderThreadIds []string `json:"provider_thread_ids,omitempty"`
}
client.PendingOp.Query().
Select(pendingop.FieldProviderThreadIds).
Scan(ctx, &v)
func (*PendingOpQuery) Unique ¶
func (_q *PendingOpQuery) Unique(unique bool) *PendingOpQuery
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 (*PendingOpQuery) Where ¶
func (_q *PendingOpQuery) Where(ps ...predicate.PendingOp) *PendingOpQuery
Where adds a new predicate for the PendingOpQuery builder.
func (*PendingOpQuery) WithAccount ¶
func (_q *PendingOpQuery) WithAccount(opts ...func(*AccountQuery)) *PendingOpQuery
WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.
type PendingOpSelect ¶
type PendingOpSelect struct {
*PendingOpQuery
// contains filtered or unexported fields
}
PendingOpSelect is the builder for selecting fields of PendingOp entities.
func (*PendingOpSelect) Aggregate ¶
func (_s *PendingOpSelect) Aggregate(fns ...AggregateFunc) *PendingOpSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PendingOpSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PendingOpSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (PendingOpSelect) ExecContext ¶
func (c PendingOpSelect) 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 (*PendingOpSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PendingOpSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PendingOpSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PendingOpSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PendingOpSelect) Modify ¶
func (_s *PendingOpSelect) Modify(modifiers ...func(s *sql.Selector)) *PendingOpSelect
Modify adds a query modifier for attaching custom logic to queries.
func (PendingOpSelect) QueryContext ¶
func (c PendingOpSelect) 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 (*PendingOpSelect) Scan ¶
func (_s *PendingOpSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PendingOpSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PendingOpUpdate ¶
type PendingOpUpdate struct {
// contains filtered or unexported fields
}
PendingOpUpdate is the builder for updating PendingOp entities.
func (*PendingOpUpdate) AddAttempts ¶
func (_u *PendingOpUpdate) AddAttempts(v int) *PendingOpUpdate
AddAttempts adds value to the "attempts" field.
func (*PendingOpUpdate) AppendProviderThreadIds ¶
func (_u *PendingOpUpdate) AppendProviderThreadIds(v []string) *PendingOpUpdate
AppendProviderThreadIds appends value to the "provider_thread_ids" field.
func (*PendingOpUpdate) ClearAccount ¶
func (_u *PendingOpUpdate) ClearAccount() *PendingOpUpdate
ClearAccount clears the "account" edge to the Account entity.
func (*PendingOpUpdate) ClearNextAttemptAt ¶
func (_u *PendingOpUpdate) ClearNextAttemptAt() *PendingOpUpdate
ClearNextAttemptAt clears the value of the "next_attempt_at" field.
func (*PendingOpUpdate) Exec ¶
func (_u *PendingOpUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PendingOpUpdate) ExecContext ¶
func (c *PendingOpUpdate) 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 (*PendingOpUpdate) ExecX ¶
func (_u *PendingOpUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PendingOpUpdate) Modify ¶
func (_u *PendingOpUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PendingOpUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*PendingOpUpdate) Mutation ¶
func (_u *PendingOpUpdate) Mutation() *PendingOpMutation
Mutation returns the PendingOpMutation object of the builder.
func (*PendingOpUpdate) QueryContext ¶
func (c *PendingOpUpdate) 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 (*PendingOpUpdate) Save ¶
func (_u *PendingOpUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PendingOpUpdate) SaveX ¶
func (_u *PendingOpUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PendingOpUpdate) SetAccount ¶
func (_u *PendingOpUpdate) SetAccount(v *Account) *PendingOpUpdate
SetAccount sets the "account" edge to the Account entity.
func (*PendingOpUpdate) SetAccountID ¶
func (_u *PendingOpUpdate) SetAccountID(id uuid.UUID) *PendingOpUpdate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*PendingOpUpdate) SetAttempts ¶
func (_u *PendingOpUpdate) SetAttempts(v int) *PendingOpUpdate
SetAttempts sets the "attempts" field.
func (*PendingOpUpdate) SetLastError ¶
func (_u *PendingOpUpdate) SetLastError(v string) *PendingOpUpdate
SetLastError sets the "last_error" field.
func (*PendingOpUpdate) SetNextAttemptAt ¶
func (_u *PendingOpUpdate) SetNextAttemptAt(v time.Time) *PendingOpUpdate
SetNextAttemptAt sets the "next_attempt_at" field.
func (*PendingOpUpdate) SetNillableAttempts ¶
func (_u *PendingOpUpdate) SetNillableAttempts(v *int) *PendingOpUpdate
SetNillableAttempts sets the "attempts" field if the given value is not nil.
func (*PendingOpUpdate) SetNillableLastError ¶
func (_u *PendingOpUpdate) SetNillableLastError(v *string) *PendingOpUpdate
SetNillableLastError sets the "last_error" field if the given value is not nil.
func (*PendingOpUpdate) SetNillableNextAttemptAt ¶
func (_u *PendingOpUpdate) SetNillableNextAttemptAt(v *time.Time) *PendingOpUpdate
SetNillableNextAttemptAt sets the "next_attempt_at" field if the given value is not nil.
func (*PendingOpUpdate) SetNillableOpType ¶
func (_u *PendingOpUpdate) SetNillableOpType(v *pendingop.OpType) *PendingOpUpdate
SetNillableOpType sets the "op_type" field if the given value is not nil.
func (*PendingOpUpdate) SetNillableState ¶
func (_u *PendingOpUpdate) SetNillableState(v *pendingop.State) *PendingOpUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*PendingOpUpdate) SetOpType ¶
func (_u *PendingOpUpdate) SetOpType(v pendingop.OpType) *PendingOpUpdate
SetOpType sets the "op_type" field.
func (*PendingOpUpdate) SetPayload ¶
func (_u *PendingOpUpdate) SetPayload(v map[string]interface{}) *PendingOpUpdate
SetPayload sets the "payload" field.
func (*PendingOpUpdate) SetProviderThreadIds ¶
func (_u *PendingOpUpdate) SetProviderThreadIds(v []string) *PendingOpUpdate
SetProviderThreadIds sets the "provider_thread_ids" field.
func (*PendingOpUpdate) SetState ¶
func (_u *PendingOpUpdate) SetState(v pendingop.State) *PendingOpUpdate
SetState sets the "state" field.
func (*PendingOpUpdate) Where ¶
func (_u *PendingOpUpdate) Where(ps ...predicate.PendingOp) *PendingOpUpdate
Where appends a list predicates to the PendingOpUpdate builder.
type PendingOpUpdateOne ¶
type PendingOpUpdateOne struct {
// contains filtered or unexported fields
}
PendingOpUpdateOne is the builder for updating a single PendingOp entity.
func (*PendingOpUpdateOne) AddAttempts ¶
func (_u *PendingOpUpdateOne) AddAttempts(v int) *PendingOpUpdateOne
AddAttempts adds value to the "attempts" field.
func (*PendingOpUpdateOne) AppendProviderThreadIds ¶
func (_u *PendingOpUpdateOne) AppendProviderThreadIds(v []string) *PendingOpUpdateOne
AppendProviderThreadIds appends value to the "provider_thread_ids" field.
func (*PendingOpUpdateOne) ClearAccount ¶
func (_u *PendingOpUpdateOne) ClearAccount() *PendingOpUpdateOne
ClearAccount clears the "account" edge to the Account entity.
func (*PendingOpUpdateOne) ClearNextAttemptAt ¶
func (_u *PendingOpUpdateOne) ClearNextAttemptAt() *PendingOpUpdateOne
ClearNextAttemptAt clears the value of the "next_attempt_at" field.
func (*PendingOpUpdateOne) Exec ¶
func (_u *PendingOpUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PendingOpUpdateOne) ExecContext ¶
func (c *PendingOpUpdateOne) 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 (*PendingOpUpdateOne) ExecX ¶
func (_u *PendingOpUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PendingOpUpdateOne) Modify ¶
func (_u *PendingOpUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PendingOpUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*PendingOpUpdateOne) Mutation ¶
func (_u *PendingOpUpdateOne) Mutation() *PendingOpMutation
Mutation returns the PendingOpMutation object of the builder.
func (*PendingOpUpdateOne) QueryContext ¶
func (c *PendingOpUpdateOne) 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 (*PendingOpUpdateOne) Save ¶
func (_u *PendingOpUpdateOne) Save(ctx context.Context) (*PendingOp, error)
Save executes the query and returns the updated PendingOp entity.
func (*PendingOpUpdateOne) SaveX ¶
func (_u *PendingOpUpdateOne) SaveX(ctx context.Context) *PendingOp
SaveX is like Save, but panics if an error occurs.
func (*PendingOpUpdateOne) Select ¶
func (_u *PendingOpUpdateOne) Select(field string, fields ...string) *PendingOpUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PendingOpUpdateOne) SetAccount ¶
func (_u *PendingOpUpdateOne) SetAccount(v *Account) *PendingOpUpdateOne
SetAccount sets the "account" edge to the Account entity.
func (*PendingOpUpdateOne) SetAccountID ¶
func (_u *PendingOpUpdateOne) SetAccountID(id uuid.UUID) *PendingOpUpdateOne
SetAccountID sets the "account" edge to the Account entity by ID.
func (*PendingOpUpdateOne) SetAttempts ¶
func (_u *PendingOpUpdateOne) SetAttempts(v int) *PendingOpUpdateOne
SetAttempts sets the "attempts" field.
func (*PendingOpUpdateOne) SetLastError ¶
func (_u *PendingOpUpdateOne) SetLastError(v string) *PendingOpUpdateOne
SetLastError sets the "last_error" field.
func (*PendingOpUpdateOne) SetNextAttemptAt ¶
func (_u *PendingOpUpdateOne) SetNextAttemptAt(v time.Time) *PendingOpUpdateOne
SetNextAttemptAt sets the "next_attempt_at" field.
func (*PendingOpUpdateOne) SetNillableAttempts ¶
func (_u *PendingOpUpdateOne) SetNillableAttempts(v *int) *PendingOpUpdateOne
SetNillableAttempts sets the "attempts" field if the given value is not nil.
func (*PendingOpUpdateOne) SetNillableLastError ¶
func (_u *PendingOpUpdateOne) SetNillableLastError(v *string) *PendingOpUpdateOne
SetNillableLastError sets the "last_error" field if the given value is not nil.
func (*PendingOpUpdateOne) SetNillableNextAttemptAt ¶
func (_u *PendingOpUpdateOne) SetNillableNextAttemptAt(v *time.Time) *PendingOpUpdateOne
SetNillableNextAttemptAt sets the "next_attempt_at" field if the given value is not nil.
func (*PendingOpUpdateOne) SetNillableOpType ¶
func (_u *PendingOpUpdateOne) SetNillableOpType(v *pendingop.OpType) *PendingOpUpdateOne
SetNillableOpType sets the "op_type" field if the given value is not nil.
func (*PendingOpUpdateOne) SetNillableState ¶
func (_u *PendingOpUpdateOne) SetNillableState(v *pendingop.State) *PendingOpUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*PendingOpUpdateOne) SetOpType ¶
func (_u *PendingOpUpdateOne) SetOpType(v pendingop.OpType) *PendingOpUpdateOne
SetOpType sets the "op_type" field.
func (*PendingOpUpdateOne) SetPayload ¶
func (_u *PendingOpUpdateOne) SetPayload(v map[string]interface{}) *PendingOpUpdateOne
SetPayload sets the "payload" field.
func (*PendingOpUpdateOne) SetProviderThreadIds ¶
func (_u *PendingOpUpdateOne) SetProviderThreadIds(v []string) *PendingOpUpdateOne
SetProviderThreadIds sets the "provider_thread_ids" field.
func (*PendingOpUpdateOne) SetState ¶
func (_u *PendingOpUpdateOne) SetState(v pendingop.State) *PendingOpUpdateOne
SetState sets the "state" field.
func (*PendingOpUpdateOne) Where ¶
func (_u *PendingOpUpdateOne) Where(ps ...predicate.PendingOp) *PendingOpUpdateOne
Where appends a list predicates to the PendingOpUpdate builder.
type PendingOpUpsert ¶
PendingOpUpsert is the "OnConflict" setter.
func (*PendingOpUpsert) AddAttempts ¶
func (u *PendingOpUpsert) AddAttempts(v int) *PendingOpUpsert
AddAttempts adds v to the "attempts" field.
func (*PendingOpUpsert) ClearNextAttemptAt ¶
func (u *PendingOpUpsert) ClearNextAttemptAt() *PendingOpUpsert
ClearNextAttemptAt clears the value of the "next_attempt_at" field.
func (*PendingOpUpsert) SetAttempts ¶
func (u *PendingOpUpsert) SetAttempts(v int) *PendingOpUpsert
SetAttempts sets the "attempts" field.
func (*PendingOpUpsert) SetLastError ¶
func (u *PendingOpUpsert) SetLastError(v string) *PendingOpUpsert
SetLastError sets the "last_error" field.
func (*PendingOpUpsert) SetNextAttemptAt ¶
func (u *PendingOpUpsert) SetNextAttemptAt(v time.Time) *PendingOpUpsert
SetNextAttemptAt sets the "next_attempt_at" field.
func (*PendingOpUpsert) SetOpType ¶
func (u *PendingOpUpsert) SetOpType(v pendingop.OpType) *PendingOpUpsert
SetOpType sets the "op_type" field.
func (*PendingOpUpsert) SetPayload ¶
func (u *PendingOpUpsert) SetPayload(v map[string]interface{}) *PendingOpUpsert
SetPayload sets the "payload" field.
func (*PendingOpUpsert) SetProviderThreadIds ¶
func (u *PendingOpUpsert) SetProviderThreadIds(v []string) *PendingOpUpsert
SetProviderThreadIds sets the "provider_thread_ids" field.
func (*PendingOpUpsert) SetState ¶
func (u *PendingOpUpsert) SetState(v pendingop.State) *PendingOpUpsert
SetState sets the "state" field.
func (*PendingOpUpsert) UpdateAttempts ¶
func (u *PendingOpUpsert) UpdateAttempts() *PendingOpUpsert
UpdateAttempts sets the "attempts" field to the value that was provided on create.
func (*PendingOpUpsert) UpdateLastError ¶
func (u *PendingOpUpsert) UpdateLastError() *PendingOpUpsert
UpdateLastError sets the "last_error" field to the value that was provided on create.
func (*PendingOpUpsert) UpdateNextAttemptAt ¶
func (u *PendingOpUpsert) UpdateNextAttemptAt() *PendingOpUpsert
UpdateNextAttemptAt sets the "next_attempt_at" field to the value that was provided on create.
func (*PendingOpUpsert) UpdateOpType ¶
func (u *PendingOpUpsert) UpdateOpType() *PendingOpUpsert
UpdateOpType sets the "op_type" field to the value that was provided on create.
func (*PendingOpUpsert) UpdatePayload ¶
func (u *PendingOpUpsert) UpdatePayload() *PendingOpUpsert
UpdatePayload sets the "payload" field to the value that was provided on create.
func (*PendingOpUpsert) UpdateProviderThreadIds ¶
func (u *PendingOpUpsert) UpdateProviderThreadIds() *PendingOpUpsert
UpdateProviderThreadIds sets the "provider_thread_ids" field to the value that was provided on create.
func (*PendingOpUpsert) UpdateState ¶
func (u *PendingOpUpsert) UpdateState() *PendingOpUpsert
UpdateState sets the "state" field to the value that was provided on create.
type PendingOpUpsertBulk ¶
type PendingOpUpsertBulk struct {
// contains filtered or unexported fields
}
PendingOpUpsertBulk is the builder for "upsert"-ing a bulk of PendingOp nodes.
func (*PendingOpUpsertBulk) AddAttempts ¶
func (u *PendingOpUpsertBulk) AddAttempts(v int) *PendingOpUpsertBulk
AddAttempts adds v to the "attempts" field.
func (*PendingOpUpsertBulk) ClearNextAttemptAt ¶
func (u *PendingOpUpsertBulk) ClearNextAttemptAt() *PendingOpUpsertBulk
ClearNextAttemptAt clears the value of the "next_attempt_at" field.
func (*PendingOpUpsertBulk) DoNothing ¶
func (u *PendingOpUpsertBulk) DoNothing() *PendingOpUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PendingOpUpsertBulk) Exec ¶
func (u *PendingOpUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PendingOpUpsertBulk) ExecX ¶
func (u *PendingOpUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PendingOpUpsertBulk) Ignore ¶
func (u *PendingOpUpsertBulk) Ignore() *PendingOpUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.PendingOp.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*PendingOpUpsertBulk) SetAttempts ¶
func (u *PendingOpUpsertBulk) SetAttempts(v int) *PendingOpUpsertBulk
SetAttempts sets the "attempts" field.
func (*PendingOpUpsertBulk) SetLastError ¶
func (u *PendingOpUpsertBulk) SetLastError(v string) *PendingOpUpsertBulk
SetLastError sets the "last_error" field.
func (*PendingOpUpsertBulk) SetNextAttemptAt ¶
func (u *PendingOpUpsertBulk) SetNextAttemptAt(v time.Time) *PendingOpUpsertBulk
SetNextAttemptAt sets the "next_attempt_at" field.
func (*PendingOpUpsertBulk) SetOpType ¶
func (u *PendingOpUpsertBulk) SetOpType(v pendingop.OpType) *PendingOpUpsertBulk
SetOpType sets the "op_type" field.
func (*PendingOpUpsertBulk) SetPayload ¶
func (u *PendingOpUpsertBulk) SetPayload(v map[string]interface{}) *PendingOpUpsertBulk
SetPayload sets the "payload" field.
func (*PendingOpUpsertBulk) SetProviderThreadIds ¶
func (u *PendingOpUpsertBulk) SetProviderThreadIds(v []string) *PendingOpUpsertBulk
SetProviderThreadIds sets the "provider_thread_ids" field.
func (*PendingOpUpsertBulk) SetState ¶
func (u *PendingOpUpsertBulk) SetState(v pendingop.State) *PendingOpUpsertBulk
SetState sets the "state" field.
func (*PendingOpUpsertBulk) Update ¶
func (u *PendingOpUpsertBulk) Update(set func(*PendingOpUpsert)) *PendingOpUpsertBulk
Update allows overriding fields `UPDATE` values. See the PendingOpCreateBulk.OnConflict documentation for more info.
func (*PendingOpUpsertBulk) UpdateAttempts ¶
func (u *PendingOpUpsertBulk) UpdateAttempts() *PendingOpUpsertBulk
UpdateAttempts sets the "attempts" field to the value that was provided on create.
func (*PendingOpUpsertBulk) UpdateLastError ¶
func (u *PendingOpUpsertBulk) UpdateLastError() *PendingOpUpsertBulk
UpdateLastError sets the "last_error" field to the value that was provided on create.
func (*PendingOpUpsertBulk) UpdateNewValues ¶
func (u *PendingOpUpsertBulk) UpdateNewValues() *PendingOpUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.PendingOp.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*PendingOpUpsertBulk) UpdateNextAttemptAt ¶
func (u *PendingOpUpsertBulk) UpdateNextAttemptAt() *PendingOpUpsertBulk
UpdateNextAttemptAt sets the "next_attempt_at" field to the value that was provided on create.
func (*PendingOpUpsertBulk) UpdateOpType ¶
func (u *PendingOpUpsertBulk) UpdateOpType() *PendingOpUpsertBulk
UpdateOpType sets the "op_type" field to the value that was provided on create.
func (*PendingOpUpsertBulk) UpdatePayload ¶
func (u *PendingOpUpsertBulk) UpdatePayload() *PendingOpUpsertBulk
UpdatePayload sets the "payload" field to the value that was provided on create.
func (*PendingOpUpsertBulk) UpdateProviderThreadIds ¶
func (u *PendingOpUpsertBulk) UpdateProviderThreadIds() *PendingOpUpsertBulk
UpdateProviderThreadIds sets the "provider_thread_ids" field to the value that was provided on create.
func (*PendingOpUpsertBulk) UpdateState ¶
func (u *PendingOpUpsertBulk) UpdateState() *PendingOpUpsertBulk
UpdateState sets the "state" field to the value that was provided on create.
type PendingOpUpsertOne ¶
type PendingOpUpsertOne struct {
// contains filtered or unexported fields
}
PendingOpUpsertOne is the builder for "upsert"-ing
one PendingOp node.
func (*PendingOpUpsertOne) AddAttempts ¶
func (u *PendingOpUpsertOne) AddAttempts(v int) *PendingOpUpsertOne
AddAttempts adds v to the "attempts" field.
func (*PendingOpUpsertOne) ClearNextAttemptAt ¶
func (u *PendingOpUpsertOne) ClearNextAttemptAt() *PendingOpUpsertOne
ClearNextAttemptAt clears the value of the "next_attempt_at" field.
func (*PendingOpUpsertOne) DoNothing ¶
func (u *PendingOpUpsertOne) DoNothing() *PendingOpUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PendingOpUpsertOne) Exec ¶
func (u *PendingOpUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*PendingOpUpsertOne) ExecX ¶
func (u *PendingOpUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PendingOpUpsertOne) ID ¶
func (u *PendingOpUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*PendingOpUpsertOne) IDX ¶
func (u *PendingOpUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*PendingOpUpsertOne) Ignore ¶
func (u *PendingOpUpsertOne) Ignore() *PendingOpUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.PendingOp.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*PendingOpUpsertOne) SetAttempts ¶
func (u *PendingOpUpsertOne) SetAttempts(v int) *PendingOpUpsertOne
SetAttempts sets the "attempts" field.
func (*PendingOpUpsertOne) SetLastError ¶
func (u *PendingOpUpsertOne) SetLastError(v string) *PendingOpUpsertOne
SetLastError sets the "last_error" field.
func (*PendingOpUpsertOne) SetNextAttemptAt ¶
func (u *PendingOpUpsertOne) SetNextAttemptAt(v time.Time) *PendingOpUpsertOne
SetNextAttemptAt sets the "next_attempt_at" field.
func (*PendingOpUpsertOne) SetOpType ¶
func (u *PendingOpUpsertOne) SetOpType(v pendingop.OpType) *PendingOpUpsertOne
SetOpType sets the "op_type" field.
func (*PendingOpUpsertOne) SetPayload ¶
func (u *PendingOpUpsertOne) SetPayload(v map[string]interface{}) *PendingOpUpsertOne
SetPayload sets the "payload" field.
func (*PendingOpUpsertOne) SetProviderThreadIds ¶
func (u *PendingOpUpsertOne) SetProviderThreadIds(v []string) *PendingOpUpsertOne
SetProviderThreadIds sets the "provider_thread_ids" field.
func (*PendingOpUpsertOne) SetState ¶
func (u *PendingOpUpsertOne) SetState(v pendingop.State) *PendingOpUpsertOne
SetState sets the "state" field.
func (*PendingOpUpsertOne) Update ¶
func (u *PendingOpUpsertOne) Update(set func(*PendingOpUpsert)) *PendingOpUpsertOne
Update allows overriding fields `UPDATE` values. See the PendingOpCreate.OnConflict documentation for more info.
func (*PendingOpUpsertOne) UpdateAttempts ¶
func (u *PendingOpUpsertOne) UpdateAttempts() *PendingOpUpsertOne
UpdateAttempts sets the "attempts" field to the value that was provided on create.
func (*PendingOpUpsertOne) UpdateLastError ¶
func (u *PendingOpUpsertOne) UpdateLastError() *PendingOpUpsertOne
UpdateLastError sets the "last_error" field to the value that was provided on create.
func (*PendingOpUpsertOne) UpdateNewValues ¶
func (u *PendingOpUpsertOne) UpdateNewValues() *PendingOpUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.PendingOp.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*PendingOpUpsertOne) UpdateNextAttemptAt ¶
func (u *PendingOpUpsertOne) UpdateNextAttemptAt() *PendingOpUpsertOne
UpdateNextAttemptAt sets the "next_attempt_at" field to the value that was provided on create.
func (*PendingOpUpsertOne) UpdateOpType ¶
func (u *PendingOpUpsertOne) UpdateOpType() *PendingOpUpsertOne
UpdateOpType sets the "op_type" field to the value that was provided on create.
func (*PendingOpUpsertOne) UpdatePayload ¶
func (u *PendingOpUpsertOne) UpdatePayload() *PendingOpUpsertOne
UpdatePayload sets the "payload" field to the value that was provided on create.
func (*PendingOpUpsertOne) UpdateProviderThreadIds ¶
func (u *PendingOpUpsertOne) UpdateProviderThreadIds() *PendingOpUpsertOne
UpdateProviderThreadIds sets the "provider_thread_ids" field to the value that was provided on create.
func (*PendingOpUpsertOne) UpdateState ¶
func (u *PendingOpUpsertOne) UpdateState() *PendingOpUpsertOne
UpdateState sets the "state" field to the value that was provided on create.
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 Secret ¶
type Secret struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Key holds the value of the "key" field.
Key string `json:"key,omitempty"`
// Value holds the value of the "value" field.
Value []byte `json:"-"`
// 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"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the SecretQuery when eager-loading is set.
Edges SecretEdges `json:"edges"`
// contains filtered or unexported fields
}
Secret is the model entity for the Secret schema.
func (*Secret) 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 (*Secret) GetValue ¶
GetValue returns the ent.Value that was dynamically selected and assigned to the Secret. This includes values selected through modifiers, order, etc.
func (*Secret) QueryAccount ¶
func (_m *Secret) QueryAccount() *AccountQuery
QueryAccount queries the "account" edge of the Secret entity.
func (*Secret) 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 (*Secret) Unwrap ¶
Unwrap unwraps the Secret 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 (*Secret) Update ¶
func (_m *Secret) Update() *SecretUpdateOne
Update returns a builder for updating this Secret. Note that you need to call Secret.Unwrap() before calling this method if this Secret was returned from a transaction, and the transaction was committed or rolled back.
type SecretClient ¶
type SecretClient struct {
// contains filtered or unexported fields
}
SecretClient is a client for the Secret schema.
func NewSecretClient ¶
func NewSecretClient(c config) *SecretClient
NewSecretClient returns a client for the Secret from the given config.
func (*SecretClient) Create ¶
func (c *SecretClient) Create() *SecretCreate
Create returns a builder for creating a Secret entity.
func (*SecretClient) CreateBulk ¶
func (c *SecretClient) CreateBulk(builders ...*SecretCreate) *SecretCreateBulk
CreateBulk returns a builder for creating a bulk of Secret entities.
func (*SecretClient) Delete ¶
func (c *SecretClient) Delete() *SecretDelete
Delete returns a delete builder for Secret.
func (*SecretClient) DeleteOne ¶
func (c *SecretClient) DeleteOne(_m *Secret) *SecretDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SecretClient) DeleteOneID ¶
func (c *SecretClient) DeleteOneID(id uuid.UUID) *SecretDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SecretClient) ExecContext ¶
func (c *SecretClient) 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 (*SecretClient) Intercept ¶
func (c *SecretClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `secret.Intercept(f(g(h())))`.
func (*SecretClient) Interceptors ¶
func (c *SecretClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SecretClient) MapCreateBulk ¶
func (c *SecretClient) MapCreateBulk(slice any, setFunc func(*SecretCreate, int)) *SecretCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SecretClient) Query ¶
func (c *SecretClient) Query() *SecretQuery
Query returns a query builder for Secret.
func (*SecretClient) QueryAccount ¶
func (c *SecretClient) QueryAccount(_m *Secret) *AccountQuery
QueryAccount queries the account edge of a Secret.
func (*SecretClient) QueryContext ¶
func (c *SecretClient) 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 (*SecretClient) Update ¶
func (c *SecretClient) Update() *SecretUpdate
Update returns an update builder for Secret.
func (*SecretClient) UpdateOne ¶
func (c *SecretClient) UpdateOne(_m *Secret) *SecretUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SecretClient) UpdateOneID ¶
func (c *SecretClient) UpdateOneID(id uuid.UUID) *SecretUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SecretClient) Use ¶
func (c *SecretClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `secret.Hooks(f(g(h())))`.
type SecretCreate ¶
type SecretCreate struct {
// contains filtered or unexported fields
}
SecretCreate is the builder for creating a Secret entity.
func (*SecretCreate) Exec ¶
func (_c *SecretCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SecretCreate) ExecContext ¶
func (c *SecretCreate) 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 (*SecretCreate) ExecX ¶
func (_c *SecretCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretCreate) Mutation ¶
func (_c *SecretCreate) Mutation() *SecretMutation
Mutation returns the SecretMutation object of the builder.
func (*SecretCreate) OnConflict ¶
func (_c *SecretCreate) OnConflict(opts ...sql.ConflictOption) *SecretUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Secret.Create().
SetKey(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.SecretUpsert) {
SetKey(v+v).
}).
Exec(ctx)
func (*SecretCreate) OnConflictColumns ¶
func (_c *SecretCreate) OnConflictColumns(columns ...string) *SecretUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Secret.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SecretCreate) QueryContext ¶
func (c *SecretCreate) 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 (*SecretCreate) Save ¶
func (_c *SecretCreate) Save(ctx context.Context) (*Secret, error)
Save creates the Secret in the database.
func (*SecretCreate) SaveX ¶
func (_c *SecretCreate) SaveX(ctx context.Context) *Secret
SaveX calls Save and panics if Save returns an error.
func (*SecretCreate) SetAccount ¶
func (_c *SecretCreate) SetAccount(v *Account) *SecretCreate
SetAccount sets the "account" edge to the Account entity.
func (*SecretCreate) SetAccountID ¶
func (_c *SecretCreate) SetAccountID(id uuid.UUID) *SecretCreate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*SecretCreate) SetCreatedAt ¶
func (_c *SecretCreate) SetCreatedAt(v time.Time) *SecretCreate
SetCreatedAt sets the "created_at" field.
func (*SecretCreate) SetID ¶
func (_c *SecretCreate) SetID(v uuid.UUID) *SecretCreate
SetID sets the "id" field.
func (*SecretCreate) SetKey ¶
func (_c *SecretCreate) SetKey(v string) *SecretCreate
SetKey sets the "key" field.
func (*SecretCreate) SetNillableCreatedAt ¶
func (_c *SecretCreate) SetNillableCreatedAt(v *time.Time) *SecretCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SecretCreate) SetNillableID ¶
func (_c *SecretCreate) SetNillableID(v *uuid.UUID) *SecretCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SecretCreate) SetNillableUpdatedAt ¶
func (_c *SecretCreate) SetNillableUpdatedAt(v *time.Time) *SecretCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SecretCreate) SetUpdatedAt ¶
func (_c *SecretCreate) SetUpdatedAt(v time.Time) *SecretCreate
SetUpdatedAt sets the "updated_at" field.
func (*SecretCreate) SetValue ¶
func (_c *SecretCreate) SetValue(v []byte) *SecretCreate
SetValue sets the "value" field.
type SecretCreateBulk ¶
type SecretCreateBulk struct {
// contains filtered or unexported fields
}
SecretCreateBulk is the builder for creating many Secret entities in bulk.
func (*SecretCreateBulk) Exec ¶
func (_c *SecretCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SecretCreateBulk) ExecContext ¶
func (c *SecretCreateBulk) 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 (*SecretCreateBulk) ExecX ¶
func (_c *SecretCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretCreateBulk) OnConflict ¶
func (_c *SecretCreateBulk) OnConflict(opts ...sql.ConflictOption) *SecretUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Secret.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.SecretUpsert) {
SetKey(v+v).
}).
Exec(ctx)
func (*SecretCreateBulk) OnConflictColumns ¶
func (_c *SecretCreateBulk) OnConflictColumns(columns ...string) *SecretUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Secret.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SecretCreateBulk) QueryContext ¶
func (c *SecretCreateBulk) 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 SecretDelete ¶
type SecretDelete struct {
// contains filtered or unexported fields
}
SecretDelete is the builder for deleting a Secret entity.
func (*SecretDelete) Exec ¶
func (_d *SecretDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SecretDelete) ExecContext ¶
func (c *SecretDelete) 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 (*SecretDelete) ExecX ¶
func (_d *SecretDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SecretDelete) QueryContext ¶
func (c *SecretDelete) 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 (*SecretDelete) Where ¶
func (_d *SecretDelete) Where(ps ...predicate.Secret) *SecretDelete
Where appends a list predicates to the SecretDelete builder.
type SecretDeleteOne ¶
type SecretDeleteOne struct {
// contains filtered or unexported fields
}
SecretDeleteOne is the builder for deleting a single Secret entity.
func (*SecretDeleteOne) Exec ¶
func (_d *SecretDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SecretDeleteOne) ExecX ¶
func (_d *SecretDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretDeleteOne) Where ¶
func (_d *SecretDeleteOne) Where(ps ...predicate.Secret) *SecretDeleteOne
Where appends a list predicates to the SecretDelete builder.
type SecretEdges ¶
type SecretEdges struct {
// Account holds the value of the account edge.
Account *Account `json:"account,omitempty"`
// contains filtered or unexported fields
}
SecretEdges holds the relations/edges for other nodes in the graph.
func (SecretEdges) AccountOrErr ¶
func (e SecretEdges) AccountOrErr() (*Account, error)
AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SecretGroupBy ¶
type SecretGroupBy struct {
// contains filtered or unexported fields
}
SecretGroupBy is the group-by builder for Secret entities.
func (*SecretGroupBy) Aggregate ¶
func (_g *SecretGroupBy) Aggregate(fns ...AggregateFunc) *SecretGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SecretGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Scan ¶
func (_g *SecretGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SecretGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SecretMutation ¶
type SecretMutation struct {
// contains filtered or unexported fields
}
SecretMutation represents an operation that mutates the Secret nodes in the graph.
func (*SecretMutation) AccountCleared ¶
func (m *SecretMutation) AccountCleared() bool
AccountCleared reports if the "account" edge to the Account entity was cleared.
func (*SecretMutation) AccountID ¶
func (m *SecretMutation) AccountID() (id uuid.UUID, exists bool)
AccountID returns the "account" edge ID in the mutation.
func (*SecretMutation) AccountIDs ¶
func (m *SecretMutation) AccountIDs() (ids []uuid.UUID)
AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.
func (*SecretMutation) AddField ¶
func (m *SecretMutation) 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 (*SecretMutation) AddedEdges ¶
func (m *SecretMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SecretMutation) AddedField ¶
func (m *SecretMutation) 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 (*SecretMutation) AddedFields ¶
func (m *SecretMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SecretMutation) AddedIDs ¶
func (m *SecretMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SecretMutation) ClearAccount ¶
func (m *SecretMutation) ClearAccount()
ClearAccount clears the "account" edge to the Account entity.
func (*SecretMutation) ClearEdge ¶
func (m *SecretMutation) 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 (*SecretMutation) ClearField ¶
func (m *SecretMutation) 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 (*SecretMutation) ClearedEdges ¶
func (m *SecretMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SecretMutation) ClearedFields ¶
func (m *SecretMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SecretMutation) Client ¶
func (m SecretMutation) 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 (*SecretMutation) CreatedAt ¶
func (m *SecretMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SecretMutation) EdgeCleared ¶
func (m *SecretMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SecretMutation) ExecContext ¶
func (c *SecretMutation) 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 (*SecretMutation) Field ¶
func (m *SecretMutation) 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 (*SecretMutation) FieldCleared ¶
func (m *SecretMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SecretMutation) Fields ¶
func (m *SecretMutation) 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 (*SecretMutation) ID ¶
func (m *SecretMutation) 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 (*SecretMutation) 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 (*SecretMutation) Key ¶
func (m *SecretMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*SecretMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Secret entity. If the Secret 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 (*SecretMutation) 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 (*SecretMutation) OldKey ¶
func (m *SecretMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the Secret entity. If the Secret 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 (*SecretMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Secret entity. If the Secret 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 (*SecretMutation) OldValue ¶
func (m *SecretMutation) OldValue(ctx context.Context) (v []byte, err error)
OldValue returns the old "value" field's value of the Secret entity. If the Secret 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 (*SecretMutation) QueryContext ¶
func (c *SecretMutation) 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 (*SecretMutation) RemovedEdges ¶
func (m *SecretMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SecretMutation) RemovedIDs ¶
func (m *SecretMutation) 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 (*SecretMutation) ResetAccount ¶
func (m *SecretMutation) ResetAccount()
ResetAccount resets all changes to the "account" edge.
func (*SecretMutation) ResetCreatedAt ¶
func (m *SecretMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SecretMutation) ResetEdge ¶
func (m *SecretMutation) 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 (*SecretMutation) ResetField ¶
func (m *SecretMutation) 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 (*SecretMutation) ResetKey ¶
func (m *SecretMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*SecretMutation) ResetUpdatedAt ¶
func (m *SecretMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SecretMutation) ResetValue ¶
func (m *SecretMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*SecretMutation) SetAccountID ¶
func (m *SecretMutation) SetAccountID(id uuid.UUID)
SetAccountID sets the "account" edge to the Account entity by id.
func (*SecretMutation) SetCreatedAt ¶
func (m *SecretMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SecretMutation) SetField ¶
func (m *SecretMutation) 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 (*SecretMutation) SetID ¶
func (m *SecretMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Secret entities.
func (*SecretMutation) SetKey ¶
func (m *SecretMutation) SetKey(s string)
SetKey sets the "key" field.
func (*SecretMutation) SetOp ¶
func (m *SecretMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SecretMutation) SetUpdatedAt ¶
func (m *SecretMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*SecretMutation) SetValue ¶
func (m *SecretMutation) SetValue(b []byte)
SetValue sets the "value" field.
func (SecretMutation) Tx ¶
func (m SecretMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SecretMutation) Type ¶
func (m *SecretMutation) Type() string
Type returns the node type of this mutation (Secret).
func (*SecretMutation) UpdatedAt ¶
func (m *SecretMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SecretMutation) Value ¶
func (m *SecretMutation) Value() (r []byte, exists bool)
Value returns the value of the "value" field in the mutation.
func (*SecretMutation) Where ¶
func (m *SecretMutation) Where(ps ...predicate.Secret)
Where appends a list predicates to the SecretMutation builder.
func (*SecretMutation) WhereP ¶
func (m *SecretMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SecretMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SecretQuery ¶
type SecretQuery struct {
// contains filtered or unexported fields
}
SecretQuery is the builder for querying Secret entities.
func (*SecretQuery) Aggregate ¶
func (_q *SecretQuery) Aggregate(fns ...AggregateFunc) *SecretSelect
Aggregate returns a SecretSelect configured with the given aggregations.
func (*SecretQuery) All ¶
func (_q *SecretQuery) All(ctx context.Context) ([]*Secret, error)
All executes the query and returns a list of Secrets.
func (*SecretQuery) AllX ¶
func (_q *SecretQuery) AllX(ctx context.Context) []*Secret
AllX is like All, but panics if an error occurs.
func (*SecretQuery) Clone ¶
func (_q *SecretQuery) Clone() *SecretQuery
Clone returns a duplicate of the SecretQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SecretQuery) Count ¶
func (_q *SecretQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SecretQuery) CountX ¶
func (_q *SecretQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SecretQuery) ExecContext ¶
func (c *SecretQuery) 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 (*SecretQuery) Exist ¶
func (_q *SecretQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SecretQuery) ExistX ¶
func (_q *SecretQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SecretQuery) First ¶
func (_q *SecretQuery) First(ctx context.Context) (*Secret, error)
First returns the first Secret entity from the query. Returns a *NotFoundError when no Secret was found.
func (*SecretQuery) FirstID ¶
FirstID returns the first Secret ID from the query. Returns a *NotFoundError when no Secret ID was found.
func (*SecretQuery) FirstIDX ¶
func (_q *SecretQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*SecretQuery) FirstX ¶
func (_q *SecretQuery) FirstX(ctx context.Context) *Secret
FirstX is like First, but panics if an error occurs.
func (*SecretQuery) GroupBy ¶
func (_q *SecretQuery) GroupBy(field string, fields ...string) *SecretGroupBy
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 {
Key string `json:"key,omitempty"`
Count int `json:"count,omitempty"`
}
client.Secret.Query().
GroupBy(secret.FieldKey).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SecretQuery) IDsX ¶
func (_q *SecretQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SecretQuery) Limit ¶
func (_q *SecretQuery) Limit(limit int) *SecretQuery
Limit the number of records to be returned by this query.
func (*SecretQuery) Modify ¶
func (_q *SecretQuery) Modify(modifiers ...func(s *sql.Selector)) *SecretSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*SecretQuery) Offset ¶
func (_q *SecretQuery) Offset(offset int) *SecretQuery
Offset to start from.
func (*SecretQuery) Only ¶
func (_q *SecretQuery) Only(ctx context.Context) (*Secret, error)
Only returns a single Secret entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Secret entity is found. Returns a *NotFoundError when no Secret entities are found.
func (*SecretQuery) OnlyID ¶
OnlyID is like Only, but returns the only Secret ID in the query. Returns a *NotSingularError when more than one Secret ID is found. Returns a *NotFoundError when no entities are found.
func (*SecretQuery) OnlyIDX ¶
func (_q *SecretQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SecretQuery) OnlyX ¶
func (_q *SecretQuery) OnlyX(ctx context.Context) *Secret
OnlyX is like Only, but panics if an error occurs.
func (*SecretQuery) Order ¶
func (_q *SecretQuery) Order(o ...secret.OrderOption) *SecretQuery
Order specifies how the records should be ordered.
func (*SecretQuery) QueryAccount ¶
func (_q *SecretQuery) QueryAccount() *AccountQuery
QueryAccount chains the current query on the "account" edge.
func (*SecretQuery) QueryContext ¶
func (c *SecretQuery) 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 (*SecretQuery) Select ¶
func (_q *SecretQuery) Select(fields ...string) *SecretSelect
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 {
Key string `json:"key,omitempty"`
}
client.Secret.Query().
Select(secret.FieldKey).
Scan(ctx, &v)
func (*SecretQuery) Unique ¶
func (_q *SecretQuery) Unique(unique bool) *SecretQuery
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 (*SecretQuery) Where ¶
func (_q *SecretQuery) Where(ps ...predicate.Secret) *SecretQuery
Where adds a new predicate for the SecretQuery builder.
func (*SecretQuery) WithAccount ¶
func (_q *SecretQuery) WithAccount(opts ...func(*AccountQuery)) *SecretQuery
WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.
type SecretSelect ¶
type SecretSelect struct {
*SecretQuery
// contains filtered or unexported fields
}
SecretSelect is the builder for selecting fields of Secret entities.
func (*SecretSelect) Aggregate ¶
func (_s *SecretSelect) Aggregate(fns ...AggregateFunc) *SecretSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SecretSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (SecretSelect) ExecContext ¶
func (c SecretSelect) 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 (*SecretSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Modify ¶
func (_s *SecretSelect) Modify(modifiers ...func(s *sql.Selector)) *SecretSelect
Modify adds a query modifier for attaching custom logic to queries.
func (SecretSelect) QueryContext ¶
func (c SecretSelect) 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 (*SecretSelect) Scan ¶
func (_s *SecretSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SecretSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SecretUpdate ¶
type SecretUpdate struct {
// contains filtered or unexported fields
}
SecretUpdate is the builder for updating Secret entities.
func (*SecretUpdate) ClearAccount ¶
func (_u *SecretUpdate) ClearAccount() *SecretUpdate
ClearAccount clears the "account" edge to the Account entity.
func (*SecretUpdate) Exec ¶
func (_u *SecretUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SecretUpdate) ExecContext ¶
func (c *SecretUpdate) 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 (*SecretUpdate) ExecX ¶
func (_u *SecretUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretUpdate) Modify ¶
func (_u *SecretUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SecretUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*SecretUpdate) Mutation ¶
func (_u *SecretUpdate) Mutation() *SecretMutation
Mutation returns the SecretMutation object of the builder.
func (*SecretUpdate) QueryContext ¶
func (c *SecretUpdate) 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 (*SecretUpdate) Save ¶
func (_u *SecretUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SecretUpdate) SaveX ¶
func (_u *SecretUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SecretUpdate) SetAccount ¶
func (_u *SecretUpdate) SetAccount(v *Account) *SecretUpdate
SetAccount sets the "account" edge to the Account entity.
func (*SecretUpdate) SetAccountID ¶
func (_u *SecretUpdate) SetAccountID(id uuid.UUID) *SecretUpdate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*SecretUpdate) SetKey ¶
func (_u *SecretUpdate) SetKey(v string) *SecretUpdate
SetKey sets the "key" field.
func (*SecretUpdate) SetNillableKey ¶
func (_u *SecretUpdate) SetNillableKey(v *string) *SecretUpdate
SetNillableKey sets the "key" field if the given value is not nil.
func (*SecretUpdate) SetUpdatedAt ¶
func (_u *SecretUpdate) SetUpdatedAt(v time.Time) *SecretUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SecretUpdate) SetValue ¶
func (_u *SecretUpdate) SetValue(v []byte) *SecretUpdate
SetValue sets the "value" field.
func (*SecretUpdate) Where ¶
func (_u *SecretUpdate) Where(ps ...predicate.Secret) *SecretUpdate
Where appends a list predicates to the SecretUpdate builder.
type SecretUpdateOne ¶
type SecretUpdateOne struct {
// contains filtered or unexported fields
}
SecretUpdateOne is the builder for updating a single Secret entity.
func (*SecretUpdateOne) ClearAccount ¶
func (_u *SecretUpdateOne) ClearAccount() *SecretUpdateOne
ClearAccount clears the "account" edge to the Account entity.
func (*SecretUpdateOne) Exec ¶
func (_u *SecretUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SecretUpdateOne) ExecContext ¶
func (c *SecretUpdateOne) 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 (*SecretUpdateOne) ExecX ¶
func (_u *SecretUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretUpdateOne) Modify ¶
func (_u *SecretUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SecretUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*SecretUpdateOne) Mutation ¶
func (_u *SecretUpdateOne) Mutation() *SecretMutation
Mutation returns the SecretMutation object of the builder.
func (*SecretUpdateOne) QueryContext ¶
func (c *SecretUpdateOne) 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 (*SecretUpdateOne) Save ¶
func (_u *SecretUpdateOne) Save(ctx context.Context) (*Secret, error)
Save executes the query and returns the updated Secret entity.
func (*SecretUpdateOne) SaveX ¶
func (_u *SecretUpdateOne) SaveX(ctx context.Context) *Secret
SaveX is like Save, but panics if an error occurs.
func (*SecretUpdateOne) Select ¶
func (_u *SecretUpdateOne) Select(field string, fields ...string) *SecretUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SecretUpdateOne) SetAccount ¶
func (_u *SecretUpdateOne) SetAccount(v *Account) *SecretUpdateOne
SetAccount sets the "account" edge to the Account entity.
func (*SecretUpdateOne) SetAccountID ¶
func (_u *SecretUpdateOne) SetAccountID(id uuid.UUID) *SecretUpdateOne
SetAccountID sets the "account" edge to the Account entity by ID.
func (*SecretUpdateOne) SetKey ¶
func (_u *SecretUpdateOne) SetKey(v string) *SecretUpdateOne
SetKey sets the "key" field.
func (*SecretUpdateOne) SetNillableKey ¶
func (_u *SecretUpdateOne) SetNillableKey(v *string) *SecretUpdateOne
SetNillableKey sets the "key" field if the given value is not nil.
func (*SecretUpdateOne) SetUpdatedAt ¶
func (_u *SecretUpdateOne) SetUpdatedAt(v time.Time) *SecretUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SecretUpdateOne) SetValue ¶
func (_u *SecretUpdateOne) SetValue(v []byte) *SecretUpdateOne
SetValue sets the "value" field.
func (*SecretUpdateOne) Where ¶
func (_u *SecretUpdateOne) Where(ps ...predicate.Secret) *SecretUpdateOne
Where appends a list predicates to the SecretUpdate builder.
type SecretUpsert ¶
SecretUpsert is the "OnConflict" setter.
func (*SecretUpsert) SetKey ¶
func (u *SecretUpsert) SetKey(v string) *SecretUpsert
SetKey sets the "key" field.
func (*SecretUpsert) SetUpdatedAt ¶
func (u *SecretUpsert) SetUpdatedAt(v time.Time) *SecretUpsert
SetUpdatedAt sets the "updated_at" field.
func (*SecretUpsert) SetValue ¶
func (u *SecretUpsert) SetValue(v []byte) *SecretUpsert
SetValue sets the "value" field.
func (*SecretUpsert) UpdateKey ¶
func (u *SecretUpsert) UpdateKey() *SecretUpsert
UpdateKey sets the "key" field to the value that was provided on create.
func (*SecretUpsert) UpdateUpdatedAt ¶
func (u *SecretUpsert) UpdateUpdatedAt() *SecretUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*SecretUpsert) UpdateValue ¶
func (u *SecretUpsert) UpdateValue() *SecretUpsert
UpdateValue sets the "value" field to the value that was provided on create.
type SecretUpsertBulk ¶
type SecretUpsertBulk struct {
// contains filtered or unexported fields
}
SecretUpsertBulk is the builder for "upsert"-ing a bulk of Secret nodes.
func (*SecretUpsertBulk) DoNothing ¶
func (u *SecretUpsertBulk) DoNothing() *SecretUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SecretUpsertBulk) Exec ¶
func (u *SecretUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SecretUpsertBulk) ExecX ¶
func (u *SecretUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretUpsertBulk) Ignore ¶
func (u *SecretUpsertBulk) Ignore() *SecretUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Secret.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*SecretUpsertBulk) SetKey ¶
func (u *SecretUpsertBulk) SetKey(v string) *SecretUpsertBulk
SetKey sets the "key" field.
func (*SecretUpsertBulk) SetUpdatedAt ¶
func (u *SecretUpsertBulk) SetUpdatedAt(v time.Time) *SecretUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*SecretUpsertBulk) SetValue ¶
func (u *SecretUpsertBulk) SetValue(v []byte) *SecretUpsertBulk
SetValue sets the "value" field.
func (*SecretUpsertBulk) Update ¶
func (u *SecretUpsertBulk) Update(set func(*SecretUpsert)) *SecretUpsertBulk
Update allows overriding fields `UPDATE` values. See the SecretCreateBulk.OnConflict documentation for more info.
func (*SecretUpsertBulk) UpdateKey ¶
func (u *SecretUpsertBulk) UpdateKey() *SecretUpsertBulk
UpdateKey sets the "key" field to the value that was provided on create.
func (*SecretUpsertBulk) UpdateNewValues ¶
func (u *SecretUpsertBulk) UpdateNewValues() *SecretUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Secret.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(secret.FieldID)
}),
).
Exec(ctx)
func (*SecretUpsertBulk) UpdateUpdatedAt ¶
func (u *SecretUpsertBulk) UpdateUpdatedAt() *SecretUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*SecretUpsertBulk) UpdateValue ¶
func (u *SecretUpsertBulk) UpdateValue() *SecretUpsertBulk
UpdateValue sets the "value" field to the value that was provided on create.
type SecretUpsertOne ¶
type SecretUpsertOne struct {
// contains filtered or unexported fields
}
SecretUpsertOne is the builder for "upsert"-ing
one Secret node.
func (*SecretUpsertOne) DoNothing ¶
func (u *SecretUpsertOne) DoNothing() *SecretUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SecretUpsertOne) Exec ¶
func (u *SecretUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*SecretUpsertOne) ExecX ¶
func (u *SecretUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretUpsertOne) IDX ¶
func (u *SecretUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*SecretUpsertOne) Ignore ¶
func (u *SecretUpsertOne) Ignore() *SecretUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Secret.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*SecretUpsertOne) SetKey ¶
func (u *SecretUpsertOne) SetKey(v string) *SecretUpsertOne
SetKey sets the "key" field.
func (*SecretUpsertOne) SetUpdatedAt ¶
func (u *SecretUpsertOne) SetUpdatedAt(v time.Time) *SecretUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*SecretUpsertOne) SetValue ¶
func (u *SecretUpsertOne) SetValue(v []byte) *SecretUpsertOne
SetValue sets the "value" field.
func (*SecretUpsertOne) Update ¶
func (u *SecretUpsertOne) Update(set func(*SecretUpsert)) *SecretUpsertOne
Update allows overriding fields `UPDATE` values. See the SecretCreate.OnConflict documentation for more info.
func (*SecretUpsertOne) UpdateKey ¶
func (u *SecretUpsertOne) UpdateKey() *SecretUpsertOne
UpdateKey sets the "key" field to the value that was provided on create.
func (*SecretUpsertOne) UpdateNewValues ¶
func (u *SecretUpsertOne) UpdateNewValues() *SecretUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Secret.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(secret.FieldID)
}),
).
Exec(ctx)
func (*SecretUpsertOne) UpdateUpdatedAt ¶
func (u *SecretUpsertOne) UpdateUpdatedAt() *SecretUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*SecretUpsertOne) UpdateValue ¶
func (u *SecretUpsertOne) UpdateValue() *SecretUpsertOne
UpdateValue sets the "value" field to the value that was provided on create.
type Thread ¶
type Thread struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// ProviderThreadID holds the value of the "provider_thread_id" field.
ProviderThreadID string `json:"provider_thread_id,omitempty"`
// Subject holds the value of the "subject" field.
Subject string `json:"subject,omitempty"`
// Snippet holds the value of the "snippet" field.
Snippet string `json:"snippet,omitempty"`
// LastMessageAt holds the value of the "last_message_at" field.
LastMessageAt time.Time `json:"last_message_at,omitempty"`
// HistoryLoadedAt holds the value of the "history_loaded_at" field.
HistoryLoadedAt *time.Time `json:"history_loaded_at,omitempty"`
// Participants holds the value of the "participants" field.
Participants []string `json:"participants,omitempty"`
// Unread holds the value of the "unread" field.
Unread bool `json:"unread,omitempty"`
// Starred holds the value of the "starred" field.
Starred bool `json:"starred,omitempty"`
// InInbox holds the value of the "in_inbox" field.
InInbox bool `json:"in_inbox,omitempty"`
// Labels holds the value of the "labels" field.
Labels []string `json:"labels,omitempty"`
// SnoozedUntil holds the value of the "snoozed_until" field.
SnoozedUntil *time.Time `json:"snoozed_until,omitempty"`
// MessageCount holds the value of the "message_count" field.
MessageCount int `json:"message_count,omitempty"`
// HasAttachments holds the value of the "has_attachments" field.
HasAttachments bool `json:"has_attachments,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ThreadQuery when eager-loading is set.
Edges ThreadEdges `json:"edges"`
// contains filtered or unexported fields
}
Thread is the model entity for the Thread schema.
func (*Thread) 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 (*Thread) QueryAccount ¶
func (_m *Thread) QueryAccount() *AccountQuery
QueryAccount queries the "account" edge of the Thread entity.
func (*Thread) 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 (*Thread) QueryMessages ¶
func (_m *Thread) QueryMessages() *MessageQuery
QueryMessages queries the "messages" edge of the Thread entity.
func (*Thread) Unwrap ¶
Unwrap unwraps the Thread 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 (*Thread) Update ¶
func (_m *Thread) Update() *ThreadUpdateOne
Update returns a builder for updating this Thread. Note that you need to call Thread.Unwrap() before calling this method if this Thread was returned from a transaction, and the transaction was committed or rolled back.
type ThreadClient ¶
type ThreadClient struct {
// contains filtered or unexported fields
}
ThreadClient is a client for the Thread schema.
func NewThreadClient ¶
func NewThreadClient(c config) *ThreadClient
NewThreadClient returns a client for the Thread from the given config.
func (*ThreadClient) Create ¶
func (c *ThreadClient) Create() *ThreadCreate
Create returns a builder for creating a Thread entity.
func (*ThreadClient) CreateBulk ¶
func (c *ThreadClient) CreateBulk(builders ...*ThreadCreate) *ThreadCreateBulk
CreateBulk returns a builder for creating a bulk of Thread entities.
func (*ThreadClient) Delete ¶
func (c *ThreadClient) Delete() *ThreadDelete
Delete returns a delete builder for Thread.
func (*ThreadClient) DeleteOne ¶
func (c *ThreadClient) DeleteOne(_m *Thread) *ThreadDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ThreadClient) DeleteOneID ¶
func (c *ThreadClient) DeleteOneID(id int) *ThreadDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ThreadClient) ExecContext ¶
func (c *ThreadClient) 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 (*ThreadClient) GetX ¶
func (c *ThreadClient) GetX(ctx context.Context, id int) *Thread
GetX is like Get, but panics if an error occurs.
func (*ThreadClient) Intercept ¶
func (c *ThreadClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `thread.Intercept(f(g(h())))`.
func (*ThreadClient) Interceptors ¶
func (c *ThreadClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ThreadClient) MapCreateBulk ¶
func (c *ThreadClient) MapCreateBulk(slice any, setFunc func(*ThreadCreate, int)) *ThreadCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ThreadClient) Query ¶
func (c *ThreadClient) Query() *ThreadQuery
Query returns a query builder for Thread.
func (*ThreadClient) QueryAccount ¶
func (c *ThreadClient) QueryAccount(_m *Thread) *AccountQuery
QueryAccount queries the account edge of a Thread.
func (*ThreadClient) QueryContext ¶
func (c *ThreadClient) 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 (*ThreadClient) QueryMessages ¶
func (c *ThreadClient) QueryMessages(_m *Thread) *MessageQuery
QueryMessages queries the messages edge of a Thread.
func (*ThreadClient) Update ¶
func (c *ThreadClient) Update() *ThreadUpdate
Update returns an update builder for Thread.
func (*ThreadClient) UpdateOne ¶
func (c *ThreadClient) UpdateOne(_m *Thread) *ThreadUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ThreadClient) UpdateOneID ¶
func (c *ThreadClient) UpdateOneID(id int) *ThreadUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ThreadClient) Use ¶
func (c *ThreadClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `thread.Hooks(f(g(h())))`.
type ThreadCreate ¶
type ThreadCreate struct {
// contains filtered or unexported fields
}
ThreadCreate is the builder for creating a Thread entity.
func (*ThreadCreate) AddMessageIDs ¶
func (_c *ThreadCreate) AddMessageIDs(ids ...int) *ThreadCreate
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*ThreadCreate) AddMessages ¶
func (_c *ThreadCreate) AddMessages(v ...*Message) *ThreadCreate
AddMessages adds the "messages" edges to the Message entity.
func (*ThreadCreate) Exec ¶
func (_c *ThreadCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ThreadCreate) ExecContext ¶
func (c *ThreadCreate) 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 (*ThreadCreate) ExecX ¶
func (_c *ThreadCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThreadCreate) Mutation ¶
func (_c *ThreadCreate) Mutation() *ThreadMutation
Mutation returns the ThreadMutation object of the builder.
func (*ThreadCreate) OnConflict ¶
func (_c *ThreadCreate) OnConflict(opts ...sql.ConflictOption) *ThreadUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Thread.Create().
SetProviderThreadID(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ThreadUpsert) {
SetProviderThreadID(v+v).
}).
Exec(ctx)
func (*ThreadCreate) OnConflictColumns ¶
func (_c *ThreadCreate) OnConflictColumns(columns ...string) *ThreadUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Thread.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ThreadCreate) QueryContext ¶
func (c *ThreadCreate) 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 (*ThreadCreate) Save ¶
func (_c *ThreadCreate) Save(ctx context.Context) (*Thread, error)
Save creates the Thread in the database.
func (*ThreadCreate) SaveX ¶
func (_c *ThreadCreate) SaveX(ctx context.Context) *Thread
SaveX calls Save and panics if Save returns an error.
func (*ThreadCreate) SetAccount ¶
func (_c *ThreadCreate) SetAccount(v *Account) *ThreadCreate
SetAccount sets the "account" edge to the Account entity.
func (*ThreadCreate) SetAccountID ¶
func (_c *ThreadCreate) SetAccountID(id uuid.UUID) *ThreadCreate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*ThreadCreate) SetHasAttachments ¶
func (_c *ThreadCreate) SetHasAttachments(v bool) *ThreadCreate
SetHasAttachments sets the "has_attachments" field.
func (*ThreadCreate) SetHistoryLoadedAt ¶
func (_c *ThreadCreate) SetHistoryLoadedAt(v time.Time) *ThreadCreate
SetHistoryLoadedAt sets the "history_loaded_at" field.
func (*ThreadCreate) SetInInbox ¶
func (_c *ThreadCreate) SetInInbox(v bool) *ThreadCreate
SetInInbox sets the "in_inbox" field.
func (*ThreadCreate) SetLabels ¶
func (_c *ThreadCreate) SetLabels(v []string) *ThreadCreate
SetLabels sets the "labels" field.
func (*ThreadCreate) SetLastMessageAt ¶
func (_c *ThreadCreate) SetLastMessageAt(v time.Time) *ThreadCreate
SetLastMessageAt sets the "last_message_at" field.
func (*ThreadCreate) SetMessageCount ¶
func (_c *ThreadCreate) SetMessageCount(v int) *ThreadCreate
SetMessageCount sets the "message_count" field.
func (*ThreadCreate) SetNillableHasAttachments ¶
func (_c *ThreadCreate) SetNillableHasAttachments(v *bool) *ThreadCreate
SetNillableHasAttachments sets the "has_attachments" field if the given value is not nil.
func (*ThreadCreate) SetNillableHistoryLoadedAt ¶
func (_c *ThreadCreate) SetNillableHistoryLoadedAt(v *time.Time) *ThreadCreate
SetNillableHistoryLoadedAt sets the "history_loaded_at" field if the given value is not nil.
func (*ThreadCreate) SetNillableInInbox ¶
func (_c *ThreadCreate) SetNillableInInbox(v *bool) *ThreadCreate
SetNillableInInbox sets the "in_inbox" field if the given value is not nil.
func (*ThreadCreate) SetNillableMessageCount ¶
func (_c *ThreadCreate) SetNillableMessageCount(v *int) *ThreadCreate
SetNillableMessageCount sets the "message_count" field if the given value is not nil.
func (*ThreadCreate) SetNillableSnippet ¶
func (_c *ThreadCreate) SetNillableSnippet(v *string) *ThreadCreate
SetNillableSnippet sets the "snippet" field if the given value is not nil.
func (*ThreadCreate) SetNillableSnoozedUntil ¶
func (_c *ThreadCreate) SetNillableSnoozedUntil(v *time.Time) *ThreadCreate
SetNillableSnoozedUntil sets the "snoozed_until" field if the given value is not nil.
func (*ThreadCreate) SetNillableStarred ¶
func (_c *ThreadCreate) SetNillableStarred(v *bool) *ThreadCreate
SetNillableStarred sets the "starred" field if the given value is not nil.
func (*ThreadCreate) SetNillableSubject ¶
func (_c *ThreadCreate) SetNillableSubject(v *string) *ThreadCreate
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*ThreadCreate) SetNillableUnread ¶
func (_c *ThreadCreate) SetNillableUnread(v *bool) *ThreadCreate
SetNillableUnread sets the "unread" field if the given value is not nil.
func (*ThreadCreate) SetParticipants ¶
func (_c *ThreadCreate) SetParticipants(v []string) *ThreadCreate
SetParticipants sets the "participants" field.
func (*ThreadCreate) SetProviderThreadID ¶
func (_c *ThreadCreate) SetProviderThreadID(v string) *ThreadCreate
SetProviderThreadID sets the "provider_thread_id" field.
func (*ThreadCreate) SetSnippet ¶
func (_c *ThreadCreate) SetSnippet(v string) *ThreadCreate
SetSnippet sets the "snippet" field.
func (*ThreadCreate) SetSnoozedUntil ¶
func (_c *ThreadCreate) SetSnoozedUntil(v time.Time) *ThreadCreate
SetSnoozedUntil sets the "snoozed_until" field.
func (*ThreadCreate) SetStarred ¶
func (_c *ThreadCreate) SetStarred(v bool) *ThreadCreate
SetStarred sets the "starred" field.
func (*ThreadCreate) SetSubject ¶
func (_c *ThreadCreate) SetSubject(v string) *ThreadCreate
SetSubject sets the "subject" field.
func (*ThreadCreate) SetUnread ¶
func (_c *ThreadCreate) SetUnread(v bool) *ThreadCreate
SetUnread sets the "unread" field.
type ThreadCreateBulk ¶
type ThreadCreateBulk struct {
// contains filtered or unexported fields
}
ThreadCreateBulk is the builder for creating many Thread entities in bulk.
func (*ThreadCreateBulk) Exec ¶
func (_c *ThreadCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ThreadCreateBulk) ExecContext ¶
func (c *ThreadCreateBulk) 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 (*ThreadCreateBulk) ExecX ¶
func (_c *ThreadCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThreadCreateBulk) OnConflict ¶
func (_c *ThreadCreateBulk) OnConflict(opts ...sql.ConflictOption) *ThreadUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Thread.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ThreadUpsert) {
SetProviderThreadID(v+v).
}).
Exec(ctx)
func (*ThreadCreateBulk) OnConflictColumns ¶
func (_c *ThreadCreateBulk) OnConflictColumns(columns ...string) *ThreadUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Thread.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ThreadCreateBulk) QueryContext ¶
func (c *ThreadCreateBulk) 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 ThreadDelete ¶
type ThreadDelete struct {
// contains filtered or unexported fields
}
ThreadDelete is the builder for deleting a Thread entity.
func (*ThreadDelete) Exec ¶
func (_d *ThreadDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ThreadDelete) ExecContext ¶
func (c *ThreadDelete) 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 (*ThreadDelete) ExecX ¶
func (_d *ThreadDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ThreadDelete) QueryContext ¶
func (c *ThreadDelete) 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 (*ThreadDelete) Where ¶
func (_d *ThreadDelete) Where(ps ...predicate.Thread) *ThreadDelete
Where appends a list predicates to the ThreadDelete builder.
type ThreadDeleteOne ¶
type ThreadDeleteOne struct {
// contains filtered or unexported fields
}
ThreadDeleteOne is the builder for deleting a single Thread entity.
func (*ThreadDeleteOne) Exec ¶
func (_d *ThreadDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ThreadDeleteOne) ExecX ¶
func (_d *ThreadDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThreadDeleteOne) Where ¶
func (_d *ThreadDeleteOne) Where(ps ...predicate.Thread) *ThreadDeleteOne
Where appends a list predicates to the ThreadDelete builder.
type ThreadEdges ¶
type ThreadEdges struct {
// Account holds the value of the account edge.
Account *Account `json:"account,omitempty"`
// Messages holds the value of the messages edge.
Messages []*Message `json:"messages,omitempty"`
// contains filtered or unexported fields
}
ThreadEdges holds the relations/edges for other nodes in the graph.
func (ThreadEdges) AccountOrErr ¶
func (e ThreadEdges) AccountOrErr() (*Account, error)
AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ThreadEdges) MessagesOrErr ¶
func (e ThreadEdges) MessagesOrErr() ([]*Message, error)
MessagesOrErr returns the Messages value or an error if the edge was not loaded in eager-loading.
type ThreadGroupBy ¶
type ThreadGroupBy struct {
// contains filtered or unexported fields
}
ThreadGroupBy is the group-by builder for Thread entities.
func (*ThreadGroupBy) Aggregate ¶
func (_g *ThreadGroupBy) Aggregate(fns ...AggregateFunc) *ThreadGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ThreadGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ThreadGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ThreadGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ThreadGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ThreadGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ThreadGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ThreadGroupBy) Scan ¶
func (_g *ThreadGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ThreadGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ThreadMutation ¶
type ThreadMutation struct {
// contains filtered or unexported fields
}
ThreadMutation represents an operation that mutates the Thread nodes in the graph.
func (*ThreadMutation) AccountCleared ¶
func (m *ThreadMutation) AccountCleared() bool
AccountCleared reports if the "account" edge to the Account entity was cleared.
func (*ThreadMutation) AccountID ¶
func (m *ThreadMutation) AccountID() (id uuid.UUID, exists bool)
AccountID returns the "account" edge ID in the mutation.
func (*ThreadMutation) AccountIDs ¶
func (m *ThreadMutation) AccountIDs() (ids []uuid.UUID)
AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.
func (*ThreadMutation) AddField ¶
func (m *ThreadMutation) 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 (*ThreadMutation) AddMessageCount ¶
func (m *ThreadMutation) AddMessageCount(i int)
AddMessageCount adds i to the "message_count" field.
func (*ThreadMutation) AddMessageIDs ¶
func (m *ThreadMutation) AddMessageIDs(ids ...int)
AddMessageIDs adds the "messages" edge to the Message entity by ids.
func (*ThreadMutation) AddedEdges ¶
func (m *ThreadMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ThreadMutation) AddedField ¶
func (m *ThreadMutation) 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 (*ThreadMutation) AddedFields ¶
func (m *ThreadMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ThreadMutation) AddedIDs ¶
func (m *ThreadMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ThreadMutation) AddedMessageCount ¶
func (m *ThreadMutation) AddedMessageCount() (r int, exists bool)
AddedMessageCount returns the value that was added to the "message_count" field in this mutation.
func (*ThreadMutation) AppendLabels ¶
func (m *ThreadMutation) AppendLabels(s []string)
AppendLabels adds s to the "labels" field.
func (*ThreadMutation) AppendParticipants ¶
func (m *ThreadMutation) AppendParticipants(s []string)
AppendParticipants adds s to the "participants" field.
func (*ThreadMutation) AppendedLabels ¶
func (m *ThreadMutation) AppendedLabels() ([]string, bool)
AppendedLabels returns the list of values that were appended to the "labels" field in this mutation.
func (*ThreadMutation) AppendedParticipants ¶
func (m *ThreadMutation) AppendedParticipants() ([]string, bool)
AppendedParticipants returns the list of values that were appended to the "participants" field in this mutation.
func (*ThreadMutation) ClearAccount ¶
func (m *ThreadMutation) ClearAccount()
ClearAccount clears the "account" edge to the Account entity.
func (*ThreadMutation) ClearEdge ¶
func (m *ThreadMutation) 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 (*ThreadMutation) ClearField ¶
func (m *ThreadMutation) 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 (*ThreadMutation) ClearHistoryLoadedAt ¶
func (m *ThreadMutation) ClearHistoryLoadedAt()
ClearHistoryLoadedAt clears the value of the "history_loaded_at" field.
func (*ThreadMutation) ClearMessages ¶
func (m *ThreadMutation) ClearMessages()
ClearMessages clears the "messages" edge to the Message entity.
func (*ThreadMutation) ClearSnoozedUntil ¶
func (m *ThreadMutation) ClearSnoozedUntil()
ClearSnoozedUntil clears the value of the "snoozed_until" field.
func (*ThreadMutation) ClearedEdges ¶
func (m *ThreadMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ThreadMutation) ClearedFields ¶
func (m *ThreadMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ThreadMutation) Client ¶
func (m ThreadMutation) 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 (*ThreadMutation) EdgeCleared ¶
func (m *ThreadMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ThreadMutation) ExecContext ¶
func (c *ThreadMutation) 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 (*ThreadMutation) Field ¶
func (m *ThreadMutation) 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 (*ThreadMutation) FieldCleared ¶
func (m *ThreadMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ThreadMutation) Fields ¶
func (m *ThreadMutation) 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 (*ThreadMutation) HasAttachments ¶
func (m *ThreadMutation) HasAttachments() (r bool, exists bool)
HasAttachments returns the value of the "has_attachments" field in the mutation.
func (*ThreadMutation) HistoryLoadedAt ¶
func (m *ThreadMutation) HistoryLoadedAt() (r time.Time, exists bool)
HistoryLoadedAt returns the value of the "history_loaded_at" field in the mutation.
func (*ThreadMutation) HistoryLoadedAtCleared ¶
func (m *ThreadMutation) HistoryLoadedAtCleared() bool
HistoryLoadedAtCleared returns if the "history_loaded_at" field was cleared in this mutation.
func (*ThreadMutation) ID ¶
func (m *ThreadMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ThreadMutation) IDs ¶
func (m *ThreadMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ThreadMutation) InInbox ¶
func (m *ThreadMutation) InInbox() (r bool, exists bool)
InInbox returns the value of the "in_inbox" field in the mutation.
func (*ThreadMutation) Labels ¶
func (m *ThreadMutation) Labels() (r []string, exists bool)
Labels returns the value of the "labels" field in the mutation.
func (*ThreadMutation) LastMessageAt ¶
func (m *ThreadMutation) LastMessageAt() (r time.Time, exists bool)
LastMessageAt returns the value of the "last_message_at" field in the mutation.
func (*ThreadMutation) MessageCount ¶
func (m *ThreadMutation) MessageCount() (r int, exists bool)
MessageCount returns the value of the "message_count" field in the mutation.
func (*ThreadMutation) MessagesCleared ¶
func (m *ThreadMutation) MessagesCleared() bool
MessagesCleared reports if the "messages" edge to the Message entity was cleared.
func (*ThreadMutation) MessagesIDs ¶
func (m *ThreadMutation) MessagesIDs() (ids []int)
MessagesIDs returns the "messages" edge IDs in the mutation.
func (*ThreadMutation) 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 (*ThreadMutation) OldHasAttachments ¶
func (m *ThreadMutation) OldHasAttachments(ctx context.Context) (v bool, err error)
OldHasAttachments returns the old "has_attachments" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldHistoryLoadedAt ¶
OldHistoryLoadedAt returns the old "history_loaded_at" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldInInbox ¶
func (m *ThreadMutation) OldInInbox(ctx context.Context) (v bool, err error)
OldInInbox returns the old "in_inbox" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldLabels ¶
func (m *ThreadMutation) OldLabels(ctx context.Context) (v []string, err error)
OldLabels returns the old "labels" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldLastMessageAt ¶
OldLastMessageAt returns the old "last_message_at" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldMessageCount ¶
func (m *ThreadMutation) OldMessageCount(ctx context.Context) (v int, err error)
OldMessageCount returns the old "message_count" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldParticipants ¶
func (m *ThreadMutation) OldParticipants(ctx context.Context) (v []string, err error)
OldParticipants returns the old "participants" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldProviderThreadID ¶
func (m *ThreadMutation) OldProviderThreadID(ctx context.Context) (v string, err error)
OldProviderThreadID returns the old "provider_thread_id" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldSnippet ¶
func (m *ThreadMutation) OldSnippet(ctx context.Context) (v string, err error)
OldSnippet returns the old "snippet" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldSnoozedUntil ¶
OldSnoozedUntil returns the old "snoozed_until" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldStarred ¶
func (m *ThreadMutation) OldStarred(ctx context.Context) (v bool, err error)
OldStarred returns the old "starred" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldSubject ¶
func (m *ThreadMutation) OldSubject(ctx context.Context) (v string, err error)
OldSubject returns the old "subject" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) OldUnread ¶
func (m *ThreadMutation) OldUnread(ctx context.Context) (v bool, err error)
OldUnread returns the old "unread" field's value of the Thread entity. If the Thread 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 (*ThreadMutation) Participants ¶
func (m *ThreadMutation) Participants() (r []string, exists bool)
Participants returns the value of the "participants" field in the mutation.
func (*ThreadMutation) ProviderThreadID ¶
func (m *ThreadMutation) ProviderThreadID() (r string, exists bool)
ProviderThreadID returns the value of the "provider_thread_id" field in the mutation.
func (*ThreadMutation) QueryContext ¶
func (c *ThreadMutation) 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 (*ThreadMutation) RemoveMessageIDs ¶
func (m *ThreadMutation) RemoveMessageIDs(ids ...int)
RemoveMessageIDs removes the "messages" edge to the Message entity by IDs.
func (*ThreadMutation) RemovedEdges ¶
func (m *ThreadMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ThreadMutation) RemovedIDs ¶
func (m *ThreadMutation) 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 (*ThreadMutation) RemovedMessagesIDs ¶
func (m *ThreadMutation) RemovedMessagesIDs() (ids []int)
RemovedMessages returns the removed IDs of the "messages" edge to the Message entity.
func (*ThreadMutation) ResetAccount ¶
func (m *ThreadMutation) ResetAccount()
ResetAccount resets all changes to the "account" edge.
func (*ThreadMutation) ResetEdge ¶
func (m *ThreadMutation) 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 (*ThreadMutation) ResetField ¶
func (m *ThreadMutation) 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 (*ThreadMutation) ResetHasAttachments ¶
func (m *ThreadMutation) ResetHasAttachments()
ResetHasAttachments resets all changes to the "has_attachments" field.
func (*ThreadMutation) ResetHistoryLoadedAt ¶
func (m *ThreadMutation) ResetHistoryLoadedAt()
ResetHistoryLoadedAt resets all changes to the "history_loaded_at" field.
func (*ThreadMutation) ResetInInbox ¶
func (m *ThreadMutation) ResetInInbox()
ResetInInbox resets all changes to the "in_inbox" field.
func (*ThreadMutation) ResetLabels ¶
func (m *ThreadMutation) ResetLabels()
ResetLabels resets all changes to the "labels" field.
func (*ThreadMutation) ResetLastMessageAt ¶
func (m *ThreadMutation) ResetLastMessageAt()
ResetLastMessageAt resets all changes to the "last_message_at" field.
func (*ThreadMutation) ResetMessageCount ¶
func (m *ThreadMutation) ResetMessageCount()
ResetMessageCount resets all changes to the "message_count" field.
func (*ThreadMutation) ResetMessages ¶
func (m *ThreadMutation) ResetMessages()
ResetMessages resets all changes to the "messages" edge.
func (*ThreadMutation) ResetParticipants ¶
func (m *ThreadMutation) ResetParticipants()
ResetParticipants resets all changes to the "participants" field.
func (*ThreadMutation) ResetProviderThreadID ¶
func (m *ThreadMutation) ResetProviderThreadID()
ResetProviderThreadID resets all changes to the "provider_thread_id" field.
func (*ThreadMutation) ResetSnippet ¶
func (m *ThreadMutation) ResetSnippet()
ResetSnippet resets all changes to the "snippet" field.
func (*ThreadMutation) ResetSnoozedUntil ¶
func (m *ThreadMutation) ResetSnoozedUntil()
ResetSnoozedUntil resets all changes to the "snoozed_until" field.
func (*ThreadMutation) ResetStarred ¶
func (m *ThreadMutation) ResetStarred()
ResetStarred resets all changes to the "starred" field.
func (*ThreadMutation) ResetSubject ¶
func (m *ThreadMutation) ResetSubject()
ResetSubject resets all changes to the "subject" field.
func (*ThreadMutation) ResetUnread ¶
func (m *ThreadMutation) ResetUnread()
ResetUnread resets all changes to the "unread" field.
func (*ThreadMutation) SetAccountID ¶
func (m *ThreadMutation) SetAccountID(id uuid.UUID)
SetAccountID sets the "account" edge to the Account entity by id.
func (*ThreadMutation) SetField ¶
func (m *ThreadMutation) 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 (*ThreadMutation) SetHasAttachments ¶
func (m *ThreadMutation) SetHasAttachments(b bool)
SetHasAttachments sets the "has_attachments" field.
func (*ThreadMutation) SetHistoryLoadedAt ¶
func (m *ThreadMutation) SetHistoryLoadedAt(t time.Time)
SetHistoryLoadedAt sets the "history_loaded_at" field.
func (*ThreadMutation) SetInInbox ¶
func (m *ThreadMutation) SetInInbox(b bool)
SetInInbox sets the "in_inbox" field.
func (*ThreadMutation) SetLabels ¶
func (m *ThreadMutation) SetLabels(s []string)
SetLabels sets the "labels" field.
func (*ThreadMutation) SetLastMessageAt ¶
func (m *ThreadMutation) SetLastMessageAt(t time.Time)
SetLastMessageAt sets the "last_message_at" field.
func (*ThreadMutation) SetMessageCount ¶
func (m *ThreadMutation) SetMessageCount(i int)
SetMessageCount sets the "message_count" field.
func (*ThreadMutation) SetOp ¶
func (m *ThreadMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ThreadMutation) SetParticipants ¶
func (m *ThreadMutation) SetParticipants(s []string)
SetParticipants sets the "participants" field.
func (*ThreadMutation) SetProviderThreadID ¶
func (m *ThreadMutation) SetProviderThreadID(s string)
SetProviderThreadID sets the "provider_thread_id" field.
func (*ThreadMutation) SetSnippet ¶
func (m *ThreadMutation) SetSnippet(s string)
SetSnippet sets the "snippet" field.
func (*ThreadMutation) SetSnoozedUntil ¶
func (m *ThreadMutation) SetSnoozedUntil(t time.Time)
SetSnoozedUntil sets the "snoozed_until" field.
func (*ThreadMutation) SetStarred ¶
func (m *ThreadMutation) SetStarred(b bool)
SetStarred sets the "starred" field.
func (*ThreadMutation) SetSubject ¶
func (m *ThreadMutation) SetSubject(s string)
SetSubject sets the "subject" field.
func (*ThreadMutation) SetUnread ¶
func (m *ThreadMutation) SetUnread(b bool)
SetUnread sets the "unread" field.
func (*ThreadMutation) Snippet ¶
func (m *ThreadMutation) Snippet() (r string, exists bool)
Snippet returns the value of the "snippet" field in the mutation.
func (*ThreadMutation) SnoozedUntil ¶
func (m *ThreadMutation) SnoozedUntil() (r time.Time, exists bool)
SnoozedUntil returns the value of the "snoozed_until" field in the mutation.
func (*ThreadMutation) SnoozedUntilCleared ¶
func (m *ThreadMutation) SnoozedUntilCleared() bool
SnoozedUntilCleared returns if the "snoozed_until" field was cleared in this mutation.
func (*ThreadMutation) Starred ¶
func (m *ThreadMutation) Starred() (r bool, exists bool)
Starred returns the value of the "starred" field in the mutation.
func (*ThreadMutation) Subject ¶
func (m *ThreadMutation) Subject() (r string, exists bool)
Subject returns the value of the "subject" field in the mutation.
func (ThreadMutation) Tx ¶
func (m ThreadMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ThreadMutation) Type ¶
func (m *ThreadMutation) Type() string
Type returns the node type of this mutation (Thread).
func (*ThreadMutation) Unread ¶
func (m *ThreadMutation) Unread() (r bool, exists bool)
Unread returns the value of the "unread" field in the mutation.
func (*ThreadMutation) Where ¶
func (m *ThreadMutation) Where(ps ...predicate.Thread)
Where appends a list predicates to the ThreadMutation builder.
func (*ThreadMutation) WhereP ¶
func (m *ThreadMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ThreadMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ThreadQuery ¶
type ThreadQuery struct {
// contains filtered or unexported fields
}
ThreadQuery is the builder for querying Thread entities.
func (*ThreadQuery) Aggregate ¶
func (_q *ThreadQuery) Aggregate(fns ...AggregateFunc) *ThreadSelect
Aggregate returns a ThreadSelect configured with the given aggregations.
func (*ThreadQuery) All ¶
func (_q *ThreadQuery) All(ctx context.Context) ([]*Thread, error)
All executes the query and returns a list of Threads.
func (*ThreadQuery) AllX ¶
func (_q *ThreadQuery) AllX(ctx context.Context) []*Thread
AllX is like All, but panics if an error occurs.
func (*ThreadQuery) Clone ¶
func (_q *ThreadQuery) Clone() *ThreadQuery
Clone returns a duplicate of the ThreadQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ThreadQuery) Count ¶
func (_q *ThreadQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ThreadQuery) CountX ¶
func (_q *ThreadQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ThreadQuery) ExecContext ¶
func (c *ThreadQuery) 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 (*ThreadQuery) Exist ¶
func (_q *ThreadQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ThreadQuery) ExistX ¶
func (_q *ThreadQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ThreadQuery) First ¶
func (_q *ThreadQuery) First(ctx context.Context) (*Thread, error)
First returns the first Thread entity from the query. Returns a *NotFoundError when no Thread was found.
func (*ThreadQuery) FirstID ¶
func (_q *ThreadQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Thread ID from the query. Returns a *NotFoundError when no Thread ID was found.
func (*ThreadQuery) FirstIDX ¶
func (_q *ThreadQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ThreadQuery) FirstX ¶
func (_q *ThreadQuery) FirstX(ctx context.Context) *Thread
FirstX is like First, but panics if an error occurs.
func (*ThreadQuery) GroupBy ¶
func (_q *ThreadQuery) GroupBy(field string, fields ...string) *ThreadGroupBy
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 {
ProviderThreadID string `json:"provider_thread_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Thread.Query().
GroupBy(thread.FieldProviderThreadID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ThreadQuery) IDs ¶
func (_q *ThreadQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Thread IDs.
func (*ThreadQuery) IDsX ¶
func (_q *ThreadQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ThreadQuery) Limit ¶
func (_q *ThreadQuery) Limit(limit int) *ThreadQuery
Limit the number of records to be returned by this query.
func (*ThreadQuery) Modify ¶
func (_q *ThreadQuery) Modify(modifiers ...func(s *sql.Selector)) *ThreadSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ThreadQuery) Offset ¶
func (_q *ThreadQuery) Offset(offset int) *ThreadQuery
Offset to start from.
func (*ThreadQuery) Only ¶
func (_q *ThreadQuery) Only(ctx context.Context) (*Thread, error)
Only returns a single Thread entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Thread entity is found. Returns a *NotFoundError when no Thread entities are found.
func (*ThreadQuery) OnlyID ¶
func (_q *ThreadQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Thread ID in the query. Returns a *NotSingularError when more than one Thread ID is found. Returns a *NotFoundError when no entities are found.
func (*ThreadQuery) OnlyIDX ¶
func (_q *ThreadQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ThreadQuery) OnlyX ¶
func (_q *ThreadQuery) OnlyX(ctx context.Context) *Thread
OnlyX is like Only, but panics if an error occurs.
func (*ThreadQuery) Order ¶
func (_q *ThreadQuery) Order(o ...thread.OrderOption) *ThreadQuery
Order specifies how the records should be ordered.
func (*ThreadQuery) QueryAccount ¶
func (_q *ThreadQuery) QueryAccount() *AccountQuery
QueryAccount chains the current query on the "account" edge.
func (*ThreadQuery) QueryContext ¶
func (c *ThreadQuery) 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 (*ThreadQuery) QueryMessages ¶
func (_q *ThreadQuery) QueryMessages() *MessageQuery
QueryMessages chains the current query on the "messages" edge.
func (*ThreadQuery) Select ¶
func (_q *ThreadQuery) Select(fields ...string) *ThreadSelect
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 {
ProviderThreadID string `json:"provider_thread_id,omitempty"`
}
client.Thread.Query().
Select(thread.FieldProviderThreadID).
Scan(ctx, &v)
func (*ThreadQuery) Unique ¶
func (_q *ThreadQuery) Unique(unique bool) *ThreadQuery
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 (*ThreadQuery) Where ¶
func (_q *ThreadQuery) Where(ps ...predicate.Thread) *ThreadQuery
Where adds a new predicate for the ThreadQuery builder.
func (*ThreadQuery) WithAccount ¶
func (_q *ThreadQuery) WithAccount(opts ...func(*AccountQuery)) *ThreadQuery
WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.
func (*ThreadQuery) WithMessages ¶
func (_q *ThreadQuery) WithMessages(opts ...func(*MessageQuery)) *ThreadQuery
WithMessages tells the query-builder to eager-load the nodes that are connected to the "messages" edge. The optional arguments are used to configure the query builder of the edge.
type ThreadSelect ¶
type ThreadSelect struct {
*ThreadQuery
// contains filtered or unexported fields
}
ThreadSelect is the builder for selecting fields of Thread entities.
func (*ThreadSelect) Aggregate ¶
func (_s *ThreadSelect) Aggregate(fns ...AggregateFunc) *ThreadSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ThreadSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ThreadSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (ThreadSelect) ExecContext ¶
func (c ThreadSelect) 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 (*ThreadSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ThreadSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ThreadSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ThreadSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ThreadSelect) Modify ¶
func (_s *ThreadSelect) Modify(modifiers ...func(s *sql.Selector)) *ThreadSelect
Modify adds a query modifier for attaching custom logic to queries.
func (ThreadSelect) QueryContext ¶
func (c ThreadSelect) 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 (*ThreadSelect) Scan ¶
func (_s *ThreadSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ThreadSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ThreadUpdate ¶
type ThreadUpdate struct {
// contains filtered or unexported fields
}
ThreadUpdate is the builder for updating Thread entities.
func (*ThreadUpdate) AddMessageCount ¶
func (_u *ThreadUpdate) AddMessageCount(v int) *ThreadUpdate
AddMessageCount adds value to the "message_count" field.
func (*ThreadUpdate) AddMessageIDs ¶
func (_u *ThreadUpdate) AddMessageIDs(ids ...int) *ThreadUpdate
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*ThreadUpdate) AddMessages ¶
func (_u *ThreadUpdate) AddMessages(v ...*Message) *ThreadUpdate
AddMessages adds the "messages" edges to the Message entity.
func (*ThreadUpdate) AppendLabels ¶
func (_u *ThreadUpdate) AppendLabels(v []string) *ThreadUpdate
AppendLabels appends value to the "labels" field.
func (*ThreadUpdate) AppendParticipants ¶
func (_u *ThreadUpdate) AppendParticipants(v []string) *ThreadUpdate
AppendParticipants appends value to the "participants" field.
func (*ThreadUpdate) ClearAccount ¶
func (_u *ThreadUpdate) ClearAccount() *ThreadUpdate
ClearAccount clears the "account" edge to the Account entity.
func (*ThreadUpdate) ClearHistoryLoadedAt ¶
func (_u *ThreadUpdate) ClearHistoryLoadedAt() *ThreadUpdate
ClearHistoryLoadedAt clears the value of the "history_loaded_at" field.
func (*ThreadUpdate) ClearMessages ¶
func (_u *ThreadUpdate) ClearMessages() *ThreadUpdate
ClearMessages clears all "messages" edges to the Message entity.
func (*ThreadUpdate) ClearSnoozedUntil ¶
func (_u *ThreadUpdate) ClearSnoozedUntil() *ThreadUpdate
ClearSnoozedUntil clears the value of the "snoozed_until" field.
func (*ThreadUpdate) Exec ¶
func (_u *ThreadUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ThreadUpdate) ExecContext ¶
func (c *ThreadUpdate) 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 (*ThreadUpdate) ExecX ¶
func (_u *ThreadUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThreadUpdate) Modify ¶
func (_u *ThreadUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ThreadUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ThreadUpdate) Mutation ¶
func (_u *ThreadUpdate) Mutation() *ThreadMutation
Mutation returns the ThreadMutation object of the builder.
func (*ThreadUpdate) QueryContext ¶
func (c *ThreadUpdate) 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 (*ThreadUpdate) RemoveMessageIDs ¶
func (_u *ThreadUpdate) RemoveMessageIDs(ids ...int) *ThreadUpdate
RemoveMessageIDs removes the "messages" edge to Message entities by IDs.
func (*ThreadUpdate) RemoveMessages ¶
func (_u *ThreadUpdate) RemoveMessages(v ...*Message) *ThreadUpdate
RemoveMessages removes "messages" edges to Message entities.
func (*ThreadUpdate) Save ¶
func (_u *ThreadUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ThreadUpdate) SaveX ¶
func (_u *ThreadUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ThreadUpdate) SetAccount ¶
func (_u *ThreadUpdate) SetAccount(v *Account) *ThreadUpdate
SetAccount sets the "account" edge to the Account entity.
func (*ThreadUpdate) SetAccountID ¶
func (_u *ThreadUpdate) SetAccountID(id uuid.UUID) *ThreadUpdate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*ThreadUpdate) SetHasAttachments ¶
func (_u *ThreadUpdate) SetHasAttachments(v bool) *ThreadUpdate
SetHasAttachments sets the "has_attachments" field.
func (*ThreadUpdate) SetHistoryLoadedAt ¶
func (_u *ThreadUpdate) SetHistoryLoadedAt(v time.Time) *ThreadUpdate
SetHistoryLoadedAt sets the "history_loaded_at" field.
func (*ThreadUpdate) SetInInbox ¶
func (_u *ThreadUpdate) SetInInbox(v bool) *ThreadUpdate
SetInInbox sets the "in_inbox" field.
func (*ThreadUpdate) SetLabels ¶
func (_u *ThreadUpdate) SetLabels(v []string) *ThreadUpdate
SetLabels sets the "labels" field.
func (*ThreadUpdate) SetLastMessageAt ¶
func (_u *ThreadUpdate) SetLastMessageAt(v time.Time) *ThreadUpdate
SetLastMessageAt sets the "last_message_at" field.
func (*ThreadUpdate) SetMessageCount ¶
func (_u *ThreadUpdate) SetMessageCount(v int) *ThreadUpdate
SetMessageCount sets the "message_count" field.
func (*ThreadUpdate) SetNillableHasAttachments ¶
func (_u *ThreadUpdate) SetNillableHasAttachments(v *bool) *ThreadUpdate
SetNillableHasAttachments sets the "has_attachments" field if the given value is not nil.
func (*ThreadUpdate) SetNillableHistoryLoadedAt ¶
func (_u *ThreadUpdate) SetNillableHistoryLoadedAt(v *time.Time) *ThreadUpdate
SetNillableHistoryLoadedAt sets the "history_loaded_at" field if the given value is not nil.
func (*ThreadUpdate) SetNillableInInbox ¶
func (_u *ThreadUpdate) SetNillableInInbox(v *bool) *ThreadUpdate
SetNillableInInbox sets the "in_inbox" field if the given value is not nil.
func (*ThreadUpdate) SetNillableLastMessageAt ¶
func (_u *ThreadUpdate) SetNillableLastMessageAt(v *time.Time) *ThreadUpdate
SetNillableLastMessageAt sets the "last_message_at" field if the given value is not nil.
func (*ThreadUpdate) SetNillableMessageCount ¶
func (_u *ThreadUpdate) SetNillableMessageCount(v *int) *ThreadUpdate
SetNillableMessageCount sets the "message_count" field if the given value is not nil.
func (*ThreadUpdate) SetNillableProviderThreadID ¶
func (_u *ThreadUpdate) SetNillableProviderThreadID(v *string) *ThreadUpdate
SetNillableProviderThreadID sets the "provider_thread_id" field if the given value is not nil.
func (*ThreadUpdate) SetNillableSnippet ¶
func (_u *ThreadUpdate) SetNillableSnippet(v *string) *ThreadUpdate
SetNillableSnippet sets the "snippet" field if the given value is not nil.
func (*ThreadUpdate) SetNillableSnoozedUntil ¶
func (_u *ThreadUpdate) SetNillableSnoozedUntil(v *time.Time) *ThreadUpdate
SetNillableSnoozedUntil sets the "snoozed_until" field if the given value is not nil.
func (*ThreadUpdate) SetNillableStarred ¶
func (_u *ThreadUpdate) SetNillableStarred(v *bool) *ThreadUpdate
SetNillableStarred sets the "starred" field if the given value is not nil.
func (*ThreadUpdate) SetNillableSubject ¶
func (_u *ThreadUpdate) SetNillableSubject(v *string) *ThreadUpdate
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*ThreadUpdate) SetNillableUnread ¶
func (_u *ThreadUpdate) SetNillableUnread(v *bool) *ThreadUpdate
SetNillableUnread sets the "unread" field if the given value is not nil.
func (*ThreadUpdate) SetParticipants ¶
func (_u *ThreadUpdate) SetParticipants(v []string) *ThreadUpdate
SetParticipants sets the "participants" field.
func (*ThreadUpdate) SetProviderThreadID ¶
func (_u *ThreadUpdate) SetProviderThreadID(v string) *ThreadUpdate
SetProviderThreadID sets the "provider_thread_id" field.
func (*ThreadUpdate) SetSnippet ¶
func (_u *ThreadUpdate) SetSnippet(v string) *ThreadUpdate
SetSnippet sets the "snippet" field.
func (*ThreadUpdate) SetSnoozedUntil ¶
func (_u *ThreadUpdate) SetSnoozedUntil(v time.Time) *ThreadUpdate
SetSnoozedUntil sets the "snoozed_until" field.
func (*ThreadUpdate) SetStarred ¶
func (_u *ThreadUpdate) SetStarred(v bool) *ThreadUpdate
SetStarred sets the "starred" field.
func (*ThreadUpdate) SetSubject ¶
func (_u *ThreadUpdate) SetSubject(v string) *ThreadUpdate
SetSubject sets the "subject" field.
func (*ThreadUpdate) SetUnread ¶
func (_u *ThreadUpdate) SetUnread(v bool) *ThreadUpdate
SetUnread sets the "unread" field.
func (*ThreadUpdate) Where ¶
func (_u *ThreadUpdate) Where(ps ...predicate.Thread) *ThreadUpdate
Where appends a list predicates to the ThreadUpdate builder.
type ThreadUpdateOne ¶
type ThreadUpdateOne struct {
// contains filtered or unexported fields
}
ThreadUpdateOne is the builder for updating a single Thread entity.
func (*ThreadUpdateOne) AddMessageCount ¶
func (_u *ThreadUpdateOne) AddMessageCount(v int) *ThreadUpdateOne
AddMessageCount adds value to the "message_count" field.
func (*ThreadUpdateOne) AddMessageIDs ¶
func (_u *ThreadUpdateOne) AddMessageIDs(ids ...int) *ThreadUpdateOne
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*ThreadUpdateOne) AddMessages ¶
func (_u *ThreadUpdateOne) AddMessages(v ...*Message) *ThreadUpdateOne
AddMessages adds the "messages" edges to the Message entity.
func (*ThreadUpdateOne) AppendLabels ¶
func (_u *ThreadUpdateOne) AppendLabels(v []string) *ThreadUpdateOne
AppendLabels appends value to the "labels" field.
func (*ThreadUpdateOne) AppendParticipants ¶
func (_u *ThreadUpdateOne) AppendParticipants(v []string) *ThreadUpdateOne
AppendParticipants appends value to the "participants" field.
func (*ThreadUpdateOne) ClearAccount ¶
func (_u *ThreadUpdateOne) ClearAccount() *ThreadUpdateOne
ClearAccount clears the "account" edge to the Account entity.
func (*ThreadUpdateOne) ClearHistoryLoadedAt ¶
func (_u *ThreadUpdateOne) ClearHistoryLoadedAt() *ThreadUpdateOne
ClearHistoryLoadedAt clears the value of the "history_loaded_at" field.
func (*ThreadUpdateOne) ClearMessages ¶
func (_u *ThreadUpdateOne) ClearMessages() *ThreadUpdateOne
ClearMessages clears all "messages" edges to the Message entity.
func (*ThreadUpdateOne) ClearSnoozedUntil ¶
func (_u *ThreadUpdateOne) ClearSnoozedUntil() *ThreadUpdateOne
ClearSnoozedUntil clears the value of the "snoozed_until" field.
func (*ThreadUpdateOne) Exec ¶
func (_u *ThreadUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ThreadUpdateOne) ExecContext ¶
func (c *ThreadUpdateOne) 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 (*ThreadUpdateOne) ExecX ¶
func (_u *ThreadUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThreadUpdateOne) Modify ¶
func (_u *ThreadUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ThreadUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ThreadUpdateOne) Mutation ¶
func (_u *ThreadUpdateOne) Mutation() *ThreadMutation
Mutation returns the ThreadMutation object of the builder.
func (*ThreadUpdateOne) QueryContext ¶
func (c *ThreadUpdateOne) 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 (*ThreadUpdateOne) RemoveMessageIDs ¶
func (_u *ThreadUpdateOne) RemoveMessageIDs(ids ...int) *ThreadUpdateOne
RemoveMessageIDs removes the "messages" edge to Message entities by IDs.
func (*ThreadUpdateOne) RemoveMessages ¶
func (_u *ThreadUpdateOne) RemoveMessages(v ...*Message) *ThreadUpdateOne
RemoveMessages removes "messages" edges to Message entities.
func (*ThreadUpdateOne) Save ¶
func (_u *ThreadUpdateOne) Save(ctx context.Context) (*Thread, error)
Save executes the query and returns the updated Thread entity.
func (*ThreadUpdateOne) SaveX ¶
func (_u *ThreadUpdateOne) SaveX(ctx context.Context) *Thread
SaveX is like Save, but panics if an error occurs.
func (*ThreadUpdateOne) Select ¶
func (_u *ThreadUpdateOne) Select(field string, fields ...string) *ThreadUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ThreadUpdateOne) SetAccount ¶
func (_u *ThreadUpdateOne) SetAccount(v *Account) *ThreadUpdateOne
SetAccount sets the "account" edge to the Account entity.
func (*ThreadUpdateOne) SetAccountID ¶
func (_u *ThreadUpdateOne) SetAccountID(id uuid.UUID) *ThreadUpdateOne
SetAccountID sets the "account" edge to the Account entity by ID.
func (*ThreadUpdateOne) SetHasAttachments ¶
func (_u *ThreadUpdateOne) SetHasAttachments(v bool) *ThreadUpdateOne
SetHasAttachments sets the "has_attachments" field.
func (*ThreadUpdateOne) SetHistoryLoadedAt ¶
func (_u *ThreadUpdateOne) SetHistoryLoadedAt(v time.Time) *ThreadUpdateOne
SetHistoryLoadedAt sets the "history_loaded_at" field.
func (*ThreadUpdateOne) SetInInbox ¶
func (_u *ThreadUpdateOne) SetInInbox(v bool) *ThreadUpdateOne
SetInInbox sets the "in_inbox" field.
func (*ThreadUpdateOne) SetLabels ¶
func (_u *ThreadUpdateOne) SetLabels(v []string) *ThreadUpdateOne
SetLabels sets the "labels" field.
func (*ThreadUpdateOne) SetLastMessageAt ¶
func (_u *ThreadUpdateOne) SetLastMessageAt(v time.Time) *ThreadUpdateOne
SetLastMessageAt sets the "last_message_at" field.
func (*ThreadUpdateOne) SetMessageCount ¶
func (_u *ThreadUpdateOne) SetMessageCount(v int) *ThreadUpdateOne
SetMessageCount sets the "message_count" field.
func (*ThreadUpdateOne) SetNillableHasAttachments ¶
func (_u *ThreadUpdateOne) SetNillableHasAttachments(v *bool) *ThreadUpdateOne
SetNillableHasAttachments sets the "has_attachments" field if the given value is not nil.
func (*ThreadUpdateOne) SetNillableHistoryLoadedAt ¶
func (_u *ThreadUpdateOne) SetNillableHistoryLoadedAt(v *time.Time) *ThreadUpdateOne
SetNillableHistoryLoadedAt sets the "history_loaded_at" field if the given value is not nil.
func (*ThreadUpdateOne) SetNillableInInbox ¶
func (_u *ThreadUpdateOne) SetNillableInInbox(v *bool) *ThreadUpdateOne
SetNillableInInbox sets the "in_inbox" field if the given value is not nil.
func (*ThreadUpdateOne) SetNillableLastMessageAt ¶
func (_u *ThreadUpdateOne) SetNillableLastMessageAt(v *time.Time) *ThreadUpdateOne
SetNillableLastMessageAt sets the "last_message_at" field if the given value is not nil.
func (*ThreadUpdateOne) SetNillableMessageCount ¶
func (_u *ThreadUpdateOne) SetNillableMessageCount(v *int) *ThreadUpdateOne
SetNillableMessageCount sets the "message_count" field if the given value is not nil.
func (*ThreadUpdateOne) SetNillableProviderThreadID ¶
func (_u *ThreadUpdateOne) SetNillableProviderThreadID(v *string) *ThreadUpdateOne
SetNillableProviderThreadID sets the "provider_thread_id" field if the given value is not nil.
func (*ThreadUpdateOne) SetNillableSnippet ¶
func (_u *ThreadUpdateOne) SetNillableSnippet(v *string) *ThreadUpdateOne
SetNillableSnippet sets the "snippet" field if the given value is not nil.
func (*ThreadUpdateOne) SetNillableSnoozedUntil ¶
func (_u *ThreadUpdateOne) SetNillableSnoozedUntil(v *time.Time) *ThreadUpdateOne
SetNillableSnoozedUntil sets the "snoozed_until" field if the given value is not nil.
func (*ThreadUpdateOne) SetNillableStarred ¶
func (_u *ThreadUpdateOne) SetNillableStarred(v *bool) *ThreadUpdateOne
SetNillableStarred sets the "starred" field if the given value is not nil.
func (*ThreadUpdateOne) SetNillableSubject ¶
func (_u *ThreadUpdateOne) SetNillableSubject(v *string) *ThreadUpdateOne
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*ThreadUpdateOne) SetNillableUnread ¶
func (_u *ThreadUpdateOne) SetNillableUnread(v *bool) *ThreadUpdateOne
SetNillableUnread sets the "unread" field if the given value is not nil.
func (*ThreadUpdateOne) SetParticipants ¶
func (_u *ThreadUpdateOne) SetParticipants(v []string) *ThreadUpdateOne
SetParticipants sets the "participants" field.
func (*ThreadUpdateOne) SetProviderThreadID ¶
func (_u *ThreadUpdateOne) SetProviderThreadID(v string) *ThreadUpdateOne
SetProviderThreadID sets the "provider_thread_id" field.
func (*ThreadUpdateOne) SetSnippet ¶
func (_u *ThreadUpdateOne) SetSnippet(v string) *ThreadUpdateOne
SetSnippet sets the "snippet" field.
func (*ThreadUpdateOne) SetSnoozedUntil ¶
func (_u *ThreadUpdateOne) SetSnoozedUntil(v time.Time) *ThreadUpdateOne
SetSnoozedUntil sets the "snoozed_until" field.
func (*ThreadUpdateOne) SetStarred ¶
func (_u *ThreadUpdateOne) SetStarred(v bool) *ThreadUpdateOne
SetStarred sets the "starred" field.
func (*ThreadUpdateOne) SetSubject ¶
func (_u *ThreadUpdateOne) SetSubject(v string) *ThreadUpdateOne
SetSubject sets the "subject" field.
func (*ThreadUpdateOne) SetUnread ¶
func (_u *ThreadUpdateOne) SetUnread(v bool) *ThreadUpdateOne
SetUnread sets the "unread" field.
func (*ThreadUpdateOne) Where ¶
func (_u *ThreadUpdateOne) Where(ps ...predicate.Thread) *ThreadUpdateOne
Where appends a list predicates to the ThreadUpdate builder.
type ThreadUpsert ¶
ThreadUpsert is the "OnConflict" setter.
func (*ThreadUpsert) AddMessageCount ¶
func (u *ThreadUpsert) AddMessageCount(v int) *ThreadUpsert
AddMessageCount adds v to the "message_count" field.
func (*ThreadUpsert) ClearHistoryLoadedAt ¶
func (u *ThreadUpsert) ClearHistoryLoadedAt() *ThreadUpsert
ClearHistoryLoadedAt clears the value of the "history_loaded_at" field.
func (*ThreadUpsert) ClearSnoozedUntil ¶
func (u *ThreadUpsert) ClearSnoozedUntil() *ThreadUpsert
ClearSnoozedUntil clears the value of the "snoozed_until" field.
func (*ThreadUpsert) SetHasAttachments ¶
func (u *ThreadUpsert) SetHasAttachments(v bool) *ThreadUpsert
SetHasAttachments sets the "has_attachments" field.
func (*ThreadUpsert) SetHistoryLoadedAt ¶
func (u *ThreadUpsert) SetHistoryLoadedAt(v time.Time) *ThreadUpsert
SetHistoryLoadedAt sets the "history_loaded_at" field.
func (*ThreadUpsert) SetInInbox ¶
func (u *ThreadUpsert) SetInInbox(v bool) *ThreadUpsert
SetInInbox sets the "in_inbox" field.
func (*ThreadUpsert) SetLabels ¶
func (u *ThreadUpsert) SetLabels(v []string) *ThreadUpsert
SetLabels sets the "labels" field.
func (*ThreadUpsert) SetLastMessageAt ¶
func (u *ThreadUpsert) SetLastMessageAt(v time.Time) *ThreadUpsert
SetLastMessageAt sets the "last_message_at" field.
func (*ThreadUpsert) SetMessageCount ¶
func (u *ThreadUpsert) SetMessageCount(v int) *ThreadUpsert
SetMessageCount sets the "message_count" field.
func (*ThreadUpsert) SetParticipants ¶
func (u *ThreadUpsert) SetParticipants(v []string) *ThreadUpsert
SetParticipants sets the "participants" field.
func (*ThreadUpsert) SetProviderThreadID ¶
func (u *ThreadUpsert) SetProviderThreadID(v string) *ThreadUpsert
SetProviderThreadID sets the "provider_thread_id" field.
func (*ThreadUpsert) SetSnippet ¶
func (u *ThreadUpsert) SetSnippet(v string) *ThreadUpsert
SetSnippet sets the "snippet" field.
func (*ThreadUpsert) SetSnoozedUntil ¶
func (u *ThreadUpsert) SetSnoozedUntil(v time.Time) *ThreadUpsert
SetSnoozedUntil sets the "snoozed_until" field.
func (*ThreadUpsert) SetStarred ¶
func (u *ThreadUpsert) SetStarred(v bool) *ThreadUpsert
SetStarred sets the "starred" field.
func (*ThreadUpsert) SetSubject ¶
func (u *ThreadUpsert) SetSubject(v string) *ThreadUpsert
SetSubject sets the "subject" field.
func (*ThreadUpsert) SetUnread ¶
func (u *ThreadUpsert) SetUnread(v bool) *ThreadUpsert
SetUnread sets the "unread" field.
func (*ThreadUpsert) UpdateHasAttachments ¶
func (u *ThreadUpsert) UpdateHasAttachments() *ThreadUpsert
UpdateHasAttachments sets the "has_attachments" field to the value that was provided on create.
func (*ThreadUpsert) UpdateHistoryLoadedAt ¶
func (u *ThreadUpsert) UpdateHistoryLoadedAt() *ThreadUpsert
UpdateHistoryLoadedAt sets the "history_loaded_at" field to the value that was provided on create.
func (*ThreadUpsert) UpdateInInbox ¶
func (u *ThreadUpsert) UpdateInInbox() *ThreadUpsert
UpdateInInbox sets the "in_inbox" field to the value that was provided on create.
func (*ThreadUpsert) UpdateLabels ¶
func (u *ThreadUpsert) UpdateLabels() *ThreadUpsert
UpdateLabels sets the "labels" field to the value that was provided on create.
func (*ThreadUpsert) UpdateLastMessageAt ¶
func (u *ThreadUpsert) UpdateLastMessageAt() *ThreadUpsert
UpdateLastMessageAt sets the "last_message_at" field to the value that was provided on create.
func (*ThreadUpsert) UpdateMessageCount ¶
func (u *ThreadUpsert) UpdateMessageCount() *ThreadUpsert
UpdateMessageCount sets the "message_count" field to the value that was provided on create.
func (*ThreadUpsert) UpdateParticipants ¶
func (u *ThreadUpsert) UpdateParticipants() *ThreadUpsert
UpdateParticipants sets the "participants" field to the value that was provided on create.
func (*ThreadUpsert) UpdateProviderThreadID ¶
func (u *ThreadUpsert) UpdateProviderThreadID() *ThreadUpsert
UpdateProviderThreadID sets the "provider_thread_id" field to the value that was provided on create.
func (*ThreadUpsert) UpdateSnippet ¶
func (u *ThreadUpsert) UpdateSnippet() *ThreadUpsert
UpdateSnippet sets the "snippet" field to the value that was provided on create.
func (*ThreadUpsert) UpdateSnoozedUntil ¶
func (u *ThreadUpsert) UpdateSnoozedUntil() *ThreadUpsert
UpdateSnoozedUntil sets the "snoozed_until" field to the value that was provided on create.
func (*ThreadUpsert) UpdateStarred ¶
func (u *ThreadUpsert) UpdateStarred() *ThreadUpsert
UpdateStarred sets the "starred" field to the value that was provided on create.
func (*ThreadUpsert) UpdateSubject ¶
func (u *ThreadUpsert) UpdateSubject() *ThreadUpsert
UpdateSubject sets the "subject" field to the value that was provided on create.
func (*ThreadUpsert) UpdateUnread ¶
func (u *ThreadUpsert) UpdateUnread() *ThreadUpsert
UpdateUnread sets the "unread" field to the value that was provided on create.
type ThreadUpsertBulk ¶
type ThreadUpsertBulk struct {
// contains filtered or unexported fields
}
ThreadUpsertBulk is the builder for "upsert"-ing a bulk of Thread nodes.
func (*ThreadUpsertBulk) AddMessageCount ¶
func (u *ThreadUpsertBulk) AddMessageCount(v int) *ThreadUpsertBulk
AddMessageCount adds v to the "message_count" field.
func (*ThreadUpsertBulk) ClearHistoryLoadedAt ¶
func (u *ThreadUpsertBulk) ClearHistoryLoadedAt() *ThreadUpsertBulk
ClearHistoryLoadedAt clears the value of the "history_loaded_at" field.
func (*ThreadUpsertBulk) ClearSnoozedUntil ¶
func (u *ThreadUpsertBulk) ClearSnoozedUntil() *ThreadUpsertBulk
ClearSnoozedUntil clears the value of the "snoozed_until" field.
func (*ThreadUpsertBulk) DoNothing ¶
func (u *ThreadUpsertBulk) DoNothing() *ThreadUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ThreadUpsertBulk) Exec ¶
func (u *ThreadUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ThreadUpsertBulk) ExecX ¶
func (u *ThreadUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThreadUpsertBulk) Ignore ¶
func (u *ThreadUpsertBulk) Ignore() *ThreadUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Thread.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ThreadUpsertBulk) SetHasAttachments ¶
func (u *ThreadUpsertBulk) SetHasAttachments(v bool) *ThreadUpsertBulk
SetHasAttachments sets the "has_attachments" field.
func (*ThreadUpsertBulk) SetHistoryLoadedAt ¶
func (u *ThreadUpsertBulk) SetHistoryLoadedAt(v time.Time) *ThreadUpsertBulk
SetHistoryLoadedAt sets the "history_loaded_at" field.
func (*ThreadUpsertBulk) SetInInbox ¶
func (u *ThreadUpsertBulk) SetInInbox(v bool) *ThreadUpsertBulk
SetInInbox sets the "in_inbox" field.
func (*ThreadUpsertBulk) SetLabels ¶
func (u *ThreadUpsertBulk) SetLabels(v []string) *ThreadUpsertBulk
SetLabels sets the "labels" field.
func (*ThreadUpsertBulk) SetLastMessageAt ¶
func (u *ThreadUpsertBulk) SetLastMessageAt(v time.Time) *ThreadUpsertBulk
SetLastMessageAt sets the "last_message_at" field.
func (*ThreadUpsertBulk) SetMessageCount ¶
func (u *ThreadUpsertBulk) SetMessageCount(v int) *ThreadUpsertBulk
SetMessageCount sets the "message_count" field.
func (*ThreadUpsertBulk) SetParticipants ¶
func (u *ThreadUpsertBulk) SetParticipants(v []string) *ThreadUpsertBulk
SetParticipants sets the "participants" field.
func (*ThreadUpsertBulk) SetProviderThreadID ¶
func (u *ThreadUpsertBulk) SetProviderThreadID(v string) *ThreadUpsertBulk
SetProviderThreadID sets the "provider_thread_id" field.
func (*ThreadUpsertBulk) SetSnippet ¶
func (u *ThreadUpsertBulk) SetSnippet(v string) *ThreadUpsertBulk
SetSnippet sets the "snippet" field.
func (*ThreadUpsertBulk) SetSnoozedUntil ¶
func (u *ThreadUpsertBulk) SetSnoozedUntil(v time.Time) *ThreadUpsertBulk
SetSnoozedUntil sets the "snoozed_until" field.
func (*ThreadUpsertBulk) SetStarred ¶
func (u *ThreadUpsertBulk) SetStarred(v bool) *ThreadUpsertBulk
SetStarred sets the "starred" field.
func (*ThreadUpsertBulk) SetSubject ¶
func (u *ThreadUpsertBulk) SetSubject(v string) *ThreadUpsertBulk
SetSubject sets the "subject" field.
func (*ThreadUpsertBulk) SetUnread ¶
func (u *ThreadUpsertBulk) SetUnread(v bool) *ThreadUpsertBulk
SetUnread sets the "unread" field.
func (*ThreadUpsertBulk) Update ¶
func (u *ThreadUpsertBulk) Update(set func(*ThreadUpsert)) *ThreadUpsertBulk
Update allows overriding fields `UPDATE` values. See the ThreadCreateBulk.OnConflict documentation for more info.
func (*ThreadUpsertBulk) UpdateHasAttachments ¶
func (u *ThreadUpsertBulk) UpdateHasAttachments() *ThreadUpsertBulk
UpdateHasAttachments sets the "has_attachments" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateHistoryLoadedAt ¶
func (u *ThreadUpsertBulk) UpdateHistoryLoadedAt() *ThreadUpsertBulk
UpdateHistoryLoadedAt sets the "history_loaded_at" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateInInbox ¶
func (u *ThreadUpsertBulk) UpdateInInbox() *ThreadUpsertBulk
UpdateInInbox sets the "in_inbox" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateLabels ¶
func (u *ThreadUpsertBulk) UpdateLabels() *ThreadUpsertBulk
UpdateLabels sets the "labels" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateLastMessageAt ¶
func (u *ThreadUpsertBulk) UpdateLastMessageAt() *ThreadUpsertBulk
UpdateLastMessageAt sets the "last_message_at" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateMessageCount ¶
func (u *ThreadUpsertBulk) UpdateMessageCount() *ThreadUpsertBulk
UpdateMessageCount sets the "message_count" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateNewValues ¶
func (u *ThreadUpsertBulk) UpdateNewValues() *ThreadUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Thread.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ThreadUpsertBulk) UpdateParticipants ¶
func (u *ThreadUpsertBulk) UpdateParticipants() *ThreadUpsertBulk
UpdateParticipants sets the "participants" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateProviderThreadID ¶
func (u *ThreadUpsertBulk) UpdateProviderThreadID() *ThreadUpsertBulk
UpdateProviderThreadID sets the "provider_thread_id" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateSnippet ¶
func (u *ThreadUpsertBulk) UpdateSnippet() *ThreadUpsertBulk
UpdateSnippet sets the "snippet" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateSnoozedUntil ¶
func (u *ThreadUpsertBulk) UpdateSnoozedUntil() *ThreadUpsertBulk
UpdateSnoozedUntil sets the "snoozed_until" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateStarred ¶
func (u *ThreadUpsertBulk) UpdateStarred() *ThreadUpsertBulk
UpdateStarred sets the "starred" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateSubject ¶
func (u *ThreadUpsertBulk) UpdateSubject() *ThreadUpsertBulk
UpdateSubject sets the "subject" field to the value that was provided on create.
func (*ThreadUpsertBulk) UpdateUnread ¶
func (u *ThreadUpsertBulk) UpdateUnread() *ThreadUpsertBulk
UpdateUnread sets the "unread" field to the value that was provided on create.
type ThreadUpsertOne ¶
type ThreadUpsertOne struct {
// contains filtered or unexported fields
}
ThreadUpsertOne is the builder for "upsert"-ing
one Thread node.
func (*ThreadUpsertOne) AddMessageCount ¶
func (u *ThreadUpsertOne) AddMessageCount(v int) *ThreadUpsertOne
AddMessageCount adds v to the "message_count" field.
func (*ThreadUpsertOne) ClearHistoryLoadedAt ¶
func (u *ThreadUpsertOne) ClearHistoryLoadedAt() *ThreadUpsertOne
ClearHistoryLoadedAt clears the value of the "history_loaded_at" field.
func (*ThreadUpsertOne) ClearSnoozedUntil ¶
func (u *ThreadUpsertOne) ClearSnoozedUntil() *ThreadUpsertOne
ClearSnoozedUntil clears the value of the "snoozed_until" field.
func (*ThreadUpsertOne) DoNothing ¶
func (u *ThreadUpsertOne) DoNothing() *ThreadUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ThreadUpsertOne) Exec ¶
func (u *ThreadUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ThreadUpsertOne) ExecX ¶
func (u *ThreadUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ThreadUpsertOne) ID ¶
func (u *ThreadUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ThreadUpsertOne) IDX ¶
func (u *ThreadUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*ThreadUpsertOne) Ignore ¶
func (u *ThreadUpsertOne) Ignore() *ThreadUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Thread.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*ThreadUpsertOne) SetHasAttachments ¶
func (u *ThreadUpsertOne) SetHasAttachments(v bool) *ThreadUpsertOne
SetHasAttachments sets the "has_attachments" field.
func (*ThreadUpsertOne) SetHistoryLoadedAt ¶
func (u *ThreadUpsertOne) SetHistoryLoadedAt(v time.Time) *ThreadUpsertOne
SetHistoryLoadedAt sets the "history_loaded_at" field.
func (*ThreadUpsertOne) SetInInbox ¶
func (u *ThreadUpsertOne) SetInInbox(v bool) *ThreadUpsertOne
SetInInbox sets the "in_inbox" field.
func (*ThreadUpsertOne) SetLabels ¶
func (u *ThreadUpsertOne) SetLabels(v []string) *ThreadUpsertOne
SetLabels sets the "labels" field.
func (*ThreadUpsertOne) SetLastMessageAt ¶
func (u *ThreadUpsertOne) SetLastMessageAt(v time.Time) *ThreadUpsertOne
SetLastMessageAt sets the "last_message_at" field.
func (*ThreadUpsertOne) SetMessageCount ¶
func (u *ThreadUpsertOne) SetMessageCount(v int) *ThreadUpsertOne
SetMessageCount sets the "message_count" field.
func (*ThreadUpsertOne) SetParticipants ¶
func (u *ThreadUpsertOne) SetParticipants(v []string) *ThreadUpsertOne
SetParticipants sets the "participants" field.
func (*ThreadUpsertOne) SetProviderThreadID ¶
func (u *ThreadUpsertOne) SetProviderThreadID(v string) *ThreadUpsertOne
SetProviderThreadID sets the "provider_thread_id" field.
func (*ThreadUpsertOne) SetSnippet ¶
func (u *ThreadUpsertOne) SetSnippet(v string) *ThreadUpsertOne
SetSnippet sets the "snippet" field.
func (*ThreadUpsertOne) SetSnoozedUntil ¶
func (u *ThreadUpsertOne) SetSnoozedUntil(v time.Time) *ThreadUpsertOne
SetSnoozedUntil sets the "snoozed_until" field.
func (*ThreadUpsertOne) SetStarred ¶
func (u *ThreadUpsertOne) SetStarred(v bool) *ThreadUpsertOne
SetStarred sets the "starred" field.
func (*ThreadUpsertOne) SetSubject ¶
func (u *ThreadUpsertOne) SetSubject(v string) *ThreadUpsertOne
SetSubject sets the "subject" field.
func (*ThreadUpsertOne) SetUnread ¶
func (u *ThreadUpsertOne) SetUnread(v bool) *ThreadUpsertOne
SetUnread sets the "unread" field.
func (*ThreadUpsertOne) Update ¶
func (u *ThreadUpsertOne) Update(set func(*ThreadUpsert)) *ThreadUpsertOne
Update allows overriding fields `UPDATE` values. See the ThreadCreate.OnConflict documentation for more info.
func (*ThreadUpsertOne) UpdateHasAttachments ¶
func (u *ThreadUpsertOne) UpdateHasAttachments() *ThreadUpsertOne
UpdateHasAttachments sets the "has_attachments" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateHistoryLoadedAt ¶
func (u *ThreadUpsertOne) UpdateHistoryLoadedAt() *ThreadUpsertOne
UpdateHistoryLoadedAt sets the "history_loaded_at" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateInInbox ¶
func (u *ThreadUpsertOne) UpdateInInbox() *ThreadUpsertOne
UpdateInInbox sets the "in_inbox" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateLabels ¶
func (u *ThreadUpsertOne) UpdateLabels() *ThreadUpsertOne
UpdateLabels sets the "labels" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateLastMessageAt ¶
func (u *ThreadUpsertOne) UpdateLastMessageAt() *ThreadUpsertOne
UpdateLastMessageAt sets the "last_message_at" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateMessageCount ¶
func (u *ThreadUpsertOne) UpdateMessageCount() *ThreadUpsertOne
UpdateMessageCount sets the "message_count" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateNewValues ¶
func (u *ThreadUpsertOne) UpdateNewValues() *ThreadUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Thread.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ThreadUpsertOne) UpdateParticipants ¶
func (u *ThreadUpsertOne) UpdateParticipants() *ThreadUpsertOne
UpdateParticipants sets the "participants" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateProviderThreadID ¶
func (u *ThreadUpsertOne) UpdateProviderThreadID() *ThreadUpsertOne
UpdateProviderThreadID sets the "provider_thread_id" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateSnippet ¶
func (u *ThreadUpsertOne) UpdateSnippet() *ThreadUpsertOne
UpdateSnippet sets the "snippet" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateSnoozedUntil ¶
func (u *ThreadUpsertOne) UpdateSnoozedUntil() *ThreadUpsertOne
UpdateSnoozedUntil sets the "snoozed_until" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateStarred ¶
func (u *ThreadUpsertOne) UpdateStarred() *ThreadUpsertOne
UpdateStarred sets the "starred" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateSubject ¶
func (u *ThreadUpsertOne) UpdateSubject() *ThreadUpsertOne
UpdateSubject sets the "subject" field to the value that was provided on create.
func (*ThreadUpsertOne) UpdateUnread ¶
func (u *ThreadUpsertOne) UpdateUnread() *ThreadUpsertOne
UpdateUnread sets the "unread" field to the value that was provided on create.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// Account is the client for interacting with the Account builders.
Account *AccountClient
// Contact is the client for interacting with the Contact builders.
Contact *ContactClient
// Message is the client for interacting with the Message builders.
Message *MessageClient
// NotifyRule is the client for interacting with the NotifyRule builders.
NotifyRule *NotifyRuleClient
// PendingOp is the client for interacting with the PendingOp builders.
PendingOp *PendingOpClient
// Secret is the client for interacting with the Secret builders.
Secret *SecretClient
// Thread is the client for interacting with the Thread builders.
Thread *ThreadClient
// 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.
Source Files
¶
- account.go
- account_create.go
- account_delete.go
- account_query.go
- account_update.go
- client.go
- contact.go
- contact_create.go
- contact_delete.go
- contact_query.go
- contact_update.go
- ent.go
- generate.go
- message.go
- message_create.go
- message_delete.go
- message_query.go
- message_update.go
- mutation.go
- notifyrule.go
- notifyrule_create.go
- notifyrule_delete.go
- notifyrule_query.go
- notifyrule_update.go
- pendingop.go
- pendingop_create.go
- pendingop_delete.go
- pendingop_query.go
- pendingop_update.go
- runtime.go
- secret.go
- secret_create.go
- secret_delete.go
- secret_query.go
- secret_update.go
- thread.go
- thread_create.go
- thread_delete.go
- thread_query.go
- thread_update.go
- tx.go