Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Card
- type CardClient
- func (c *CardClient) Create() *CardCreate
- func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk
- func (c *CardClient) Delete() *CardDelete
- func (c *CardClient) DeleteOne(ca *Card) *CardDeleteOne
- func (c *CardClient) DeleteOneID(id string) *CardDeleteOne
- func (c *CardClient) Get(ctx context.Context, id string) (*Card, error)
- func (c *CardClient) GetX(ctx context.Context, id string) *Card
- func (c *CardClient) Hooks() []Hook
- func (c *CardClient) Intercept(interceptors ...Interceptor)
- func (c *CardClient) Interceptors() []Interceptor
- func (c *CardClient) Query() *CardQuery
- func (c *CardClient) QueryFinancialAccount(ca *Card) *FinancialAccountQuery
- func (c *CardClient) QueryUser(ca *Card) *UserQuery
- func (c *CardClient) Update() *CardUpdate
- func (c *CardClient) UpdateOne(ca *Card) *CardUpdateOne
- func (c *CardClient) UpdateOneID(id string) *CardUpdateOne
- func (c *CardClient) Use(hooks ...Hook)
- type CardCreate
- func (cc *CardCreate) Exec(ctx context.Context) error
- func (cc *CardCreate) ExecX(ctx context.Context)
- func (cc *CardCreate) Mutation() *CardMutation
- func (cc *CardCreate) OnConflict(opts ...sql.ConflictOption) *CardUpsertOne
- func (cc *CardCreate) OnConflictColumns(columns ...string) *CardUpsertOne
- func (cc *CardCreate) Save(ctx context.Context) (*Card, error)
- func (cc *CardCreate) SaveX(ctx context.Context) *Card
- func (cc *CardCreate) SetBalance(f float64) *CardCreate
- func (cc *CardCreate) SetBalanceLimit(f float64) *CardCreate
- func (cc *CardCreate) SetBankName(s string) *CardCreate
- func (cc *CardCreate) SetCardType(s string) *CardCreate
- func (cc *CardCreate) SetCreatedAt(t time.Time) *CardCreate
- func (cc *CardCreate) SetCurrencyCode(s string) *CardCreate
- func (cc *CardCreate) SetDisplayName(s string) *CardCreate
- func (cc *CardCreate) SetFinancialAccount(f *FinancialAccount) *CardCreate
- func (cc *CardCreate) SetFinancialAccountID(s string) *CardCreate
- func (cc *CardCreate) SetID(s string) *CardCreate
- func (cc *CardCreate) SetIsActive(b bool) *CardCreate
- func (cc *CardCreate) SetLastDigits(u uint16) *CardCreate
- func (cc *CardCreate) SetNillableBankName(s *string) *CardCreate
- func (cc *CardCreate) SetNillableFinancialAccountID(s *string) *CardCreate
- func (cc *CardCreate) SetNillableLastDigits(u *uint16) *CardCreate
- func (cc *CardCreate) SetUpdatedAt(t time.Time) *CardCreate
- func (cc *CardCreate) SetUser(u *User) *CardCreate
- func (cc *CardCreate) SetUserID(id string) *CardCreate
- func (cc *CardCreate) SetVersion(u uint32) *CardCreate
- type CardCreateBulk
- func (ccb *CardCreateBulk) Exec(ctx context.Context) error
- func (ccb *CardCreateBulk) ExecX(ctx context.Context)
- func (ccb *CardCreateBulk) OnConflict(opts ...sql.ConflictOption) *CardUpsertBulk
- func (ccb *CardCreateBulk) OnConflictColumns(columns ...string) *CardUpsertBulk
- func (ccb *CardCreateBulk) Save(ctx context.Context) ([]*Card, error)
- func (ccb *CardCreateBulk) SaveX(ctx context.Context) []*Card
- type CardDelete
- type CardDeleteOne
- type CardEdges
- type CardGroupBy
- func (cgb *CardGroupBy) Aggregate(fns ...AggregateFunc) *CardGroupBy
- func (s *CardGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CardGroupBy) BoolX(ctx context.Context) bool
- func (s *CardGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CardGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CardGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CardGroupBy) Float64X(ctx context.Context) float64
- func (s *CardGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CardGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CardGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CardGroupBy) IntX(ctx context.Context) int
- func (s *CardGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CardGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CardGroupBy) Scan(ctx context.Context, v any) error
- func (s *CardGroupBy) ScanX(ctx context.Context, v any)
- func (s *CardGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CardGroupBy) StringX(ctx context.Context) string
- func (s *CardGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CardGroupBy) StringsX(ctx context.Context) []string
- type CardMutation
- func (m *CardMutation) AddBalance(f float64)
- func (m *CardMutation) AddBalanceLimit(f float64)
- func (m *CardMutation) AddField(name string, value ent.Value) error
- func (m *CardMutation) AddLastDigits(u int16)
- func (m *CardMutation) AddVersion(u int32)
- func (m *CardMutation) AddedBalance() (r float64, exists bool)
- func (m *CardMutation) AddedBalanceLimit() (r float64, exists bool)
- func (m *CardMutation) AddedEdges() []string
- func (m *CardMutation) AddedField(name string) (ent.Value, bool)
- func (m *CardMutation) AddedFields() []string
- func (m *CardMutation) AddedIDs(name string) []ent.Value
- func (m *CardMutation) AddedLastDigits() (r int16, exists bool)
- func (m *CardMutation) AddedVersion() (r int32, exists bool)
- func (m *CardMutation) Balance() (r float64, exists bool)
- func (m *CardMutation) BalanceLimit() (r float64, exists bool)
- func (m *CardMutation) BankName() (r string, exists bool)
- func (m *CardMutation) BankNameCleared() bool
- func (m *CardMutation) CardType() (r string, exists bool)
- func (m *CardMutation) ClearBankName()
- func (m *CardMutation) ClearEdge(name string) error
- func (m *CardMutation) ClearField(name string) error
- func (m *CardMutation) ClearFinancialAccount()
- func (m *CardMutation) ClearFinancialAccountID()
- func (m *CardMutation) ClearLastDigits()
- func (m *CardMutation) ClearUser()
- func (m *CardMutation) ClearedEdges() []string
- func (m *CardMutation) ClearedFields() []string
- func (m CardMutation) Client() *Client
- func (m *CardMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CardMutation) CurrencyCode() (r string, exists bool)
- func (m *CardMutation) DisplayName() (r string, exists bool)
- func (m *CardMutation) EdgeCleared(name string) bool
- func (m *CardMutation) Field(name string) (ent.Value, bool)
- func (m *CardMutation) FieldCleared(name string) bool
- func (m *CardMutation) Fields() []string
- func (m *CardMutation) FinancialAccountCleared() bool
- func (m *CardMutation) FinancialAccountID() (r string, exists bool)
- func (m *CardMutation) FinancialAccountIDCleared() bool
- func (m *CardMutation) FinancialAccountIDs() (ids []string)
- func (m *CardMutation) ID() (id string, exists bool)
- func (m *CardMutation) IDs(ctx context.Context) ([]string, error)
- func (m *CardMutation) IsActive() (r bool, exists bool)
- func (m *CardMutation) LastDigits() (r uint16, exists bool)
- func (m *CardMutation) LastDigitsCleared() bool
- func (m *CardMutation) OldBalance(ctx context.Context) (v float64, err error)
- func (m *CardMutation) OldBalanceLimit(ctx context.Context) (v float64, err error)
- func (m *CardMutation) OldBankName(ctx context.Context) (v string, err error)
- func (m *CardMutation) OldCardType(ctx context.Context) (v string, err error)
- func (m *CardMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CardMutation) OldCurrencyCode(ctx context.Context) (v string, err error)
- func (m *CardMutation) OldDisplayName(ctx context.Context) (v string, err error)
- func (m *CardMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CardMutation) OldFinancialAccountID(ctx context.Context) (v string, err error)
- func (m *CardMutation) OldIsActive(ctx context.Context) (v bool, err error)
- func (m *CardMutation) OldLastDigits(ctx context.Context) (v uint16, err error)
- func (m *CardMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CardMutation) OldVersion(ctx context.Context) (v uint32, err error)
- func (m *CardMutation) Op() Op
- func (m *CardMutation) RemovedEdges() []string
- func (m *CardMutation) RemovedIDs(name string) []ent.Value
- func (m *CardMutation) ResetBalance()
- func (m *CardMutation) ResetBalanceLimit()
- func (m *CardMutation) ResetBankName()
- func (m *CardMutation) ResetCardType()
- func (m *CardMutation) ResetCreatedAt()
- func (m *CardMutation) ResetCurrencyCode()
- func (m *CardMutation) ResetDisplayName()
- func (m *CardMutation) ResetEdge(name string) error
- func (m *CardMutation) ResetField(name string) error
- func (m *CardMutation) ResetFinancialAccount()
- func (m *CardMutation) ResetFinancialAccountID()
- func (m *CardMutation) ResetIsActive()
- func (m *CardMutation) ResetLastDigits()
- func (m *CardMutation) ResetUpdatedAt()
- func (m *CardMutation) ResetUser()
- func (m *CardMutation) ResetVersion()
- func (m *CardMutation) SetBalance(f float64)
- func (m *CardMutation) SetBalanceLimit(f float64)
- func (m *CardMutation) SetBankName(s string)
- func (m *CardMutation) SetCardType(s string)
- func (m *CardMutation) SetCreatedAt(t time.Time)
- func (m *CardMutation) SetCurrencyCode(s string)
- func (m *CardMutation) SetDisplayName(s string)
- func (m *CardMutation) SetField(name string, value ent.Value) error
- func (m *CardMutation) SetFinancialAccountID(s string)
- func (m *CardMutation) SetID(id string)
- func (m *CardMutation) SetIsActive(b bool)
- func (m *CardMutation) SetLastDigits(u uint16)
- func (m *CardMutation) SetOp(op Op)
- func (m *CardMutation) SetUpdatedAt(t time.Time)
- func (m *CardMutation) SetUserID(id string)
- func (m *CardMutation) SetVersion(u uint32)
- func (m CardMutation) Tx() (*Tx, error)
- func (m *CardMutation) Type() string
- func (m *CardMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CardMutation) UserCleared() bool
- func (m *CardMutation) UserID() (id string, exists bool)
- func (m *CardMutation) UserIDs() (ids []string)
- func (m *CardMutation) Version() (r uint32, exists bool)
- func (m *CardMutation) Where(ps ...predicate.Card)
- func (m *CardMutation) WhereP(ps ...func(*sql.Selector))
- type CardQuery
- func (cq *CardQuery) Aggregate(fns ...AggregateFunc) *CardSelect
- func (cq *CardQuery) All(ctx context.Context) ([]*Card, error)
- func (cq *CardQuery) AllX(ctx context.Context) []*Card
- func (cq *CardQuery) Clone() *CardQuery
- func (cq *CardQuery) Count(ctx context.Context) (int, error)
- func (cq *CardQuery) CountX(ctx context.Context) int
- func (cq *CardQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CardQuery) ExistX(ctx context.Context) bool
- func (cq *CardQuery) First(ctx context.Context) (*Card, error)
- func (cq *CardQuery) FirstID(ctx context.Context) (id string, err error)
- func (cq *CardQuery) FirstIDX(ctx context.Context) string
- func (cq *CardQuery) FirstX(ctx context.Context) *Card
- func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy
- func (cq *CardQuery) IDs(ctx context.Context) ([]string, error)
- func (cq *CardQuery) IDsX(ctx context.Context) []string
- func (cq *CardQuery) Limit(limit int) *CardQuery
- func (cq *CardQuery) Offset(offset int) *CardQuery
- func (cq *CardQuery) Only(ctx context.Context) (*Card, error)
- func (cq *CardQuery) OnlyID(ctx context.Context) (id string, err error)
- func (cq *CardQuery) OnlyIDX(ctx context.Context) string
- func (cq *CardQuery) OnlyX(ctx context.Context) *Card
- func (cq *CardQuery) Order(o ...OrderFunc) *CardQuery
- func (cq *CardQuery) QueryFinancialAccount() *FinancialAccountQuery
- func (cq *CardQuery) QueryUser() *UserQuery
- func (cq *CardQuery) Select(fields ...string) *CardSelect
- func (cq *CardQuery) Unique(unique bool) *CardQuery
- func (cq *CardQuery) Where(ps ...predicate.Card) *CardQuery
- func (cq *CardQuery) WithFinancialAccount(opts ...func(*FinancialAccountQuery)) *CardQuery
- func (cq *CardQuery) WithUser(opts ...func(*UserQuery)) *CardQuery
- type CardSelect
- func (cs *CardSelect) Aggregate(fns ...AggregateFunc) *CardSelect
- func (s *CardSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CardSelect) BoolX(ctx context.Context) bool
- func (s *CardSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CardSelect) BoolsX(ctx context.Context) []bool
- func (s *CardSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CardSelect) Float64X(ctx context.Context) float64
- func (s *CardSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CardSelect) Float64sX(ctx context.Context) []float64
- func (s *CardSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CardSelect) IntX(ctx context.Context) int
- func (s *CardSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CardSelect) IntsX(ctx context.Context) []int
- func (cs *CardSelect) Scan(ctx context.Context, v any) error
- func (s *CardSelect) ScanX(ctx context.Context, v any)
- func (s *CardSelect) String(ctx context.Context) (_ string, err error)
- func (s *CardSelect) StringX(ctx context.Context) string
- func (s *CardSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CardSelect) StringsX(ctx context.Context) []string
- type CardUpdate
- func (cu *CardUpdate) AddBalance(f float64) *CardUpdate
- func (cu *CardUpdate) AddBalanceLimit(f float64) *CardUpdate
- func (cu *CardUpdate) AddLastDigits(u int16) *CardUpdate
- func (cu *CardUpdate) AddVersion(u int32) *CardUpdate
- func (cu *CardUpdate) ClearBankName() *CardUpdate
- func (cu *CardUpdate) ClearFinancialAccount() *CardUpdate
- func (cu *CardUpdate) ClearFinancialAccountID() *CardUpdate
- func (cu *CardUpdate) ClearLastDigits() *CardUpdate
- func (cu *CardUpdate) Exec(ctx context.Context) error
- func (cu *CardUpdate) ExecX(ctx context.Context)
- func (cu *CardUpdate) Mutation() *CardMutation
- func (cu *CardUpdate) Save(ctx context.Context) (int, error)
- func (cu *CardUpdate) SaveX(ctx context.Context) int
- func (cu *CardUpdate) SetBalance(f float64) *CardUpdate
- func (cu *CardUpdate) SetBalanceLimit(f float64) *CardUpdate
- func (cu *CardUpdate) SetBankName(s string) *CardUpdate
- func (cu *CardUpdate) SetCardType(s string) *CardUpdate
- func (cu *CardUpdate) SetCurrencyCode(s string) *CardUpdate
- func (cu *CardUpdate) SetDisplayName(s string) *CardUpdate
- func (cu *CardUpdate) SetFinancialAccount(f *FinancialAccount) *CardUpdate
- func (cu *CardUpdate) SetFinancialAccountID(s string) *CardUpdate
- func (cu *CardUpdate) SetIsActive(b bool) *CardUpdate
- func (cu *CardUpdate) SetLastDigits(u uint16) *CardUpdate
- func (cu *CardUpdate) SetNillableBankName(s *string) *CardUpdate
- func (cu *CardUpdate) SetNillableFinancialAccountID(s *string) *CardUpdate
- func (cu *CardUpdate) SetNillableLastDigits(u *uint16) *CardUpdate
- func (cu *CardUpdate) SetUpdatedAt(t time.Time) *CardUpdate
- func (cu *CardUpdate) SetVersion(u uint32) *CardUpdate
- func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate
- type CardUpdateOne
- func (cuo *CardUpdateOne) AddBalance(f float64) *CardUpdateOne
- func (cuo *CardUpdateOne) AddBalanceLimit(f float64) *CardUpdateOne
- func (cuo *CardUpdateOne) AddLastDigits(u int16) *CardUpdateOne
- func (cuo *CardUpdateOne) AddVersion(u int32) *CardUpdateOne
- func (cuo *CardUpdateOne) ClearBankName() *CardUpdateOne
- func (cuo *CardUpdateOne) ClearFinancialAccount() *CardUpdateOne
- func (cuo *CardUpdateOne) ClearFinancialAccountID() *CardUpdateOne
- func (cuo *CardUpdateOne) ClearLastDigits() *CardUpdateOne
- func (cuo *CardUpdateOne) Exec(ctx context.Context) error
- func (cuo *CardUpdateOne) ExecX(ctx context.Context)
- func (cuo *CardUpdateOne) Mutation() *CardMutation
- func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error)
- func (cuo *CardUpdateOne) SaveX(ctx context.Context) *Card
- func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetBalance(f float64) *CardUpdateOne
- func (cuo *CardUpdateOne) SetBalanceLimit(f float64) *CardUpdateOne
- func (cuo *CardUpdateOne) SetBankName(s string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetCardType(s string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetCurrencyCode(s string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetDisplayName(s string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetFinancialAccount(f *FinancialAccount) *CardUpdateOne
- func (cuo *CardUpdateOne) SetFinancialAccountID(s string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetIsActive(b bool) *CardUpdateOne
- func (cuo *CardUpdateOne) SetLastDigits(u uint16) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableBankName(s *string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableFinancialAccountID(s *string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableLastDigits(u *uint16) *CardUpdateOne
- func (cuo *CardUpdateOne) SetUpdatedAt(t time.Time) *CardUpdateOne
- func (cuo *CardUpdateOne) SetVersion(u uint32) *CardUpdateOne
- type CardUpsert
- func (u *CardUpsert) AddBalance(v float64) *CardUpsert
- func (u *CardUpsert) AddBalanceLimit(v float64) *CardUpsert
- func (u *CardUpsert) AddLastDigits(v uint16) *CardUpsert
- func (u *CardUpsert) AddVersion(v uint32) *CardUpsert
- func (u *CardUpsert) ClearBankName() *CardUpsert
- func (u *CardUpsert) ClearFinancialAccountID() *CardUpsert
- func (u *CardUpsert) ClearLastDigits() *CardUpsert
- func (u *CardUpsert) SetBalance(v float64) *CardUpsert
- func (u *CardUpsert) SetBalanceLimit(v float64) *CardUpsert
- func (u *CardUpsert) SetBankName(v string) *CardUpsert
- func (u *CardUpsert) SetCardType(v string) *CardUpsert
- func (u *CardUpsert) SetCurrencyCode(v string) *CardUpsert
- func (u *CardUpsert) SetDisplayName(v string) *CardUpsert
- func (u *CardUpsert) SetFinancialAccountID(v string) *CardUpsert
- func (u *CardUpsert) SetIsActive(v bool) *CardUpsert
- func (u *CardUpsert) SetLastDigits(v uint16) *CardUpsert
- func (u *CardUpsert) SetUpdatedAt(v time.Time) *CardUpsert
- func (u *CardUpsert) SetVersion(v uint32) *CardUpsert
- func (u *CardUpsert) UpdateBalance() *CardUpsert
- func (u *CardUpsert) UpdateBalanceLimit() *CardUpsert
- func (u *CardUpsert) UpdateBankName() *CardUpsert
- func (u *CardUpsert) UpdateCardType() *CardUpsert
- func (u *CardUpsert) UpdateCurrencyCode() *CardUpsert
- func (u *CardUpsert) UpdateDisplayName() *CardUpsert
- func (u *CardUpsert) UpdateFinancialAccountID() *CardUpsert
- func (u *CardUpsert) UpdateIsActive() *CardUpsert
- func (u *CardUpsert) UpdateLastDigits() *CardUpsert
- func (u *CardUpsert) UpdateUpdatedAt() *CardUpsert
- func (u *CardUpsert) UpdateVersion() *CardUpsert
- type CardUpsertBulk
- func (u *CardUpsertBulk) AddBalance(v float64) *CardUpsertBulk
- func (u *CardUpsertBulk) AddBalanceLimit(v float64) *CardUpsertBulk
- func (u *CardUpsertBulk) AddLastDigits(v uint16) *CardUpsertBulk
- func (u *CardUpsertBulk) AddVersion(v uint32) *CardUpsertBulk
- func (u *CardUpsertBulk) ClearBankName() *CardUpsertBulk
- func (u *CardUpsertBulk) ClearFinancialAccountID() *CardUpsertBulk
- func (u *CardUpsertBulk) ClearLastDigits() *CardUpsertBulk
- func (u *CardUpsertBulk) DoNothing() *CardUpsertBulk
- func (u *CardUpsertBulk) Exec(ctx context.Context) error
- func (u *CardUpsertBulk) ExecX(ctx context.Context)
- func (u *CardUpsertBulk) Ignore() *CardUpsertBulk
- func (u *CardUpsertBulk) SetBalance(v float64) *CardUpsertBulk
- func (u *CardUpsertBulk) SetBalanceLimit(v float64) *CardUpsertBulk
- func (u *CardUpsertBulk) SetBankName(v string) *CardUpsertBulk
- func (u *CardUpsertBulk) SetCardType(v string) *CardUpsertBulk
- func (u *CardUpsertBulk) SetCurrencyCode(v string) *CardUpsertBulk
- func (u *CardUpsertBulk) SetDisplayName(v string) *CardUpsertBulk
- func (u *CardUpsertBulk) SetFinancialAccountID(v string) *CardUpsertBulk
- func (u *CardUpsertBulk) SetIsActive(v bool) *CardUpsertBulk
- func (u *CardUpsertBulk) SetLastDigits(v uint16) *CardUpsertBulk
- func (u *CardUpsertBulk) SetUpdatedAt(v time.Time) *CardUpsertBulk
- func (u *CardUpsertBulk) SetVersion(v uint32) *CardUpsertBulk
- func (u *CardUpsertBulk) Update(set func(*CardUpsert)) *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateBalance() *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateBalanceLimit() *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateBankName() *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateCardType() *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateCurrencyCode() *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateDisplayName() *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateFinancialAccountID() *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateIsActive() *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateLastDigits() *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateNewValues() *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateUpdatedAt() *CardUpsertBulk
- func (u *CardUpsertBulk) UpdateVersion() *CardUpsertBulk
- type CardUpsertOne
- func (u *CardUpsertOne) AddBalance(v float64) *CardUpsertOne
- func (u *CardUpsertOne) AddBalanceLimit(v float64) *CardUpsertOne
- func (u *CardUpsertOne) AddLastDigits(v uint16) *CardUpsertOne
- func (u *CardUpsertOne) AddVersion(v uint32) *CardUpsertOne
- func (u *CardUpsertOne) ClearBankName() *CardUpsertOne
- func (u *CardUpsertOne) ClearFinancialAccountID() *CardUpsertOne
- func (u *CardUpsertOne) ClearLastDigits() *CardUpsertOne
- func (u *CardUpsertOne) DoNothing() *CardUpsertOne
- func (u *CardUpsertOne) Exec(ctx context.Context) error
- func (u *CardUpsertOne) ExecX(ctx context.Context)
- func (u *CardUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *CardUpsertOne) IDX(ctx context.Context) string
- func (u *CardUpsertOne) Ignore() *CardUpsertOne
- func (u *CardUpsertOne) SetBalance(v float64) *CardUpsertOne
- func (u *CardUpsertOne) SetBalanceLimit(v float64) *CardUpsertOne
- func (u *CardUpsertOne) SetBankName(v string) *CardUpsertOne
- func (u *CardUpsertOne) SetCardType(v string) *CardUpsertOne
- func (u *CardUpsertOne) SetCurrencyCode(v string) *CardUpsertOne
- func (u *CardUpsertOne) SetDisplayName(v string) *CardUpsertOne
- func (u *CardUpsertOne) SetFinancialAccountID(v string) *CardUpsertOne
- func (u *CardUpsertOne) SetIsActive(v bool) *CardUpsertOne
- func (u *CardUpsertOne) SetLastDigits(v uint16) *CardUpsertOne
- func (u *CardUpsertOne) SetUpdatedAt(v time.Time) *CardUpsertOne
- func (u *CardUpsertOne) SetVersion(v uint32) *CardUpsertOne
- func (u *CardUpsertOne) Update(set func(*CardUpsert)) *CardUpsertOne
- func (u *CardUpsertOne) UpdateBalance() *CardUpsertOne
- func (u *CardUpsertOne) UpdateBalanceLimit() *CardUpsertOne
- func (u *CardUpsertOne) UpdateBankName() *CardUpsertOne
- func (u *CardUpsertOne) UpdateCardType() *CardUpsertOne
- func (u *CardUpsertOne) UpdateCurrencyCode() *CardUpsertOne
- func (u *CardUpsertOne) UpdateDisplayName() *CardUpsertOne
- func (u *CardUpsertOne) UpdateFinancialAccountID() *CardUpsertOne
- func (u *CardUpsertOne) UpdateIsActive() *CardUpsertOne
- func (u *CardUpsertOne) UpdateLastDigits() *CardUpsertOne
- func (u *CardUpsertOne) UpdateNewValues() *CardUpsertOne
- func (u *CardUpsertOne) UpdateUpdatedAt() *CardUpsertOne
- func (u *CardUpsertOne) UpdateVersion() *CardUpsertOne
- type Cards
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Contact
- type ContactClient
- func (c *ContactClient) Create() *ContactCreate
- func (c *ContactClient) CreateBulk(builders ...*ContactCreate) *ContactCreateBulk
- func (c *ContactClient) Delete() *ContactDelete
- func (c *ContactClient) DeleteOne(co *Contact) *ContactDeleteOne
- func (c *ContactClient) DeleteOneID(id string) *ContactDeleteOne
- func (c *ContactClient) Get(ctx context.Context, id string) (*Contact, error)
- func (c *ContactClient) GetX(ctx context.Context, id string) *Contact
- func (c *ContactClient) Hooks() []Hook
- func (c *ContactClient) Intercept(interceptors ...Interceptor)
- func (c *ContactClient) Interceptors() []Interceptor
- func (c *ContactClient) Query() *ContactQuery
- func (c *ContactClient) QueryLinkedTo(co *Contact) *UserQuery
- func (c *ContactClient) QueryOwner(co *Contact) *UserQuery
- func (c *ContactClient) Update() *ContactUpdate
- func (c *ContactClient) UpdateOne(co *Contact) *ContactUpdateOne
- func (c *ContactClient) UpdateOneID(id string) *ContactUpdateOne
- func (c *ContactClient) Use(hooks ...Hook)
- type ContactCreate
- func (cc *ContactCreate) Exec(ctx context.Context) error
- func (cc *ContactCreate) ExecX(ctx context.Context)
- func (cc *ContactCreate) Mutation() *ContactMutation
- func (cc *ContactCreate) OnConflict(opts ...sql.ConflictOption) *ContactUpsertOne
- func (cc *ContactCreate) OnConflictColumns(columns ...string) *ContactUpsertOne
- func (cc *ContactCreate) Save(ctx context.Context) (*Contact, error)
- func (cc *ContactCreate) SaveX(ctx context.Context) *Contact
- func (cc *ContactCreate) SetCreatedAt(t time.Time) *ContactCreate
- func (cc *ContactCreate) SetDisplayName(s string) *ContactCreate
- func (cc *ContactCreate) SetID(s string) *ContactCreate
- func (cc *ContactCreate) SetImageURL(s string) *ContactCreate
- func (cc *ContactCreate) SetIsActive(b bool) *ContactCreate
- func (cc *ContactCreate) SetLinkedTo(u *User) *ContactCreate
- func (cc *ContactCreate) SetLinkedToID(id string) *ContactCreate
- func (cc *ContactCreate) SetLinkedToUser(s string) *ContactCreate
- func (cc *ContactCreate) SetNillableImageURL(s *string) *ContactCreate
- func (cc *ContactCreate) SetNillableLinkedToID(id *string) *ContactCreate
- func (cc *ContactCreate) SetNillableLinkedToUser(s *string) *ContactCreate
- func (cc *ContactCreate) SetOwner(u *User) *ContactCreate
- func (cc *ContactCreate) SetOwnerID(id string) *ContactCreate
- func (cc *ContactCreate) SetUpdatedAt(t time.Time) *ContactCreate
- func (cc *ContactCreate) SetVersion(u uint32) *ContactCreate
- type ContactCreateBulk
- func (ccb *ContactCreateBulk) Exec(ctx context.Context) error
- func (ccb *ContactCreateBulk) ExecX(ctx context.Context)
- func (ccb *ContactCreateBulk) OnConflict(opts ...sql.ConflictOption) *ContactUpsertBulk
- func (ccb *ContactCreateBulk) OnConflictColumns(columns ...string) *ContactUpsertBulk
- func (ccb *ContactCreateBulk) Save(ctx context.Context) ([]*Contact, error)
- func (ccb *ContactCreateBulk) SaveX(ctx context.Context) []*Contact
- type ContactDelete
- type ContactDeleteOne
- type ContactEdges
- type ContactGroupBy
- func (cgb *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 (cgb *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) AddField(name string, value ent.Value) error
- func (m *ContactMutation) AddVersion(u int32)
- 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) AddedVersion() (r int32, exists bool)
- func (m *ContactMutation) ClearEdge(name string) error
- func (m *ContactMutation) ClearField(name string) error
- func (m *ContactMutation) ClearImageURL()
- func (m *ContactMutation) ClearLinkedTo()
- func (m *ContactMutation) ClearLinkedToUser()
- func (m *ContactMutation) ClearOwner()
- func (m *ContactMutation) ClearedEdges() []string
- func (m *ContactMutation) ClearedFields() []string
- func (m ContactMutation) Client() *Client
- func (m *ContactMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ContactMutation) DisplayName() (r string, exists bool)
- func (m *ContactMutation) EdgeCleared(name string) bool
- 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 string, exists bool)
- func (m *ContactMutation) IDs(ctx context.Context) ([]string, error)
- func (m *ContactMutation) ImageURL() (r string, exists bool)
- func (m *ContactMutation) ImageURLCleared() bool
- func (m *ContactMutation) IsActive() (r bool, exists bool)
- func (m *ContactMutation) LinkedToCleared() bool
- func (m *ContactMutation) LinkedToID() (id string, exists bool)
- func (m *ContactMutation) LinkedToIDs() (ids []string)
- func (m *ContactMutation) LinkedToUser() (r string, exists bool)
- func (m *ContactMutation) LinkedToUserCleared() bool
- func (m *ContactMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ContactMutation) OldDisplayName(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ContactMutation) OldImageURL(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldIsActive(ctx context.Context) (v bool, err error)
- func (m *ContactMutation) OldLinkedToUser(ctx context.Context) (v string, err error)
- func (m *ContactMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ContactMutation) OldVersion(ctx context.Context) (v uint32, err error)
- func (m *ContactMutation) Op() Op
- func (m *ContactMutation) OwnerCleared() bool
- func (m *ContactMutation) OwnerID() (id string, exists bool)
- func (m *ContactMutation) OwnerIDs() (ids []string)
- func (m *ContactMutation) RemovedEdges() []string
- func (m *ContactMutation) RemovedIDs(name string) []ent.Value
- func (m *ContactMutation) ResetCreatedAt()
- func (m *ContactMutation) ResetDisplayName()
- func (m *ContactMutation) ResetEdge(name string) error
- func (m *ContactMutation) ResetField(name string) error
- func (m *ContactMutation) ResetImageURL()
- func (m *ContactMutation) ResetIsActive()
- func (m *ContactMutation) ResetLinkedTo()
- func (m *ContactMutation) ResetLinkedToUser()
- func (m *ContactMutation) ResetOwner()
- func (m *ContactMutation) ResetUpdatedAt()
- func (m *ContactMutation) ResetVersion()
- func (m *ContactMutation) SetCreatedAt(t time.Time)
- func (m *ContactMutation) SetDisplayName(s string)
- func (m *ContactMutation) SetField(name string, value ent.Value) error
- func (m *ContactMutation) SetID(id string)
- func (m *ContactMutation) SetImageURL(s string)
- func (m *ContactMutation) SetIsActive(b bool)
- func (m *ContactMutation) SetLinkedToID(id string)
- func (m *ContactMutation) SetLinkedToUser(s string)
- func (m *ContactMutation) SetOp(op Op)
- func (m *ContactMutation) SetOwnerID(id string)
- func (m *ContactMutation) SetUpdatedAt(t time.Time)
- func (m *ContactMutation) SetVersion(u uint32)
- func (m ContactMutation) Tx() (*Tx, error)
- func (m *ContactMutation) Type() string
- func (m *ContactMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ContactMutation) Version() (r uint32, exists bool)
- func (m *ContactMutation) Where(ps ...predicate.Contact)
- func (m *ContactMutation) WhereP(ps ...func(*sql.Selector))
- type ContactQuery
- func (cq *ContactQuery) Aggregate(fns ...AggregateFunc) *ContactSelect
- func (cq *ContactQuery) All(ctx context.Context) ([]*Contact, error)
- func (cq *ContactQuery) AllX(ctx context.Context) []*Contact
- func (cq *ContactQuery) Clone() *ContactQuery
- func (cq *ContactQuery) Count(ctx context.Context) (int, error)
- func (cq *ContactQuery) CountX(ctx context.Context) int
- func (cq *ContactQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ContactQuery) ExistX(ctx context.Context) bool
- func (cq *ContactQuery) First(ctx context.Context) (*Contact, error)
- func (cq *ContactQuery) FirstID(ctx context.Context) (id string, err error)
- func (cq *ContactQuery) FirstIDX(ctx context.Context) string
- func (cq *ContactQuery) FirstX(ctx context.Context) *Contact
- func (cq *ContactQuery) GroupBy(field string, fields ...string) *ContactGroupBy
- func (cq *ContactQuery) IDs(ctx context.Context) ([]string, error)
- func (cq *ContactQuery) IDsX(ctx context.Context) []string
- func (cq *ContactQuery) Limit(limit int) *ContactQuery
- func (cq *ContactQuery) Offset(offset int) *ContactQuery
- func (cq *ContactQuery) Only(ctx context.Context) (*Contact, error)
- func (cq *ContactQuery) OnlyID(ctx context.Context) (id string, err error)
- func (cq *ContactQuery) OnlyIDX(ctx context.Context) string
- func (cq *ContactQuery) OnlyX(ctx context.Context) *Contact
- func (cq *ContactQuery) Order(o ...OrderFunc) *ContactQuery
- func (cq *ContactQuery) QueryLinkedTo() *UserQuery
- func (cq *ContactQuery) QueryOwner() *UserQuery
- func (cq *ContactQuery) Select(fields ...string) *ContactSelect
- func (cq *ContactQuery) Unique(unique bool) *ContactQuery
- func (cq *ContactQuery) Where(ps ...predicate.Contact) *ContactQuery
- func (cq *ContactQuery) WithLinkedTo(opts ...func(*UserQuery)) *ContactQuery
- func (cq *ContactQuery) WithOwner(opts ...func(*UserQuery)) *ContactQuery
- type ContactSelect
- func (cs *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 (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 (cs *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 (cu *ContactUpdate) AddVersion(u int32) *ContactUpdate
- func (cu *ContactUpdate) ClearImageURL() *ContactUpdate
- func (cu *ContactUpdate) ClearLinkedTo() *ContactUpdate
- func (cu *ContactUpdate) ClearLinkedToUser() *ContactUpdate
- func (cu *ContactUpdate) Exec(ctx context.Context) error
- func (cu *ContactUpdate) ExecX(ctx context.Context)
- func (cu *ContactUpdate) Mutation() *ContactMutation
- func (cu *ContactUpdate) Save(ctx context.Context) (int, error)
- func (cu *ContactUpdate) SaveX(ctx context.Context) int
- func (cu *ContactUpdate) SetDisplayName(s string) *ContactUpdate
- func (cu *ContactUpdate) SetImageURL(s string) *ContactUpdate
- func (cu *ContactUpdate) SetIsActive(b bool) *ContactUpdate
- func (cu *ContactUpdate) SetLinkedTo(u *User) *ContactUpdate
- func (cu *ContactUpdate) SetLinkedToID(id string) *ContactUpdate
- func (cu *ContactUpdate) SetLinkedToUser(s string) *ContactUpdate
- func (cu *ContactUpdate) SetNillableImageURL(s *string) *ContactUpdate
- func (cu *ContactUpdate) SetNillableLinkedToID(id *string) *ContactUpdate
- func (cu *ContactUpdate) SetNillableLinkedToUser(s *string) *ContactUpdate
- func (cu *ContactUpdate) SetUpdatedAt(t time.Time) *ContactUpdate
- func (cu *ContactUpdate) SetVersion(u uint32) *ContactUpdate
- func (cu *ContactUpdate) Where(ps ...predicate.Contact) *ContactUpdate
- type ContactUpdateOne
- func (cuo *ContactUpdateOne) AddVersion(u int32) *ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearImageURL() *ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearLinkedTo() *ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearLinkedToUser() *ContactUpdateOne
- func (cuo *ContactUpdateOne) Exec(ctx context.Context) error
- func (cuo *ContactUpdateOne) ExecX(ctx context.Context)
- func (cuo *ContactUpdateOne) Mutation() *ContactMutation
- func (cuo *ContactUpdateOne) Save(ctx context.Context) (*Contact, error)
- func (cuo *ContactUpdateOne) SaveX(ctx context.Context) *Contact
- func (cuo *ContactUpdateOne) Select(field string, fields ...string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetDisplayName(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetImageURL(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetIsActive(b bool) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetLinkedTo(u *User) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetLinkedToID(id string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetLinkedToUser(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableImageURL(s *string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableLinkedToID(id *string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableLinkedToUser(s *string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetUpdatedAt(t time.Time) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetVersion(u uint32) *ContactUpdateOne
- type ContactUpsert
- func (u *ContactUpsert) AddVersion(v uint32) *ContactUpsert
- func (u *ContactUpsert) ClearImageURL() *ContactUpsert
- func (u *ContactUpsert) ClearLinkedToUser() *ContactUpsert
- func (u *ContactUpsert) SetDisplayName(v string) *ContactUpsert
- func (u *ContactUpsert) SetImageURL(v string) *ContactUpsert
- func (u *ContactUpsert) SetIsActive(v bool) *ContactUpsert
- func (u *ContactUpsert) SetLinkedToUser(v string) *ContactUpsert
- func (u *ContactUpsert) SetUpdatedAt(v time.Time) *ContactUpsert
- func (u *ContactUpsert) SetVersion(v uint32) *ContactUpsert
- func (u *ContactUpsert) UpdateDisplayName() *ContactUpsert
- func (u *ContactUpsert) UpdateImageURL() *ContactUpsert
- func (u *ContactUpsert) UpdateIsActive() *ContactUpsert
- func (u *ContactUpsert) UpdateLinkedToUser() *ContactUpsert
- func (u *ContactUpsert) UpdateUpdatedAt() *ContactUpsert
- func (u *ContactUpsert) UpdateVersion() *ContactUpsert
- type ContactUpsertBulk
- func (u *ContactUpsertBulk) AddVersion(v uint32) *ContactUpsertBulk
- func (u *ContactUpsertBulk) ClearImageURL() *ContactUpsertBulk
- func (u *ContactUpsertBulk) ClearLinkedToUser() *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) SetDisplayName(v string) *ContactUpsertBulk
- func (u *ContactUpsertBulk) SetImageURL(v string) *ContactUpsertBulk
- func (u *ContactUpsertBulk) SetIsActive(v bool) *ContactUpsertBulk
- func (u *ContactUpsertBulk) SetLinkedToUser(v string) *ContactUpsertBulk
- func (u *ContactUpsertBulk) SetUpdatedAt(v time.Time) *ContactUpsertBulk
- func (u *ContactUpsertBulk) SetVersion(v uint32) *ContactUpsertBulk
- func (u *ContactUpsertBulk) Update(set func(*ContactUpsert)) *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateDisplayName() *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateImageURL() *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateIsActive() *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateLinkedToUser() *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateNewValues() *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateUpdatedAt() *ContactUpsertBulk
- func (u *ContactUpsertBulk) UpdateVersion() *ContactUpsertBulk
- type ContactUpsertOne
- func (u *ContactUpsertOne) AddVersion(v uint32) *ContactUpsertOne
- func (u *ContactUpsertOne) ClearImageURL() *ContactUpsertOne
- func (u *ContactUpsertOne) ClearLinkedToUser() *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 string, err error)
- func (u *ContactUpsertOne) IDX(ctx context.Context) string
- func (u *ContactUpsertOne) Ignore() *ContactUpsertOne
- func (u *ContactUpsertOne) SetDisplayName(v string) *ContactUpsertOne
- func (u *ContactUpsertOne) SetImageURL(v string) *ContactUpsertOne
- func (u *ContactUpsertOne) SetIsActive(v bool) *ContactUpsertOne
- func (u *ContactUpsertOne) SetLinkedToUser(v string) *ContactUpsertOne
- func (u *ContactUpsertOne) SetUpdatedAt(v time.Time) *ContactUpsertOne
- func (u *ContactUpsertOne) SetVersion(v uint32) *ContactUpsertOne
- func (u *ContactUpsertOne) Update(set func(*ContactUpsert)) *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateDisplayName() *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateImageURL() *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateIsActive() *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateLinkedToUser() *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateNewValues() *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateUpdatedAt() *ContactUpsertOne
- func (u *ContactUpsertOne) UpdateVersion() *ContactUpsertOne
- type Contacts
- type FinancialAccount
- type FinancialAccountClient
- func (c *FinancialAccountClient) Create() *FinancialAccountCreate
- func (c *FinancialAccountClient) CreateBulk(builders ...*FinancialAccountCreate) *FinancialAccountCreateBulk
- func (c *FinancialAccountClient) Delete() *FinancialAccountDelete
- func (c *FinancialAccountClient) DeleteOne(fa *FinancialAccount) *FinancialAccountDeleteOne
- func (c *FinancialAccountClient) DeleteOneID(id string) *FinancialAccountDeleteOne
- func (c *FinancialAccountClient) Get(ctx context.Context, id string) (*FinancialAccount, error)
- func (c *FinancialAccountClient) GetX(ctx context.Context, id string) *FinancialAccount
- func (c *FinancialAccountClient) Hooks() []Hook
- func (c *FinancialAccountClient) Intercept(interceptors ...Interceptor)
- func (c *FinancialAccountClient) Interceptors() []Interceptor
- func (c *FinancialAccountClient) Query() *FinancialAccountQuery
- func (c *FinancialAccountClient) QueryCards(fa *FinancialAccount) *CardQuery
- func (c *FinancialAccountClient) QueryOwner(fa *FinancialAccount) *UserQuery
- func (c *FinancialAccountClient) Update() *FinancialAccountUpdate
- func (c *FinancialAccountClient) UpdateOne(fa *FinancialAccount) *FinancialAccountUpdateOne
- func (c *FinancialAccountClient) UpdateOneID(id string) *FinancialAccountUpdateOne
- func (c *FinancialAccountClient) Use(hooks ...Hook)
- type FinancialAccountCreate
- func (fac *FinancialAccountCreate) AddCardIDs(ids ...string) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) AddCards(c ...*Card) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) Exec(ctx context.Context) error
- func (fac *FinancialAccountCreate) ExecX(ctx context.Context)
- func (fac *FinancialAccountCreate) Mutation() *FinancialAccountMutation
- func (fac *FinancialAccountCreate) OnConflict(opts ...sql.ConflictOption) *FinancialAccountUpsertOne
- func (fac *FinancialAccountCreate) OnConflictColumns(columns ...string) *FinancialAccountUpsertOne
- func (fac *FinancialAccountCreate) Save(ctx context.Context) (*FinancialAccount, error)
- func (fac *FinancialAccountCreate) SaveX(ctx context.Context) *FinancialAccount
- func (fac *FinancialAccountCreate) SetAccountType(s string) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetBalance(f float64) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetBankName(s string) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetCreatedAt(t time.Time) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetCurrencyCode(s string) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetDisplayName(s string) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetID(s string) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetIsActive(b bool) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetNillableBankName(s *string) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetOwner(u *User) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetOwnerID(id string) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetUpdatedAt(t time.Time) *FinancialAccountCreate
- func (fac *FinancialAccountCreate) SetVersion(u uint32) *FinancialAccountCreate
- type FinancialAccountCreateBulk
- func (facb *FinancialAccountCreateBulk) Exec(ctx context.Context) error
- func (facb *FinancialAccountCreateBulk) ExecX(ctx context.Context)
- func (facb *FinancialAccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *FinancialAccountUpsertBulk
- func (facb *FinancialAccountCreateBulk) OnConflictColumns(columns ...string) *FinancialAccountUpsertBulk
- func (facb *FinancialAccountCreateBulk) Save(ctx context.Context) ([]*FinancialAccount, error)
- func (facb *FinancialAccountCreateBulk) SaveX(ctx context.Context) []*FinancialAccount
- type FinancialAccountDelete
- type FinancialAccountDeleteOne
- type FinancialAccountEdges
- type FinancialAccountGroupBy
- func (fagb *FinancialAccountGroupBy) Aggregate(fns ...AggregateFunc) *FinancialAccountGroupBy
- func (s *FinancialAccountGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FinancialAccountGroupBy) BoolX(ctx context.Context) bool
- func (s *FinancialAccountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FinancialAccountGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FinancialAccountGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FinancialAccountGroupBy) Float64X(ctx context.Context) float64
- func (s *FinancialAccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FinancialAccountGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FinancialAccountGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FinancialAccountGroupBy) IntX(ctx context.Context) int
- func (s *FinancialAccountGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FinancialAccountGroupBy) IntsX(ctx context.Context) []int
- func (fagb *FinancialAccountGroupBy) Scan(ctx context.Context, v any) error
- func (s *FinancialAccountGroupBy) ScanX(ctx context.Context, v any)
- func (s *FinancialAccountGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FinancialAccountGroupBy) StringX(ctx context.Context) string
- func (s *FinancialAccountGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FinancialAccountGroupBy) StringsX(ctx context.Context) []string
- type FinancialAccountMutation
- func (m *FinancialAccountMutation) AccountType() (r string, exists bool)
- func (m *FinancialAccountMutation) AddBalance(f float64)
- func (m *FinancialAccountMutation) AddCardIDs(ids ...string)
- func (m *FinancialAccountMutation) AddField(name string, value ent.Value) error
- func (m *FinancialAccountMutation) AddVersion(u int32)
- func (m *FinancialAccountMutation) AddedBalance() (r float64, exists bool)
- func (m *FinancialAccountMutation) AddedEdges() []string
- func (m *FinancialAccountMutation) AddedField(name string) (ent.Value, bool)
- func (m *FinancialAccountMutation) AddedFields() []string
- func (m *FinancialAccountMutation) AddedIDs(name string) []ent.Value
- func (m *FinancialAccountMutation) AddedVersion() (r int32, exists bool)
- func (m *FinancialAccountMutation) Balance() (r float64, exists bool)
- func (m *FinancialAccountMutation) BankName() (r string, exists bool)
- func (m *FinancialAccountMutation) BankNameCleared() bool
- func (m *FinancialAccountMutation) CardsCleared() bool
- func (m *FinancialAccountMutation) CardsIDs() (ids []string)
- func (m *FinancialAccountMutation) ClearBankName()
- func (m *FinancialAccountMutation) ClearCards()
- func (m *FinancialAccountMutation) ClearEdge(name string) error
- func (m *FinancialAccountMutation) ClearField(name string) error
- func (m *FinancialAccountMutation) ClearOwner()
- func (m *FinancialAccountMutation) ClearedEdges() []string
- func (m *FinancialAccountMutation) ClearedFields() []string
- func (m FinancialAccountMutation) Client() *Client
- func (m *FinancialAccountMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FinancialAccountMutation) CurrencyCode() (r string, exists bool)
- func (m *FinancialAccountMutation) DisplayName() (r string, exists bool)
- func (m *FinancialAccountMutation) EdgeCleared(name string) bool
- func (m *FinancialAccountMutation) Field(name string) (ent.Value, bool)
- func (m *FinancialAccountMutation) FieldCleared(name string) bool
- func (m *FinancialAccountMutation) Fields() []string
- func (m *FinancialAccountMutation) ID() (id string, exists bool)
- func (m *FinancialAccountMutation) IDs(ctx context.Context) ([]string, error)
- func (m *FinancialAccountMutation) IsActive() (r bool, exists bool)
- func (m *FinancialAccountMutation) OldAccountType(ctx context.Context) (v string, err error)
- func (m *FinancialAccountMutation) OldBalance(ctx context.Context) (v float64, err error)
- func (m *FinancialAccountMutation) OldBankName(ctx context.Context) (v string, err error)
- func (m *FinancialAccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FinancialAccountMutation) OldCurrencyCode(ctx context.Context) (v string, err error)
- func (m *FinancialAccountMutation) OldDisplayName(ctx context.Context) (v string, err error)
- func (m *FinancialAccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FinancialAccountMutation) OldIsActive(ctx context.Context) (v bool, err error)
- func (m *FinancialAccountMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FinancialAccountMutation) OldVersion(ctx context.Context) (v uint32, err error)
- func (m *FinancialAccountMutation) Op() Op
- func (m *FinancialAccountMutation) OwnerCleared() bool
- func (m *FinancialAccountMutation) OwnerID() (id string, exists bool)
- func (m *FinancialAccountMutation) OwnerIDs() (ids []string)
- func (m *FinancialAccountMutation) RemoveCardIDs(ids ...string)
- func (m *FinancialAccountMutation) RemovedCardsIDs() (ids []string)
- func (m *FinancialAccountMutation) RemovedEdges() []string
- func (m *FinancialAccountMutation) RemovedIDs(name string) []ent.Value
- func (m *FinancialAccountMutation) ResetAccountType()
- func (m *FinancialAccountMutation) ResetBalance()
- func (m *FinancialAccountMutation) ResetBankName()
- func (m *FinancialAccountMutation) ResetCards()
- func (m *FinancialAccountMutation) ResetCreatedAt()
- func (m *FinancialAccountMutation) ResetCurrencyCode()
- func (m *FinancialAccountMutation) ResetDisplayName()
- func (m *FinancialAccountMutation) ResetEdge(name string) error
- func (m *FinancialAccountMutation) ResetField(name string) error
- func (m *FinancialAccountMutation) ResetIsActive()
- func (m *FinancialAccountMutation) ResetOwner()
- func (m *FinancialAccountMutation) ResetUpdatedAt()
- func (m *FinancialAccountMutation) ResetVersion()
- func (m *FinancialAccountMutation) SetAccountType(s string)
- func (m *FinancialAccountMutation) SetBalance(f float64)
- func (m *FinancialAccountMutation) SetBankName(s string)
- func (m *FinancialAccountMutation) SetCreatedAt(t time.Time)
- func (m *FinancialAccountMutation) SetCurrencyCode(s string)
- func (m *FinancialAccountMutation) SetDisplayName(s string)
- func (m *FinancialAccountMutation) SetField(name string, value ent.Value) error
- func (m *FinancialAccountMutation) SetID(id string)
- func (m *FinancialAccountMutation) SetIsActive(b bool)
- func (m *FinancialAccountMutation) SetOp(op Op)
- func (m *FinancialAccountMutation) SetOwnerID(id string)
- func (m *FinancialAccountMutation) SetUpdatedAt(t time.Time)
- func (m *FinancialAccountMutation) SetVersion(u uint32)
- func (m FinancialAccountMutation) Tx() (*Tx, error)
- func (m *FinancialAccountMutation) Type() string
- func (m *FinancialAccountMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FinancialAccountMutation) Version() (r uint32, exists bool)
- func (m *FinancialAccountMutation) Where(ps ...predicate.FinancialAccount)
- func (m *FinancialAccountMutation) WhereP(ps ...func(*sql.Selector))
- type FinancialAccountQuery
- func (faq *FinancialAccountQuery) Aggregate(fns ...AggregateFunc) *FinancialAccountSelect
- func (faq *FinancialAccountQuery) All(ctx context.Context) ([]*FinancialAccount, error)
- func (faq *FinancialAccountQuery) AllX(ctx context.Context) []*FinancialAccount
- func (faq *FinancialAccountQuery) Clone() *FinancialAccountQuery
- func (faq *FinancialAccountQuery) Count(ctx context.Context) (int, error)
- func (faq *FinancialAccountQuery) CountX(ctx context.Context) int
- func (faq *FinancialAccountQuery) Exist(ctx context.Context) (bool, error)
- func (faq *FinancialAccountQuery) ExistX(ctx context.Context) bool
- func (faq *FinancialAccountQuery) First(ctx context.Context) (*FinancialAccount, error)
- func (faq *FinancialAccountQuery) FirstID(ctx context.Context) (id string, err error)
- func (faq *FinancialAccountQuery) FirstIDX(ctx context.Context) string
- func (faq *FinancialAccountQuery) FirstX(ctx context.Context) *FinancialAccount
- func (faq *FinancialAccountQuery) GroupBy(field string, fields ...string) *FinancialAccountGroupBy
- func (faq *FinancialAccountQuery) IDs(ctx context.Context) ([]string, error)
- func (faq *FinancialAccountQuery) IDsX(ctx context.Context) []string
- func (faq *FinancialAccountQuery) Limit(limit int) *FinancialAccountQuery
- func (faq *FinancialAccountQuery) Offset(offset int) *FinancialAccountQuery
- func (faq *FinancialAccountQuery) Only(ctx context.Context) (*FinancialAccount, error)
- func (faq *FinancialAccountQuery) OnlyID(ctx context.Context) (id string, err error)
- func (faq *FinancialAccountQuery) OnlyIDX(ctx context.Context) string
- func (faq *FinancialAccountQuery) OnlyX(ctx context.Context) *FinancialAccount
- func (faq *FinancialAccountQuery) Order(o ...OrderFunc) *FinancialAccountQuery
- func (faq *FinancialAccountQuery) QueryCards() *CardQuery
- func (faq *FinancialAccountQuery) QueryOwner() *UserQuery
- func (faq *FinancialAccountQuery) Select(fields ...string) *FinancialAccountSelect
- func (faq *FinancialAccountQuery) Unique(unique bool) *FinancialAccountQuery
- func (faq *FinancialAccountQuery) Where(ps ...predicate.FinancialAccount) *FinancialAccountQuery
- func (faq *FinancialAccountQuery) WithCards(opts ...func(*CardQuery)) *FinancialAccountQuery
- func (faq *FinancialAccountQuery) WithOwner(opts ...func(*UserQuery)) *FinancialAccountQuery
- type FinancialAccountSelect
- func (fas *FinancialAccountSelect) Aggregate(fns ...AggregateFunc) *FinancialAccountSelect
- func (s *FinancialAccountSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FinancialAccountSelect) BoolX(ctx context.Context) bool
- func (s *FinancialAccountSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FinancialAccountSelect) BoolsX(ctx context.Context) []bool
- func (s *FinancialAccountSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FinancialAccountSelect) Float64X(ctx context.Context) float64
- func (s *FinancialAccountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FinancialAccountSelect) Float64sX(ctx context.Context) []float64
- func (s *FinancialAccountSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FinancialAccountSelect) IntX(ctx context.Context) int
- func (s *FinancialAccountSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FinancialAccountSelect) IntsX(ctx context.Context) []int
- func (fas *FinancialAccountSelect) Scan(ctx context.Context, v any) error
- func (s *FinancialAccountSelect) ScanX(ctx context.Context, v any)
- func (s *FinancialAccountSelect) String(ctx context.Context) (_ string, err error)
- func (s *FinancialAccountSelect) StringX(ctx context.Context) string
- func (s *FinancialAccountSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FinancialAccountSelect) StringsX(ctx context.Context) []string
- type FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) AddBalance(f float64) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) AddCardIDs(ids ...string) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) AddCards(c ...*Card) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) AddVersion(u int32) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) ClearBankName() *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) ClearCards() *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) Exec(ctx context.Context) error
- func (fau *FinancialAccountUpdate) ExecX(ctx context.Context)
- func (fau *FinancialAccountUpdate) Mutation() *FinancialAccountMutation
- func (fau *FinancialAccountUpdate) RemoveCardIDs(ids ...string) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) RemoveCards(c ...*Card) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) Save(ctx context.Context) (int, error)
- func (fau *FinancialAccountUpdate) SaveX(ctx context.Context) int
- func (fau *FinancialAccountUpdate) SetAccountType(s string) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) SetBalance(f float64) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) SetBankName(s string) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) SetCurrencyCode(s string) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) SetDisplayName(s string) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) SetIsActive(b bool) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) SetNillableBankName(s *string) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) SetUpdatedAt(t time.Time) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) SetVersion(u uint32) *FinancialAccountUpdate
- func (fau *FinancialAccountUpdate) Where(ps ...predicate.FinancialAccount) *FinancialAccountUpdate
- type FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) AddBalance(f float64) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) AddCardIDs(ids ...string) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) AddCards(c ...*Card) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) AddVersion(u int32) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) ClearBankName() *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) ClearCards() *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) Exec(ctx context.Context) error
- func (fauo *FinancialAccountUpdateOne) ExecX(ctx context.Context)
- func (fauo *FinancialAccountUpdateOne) Mutation() *FinancialAccountMutation
- func (fauo *FinancialAccountUpdateOne) RemoveCardIDs(ids ...string) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) RemoveCards(c ...*Card) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) Save(ctx context.Context) (*FinancialAccount, error)
- func (fauo *FinancialAccountUpdateOne) SaveX(ctx context.Context) *FinancialAccount
- func (fauo *FinancialAccountUpdateOne) Select(field string, fields ...string) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) SetAccountType(s string) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) SetBalance(f float64) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) SetBankName(s string) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) SetCurrencyCode(s string) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) SetDisplayName(s string) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) SetIsActive(b bool) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) SetNillableBankName(s *string) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) SetUpdatedAt(t time.Time) *FinancialAccountUpdateOne
- func (fauo *FinancialAccountUpdateOne) SetVersion(u uint32) *FinancialAccountUpdateOne
- type FinancialAccountUpsert
- func (u *FinancialAccountUpsert) AddBalance(v float64) *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) AddVersion(v uint32) *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) ClearBankName() *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) SetAccountType(v string) *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) SetBalance(v float64) *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) SetBankName(v string) *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) SetCurrencyCode(v string) *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) SetDisplayName(v string) *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) SetIsActive(v bool) *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) SetUpdatedAt(v time.Time) *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) SetVersion(v uint32) *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) UpdateAccountType() *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) UpdateBalance() *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) UpdateBankName() *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) UpdateCurrencyCode() *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) UpdateDisplayName() *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) UpdateIsActive() *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) UpdateUpdatedAt() *FinancialAccountUpsert
- func (u *FinancialAccountUpsert) UpdateVersion() *FinancialAccountUpsert
- type FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) AddBalance(v float64) *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) AddVersion(v uint32) *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) ClearBankName() *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) DoNothing() *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) Exec(ctx context.Context) error
- func (u *FinancialAccountUpsertBulk) ExecX(ctx context.Context)
- func (u *FinancialAccountUpsertBulk) Ignore() *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) SetAccountType(v string) *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) SetBalance(v float64) *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) SetBankName(v string) *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) SetCurrencyCode(v string) *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) SetDisplayName(v string) *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) SetIsActive(v bool) *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) SetUpdatedAt(v time.Time) *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) SetVersion(v uint32) *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) Update(set func(*FinancialAccountUpsert)) *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) UpdateAccountType() *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) UpdateBalance() *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) UpdateBankName() *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) UpdateCurrencyCode() *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) UpdateDisplayName() *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) UpdateIsActive() *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) UpdateNewValues() *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) UpdateUpdatedAt() *FinancialAccountUpsertBulk
- func (u *FinancialAccountUpsertBulk) UpdateVersion() *FinancialAccountUpsertBulk
- type FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) AddBalance(v float64) *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) AddVersion(v uint32) *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) ClearBankName() *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) DoNothing() *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) Exec(ctx context.Context) error
- func (u *FinancialAccountUpsertOne) ExecX(ctx context.Context)
- func (u *FinancialAccountUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *FinancialAccountUpsertOne) IDX(ctx context.Context) string
- func (u *FinancialAccountUpsertOne) Ignore() *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) SetAccountType(v string) *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) SetBalance(v float64) *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) SetBankName(v string) *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) SetCurrencyCode(v string) *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) SetDisplayName(v string) *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) SetIsActive(v bool) *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) SetUpdatedAt(v time.Time) *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) SetVersion(v uint32) *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) Update(set func(*FinancialAccountUpsert)) *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) UpdateAccountType() *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) UpdateBalance() *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) UpdateBankName() *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) UpdateCurrencyCode() *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) UpdateDisplayName() *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) UpdateIsActive() *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) UpdateNewValues() *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) UpdateUpdatedAt() *FinancialAccountUpsertOne
- func (u *FinancialAccountUpsertOne) UpdateVersion() *FinancialAccountUpsertOne
- type FinancialAccounts
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id string) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id string) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id string) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryCards(u *User) *CardQuery
- func (c *UserClient) QueryContactLinks(u *User) *ContactQuery
- func (c *UserClient) QueryContacts(u *User) *ContactQuery
- func (c *UserClient) QueryFinancialAccounts(u *User) *FinancialAccountQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id string) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddCardIDs(ids ...string) *UserCreate
- func (uc *UserCreate) AddCards(c ...*Card) *UserCreate
- func (uc *UserCreate) AddContactIDs(ids ...string) *UserCreate
- func (uc *UserCreate) AddContactLinkIDs(ids ...string) *UserCreate
- func (uc *UserCreate) AddContactLinks(c ...*Contact) *UserCreate
- func (uc *UserCreate) AddContacts(c ...*Contact) *UserCreate
- func (uc *UserCreate) AddFinancialAccountIDs(ids ...string) *UserCreate
- func (uc *UserCreate) AddFinancialAccounts(f ...*FinancialAccount) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDisplayName(s string) *UserCreate
- func (uc *UserCreate) SetID(s string) *UserCreate
- func (uc *UserCreate) SetIsActive(b bool) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetVersion(u uint32) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddCardIDs(ids ...string)
- func (m *UserMutation) AddContactIDs(ids ...string)
- func (m *UserMutation) AddContactLinkIDs(ids ...string)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddFinancialAccountIDs(ids ...string)
- func (m *UserMutation) AddVersion(u int32)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AddedVersion() (r int32, exists bool)
- func (m *UserMutation) CardsCleared() bool
- func (m *UserMutation) CardsIDs() (ids []string)
- func (m *UserMutation) ClearCards()
- func (m *UserMutation) ClearContactLinks()
- func (m *UserMutation) ClearContacts()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearFinancialAccounts()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) ContactLinksCleared() bool
- func (m *UserMutation) ContactLinksIDs() (ids []string)
- func (m *UserMutation) ContactsCleared() bool
- func (m *UserMutation) ContactsIDs() (ids []string)
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) DisplayName() (r string, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) FinancialAccountsCleared() bool
- func (m *UserMutation) FinancialAccountsIDs() (ids []string)
- func (m *UserMutation) ID() (id string, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]string, error)
- func (m *UserMutation) IsActive() (r bool, exists bool)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldDisplayName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldIsActive(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldVersion(ctx context.Context) (v uint32, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemoveCardIDs(ids ...string)
- func (m *UserMutation) RemoveContactIDs(ids ...string)
- func (m *UserMutation) RemoveContactLinkIDs(ids ...string)
- func (m *UserMutation) RemoveFinancialAccountIDs(ids ...string)
- func (m *UserMutation) RemovedCardsIDs() (ids []string)
- func (m *UserMutation) RemovedContactLinksIDs() (ids []string)
- func (m *UserMutation) RemovedContactsIDs() (ids []string)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedFinancialAccountsIDs() (ids []string)
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCards()
- func (m *UserMutation) ResetContactLinks()
- func (m *UserMutation) ResetContacts()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetDisplayName()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFinancialAccounts()
- func (m *UserMutation) ResetIsActive()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResetVersion()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetDisplayName(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id string)
- func (m *UserMutation) SetIsActive(b bool)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) SetVersion(u uint32)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Version() (r uint32, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id string, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) string
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]string, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []string
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id string, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) string
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryCards() *CardQuery
- func (uq *UserQuery) QueryContactLinks() *ContactQuery
- func (uq *UserQuery) QueryContacts() *ContactQuery
- func (uq *UserQuery) QueryFinancialAccounts() *FinancialAccountQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithCards(opts ...func(*CardQuery)) *UserQuery
- func (uq *UserQuery) WithContactLinks(opts ...func(*ContactQuery)) *UserQuery
- func (uq *UserQuery) WithContacts(opts ...func(*ContactQuery)) *UserQuery
- func (uq *UserQuery) WithFinancialAccounts(opts ...func(*FinancialAccountQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddCardIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) AddCards(c ...*Card) *UserUpdate
- func (uu *UserUpdate) AddContactIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) AddContactLinkIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) AddContactLinks(c ...*Contact) *UserUpdate
- func (uu *UserUpdate) AddContacts(c ...*Contact) *UserUpdate
- func (uu *UserUpdate) AddFinancialAccountIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) AddFinancialAccounts(f ...*FinancialAccount) *UserUpdate
- func (uu *UserUpdate) AddVersion(u int32) *UserUpdate
- func (uu *UserUpdate) ClearCards() *UserUpdate
- func (uu *UserUpdate) ClearContactLinks() *UserUpdate
- func (uu *UserUpdate) ClearContacts() *UserUpdate
- func (uu *UserUpdate) ClearFinancialAccounts() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveCardIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) RemoveCards(c ...*Card) *UserUpdate
- func (uu *UserUpdate) RemoveContactIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) RemoveContactLinkIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) RemoveContactLinks(c ...*Contact) *UserUpdate
- func (uu *UserUpdate) RemoveContacts(c ...*Contact) *UserUpdate
- func (uu *UserUpdate) RemoveFinancialAccountIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) RemoveFinancialAccounts(f ...*FinancialAccount) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetDisplayName(s string) *UserUpdate
- func (uu *UserUpdate) SetIsActive(b bool) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetVersion(u uint32) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddCardIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCards(c ...*Card) *UserUpdateOne
- func (uuo *UserUpdateOne) AddContactIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) AddContactLinkIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) AddContactLinks(c ...*Contact) *UserUpdateOne
- func (uuo *UserUpdateOne) AddContacts(c ...*Contact) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFinancialAccountIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFinancialAccounts(f ...*FinancialAccount) *UserUpdateOne
- func (uuo *UserUpdateOne) AddVersion(u int32) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCards() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearContactLinks() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearContacts() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFinancialAccounts() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveCardIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveCards(c ...*Card) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveContactIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveContactLinkIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveContactLinks(c ...*Contact) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveContacts(c ...*Contact) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFinancialAccountIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFinancialAccounts(f ...*FinancialAccount) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDisplayName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsActive(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetVersion(u uint32) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) AddVersion(v uint32) *UserUpsert
- func (u *UserUpsert) SetDisplayName(v string) *UserUpsert
- func (u *UserUpsert) SetIsActive(v bool) *UserUpsert
- func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetVersion(v uint32) *UserUpsert
- func (u *UserUpsert) UpdateDisplayName() *UserUpsert
- func (u *UserUpsert) UpdateIsActive() *UserUpsert
- func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
- func (u *UserUpsert) UpdateVersion() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) AddVersion(v uint32) *UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetDisplayName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetIsActive(v bool) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetVersion(v uint32) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateDisplayName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateIsActive() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateVersion() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) AddVersion(v uint32) *UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) string
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetDisplayName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetIsActive(v bool) *UserUpsertOne
- func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetVersion(v uint32) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateDisplayName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateIsActive() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateVersion() *UserUpsertOne
- type Users
- 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. TypeCard = "Card" TypeContact = "Contact" TypeFinancialAccount = "FinancialAccount" TypeUser = "User" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Card ¶
type Card struct { // ID of the ent. ID string `json:"id,omitempty"` // IsActive holds the value of the "is_active" field. IsActive bool `json:"is_active,omitempty"` // Version holds the value of the "version" field. Version uint32 `json:"version,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // FinancialAccountID holds the value of the "financial_account_id" field. FinancialAccountID string `json:"financial_account_id,omitempty"` // DisplayName holds the value of the "display_name" field. DisplayName string `json:"display_name,omitempty"` // BankName holds the value of the "bank_name" field. BankName string `json:"bank_name,omitempty"` // LastDigits holds the value of the "last_digits" field. LastDigits uint16 `json:"last_digits,omitempty"` // Balance holds the value of the "balance" field. Balance float64 `json:"balance,omitempty"` // BalanceLimit holds the value of the "balance_limit" field. BalanceLimit float64 `json:"balance_limit,omitempty"` // CurrencyCode holds the value of the "currency_code" field. CurrencyCode string `json:"currency_code,omitempty"` // CardType holds the value of the "card_type" field. CardType string `json:"card_type,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CardQuery when eager-loading is set. Edges CardEdges `json:"edges"` // contains filtered or unexported fields }
Card is the model entity for the Card schema.
func (*Card) QueryFinancialAccount ¶
func (c *Card) QueryFinancialAccount() *FinancialAccountQuery
QueryFinancialAccount queries the "financial_account" edge of the Card entity.
func (*Card) Unwrap ¶
Unwrap unwraps the Card 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 (*Card) Update ¶
func (c *Card) Update() *CardUpdateOne
Update returns a builder for updating this Card. Note that you need to call Card.Unwrap() before calling this method if this Card was returned from a transaction, and the transaction was committed or rolled back.
type CardClient ¶
type CardClient struct {
// contains filtered or unexported fields
}
CardClient is a client for the Card schema.
func NewCardClient ¶
func NewCardClient(c config) *CardClient
NewCardClient returns a client for the Card from the given config.
func (*CardClient) Create ¶
func (c *CardClient) Create() *CardCreate
Create returns a builder for creating a Card entity.
func (*CardClient) CreateBulk ¶
func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk
CreateBulk returns a builder for creating a bulk of Card entities.
func (*CardClient) Delete ¶
func (c *CardClient) Delete() *CardDelete
Delete returns a delete builder for Card.
func (*CardClient) DeleteOne ¶
func (c *CardClient) DeleteOne(ca *Card) *CardDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CardClient) DeleteOneID ¶
func (c *CardClient) DeleteOneID(id string) *CardDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CardClient) GetX ¶
func (c *CardClient) GetX(ctx context.Context, id string) *Card
GetX is like Get, but panics if an error occurs.
func (*CardClient) Intercept ¶
func (c *CardClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `card.Intercept(f(g(h())))`.
func (*CardClient) Interceptors ¶
func (c *CardClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CardClient) Query ¶
func (c *CardClient) Query() *CardQuery
Query returns a query builder for Card.
func (*CardClient) QueryFinancialAccount ¶
func (c *CardClient) QueryFinancialAccount(ca *Card) *FinancialAccountQuery
QueryFinancialAccount queries the financial_account edge of a Card.
func (*CardClient) QueryUser ¶
func (c *CardClient) QueryUser(ca *Card) *UserQuery
QueryUser queries the user edge of a Card.
func (*CardClient) Update ¶
func (c *CardClient) Update() *CardUpdate
Update returns an update builder for Card.
func (*CardClient) UpdateOne ¶
func (c *CardClient) UpdateOne(ca *Card) *CardUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CardClient) UpdateOneID ¶
func (c *CardClient) UpdateOneID(id string) *CardUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CardClient) Use ¶
func (c *CardClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `card.Hooks(f(g(h())))`.
type CardCreate ¶
type CardCreate struct {
// contains filtered or unexported fields
}
CardCreate is the builder for creating a Card entity.
func (*CardCreate) Exec ¶
func (cc *CardCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CardCreate) ExecX ¶
func (cc *CardCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardCreate) Mutation ¶
func (cc *CardCreate) Mutation() *CardMutation
Mutation returns the CardMutation object of the builder.
func (*CardCreate) OnConflict ¶
func (cc *CardCreate) OnConflict(opts ...sql.ConflictOption) *CardUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Card.Create(). SetIsActive(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.CardUpsert) { SetIsActive(v+v). }). Exec(ctx)
func (*CardCreate) OnConflictColumns ¶
func (cc *CardCreate) OnConflictColumns(columns ...string) *CardUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Card.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*CardCreate) Save ¶
func (cc *CardCreate) Save(ctx context.Context) (*Card, error)
Save creates the Card in the database.
func (*CardCreate) SaveX ¶
func (cc *CardCreate) SaveX(ctx context.Context) *Card
SaveX calls Save and panics if Save returns an error.
func (*CardCreate) SetBalance ¶
func (cc *CardCreate) SetBalance(f float64) *CardCreate
SetBalance sets the "balance" field.
func (*CardCreate) SetBalanceLimit ¶
func (cc *CardCreate) SetBalanceLimit(f float64) *CardCreate
SetBalanceLimit sets the "balance_limit" field.
func (*CardCreate) SetBankName ¶
func (cc *CardCreate) SetBankName(s string) *CardCreate
SetBankName sets the "bank_name" field.
func (*CardCreate) SetCardType ¶
func (cc *CardCreate) SetCardType(s string) *CardCreate
SetCardType sets the "card_type" field.
func (*CardCreate) SetCreatedAt ¶
func (cc *CardCreate) SetCreatedAt(t time.Time) *CardCreate
SetCreatedAt sets the "created_at" field.
func (*CardCreate) SetCurrencyCode ¶
func (cc *CardCreate) SetCurrencyCode(s string) *CardCreate
SetCurrencyCode sets the "currency_code" field.
func (*CardCreate) SetDisplayName ¶
func (cc *CardCreate) SetDisplayName(s string) *CardCreate
SetDisplayName sets the "display_name" field.
func (*CardCreate) SetFinancialAccount ¶
func (cc *CardCreate) SetFinancialAccount(f *FinancialAccount) *CardCreate
SetFinancialAccount sets the "financial_account" edge to the FinancialAccount entity.
func (*CardCreate) SetFinancialAccountID ¶
func (cc *CardCreate) SetFinancialAccountID(s string) *CardCreate
SetFinancialAccountID sets the "financial_account_id" field.
func (*CardCreate) SetID ¶
func (cc *CardCreate) SetID(s string) *CardCreate
SetID sets the "id" field.
func (*CardCreate) SetIsActive ¶
func (cc *CardCreate) SetIsActive(b bool) *CardCreate
SetIsActive sets the "is_active" field.
func (*CardCreate) SetLastDigits ¶
func (cc *CardCreate) SetLastDigits(u uint16) *CardCreate
SetLastDigits sets the "last_digits" field.
func (*CardCreate) SetNillableBankName ¶
func (cc *CardCreate) SetNillableBankName(s *string) *CardCreate
SetNillableBankName sets the "bank_name" field if the given value is not nil.
func (*CardCreate) SetNillableFinancialAccountID ¶
func (cc *CardCreate) SetNillableFinancialAccountID(s *string) *CardCreate
SetNillableFinancialAccountID sets the "financial_account_id" field if the given value is not nil.
func (*CardCreate) SetNillableLastDigits ¶
func (cc *CardCreate) SetNillableLastDigits(u *uint16) *CardCreate
SetNillableLastDigits sets the "last_digits" field if the given value is not nil.
func (*CardCreate) SetUpdatedAt ¶
func (cc *CardCreate) SetUpdatedAt(t time.Time) *CardCreate
SetUpdatedAt sets the "updated_at" field.
func (*CardCreate) SetUser ¶
func (cc *CardCreate) SetUser(u *User) *CardCreate
SetUser sets the "user" edge to the User entity.
func (*CardCreate) SetUserID ¶
func (cc *CardCreate) SetUserID(id string) *CardCreate
SetUserID sets the "user" edge to the User entity by ID.
func (*CardCreate) SetVersion ¶
func (cc *CardCreate) SetVersion(u uint32) *CardCreate
SetVersion sets the "version" field.
type CardCreateBulk ¶
type CardCreateBulk struct {
// contains filtered or unexported fields
}
CardCreateBulk is the builder for creating many Card entities in bulk.
func (*CardCreateBulk) Exec ¶
func (ccb *CardCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CardCreateBulk) ExecX ¶
func (ccb *CardCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardCreateBulk) OnConflict ¶
func (ccb *CardCreateBulk) OnConflict(opts ...sql.ConflictOption) *CardUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Card.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.CardUpsert) { SetIsActive(v+v). }). Exec(ctx)
func (*CardCreateBulk) OnConflictColumns ¶
func (ccb *CardCreateBulk) OnConflictColumns(columns ...string) *CardUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Card.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type CardDelete ¶
type CardDelete struct {
// contains filtered or unexported fields
}
CardDelete is the builder for deleting a Card entity.
func (*CardDelete) Exec ¶
func (cd *CardDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CardDelete) ExecX ¶
func (cd *CardDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CardDelete) Where ¶
func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete
Where appends a list predicates to the CardDelete builder.
type CardDeleteOne ¶
type CardDeleteOne struct {
// contains filtered or unexported fields
}
CardDeleteOne is the builder for deleting a single Card entity.
func (*CardDeleteOne) Exec ¶
func (cdo *CardDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CardDeleteOne) ExecX ¶
func (cdo *CardDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CardEdges ¶
type CardEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // FinancialAccount holds the value of the financial_account edge. FinancialAccount *FinancialAccount `json:"financial_account,omitempty"` // contains filtered or unexported fields }
CardEdges holds the relations/edges for other nodes in the graph.
func (CardEdges) FinancialAccountOrErr ¶
func (e CardEdges) FinancialAccountOrErr() (*FinancialAccount, error)
FinancialAccountOrErr returns the FinancialAccount value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type CardGroupBy ¶
type CardGroupBy struct {
// contains filtered or unexported fields
}
CardGroupBy is the group-by builder for Card entities.
func (*CardGroupBy) Aggregate ¶
func (cgb *CardGroupBy) Aggregate(fns ...AggregateFunc) *CardGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CardGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Scan ¶
func (cgb *CardGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CardGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CardMutation ¶
type CardMutation struct {
// contains filtered or unexported fields
}
CardMutation represents an operation that mutates the Card nodes in the graph.
func (*CardMutation) AddBalance ¶
func (m *CardMutation) AddBalance(f float64)
AddBalance adds f to the "balance" field.
func (*CardMutation) AddBalanceLimit ¶
func (m *CardMutation) AddBalanceLimit(f float64)
AddBalanceLimit adds f to the "balance_limit" field.
func (*CardMutation) AddField ¶
func (m *CardMutation) 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 (*CardMutation) AddLastDigits ¶
func (m *CardMutation) AddLastDigits(u int16)
AddLastDigits adds u to the "last_digits" field.
func (*CardMutation) AddVersion ¶
func (m *CardMutation) AddVersion(u int32)
AddVersion adds u to the "version" field.
func (*CardMutation) AddedBalance ¶
func (m *CardMutation) AddedBalance() (r float64, exists bool)
AddedBalance returns the value that was added to the "balance" field in this mutation.
func (*CardMutation) AddedBalanceLimit ¶
func (m *CardMutation) AddedBalanceLimit() (r float64, exists bool)
AddedBalanceLimit returns the value that was added to the "balance_limit" field in this mutation.
func (*CardMutation) AddedEdges ¶
func (m *CardMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CardMutation) AddedField ¶
func (m *CardMutation) 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 (*CardMutation) AddedFields ¶
func (m *CardMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CardMutation) AddedIDs ¶
func (m *CardMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CardMutation) AddedLastDigits ¶
func (m *CardMutation) AddedLastDigits() (r int16, exists bool)
AddedLastDigits returns the value that was added to the "last_digits" field in this mutation.
func (*CardMutation) AddedVersion ¶
func (m *CardMutation) AddedVersion() (r int32, exists bool)
AddedVersion returns the value that was added to the "version" field in this mutation.
func (*CardMutation) Balance ¶
func (m *CardMutation) Balance() (r float64, exists bool)
Balance returns the value of the "balance" field in the mutation.
func (*CardMutation) BalanceLimit ¶
func (m *CardMutation) BalanceLimit() (r float64, exists bool)
BalanceLimit returns the value of the "balance_limit" field in the mutation.
func (*CardMutation) BankName ¶
func (m *CardMutation) BankName() (r string, exists bool)
BankName returns the value of the "bank_name" field in the mutation.
func (*CardMutation) BankNameCleared ¶
func (m *CardMutation) BankNameCleared() bool
BankNameCleared returns if the "bank_name" field was cleared in this mutation.
func (*CardMutation) CardType ¶
func (m *CardMutation) CardType() (r string, exists bool)
CardType returns the value of the "card_type" field in the mutation.
func (*CardMutation) ClearBankName ¶
func (m *CardMutation) ClearBankName()
ClearBankName clears the value of the "bank_name" field.
func (*CardMutation) ClearEdge ¶
func (m *CardMutation) 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 (*CardMutation) ClearField ¶
func (m *CardMutation) 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 (*CardMutation) ClearFinancialAccount ¶
func (m *CardMutation) ClearFinancialAccount()
ClearFinancialAccount clears the "financial_account" edge to the FinancialAccount entity.
func (*CardMutation) ClearFinancialAccountID ¶
func (m *CardMutation) ClearFinancialAccountID()
ClearFinancialAccountID clears the value of the "financial_account_id" field.
func (*CardMutation) ClearLastDigits ¶
func (m *CardMutation) ClearLastDigits()
ClearLastDigits clears the value of the "last_digits" field.
func (*CardMutation) ClearUser ¶
func (m *CardMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*CardMutation) ClearedEdges ¶
func (m *CardMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CardMutation) ClearedFields ¶
func (m *CardMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CardMutation) Client ¶
func (m CardMutation) 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 (*CardMutation) CreatedAt ¶
func (m *CardMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CardMutation) CurrencyCode ¶
func (m *CardMutation) CurrencyCode() (r string, exists bool)
CurrencyCode returns the value of the "currency_code" field in the mutation.
func (*CardMutation) DisplayName ¶
func (m *CardMutation) DisplayName() (r string, exists bool)
DisplayName returns the value of the "display_name" field in the mutation.
func (*CardMutation) EdgeCleared ¶
func (m *CardMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CardMutation) Field ¶
func (m *CardMutation) 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 (*CardMutation) FieldCleared ¶
func (m *CardMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CardMutation) Fields ¶
func (m *CardMutation) 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 (*CardMutation) FinancialAccountCleared ¶
func (m *CardMutation) FinancialAccountCleared() bool
FinancialAccountCleared reports if the "financial_account" edge to the FinancialAccount entity was cleared.
func (*CardMutation) FinancialAccountID ¶
func (m *CardMutation) FinancialAccountID() (r string, exists bool)
FinancialAccountID returns the value of the "financial_account_id" field in the mutation.
func (*CardMutation) FinancialAccountIDCleared ¶
func (m *CardMutation) FinancialAccountIDCleared() bool
FinancialAccountIDCleared returns if the "financial_account_id" field was cleared in this mutation.
func (*CardMutation) FinancialAccountIDs ¶
func (m *CardMutation) FinancialAccountIDs() (ids []string)
FinancialAccountIDs returns the "financial_account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FinancialAccountID instead. It exists only for internal usage by the builders.
func (*CardMutation) ID ¶
func (m *CardMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CardMutation) IDs ¶
func (m *CardMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CardMutation) IsActive ¶
func (m *CardMutation) IsActive() (r bool, exists bool)
IsActive returns the value of the "is_active" field in the mutation.
func (*CardMutation) LastDigits ¶
func (m *CardMutation) LastDigits() (r uint16, exists bool)
LastDigits returns the value of the "last_digits" field in the mutation.
func (*CardMutation) LastDigitsCleared ¶
func (m *CardMutation) LastDigitsCleared() bool
LastDigitsCleared returns if the "last_digits" field was cleared in this mutation.
func (*CardMutation) OldBalance ¶
func (m *CardMutation) OldBalance(ctx context.Context) (v float64, err error)
OldBalance returns the old "balance" field's value of the Card entity. If the Card 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 (*CardMutation) OldBalanceLimit ¶
func (m *CardMutation) OldBalanceLimit(ctx context.Context) (v float64, err error)
OldBalanceLimit returns the old "balance_limit" field's value of the Card entity. If the Card 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 (*CardMutation) OldBankName ¶
func (m *CardMutation) OldBankName(ctx context.Context) (v string, err error)
OldBankName returns the old "bank_name" field's value of the Card entity. If the Card 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 (*CardMutation) OldCardType ¶
func (m *CardMutation) OldCardType(ctx context.Context) (v string, err error)
OldCardType returns the old "card_type" field's value of the Card entity. If the Card 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 (*CardMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Card entity. If the Card 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 (*CardMutation) OldCurrencyCode ¶
func (m *CardMutation) OldCurrencyCode(ctx context.Context) (v string, err error)
OldCurrencyCode returns the old "currency_code" field's value of the Card entity. If the Card 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 (*CardMutation) OldDisplayName ¶
func (m *CardMutation) OldDisplayName(ctx context.Context) (v string, err error)
OldDisplayName returns the old "display_name" field's value of the Card entity. If the Card 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 (*CardMutation) 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 (*CardMutation) OldFinancialAccountID ¶
func (m *CardMutation) OldFinancialAccountID(ctx context.Context) (v string, err error)
OldFinancialAccountID returns the old "financial_account_id" field's value of the Card entity. If the Card 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 (*CardMutation) OldIsActive ¶
func (m *CardMutation) OldIsActive(ctx context.Context) (v bool, err error)
OldIsActive returns the old "is_active" field's value of the Card entity. If the Card 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 (*CardMutation) OldLastDigits ¶
func (m *CardMutation) OldLastDigits(ctx context.Context) (v uint16, err error)
OldLastDigits returns the old "last_digits" field's value of the Card entity. If the Card 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 (*CardMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Card entity. If the Card 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 (*CardMutation) OldVersion ¶
func (m *CardMutation) OldVersion(ctx context.Context) (v uint32, err error)
OldVersion returns the old "version" field's value of the Card entity. If the Card 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 (*CardMutation) RemovedEdges ¶
func (m *CardMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CardMutation) RemovedIDs ¶
func (m *CardMutation) 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 (*CardMutation) ResetBalance ¶
func (m *CardMutation) ResetBalance()
ResetBalance resets all changes to the "balance" field.
func (*CardMutation) ResetBalanceLimit ¶
func (m *CardMutation) ResetBalanceLimit()
ResetBalanceLimit resets all changes to the "balance_limit" field.
func (*CardMutation) ResetBankName ¶
func (m *CardMutation) ResetBankName()
ResetBankName resets all changes to the "bank_name" field.
func (*CardMutation) ResetCardType ¶
func (m *CardMutation) ResetCardType()
ResetCardType resets all changes to the "card_type" field.
func (*CardMutation) ResetCreatedAt ¶
func (m *CardMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CardMutation) ResetCurrencyCode ¶
func (m *CardMutation) ResetCurrencyCode()
ResetCurrencyCode resets all changes to the "currency_code" field.
func (*CardMutation) ResetDisplayName ¶
func (m *CardMutation) ResetDisplayName()
ResetDisplayName resets all changes to the "display_name" field.
func (*CardMutation) ResetEdge ¶
func (m *CardMutation) 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 (*CardMutation) ResetField ¶
func (m *CardMutation) 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 (*CardMutation) ResetFinancialAccount ¶
func (m *CardMutation) ResetFinancialAccount()
ResetFinancialAccount resets all changes to the "financial_account" edge.
func (*CardMutation) ResetFinancialAccountID ¶
func (m *CardMutation) ResetFinancialAccountID()
ResetFinancialAccountID resets all changes to the "financial_account_id" field.
func (*CardMutation) ResetIsActive ¶
func (m *CardMutation) ResetIsActive()
ResetIsActive resets all changes to the "is_active" field.
func (*CardMutation) ResetLastDigits ¶
func (m *CardMutation) ResetLastDigits()
ResetLastDigits resets all changes to the "last_digits" field.
func (*CardMutation) ResetUpdatedAt ¶
func (m *CardMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CardMutation) ResetUser ¶
func (m *CardMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*CardMutation) ResetVersion ¶
func (m *CardMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*CardMutation) SetBalance ¶
func (m *CardMutation) SetBalance(f float64)
SetBalance sets the "balance" field.
func (*CardMutation) SetBalanceLimit ¶
func (m *CardMutation) SetBalanceLimit(f float64)
SetBalanceLimit sets the "balance_limit" field.
func (*CardMutation) SetBankName ¶
func (m *CardMutation) SetBankName(s string)
SetBankName sets the "bank_name" field.
func (*CardMutation) SetCardType ¶
func (m *CardMutation) SetCardType(s string)
SetCardType sets the "card_type" field.
func (*CardMutation) SetCreatedAt ¶
func (m *CardMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CardMutation) SetCurrencyCode ¶
func (m *CardMutation) SetCurrencyCode(s string)
SetCurrencyCode sets the "currency_code" field.
func (*CardMutation) SetDisplayName ¶
func (m *CardMutation) SetDisplayName(s string)
SetDisplayName sets the "display_name" field.
func (*CardMutation) SetField ¶
func (m *CardMutation) 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 (*CardMutation) SetFinancialAccountID ¶
func (m *CardMutation) SetFinancialAccountID(s string)
SetFinancialAccountID sets the "financial_account_id" field.
func (*CardMutation) SetID ¶
func (m *CardMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Card entities.
func (*CardMutation) SetIsActive ¶
func (m *CardMutation) SetIsActive(b bool)
SetIsActive sets the "is_active" field.
func (*CardMutation) SetLastDigits ¶
func (m *CardMutation) SetLastDigits(u uint16)
SetLastDigits sets the "last_digits" field.
func (*CardMutation) SetOp ¶
func (m *CardMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CardMutation) SetUpdatedAt ¶
func (m *CardMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CardMutation) SetUserID ¶
func (m *CardMutation) SetUserID(id string)
SetUserID sets the "user" edge to the User entity by id.
func (*CardMutation) SetVersion ¶
func (m *CardMutation) SetVersion(u uint32)
SetVersion sets the "version" field.
func (CardMutation) Tx ¶
func (m CardMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CardMutation) Type ¶
func (m *CardMutation) Type() string
Type returns the node type of this mutation (Card).
func (*CardMutation) UpdatedAt ¶
func (m *CardMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CardMutation) UserCleared ¶
func (m *CardMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*CardMutation) UserID ¶
func (m *CardMutation) UserID() (id string, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*CardMutation) UserIDs ¶
func (m *CardMutation) UserIDs() (ids []string)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*CardMutation) Version ¶
func (m *CardMutation) Version() (r uint32, exists bool)
Version returns the value of the "version" field in the mutation.
func (*CardMutation) Where ¶
func (m *CardMutation) Where(ps ...predicate.Card)
Where appends a list predicates to the CardMutation builder.
func (*CardMutation) WhereP ¶
func (m *CardMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CardMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CardQuery ¶
type CardQuery struct {
// contains filtered or unexported fields
}
CardQuery is the builder for querying Card entities.
func (*CardQuery) Aggregate ¶
func (cq *CardQuery) Aggregate(fns ...AggregateFunc) *CardSelect
Aggregate returns a CardSelect configured with the given aggregations.
func (*CardQuery) Clone ¶
Clone returns a duplicate of the CardQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CardQuery) First ¶
First returns the first Card entity from the query. Returns a *NotFoundError when no Card was found.
func (*CardQuery) FirstID ¶
FirstID returns the first Card ID from the query. Returns a *NotFoundError when no Card ID was found.
func (*CardQuery) GroupBy ¶
func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy
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 { IsActive bool `json:"is_active,omitempty"` Count int `json:"count,omitempty"` } client.Card.Query(). GroupBy(card.FieldIsActive). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CardQuery) Only ¶
Only returns a single Card entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Card entity is found. Returns a *NotFoundError when no Card entities are found.
func (*CardQuery) OnlyID ¶
OnlyID is like Only, but returns the only Card ID in the query. Returns a *NotSingularError when more than one Card ID is found. Returns a *NotFoundError when no entities are found.
func (*CardQuery) QueryFinancialAccount ¶
func (cq *CardQuery) QueryFinancialAccount() *FinancialAccountQuery
QueryFinancialAccount chains the current query on the "financial_account" edge.
func (*CardQuery) Select ¶
func (cq *CardQuery) Select(fields ...string) *CardSelect
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 { IsActive bool `json:"is_active,omitempty"` } client.Card.Query(). Select(card.FieldIsActive). Scan(ctx, &v)
func (*CardQuery) Unique ¶
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 (*CardQuery) WithFinancialAccount ¶
func (cq *CardQuery) WithFinancialAccount(opts ...func(*FinancialAccountQuery)) *CardQuery
WithFinancialAccount tells the query-builder to eager-load the nodes that are connected to the "financial_account" edge. The optional arguments are used to configure the query builder of the edge.
type CardSelect ¶
type CardSelect struct { *CardQuery // contains filtered or unexported fields }
CardSelect is the builder for selecting fields of Card entities.
func (*CardSelect) Aggregate ¶
func (cs *CardSelect) Aggregate(fns ...AggregateFunc) *CardSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CardSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CardSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CardSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CardSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CardSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CardSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CardSelect) Scan ¶
func (cs *CardSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CardSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CardUpdate ¶
type CardUpdate struct {
// contains filtered or unexported fields
}
CardUpdate is the builder for updating Card entities.
func (*CardUpdate) AddBalance ¶
func (cu *CardUpdate) AddBalance(f float64) *CardUpdate
AddBalance adds f to the "balance" field.
func (*CardUpdate) AddBalanceLimit ¶
func (cu *CardUpdate) AddBalanceLimit(f float64) *CardUpdate
AddBalanceLimit adds f to the "balance_limit" field.
func (*CardUpdate) AddLastDigits ¶
func (cu *CardUpdate) AddLastDigits(u int16) *CardUpdate
AddLastDigits adds u to the "last_digits" field.
func (*CardUpdate) AddVersion ¶
func (cu *CardUpdate) AddVersion(u int32) *CardUpdate
AddVersion adds u to the "version" field.
func (*CardUpdate) ClearBankName ¶
func (cu *CardUpdate) ClearBankName() *CardUpdate
ClearBankName clears the value of the "bank_name" field.
func (*CardUpdate) ClearFinancialAccount ¶
func (cu *CardUpdate) ClearFinancialAccount() *CardUpdate
ClearFinancialAccount clears the "financial_account" edge to the FinancialAccount entity.
func (*CardUpdate) ClearFinancialAccountID ¶
func (cu *CardUpdate) ClearFinancialAccountID() *CardUpdate
ClearFinancialAccountID clears the value of the "financial_account_id" field.
func (*CardUpdate) ClearLastDigits ¶
func (cu *CardUpdate) ClearLastDigits() *CardUpdate
ClearLastDigits clears the value of the "last_digits" field.
func (*CardUpdate) Exec ¶
func (cu *CardUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CardUpdate) ExecX ¶
func (cu *CardUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardUpdate) Mutation ¶
func (cu *CardUpdate) Mutation() *CardMutation
Mutation returns the CardMutation object of the builder.
func (*CardUpdate) Save ¶
func (cu *CardUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CardUpdate) SaveX ¶
func (cu *CardUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CardUpdate) SetBalance ¶
func (cu *CardUpdate) SetBalance(f float64) *CardUpdate
SetBalance sets the "balance" field.
func (*CardUpdate) SetBalanceLimit ¶
func (cu *CardUpdate) SetBalanceLimit(f float64) *CardUpdate
SetBalanceLimit sets the "balance_limit" field.
func (*CardUpdate) SetBankName ¶
func (cu *CardUpdate) SetBankName(s string) *CardUpdate
SetBankName sets the "bank_name" field.
func (*CardUpdate) SetCardType ¶
func (cu *CardUpdate) SetCardType(s string) *CardUpdate
SetCardType sets the "card_type" field.
func (*CardUpdate) SetCurrencyCode ¶
func (cu *CardUpdate) SetCurrencyCode(s string) *CardUpdate
SetCurrencyCode sets the "currency_code" field.
func (*CardUpdate) SetDisplayName ¶
func (cu *CardUpdate) SetDisplayName(s string) *CardUpdate
SetDisplayName sets the "display_name" field.
func (*CardUpdate) SetFinancialAccount ¶
func (cu *CardUpdate) SetFinancialAccount(f *FinancialAccount) *CardUpdate
SetFinancialAccount sets the "financial_account" edge to the FinancialAccount entity.
func (*CardUpdate) SetFinancialAccountID ¶
func (cu *CardUpdate) SetFinancialAccountID(s string) *CardUpdate
SetFinancialAccountID sets the "financial_account_id" field.
func (*CardUpdate) SetIsActive ¶
func (cu *CardUpdate) SetIsActive(b bool) *CardUpdate
SetIsActive sets the "is_active" field.
func (*CardUpdate) SetLastDigits ¶
func (cu *CardUpdate) SetLastDigits(u uint16) *CardUpdate
SetLastDigits sets the "last_digits" field.
func (*CardUpdate) SetNillableBankName ¶
func (cu *CardUpdate) SetNillableBankName(s *string) *CardUpdate
SetNillableBankName sets the "bank_name" field if the given value is not nil.
func (*CardUpdate) SetNillableFinancialAccountID ¶
func (cu *CardUpdate) SetNillableFinancialAccountID(s *string) *CardUpdate
SetNillableFinancialAccountID sets the "financial_account_id" field if the given value is not nil.
func (*CardUpdate) SetNillableLastDigits ¶
func (cu *CardUpdate) SetNillableLastDigits(u *uint16) *CardUpdate
SetNillableLastDigits sets the "last_digits" field if the given value is not nil.
func (*CardUpdate) SetUpdatedAt ¶
func (cu *CardUpdate) SetUpdatedAt(t time.Time) *CardUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CardUpdate) SetVersion ¶
func (cu *CardUpdate) SetVersion(u uint32) *CardUpdate
SetVersion sets the "version" field.
func (*CardUpdate) Where ¶
func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate
Where appends a list predicates to the CardUpdate builder.
type CardUpdateOne ¶
type CardUpdateOne struct {
// contains filtered or unexported fields
}
CardUpdateOne is the builder for updating a single Card entity.
func (*CardUpdateOne) AddBalance ¶
func (cuo *CardUpdateOne) AddBalance(f float64) *CardUpdateOne
AddBalance adds f to the "balance" field.
func (*CardUpdateOne) AddBalanceLimit ¶
func (cuo *CardUpdateOne) AddBalanceLimit(f float64) *CardUpdateOne
AddBalanceLimit adds f to the "balance_limit" field.
func (*CardUpdateOne) AddLastDigits ¶
func (cuo *CardUpdateOne) AddLastDigits(u int16) *CardUpdateOne
AddLastDigits adds u to the "last_digits" field.
func (*CardUpdateOne) AddVersion ¶
func (cuo *CardUpdateOne) AddVersion(u int32) *CardUpdateOne
AddVersion adds u to the "version" field.
func (*CardUpdateOne) ClearBankName ¶
func (cuo *CardUpdateOne) ClearBankName() *CardUpdateOne
ClearBankName clears the value of the "bank_name" field.
func (*CardUpdateOne) ClearFinancialAccount ¶
func (cuo *CardUpdateOne) ClearFinancialAccount() *CardUpdateOne
ClearFinancialAccount clears the "financial_account" edge to the FinancialAccount entity.
func (*CardUpdateOne) ClearFinancialAccountID ¶
func (cuo *CardUpdateOne) ClearFinancialAccountID() *CardUpdateOne
ClearFinancialAccountID clears the value of the "financial_account_id" field.
func (*CardUpdateOne) ClearLastDigits ¶
func (cuo *CardUpdateOne) ClearLastDigits() *CardUpdateOne
ClearLastDigits clears the value of the "last_digits" field.
func (*CardUpdateOne) Exec ¶
func (cuo *CardUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CardUpdateOne) ExecX ¶
func (cuo *CardUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardUpdateOne) Mutation ¶
func (cuo *CardUpdateOne) Mutation() *CardMutation
Mutation returns the CardMutation object of the builder.
func (*CardUpdateOne) Save ¶
func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error)
Save executes the query and returns the updated Card entity.
func (*CardUpdateOne) SaveX ¶
func (cuo *CardUpdateOne) SaveX(ctx context.Context) *Card
SaveX is like Save, but panics if an error occurs.
func (*CardUpdateOne) Select ¶
func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CardUpdateOne) SetBalance ¶
func (cuo *CardUpdateOne) SetBalance(f float64) *CardUpdateOne
SetBalance sets the "balance" field.
func (*CardUpdateOne) SetBalanceLimit ¶
func (cuo *CardUpdateOne) SetBalanceLimit(f float64) *CardUpdateOne
SetBalanceLimit sets the "balance_limit" field.
func (*CardUpdateOne) SetBankName ¶
func (cuo *CardUpdateOne) SetBankName(s string) *CardUpdateOne
SetBankName sets the "bank_name" field.
func (*CardUpdateOne) SetCardType ¶
func (cuo *CardUpdateOne) SetCardType(s string) *CardUpdateOne
SetCardType sets the "card_type" field.
func (*CardUpdateOne) SetCurrencyCode ¶
func (cuo *CardUpdateOne) SetCurrencyCode(s string) *CardUpdateOne
SetCurrencyCode sets the "currency_code" field.
func (*CardUpdateOne) SetDisplayName ¶
func (cuo *CardUpdateOne) SetDisplayName(s string) *CardUpdateOne
SetDisplayName sets the "display_name" field.
func (*CardUpdateOne) SetFinancialAccount ¶
func (cuo *CardUpdateOne) SetFinancialAccount(f *FinancialAccount) *CardUpdateOne
SetFinancialAccount sets the "financial_account" edge to the FinancialAccount entity.
func (*CardUpdateOne) SetFinancialAccountID ¶
func (cuo *CardUpdateOne) SetFinancialAccountID(s string) *CardUpdateOne
SetFinancialAccountID sets the "financial_account_id" field.
func (*CardUpdateOne) SetIsActive ¶
func (cuo *CardUpdateOne) SetIsActive(b bool) *CardUpdateOne
SetIsActive sets the "is_active" field.
func (*CardUpdateOne) SetLastDigits ¶
func (cuo *CardUpdateOne) SetLastDigits(u uint16) *CardUpdateOne
SetLastDigits sets the "last_digits" field.
func (*CardUpdateOne) SetNillableBankName ¶
func (cuo *CardUpdateOne) SetNillableBankName(s *string) *CardUpdateOne
SetNillableBankName sets the "bank_name" field if the given value is not nil.
func (*CardUpdateOne) SetNillableFinancialAccountID ¶
func (cuo *CardUpdateOne) SetNillableFinancialAccountID(s *string) *CardUpdateOne
SetNillableFinancialAccountID sets the "financial_account_id" field if the given value is not nil.
func (*CardUpdateOne) SetNillableLastDigits ¶
func (cuo *CardUpdateOne) SetNillableLastDigits(u *uint16) *CardUpdateOne
SetNillableLastDigits sets the "last_digits" field if the given value is not nil.
func (*CardUpdateOne) SetUpdatedAt ¶
func (cuo *CardUpdateOne) SetUpdatedAt(t time.Time) *CardUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CardUpdateOne) SetVersion ¶
func (cuo *CardUpdateOne) SetVersion(u uint32) *CardUpdateOne
SetVersion sets the "version" field.
type CardUpsert ¶
CardUpsert is the "OnConflict" setter.
func (*CardUpsert) AddBalance ¶
func (u *CardUpsert) AddBalance(v float64) *CardUpsert
AddBalance adds v to the "balance" field.
func (*CardUpsert) AddBalanceLimit ¶
func (u *CardUpsert) AddBalanceLimit(v float64) *CardUpsert
AddBalanceLimit adds v to the "balance_limit" field.
func (*CardUpsert) AddLastDigits ¶
func (u *CardUpsert) AddLastDigits(v uint16) *CardUpsert
AddLastDigits adds v to the "last_digits" field.
func (*CardUpsert) AddVersion ¶
func (u *CardUpsert) AddVersion(v uint32) *CardUpsert
AddVersion adds v to the "version" field.
func (*CardUpsert) ClearBankName ¶
func (u *CardUpsert) ClearBankName() *CardUpsert
ClearBankName clears the value of the "bank_name" field.
func (*CardUpsert) ClearFinancialAccountID ¶
func (u *CardUpsert) ClearFinancialAccountID() *CardUpsert
ClearFinancialAccountID clears the value of the "financial_account_id" field.
func (*CardUpsert) ClearLastDigits ¶
func (u *CardUpsert) ClearLastDigits() *CardUpsert
ClearLastDigits clears the value of the "last_digits" field.
func (*CardUpsert) SetBalance ¶
func (u *CardUpsert) SetBalance(v float64) *CardUpsert
SetBalance sets the "balance" field.
func (*CardUpsert) SetBalanceLimit ¶
func (u *CardUpsert) SetBalanceLimit(v float64) *CardUpsert
SetBalanceLimit sets the "balance_limit" field.
func (*CardUpsert) SetBankName ¶
func (u *CardUpsert) SetBankName(v string) *CardUpsert
SetBankName sets the "bank_name" field.
func (*CardUpsert) SetCardType ¶
func (u *CardUpsert) SetCardType(v string) *CardUpsert
SetCardType sets the "card_type" field.
func (*CardUpsert) SetCurrencyCode ¶
func (u *CardUpsert) SetCurrencyCode(v string) *CardUpsert
SetCurrencyCode sets the "currency_code" field.
func (*CardUpsert) SetDisplayName ¶
func (u *CardUpsert) SetDisplayName(v string) *CardUpsert
SetDisplayName sets the "display_name" field.
func (*CardUpsert) SetFinancialAccountID ¶
func (u *CardUpsert) SetFinancialAccountID(v string) *CardUpsert
SetFinancialAccountID sets the "financial_account_id" field.
func (*CardUpsert) SetIsActive ¶
func (u *CardUpsert) SetIsActive(v bool) *CardUpsert
SetIsActive sets the "is_active" field.
func (*CardUpsert) SetLastDigits ¶
func (u *CardUpsert) SetLastDigits(v uint16) *CardUpsert
SetLastDigits sets the "last_digits" field.
func (*CardUpsert) SetUpdatedAt ¶
func (u *CardUpsert) SetUpdatedAt(v time.Time) *CardUpsert
SetUpdatedAt sets the "updated_at" field.
func (*CardUpsert) SetVersion ¶
func (u *CardUpsert) SetVersion(v uint32) *CardUpsert
SetVersion sets the "version" field.
func (*CardUpsert) UpdateBalance ¶
func (u *CardUpsert) UpdateBalance() *CardUpsert
UpdateBalance sets the "balance" field to the value that was provided on create.
func (*CardUpsert) UpdateBalanceLimit ¶
func (u *CardUpsert) UpdateBalanceLimit() *CardUpsert
UpdateBalanceLimit sets the "balance_limit" field to the value that was provided on create.
func (*CardUpsert) UpdateBankName ¶
func (u *CardUpsert) UpdateBankName() *CardUpsert
UpdateBankName sets the "bank_name" field to the value that was provided on create.
func (*CardUpsert) UpdateCardType ¶
func (u *CardUpsert) UpdateCardType() *CardUpsert
UpdateCardType sets the "card_type" field to the value that was provided on create.
func (*CardUpsert) UpdateCurrencyCode ¶
func (u *CardUpsert) UpdateCurrencyCode() *CardUpsert
UpdateCurrencyCode sets the "currency_code" field to the value that was provided on create.
func (*CardUpsert) UpdateDisplayName ¶
func (u *CardUpsert) UpdateDisplayName() *CardUpsert
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*CardUpsert) UpdateFinancialAccountID ¶
func (u *CardUpsert) UpdateFinancialAccountID() *CardUpsert
UpdateFinancialAccountID sets the "financial_account_id" field to the value that was provided on create.
func (*CardUpsert) UpdateIsActive ¶
func (u *CardUpsert) UpdateIsActive() *CardUpsert
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*CardUpsert) UpdateLastDigits ¶
func (u *CardUpsert) UpdateLastDigits() *CardUpsert
UpdateLastDigits sets the "last_digits" field to the value that was provided on create.
func (*CardUpsert) UpdateUpdatedAt ¶
func (u *CardUpsert) UpdateUpdatedAt() *CardUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*CardUpsert) UpdateVersion ¶
func (u *CardUpsert) UpdateVersion() *CardUpsert
UpdateVersion sets the "version" field to the value that was provided on create.
type CardUpsertBulk ¶
type CardUpsertBulk struct {
// contains filtered or unexported fields
}
CardUpsertBulk is the builder for "upsert"-ing a bulk of Card nodes.
func (*CardUpsertBulk) AddBalance ¶
func (u *CardUpsertBulk) AddBalance(v float64) *CardUpsertBulk
AddBalance adds v to the "balance" field.
func (*CardUpsertBulk) AddBalanceLimit ¶
func (u *CardUpsertBulk) AddBalanceLimit(v float64) *CardUpsertBulk
AddBalanceLimit adds v to the "balance_limit" field.
func (*CardUpsertBulk) AddLastDigits ¶
func (u *CardUpsertBulk) AddLastDigits(v uint16) *CardUpsertBulk
AddLastDigits adds v to the "last_digits" field.
func (*CardUpsertBulk) AddVersion ¶
func (u *CardUpsertBulk) AddVersion(v uint32) *CardUpsertBulk
AddVersion adds v to the "version" field.
func (*CardUpsertBulk) ClearBankName ¶
func (u *CardUpsertBulk) ClearBankName() *CardUpsertBulk
ClearBankName clears the value of the "bank_name" field.
func (*CardUpsertBulk) ClearFinancialAccountID ¶
func (u *CardUpsertBulk) ClearFinancialAccountID() *CardUpsertBulk
ClearFinancialAccountID clears the value of the "financial_account_id" field.
func (*CardUpsertBulk) ClearLastDigits ¶
func (u *CardUpsertBulk) ClearLastDigits() *CardUpsertBulk
ClearLastDigits clears the value of the "last_digits" field.
func (*CardUpsertBulk) DoNothing ¶
func (u *CardUpsertBulk) DoNothing() *CardUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CardUpsertBulk) Exec ¶
func (u *CardUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CardUpsertBulk) ExecX ¶
func (u *CardUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardUpsertBulk) Ignore ¶
func (u *CardUpsertBulk) Ignore() *CardUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Card.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CardUpsertBulk) SetBalance ¶
func (u *CardUpsertBulk) SetBalance(v float64) *CardUpsertBulk
SetBalance sets the "balance" field.
func (*CardUpsertBulk) SetBalanceLimit ¶
func (u *CardUpsertBulk) SetBalanceLimit(v float64) *CardUpsertBulk
SetBalanceLimit sets the "balance_limit" field.
func (*CardUpsertBulk) SetBankName ¶
func (u *CardUpsertBulk) SetBankName(v string) *CardUpsertBulk
SetBankName sets the "bank_name" field.
func (*CardUpsertBulk) SetCardType ¶
func (u *CardUpsertBulk) SetCardType(v string) *CardUpsertBulk
SetCardType sets the "card_type" field.
func (*CardUpsertBulk) SetCurrencyCode ¶
func (u *CardUpsertBulk) SetCurrencyCode(v string) *CardUpsertBulk
SetCurrencyCode sets the "currency_code" field.
func (*CardUpsertBulk) SetDisplayName ¶
func (u *CardUpsertBulk) SetDisplayName(v string) *CardUpsertBulk
SetDisplayName sets the "display_name" field.
func (*CardUpsertBulk) SetFinancialAccountID ¶
func (u *CardUpsertBulk) SetFinancialAccountID(v string) *CardUpsertBulk
SetFinancialAccountID sets the "financial_account_id" field.
func (*CardUpsertBulk) SetIsActive ¶
func (u *CardUpsertBulk) SetIsActive(v bool) *CardUpsertBulk
SetIsActive sets the "is_active" field.
func (*CardUpsertBulk) SetLastDigits ¶
func (u *CardUpsertBulk) SetLastDigits(v uint16) *CardUpsertBulk
SetLastDigits sets the "last_digits" field.
func (*CardUpsertBulk) SetUpdatedAt ¶
func (u *CardUpsertBulk) SetUpdatedAt(v time.Time) *CardUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*CardUpsertBulk) SetVersion ¶
func (u *CardUpsertBulk) SetVersion(v uint32) *CardUpsertBulk
SetVersion sets the "version" field.
func (*CardUpsertBulk) Update ¶
func (u *CardUpsertBulk) Update(set func(*CardUpsert)) *CardUpsertBulk
Update allows overriding fields `UPDATE` values. See the CardCreateBulk.OnConflict documentation for more info.
func (*CardUpsertBulk) UpdateBalance ¶
func (u *CardUpsertBulk) UpdateBalance() *CardUpsertBulk
UpdateBalance sets the "balance" field to the value that was provided on create.
func (*CardUpsertBulk) UpdateBalanceLimit ¶
func (u *CardUpsertBulk) UpdateBalanceLimit() *CardUpsertBulk
UpdateBalanceLimit sets the "balance_limit" field to the value that was provided on create.
func (*CardUpsertBulk) UpdateBankName ¶
func (u *CardUpsertBulk) UpdateBankName() *CardUpsertBulk
UpdateBankName sets the "bank_name" field to the value that was provided on create.
func (*CardUpsertBulk) UpdateCardType ¶
func (u *CardUpsertBulk) UpdateCardType() *CardUpsertBulk
UpdateCardType sets the "card_type" field to the value that was provided on create.
func (*CardUpsertBulk) UpdateCurrencyCode ¶
func (u *CardUpsertBulk) UpdateCurrencyCode() *CardUpsertBulk
UpdateCurrencyCode sets the "currency_code" field to the value that was provided on create.
func (*CardUpsertBulk) UpdateDisplayName ¶
func (u *CardUpsertBulk) UpdateDisplayName() *CardUpsertBulk
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*CardUpsertBulk) UpdateFinancialAccountID ¶
func (u *CardUpsertBulk) UpdateFinancialAccountID() *CardUpsertBulk
UpdateFinancialAccountID sets the "financial_account_id" field to the value that was provided on create.
func (*CardUpsertBulk) UpdateIsActive ¶
func (u *CardUpsertBulk) UpdateIsActive() *CardUpsertBulk
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*CardUpsertBulk) UpdateLastDigits ¶
func (u *CardUpsertBulk) UpdateLastDigits() *CardUpsertBulk
UpdateLastDigits sets the "last_digits" field to the value that was provided on create.
func (*CardUpsertBulk) UpdateNewValues ¶
func (u *CardUpsertBulk) UpdateNewValues() *CardUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Card.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(card.FieldID) }), ). Exec(ctx)
func (*CardUpsertBulk) UpdateUpdatedAt ¶
func (u *CardUpsertBulk) UpdateUpdatedAt() *CardUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*CardUpsertBulk) UpdateVersion ¶
func (u *CardUpsertBulk) UpdateVersion() *CardUpsertBulk
UpdateVersion sets the "version" field to the value that was provided on create.
type CardUpsertOne ¶
type CardUpsertOne struct {
// contains filtered or unexported fields
}
CardUpsertOne is the builder for "upsert"-ing
one Card node.
func (*CardUpsertOne) AddBalance ¶
func (u *CardUpsertOne) AddBalance(v float64) *CardUpsertOne
AddBalance adds v to the "balance" field.
func (*CardUpsertOne) AddBalanceLimit ¶
func (u *CardUpsertOne) AddBalanceLimit(v float64) *CardUpsertOne
AddBalanceLimit adds v to the "balance_limit" field.
func (*CardUpsertOne) AddLastDigits ¶
func (u *CardUpsertOne) AddLastDigits(v uint16) *CardUpsertOne
AddLastDigits adds v to the "last_digits" field.
func (*CardUpsertOne) AddVersion ¶
func (u *CardUpsertOne) AddVersion(v uint32) *CardUpsertOne
AddVersion adds v to the "version" field.
func (*CardUpsertOne) ClearBankName ¶
func (u *CardUpsertOne) ClearBankName() *CardUpsertOne
ClearBankName clears the value of the "bank_name" field.
func (*CardUpsertOne) ClearFinancialAccountID ¶
func (u *CardUpsertOne) ClearFinancialAccountID() *CardUpsertOne
ClearFinancialAccountID clears the value of the "financial_account_id" field.
func (*CardUpsertOne) ClearLastDigits ¶
func (u *CardUpsertOne) ClearLastDigits() *CardUpsertOne
ClearLastDigits clears the value of the "last_digits" field.
func (*CardUpsertOne) DoNothing ¶
func (u *CardUpsertOne) DoNothing() *CardUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CardUpsertOne) Exec ¶
func (u *CardUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*CardUpsertOne) ExecX ¶
func (u *CardUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardUpsertOne) ID ¶
func (u *CardUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*CardUpsertOne) IDX ¶
func (u *CardUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*CardUpsertOne) Ignore ¶
func (u *CardUpsertOne) Ignore() *CardUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Card.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CardUpsertOne) SetBalance ¶
func (u *CardUpsertOne) SetBalance(v float64) *CardUpsertOne
SetBalance sets the "balance" field.
func (*CardUpsertOne) SetBalanceLimit ¶
func (u *CardUpsertOne) SetBalanceLimit(v float64) *CardUpsertOne
SetBalanceLimit sets the "balance_limit" field.
func (*CardUpsertOne) SetBankName ¶
func (u *CardUpsertOne) SetBankName(v string) *CardUpsertOne
SetBankName sets the "bank_name" field.
func (*CardUpsertOne) SetCardType ¶
func (u *CardUpsertOne) SetCardType(v string) *CardUpsertOne
SetCardType sets the "card_type" field.
func (*CardUpsertOne) SetCurrencyCode ¶
func (u *CardUpsertOne) SetCurrencyCode(v string) *CardUpsertOne
SetCurrencyCode sets the "currency_code" field.
func (*CardUpsertOne) SetDisplayName ¶
func (u *CardUpsertOne) SetDisplayName(v string) *CardUpsertOne
SetDisplayName sets the "display_name" field.
func (*CardUpsertOne) SetFinancialAccountID ¶
func (u *CardUpsertOne) SetFinancialAccountID(v string) *CardUpsertOne
SetFinancialAccountID sets the "financial_account_id" field.
func (*CardUpsertOne) SetIsActive ¶
func (u *CardUpsertOne) SetIsActive(v bool) *CardUpsertOne
SetIsActive sets the "is_active" field.
func (*CardUpsertOne) SetLastDigits ¶
func (u *CardUpsertOne) SetLastDigits(v uint16) *CardUpsertOne
SetLastDigits sets the "last_digits" field.
func (*CardUpsertOne) SetUpdatedAt ¶
func (u *CardUpsertOne) SetUpdatedAt(v time.Time) *CardUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*CardUpsertOne) SetVersion ¶
func (u *CardUpsertOne) SetVersion(v uint32) *CardUpsertOne
SetVersion sets the "version" field.
func (*CardUpsertOne) Update ¶
func (u *CardUpsertOne) Update(set func(*CardUpsert)) *CardUpsertOne
Update allows overriding fields `UPDATE` values. See the CardCreate.OnConflict documentation for more info.
func (*CardUpsertOne) UpdateBalance ¶
func (u *CardUpsertOne) UpdateBalance() *CardUpsertOne
UpdateBalance sets the "balance" field to the value that was provided on create.
func (*CardUpsertOne) UpdateBalanceLimit ¶
func (u *CardUpsertOne) UpdateBalanceLimit() *CardUpsertOne
UpdateBalanceLimit sets the "balance_limit" field to the value that was provided on create.
func (*CardUpsertOne) UpdateBankName ¶
func (u *CardUpsertOne) UpdateBankName() *CardUpsertOne
UpdateBankName sets the "bank_name" field to the value that was provided on create.
func (*CardUpsertOne) UpdateCardType ¶
func (u *CardUpsertOne) UpdateCardType() *CardUpsertOne
UpdateCardType sets the "card_type" field to the value that was provided on create.
func (*CardUpsertOne) UpdateCurrencyCode ¶
func (u *CardUpsertOne) UpdateCurrencyCode() *CardUpsertOne
UpdateCurrencyCode sets the "currency_code" field to the value that was provided on create.
func (*CardUpsertOne) UpdateDisplayName ¶
func (u *CardUpsertOne) UpdateDisplayName() *CardUpsertOne
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*CardUpsertOne) UpdateFinancialAccountID ¶
func (u *CardUpsertOne) UpdateFinancialAccountID() *CardUpsertOne
UpdateFinancialAccountID sets the "financial_account_id" field to the value that was provided on create.
func (*CardUpsertOne) UpdateIsActive ¶
func (u *CardUpsertOne) UpdateIsActive() *CardUpsertOne
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*CardUpsertOne) UpdateLastDigits ¶
func (u *CardUpsertOne) UpdateLastDigits() *CardUpsertOne
UpdateLastDigits sets the "last_digits" field to the value that was provided on create.
func (*CardUpsertOne) UpdateNewValues ¶
func (u *CardUpsertOne) UpdateNewValues() *CardUpsertOne
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.Card.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(card.FieldID) }), ). Exec(ctx)
func (*CardUpsertOne) UpdateUpdatedAt ¶
func (u *CardUpsertOne) UpdateUpdatedAt() *CardUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*CardUpsertOne) UpdateVersion ¶
func (u *CardUpsertOne) UpdateVersion() *CardUpsertOne
UpdateVersion sets the "version" field to the value that was provided on create.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Card is the client for interacting with the Card builders. Card *CardClient // Contact is the client for interacting with the Contact builders. Contact *ContactClient // FinancialAccount is the client for interacting with the FinancialAccount builders. FinancialAccount *FinancialAccountClient // User is the client for interacting with the User builders. User *UserClient // 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(). Card. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Contact ¶
type Contact struct { // ID of the ent. ID string `json:"id,omitempty"` // IsActive holds the value of the "is_active" field. IsActive bool `json:"is_active,omitempty"` // Version holds the value of the "version" field. Version uint32 `json:"version,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DisplayName holds the value of the "display_name" field. DisplayName string `json:"display_name,omitempty"` // LinkedToUser holds the value of the "linked_to_user" field. LinkedToUser string `json:"linked_to_user,omitempty"` // ImageURL holds the value of the "image_url" field. ImageURL string `json:"image_url,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) QueryLinkedTo ¶
QueryLinkedTo queries the "linked_to" edge of the Contact entity.
func (*Contact) QueryOwner ¶
QueryOwner queries the "owner" edge of the Contact entity.
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 (c *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(co *Contact) *ContactDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ContactClient) DeleteOneID ¶
func (c *ContactClient) DeleteOneID(id string) *ContactDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ContactClient) GetX ¶
func (c *ContactClient) GetX(ctx context.Context, id string) *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)
Use 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) Query ¶
func (c *ContactClient) Query() *ContactQuery
Query returns a query builder for Contact.
func (*ContactClient) QueryLinkedTo ¶
func (c *ContactClient) QueryLinkedTo(co *Contact) *UserQuery
QueryLinkedTo queries the linked_to edge of a Contact.
func (*ContactClient) QueryOwner ¶
func (c *ContactClient) QueryOwner(co *Contact) *UserQuery
QueryOwner queries the owner edge of a Contact.
func (*ContactClient) Update ¶
func (c *ContactClient) Update() *ContactUpdate
Update returns an update builder for Contact.
func (*ContactClient) UpdateOne ¶
func (c *ContactClient) UpdateOne(co *Contact) *ContactUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ContactClient) UpdateOneID ¶
func (c *ContactClient) UpdateOneID(id string) *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 (cc *ContactCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactCreate) ExecX ¶
func (cc *ContactCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactCreate) Mutation ¶
func (cc *ContactCreate) Mutation() *ContactMutation
Mutation returns the ContactMutation object of the builder.
func (*ContactCreate) OnConflict ¶
func (cc *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(). SetIsActive(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) { SetIsActive(v+v). }). Exec(ctx)
func (*ContactCreate) OnConflictColumns ¶
func (cc *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) Save ¶
func (cc *ContactCreate) Save(ctx context.Context) (*Contact, error)
Save creates the Contact in the database.
func (*ContactCreate) SaveX ¶
func (cc *ContactCreate) SaveX(ctx context.Context) *Contact
SaveX calls Save and panics if Save returns an error.
func (*ContactCreate) SetCreatedAt ¶
func (cc *ContactCreate) SetCreatedAt(t time.Time) *ContactCreate
SetCreatedAt sets the "created_at" field.
func (*ContactCreate) SetDisplayName ¶
func (cc *ContactCreate) SetDisplayName(s string) *ContactCreate
SetDisplayName sets the "display_name" field.
func (*ContactCreate) SetID ¶
func (cc *ContactCreate) SetID(s string) *ContactCreate
SetID sets the "id" field.
func (*ContactCreate) SetImageURL ¶
func (cc *ContactCreate) SetImageURL(s string) *ContactCreate
SetImageURL sets the "image_url" field.
func (*ContactCreate) SetIsActive ¶
func (cc *ContactCreate) SetIsActive(b bool) *ContactCreate
SetIsActive sets the "is_active" field.
func (*ContactCreate) SetLinkedTo ¶
func (cc *ContactCreate) SetLinkedTo(u *User) *ContactCreate
SetLinkedTo sets the "linked_to" edge to the User entity.
func (*ContactCreate) SetLinkedToID ¶
func (cc *ContactCreate) SetLinkedToID(id string) *ContactCreate
SetLinkedToID sets the "linked_to" edge to the User entity by ID.
func (*ContactCreate) SetLinkedToUser ¶
func (cc *ContactCreate) SetLinkedToUser(s string) *ContactCreate
SetLinkedToUser sets the "linked_to_user" field.
func (*ContactCreate) SetNillableImageURL ¶
func (cc *ContactCreate) SetNillableImageURL(s *string) *ContactCreate
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (*ContactCreate) SetNillableLinkedToID ¶
func (cc *ContactCreate) SetNillableLinkedToID(id *string) *ContactCreate
SetNillableLinkedToID sets the "linked_to" edge to the User entity by ID if the given value is not nil.
func (*ContactCreate) SetNillableLinkedToUser ¶
func (cc *ContactCreate) SetNillableLinkedToUser(s *string) *ContactCreate
SetNillableLinkedToUser sets the "linked_to_user" field if the given value is not nil.
func (*ContactCreate) SetOwner ¶
func (cc *ContactCreate) SetOwner(u *User) *ContactCreate
SetOwner sets the "owner" edge to the User entity.
func (*ContactCreate) SetOwnerID ¶
func (cc *ContactCreate) SetOwnerID(id string) *ContactCreate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*ContactCreate) SetUpdatedAt ¶
func (cc *ContactCreate) SetUpdatedAt(t time.Time) *ContactCreate
SetUpdatedAt sets the "updated_at" field.
func (*ContactCreate) SetVersion ¶
func (cc *ContactCreate) SetVersion(u uint32) *ContactCreate
SetVersion sets the "version" 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 (ccb *ContactCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactCreateBulk) ExecX ¶
func (ccb *ContactCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactCreateBulk) OnConflict ¶
func (ccb *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) { SetIsActive(v+v). }). Exec(ctx)
func (*ContactCreateBulk) OnConflictColumns ¶
func (ccb *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)
type ContactDelete ¶
type ContactDelete struct {
// contains filtered or unexported fields
}
ContactDelete is the builder for deleting a Contact entity.
func (*ContactDelete) Exec ¶
func (cd *ContactDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ContactDelete) ExecX ¶
func (cd *ContactDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ContactDelete) Where ¶
func (cd *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 (cdo *ContactDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ContactDeleteOne) ExecX ¶
func (cdo *ContactDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ContactEdges ¶
type ContactEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // LinkedTo holds the value of the linked_to edge. LinkedTo *User `json:"linked_to,omitempty"` // contains filtered or unexported fields }
ContactEdges holds the relations/edges for other nodes in the graph.
func (ContactEdges) LinkedToOrErr ¶
func (e ContactEdges) LinkedToOrErr() (*User, error)
LinkedToOrErr returns the LinkedTo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ContactEdges) OwnerOrErr ¶
func (e ContactEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner 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 (cgb *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 (cgb *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) 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) AddVersion ¶
func (m *ContactMutation) AddVersion(u int32)
AddVersion adds u to the "version" 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) AddedVersion ¶
func (m *ContactMutation) AddedVersion() (r int32, exists bool)
AddedVersion returns the value that was added to the "version" field in this mutation.
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) ClearImageURL ¶
func (m *ContactMutation) ClearImageURL()
ClearImageURL clears the value of the "image_url" field.
func (*ContactMutation) ClearLinkedTo ¶
func (m *ContactMutation) ClearLinkedTo()
ClearLinkedTo clears the "linked_to" edge to the User entity.
func (*ContactMutation) ClearLinkedToUser ¶
func (m *ContactMutation) ClearLinkedToUser()
ClearLinkedToUser clears the value of the "linked_to_user" field.
func (*ContactMutation) ClearOwner ¶
func (m *ContactMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
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) CreatedAt ¶
func (m *ContactMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ContactMutation) DisplayName ¶
func (m *ContactMutation) DisplayName() (r string, exists bool)
DisplayName returns the value of the "display_name" field in the mutation.
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) 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 string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ContactMutation) IDs ¶
func (m *ContactMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ContactMutation) ImageURL ¶
func (m *ContactMutation) ImageURL() (r string, exists bool)
ImageURL returns the value of the "image_url" field in the mutation.
func (*ContactMutation) ImageURLCleared ¶
func (m *ContactMutation) ImageURLCleared() bool
ImageURLCleared returns if the "image_url" field was cleared in this mutation.
func (*ContactMutation) IsActive ¶
func (m *ContactMutation) IsActive() (r bool, exists bool)
IsActive returns the value of the "is_active" field in the mutation.
func (*ContactMutation) LinkedToCleared ¶
func (m *ContactMutation) LinkedToCleared() bool
LinkedToCleared reports if the "linked_to" edge to the User entity was cleared.
func (*ContactMutation) LinkedToID ¶
func (m *ContactMutation) LinkedToID() (id string, exists bool)
LinkedToID returns the "linked_to" edge ID in the mutation.
func (*ContactMutation) LinkedToIDs ¶
func (m *ContactMutation) LinkedToIDs() (ids []string)
LinkedToIDs returns the "linked_to" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use LinkedToID instead. It exists only for internal usage by the builders.
func (*ContactMutation) LinkedToUser ¶
func (m *ContactMutation) LinkedToUser() (r string, exists bool)
LinkedToUser returns the value of the "linked_to_user" field in the mutation.
func (*ContactMutation) LinkedToUserCleared ¶
func (m *ContactMutation) LinkedToUserCleared() bool
LinkedToUserCleared returns if the "linked_to_user" field was cleared in this mutation.
func (*ContactMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" 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) OldDisplayName ¶
func (m *ContactMutation) OldDisplayName(ctx context.Context) (v string, err error)
OldDisplayName returns the old "display_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) 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) OldImageURL ¶
func (m *ContactMutation) OldImageURL(ctx context.Context) (v string, err error)
OldImageURL returns the old "image_url" 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) OldIsActive ¶
func (m *ContactMutation) OldIsActive(ctx context.Context) (v bool, err error)
OldIsActive returns the old "is_active" 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) OldLinkedToUser ¶
func (m *ContactMutation) OldLinkedToUser(ctx context.Context) (v string, err error)
OldLinkedToUser returns the old "linked_to_user" 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) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" 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) OldVersion ¶
func (m *ContactMutation) OldVersion(ctx context.Context) (v uint32, err error)
OldVersion returns the old "version" 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) OwnerCleared ¶
func (m *ContactMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*ContactMutation) OwnerID ¶
func (m *ContactMutation) OwnerID() (id string, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*ContactMutation) OwnerIDs ¶
func (m *ContactMutation) OwnerIDs() (ids []string)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
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) ResetCreatedAt ¶
func (m *ContactMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ContactMutation) ResetDisplayName ¶
func (m *ContactMutation) ResetDisplayName()
ResetDisplayName resets all changes to the "display_name" field.
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) 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) ResetImageURL ¶
func (m *ContactMutation) ResetImageURL()
ResetImageURL resets all changes to the "image_url" field.
func (*ContactMutation) ResetIsActive ¶
func (m *ContactMutation) ResetIsActive()
ResetIsActive resets all changes to the "is_active" field.
func (*ContactMutation) ResetLinkedTo ¶
func (m *ContactMutation) ResetLinkedTo()
ResetLinkedTo resets all changes to the "linked_to" edge.
func (*ContactMutation) ResetLinkedToUser ¶
func (m *ContactMutation) ResetLinkedToUser()
ResetLinkedToUser resets all changes to the "linked_to_user" field.
func (*ContactMutation) ResetOwner ¶
func (m *ContactMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*ContactMutation) ResetUpdatedAt ¶
func (m *ContactMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ContactMutation) ResetVersion ¶
func (m *ContactMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*ContactMutation) SetCreatedAt ¶
func (m *ContactMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ContactMutation) SetDisplayName ¶
func (m *ContactMutation) SetDisplayName(s string)
SetDisplayName sets the "display_name" 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) SetID ¶
func (m *ContactMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Contact entities.
func (*ContactMutation) SetImageURL ¶
func (m *ContactMutation) SetImageURL(s string)
SetImageURL sets the "image_url" field.
func (*ContactMutation) SetIsActive ¶
func (m *ContactMutation) SetIsActive(b bool)
SetIsActive sets the "is_active" field.
func (*ContactMutation) SetLinkedToID ¶
func (m *ContactMutation) SetLinkedToID(id string)
SetLinkedToID sets the "linked_to" edge to the User entity by id.
func (*ContactMutation) SetLinkedToUser ¶
func (m *ContactMutation) SetLinkedToUser(s string)
SetLinkedToUser sets the "linked_to_user" field.
func (*ContactMutation) SetOp ¶
func (m *ContactMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ContactMutation) SetOwnerID ¶
func (m *ContactMutation) SetOwnerID(id string)
SetOwnerID sets the "owner" edge to the User entity by id.
func (*ContactMutation) SetUpdatedAt ¶
func (m *ContactMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ContactMutation) SetVersion ¶
func (m *ContactMutation) SetVersion(u uint32)
SetVersion sets the "version" field.
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) UpdatedAt ¶
func (m *ContactMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ContactMutation) Version ¶
func (m *ContactMutation) Version() (r uint32, exists bool)
Version returns the value of the "version" 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 (cq *ContactQuery) Aggregate(fns ...AggregateFunc) *ContactSelect
Aggregate returns a ContactSelect configured with the given aggregations.
func (*ContactQuery) All ¶
func (cq *ContactQuery) All(ctx context.Context) ([]*Contact, error)
All executes the query and returns a list of Contacts.
func (*ContactQuery) AllX ¶
func (cq *ContactQuery) AllX(ctx context.Context) []*Contact
AllX is like All, but panics if an error occurs.
func (*ContactQuery) Clone ¶
func (cq *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 (cq *ContactQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ContactQuery) CountX ¶
func (cq *ContactQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ContactQuery) Exist ¶
func (cq *ContactQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ContactQuery) ExistX ¶
func (cq *ContactQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ContactQuery) First ¶
func (cq *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 (cq *ContactQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Contact ID from the query. Returns a *NotFoundError when no Contact ID was found.
func (*ContactQuery) FirstIDX ¶
func (cq *ContactQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*ContactQuery) FirstX ¶
func (cq *ContactQuery) FirstX(ctx context.Context) *Contact
FirstX is like First, but panics if an error occurs.
func (*ContactQuery) GroupBy ¶
func (cq *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 { IsActive bool `json:"is_active,omitempty"` Count int `json:"count,omitempty"` } client.Contact.Query(). GroupBy(contact.FieldIsActive). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ContactQuery) IDs ¶
func (cq *ContactQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of Contact IDs.
func (*ContactQuery) IDsX ¶
func (cq *ContactQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*ContactQuery) Limit ¶
func (cq *ContactQuery) Limit(limit int) *ContactQuery
Limit the number of records to be returned by this query.
func (*ContactQuery) Offset ¶
func (cq *ContactQuery) Offset(offset int) *ContactQuery
Offset to start from.
func (*ContactQuery) Only ¶
func (cq *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 (cq *ContactQuery) OnlyID(ctx context.Context) (id string, 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 (cq *ContactQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ContactQuery) OnlyX ¶
func (cq *ContactQuery) OnlyX(ctx context.Context) *Contact
OnlyX is like Only, but panics if an error occurs.
func (*ContactQuery) Order ¶
func (cq *ContactQuery) Order(o ...OrderFunc) *ContactQuery
Order specifies how the records should be ordered.
func (*ContactQuery) QueryLinkedTo ¶
func (cq *ContactQuery) QueryLinkedTo() *UserQuery
QueryLinkedTo chains the current query on the "linked_to" edge.
func (*ContactQuery) QueryOwner ¶
func (cq *ContactQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*ContactQuery) Select ¶
func (cq *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 { IsActive bool `json:"is_active,omitempty"` } client.Contact.Query(). Select(contact.FieldIsActive). Scan(ctx, &v)
func (*ContactQuery) Unique ¶
func (cq *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 (cq *ContactQuery) Where(ps ...predicate.Contact) *ContactQuery
Where adds a new predicate for the ContactQuery builder.
func (*ContactQuery) WithLinkedTo ¶
func (cq *ContactQuery) WithLinkedTo(opts ...func(*UserQuery)) *ContactQuery
WithLinkedTo tells the query-builder to eager-load the nodes that are connected to the "linked_to" edge. The optional arguments are used to configure the query builder of the edge.
func (*ContactQuery) WithOwner ¶
func (cq *ContactQuery) WithOwner(opts ...func(*UserQuery)) *ContactQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" 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 (cs *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) 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) Scan ¶
func (cs *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) AddVersion ¶
func (cu *ContactUpdate) AddVersion(u int32) *ContactUpdate
AddVersion adds u to the "version" field.
func (*ContactUpdate) ClearImageURL ¶
func (cu *ContactUpdate) ClearImageURL() *ContactUpdate
ClearImageURL clears the value of the "image_url" field.
func (*ContactUpdate) ClearLinkedTo ¶
func (cu *ContactUpdate) ClearLinkedTo() *ContactUpdate
ClearLinkedTo clears the "linked_to" edge to the User entity.
func (*ContactUpdate) ClearLinkedToUser ¶
func (cu *ContactUpdate) ClearLinkedToUser() *ContactUpdate
ClearLinkedToUser clears the value of the "linked_to_user" field.
func (*ContactUpdate) Exec ¶
func (cu *ContactUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactUpdate) ExecX ¶
func (cu *ContactUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactUpdate) Mutation ¶
func (cu *ContactUpdate) Mutation() *ContactMutation
Mutation returns the ContactMutation object of the builder.
func (*ContactUpdate) Save ¶
func (cu *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 (cu *ContactUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ContactUpdate) SetDisplayName ¶
func (cu *ContactUpdate) SetDisplayName(s string) *ContactUpdate
SetDisplayName sets the "display_name" field.
func (*ContactUpdate) SetImageURL ¶
func (cu *ContactUpdate) SetImageURL(s string) *ContactUpdate
SetImageURL sets the "image_url" field.
func (*ContactUpdate) SetIsActive ¶
func (cu *ContactUpdate) SetIsActive(b bool) *ContactUpdate
SetIsActive sets the "is_active" field.
func (*ContactUpdate) SetLinkedTo ¶
func (cu *ContactUpdate) SetLinkedTo(u *User) *ContactUpdate
SetLinkedTo sets the "linked_to" edge to the User entity.
func (*ContactUpdate) SetLinkedToID ¶
func (cu *ContactUpdate) SetLinkedToID(id string) *ContactUpdate
SetLinkedToID sets the "linked_to" edge to the User entity by ID.
func (*ContactUpdate) SetLinkedToUser ¶
func (cu *ContactUpdate) SetLinkedToUser(s string) *ContactUpdate
SetLinkedToUser sets the "linked_to_user" field.
func (*ContactUpdate) SetNillableImageURL ¶
func (cu *ContactUpdate) SetNillableImageURL(s *string) *ContactUpdate
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (*ContactUpdate) SetNillableLinkedToID ¶
func (cu *ContactUpdate) SetNillableLinkedToID(id *string) *ContactUpdate
SetNillableLinkedToID sets the "linked_to" edge to the User entity by ID if the given value is not nil.
func (*ContactUpdate) SetNillableLinkedToUser ¶
func (cu *ContactUpdate) SetNillableLinkedToUser(s *string) *ContactUpdate
SetNillableLinkedToUser sets the "linked_to_user" field if the given value is not nil.
func (*ContactUpdate) SetUpdatedAt ¶
func (cu *ContactUpdate) SetUpdatedAt(t time.Time) *ContactUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ContactUpdate) SetVersion ¶
func (cu *ContactUpdate) SetVersion(u uint32) *ContactUpdate
SetVersion sets the "version" field.
func (*ContactUpdate) Where ¶
func (cu *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) AddVersion ¶
func (cuo *ContactUpdateOne) AddVersion(u int32) *ContactUpdateOne
AddVersion adds u to the "version" field.
func (*ContactUpdateOne) ClearImageURL ¶
func (cuo *ContactUpdateOne) ClearImageURL() *ContactUpdateOne
ClearImageURL clears the value of the "image_url" field.
func (*ContactUpdateOne) ClearLinkedTo ¶
func (cuo *ContactUpdateOne) ClearLinkedTo() *ContactUpdateOne
ClearLinkedTo clears the "linked_to" edge to the User entity.
func (*ContactUpdateOne) ClearLinkedToUser ¶
func (cuo *ContactUpdateOne) ClearLinkedToUser() *ContactUpdateOne
ClearLinkedToUser clears the value of the "linked_to_user" field.
func (*ContactUpdateOne) Exec ¶
func (cuo *ContactUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ContactUpdateOne) ExecX ¶
func (cuo *ContactUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactUpdateOne) Mutation ¶
func (cuo *ContactUpdateOne) Mutation() *ContactMutation
Mutation returns the ContactMutation object of the builder.
func (*ContactUpdateOne) Save ¶
func (cuo *ContactUpdateOne) Save(ctx context.Context) (*Contact, error)
Save executes the query and returns the updated Contact entity.
func (*ContactUpdateOne) SaveX ¶
func (cuo *ContactUpdateOne) SaveX(ctx context.Context) *Contact
SaveX is like Save, but panics if an error occurs.
func (*ContactUpdateOne) Select ¶
func (cuo *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) SetDisplayName ¶
func (cuo *ContactUpdateOne) SetDisplayName(s string) *ContactUpdateOne
SetDisplayName sets the "display_name" field.
func (*ContactUpdateOne) SetImageURL ¶
func (cuo *ContactUpdateOne) SetImageURL(s string) *ContactUpdateOne
SetImageURL sets the "image_url" field.
func (*ContactUpdateOne) SetIsActive ¶
func (cuo *ContactUpdateOne) SetIsActive(b bool) *ContactUpdateOne
SetIsActive sets the "is_active" field.
func (*ContactUpdateOne) SetLinkedTo ¶
func (cuo *ContactUpdateOne) SetLinkedTo(u *User) *ContactUpdateOne
SetLinkedTo sets the "linked_to" edge to the User entity.
func (*ContactUpdateOne) SetLinkedToID ¶
func (cuo *ContactUpdateOne) SetLinkedToID(id string) *ContactUpdateOne
SetLinkedToID sets the "linked_to" edge to the User entity by ID.
func (*ContactUpdateOne) SetLinkedToUser ¶
func (cuo *ContactUpdateOne) SetLinkedToUser(s string) *ContactUpdateOne
SetLinkedToUser sets the "linked_to_user" field.
func (*ContactUpdateOne) SetNillableImageURL ¶
func (cuo *ContactUpdateOne) SetNillableImageURL(s *string) *ContactUpdateOne
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (*ContactUpdateOne) SetNillableLinkedToID ¶
func (cuo *ContactUpdateOne) SetNillableLinkedToID(id *string) *ContactUpdateOne
SetNillableLinkedToID sets the "linked_to" edge to the User entity by ID if the given value is not nil.
func (*ContactUpdateOne) SetNillableLinkedToUser ¶
func (cuo *ContactUpdateOne) SetNillableLinkedToUser(s *string) *ContactUpdateOne
SetNillableLinkedToUser sets the "linked_to_user" field if the given value is not nil.
func (*ContactUpdateOne) SetUpdatedAt ¶
func (cuo *ContactUpdateOne) SetUpdatedAt(t time.Time) *ContactUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ContactUpdateOne) SetVersion ¶
func (cuo *ContactUpdateOne) SetVersion(u uint32) *ContactUpdateOne
SetVersion sets the "version" field.
type ContactUpsert ¶
ContactUpsert is the "OnConflict" setter.
func (*ContactUpsert) AddVersion ¶
func (u *ContactUpsert) AddVersion(v uint32) *ContactUpsert
AddVersion adds v to the "version" field.
func (*ContactUpsert) ClearImageURL ¶
func (u *ContactUpsert) ClearImageURL() *ContactUpsert
ClearImageURL clears the value of the "image_url" field.
func (*ContactUpsert) ClearLinkedToUser ¶
func (u *ContactUpsert) ClearLinkedToUser() *ContactUpsert
ClearLinkedToUser clears the value of the "linked_to_user" field.
func (*ContactUpsert) SetDisplayName ¶
func (u *ContactUpsert) SetDisplayName(v string) *ContactUpsert
SetDisplayName sets the "display_name" field.
func (*ContactUpsert) SetImageURL ¶
func (u *ContactUpsert) SetImageURL(v string) *ContactUpsert
SetImageURL sets the "image_url" field.
func (*ContactUpsert) SetIsActive ¶
func (u *ContactUpsert) SetIsActive(v bool) *ContactUpsert
SetIsActive sets the "is_active" field.
func (*ContactUpsert) SetLinkedToUser ¶
func (u *ContactUpsert) SetLinkedToUser(v string) *ContactUpsert
SetLinkedToUser sets the "linked_to_user" field.
func (*ContactUpsert) SetUpdatedAt ¶
func (u *ContactUpsert) SetUpdatedAt(v time.Time) *ContactUpsert
SetUpdatedAt sets the "updated_at" field.
func (*ContactUpsert) SetVersion ¶
func (u *ContactUpsert) SetVersion(v uint32) *ContactUpsert
SetVersion sets the "version" field.
func (*ContactUpsert) UpdateDisplayName ¶
func (u *ContactUpsert) UpdateDisplayName() *ContactUpsert
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*ContactUpsert) UpdateImageURL ¶
func (u *ContactUpsert) UpdateImageURL() *ContactUpsert
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (*ContactUpsert) UpdateIsActive ¶
func (u *ContactUpsert) UpdateIsActive() *ContactUpsert
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*ContactUpsert) UpdateLinkedToUser ¶
func (u *ContactUpsert) UpdateLinkedToUser() *ContactUpsert
UpdateLinkedToUser sets the "linked_to_user" field to the value that was provided on create.
func (*ContactUpsert) UpdateUpdatedAt ¶
func (u *ContactUpsert) UpdateUpdatedAt() *ContactUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*ContactUpsert) UpdateVersion ¶
func (u *ContactUpsert) UpdateVersion() *ContactUpsert
UpdateVersion sets the "version" 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) AddVersion ¶
func (u *ContactUpsertBulk) AddVersion(v uint32) *ContactUpsertBulk
AddVersion adds v to the "version" field.
func (*ContactUpsertBulk) ClearImageURL ¶
func (u *ContactUpsertBulk) ClearImageURL() *ContactUpsertBulk
ClearImageURL clears the value of the "image_url" field.
func (*ContactUpsertBulk) ClearLinkedToUser ¶
func (u *ContactUpsertBulk) ClearLinkedToUser() *ContactUpsertBulk
ClearLinkedToUser clears the value of the "linked_to_user" 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) SetDisplayName ¶
func (u *ContactUpsertBulk) SetDisplayName(v string) *ContactUpsertBulk
SetDisplayName sets the "display_name" field.
func (*ContactUpsertBulk) SetImageURL ¶
func (u *ContactUpsertBulk) SetImageURL(v string) *ContactUpsertBulk
SetImageURL sets the "image_url" field.
func (*ContactUpsertBulk) SetIsActive ¶
func (u *ContactUpsertBulk) SetIsActive(v bool) *ContactUpsertBulk
SetIsActive sets the "is_active" field.
func (*ContactUpsertBulk) SetLinkedToUser ¶
func (u *ContactUpsertBulk) SetLinkedToUser(v string) *ContactUpsertBulk
SetLinkedToUser sets the "linked_to_user" field.
func (*ContactUpsertBulk) SetUpdatedAt ¶
func (u *ContactUpsertBulk) SetUpdatedAt(v time.Time) *ContactUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*ContactUpsertBulk) SetVersion ¶
func (u *ContactUpsertBulk) SetVersion(v uint32) *ContactUpsertBulk
SetVersion sets the "version" 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) UpdateDisplayName ¶
func (u *ContactUpsertBulk) UpdateDisplayName() *ContactUpsertBulk
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*ContactUpsertBulk) UpdateImageURL ¶
func (u *ContactUpsertBulk) UpdateImageURL() *ContactUpsertBulk
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (*ContactUpsertBulk) UpdateIsActive ¶
func (u *ContactUpsertBulk) UpdateIsActive() *ContactUpsertBulk
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*ContactUpsertBulk) UpdateLinkedToUser ¶
func (u *ContactUpsertBulk) UpdateLinkedToUser() *ContactUpsertBulk
UpdateLinkedToUser sets the "linked_to_user" 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(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(contact.FieldID) }), ). Exec(ctx)
func (*ContactUpsertBulk) UpdateUpdatedAt ¶
func (u *ContactUpsertBulk) UpdateUpdatedAt() *ContactUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*ContactUpsertBulk) UpdateVersion ¶
func (u *ContactUpsertBulk) UpdateVersion() *ContactUpsertBulk
UpdateVersion sets the "version" 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) AddVersion ¶
func (u *ContactUpsertOne) AddVersion(v uint32) *ContactUpsertOne
AddVersion adds v to the "version" field.
func (*ContactUpsertOne) ClearImageURL ¶
func (u *ContactUpsertOne) ClearImageURL() *ContactUpsertOne
ClearImageURL clears the value of the "image_url" field.
func (*ContactUpsertOne) ClearLinkedToUser ¶
func (u *ContactUpsertOne) ClearLinkedToUser() *ContactUpsertOne
ClearLinkedToUser clears the value of the "linked_to_user" 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 string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ContactUpsertOne) IDX ¶
func (u *ContactUpsertOne) IDX(ctx context.Context) string
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) SetDisplayName ¶
func (u *ContactUpsertOne) SetDisplayName(v string) *ContactUpsertOne
SetDisplayName sets the "display_name" field.
func (*ContactUpsertOne) SetImageURL ¶
func (u *ContactUpsertOne) SetImageURL(v string) *ContactUpsertOne
SetImageURL sets the "image_url" field.
func (*ContactUpsertOne) SetIsActive ¶
func (u *ContactUpsertOne) SetIsActive(v bool) *ContactUpsertOne
SetIsActive sets the "is_active" field.
func (*ContactUpsertOne) SetLinkedToUser ¶
func (u *ContactUpsertOne) SetLinkedToUser(v string) *ContactUpsertOne
SetLinkedToUser sets the "linked_to_user" field.
func (*ContactUpsertOne) SetUpdatedAt ¶
func (u *ContactUpsertOne) SetUpdatedAt(v time.Time) *ContactUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*ContactUpsertOne) SetVersion ¶
func (u *ContactUpsertOne) SetVersion(v uint32) *ContactUpsertOne
SetVersion sets the "version" 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) UpdateDisplayName ¶
func (u *ContactUpsertOne) UpdateDisplayName() *ContactUpsertOne
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*ContactUpsertOne) UpdateImageURL ¶
func (u *ContactUpsertOne) UpdateImageURL() *ContactUpsertOne
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (*ContactUpsertOne) UpdateIsActive ¶
func (u *ContactUpsertOne) UpdateIsActive() *ContactUpsertOne
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*ContactUpsertOne) UpdateLinkedToUser ¶
func (u *ContactUpsertOne) UpdateLinkedToUser() *ContactUpsertOne
UpdateLinkedToUser sets the "linked_to_user" 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 except the ID field. Using this option is equivalent to using:
client.Contact.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(contact.FieldID) }), ). Exec(ctx)
func (*ContactUpsertOne) UpdateUpdatedAt ¶
func (u *ContactUpsertOne) UpdateUpdatedAt() *ContactUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*ContactUpsertOne) UpdateVersion ¶
func (u *ContactUpsertOne) UpdateVersion() *ContactUpsertOne
UpdateVersion sets the "version" field to the value that was provided on create.
type FinancialAccount ¶
type FinancialAccount struct { // ID of the ent. ID string `json:"id,omitempty"` // IsActive holds the value of the "is_active" field. IsActive bool `json:"is_active,omitempty"` // Version holds the value of the "version" field. Version uint32 `json:"version,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DisplayName holds the value of the "display_name" field. DisplayName string `json:"display_name,omitempty"` // BankName holds the value of the "bank_name" field. BankName string `json:"bank_name,omitempty"` // AccountType holds the value of the "account_type" field. AccountType string `json:"account_type,omitempty"` // Balance holds the value of the "balance" field. Balance float64 `json:"balance,omitempty"` // CurrencyCode holds the value of the "currency_code" field. CurrencyCode string `json:"currency_code,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FinancialAccountQuery when eager-loading is set. Edges FinancialAccountEdges `json:"edges"` // contains filtered or unexported fields }
FinancialAccount is the model entity for the FinancialAccount schema.
func (*FinancialAccount) QueryCards ¶
func (fa *FinancialAccount) QueryCards() *CardQuery
QueryCards queries the "cards" edge of the FinancialAccount entity.
func (*FinancialAccount) QueryOwner ¶
func (fa *FinancialAccount) QueryOwner() *UserQuery
QueryOwner queries the "owner" edge of the FinancialAccount entity.
func (*FinancialAccount) String ¶
func (fa *FinancialAccount) String() string
String implements the fmt.Stringer.
func (*FinancialAccount) Unwrap ¶
func (fa *FinancialAccount) Unwrap() *FinancialAccount
Unwrap unwraps the FinancialAccount 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 (*FinancialAccount) Update ¶
func (fa *FinancialAccount) Update() *FinancialAccountUpdateOne
Update returns a builder for updating this FinancialAccount. Note that you need to call FinancialAccount.Unwrap() before calling this method if this FinancialAccount was returned from a transaction, and the transaction was committed or rolled back.
type FinancialAccountClient ¶
type FinancialAccountClient struct {
// contains filtered or unexported fields
}
FinancialAccountClient is a client for the FinancialAccount schema.
func NewFinancialAccountClient ¶
func NewFinancialAccountClient(c config) *FinancialAccountClient
NewFinancialAccountClient returns a client for the FinancialAccount from the given config.
func (*FinancialAccountClient) Create ¶
func (c *FinancialAccountClient) Create() *FinancialAccountCreate
Create returns a builder for creating a FinancialAccount entity.
func (*FinancialAccountClient) CreateBulk ¶
func (c *FinancialAccountClient) CreateBulk(builders ...*FinancialAccountCreate) *FinancialAccountCreateBulk
CreateBulk returns a builder for creating a bulk of FinancialAccount entities.
func (*FinancialAccountClient) Delete ¶
func (c *FinancialAccountClient) Delete() *FinancialAccountDelete
Delete returns a delete builder for FinancialAccount.
func (*FinancialAccountClient) DeleteOne ¶
func (c *FinancialAccountClient) DeleteOne(fa *FinancialAccount) *FinancialAccountDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FinancialAccountClient) DeleteOneID ¶
func (c *FinancialAccountClient) DeleteOneID(id string) *FinancialAccountDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FinancialAccountClient) Get ¶
func (c *FinancialAccountClient) Get(ctx context.Context, id string) (*FinancialAccount, error)
Get returns a FinancialAccount entity by its id.
func (*FinancialAccountClient) GetX ¶
func (c *FinancialAccountClient) GetX(ctx context.Context, id string) *FinancialAccount
GetX is like Get, but panics if an error occurs.
func (*FinancialAccountClient) Hooks ¶
func (c *FinancialAccountClient) Hooks() []Hook
Hooks returns the client hooks.
func (*FinancialAccountClient) Intercept ¶
func (c *FinancialAccountClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `financialaccount.Intercept(f(g(h())))`.
func (*FinancialAccountClient) Interceptors ¶
func (c *FinancialAccountClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FinancialAccountClient) Query ¶
func (c *FinancialAccountClient) Query() *FinancialAccountQuery
Query returns a query builder for FinancialAccount.
func (*FinancialAccountClient) QueryCards ¶
func (c *FinancialAccountClient) QueryCards(fa *FinancialAccount) *CardQuery
QueryCards queries the cards edge of a FinancialAccount.
func (*FinancialAccountClient) QueryOwner ¶
func (c *FinancialAccountClient) QueryOwner(fa *FinancialAccount) *UserQuery
QueryOwner queries the owner edge of a FinancialAccount.
func (*FinancialAccountClient) Update ¶
func (c *FinancialAccountClient) Update() *FinancialAccountUpdate
Update returns an update builder for FinancialAccount.
func (*FinancialAccountClient) UpdateOne ¶
func (c *FinancialAccountClient) UpdateOne(fa *FinancialAccount) *FinancialAccountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FinancialAccountClient) UpdateOneID ¶
func (c *FinancialAccountClient) UpdateOneID(id string) *FinancialAccountUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FinancialAccountClient) Use ¶
func (c *FinancialAccountClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `financialaccount.Hooks(f(g(h())))`.
type FinancialAccountCreate ¶
type FinancialAccountCreate struct {
// contains filtered or unexported fields
}
FinancialAccountCreate is the builder for creating a FinancialAccount entity.
func (*FinancialAccountCreate) AddCardIDs ¶
func (fac *FinancialAccountCreate) AddCardIDs(ids ...string) *FinancialAccountCreate
AddCardIDs adds the "cards" edge to the Card entity by IDs.
func (*FinancialAccountCreate) AddCards ¶
func (fac *FinancialAccountCreate) AddCards(c ...*Card) *FinancialAccountCreate
AddCards adds the "cards" edges to the Card entity.
func (*FinancialAccountCreate) Exec ¶
func (fac *FinancialAccountCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FinancialAccountCreate) ExecX ¶
func (fac *FinancialAccountCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialAccountCreate) Mutation ¶
func (fac *FinancialAccountCreate) Mutation() *FinancialAccountMutation
Mutation returns the FinancialAccountMutation object of the builder.
func (*FinancialAccountCreate) OnConflict ¶
func (fac *FinancialAccountCreate) OnConflict(opts ...sql.ConflictOption) *FinancialAccountUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.FinancialAccount.Create(). SetIsActive(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.FinancialAccountUpsert) { SetIsActive(v+v). }). Exec(ctx)
func (*FinancialAccountCreate) OnConflictColumns ¶
func (fac *FinancialAccountCreate) OnConflictColumns(columns ...string) *FinancialAccountUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.FinancialAccount.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FinancialAccountCreate) Save ¶
func (fac *FinancialAccountCreate) Save(ctx context.Context) (*FinancialAccount, error)
Save creates the FinancialAccount in the database.
func (*FinancialAccountCreate) SaveX ¶
func (fac *FinancialAccountCreate) SaveX(ctx context.Context) *FinancialAccount
SaveX calls Save and panics if Save returns an error.
func (*FinancialAccountCreate) SetAccountType ¶
func (fac *FinancialAccountCreate) SetAccountType(s string) *FinancialAccountCreate
SetAccountType sets the "account_type" field.
func (*FinancialAccountCreate) SetBalance ¶
func (fac *FinancialAccountCreate) SetBalance(f float64) *FinancialAccountCreate
SetBalance sets the "balance" field.
func (*FinancialAccountCreate) SetBankName ¶
func (fac *FinancialAccountCreate) SetBankName(s string) *FinancialAccountCreate
SetBankName sets the "bank_name" field.
func (*FinancialAccountCreate) SetCreatedAt ¶
func (fac *FinancialAccountCreate) SetCreatedAt(t time.Time) *FinancialAccountCreate
SetCreatedAt sets the "created_at" field.
func (*FinancialAccountCreate) SetCurrencyCode ¶
func (fac *FinancialAccountCreate) SetCurrencyCode(s string) *FinancialAccountCreate
SetCurrencyCode sets the "currency_code" field.
func (*FinancialAccountCreate) SetDisplayName ¶
func (fac *FinancialAccountCreate) SetDisplayName(s string) *FinancialAccountCreate
SetDisplayName sets the "display_name" field.
func (*FinancialAccountCreate) SetID ¶
func (fac *FinancialAccountCreate) SetID(s string) *FinancialAccountCreate
SetID sets the "id" field.
func (*FinancialAccountCreate) SetIsActive ¶
func (fac *FinancialAccountCreate) SetIsActive(b bool) *FinancialAccountCreate
SetIsActive sets the "is_active" field.
func (*FinancialAccountCreate) SetNillableBankName ¶
func (fac *FinancialAccountCreate) SetNillableBankName(s *string) *FinancialAccountCreate
SetNillableBankName sets the "bank_name" field if the given value is not nil.
func (*FinancialAccountCreate) SetOwner ¶
func (fac *FinancialAccountCreate) SetOwner(u *User) *FinancialAccountCreate
SetOwner sets the "owner" edge to the User entity.
func (*FinancialAccountCreate) SetOwnerID ¶
func (fac *FinancialAccountCreate) SetOwnerID(id string) *FinancialAccountCreate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*FinancialAccountCreate) SetUpdatedAt ¶
func (fac *FinancialAccountCreate) SetUpdatedAt(t time.Time) *FinancialAccountCreate
SetUpdatedAt sets the "updated_at" field.
func (*FinancialAccountCreate) SetVersion ¶
func (fac *FinancialAccountCreate) SetVersion(u uint32) *FinancialAccountCreate
SetVersion sets the "version" field.
type FinancialAccountCreateBulk ¶
type FinancialAccountCreateBulk struct {
// contains filtered or unexported fields
}
FinancialAccountCreateBulk is the builder for creating many FinancialAccount entities in bulk.
func (*FinancialAccountCreateBulk) Exec ¶
func (facb *FinancialAccountCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FinancialAccountCreateBulk) ExecX ¶
func (facb *FinancialAccountCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialAccountCreateBulk) OnConflict ¶
func (facb *FinancialAccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *FinancialAccountUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.FinancialAccount.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.FinancialAccountUpsert) { SetIsActive(v+v). }). Exec(ctx)
func (*FinancialAccountCreateBulk) OnConflictColumns ¶
func (facb *FinancialAccountCreateBulk) OnConflictColumns(columns ...string) *FinancialAccountUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.FinancialAccount.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FinancialAccountCreateBulk) Save ¶
func (facb *FinancialAccountCreateBulk) Save(ctx context.Context) ([]*FinancialAccount, error)
Save creates the FinancialAccount entities in the database.
func (*FinancialAccountCreateBulk) SaveX ¶
func (facb *FinancialAccountCreateBulk) SaveX(ctx context.Context) []*FinancialAccount
SaveX is like Save, but panics if an error occurs.
type FinancialAccountDelete ¶
type FinancialAccountDelete struct {
// contains filtered or unexported fields
}
FinancialAccountDelete is the builder for deleting a FinancialAccount entity.
func (*FinancialAccountDelete) Exec ¶
func (fad *FinancialAccountDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FinancialAccountDelete) ExecX ¶
func (fad *FinancialAccountDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FinancialAccountDelete) Where ¶
func (fad *FinancialAccountDelete) Where(ps ...predicate.FinancialAccount) *FinancialAccountDelete
Where appends a list predicates to the FinancialAccountDelete builder.
type FinancialAccountDeleteOne ¶
type FinancialAccountDeleteOne struct {
// contains filtered or unexported fields
}
FinancialAccountDeleteOne is the builder for deleting a single FinancialAccount entity.
func (*FinancialAccountDeleteOne) Exec ¶
func (fado *FinancialAccountDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FinancialAccountDeleteOne) ExecX ¶
func (fado *FinancialAccountDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type FinancialAccountEdges ¶
type FinancialAccountEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // Cards holds the value of the cards edge. Cards []*Card `json:"cards,omitempty"` // contains filtered or unexported fields }
FinancialAccountEdges holds the relations/edges for other nodes in the graph.
func (FinancialAccountEdges) CardsOrErr ¶
func (e FinancialAccountEdges) CardsOrErr() ([]*Card, error)
CardsOrErr returns the Cards value or an error if the edge was not loaded in eager-loading.
func (FinancialAccountEdges) OwnerOrErr ¶
func (e FinancialAccountEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type FinancialAccountGroupBy ¶
type FinancialAccountGroupBy struct {
// contains filtered or unexported fields
}
FinancialAccountGroupBy is the group-by builder for FinancialAccount entities.
func (*FinancialAccountGroupBy) Aggregate ¶
func (fagb *FinancialAccountGroupBy) Aggregate(fns ...AggregateFunc) *FinancialAccountGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FinancialAccountGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FinancialAccountGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FinancialAccountGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FinancialAccountGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FinancialAccountGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*FinancialAccountGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FinancialAccountGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FinancialAccountGroupBy) Scan ¶
func (fagb *FinancialAccountGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FinancialAccountGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FinancialAccountMutation ¶
type FinancialAccountMutation struct {
// contains filtered or unexported fields
}
FinancialAccountMutation represents an operation that mutates the FinancialAccount nodes in the graph.
func (*FinancialAccountMutation) AccountType ¶
func (m *FinancialAccountMutation) AccountType() (r string, exists bool)
AccountType returns the value of the "account_type" field in the mutation.
func (*FinancialAccountMutation) AddBalance ¶
func (m *FinancialAccountMutation) AddBalance(f float64)
AddBalance adds f to the "balance" field.
func (*FinancialAccountMutation) AddCardIDs ¶
func (m *FinancialAccountMutation) AddCardIDs(ids ...string)
AddCardIDs adds the "cards" edge to the Card entity by ids.
func (*FinancialAccountMutation) AddField ¶
func (m *FinancialAccountMutation) 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 (*FinancialAccountMutation) AddVersion ¶
func (m *FinancialAccountMutation) AddVersion(u int32)
AddVersion adds u to the "version" field.
func (*FinancialAccountMutation) AddedBalance ¶
func (m *FinancialAccountMutation) AddedBalance() (r float64, exists bool)
AddedBalance returns the value that was added to the "balance" field in this mutation.
func (*FinancialAccountMutation) AddedEdges ¶
func (m *FinancialAccountMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FinancialAccountMutation) AddedField ¶
func (m *FinancialAccountMutation) 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 (*FinancialAccountMutation) AddedFields ¶
func (m *FinancialAccountMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FinancialAccountMutation) AddedIDs ¶
func (m *FinancialAccountMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FinancialAccountMutation) AddedVersion ¶
func (m *FinancialAccountMutation) AddedVersion() (r int32, exists bool)
AddedVersion returns the value that was added to the "version" field in this mutation.
func (*FinancialAccountMutation) Balance ¶
func (m *FinancialAccountMutation) Balance() (r float64, exists bool)
Balance returns the value of the "balance" field in the mutation.
func (*FinancialAccountMutation) BankName ¶
func (m *FinancialAccountMutation) BankName() (r string, exists bool)
BankName returns the value of the "bank_name" field in the mutation.
func (*FinancialAccountMutation) BankNameCleared ¶
func (m *FinancialAccountMutation) BankNameCleared() bool
BankNameCleared returns if the "bank_name" field was cleared in this mutation.
func (*FinancialAccountMutation) CardsCleared ¶
func (m *FinancialAccountMutation) CardsCleared() bool
CardsCleared reports if the "cards" edge to the Card entity was cleared.
func (*FinancialAccountMutation) CardsIDs ¶
func (m *FinancialAccountMutation) CardsIDs() (ids []string)
CardsIDs returns the "cards" edge IDs in the mutation.
func (*FinancialAccountMutation) ClearBankName ¶
func (m *FinancialAccountMutation) ClearBankName()
ClearBankName clears the value of the "bank_name" field.
func (*FinancialAccountMutation) ClearCards ¶
func (m *FinancialAccountMutation) ClearCards()
ClearCards clears the "cards" edge to the Card entity.
func (*FinancialAccountMutation) ClearEdge ¶
func (m *FinancialAccountMutation) 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 (*FinancialAccountMutation) ClearField ¶
func (m *FinancialAccountMutation) 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 (*FinancialAccountMutation) ClearOwner ¶
func (m *FinancialAccountMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*FinancialAccountMutation) ClearedEdges ¶
func (m *FinancialAccountMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FinancialAccountMutation) ClearedFields ¶
func (m *FinancialAccountMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FinancialAccountMutation) Client ¶
func (m FinancialAccountMutation) 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 (*FinancialAccountMutation) CreatedAt ¶
func (m *FinancialAccountMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FinancialAccountMutation) CurrencyCode ¶
func (m *FinancialAccountMutation) CurrencyCode() (r string, exists bool)
CurrencyCode returns the value of the "currency_code" field in the mutation.
func (*FinancialAccountMutation) DisplayName ¶
func (m *FinancialAccountMutation) DisplayName() (r string, exists bool)
DisplayName returns the value of the "display_name" field in the mutation.
func (*FinancialAccountMutation) EdgeCleared ¶
func (m *FinancialAccountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FinancialAccountMutation) Field ¶
func (m *FinancialAccountMutation) 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 (*FinancialAccountMutation) FieldCleared ¶
func (m *FinancialAccountMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FinancialAccountMutation) Fields ¶
func (m *FinancialAccountMutation) 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 (*FinancialAccountMutation) ID ¶
func (m *FinancialAccountMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*FinancialAccountMutation) IDs ¶
func (m *FinancialAccountMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*FinancialAccountMutation) IsActive ¶
func (m *FinancialAccountMutation) IsActive() (r bool, exists bool)
IsActive returns the value of the "is_active" field in the mutation.
func (*FinancialAccountMutation) OldAccountType ¶
func (m *FinancialAccountMutation) OldAccountType(ctx context.Context) (v string, err error)
OldAccountType returns the old "account_type" field's value of the FinancialAccount entity. If the FinancialAccount 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 (*FinancialAccountMutation) OldBalance ¶
func (m *FinancialAccountMutation) OldBalance(ctx context.Context) (v float64, err error)
OldBalance returns the old "balance" field's value of the FinancialAccount entity. If the FinancialAccount 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 (*FinancialAccountMutation) OldBankName ¶
func (m *FinancialAccountMutation) OldBankName(ctx context.Context) (v string, err error)
OldBankName returns the old "bank_name" field's value of the FinancialAccount entity. If the FinancialAccount 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 (*FinancialAccountMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the FinancialAccount entity. If the FinancialAccount 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 (*FinancialAccountMutation) OldCurrencyCode ¶
func (m *FinancialAccountMutation) OldCurrencyCode(ctx context.Context) (v string, err error)
OldCurrencyCode returns the old "currency_code" field's value of the FinancialAccount entity. If the FinancialAccount 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 (*FinancialAccountMutation) OldDisplayName ¶
func (m *FinancialAccountMutation) OldDisplayName(ctx context.Context) (v string, err error)
OldDisplayName returns the old "display_name" field's value of the FinancialAccount entity. If the FinancialAccount 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 (*FinancialAccountMutation) 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 (*FinancialAccountMutation) OldIsActive ¶
func (m *FinancialAccountMutation) OldIsActive(ctx context.Context) (v bool, err error)
OldIsActive returns the old "is_active" field's value of the FinancialAccount entity. If the FinancialAccount 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 (*FinancialAccountMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the FinancialAccount entity. If the FinancialAccount 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 (*FinancialAccountMutation) OldVersion ¶
func (m *FinancialAccountMutation) OldVersion(ctx context.Context) (v uint32, err error)
OldVersion returns the old "version" field's value of the FinancialAccount entity. If the FinancialAccount 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 (*FinancialAccountMutation) Op ¶
func (m *FinancialAccountMutation) Op() Op
Op returns the operation name.
func (*FinancialAccountMutation) OwnerCleared ¶
func (m *FinancialAccountMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*FinancialAccountMutation) OwnerID ¶
func (m *FinancialAccountMutation) OwnerID() (id string, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*FinancialAccountMutation) OwnerIDs ¶
func (m *FinancialAccountMutation) OwnerIDs() (ids []string)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*FinancialAccountMutation) RemoveCardIDs ¶
func (m *FinancialAccountMutation) RemoveCardIDs(ids ...string)
RemoveCardIDs removes the "cards" edge to the Card entity by IDs.
func (*FinancialAccountMutation) RemovedCardsIDs ¶
func (m *FinancialAccountMutation) RemovedCardsIDs() (ids []string)
RemovedCards returns the removed IDs of the "cards" edge to the Card entity.
func (*FinancialAccountMutation) RemovedEdges ¶
func (m *FinancialAccountMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FinancialAccountMutation) RemovedIDs ¶
func (m *FinancialAccountMutation) 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 (*FinancialAccountMutation) ResetAccountType ¶
func (m *FinancialAccountMutation) ResetAccountType()
ResetAccountType resets all changes to the "account_type" field.
func (*FinancialAccountMutation) ResetBalance ¶
func (m *FinancialAccountMutation) ResetBalance()
ResetBalance resets all changes to the "balance" field.
func (*FinancialAccountMutation) ResetBankName ¶
func (m *FinancialAccountMutation) ResetBankName()
ResetBankName resets all changes to the "bank_name" field.
func (*FinancialAccountMutation) ResetCards ¶
func (m *FinancialAccountMutation) ResetCards()
ResetCards resets all changes to the "cards" edge.
func (*FinancialAccountMutation) ResetCreatedAt ¶
func (m *FinancialAccountMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FinancialAccountMutation) ResetCurrencyCode ¶
func (m *FinancialAccountMutation) ResetCurrencyCode()
ResetCurrencyCode resets all changes to the "currency_code" field.
func (*FinancialAccountMutation) ResetDisplayName ¶
func (m *FinancialAccountMutation) ResetDisplayName()
ResetDisplayName resets all changes to the "display_name" field.
func (*FinancialAccountMutation) ResetEdge ¶
func (m *FinancialAccountMutation) 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 (*FinancialAccountMutation) ResetField ¶
func (m *FinancialAccountMutation) 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 (*FinancialAccountMutation) ResetIsActive ¶
func (m *FinancialAccountMutation) ResetIsActive()
ResetIsActive resets all changes to the "is_active" field.
func (*FinancialAccountMutation) ResetOwner ¶
func (m *FinancialAccountMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*FinancialAccountMutation) ResetUpdatedAt ¶
func (m *FinancialAccountMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FinancialAccountMutation) ResetVersion ¶
func (m *FinancialAccountMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*FinancialAccountMutation) SetAccountType ¶
func (m *FinancialAccountMutation) SetAccountType(s string)
SetAccountType sets the "account_type" field.
func (*FinancialAccountMutation) SetBalance ¶
func (m *FinancialAccountMutation) SetBalance(f float64)
SetBalance sets the "balance" field.
func (*FinancialAccountMutation) SetBankName ¶
func (m *FinancialAccountMutation) SetBankName(s string)
SetBankName sets the "bank_name" field.
func (*FinancialAccountMutation) SetCreatedAt ¶
func (m *FinancialAccountMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FinancialAccountMutation) SetCurrencyCode ¶
func (m *FinancialAccountMutation) SetCurrencyCode(s string)
SetCurrencyCode sets the "currency_code" field.
func (*FinancialAccountMutation) SetDisplayName ¶
func (m *FinancialAccountMutation) SetDisplayName(s string)
SetDisplayName sets the "display_name" field.
func (*FinancialAccountMutation) SetField ¶
func (m *FinancialAccountMutation) 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 (*FinancialAccountMutation) SetID ¶
func (m *FinancialAccountMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of FinancialAccount entities.
func (*FinancialAccountMutation) SetIsActive ¶
func (m *FinancialAccountMutation) SetIsActive(b bool)
SetIsActive sets the "is_active" field.
func (*FinancialAccountMutation) SetOp ¶
func (m *FinancialAccountMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FinancialAccountMutation) SetOwnerID ¶
func (m *FinancialAccountMutation) SetOwnerID(id string)
SetOwnerID sets the "owner" edge to the User entity by id.
func (*FinancialAccountMutation) SetUpdatedAt ¶
func (m *FinancialAccountMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*FinancialAccountMutation) SetVersion ¶
func (m *FinancialAccountMutation) SetVersion(u uint32)
SetVersion sets the "version" field.
func (FinancialAccountMutation) Tx ¶
func (m FinancialAccountMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FinancialAccountMutation) Type ¶
func (m *FinancialAccountMutation) Type() string
Type returns the node type of this mutation (FinancialAccount).
func (*FinancialAccountMutation) UpdatedAt ¶
func (m *FinancialAccountMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*FinancialAccountMutation) Version ¶
func (m *FinancialAccountMutation) Version() (r uint32, exists bool)
Version returns the value of the "version" field in the mutation.
func (*FinancialAccountMutation) Where ¶
func (m *FinancialAccountMutation) Where(ps ...predicate.FinancialAccount)
Where appends a list predicates to the FinancialAccountMutation builder.
func (*FinancialAccountMutation) WhereP ¶
func (m *FinancialAccountMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FinancialAccountMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FinancialAccountQuery ¶
type FinancialAccountQuery struct {
// contains filtered or unexported fields
}
FinancialAccountQuery is the builder for querying FinancialAccount entities.
func (*FinancialAccountQuery) Aggregate ¶
func (faq *FinancialAccountQuery) Aggregate(fns ...AggregateFunc) *FinancialAccountSelect
Aggregate returns a FinancialAccountSelect configured with the given aggregations.
func (*FinancialAccountQuery) All ¶
func (faq *FinancialAccountQuery) All(ctx context.Context) ([]*FinancialAccount, error)
All executes the query and returns a list of FinancialAccounts.
func (*FinancialAccountQuery) AllX ¶
func (faq *FinancialAccountQuery) AllX(ctx context.Context) []*FinancialAccount
AllX is like All, but panics if an error occurs.
func (*FinancialAccountQuery) Clone ¶
func (faq *FinancialAccountQuery) Clone() *FinancialAccountQuery
Clone returns a duplicate of the FinancialAccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FinancialAccountQuery) Count ¶
func (faq *FinancialAccountQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*FinancialAccountQuery) CountX ¶
func (faq *FinancialAccountQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*FinancialAccountQuery) Exist ¶
func (faq *FinancialAccountQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*FinancialAccountQuery) ExistX ¶
func (faq *FinancialAccountQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*FinancialAccountQuery) First ¶
func (faq *FinancialAccountQuery) First(ctx context.Context) (*FinancialAccount, error)
First returns the first FinancialAccount entity from the query. Returns a *NotFoundError when no FinancialAccount was found.
func (*FinancialAccountQuery) FirstID ¶
func (faq *FinancialAccountQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first FinancialAccount ID from the query. Returns a *NotFoundError when no FinancialAccount ID was found.
func (*FinancialAccountQuery) FirstIDX ¶
func (faq *FinancialAccountQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*FinancialAccountQuery) FirstX ¶
func (faq *FinancialAccountQuery) FirstX(ctx context.Context) *FinancialAccount
FirstX is like First, but panics if an error occurs.
func (*FinancialAccountQuery) GroupBy ¶
func (faq *FinancialAccountQuery) GroupBy(field string, fields ...string) *FinancialAccountGroupBy
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 { IsActive bool `json:"is_active,omitempty"` Count int `json:"count,omitempty"` } client.FinancialAccount.Query(). GroupBy(financialaccount.FieldIsActive). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FinancialAccountQuery) IDs ¶
func (faq *FinancialAccountQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of FinancialAccount IDs.
func (*FinancialAccountQuery) IDsX ¶
func (faq *FinancialAccountQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*FinancialAccountQuery) Limit ¶
func (faq *FinancialAccountQuery) Limit(limit int) *FinancialAccountQuery
Limit the number of records to be returned by this query.
func (*FinancialAccountQuery) Offset ¶
func (faq *FinancialAccountQuery) Offset(offset int) *FinancialAccountQuery
Offset to start from.
func (*FinancialAccountQuery) Only ¶
func (faq *FinancialAccountQuery) Only(ctx context.Context) (*FinancialAccount, error)
Only returns a single FinancialAccount entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one FinancialAccount entity is found. Returns a *NotFoundError when no FinancialAccount entities are found.
func (*FinancialAccountQuery) OnlyID ¶
func (faq *FinancialAccountQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only FinancialAccount ID in the query. Returns a *NotSingularError when more than one FinancialAccount ID is found. Returns a *NotFoundError when no entities are found.
func (*FinancialAccountQuery) OnlyIDX ¶
func (faq *FinancialAccountQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*FinancialAccountQuery) OnlyX ¶
func (faq *FinancialAccountQuery) OnlyX(ctx context.Context) *FinancialAccount
OnlyX is like Only, but panics if an error occurs.
func (*FinancialAccountQuery) Order ¶
func (faq *FinancialAccountQuery) Order(o ...OrderFunc) *FinancialAccountQuery
Order specifies how the records should be ordered.
func (*FinancialAccountQuery) QueryCards ¶
func (faq *FinancialAccountQuery) QueryCards() *CardQuery
QueryCards chains the current query on the "cards" edge.
func (*FinancialAccountQuery) QueryOwner ¶
func (faq *FinancialAccountQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*FinancialAccountQuery) Select ¶
func (faq *FinancialAccountQuery) Select(fields ...string) *FinancialAccountSelect
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 { IsActive bool `json:"is_active,omitempty"` } client.FinancialAccount.Query(). Select(financialaccount.FieldIsActive). Scan(ctx, &v)
func (*FinancialAccountQuery) Unique ¶
func (faq *FinancialAccountQuery) Unique(unique bool) *FinancialAccountQuery
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 (*FinancialAccountQuery) Where ¶
func (faq *FinancialAccountQuery) Where(ps ...predicate.FinancialAccount) *FinancialAccountQuery
Where adds a new predicate for the FinancialAccountQuery builder.
func (*FinancialAccountQuery) WithCards ¶
func (faq *FinancialAccountQuery) WithCards(opts ...func(*CardQuery)) *FinancialAccountQuery
WithCards tells the query-builder to eager-load the nodes that are connected to the "cards" edge. The optional arguments are used to configure the query builder of the edge.
func (*FinancialAccountQuery) WithOwner ¶
func (faq *FinancialAccountQuery) WithOwner(opts ...func(*UserQuery)) *FinancialAccountQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type FinancialAccountSelect ¶
type FinancialAccountSelect struct { *FinancialAccountQuery // contains filtered or unexported fields }
FinancialAccountSelect is the builder for selecting fields of FinancialAccount entities.
func (*FinancialAccountSelect) Aggregate ¶
func (fas *FinancialAccountSelect) Aggregate(fns ...AggregateFunc) *FinancialAccountSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FinancialAccountSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FinancialAccountSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FinancialAccountSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FinancialAccountSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FinancialAccountSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*FinancialAccountSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FinancialAccountSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FinancialAccountSelect) Scan ¶
func (fas *FinancialAccountSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FinancialAccountSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FinancialAccountUpdate ¶
type FinancialAccountUpdate struct {
// contains filtered or unexported fields
}
FinancialAccountUpdate is the builder for updating FinancialAccount entities.
func (*FinancialAccountUpdate) AddBalance ¶
func (fau *FinancialAccountUpdate) AddBalance(f float64) *FinancialAccountUpdate
AddBalance adds f to the "balance" field.
func (*FinancialAccountUpdate) AddCardIDs ¶
func (fau *FinancialAccountUpdate) AddCardIDs(ids ...string) *FinancialAccountUpdate
AddCardIDs adds the "cards" edge to the Card entity by IDs.
func (*FinancialAccountUpdate) AddCards ¶
func (fau *FinancialAccountUpdate) AddCards(c ...*Card) *FinancialAccountUpdate
AddCards adds the "cards" edges to the Card entity.
func (*FinancialAccountUpdate) AddVersion ¶
func (fau *FinancialAccountUpdate) AddVersion(u int32) *FinancialAccountUpdate
AddVersion adds u to the "version" field.
func (*FinancialAccountUpdate) ClearBankName ¶
func (fau *FinancialAccountUpdate) ClearBankName() *FinancialAccountUpdate
ClearBankName clears the value of the "bank_name" field.
func (*FinancialAccountUpdate) ClearCards ¶
func (fau *FinancialAccountUpdate) ClearCards() *FinancialAccountUpdate
ClearCards clears all "cards" edges to the Card entity.
func (*FinancialAccountUpdate) Exec ¶
func (fau *FinancialAccountUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FinancialAccountUpdate) ExecX ¶
func (fau *FinancialAccountUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialAccountUpdate) Mutation ¶
func (fau *FinancialAccountUpdate) Mutation() *FinancialAccountMutation
Mutation returns the FinancialAccountMutation object of the builder.
func (*FinancialAccountUpdate) RemoveCardIDs ¶
func (fau *FinancialAccountUpdate) RemoveCardIDs(ids ...string) *FinancialAccountUpdate
RemoveCardIDs removes the "cards" edge to Card entities by IDs.
func (*FinancialAccountUpdate) RemoveCards ¶
func (fau *FinancialAccountUpdate) RemoveCards(c ...*Card) *FinancialAccountUpdate
RemoveCards removes "cards" edges to Card entities.
func (*FinancialAccountUpdate) Save ¶
func (fau *FinancialAccountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FinancialAccountUpdate) SaveX ¶
func (fau *FinancialAccountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FinancialAccountUpdate) SetAccountType ¶
func (fau *FinancialAccountUpdate) SetAccountType(s string) *FinancialAccountUpdate
SetAccountType sets the "account_type" field.
func (*FinancialAccountUpdate) SetBalance ¶
func (fau *FinancialAccountUpdate) SetBalance(f float64) *FinancialAccountUpdate
SetBalance sets the "balance" field.
func (*FinancialAccountUpdate) SetBankName ¶
func (fau *FinancialAccountUpdate) SetBankName(s string) *FinancialAccountUpdate
SetBankName sets the "bank_name" field.
func (*FinancialAccountUpdate) SetCurrencyCode ¶
func (fau *FinancialAccountUpdate) SetCurrencyCode(s string) *FinancialAccountUpdate
SetCurrencyCode sets the "currency_code" field.
func (*FinancialAccountUpdate) SetDisplayName ¶
func (fau *FinancialAccountUpdate) SetDisplayName(s string) *FinancialAccountUpdate
SetDisplayName sets the "display_name" field.
func (*FinancialAccountUpdate) SetIsActive ¶
func (fau *FinancialAccountUpdate) SetIsActive(b bool) *FinancialAccountUpdate
SetIsActive sets the "is_active" field.
func (*FinancialAccountUpdate) SetNillableBankName ¶
func (fau *FinancialAccountUpdate) SetNillableBankName(s *string) *FinancialAccountUpdate
SetNillableBankName sets the "bank_name" field if the given value is not nil.
func (*FinancialAccountUpdate) SetUpdatedAt ¶
func (fau *FinancialAccountUpdate) SetUpdatedAt(t time.Time) *FinancialAccountUpdate
SetUpdatedAt sets the "updated_at" field.
func (*FinancialAccountUpdate) SetVersion ¶
func (fau *FinancialAccountUpdate) SetVersion(u uint32) *FinancialAccountUpdate
SetVersion sets the "version" field.
func (*FinancialAccountUpdate) Where ¶
func (fau *FinancialAccountUpdate) Where(ps ...predicate.FinancialAccount) *FinancialAccountUpdate
Where appends a list predicates to the FinancialAccountUpdate builder.
type FinancialAccountUpdateOne ¶
type FinancialAccountUpdateOne struct {
// contains filtered or unexported fields
}
FinancialAccountUpdateOne is the builder for updating a single FinancialAccount entity.
func (*FinancialAccountUpdateOne) AddBalance ¶
func (fauo *FinancialAccountUpdateOne) AddBalance(f float64) *FinancialAccountUpdateOne
AddBalance adds f to the "balance" field.
func (*FinancialAccountUpdateOne) AddCardIDs ¶
func (fauo *FinancialAccountUpdateOne) AddCardIDs(ids ...string) *FinancialAccountUpdateOne
AddCardIDs adds the "cards" edge to the Card entity by IDs.
func (*FinancialAccountUpdateOne) AddCards ¶
func (fauo *FinancialAccountUpdateOne) AddCards(c ...*Card) *FinancialAccountUpdateOne
AddCards adds the "cards" edges to the Card entity.
func (*FinancialAccountUpdateOne) AddVersion ¶
func (fauo *FinancialAccountUpdateOne) AddVersion(u int32) *FinancialAccountUpdateOne
AddVersion adds u to the "version" field.
func (*FinancialAccountUpdateOne) ClearBankName ¶
func (fauo *FinancialAccountUpdateOne) ClearBankName() *FinancialAccountUpdateOne
ClearBankName clears the value of the "bank_name" field.
func (*FinancialAccountUpdateOne) ClearCards ¶
func (fauo *FinancialAccountUpdateOne) ClearCards() *FinancialAccountUpdateOne
ClearCards clears all "cards" edges to the Card entity.
func (*FinancialAccountUpdateOne) Exec ¶
func (fauo *FinancialAccountUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FinancialAccountUpdateOne) ExecX ¶
func (fauo *FinancialAccountUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialAccountUpdateOne) Mutation ¶
func (fauo *FinancialAccountUpdateOne) Mutation() *FinancialAccountMutation
Mutation returns the FinancialAccountMutation object of the builder.
func (*FinancialAccountUpdateOne) RemoveCardIDs ¶
func (fauo *FinancialAccountUpdateOne) RemoveCardIDs(ids ...string) *FinancialAccountUpdateOne
RemoveCardIDs removes the "cards" edge to Card entities by IDs.
func (*FinancialAccountUpdateOne) RemoveCards ¶
func (fauo *FinancialAccountUpdateOne) RemoveCards(c ...*Card) *FinancialAccountUpdateOne
RemoveCards removes "cards" edges to Card entities.
func (*FinancialAccountUpdateOne) Save ¶
func (fauo *FinancialAccountUpdateOne) Save(ctx context.Context) (*FinancialAccount, error)
Save executes the query and returns the updated FinancialAccount entity.
func (*FinancialAccountUpdateOne) SaveX ¶
func (fauo *FinancialAccountUpdateOne) SaveX(ctx context.Context) *FinancialAccount
SaveX is like Save, but panics if an error occurs.
func (*FinancialAccountUpdateOne) Select ¶
func (fauo *FinancialAccountUpdateOne) Select(field string, fields ...string) *FinancialAccountUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FinancialAccountUpdateOne) SetAccountType ¶
func (fauo *FinancialAccountUpdateOne) SetAccountType(s string) *FinancialAccountUpdateOne
SetAccountType sets the "account_type" field.
func (*FinancialAccountUpdateOne) SetBalance ¶
func (fauo *FinancialAccountUpdateOne) SetBalance(f float64) *FinancialAccountUpdateOne
SetBalance sets the "balance" field.
func (*FinancialAccountUpdateOne) SetBankName ¶
func (fauo *FinancialAccountUpdateOne) SetBankName(s string) *FinancialAccountUpdateOne
SetBankName sets the "bank_name" field.
func (*FinancialAccountUpdateOne) SetCurrencyCode ¶
func (fauo *FinancialAccountUpdateOne) SetCurrencyCode(s string) *FinancialAccountUpdateOne
SetCurrencyCode sets the "currency_code" field.
func (*FinancialAccountUpdateOne) SetDisplayName ¶
func (fauo *FinancialAccountUpdateOne) SetDisplayName(s string) *FinancialAccountUpdateOne
SetDisplayName sets the "display_name" field.
func (*FinancialAccountUpdateOne) SetIsActive ¶
func (fauo *FinancialAccountUpdateOne) SetIsActive(b bool) *FinancialAccountUpdateOne
SetIsActive sets the "is_active" field.
func (*FinancialAccountUpdateOne) SetNillableBankName ¶
func (fauo *FinancialAccountUpdateOne) SetNillableBankName(s *string) *FinancialAccountUpdateOne
SetNillableBankName sets the "bank_name" field if the given value is not nil.
func (*FinancialAccountUpdateOne) SetUpdatedAt ¶
func (fauo *FinancialAccountUpdateOne) SetUpdatedAt(t time.Time) *FinancialAccountUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*FinancialAccountUpdateOne) SetVersion ¶
func (fauo *FinancialAccountUpdateOne) SetVersion(u uint32) *FinancialAccountUpdateOne
SetVersion sets the "version" field.
type FinancialAccountUpsert ¶
FinancialAccountUpsert is the "OnConflict" setter.
func (*FinancialAccountUpsert) AddBalance ¶
func (u *FinancialAccountUpsert) AddBalance(v float64) *FinancialAccountUpsert
AddBalance adds v to the "balance" field.
func (*FinancialAccountUpsert) AddVersion ¶
func (u *FinancialAccountUpsert) AddVersion(v uint32) *FinancialAccountUpsert
AddVersion adds v to the "version" field.
func (*FinancialAccountUpsert) ClearBankName ¶
func (u *FinancialAccountUpsert) ClearBankName() *FinancialAccountUpsert
ClearBankName clears the value of the "bank_name" field.
func (*FinancialAccountUpsert) SetAccountType ¶
func (u *FinancialAccountUpsert) SetAccountType(v string) *FinancialAccountUpsert
SetAccountType sets the "account_type" field.
func (*FinancialAccountUpsert) SetBalance ¶
func (u *FinancialAccountUpsert) SetBalance(v float64) *FinancialAccountUpsert
SetBalance sets the "balance" field.
func (*FinancialAccountUpsert) SetBankName ¶
func (u *FinancialAccountUpsert) SetBankName(v string) *FinancialAccountUpsert
SetBankName sets the "bank_name" field.
func (*FinancialAccountUpsert) SetCurrencyCode ¶
func (u *FinancialAccountUpsert) SetCurrencyCode(v string) *FinancialAccountUpsert
SetCurrencyCode sets the "currency_code" field.
func (*FinancialAccountUpsert) SetDisplayName ¶
func (u *FinancialAccountUpsert) SetDisplayName(v string) *FinancialAccountUpsert
SetDisplayName sets the "display_name" field.
func (*FinancialAccountUpsert) SetIsActive ¶
func (u *FinancialAccountUpsert) SetIsActive(v bool) *FinancialAccountUpsert
SetIsActive sets the "is_active" field.
func (*FinancialAccountUpsert) SetUpdatedAt ¶
func (u *FinancialAccountUpsert) SetUpdatedAt(v time.Time) *FinancialAccountUpsert
SetUpdatedAt sets the "updated_at" field.
func (*FinancialAccountUpsert) SetVersion ¶
func (u *FinancialAccountUpsert) SetVersion(v uint32) *FinancialAccountUpsert
SetVersion sets the "version" field.
func (*FinancialAccountUpsert) UpdateAccountType ¶
func (u *FinancialAccountUpsert) UpdateAccountType() *FinancialAccountUpsert
UpdateAccountType sets the "account_type" field to the value that was provided on create.
func (*FinancialAccountUpsert) UpdateBalance ¶
func (u *FinancialAccountUpsert) UpdateBalance() *FinancialAccountUpsert
UpdateBalance sets the "balance" field to the value that was provided on create.
func (*FinancialAccountUpsert) UpdateBankName ¶
func (u *FinancialAccountUpsert) UpdateBankName() *FinancialAccountUpsert
UpdateBankName sets the "bank_name" field to the value that was provided on create.
func (*FinancialAccountUpsert) UpdateCurrencyCode ¶
func (u *FinancialAccountUpsert) UpdateCurrencyCode() *FinancialAccountUpsert
UpdateCurrencyCode sets the "currency_code" field to the value that was provided on create.
func (*FinancialAccountUpsert) UpdateDisplayName ¶
func (u *FinancialAccountUpsert) UpdateDisplayName() *FinancialAccountUpsert
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*FinancialAccountUpsert) UpdateIsActive ¶
func (u *FinancialAccountUpsert) UpdateIsActive() *FinancialAccountUpsert
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*FinancialAccountUpsert) UpdateUpdatedAt ¶
func (u *FinancialAccountUpsert) UpdateUpdatedAt() *FinancialAccountUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FinancialAccountUpsert) UpdateVersion ¶
func (u *FinancialAccountUpsert) UpdateVersion() *FinancialAccountUpsert
UpdateVersion sets the "version" field to the value that was provided on create.
type FinancialAccountUpsertBulk ¶
type FinancialAccountUpsertBulk struct {
// contains filtered or unexported fields
}
FinancialAccountUpsertBulk is the builder for "upsert"-ing a bulk of FinancialAccount nodes.
func (*FinancialAccountUpsertBulk) AddBalance ¶
func (u *FinancialAccountUpsertBulk) AddBalance(v float64) *FinancialAccountUpsertBulk
AddBalance adds v to the "balance" field.
func (*FinancialAccountUpsertBulk) AddVersion ¶
func (u *FinancialAccountUpsertBulk) AddVersion(v uint32) *FinancialAccountUpsertBulk
AddVersion adds v to the "version" field.
func (*FinancialAccountUpsertBulk) ClearBankName ¶
func (u *FinancialAccountUpsertBulk) ClearBankName() *FinancialAccountUpsertBulk
ClearBankName clears the value of the "bank_name" field.
func (*FinancialAccountUpsertBulk) DoNothing ¶
func (u *FinancialAccountUpsertBulk) DoNothing() *FinancialAccountUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FinancialAccountUpsertBulk) Exec ¶
func (u *FinancialAccountUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FinancialAccountUpsertBulk) ExecX ¶
func (u *FinancialAccountUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialAccountUpsertBulk) Ignore ¶
func (u *FinancialAccountUpsertBulk) Ignore() *FinancialAccountUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.FinancialAccount.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FinancialAccountUpsertBulk) SetAccountType ¶
func (u *FinancialAccountUpsertBulk) SetAccountType(v string) *FinancialAccountUpsertBulk
SetAccountType sets the "account_type" field.
func (*FinancialAccountUpsertBulk) SetBalance ¶
func (u *FinancialAccountUpsertBulk) SetBalance(v float64) *FinancialAccountUpsertBulk
SetBalance sets the "balance" field.
func (*FinancialAccountUpsertBulk) SetBankName ¶
func (u *FinancialAccountUpsertBulk) SetBankName(v string) *FinancialAccountUpsertBulk
SetBankName sets the "bank_name" field.
func (*FinancialAccountUpsertBulk) SetCurrencyCode ¶
func (u *FinancialAccountUpsertBulk) SetCurrencyCode(v string) *FinancialAccountUpsertBulk
SetCurrencyCode sets the "currency_code" field.
func (*FinancialAccountUpsertBulk) SetDisplayName ¶
func (u *FinancialAccountUpsertBulk) SetDisplayName(v string) *FinancialAccountUpsertBulk
SetDisplayName sets the "display_name" field.
func (*FinancialAccountUpsertBulk) SetIsActive ¶
func (u *FinancialAccountUpsertBulk) SetIsActive(v bool) *FinancialAccountUpsertBulk
SetIsActive sets the "is_active" field.
func (*FinancialAccountUpsertBulk) SetUpdatedAt ¶
func (u *FinancialAccountUpsertBulk) SetUpdatedAt(v time.Time) *FinancialAccountUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*FinancialAccountUpsertBulk) SetVersion ¶
func (u *FinancialAccountUpsertBulk) SetVersion(v uint32) *FinancialAccountUpsertBulk
SetVersion sets the "version" field.
func (*FinancialAccountUpsertBulk) Update ¶
func (u *FinancialAccountUpsertBulk) Update(set func(*FinancialAccountUpsert)) *FinancialAccountUpsertBulk
Update allows overriding fields `UPDATE` values. See the FinancialAccountCreateBulk.OnConflict documentation for more info.
func (*FinancialAccountUpsertBulk) UpdateAccountType ¶
func (u *FinancialAccountUpsertBulk) UpdateAccountType() *FinancialAccountUpsertBulk
UpdateAccountType sets the "account_type" field to the value that was provided on create.
func (*FinancialAccountUpsertBulk) UpdateBalance ¶
func (u *FinancialAccountUpsertBulk) UpdateBalance() *FinancialAccountUpsertBulk
UpdateBalance sets the "balance" field to the value that was provided on create.
func (*FinancialAccountUpsertBulk) UpdateBankName ¶
func (u *FinancialAccountUpsertBulk) UpdateBankName() *FinancialAccountUpsertBulk
UpdateBankName sets the "bank_name" field to the value that was provided on create.
func (*FinancialAccountUpsertBulk) UpdateCurrencyCode ¶
func (u *FinancialAccountUpsertBulk) UpdateCurrencyCode() *FinancialAccountUpsertBulk
UpdateCurrencyCode sets the "currency_code" field to the value that was provided on create.
func (*FinancialAccountUpsertBulk) UpdateDisplayName ¶
func (u *FinancialAccountUpsertBulk) UpdateDisplayName() *FinancialAccountUpsertBulk
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*FinancialAccountUpsertBulk) UpdateIsActive ¶
func (u *FinancialAccountUpsertBulk) UpdateIsActive() *FinancialAccountUpsertBulk
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*FinancialAccountUpsertBulk) UpdateNewValues ¶
func (u *FinancialAccountUpsertBulk) UpdateNewValues() *FinancialAccountUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.FinancialAccount.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(financialaccount.FieldID) }), ). Exec(ctx)
func (*FinancialAccountUpsertBulk) UpdateUpdatedAt ¶
func (u *FinancialAccountUpsertBulk) UpdateUpdatedAt() *FinancialAccountUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FinancialAccountUpsertBulk) UpdateVersion ¶
func (u *FinancialAccountUpsertBulk) UpdateVersion() *FinancialAccountUpsertBulk
UpdateVersion sets the "version" field to the value that was provided on create.
type FinancialAccountUpsertOne ¶
type FinancialAccountUpsertOne struct {
// contains filtered or unexported fields
}
FinancialAccountUpsertOne is the builder for "upsert"-ing
one FinancialAccount node.
func (*FinancialAccountUpsertOne) AddBalance ¶
func (u *FinancialAccountUpsertOne) AddBalance(v float64) *FinancialAccountUpsertOne
AddBalance adds v to the "balance" field.
func (*FinancialAccountUpsertOne) AddVersion ¶
func (u *FinancialAccountUpsertOne) AddVersion(v uint32) *FinancialAccountUpsertOne
AddVersion adds v to the "version" field.
func (*FinancialAccountUpsertOne) ClearBankName ¶
func (u *FinancialAccountUpsertOne) ClearBankName() *FinancialAccountUpsertOne
ClearBankName clears the value of the "bank_name" field.
func (*FinancialAccountUpsertOne) DoNothing ¶
func (u *FinancialAccountUpsertOne) DoNothing() *FinancialAccountUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FinancialAccountUpsertOne) Exec ¶
func (u *FinancialAccountUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*FinancialAccountUpsertOne) ExecX ¶
func (u *FinancialAccountUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialAccountUpsertOne) ID ¶
func (u *FinancialAccountUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*FinancialAccountUpsertOne) IDX ¶
func (u *FinancialAccountUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*FinancialAccountUpsertOne) Ignore ¶
func (u *FinancialAccountUpsertOne) Ignore() *FinancialAccountUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.FinancialAccount.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FinancialAccountUpsertOne) SetAccountType ¶
func (u *FinancialAccountUpsertOne) SetAccountType(v string) *FinancialAccountUpsertOne
SetAccountType sets the "account_type" field.
func (*FinancialAccountUpsertOne) SetBalance ¶
func (u *FinancialAccountUpsertOne) SetBalance(v float64) *FinancialAccountUpsertOne
SetBalance sets the "balance" field.
func (*FinancialAccountUpsertOne) SetBankName ¶
func (u *FinancialAccountUpsertOne) SetBankName(v string) *FinancialAccountUpsertOne
SetBankName sets the "bank_name" field.
func (*FinancialAccountUpsertOne) SetCurrencyCode ¶
func (u *FinancialAccountUpsertOne) SetCurrencyCode(v string) *FinancialAccountUpsertOne
SetCurrencyCode sets the "currency_code" field.
func (*FinancialAccountUpsertOne) SetDisplayName ¶
func (u *FinancialAccountUpsertOne) SetDisplayName(v string) *FinancialAccountUpsertOne
SetDisplayName sets the "display_name" field.
func (*FinancialAccountUpsertOne) SetIsActive ¶
func (u *FinancialAccountUpsertOne) SetIsActive(v bool) *FinancialAccountUpsertOne
SetIsActive sets the "is_active" field.
func (*FinancialAccountUpsertOne) SetUpdatedAt ¶
func (u *FinancialAccountUpsertOne) SetUpdatedAt(v time.Time) *FinancialAccountUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*FinancialAccountUpsertOne) SetVersion ¶
func (u *FinancialAccountUpsertOne) SetVersion(v uint32) *FinancialAccountUpsertOne
SetVersion sets the "version" field.
func (*FinancialAccountUpsertOne) Update ¶
func (u *FinancialAccountUpsertOne) Update(set func(*FinancialAccountUpsert)) *FinancialAccountUpsertOne
Update allows overriding fields `UPDATE` values. See the FinancialAccountCreate.OnConflict documentation for more info.
func (*FinancialAccountUpsertOne) UpdateAccountType ¶
func (u *FinancialAccountUpsertOne) UpdateAccountType() *FinancialAccountUpsertOne
UpdateAccountType sets the "account_type" field to the value that was provided on create.
func (*FinancialAccountUpsertOne) UpdateBalance ¶
func (u *FinancialAccountUpsertOne) UpdateBalance() *FinancialAccountUpsertOne
UpdateBalance sets the "balance" field to the value that was provided on create.
func (*FinancialAccountUpsertOne) UpdateBankName ¶
func (u *FinancialAccountUpsertOne) UpdateBankName() *FinancialAccountUpsertOne
UpdateBankName sets the "bank_name" field to the value that was provided on create.
func (*FinancialAccountUpsertOne) UpdateCurrencyCode ¶
func (u *FinancialAccountUpsertOne) UpdateCurrencyCode() *FinancialAccountUpsertOne
UpdateCurrencyCode sets the "currency_code" field to the value that was provided on create.
func (*FinancialAccountUpsertOne) UpdateDisplayName ¶
func (u *FinancialAccountUpsertOne) UpdateDisplayName() *FinancialAccountUpsertOne
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*FinancialAccountUpsertOne) UpdateIsActive ¶
func (u *FinancialAccountUpsertOne) UpdateIsActive() *FinancialAccountUpsertOne
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*FinancialAccountUpsertOne) UpdateNewValues ¶
func (u *FinancialAccountUpsertOne) UpdateNewValues() *FinancialAccountUpsertOne
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.FinancialAccount.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(financialaccount.FieldID) }), ). Exec(ctx)
func (*FinancialAccountUpsertOne) UpdateUpdatedAt ¶
func (u *FinancialAccountUpsertOne) UpdateUpdatedAt() *FinancialAccountUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FinancialAccountUpsertOne) UpdateVersion ¶
func (u *FinancialAccountUpsertOne) UpdateVersion() *FinancialAccountUpsertOne
UpdateVersion sets the "version" field to the value that was provided on create.
type FinancialAccounts ¶
type FinancialAccounts []*FinancialAccount
FinancialAccounts is a parsable slice of FinancialAccount.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Card is the client for interacting with the Card builders. Card *CardClient // Contact is the client for interacting with the Contact builders. Contact *ContactClient // FinancialAccount is the client for interacting with the FinancialAccount builders. FinancialAccount *FinancialAccountClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID string `json:"id,omitempty"` // IsActive holds the value of the "is_active" field. IsActive bool `json:"is_active,omitempty"` // Version holds the value of the "version" field. Version uint32 `json:"version,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DisplayName holds the value of the "display_name" field. DisplayName string `json:"display_name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryCards ¶
QueryCards queries the "cards" edge of the User entity.
func (*User) QueryContactLinks ¶
func (u *User) QueryContactLinks() *ContactQuery
QueryContactLinks queries the "contact_links" edge of the User entity.
func (*User) QueryContacts ¶
func (u *User) QueryContacts() *ContactQuery
QueryContacts queries the "contacts" edge of the User entity.
func (*User) QueryFinancialAccounts ¶
func (u *User) QueryFinancialAccounts() *FinancialAccountQuery
QueryFinancialAccounts queries the "financial_accounts" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User 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 (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id string) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id string) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryCards ¶
func (c *UserClient) QueryCards(u *User) *CardQuery
QueryCards queries the cards edge of a User.
func (*UserClient) QueryContactLinks ¶
func (c *UserClient) QueryContactLinks(u *User) *ContactQuery
QueryContactLinks queries the contact_links edge of a User.
func (*UserClient) QueryContacts ¶
func (c *UserClient) QueryContacts(u *User) *ContactQuery
QueryContacts queries the contacts edge of a User.
func (*UserClient) QueryFinancialAccounts ¶
func (c *UserClient) QueryFinancialAccounts(u *User) *FinancialAccountQuery
QueryFinancialAccounts queries the financial_accounts edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id string) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddCardIDs ¶
func (uc *UserCreate) AddCardIDs(ids ...string) *UserCreate
AddCardIDs adds the "cards" edge to the Card entity by IDs.
func (*UserCreate) AddCards ¶
func (uc *UserCreate) AddCards(c ...*Card) *UserCreate
AddCards adds the "cards" edges to the Card entity.
func (*UserCreate) AddContactIDs ¶
func (uc *UserCreate) AddContactIDs(ids ...string) *UserCreate
AddContactIDs adds the "contacts" edge to the Contact entity by IDs.
func (*UserCreate) AddContactLinkIDs ¶
func (uc *UserCreate) AddContactLinkIDs(ids ...string) *UserCreate
AddContactLinkIDs adds the "contact_links" edge to the Contact entity by IDs.
func (*UserCreate) AddContactLinks ¶
func (uc *UserCreate) AddContactLinks(c ...*Contact) *UserCreate
AddContactLinks adds the "contact_links" edges to the Contact entity.
func (*UserCreate) AddContacts ¶
func (uc *UserCreate) AddContacts(c ...*Contact) *UserCreate
AddContacts adds the "contacts" edges to the Contact entity.
func (*UserCreate) AddFinancialAccountIDs ¶
func (uc *UserCreate) AddFinancialAccountIDs(ids ...string) *UserCreate
AddFinancialAccountIDs adds the "financial_accounts" edge to the FinancialAccount entity by IDs.
func (*UserCreate) AddFinancialAccounts ¶
func (uc *UserCreate) AddFinancialAccounts(f ...*FinancialAccount) *UserCreate
AddFinancialAccounts adds the "financial_accounts" edges to the FinancialAccount entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetIsActive(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.UserUpsert) { SetIsActive(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetDisplayName ¶
func (uc *UserCreate) SetDisplayName(s string) *UserCreate
SetDisplayName sets the "display_name" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(s string) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIsActive ¶
func (uc *UserCreate) SetIsActive(b bool) *UserCreate
SetIsActive sets the "is_active" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserCreate) SetVersion ¶
func (uc *UserCreate) SetVersion(u uint32) *UserCreate
SetVersion sets the "version" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.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.UserUpsert) { SetIsActive(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEdges ¶
type UserEdges struct { // Contacts holds the value of the contacts edge. Contacts []*Contact `json:"contacts,omitempty"` // ContactLinks holds the value of the contact_links edge. ContactLinks []*Contact `json:"contact_links,omitempty"` // FinancialAccounts holds the value of the financial_accounts edge. FinancialAccounts []*FinancialAccount `json:"financial_accounts,omitempty"` // Cards holds the value of the cards edge. Cards []*Card `json:"cards,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) CardsOrErr ¶
CardsOrErr returns the Cards value or an error if the edge was not loaded in eager-loading.
func (UserEdges) ContactLinksOrErr ¶
ContactLinksOrErr returns the ContactLinks value or an error if the edge was not loaded in eager-loading.
func (UserEdges) ContactsOrErr ¶
ContactsOrErr returns the Contacts value or an error if the edge was not loaded in eager-loading.
func (UserEdges) FinancialAccountsOrErr ¶
func (e UserEdges) FinancialAccountsOrErr() ([]*FinancialAccount, error)
FinancialAccountsOrErr returns the FinancialAccounts value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddCardIDs ¶
func (m *UserMutation) AddCardIDs(ids ...string)
AddCardIDs adds the "cards" edge to the Card entity by ids.
func (*UserMutation) AddContactIDs ¶
func (m *UserMutation) AddContactIDs(ids ...string)
AddContactIDs adds the "contacts" edge to the Contact entity by ids.
func (*UserMutation) AddContactLinkIDs ¶
func (m *UserMutation) AddContactLinkIDs(ids ...string)
AddContactLinkIDs adds the "contact_links" edge to the Contact entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) 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 (*UserMutation) AddFinancialAccountIDs ¶
func (m *UserMutation) AddFinancialAccountIDs(ids ...string)
AddFinancialAccountIDs adds the "financial_accounts" edge to the FinancialAccount entity by ids.
func (*UserMutation) AddVersion ¶
func (m *UserMutation) AddVersion(u int32)
AddVersion adds u to the "version" field.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) 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 (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AddedVersion ¶
func (m *UserMutation) AddedVersion() (r int32, exists bool)
AddedVersion returns the value that was added to the "version" field in this mutation.
func (*UserMutation) CardsCleared ¶
func (m *UserMutation) CardsCleared() bool
CardsCleared reports if the "cards" edge to the Card entity was cleared.
func (*UserMutation) CardsIDs ¶
func (m *UserMutation) CardsIDs() (ids []string)
CardsIDs returns the "cards" edge IDs in the mutation.
func (*UserMutation) ClearCards ¶
func (m *UserMutation) ClearCards()
ClearCards clears the "cards" edge to the Card entity.
func (*UserMutation) ClearContactLinks ¶
func (m *UserMutation) ClearContactLinks()
ClearContactLinks clears the "contact_links" edge to the Contact entity.
func (*UserMutation) ClearContacts ¶
func (m *UserMutation) ClearContacts()
ClearContacts clears the "contacts" edge to the Contact entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) 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 (*UserMutation) ClearField ¶
func (m *UserMutation) 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 (*UserMutation) ClearFinancialAccounts ¶
func (m *UserMutation) ClearFinancialAccounts()
ClearFinancialAccounts clears the "financial_accounts" edge to the FinancialAccount entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) 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 (*UserMutation) ContactLinksCleared ¶
func (m *UserMutation) ContactLinksCleared() bool
ContactLinksCleared reports if the "contact_links" edge to the Contact entity was cleared.
func (*UserMutation) ContactLinksIDs ¶
func (m *UserMutation) ContactLinksIDs() (ids []string)
ContactLinksIDs returns the "contact_links" edge IDs in the mutation.
func (*UserMutation) ContactsCleared ¶
func (m *UserMutation) ContactsCleared() bool
ContactsCleared reports if the "contacts" edge to the Contact entity was cleared.
func (*UserMutation) ContactsIDs ¶
func (m *UserMutation) ContactsIDs() (ids []string)
ContactsIDs returns the "contacts" edge IDs in the mutation.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) DisplayName ¶
func (m *UserMutation) DisplayName() (r string, exists bool)
DisplayName returns the value of the "display_name" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) 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 (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) 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 (*UserMutation) FinancialAccountsCleared ¶
func (m *UserMutation) FinancialAccountsCleared() bool
FinancialAccountsCleared reports if the "financial_accounts" edge to the FinancialAccount entity was cleared.
func (*UserMutation) FinancialAccountsIDs ¶
func (m *UserMutation) FinancialAccountsIDs() (ids []string)
FinancialAccountsIDs returns the "financial_accounts" edge IDs in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) IsActive ¶
func (m *UserMutation) IsActive() (r bool, exists bool)
IsActive returns the value of the "is_active" field in the mutation.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User 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 (*UserMutation) OldDisplayName ¶
func (m *UserMutation) OldDisplayName(ctx context.Context) (v string, err error)
OldDisplayName returns the old "display_name" field's value of the User entity. If the User 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 (*UserMutation) 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 (*UserMutation) OldIsActive ¶
func (m *UserMutation) OldIsActive(ctx context.Context) (v bool, err error)
OldIsActive returns the old "is_active" field's value of the User entity. If the User 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 (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User 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 (*UserMutation) OldVersion ¶
func (m *UserMutation) OldVersion(ctx context.Context) (v uint32, err error)
OldVersion returns the old "version" field's value of the User entity. If the User 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 (*UserMutation) RemoveCardIDs ¶
func (m *UserMutation) RemoveCardIDs(ids ...string)
RemoveCardIDs removes the "cards" edge to the Card entity by IDs.
func (*UserMutation) RemoveContactIDs ¶
func (m *UserMutation) RemoveContactIDs(ids ...string)
RemoveContactIDs removes the "contacts" edge to the Contact entity by IDs.
func (*UserMutation) RemoveContactLinkIDs ¶
func (m *UserMutation) RemoveContactLinkIDs(ids ...string)
RemoveContactLinkIDs removes the "contact_links" edge to the Contact entity by IDs.
func (*UserMutation) RemoveFinancialAccountIDs ¶
func (m *UserMutation) RemoveFinancialAccountIDs(ids ...string)
RemoveFinancialAccountIDs removes the "financial_accounts" edge to the FinancialAccount entity by IDs.
func (*UserMutation) RemovedCardsIDs ¶
func (m *UserMutation) RemovedCardsIDs() (ids []string)
RemovedCards returns the removed IDs of the "cards" edge to the Card entity.
func (*UserMutation) RemovedContactLinksIDs ¶
func (m *UserMutation) RemovedContactLinksIDs() (ids []string)
RemovedContactLinks returns the removed IDs of the "contact_links" edge to the Contact entity.
func (*UserMutation) RemovedContactsIDs ¶
func (m *UserMutation) RemovedContactsIDs() (ids []string)
RemovedContacts returns the removed IDs of the "contacts" edge to the Contact entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedFinancialAccountsIDs ¶
func (m *UserMutation) RemovedFinancialAccountsIDs() (ids []string)
RemovedFinancialAccounts returns the removed IDs of the "financial_accounts" edge to the FinancialAccount entity.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) 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 (*UserMutation) ResetCards ¶
func (m *UserMutation) ResetCards()
ResetCards resets all changes to the "cards" edge.
func (*UserMutation) ResetContactLinks ¶
func (m *UserMutation) ResetContactLinks()
ResetContactLinks resets all changes to the "contact_links" edge.
func (*UserMutation) ResetContacts ¶
func (m *UserMutation) ResetContacts()
ResetContacts resets all changes to the "contacts" edge.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetDisplayName ¶
func (m *UserMutation) ResetDisplayName()
ResetDisplayName resets all changes to the "display_name" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) 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 (*UserMutation) ResetField ¶
func (m *UserMutation) 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 (*UserMutation) ResetFinancialAccounts ¶
func (m *UserMutation) ResetFinancialAccounts()
ResetFinancialAccounts resets all changes to the "financial_accounts" edge.
func (*UserMutation) ResetIsActive ¶
func (m *UserMutation) ResetIsActive()
ResetIsActive resets all changes to the "is_active" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) ResetVersion ¶
func (m *UserMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetDisplayName ¶
func (m *UserMutation) SetDisplayName(s string)
SetDisplayName sets the "display_name" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) 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 (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetIsActive ¶
func (m *UserMutation) SetIsActive(b bool)
SetIsActive sets the "is_active" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) SetVersion ¶
func (m *UserMutation) SetVersion(u uint32)
SetVersion sets the "version" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Version ¶
func (m *UserMutation) Version() (r uint32, exists bool)
Version returns the value of the "version" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
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 { IsActive bool `json:"is_active,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldIsActive). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryCards ¶
QueryCards chains the current query on the "cards" edge.
func (*UserQuery) QueryContactLinks ¶
func (uq *UserQuery) QueryContactLinks() *ContactQuery
QueryContactLinks chains the current query on the "contact_links" edge.
func (*UserQuery) QueryContacts ¶
func (uq *UserQuery) QueryContacts() *ContactQuery
QueryContacts chains the current query on the "contacts" edge.
func (*UserQuery) QueryFinancialAccounts ¶
func (uq *UserQuery) QueryFinancialAccounts() *FinancialAccountQuery
QueryFinancialAccounts chains the current query on the "financial_accounts" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
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 { IsActive bool `json:"is_active,omitempty"` } client.User.Query(). Select(user.FieldIsActive). Scan(ctx, &v)
func (*UserQuery) Unique ¶
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 (*UserQuery) WithCards ¶
WithCards tells the query-builder to eager-load the nodes that are connected to the "cards" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithContactLinks ¶
func (uq *UserQuery) WithContactLinks(opts ...func(*ContactQuery)) *UserQuery
WithContactLinks tells the query-builder to eager-load the nodes that are connected to the "contact_links" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithContacts ¶
func (uq *UserQuery) WithContacts(opts ...func(*ContactQuery)) *UserQuery
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 (*UserQuery) WithFinancialAccounts ¶
func (uq *UserQuery) WithFinancialAccounts(opts ...func(*FinancialAccountQuery)) *UserQuery
WithFinancialAccounts tells the query-builder to eager-load the nodes that are connected to the "financial_accounts" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddCardIDs ¶
func (uu *UserUpdate) AddCardIDs(ids ...string) *UserUpdate
AddCardIDs adds the "cards" edge to the Card entity by IDs.
func (*UserUpdate) AddCards ¶
func (uu *UserUpdate) AddCards(c ...*Card) *UserUpdate
AddCards adds the "cards" edges to the Card entity.
func (*UserUpdate) AddContactIDs ¶
func (uu *UserUpdate) AddContactIDs(ids ...string) *UserUpdate
AddContactIDs adds the "contacts" edge to the Contact entity by IDs.
func (*UserUpdate) AddContactLinkIDs ¶
func (uu *UserUpdate) AddContactLinkIDs(ids ...string) *UserUpdate
AddContactLinkIDs adds the "contact_links" edge to the Contact entity by IDs.
func (*UserUpdate) AddContactLinks ¶
func (uu *UserUpdate) AddContactLinks(c ...*Contact) *UserUpdate
AddContactLinks adds the "contact_links" edges to the Contact entity.
func (*UserUpdate) AddContacts ¶
func (uu *UserUpdate) AddContacts(c ...*Contact) *UserUpdate
AddContacts adds the "contacts" edges to the Contact entity.
func (*UserUpdate) AddFinancialAccountIDs ¶
func (uu *UserUpdate) AddFinancialAccountIDs(ids ...string) *UserUpdate
AddFinancialAccountIDs adds the "financial_accounts" edge to the FinancialAccount entity by IDs.
func (*UserUpdate) AddFinancialAccounts ¶
func (uu *UserUpdate) AddFinancialAccounts(f ...*FinancialAccount) *UserUpdate
AddFinancialAccounts adds the "financial_accounts" edges to the FinancialAccount entity.
func (*UserUpdate) AddVersion ¶
func (uu *UserUpdate) AddVersion(u int32) *UserUpdate
AddVersion adds u to the "version" field.
func (*UserUpdate) ClearCards ¶
func (uu *UserUpdate) ClearCards() *UserUpdate
ClearCards clears all "cards" edges to the Card entity.
func (*UserUpdate) ClearContactLinks ¶
func (uu *UserUpdate) ClearContactLinks() *UserUpdate
ClearContactLinks clears all "contact_links" edges to the Contact entity.
func (*UserUpdate) ClearContacts ¶
func (uu *UserUpdate) ClearContacts() *UserUpdate
ClearContacts clears all "contacts" edges to the Contact entity.
func (*UserUpdate) ClearFinancialAccounts ¶
func (uu *UserUpdate) ClearFinancialAccounts() *UserUpdate
ClearFinancialAccounts clears all "financial_accounts" edges to the FinancialAccount entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveCardIDs ¶
func (uu *UserUpdate) RemoveCardIDs(ids ...string) *UserUpdate
RemoveCardIDs removes the "cards" edge to Card entities by IDs.
func (*UserUpdate) RemoveCards ¶
func (uu *UserUpdate) RemoveCards(c ...*Card) *UserUpdate
RemoveCards removes "cards" edges to Card entities.
func (*UserUpdate) RemoveContactIDs ¶
func (uu *UserUpdate) RemoveContactIDs(ids ...string) *UserUpdate
RemoveContactIDs removes the "contacts" edge to Contact entities by IDs.
func (*UserUpdate) RemoveContactLinkIDs ¶
func (uu *UserUpdate) RemoveContactLinkIDs(ids ...string) *UserUpdate
RemoveContactLinkIDs removes the "contact_links" edge to Contact entities by IDs.
func (*UserUpdate) RemoveContactLinks ¶
func (uu *UserUpdate) RemoveContactLinks(c ...*Contact) *UserUpdate
RemoveContactLinks removes "contact_links" edges to Contact entities.
func (*UserUpdate) RemoveContacts ¶
func (uu *UserUpdate) RemoveContacts(c ...*Contact) *UserUpdate
RemoveContacts removes "contacts" edges to Contact entities.
func (*UserUpdate) RemoveFinancialAccountIDs ¶
func (uu *UserUpdate) RemoveFinancialAccountIDs(ids ...string) *UserUpdate
RemoveFinancialAccountIDs removes the "financial_accounts" edge to FinancialAccount entities by IDs.
func (*UserUpdate) RemoveFinancialAccounts ¶
func (uu *UserUpdate) RemoveFinancialAccounts(f ...*FinancialAccount) *UserUpdate
RemoveFinancialAccounts removes "financial_accounts" edges to FinancialAccount entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetDisplayName ¶
func (uu *UserUpdate) SetDisplayName(s string) *UserUpdate
SetDisplayName sets the "display_name" field.
func (*UserUpdate) SetIsActive ¶
func (uu *UserUpdate) SetIsActive(b bool) *UserUpdate
SetIsActive sets the "is_active" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) SetVersion ¶
func (uu *UserUpdate) SetVersion(u uint32) *UserUpdate
SetVersion sets the "version" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddCardIDs ¶
func (uuo *UserUpdateOne) AddCardIDs(ids ...string) *UserUpdateOne
AddCardIDs adds the "cards" edge to the Card entity by IDs.
func (*UserUpdateOne) AddCards ¶
func (uuo *UserUpdateOne) AddCards(c ...*Card) *UserUpdateOne
AddCards adds the "cards" edges to the Card entity.
func (*UserUpdateOne) AddContactIDs ¶
func (uuo *UserUpdateOne) AddContactIDs(ids ...string) *UserUpdateOne
AddContactIDs adds the "contacts" edge to the Contact entity by IDs.
func (*UserUpdateOne) AddContactLinkIDs ¶
func (uuo *UserUpdateOne) AddContactLinkIDs(ids ...string) *UserUpdateOne
AddContactLinkIDs adds the "contact_links" edge to the Contact entity by IDs.
func (*UserUpdateOne) AddContactLinks ¶
func (uuo *UserUpdateOne) AddContactLinks(c ...*Contact) *UserUpdateOne
AddContactLinks adds the "contact_links" edges to the Contact entity.
func (*UserUpdateOne) AddContacts ¶
func (uuo *UserUpdateOne) AddContacts(c ...*Contact) *UserUpdateOne
AddContacts adds the "contacts" edges to the Contact entity.
func (*UserUpdateOne) AddFinancialAccountIDs ¶
func (uuo *UserUpdateOne) AddFinancialAccountIDs(ids ...string) *UserUpdateOne
AddFinancialAccountIDs adds the "financial_accounts" edge to the FinancialAccount entity by IDs.
func (*UserUpdateOne) AddFinancialAccounts ¶
func (uuo *UserUpdateOne) AddFinancialAccounts(f ...*FinancialAccount) *UserUpdateOne
AddFinancialAccounts adds the "financial_accounts" edges to the FinancialAccount entity.
func (*UserUpdateOne) AddVersion ¶
func (uuo *UserUpdateOne) AddVersion(u int32) *UserUpdateOne
AddVersion adds u to the "version" field.
func (*UserUpdateOne) ClearCards ¶
func (uuo *UserUpdateOne) ClearCards() *UserUpdateOne
ClearCards clears all "cards" edges to the Card entity.
func (*UserUpdateOne) ClearContactLinks ¶
func (uuo *UserUpdateOne) ClearContactLinks() *UserUpdateOne
ClearContactLinks clears all "contact_links" edges to the Contact entity.
func (*UserUpdateOne) ClearContacts ¶
func (uuo *UserUpdateOne) ClearContacts() *UserUpdateOne
ClearContacts clears all "contacts" edges to the Contact entity.
func (*UserUpdateOne) ClearFinancialAccounts ¶
func (uuo *UserUpdateOne) ClearFinancialAccounts() *UserUpdateOne
ClearFinancialAccounts clears all "financial_accounts" edges to the FinancialAccount entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveCardIDs ¶
func (uuo *UserUpdateOne) RemoveCardIDs(ids ...string) *UserUpdateOne
RemoveCardIDs removes the "cards" edge to Card entities by IDs.
func (*UserUpdateOne) RemoveCards ¶
func (uuo *UserUpdateOne) RemoveCards(c ...*Card) *UserUpdateOne
RemoveCards removes "cards" edges to Card entities.
func (*UserUpdateOne) RemoveContactIDs ¶
func (uuo *UserUpdateOne) RemoveContactIDs(ids ...string) *UserUpdateOne
RemoveContactIDs removes the "contacts" edge to Contact entities by IDs.
func (*UserUpdateOne) RemoveContactLinkIDs ¶
func (uuo *UserUpdateOne) RemoveContactLinkIDs(ids ...string) *UserUpdateOne
RemoveContactLinkIDs removes the "contact_links" edge to Contact entities by IDs.
func (*UserUpdateOne) RemoveContactLinks ¶
func (uuo *UserUpdateOne) RemoveContactLinks(c ...*Contact) *UserUpdateOne
RemoveContactLinks removes "contact_links" edges to Contact entities.
func (*UserUpdateOne) RemoveContacts ¶
func (uuo *UserUpdateOne) RemoveContacts(c ...*Contact) *UserUpdateOne
RemoveContacts removes "contacts" edges to Contact entities.
func (*UserUpdateOne) RemoveFinancialAccountIDs ¶
func (uuo *UserUpdateOne) RemoveFinancialAccountIDs(ids ...string) *UserUpdateOne
RemoveFinancialAccountIDs removes the "financial_accounts" edge to FinancialAccount entities by IDs.
func (*UserUpdateOne) RemoveFinancialAccounts ¶
func (uuo *UserUpdateOne) RemoveFinancialAccounts(f ...*FinancialAccount) *UserUpdateOne
RemoveFinancialAccounts removes "financial_accounts" edges to FinancialAccount entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetDisplayName ¶
func (uuo *UserUpdateOne) SetDisplayName(s string) *UserUpdateOne
SetDisplayName sets the "display_name" field.
func (*UserUpdateOne) SetIsActive ¶
func (uuo *UserUpdateOne) SetIsActive(b bool) *UserUpdateOne
SetIsActive sets the "is_active" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) SetVersion ¶
func (uuo *UserUpdateOne) SetVersion(u uint32) *UserUpdateOne
SetVersion sets the "version" field.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) AddVersion ¶
func (u *UserUpsert) AddVersion(v uint32) *UserUpsert
AddVersion adds v to the "version" field.
func (*UserUpsert) SetDisplayName ¶
func (u *UserUpsert) SetDisplayName(v string) *UserUpsert
SetDisplayName sets the "display_name" field.
func (*UserUpsert) SetIsActive ¶
func (u *UserUpsert) SetIsActive(v bool) *UserUpsert
SetIsActive sets the "is_active" field.
func (*UserUpsert) SetUpdatedAt ¶
func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsert) SetVersion ¶
func (u *UserUpsert) SetVersion(v uint32) *UserUpsert
SetVersion sets the "version" field.
func (*UserUpsert) UpdateDisplayName ¶
func (u *UserUpsert) UpdateDisplayName() *UserUpsert
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*UserUpsert) UpdateIsActive ¶
func (u *UserUpsert) UpdateIsActive() *UserUpsert
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*UserUpsert) UpdateUpdatedAt ¶
func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*UserUpsert) UpdateVersion ¶
func (u *UserUpsert) UpdateVersion() *UserUpsert
UpdateVersion sets the "version" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) AddVersion ¶
func (u *UserUpsertBulk) AddVersion(v uint32) *UserUpsertBulk
AddVersion adds v to the "version" field.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetDisplayName ¶
func (u *UserUpsertBulk) SetDisplayName(v string) *UserUpsertBulk
SetDisplayName sets the "display_name" field.
func (*UserUpsertBulk) SetIsActive ¶
func (u *UserUpsertBulk) SetIsActive(v bool) *UserUpsertBulk
SetIsActive sets the "is_active" field.
func (*UserUpsertBulk) SetUpdatedAt ¶
func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsertBulk) SetVersion ¶
func (u *UserUpsertBulk) SetVersion(v uint32) *UserUpsertBulk
SetVersion sets the "version" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateDisplayName ¶
func (u *UserUpsertBulk) UpdateDisplayName() *UserUpsertBulk
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateIsActive ¶
func (u *UserUpsertBulk) UpdateIsActive() *UserUpsertBulk
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertBulk) UpdateUpdatedAt ¶
func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateVersion ¶
func (u *UserUpsertBulk) UpdateVersion() *UserUpsertBulk
UpdateVersion sets the "version" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) AddVersion ¶
func (u *UserUpsertOne) AddVersion(v uint32) *UserUpsertOne
AddVersion adds v to the "version" field.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) ID ¶
func (u *UserUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetDisplayName ¶
func (u *UserUpsertOne) SetDisplayName(v string) *UserUpsertOne
SetDisplayName sets the "display_name" field.
func (*UserUpsertOne) SetIsActive ¶
func (u *UserUpsertOne) SetIsActive(v bool) *UserUpsertOne
SetIsActive sets the "is_active" field.
func (*UserUpsertOne) SetUpdatedAt ¶
func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsertOne) SetVersion ¶
func (u *UserUpsertOne) SetVersion(v uint32) *UserUpsertOne
SetVersion sets the "version" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateDisplayName ¶
func (u *UserUpsertOne) UpdateDisplayName() *UserUpsertOne
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateIsActive ¶
func (u *UserUpsertOne) UpdateIsActive() *UserUpsertOne
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
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.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertOne) UpdateUpdatedAt ¶
func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateVersion ¶
func (u *UserUpsertOne) UpdateVersion() *UserUpsertOne
UpdateVersion sets the "version" field to the value that was provided on create.
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 ¶
- card.go
- card_create.go
- card_delete.go
- card_query.go
- card_update.go
- client.go
- config.go
- contact.go
- contact_create.go
- contact_delete.go
- contact_query.go
- contact_update.go
- context.go
- ent.go
- financialaccount.go
- financialaccount_create.go
- financialaccount_delete.go
- financialaccount_query.go
- financialaccount_update.go
- generate.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go