Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type BillingAddress
- func (ba *BillingAddress) QueryCustomer() *CustomerQuery
- func (ba *BillingAddress) QueryNotes() *NoteQuery
- func (ba *BillingAddress) String() string
- func (ba *BillingAddress) Unwrap() *BillingAddress
- func (ba *BillingAddress) Update() *BillingAddressUpdateOne
- func (ba *BillingAddress) Value(name string) (ent.Value, error)
- type BillingAddressClient
- func (c *BillingAddressClient) Create() *BillingAddressCreate
- func (c *BillingAddressClient) CreateBulk(builders ...*BillingAddressCreate) *BillingAddressCreateBulk
- func (c *BillingAddressClient) Delete() *BillingAddressDelete
- func (c *BillingAddressClient) DeleteOne(ba *BillingAddress) *BillingAddressDeleteOne
- func (c *BillingAddressClient) DeleteOneID(id int) *BillingAddressDeleteOne
- func (c *BillingAddressClient) Get(ctx context.Context, id int) (*BillingAddress, error)
- func (c *BillingAddressClient) GetX(ctx context.Context, id int) *BillingAddress
- func (c *BillingAddressClient) Hooks() []Hook
- func (c *BillingAddressClient) Intercept(interceptors ...Interceptor)
- func (c *BillingAddressClient) Interceptors() []Interceptor
- func (c *BillingAddressClient) MapCreateBulk(slice any, setFunc func(*BillingAddressCreate, int)) *BillingAddressCreateBulk
- func (c *BillingAddressClient) Query() *BillingAddressQuery
- func (c *BillingAddressClient) QueryCustomer(ba *BillingAddress) *CustomerQuery
- func (c *BillingAddressClient) QueryNotes(ba *BillingAddress) *NoteQuery
- func (c *BillingAddressClient) Update() *BillingAddressUpdate
- func (c *BillingAddressClient) UpdateOne(ba *BillingAddress) *BillingAddressUpdateOne
- func (c *BillingAddressClient) UpdateOneID(id int) *BillingAddressUpdateOne
- func (c *BillingAddressClient) Use(hooks ...Hook)
- type BillingAddressCreate
- func (bac *BillingAddressCreate) AddNoteIDs(ids ...int) *BillingAddressCreate
- func (bac *BillingAddressCreate) AddNotes(n ...*Note) *BillingAddressCreate
- func (bac *BillingAddressCreate) Exec(ctx context.Context) error
- func (bac *BillingAddressCreate) ExecX(ctx context.Context)
- func (bac *BillingAddressCreate) Mutation() *BillingAddressMutation
- func (bac *BillingAddressCreate) Save(ctx context.Context) (*BillingAddress, error)
- func (bac *BillingAddressCreate) SaveX(ctx context.Context) *BillingAddress
- func (bac *BillingAddressCreate) SetCity(s string) *BillingAddressCreate
- func (bac *BillingAddressCreate) SetCreatedAt(t time.Time) *BillingAddressCreate
- func (bac *BillingAddressCreate) SetCustomer(c *Customer) *BillingAddressCreate
- func (bac *BillingAddressCreate) SetCustomerID(id int) *BillingAddressCreate
- func (bac *BillingAddressCreate) SetNillableCreatedAt(t *time.Time) *BillingAddressCreate
- func (bac *BillingAddressCreate) SetNillableCustomerID(id *int) *BillingAddressCreate
- func (bac *BillingAddressCreate) SetNillableUpdatedAt(t *time.Time) *BillingAddressCreate
- func (bac *BillingAddressCreate) SetStreet(s string) *BillingAddressCreate
- func (bac *BillingAddressCreate) SetUpdatedAt(t time.Time) *BillingAddressCreate
- func (bac *BillingAddressCreate) SetZip(s string) *BillingAddressCreate
- type BillingAddressCreateBulk
- func (bacb *BillingAddressCreateBulk) Exec(ctx context.Context) error
- func (bacb *BillingAddressCreateBulk) ExecX(ctx context.Context)
- func (bacb *BillingAddressCreateBulk) Save(ctx context.Context) ([]*BillingAddress, error)
- func (bacb *BillingAddressCreateBulk) SaveX(ctx context.Context) []*BillingAddress
- type BillingAddressDelete
- type BillingAddressDeleteOne
- type BillingAddressEdges
- type BillingAddressGroupBy
- func (bagb *BillingAddressGroupBy) Aggregate(fns ...AggregateFunc) *BillingAddressGroupBy
- func (s *BillingAddressGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BillingAddressGroupBy) BoolX(ctx context.Context) bool
- func (s *BillingAddressGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BillingAddressGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BillingAddressGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BillingAddressGroupBy) Float64X(ctx context.Context) float64
- func (s *BillingAddressGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BillingAddressGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BillingAddressGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BillingAddressGroupBy) IntX(ctx context.Context) int
- func (s *BillingAddressGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BillingAddressGroupBy) IntsX(ctx context.Context) []int
- func (bagb *BillingAddressGroupBy) Scan(ctx context.Context, v any) error
- func (s *BillingAddressGroupBy) ScanX(ctx context.Context, v any)
- func (s *BillingAddressGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BillingAddressGroupBy) StringX(ctx context.Context) string
- func (s *BillingAddressGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BillingAddressGroupBy) StringsX(ctx context.Context) []string
- type BillingAddressMutation
- func (m *BillingAddressMutation) AddField(name string, value ent.Value) error
- func (m *BillingAddressMutation) AddNoteIDs(ids ...int)
- func (m *BillingAddressMutation) AddedEdges() []string
- func (m *BillingAddressMutation) AddedField(name string) (ent.Value, bool)
- func (m *BillingAddressMutation) AddedFields() []string
- func (m *BillingAddressMutation) AddedIDs(name string) []ent.Value
- func (m *BillingAddressMutation) City() (r string, exists bool)
- func (m *BillingAddressMutation) ClearCustomer()
- func (m *BillingAddressMutation) ClearEdge(name string) error
- func (m *BillingAddressMutation) ClearField(name string) error
- func (m *BillingAddressMutation) ClearNotes()
- func (m *BillingAddressMutation) ClearedEdges() []string
- func (m *BillingAddressMutation) ClearedFields() []string
- func (m BillingAddressMutation) Client() *Client
- func (m *BillingAddressMutation) CreatedAt() (r time.Time, exists bool)
- func (m *BillingAddressMutation) CustomerCleared() bool
- func (m *BillingAddressMutation) CustomerID() (id int, exists bool)
- func (m *BillingAddressMutation) CustomerIDs() (ids []int)
- func (m *BillingAddressMutation) EdgeCleared(name string) bool
- func (m *BillingAddressMutation) Field(name string) (ent.Value, bool)
- func (m *BillingAddressMutation) FieldCleared(name string) bool
- func (m *BillingAddressMutation) Fields() []string
- func (m *BillingAddressMutation) ID() (id int, exists bool)
- func (m *BillingAddressMutation) IDs(ctx context.Context) ([]int, error)
- func (m *BillingAddressMutation) NotesCleared() bool
- func (m *BillingAddressMutation) NotesIDs() (ids []int)
- func (m *BillingAddressMutation) OldCity(ctx context.Context) (v string, err error)
- func (m *BillingAddressMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *BillingAddressMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BillingAddressMutation) OldStreet(ctx context.Context) (v string, err error)
- func (m *BillingAddressMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *BillingAddressMutation) OldZip(ctx context.Context) (v string, err error)
- func (m *BillingAddressMutation) Op() Op
- func (m *BillingAddressMutation) RemoveNoteIDs(ids ...int)
- func (m *BillingAddressMutation) RemovedEdges() []string
- func (m *BillingAddressMutation) RemovedIDs(name string) []ent.Value
- func (m *BillingAddressMutation) RemovedNotesIDs() (ids []int)
- func (m *BillingAddressMutation) ResetCity()
- func (m *BillingAddressMutation) ResetCreatedAt()
- func (m *BillingAddressMutation) ResetCustomer()
- func (m *BillingAddressMutation) ResetEdge(name string) error
- func (m *BillingAddressMutation) ResetField(name string) error
- func (m *BillingAddressMutation) ResetNotes()
- func (m *BillingAddressMutation) ResetStreet()
- func (m *BillingAddressMutation) ResetUpdatedAt()
- func (m *BillingAddressMutation) ResetZip()
- func (m *BillingAddressMutation) SetCity(s string)
- func (m *BillingAddressMutation) SetCreatedAt(t time.Time)
- func (m *BillingAddressMutation) SetCustomerID(id int)
- func (m *BillingAddressMutation) SetField(name string, value ent.Value) error
- func (m *BillingAddressMutation) SetOp(op Op)
- func (m *BillingAddressMutation) SetStreet(s string)
- func (m *BillingAddressMutation) SetUpdatedAt(t time.Time)
- func (m *BillingAddressMutation) SetZip(s string)
- func (m *BillingAddressMutation) Street() (r string, exists bool)
- func (m BillingAddressMutation) Tx() (*Tx, error)
- func (m *BillingAddressMutation) Type() string
- func (m *BillingAddressMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *BillingAddressMutation) Where(ps ...predicate.BillingAddress)
- func (m *BillingAddressMutation) WhereP(ps ...func(*sql.Selector))
- func (m *BillingAddressMutation) Zip() (r string, exists bool)
- type BillingAddressQuery
- func (baq *BillingAddressQuery) Aggregate(fns ...AggregateFunc) *BillingAddressSelect
- func (baq *BillingAddressQuery) All(ctx context.Context) ([]*BillingAddress, error)
- func (baq *BillingAddressQuery) AllX(ctx context.Context) []*BillingAddress
- func (baq *BillingAddressQuery) Clone() *BillingAddressQuery
- func (baq *BillingAddressQuery) Count(ctx context.Context) (int, error)
- func (baq *BillingAddressQuery) CountX(ctx context.Context) int
- func (baq *BillingAddressQuery) Exist(ctx context.Context) (bool, error)
- func (baq *BillingAddressQuery) ExistX(ctx context.Context) bool
- func (baq *BillingAddressQuery) First(ctx context.Context) (*BillingAddress, error)
- func (baq *BillingAddressQuery) FirstID(ctx context.Context) (id int, err error)
- func (baq *BillingAddressQuery) FirstIDX(ctx context.Context) int
- func (baq *BillingAddressQuery) FirstX(ctx context.Context) *BillingAddress
- func (baq *BillingAddressQuery) GroupBy(field string, fields ...string) *BillingAddressGroupBy
- func (baq *BillingAddressQuery) IDs(ctx context.Context) (ids []int, err error)
- func (baq *BillingAddressQuery) IDsX(ctx context.Context) []int
- func (baq *BillingAddressQuery) Limit(limit int) *BillingAddressQuery
- func (baq *BillingAddressQuery) Offset(offset int) *BillingAddressQuery
- func (baq *BillingAddressQuery) Only(ctx context.Context) (*BillingAddress, error)
- func (baq *BillingAddressQuery) OnlyID(ctx context.Context) (id int, err error)
- func (baq *BillingAddressQuery) OnlyIDX(ctx context.Context) int
- func (baq *BillingAddressQuery) OnlyX(ctx context.Context) *BillingAddress
- func (baq *BillingAddressQuery) Order(o ...billingaddress.OrderOption) *BillingAddressQuery
- func (baq *BillingAddressQuery) QueryCustomer() *CustomerQuery
- func (baq *BillingAddressQuery) QueryNotes() *NoteQuery
- func (baq *BillingAddressQuery) Select(fields ...string) *BillingAddressSelect
- func (baq *BillingAddressQuery) Unique(unique bool) *BillingAddressQuery
- func (baq *BillingAddressQuery) Where(ps ...predicate.BillingAddress) *BillingAddressQuery
- func (baq *BillingAddressQuery) WithCustomer(opts ...func(*CustomerQuery)) *BillingAddressQuery
- func (baq *BillingAddressQuery) WithNotes(opts ...func(*NoteQuery)) *BillingAddressQuery
- type BillingAddressSelect
- func (bas *BillingAddressSelect) Aggregate(fns ...AggregateFunc) *BillingAddressSelect
- func (s *BillingAddressSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BillingAddressSelect) BoolX(ctx context.Context) bool
- func (s *BillingAddressSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BillingAddressSelect) BoolsX(ctx context.Context) []bool
- func (s *BillingAddressSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BillingAddressSelect) Float64X(ctx context.Context) float64
- func (s *BillingAddressSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BillingAddressSelect) Float64sX(ctx context.Context) []float64
- func (s *BillingAddressSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BillingAddressSelect) IntX(ctx context.Context) int
- func (s *BillingAddressSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BillingAddressSelect) IntsX(ctx context.Context) []int
- func (bas *BillingAddressSelect) Scan(ctx context.Context, v any) error
- func (s *BillingAddressSelect) ScanX(ctx context.Context, v any)
- func (s *BillingAddressSelect) String(ctx context.Context) (_ string, err error)
- func (s *BillingAddressSelect) StringX(ctx context.Context) string
- func (s *BillingAddressSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BillingAddressSelect) StringsX(ctx context.Context) []string
- type BillingAddressUpdate
- func (bau *BillingAddressUpdate) AddNoteIDs(ids ...int) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) AddNotes(n ...*Note) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) ClearCustomer() *BillingAddressUpdate
- func (bau *BillingAddressUpdate) ClearNotes() *BillingAddressUpdate
- func (bau *BillingAddressUpdate) Exec(ctx context.Context) error
- func (bau *BillingAddressUpdate) ExecX(ctx context.Context)
- func (bau *BillingAddressUpdate) Mutation() *BillingAddressMutation
- func (bau *BillingAddressUpdate) RemoveNoteIDs(ids ...int) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) RemoveNotes(n ...*Note) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) Save(ctx context.Context) (int, error)
- func (bau *BillingAddressUpdate) SaveX(ctx context.Context) int
- func (bau *BillingAddressUpdate) SetCity(s string) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) SetCustomer(c *Customer) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) SetCustomerID(id int) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) SetNillableCity(s *string) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) SetNillableCustomerID(id *int) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) SetNillableStreet(s *string) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) SetNillableZip(s *string) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) SetStreet(s string) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) SetUpdatedAt(t time.Time) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) SetZip(s string) *BillingAddressUpdate
- func (bau *BillingAddressUpdate) Where(ps ...predicate.BillingAddress) *BillingAddressUpdate
- type BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) AddNoteIDs(ids ...int) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) AddNotes(n ...*Note) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) ClearCustomer() *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) ClearNotes() *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) Exec(ctx context.Context) error
- func (bauo *BillingAddressUpdateOne) ExecX(ctx context.Context)
- func (bauo *BillingAddressUpdateOne) Mutation() *BillingAddressMutation
- func (bauo *BillingAddressUpdateOne) RemoveNoteIDs(ids ...int) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) RemoveNotes(n ...*Note) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) Save(ctx context.Context) (*BillingAddress, error)
- func (bauo *BillingAddressUpdateOne) SaveX(ctx context.Context) *BillingAddress
- func (bauo *BillingAddressUpdateOne) Select(field string, fields ...string) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) SetCity(s string) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) SetCustomer(c *Customer) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) SetCustomerID(id int) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) SetNillableCity(s *string) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) SetNillableCustomerID(id *int) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) SetNillableStreet(s *string) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) SetNillableZip(s *string) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) SetStreet(s string) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) SetUpdatedAt(t time.Time) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) SetZip(s string) *BillingAddressUpdateOne
- func (bauo *BillingAddressUpdateOne) Where(ps ...predicate.BillingAddress) *BillingAddressUpdateOne
- type BillingAddresses
- 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 Customer
- func (c *Customer) QueryBillingAddresses() *BillingAddressQuery
- func (c *Customer) QueryCreatedBy() *UserQuery
- func (c *Customer) QueryDeliveryAddresses() *DeliveryAddressQuery
- func (c *Customer) QueryLogin() *LoginQuery
- func (c *Customer) QueryNotes() *NoteQuery
- func (c *Customer) QueryOrders() *OrderQuery
- func (c *Customer) QueryTels() *TelQuery
- func (c *Customer) String() string
- func (c *Customer) Unwrap() *Customer
- func (c *Customer) Update() *CustomerUpdateOne
- func (c *Customer) Value(name string) (ent.Value, error)
- type CustomerClient
- func (c *CustomerClient) Create() *CustomerCreate
- func (c *CustomerClient) CreateBulk(builders ...*CustomerCreate) *CustomerCreateBulk
- func (c *CustomerClient) Delete() *CustomerDelete
- func (c *CustomerClient) DeleteOne(cu *Customer) *CustomerDeleteOne
- func (c *CustomerClient) DeleteOneID(id int) *CustomerDeleteOne
- func (c *CustomerClient) Get(ctx context.Context, id int) (*Customer, error)
- func (c *CustomerClient) GetX(ctx context.Context, id int) *Customer
- func (c *CustomerClient) Hooks() []Hook
- func (c *CustomerClient) Intercept(interceptors ...Interceptor)
- func (c *CustomerClient) Interceptors() []Interceptor
- func (c *CustomerClient) MapCreateBulk(slice any, setFunc func(*CustomerCreate, int)) *CustomerCreateBulk
- func (c *CustomerClient) Query() *CustomerQuery
- func (c *CustomerClient) QueryBillingAddresses(cu *Customer) *BillingAddressQuery
- func (c *CustomerClient) QueryCreatedBy(cu *Customer) *UserQuery
- func (c *CustomerClient) QueryDeliveryAddresses(cu *Customer) *DeliveryAddressQuery
- func (c *CustomerClient) QueryLogin(cu *Customer) *LoginQuery
- func (c *CustomerClient) QueryNotes(cu *Customer) *NoteQuery
- func (c *CustomerClient) QueryOrders(cu *Customer) *OrderQuery
- func (c *CustomerClient) QueryTels(cu *Customer) *TelQuery
- func (c *CustomerClient) Update() *CustomerUpdate
- func (c *CustomerClient) UpdateOne(cu *Customer) *CustomerUpdateOne
- func (c *CustomerClient) UpdateOneID(id int) *CustomerUpdateOne
- func (c *CustomerClient) Use(hooks ...Hook)
- type CustomerCreate
- func (cc *CustomerCreate) AddBillingAddressIDs(ids ...int) *CustomerCreate
- func (cc *CustomerCreate) AddBillingAddresses(b ...*BillingAddress) *CustomerCreate
- func (cc *CustomerCreate) AddDeliveryAddressIDs(ids ...int) *CustomerCreate
- func (cc *CustomerCreate) AddDeliveryAddresses(d ...*DeliveryAddress) *CustomerCreate
- func (cc *CustomerCreate) AddNoteIDs(ids ...int) *CustomerCreate
- func (cc *CustomerCreate) AddNotes(n ...*Note) *CustomerCreate
- func (cc *CustomerCreate) AddOrderIDs(ids ...int) *CustomerCreate
- func (cc *CustomerCreate) AddOrders(o ...*Order) *CustomerCreate
- func (cc *CustomerCreate) AddTelIDs(ids ...int) *CustomerCreate
- func (cc *CustomerCreate) AddTels(t ...*Tel) *CustomerCreate
- func (cc *CustomerCreate) Exec(ctx context.Context) error
- func (cc *CustomerCreate) ExecX(ctx context.Context)
- func (cc *CustomerCreate) Mutation() *CustomerMutation
- func (cc *CustomerCreate) Save(ctx context.Context) (*Customer, error)
- func (cc *CustomerCreate) SaveX(ctx context.Context) *Customer
- func (cc *CustomerCreate) SetCreatedAt(t time.Time) *CustomerCreate
- func (cc *CustomerCreate) SetCreatedBy(u *User) *CustomerCreate
- func (cc *CustomerCreate) SetCreatedByID(id int) *CustomerCreate
- func (cc *CustomerCreate) SetEmail(s string) *CustomerCreate
- func (cc *CustomerCreate) SetLogin(l *Login) *CustomerCreate
- func (cc *CustomerCreate) SetLoginID(id int) *CustomerCreate
- func (cc *CustomerCreate) SetName(s string) *CustomerCreate
- func (cc *CustomerCreate) SetNillableCreatedAt(t *time.Time) *CustomerCreate
- func (cc *CustomerCreate) SetNillableCreatedByID(id *int) *CustomerCreate
- func (cc *CustomerCreate) SetNillableLoginID(id *int) *CustomerCreate
- func (cc *CustomerCreate) SetNillableUpdatedAt(t *time.Time) *CustomerCreate
- func (cc *CustomerCreate) SetPassword(s string) *CustomerCreate
- func (cc *CustomerCreate) SetUpdatedAt(t time.Time) *CustomerCreate
- type CustomerCreateBulk
- type CustomerDelete
- type CustomerDeleteOne
- type CustomerEdges
- func (e CustomerEdges) BillingAddressesOrErr() ([]*BillingAddress, error)
- func (e CustomerEdges) CreatedByOrErr() (*User, error)
- func (e CustomerEdges) DeliveryAddressesOrErr() ([]*DeliveryAddress, error)
- func (e CustomerEdges) LoginOrErr() (*Login, error)
- func (e CustomerEdges) NotesOrErr() ([]*Note, error)
- func (e CustomerEdges) OrdersOrErr() ([]*Order, error)
- func (e CustomerEdges) TelsOrErr() ([]*Tel, error)
- type CustomerGroupBy
- func (cgb *CustomerGroupBy) Aggregate(fns ...AggregateFunc) *CustomerGroupBy
- func (s *CustomerGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CustomerGroupBy) BoolX(ctx context.Context) bool
- func (s *CustomerGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CustomerGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CustomerGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CustomerGroupBy) Float64X(ctx context.Context) float64
- func (s *CustomerGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CustomerGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CustomerGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CustomerGroupBy) IntX(ctx context.Context) int
- func (s *CustomerGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CustomerGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CustomerGroupBy) Scan(ctx context.Context, v any) error
- func (s *CustomerGroupBy) ScanX(ctx context.Context, v any)
- func (s *CustomerGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CustomerGroupBy) StringX(ctx context.Context) string
- func (s *CustomerGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CustomerGroupBy) StringsX(ctx context.Context) []string
- type CustomerMutation
- func (m *CustomerMutation) AddBillingAddressIDs(ids ...int)
- func (m *CustomerMutation) AddDeliveryAddressIDs(ids ...int)
- func (m *CustomerMutation) AddField(name string, value ent.Value) error
- func (m *CustomerMutation) AddNoteIDs(ids ...int)
- func (m *CustomerMutation) AddOrderIDs(ids ...int)
- func (m *CustomerMutation) AddTelIDs(ids ...int)
- func (m *CustomerMutation) AddedEdges() []string
- func (m *CustomerMutation) AddedField(name string) (ent.Value, bool)
- func (m *CustomerMutation) AddedFields() []string
- func (m *CustomerMutation) AddedIDs(name string) []ent.Value
- func (m *CustomerMutation) BillingAddressesCleared() bool
- func (m *CustomerMutation) BillingAddressesIDs() (ids []int)
- func (m *CustomerMutation) ClearBillingAddresses()
- func (m *CustomerMutation) ClearCreatedBy()
- func (m *CustomerMutation) ClearDeliveryAddresses()
- func (m *CustomerMutation) ClearEdge(name string) error
- func (m *CustomerMutation) ClearField(name string) error
- func (m *CustomerMutation) ClearLogin()
- func (m *CustomerMutation) ClearNotes()
- func (m *CustomerMutation) ClearOrders()
- func (m *CustomerMutation) ClearTels()
- func (m *CustomerMutation) ClearedEdges() []string
- func (m *CustomerMutation) ClearedFields() []string
- func (m CustomerMutation) Client() *Client
- func (m *CustomerMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CustomerMutation) CreatedByCleared() bool
- func (m *CustomerMutation) CreatedByID() (id int, exists bool)
- func (m *CustomerMutation) CreatedByIDs() (ids []int)
- func (m *CustomerMutation) DeliveryAddressesCleared() bool
- func (m *CustomerMutation) DeliveryAddressesIDs() (ids []int)
- func (m *CustomerMutation) EdgeCleared(name string) bool
- func (m *CustomerMutation) Email() (r string, exists bool)
- func (m *CustomerMutation) Field(name string) (ent.Value, bool)
- func (m *CustomerMutation) FieldCleared(name string) bool
- func (m *CustomerMutation) Fields() []string
- func (m *CustomerMutation) ID() (id int, exists bool)
- func (m *CustomerMutation) IDs(ctx context.Context) ([]int, error)
- func (m *CustomerMutation) LoginCleared() bool
- func (m *CustomerMutation) LoginID() (id int, exists bool)
- func (m *CustomerMutation) LoginIDs() (ids []int)
- func (m *CustomerMutation) Name() (r string, exists bool)
- func (m *CustomerMutation) NotesCleared() bool
- func (m *CustomerMutation) NotesIDs() (ids []int)
- func (m *CustomerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CustomerMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *CustomerMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CustomerMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CustomerMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *CustomerMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CustomerMutation) Op() Op
- func (m *CustomerMutation) OrdersCleared() bool
- func (m *CustomerMutation) OrdersIDs() (ids []int)
- func (m *CustomerMutation) Password() (r string, exists bool)
- func (m *CustomerMutation) RemoveBillingAddressIDs(ids ...int)
- func (m *CustomerMutation) RemoveDeliveryAddressIDs(ids ...int)
- func (m *CustomerMutation) RemoveNoteIDs(ids ...int)
- func (m *CustomerMutation) RemoveOrderIDs(ids ...int)
- func (m *CustomerMutation) RemoveTelIDs(ids ...int)
- func (m *CustomerMutation) RemovedBillingAddressesIDs() (ids []int)
- func (m *CustomerMutation) RemovedDeliveryAddressesIDs() (ids []int)
- func (m *CustomerMutation) RemovedEdges() []string
- func (m *CustomerMutation) RemovedIDs(name string) []ent.Value
- func (m *CustomerMutation) RemovedNotesIDs() (ids []int)
- func (m *CustomerMutation) RemovedOrdersIDs() (ids []int)
- func (m *CustomerMutation) RemovedTelsIDs() (ids []int)
- func (m *CustomerMutation) ResetBillingAddresses()
- func (m *CustomerMutation) ResetCreatedAt()
- func (m *CustomerMutation) ResetCreatedBy()
- func (m *CustomerMutation) ResetDeliveryAddresses()
- func (m *CustomerMutation) ResetEdge(name string) error
- func (m *CustomerMutation) ResetEmail()
- func (m *CustomerMutation) ResetField(name string) error
- func (m *CustomerMutation) ResetLogin()
- func (m *CustomerMutation) ResetName()
- func (m *CustomerMutation) ResetNotes()
- func (m *CustomerMutation) ResetOrders()
- func (m *CustomerMutation) ResetPassword()
- func (m *CustomerMutation) ResetTels()
- func (m *CustomerMutation) ResetUpdatedAt()
- func (m *CustomerMutation) SetCreatedAt(t time.Time)
- func (m *CustomerMutation) SetCreatedByID(id int)
- func (m *CustomerMutation) SetEmail(s string)
- func (m *CustomerMutation) SetField(name string, value ent.Value) error
- func (m *CustomerMutation) SetLoginID(id int)
- func (m *CustomerMutation) SetName(s string)
- func (m *CustomerMutation) SetOp(op Op)
- func (m *CustomerMutation) SetPassword(s string)
- func (m *CustomerMutation) SetUpdatedAt(t time.Time)
- func (m *CustomerMutation) TelsCleared() bool
- func (m *CustomerMutation) TelsIDs() (ids []int)
- func (m CustomerMutation) Tx() (*Tx, error)
- func (m *CustomerMutation) Type() string
- func (m *CustomerMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CustomerMutation) Where(ps ...predicate.Customer)
- func (m *CustomerMutation) WhereP(ps ...func(*sql.Selector))
- type CustomerQuery
- func (cq *CustomerQuery) Aggregate(fns ...AggregateFunc) *CustomerSelect
- func (cq *CustomerQuery) All(ctx context.Context) ([]*Customer, error)
- func (cq *CustomerQuery) AllX(ctx context.Context) []*Customer
- func (cq *CustomerQuery) Clone() *CustomerQuery
- func (cq *CustomerQuery) Count(ctx context.Context) (int, error)
- func (cq *CustomerQuery) CountX(ctx context.Context) int
- func (cq *CustomerQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CustomerQuery) ExistX(ctx context.Context) bool
- func (cq *CustomerQuery) First(ctx context.Context) (*Customer, error)
- func (cq *CustomerQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *CustomerQuery) FirstIDX(ctx context.Context) int
- func (cq *CustomerQuery) FirstX(ctx context.Context) *Customer
- func (cq *CustomerQuery) GroupBy(field string, fields ...string) *CustomerGroupBy
- func (cq *CustomerQuery) IDs(ctx context.Context) (ids []int, err error)
- func (cq *CustomerQuery) IDsX(ctx context.Context) []int
- func (cq *CustomerQuery) Limit(limit int) *CustomerQuery
- func (cq *CustomerQuery) Offset(offset int) *CustomerQuery
- func (cq *CustomerQuery) Only(ctx context.Context) (*Customer, error)
- func (cq *CustomerQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *CustomerQuery) OnlyIDX(ctx context.Context) int
- func (cq *CustomerQuery) OnlyX(ctx context.Context) *Customer
- func (cq *CustomerQuery) Order(o ...customer.OrderOption) *CustomerQuery
- func (cq *CustomerQuery) QueryBillingAddresses() *BillingAddressQuery
- func (cq *CustomerQuery) QueryCreatedBy() *UserQuery
- func (cq *CustomerQuery) QueryDeliveryAddresses() *DeliveryAddressQuery
- func (cq *CustomerQuery) QueryLogin() *LoginQuery
- func (cq *CustomerQuery) QueryNotes() *NoteQuery
- func (cq *CustomerQuery) QueryOrders() *OrderQuery
- func (cq *CustomerQuery) QueryTels() *TelQuery
- func (cq *CustomerQuery) Select(fields ...string) *CustomerSelect
- func (cq *CustomerQuery) Unique(unique bool) *CustomerQuery
- func (cq *CustomerQuery) Where(ps ...predicate.Customer) *CustomerQuery
- func (cq *CustomerQuery) WithBillingAddresses(opts ...func(*BillingAddressQuery)) *CustomerQuery
- func (cq *CustomerQuery) WithCreatedBy(opts ...func(*UserQuery)) *CustomerQuery
- func (cq *CustomerQuery) WithDeliveryAddresses(opts ...func(*DeliveryAddressQuery)) *CustomerQuery
- func (cq *CustomerQuery) WithLogin(opts ...func(*LoginQuery)) *CustomerQuery
- func (cq *CustomerQuery) WithNotes(opts ...func(*NoteQuery)) *CustomerQuery
- func (cq *CustomerQuery) WithOrders(opts ...func(*OrderQuery)) *CustomerQuery
- func (cq *CustomerQuery) WithTels(opts ...func(*TelQuery)) *CustomerQuery
- type CustomerSelect
- func (cs *CustomerSelect) Aggregate(fns ...AggregateFunc) *CustomerSelect
- func (s *CustomerSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CustomerSelect) BoolX(ctx context.Context) bool
- func (s *CustomerSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CustomerSelect) BoolsX(ctx context.Context) []bool
- func (s *CustomerSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CustomerSelect) Float64X(ctx context.Context) float64
- func (s *CustomerSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CustomerSelect) Float64sX(ctx context.Context) []float64
- func (s *CustomerSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CustomerSelect) IntX(ctx context.Context) int
- func (s *CustomerSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CustomerSelect) IntsX(ctx context.Context) []int
- func (cs *CustomerSelect) Scan(ctx context.Context, v any) error
- func (s *CustomerSelect) ScanX(ctx context.Context, v any)
- func (s *CustomerSelect) String(ctx context.Context) (_ string, err error)
- func (s *CustomerSelect) StringX(ctx context.Context) string
- func (s *CustomerSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CustomerSelect) StringsX(ctx context.Context) []string
- type CustomerUpdate
- func (cu *CustomerUpdate) AddBillingAddressIDs(ids ...int) *CustomerUpdate
- func (cu *CustomerUpdate) AddBillingAddresses(b ...*BillingAddress) *CustomerUpdate
- func (cu *CustomerUpdate) AddDeliveryAddressIDs(ids ...int) *CustomerUpdate
- func (cu *CustomerUpdate) AddDeliveryAddresses(d ...*DeliveryAddress) *CustomerUpdate
- func (cu *CustomerUpdate) AddNoteIDs(ids ...int) *CustomerUpdate
- func (cu *CustomerUpdate) AddNotes(n ...*Note) *CustomerUpdate
- func (cu *CustomerUpdate) AddOrderIDs(ids ...int) *CustomerUpdate
- func (cu *CustomerUpdate) AddOrders(o ...*Order) *CustomerUpdate
- func (cu *CustomerUpdate) AddTelIDs(ids ...int) *CustomerUpdate
- func (cu *CustomerUpdate) AddTels(t ...*Tel) *CustomerUpdate
- func (cu *CustomerUpdate) ClearBillingAddresses() *CustomerUpdate
- func (cu *CustomerUpdate) ClearCreatedBy() *CustomerUpdate
- func (cu *CustomerUpdate) ClearDeliveryAddresses() *CustomerUpdate
- func (cu *CustomerUpdate) ClearLogin() *CustomerUpdate
- func (cu *CustomerUpdate) ClearNotes() *CustomerUpdate
- func (cu *CustomerUpdate) ClearOrders() *CustomerUpdate
- func (cu *CustomerUpdate) ClearTels() *CustomerUpdate
- func (cu *CustomerUpdate) Exec(ctx context.Context) error
- func (cu *CustomerUpdate) ExecX(ctx context.Context)
- func (cu *CustomerUpdate) Mutation() *CustomerMutation
- func (cu *CustomerUpdate) RemoveBillingAddressIDs(ids ...int) *CustomerUpdate
- func (cu *CustomerUpdate) RemoveBillingAddresses(b ...*BillingAddress) *CustomerUpdate
- func (cu *CustomerUpdate) RemoveDeliveryAddressIDs(ids ...int) *CustomerUpdate
- func (cu *CustomerUpdate) RemoveDeliveryAddresses(d ...*DeliveryAddress) *CustomerUpdate
- func (cu *CustomerUpdate) RemoveNoteIDs(ids ...int) *CustomerUpdate
- func (cu *CustomerUpdate) RemoveNotes(n ...*Note) *CustomerUpdate
- func (cu *CustomerUpdate) RemoveOrderIDs(ids ...int) *CustomerUpdate
- func (cu *CustomerUpdate) RemoveOrders(o ...*Order) *CustomerUpdate
- func (cu *CustomerUpdate) RemoveTelIDs(ids ...int) *CustomerUpdate
- func (cu *CustomerUpdate) RemoveTels(t ...*Tel) *CustomerUpdate
- func (cu *CustomerUpdate) Save(ctx context.Context) (int, error)
- func (cu *CustomerUpdate) SaveX(ctx context.Context) int
- func (cu *CustomerUpdate) SetCreatedBy(u *User) *CustomerUpdate
- func (cu *CustomerUpdate) SetCreatedByID(id int) *CustomerUpdate
- func (cu *CustomerUpdate) SetEmail(s string) *CustomerUpdate
- func (cu *CustomerUpdate) SetLogin(l *Login) *CustomerUpdate
- func (cu *CustomerUpdate) SetLoginID(id int) *CustomerUpdate
- func (cu *CustomerUpdate) SetName(s string) *CustomerUpdate
- func (cu *CustomerUpdate) SetNillableCreatedByID(id *int) *CustomerUpdate
- func (cu *CustomerUpdate) SetNillableEmail(s *string) *CustomerUpdate
- func (cu *CustomerUpdate) SetNillableLoginID(id *int) *CustomerUpdate
- func (cu *CustomerUpdate) SetNillableName(s *string) *CustomerUpdate
- func (cu *CustomerUpdate) SetNillablePassword(s *string) *CustomerUpdate
- func (cu *CustomerUpdate) SetPassword(s string) *CustomerUpdate
- func (cu *CustomerUpdate) SetUpdatedAt(t time.Time) *CustomerUpdate
- func (cu *CustomerUpdate) Where(ps ...predicate.Customer) *CustomerUpdate
- type CustomerUpdateOne
- func (cuo *CustomerUpdateOne) AddBillingAddressIDs(ids ...int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) AddBillingAddresses(b ...*BillingAddress) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) AddDeliveryAddressIDs(ids ...int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) AddDeliveryAddresses(d ...*DeliveryAddress) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) AddNoteIDs(ids ...int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) AddNotes(n ...*Note) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) AddOrderIDs(ids ...int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) AddOrders(o ...*Order) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) AddTelIDs(ids ...int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) AddTels(t ...*Tel) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) ClearBillingAddresses() *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) ClearCreatedBy() *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) ClearDeliveryAddresses() *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) ClearLogin() *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) ClearNotes() *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) ClearOrders() *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) ClearTels() *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) Exec(ctx context.Context) error
- func (cuo *CustomerUpdateOne) ExecX(ctx context.Context)
- func (cuo *CustomerUpdateOne) Mutation() *CustomerMutation
- func (cuo *CustomerUpdateOne) RemoveBillingAddressIDs(ids ...int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) RemoveBillingAddresses(b ...*BillingAddress) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) RemoveDeliveryAddressIDs(ids ...int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) RemoveDeliveryAddresses(d ...*DeliveryAddress) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) RemoveNoteIDs(ids ...int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) RemoveNotes(n ...*Note) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) RemoveOrderIDs(ids ...int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) RemoveOrders(o ...*Order) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) RemoveTelIDs(ids ...int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) RemoveTels(t ...*Tel) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) Save(ctx context.Context) (*Customer, error)
- func (cuo *CustomerUpdateOne) SaveX(ctx context.Context) *Customer
- func (cuo *CustomerUpdateOne) Select(field string, fields ...string) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetCreatedBy(u *User) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetCreatedByID(id int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetEmail(s string) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetLogin(l *Login) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetLoginID(id int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetName(s string) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetNillableCreatedByID(id *int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetNillableEmail(s *string) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetNillableLoginID(id *int) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetNillableName(s *string) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetNillablePassword(s *string) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetPassword(s string) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) SetUpdatedAt(t time.Time) *CustomerUpdateOne
- func (cuo *CustomerUpdateOne) Where(ps ...predicate.Customer) *CustomerUpdateOne
- type Customers
- type DeliveryAddress
- func (da *DeliveryAddress) QueryCustomer() *CustomerQuery
- func (da *DeliveryAddress) QueryNotes() *NoteQuery
- func (da *DeliveryAddress) QueryTelephone() *TelQuery
- func (da *DeliveryAddress) String() string
- func (da *DeliveryAddress) Unwrap() *DeliveryAddress
- func (da *DeliveryAddress) Update() *DeliveryAddressUpdateOne
- func (da *DeliveryAddress) Value(name string) (ent.Value, error)
- type DeliveryAddressClient
- func (c *DeliveryAddressClient) Create() *DeliveryAddressCreate
- func (c *DeliveryAddressClient) CreateBulk(builders ...*DeliveryAddressCreate) *DeliveryAddressCreateBulk
- func (c *DeliveryAddressClient) Delete() *DeliveryAddressDelete
- func (c *DeliveryAddressClient) DeleteOne(da *DeliveryAddress) *DeliveryAddressDeleteOne
- func (c *DeliveryAddressClient) DeleteOneID(id int) *DeliveryAddressDeleteOne
- func (c *DeliveryAddressClient) Get(ctx context.Context, id int) (*DeliveryAddress, error)
- func (c *DeliveryAddressClient) GetX(ctx context.Context, id int) *DeliveryAddress
- func (c *DeliveryAddressClient) Hooks() []Hook
- func (c *DeliveryAddressClient) Intercept(interceptors ...Interceptor)
- func (c *DeliveryAddressClient) Interceptors() []Interceptor
- func (c *DeliveryAddressClient) MapCreateBulk(slice any, setFunc func(*DeliveryAddressCreate, int)) *DeliveryAddressCreateBulk
- func (c *DeliveryAddressClient) Query() *DeliveryAddressQuery
- func (c *DeliveryAddressClient) QueryCustomer(da *DeliveryAddress) *CustomerQuery
- func (c *DeliveryAddressClient) QueryNotes(da *DeliveryAddress) *NoteQuery
- func (c *DeliveryAddressClient) QueryTelephone(da *DeliveryAddress) *TelQuery
- func (c *DeliveryAddressClient) Update() *DeliveryAddressUpdate
- func (c *DeliveryAddressClient) UpdateOne(da *DeliveryAddress) *DeliveryAddressUpdateOne
- func (c *DeliveryAddressClient) UpdateOneID(id int) *DeliveryAddressUpdateOne
- func (c *DeliveryAddressClient) Use(hooks ...Hook)
- type DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) AddNoteIDs(ids ...int) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) AddNotes(n ...*Note) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) Exec(ctx context.Context) error
- func (dac *DeliveryAddressCreate) ExecX(ctx context.Context)
- func (dac *DeliveryAddressCreate) Mutation() *DeliveryAddressMutation
- func (dac *DeliveryAddressCreate) Save(ctx context.Context) (*DeliveryAddress, error)
- func (dac *DeliveryAddressCreate) SaveX(ctx context.Context) *DeliveryAddress
- func (dac *DeliveryAddressCreate) SetCity(s string) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetCreatedAt(t time.Time) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetCustomer(c *Customer) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetCustomerID(id int) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetNillableCreatedAt(t *time.Time) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetNillableCustomerID(id *int) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetNillableTelephoneID(id *int) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetNillableUpdatedAt(t *time.Time) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetNumber(s string) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetStreet(s string) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetTelephone(t *Tel) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetTelephoneID(id int) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetUpdatedAt(t time.Time) *DeliveryAddressCreate
- func (dac *DeliveryAddressCreate) SetZip(s string) *DeliveryAddressCreate
- type DeliveryAddressCreateBulk
- func (dacb *DeliveryAddressCreateBulk) Exec(ctx context.Context) error
- func (dacb *DeliveryAddressCreateBulk) ExecX(ctx context.Context)
- func (dacb *DeliveryAddressCreateBulk) Save(ctx context.Context) ([]*DeliveryAddress, error)
- func (dacb *DeliveryAddressCreateBulk) SaveX(ctx context.Context) []*DeliveryAddress
- type DeliveryAddressDelete
- type DeliveryAddressDeleteOne
- type DeliveryAddressEdges
- type DeliveryAddressGroupBy
- func (dagb *DeliveryAddressGroupBy) Aggregate(fns ...AggregateFunc) *DeliveryAddressGroupBy
- func (s *DeliveryAddressGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DeliveryAddressGroupBy) BoolX(ctx context.Context) bool
- func (s *DeliveryAddressGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DeliveryAddressGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DeliveryAddressGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DeliveryAddressGroupBy) Float64X(ctx context.Context) float64
- func (s *DeliveryAddressGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DeliveryAddressGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DeliveryAddressGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DeliveryAddressGroupBy) IntX(ctx context.Context) int
- func (s *DeliveryAddressGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DeliveryAddressGroupBy) IntsX(ctx context.Context) []int
- func (dagb *DeliveryAddressGroupBy) Scan(ctx context.Context, v any) error
- func (s *DeliveryAddressGroupBy) ScanX(ctx context.Context, v any)
- func (s *DeliveryAddressGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DeliveryAddressGroupBy) StringX(ctx context.Context) string
- func (s *DeliveryAddressGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DeliveryAddressGroupBy) StringsX(ctx context.Context) []string
- type DeliveryAddressMutation
- func (m *DeliveryAddressMutation) AddField(name string, value ent.Value) error
- func (m *DeliveryAddressMutation) AddNoteIDs(ids ...int)
- func (m *DeliveryAddressMutation) AddedEdges() []string
- func (m *DeliveryAddressMutation) AddedField(name string) (ent.Value, bool)
- func (m *DeliveryAddressMutation) AddedFields() []string
- func (m *DeliveryAddressMutation) AddedIDs(name string) []ent.Value
- func (m *DeliveryAddressMutation) City() (r string, exists bool)
- func (m *DeliveryAddressMutation) ClearCustomer()
- func (m *DeliveryAddressMutation) ClearEdge(name string) error
- func (m *DeliveryAddressMutation) ClearField(name string) error
- func (m *DeliveryAddressMutation) ClearNotes()
- func (m *DeliveryAddressMutation) ClearTelephone()
- func (m *DeliveryAddressMutation) ClearedEdges() []string
- func (m *DeliveryAddressMutation) ClearedFields() []string
- func (m DeliveryAddressMutation) Client() *Client
- func (m *DeliveryAddressMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DeliveryAddressMutation) CustomerCleared() bool
- func (m *DeliveryAddressMutation) CustomerID() (id int, exists bool)
- func (m *DeliveryAddressMutation) CustomerIDs() (ids []int)
- func (m *DeliveryAddressMutation) EdgeCleared(name string) bool
- func (m *DeliveryAddressMutation) Field(name string) (ent.Value, bool)
- func (m *DeliveryAddressMutation) FieldCleared(name string) bool
- func (m *DeliveryAddressMutation) Fields() []string
- func (m *DeliveryAddressMutation) ID() (id int, exists bool)
- func (m *DeliveryAddressMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DeliveryAddressMutation) NotesCleared() bool
- func (m *DeliveryAddressMutation) NotesIDs() (ids []int)
- func (m *DeliveryAddressMutation) Number() (r string, exists bool)
- func (m *DeliveryAddressMutation) OldCity(ctx context.Context) (v string, err error)
- func (m *DeliveryAddressMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DeliveryAddressMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DeliveryAddressMutation) OldNumber(ctx context.Context) (v string, err error)
- func (m *DeliveryAddressMutation) OldStreet(ctx context.Context) (v string, err error)
- func (m *DeliveryAddressMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DeliveryAddressMutation) OldZip(ctx context.Context) (v string, err error)
- func (m *DeliveryAddressMutation) Op() Op
- func (m *DeliveryAddressMutation) RemoveNoteIDs(ids ...int)
- func (m *DeliveryAddressMutation) RemovedEdges() []string
- func (m *DeliveryAddressMutation) RemovedIDs(name string) []ent.Value
- func (m *DeliveryAddressMutation) RemovedNotesIDs() (ids []int)
- func (m *DeliveryAddressMutation) ResetCity()
- func (m *DeliveryAddressMutation) ResetCreatedAt()
- func (m *DeliveryAddressMutation) ResetCustomer()
- func (m *DeliveryAddressMutation) ResetEdge(name string) error
- func (m *DeliveryAddressMutation) ResetField(name string) error
- func (m *DeliveryAddressMutation) ResetNotes()
- func (m *DeliveryAddressMutation) ResetNumber()
- func (m *DeliveryAddressMutation) ResetStreet()
- func (m *DeliveryAddressMutation) ResetTelephone()
- func (m *DeliveryAddressMutation) ResetUpdatedAt()
- func (m *DeliveryAddressMutation) ResetZip()
- func (m *DeliveryAddressMutation) SetCity(s string)
- func (m *DeliveryAddressMutation) SetCreatedAt(t time.Time)
- func (m *DeliveryAddressMutation) SetCustomerID(id int)
- func (m *DeliveryAddressMutation) SetField(name string, value ent.Value) error
- func (m *DeliveryAddressMutation) SetNumber(s string)
- func (m *DeliveryAddressMutation) SetOp(op Op)
- func (m *DeliveryAddressMutation) SetStreet(s string)
- func (m *DeliveryAddressMutation) SetTelephoneID(id int)
- func (m *DeliveryAddressMutation) SetUpdatedAt(t time.Time)
- func (m *DeliveryAddressMutation) SetZip(s string)
- func (m *DeliveryAddressMutation) Street() (r string, exists bool)
- func (m *DeliveryAddressMutation) TelephoneCleared() bool
- func (m *DeliveryAddressMutation) TelephoneID() (id int, exists bool)
- func (m *DeliveryAddressMutation) TelephoneIDs() (ids []int)
- func (m DeliveryAddressMutation) Tx() (*Tx, error)
- func (m *DeliveryAddressMutation) Type() string
- func (m *DeliveryAddressMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DeliveryAddressMutation) Where(ps ...predicate.DeliveryAddress)
- func (m *DeliveryAddressMutation) WhereP(ps ...func(*sql.Selector))
- func (m *DeliveryAddressMutation) Zip() (r string, exists bool)
- type DeliveryAddressQuery
- func (daq *DeliveryAddressQuery) Aggregate(fns ...AggregateFunc) *DeliveryAddressSelect
- func (daq *DeliveryAddressQuery) All(ctx context.Context) ([]*DeliveryAddress, error)
- func (daq *DeliveryAddressQuery) AllX(ctx context.Context) []*DeliveryAddress
- func (daq *DeliveryAddressQuery) Clone() *DeliveryAddressQuery
- func (daq *DeliveryAddressQuery) Count(ctx context.Context) (int, error)
- func (daq *DeliveryAddressQuery) CountX(ctx context.Context) int
- func (daq *DeliveryAddressQuery) Exist(ctx context.Context) (bool, error)
- func (daq *DeliveryAddressQuery) ExistX(ctx context.Context) bool
- func (daq *DeliveryAddressQuery) First(ctx context.Context) (*DeliveryAddress, error)
- func (daq *DeliveryAddressQuery) FirstID(ctx context.Context) (id int, err error)
- func (daq *DeliveryAddressQuery) FirstIDX(ctx context.Context) int
- func (daq *DeliveryAddressQuery) FirstX(ctx context.Context) *DeliveryAddress
- func (daq *DeliveryAddressQuery) GroupBy(field string, fields ...string) *DeliveryAddressGroupBy
- func (daq *DeliveryAddressQuery) IDs(ctx context.Context) (ids []int, err error)
- func (daq *DeliveryAddressQuery) IDsX(ctx context.Context) []int
- func (daq *DeliveryAddressQuery) Limit(limit int) *DeliveryAddressQuery
- func (daq *DeliveryAddressQuery) Offset(offset int) *DeliveryAddressQuery
- func (daq *DeliveryAddressQuery) Only(ctx context.Context) (*DeliveryAddress, error)
- func (daq *DeliveryAddressQuery) OnlyID(ctx context.Context) (id int, err error)
- func (daq *DeliveryAddressQuery) OnlyIDX(ctx context.Context) int
- func (daq *DeliveryAddressQuery) OnlyX(ctx context.Context) *DeliveryAddress
- func (daq *DeliveryAddressQuery) Order(o ...deliveryaddress.OrderOption) *DeliveryAddressQuery
- func (daq *DeliveryAddressQuery) QueryCustomer() *CustomerQuery
- func (daq *DeliveryAddressQuery) QueryNotes() *NoteQuery
- func (daq *DeliveryAddressQuery) QueryTelephone() *TelQuery
- func (daq *DeliveryAddressQuery) Select(fields ...string) *DeliveryAddressSelect
- func (daq *DeliveryAddressQuery) Unique(unique bool) *DeliveryAddressQuery
- func (daq *DeliveryAddressQuery) Where(ps ...predicate.DeliveryAddress) *DeliveryAddressQuery
- func (daq *DeliveryAddressQuery) WithCustomer(opts ...func(*CustomerQuery)) *DeliveryAddressQuery
- func (daq *DeliveryAddressQuery) WithNotes(opts ...func(*NoteQuery)) *DeliveryAddressQuery
- func (daq *DeliveryAddressQuery) WithTelephone(opts ...func(*TelQuery)) *DeliveryAddressQuery
- type DeliveryAddressSelect
- func (das *DeliveryAddressSelect) Aggregate(fns ...AggregateFunc) *DeliveryAddressSelect
- func (s *DeliveryAddressSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DeliveryAddressSelect) BoolX(ctx context.Context) bool
- func (s *DeliveryAddressSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DeliveryAddressSelect) BoolsX(ctx context.Context) []bool
- func (s *DeliveryAddressSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DeliveryAddressSelect) Float64X(ctx context.Context) float64
- func (s *DeliveryAddressSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DeliveryAddressSelect) Float64sX(ctx context.Context) []float64
- func (s *DeliveryAddressSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DeliveryAddressSelect) IntX(ctx context.Context) int
- func (s *DeliveryAddressSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DeliveryAddressSelect) IntsX(ctx context.Context) []int
- func (das *DeliveryAddressSelect) Scan(ctx context.Context, v any) error
- func (s *DeliveryAddressSelect) ScanX(ctx context.Context, v any)
- func (s *DeliveryAddressSelect) String(ctx context.Context) (_ string, err error)
- func (s *DeliveryAddressSelect) StringX(ctx context.Context) string
- func (s *DeliveryAddressSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DeliveryAddressSelect) StringsX(ctx context.Context) []string
- type DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) AddNoteIDs(ids ...int) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) AddNotes(n ...*Note) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) ClearCustomer() *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) ClearNotes() *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) ClearTelephone() *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) Exec(ctx context.Context) error
- func (dau *DeliveryAddressUpdate) ExecX(ctx context.Context)
- func (dau *DeliveryAddressUpdate) Mutation() *DeliveryAddressMutation
- func (dau *DeliveryAddressUpdate) RemoveNoteIDs(ids ...int) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) RemoveNotes(n ...*Note) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) Save(ctx context.Context) (int, error)
- func (dau *DeliveryAddressUpdate) SaveX(ctx context.Context) int
- func (dau *DeliveryAddressUpdate) SetCustomer(c *Customer) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) SetCustomerID(id int) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) SetNillableCustomerID(id *int) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) SetNillableNumber(s *string) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) SetNillableTelephoneID(id *int) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) SetNumber(s string) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) SetTelephone(t *Tel) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) SetTelephoneID(id int) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) SetUpdatedAt(t time.Time) *DeliveryAddressUpdate
- func (dau *DeliveryAddressUpdate) Where(ps ...predicate.DeliveryAddress) *DeliveryAddressUpdate
- type DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) AddNoteIDs(ids ...int) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) AddNotes(n ...*Note) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) ClearCustomer() *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) ClearNotes() *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) ClearTelephone() *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) Exec(ctx context.Context) error
- func (dauo *DeliveryAddressUpdateOne) ExecX(ctx context.Context)
- func (dauo *DeliveryAddressUpdateOne) Mutation() *DeliveryAddressMutation
- func (dauo *DeliveryAddressUpdateOne) RemoveNoteIDs(ids ...int) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) RemoveNotes(n ...*Note) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) Save(ctx context.Context) (*DeliveryAddress, error)
- func (dauo *DeliveryAddressUpdateOne) SaveX(ctx context.Context) *DeliveryAddress
- func (dauo *DeliveryAddressUpdateOne) Select(field string, fields ...string) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) SetCustomer(c *Customer) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) SetCustomerID(id int) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) SetNillableCustomerID(id *int) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) SetNillableNumber(s *string) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) SetNillableTelephoneID(id *int) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) SetNumber(s string) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) SetTelephone(t *Tel) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) SetTelephoneID(id int) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) SetUpdatedAt(t time.Time) *DeliveryAddressUpdateOne
- func (dauo *DeliveryAddressUpdateOne) Where(ps ...predicate.DeliveryAddress) *DeliveryAddressUpdateOne
- type DeliveryAddresses
- type Hook
- type InterceptFunc
- type Interceptor
- type Login
- type LoginClient
- func (c *LoginClient) Create() *LoginCreate
- func (c *LoginClient) CreateBulk(builders ...*LoginCreate) *LoginCreateBulk
- func (c *LoginClient) Delete() *LoginDelete
- func (c *LoginClient) DeleteOne(l *Login) *LoginDeleteOne
- func (c *LoginClient) DeleteOneID(id int) *LoginDeleteOne
- func (c *LoginClient) Get(ctx context.Context, id int) (*Login, error)
- func (c *LoginClient) GetX(ctx context.Context, id int) *Login
- func (c *LoginClient) Hooks() []Hook
- func (c *LoginClient) Intercept(interceptors ...Interceptor)
- func (c *LoginClient) Interceptors() []Interceptor
- func (c *LoginClient) MapCreateBulk(slice any, setFunc func(*LoginCreate, int)) *LoginCreateBulk
- func (c *LoginClient) Query() *LoginQuery
- func (c *LoginClient) QueryCustomer(l *Login) *CustomerQuery
- func (c *LoginClient) Update() *LoginUpdate
- func (c *LoginClient) UpdateOne(l *Login) *LoginUpdateOne
- func (c *LoginClient) UpdateOneID(id int) *LoginUpdateOne
- func (c *LoginClient) Use(hooks ...Hook)
- type LoginCreate
- func (lc *LoginCreate) AddCustomer(c ...*Customer) *LoginCreate
- func (lc *LoginCreate) AddCustomerIDs(ids ...int) *LoginCreate
- func (lc *LoginCreate) Exec(ctx context.Context) error
- func (lc *LoginCreate) ExecX(ctx context.Context)
- func (lc *LoginCreate) Mutation() *LoginMutation
- func (lc *LoginCreate) Save(ctx context.Context) (*Login, error)
- func (lc *LoginCreate) SaveX(ctx context.Context) *Login
- func (lc *LoginCreate) SetCreatedAt(t time.Time) *LoginCreate
- func (lc *LoginCreate) SetLastLogin(t time.Time) *LoginCreate
- func (lc *LoginCreate) SetNillableCreatedAt(t *time.Time) *LoginCreate
- func (lc *LoginCreate) SetNillableUpdatedAt(t *time.Time) *LoginCreate
- func (lc *LoginCreate) SetPassword(s string) *LoginCreate
- func (lc *LoginCreate) SetUpdatedAt(t time.Time) *LoginCreate
- func (lc *LoginCreate) SetUsername(s string) *LoginCreate
- type LoginCreateBulk
- type LoginDelete
- type LoginDeleteOne
- type LoginEdges
- type LoginGroupBy
- func (lgb *LoginGroupBy) Aggregate(fns ...AggregateFunc) *LoginGroupBy
- func (s *LoginGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LoginGroupBy) BoolX(ctx context.Context) bool
- func (s *LoginGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LoginGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LoginGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LoginGroupBy) Float64X(ctx context.Context) float64
- func (s *LoginGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LoginGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LoginGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LoginGroupBy) IntX(ctx context.Context) int
- func (s *LoginGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LoginGroupBy) IntsX(ctx context.Context) []int
- func (lgb *LoginGroupBy) Scan(ctx context.Context, v any) error
- func (s *LoginGroupBy) ScanX(ctx context.Context, v any)
- func (s *LoginGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LoginGroupBy) StringX(ctx context.Context) string
- func (s *LoginGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LoginGroupBy) StringsX(ctx context.Context) []string
- type LoginMutation
- func (m *LoginMutation) AddCustomerIDs(ids ...int)
- func (m *LoginMutation) AddField(name string, value ent.Value) error
- func (m *LoginMutation) AddedEdges() []string
- func (m *LoginMutation) AddedField(name string) (ent.Value, bool)
- func (m *LoginMutation) AddedFields() []string
- func (m *LoginMutation) AddedIDs(name string) []ent.Value
- func (m *LoginMutation) ClearCustomer()
- func (m *LoginMutation) ClearEdge(name string) error
- func (m *LoginMutation) ClearField(name string) error
- func (m *LoginMutation) ClearedEdges() []string
- func (m *LoginMutation) ClearedFields() []string
- func (m LoginMutation) Client() *Client
- func (m *LoginMutation) CreatedAt() (r time.Time, exists bool)
- func (m *LoginMutation) CustomerCleared() bool
- func (m *LoginMutation) CustomerIDs() (ids []int)
- func (m *LoginMutation) EdgeCleared(name string) bool
- func (m *LoginMutation) Field(name string) (ent.Value, bool)
- func (m *LoginMutation) FieldCleared(name string) bool
- func (m *LoginMutation) Fields() []string
- func (m *LoginMutation) ID() (id int, exists bool)
- func (m *LoginMutation) IDs(ctx context.Context) ([]int, error)
- func (m *LoginMutation) LastLogin() (r time.Time, exists bool)
- func (m *LoginMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LoginMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LoginMutation) OldLastLogin(ctx context.Context) (v time.Time, err error)
- func (m *LoginMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *LoginMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LoginMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *LoginMutation) Op() Op
- func (m *LoginMutation) Password() (r string, exists bool)
- func (m *LoginMutation) RemoveCustomerIDs(ids ...int)
- func (m *LoginMutation) RemovedCustomerIDs() (ids []int)
- func (m *LoginMutation) RemovedEdges() []string
- func (m *LoginMutation) RemovedIDs(name string) []ent.Value
- func (m *LoginMutation) ResetCreatedAt()
- func (m *LoginMutation) ResetCustomer()
- func (m *LoginMutation) ResetEdge(name string) error
- func (m *LoginMutation) ResetField(name string) error
- func (m *LoginMutation) ResetLastLogin()
- func (m *LoginMutation) ResetPassword()
- func (m *LoginMutation) ResetUpdatedAt()
- func (m *LoginMutation) ResetUsername()
- func (m *LoginMutation) SetCreatedAt(t time.Time)
- func (m *LoginMutation) SetField(name string, value ent.Value) error
- func (m *LoginMutation) SetLastLogin(t time.Time)
- func (m *LoginMutation) SetOp(op Op)
- func (m *LoginMutation) SetPassword(s string)
- func (m *LoginMutation) SetUpdatedAt(t time.Time)
- func (m *LoginMutation) SetUsername(s string)
- func (m LoginMutation) Tx() (*Tx, error)
- func (m *LoginMutation) Type() string
- func (m *LoginMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *LoginMutation) Username() (r string, exists bool)
- func (m *LoginMutation) Where(ps ...predicate.Login)
- func (m *LoginMutation) WhereP(ps ...func(*sql.Selector))
- type LoginQuery
- func (lq *LoginQuery) Aggregate(fns ...AggregateFunc) *LoginSelect
- func (lq *LoginQuery) All(ctx context.Context) ([]*Login, error)
- func (lq *LoginQuery) AllX(ctx context.Context) []*Login
- func (lq *LoginQuery) Clone() *LoginQuery
- func (lq *LoginQuery) Count(ctx context.Context) (int, error)
- func (lq *LoginQuery) CountX(ctx context.Context) int
- func (lq *LoginQuery) Exist(ctx context.Context) (bool, error)
- func (lq *LoginQuery) ExistX(ctx context.Context) bool
- func (lq *LoginQuery) First(ctx context.Context) (*Login, error)
- func (lq *LoginQuery) FirstID(ctx context.Context) (id int, err error)
- func (lq *LoginQuery) FirstIDX(ctx context.Context) int
- func (lq *LoginQuery) FirstX(ctx context.Context) *Login
- func (lq *LoginQuery) GroupBy(field string, fields ...string) *LoginGroupBy
- func (lq *LoginQuery) IDs(ctx context.Context) (ids []int, err error)
- func (lq *LoginQuery) IDsX(ctx context.Context) []int
- func (lq *LoginQuery) Limit(limit int) *LoginQuery
- func (lq *LoginQuery) Offset(offset int) *LoginQuery
- func (lq *LoginQuery) Only(ctx context.Context) (*Login, error)
- func (lq *LoginQuery) OnlyID(ctx context.Context) (id int, err error)
- func (lq *LoginQuery) OnlyIDX(ctx context.Context) int
- func (lq *LoginQuery) OnlyX(ctx context.Context) *Login
- func (lq *LoginQuery) Order(o ...login.OrderOption) *LoginQuery
- func (lq *LoginQuery) QueryCustomer() *CustomerQuery
- func (lq *LoginQuery) Select(fields ...string) *LoginSelect
- func (lq *LoginQuery) Unique(unique bool) *LoginQuery
- func (lq *LoginQuery) Where(ps ...predicate.Login) *LoginQuery
- func (lq *LoginQuery) WithCustomer(opts ...func(*CustomerQuery)) *LoginQuery
- type LoginSelect
- func (ls *LoginSelect) Aggregate(fns ...AggregateFunc) *LoginSelect
- func (s *LoginSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LoginSelect) BoolX(ctx context.Context) bool
- func (s *LoginSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LoginSelect) BoolsX(ctx context.Context) []bool
- func (s *LoginSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LoginSelect) Float64X(ctx context.Context) float64
- func (s *LoginSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LoginSelect) Float64sX(ctx context.Context) []float64
- func (s *LoginSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LoginSelect) IntX(ctx context.Context) int
- func (s *LoginSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LoginSelect) IntsX(ctx context.Context) []int
- func (ls *LoginSelect) Scan(ctx context.Context, v any) error
- func (s *LoginSelect) ScanX(ctx context.Context, v any)
- func (s *LoginSelect) String(ctx context.Context) (_ string, err error)
- func (s *LoginSelect) StringX(ctx context.Context) string
- func (s *LoginSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LoginSelect) StringsX(ctx context.Context) []string
- type LoginUpdate
- func (lu *LoginUpdate) AddCustomer(c ...*Customer) *LoginUpdate
- func (lu *LoginUpdate) AddCustomerIDs(ids ...int) *LoginUpdate
- func (lu *LoginUpdate) ClearCustomer() *LoginUpdate
- func (lu *LoginUpdate) Exec(ctx context.Context) error
- func (lu *LoginUpdate) ExecX(ctx context.Context)
- func (lu *LoginUpdate) Mutation() *LoginMutation
- func (lu *LoginUpdate) RemoveCustomer(c ...*Customer) *LoginUpdate
- func (lu *LoginUpdate) RemoveCustomerIDs(ids ...int) *LoginUpdate
- func (lu *LoginUpdate) Save(ctx context.Context) (int, error)
- func (lu *LoginUpdate) SaveX(ctx context.Context) int
- func (lu *LoginUpdate) SetLastLogin(t time.Time) *LoginUpdate
- func (lu *LoginUpdate) SetNillableLastLogin(t *time.Time) *LoginUpdate
- func (lu *LoginUpdate) SetNillablePassword(s *string) *LoginUpdate
- func (lu *LoginUpdate) SetNillableUsername(s *string) *LoginUpdate
- func (lu *LoginUpdate) SetPassword(s string) *LoginUpdate
- func (lu *LoginUpdate) SetUpdatedAt(t time.Time) *LoginUpdate
- func (lu *LoginUpdate) SetUsername(s string) *LoginUpdate
- func (lu *LoginUpdate) Where(ps ...predicate.Login) *LoginUpdate
- type LoginUpdateOne
- func (luo *LoginUpdateOne) AddCustomer(c ...*Customer) *LoginUpdateOne
- func (luo *LoginUpdateOne) AddCustomerIDs(ids ...int) *LoginUpdateOne
- func (luo *LoginUpdateOne) ClearCustomer() *LoginUpdateOne
- func (luo *LoginUpdateOne) Exec(ctx context.Context) error
- func (luo *LoginUpdateOne) ExecX(ctx context.Context)
- func (luo *LoginUpdateOne) Mutation() *LoginMutation
- func (luo *LoginUpdateOne) RemoveCustomer(c ...*Customer) *LoginUpdateOne
- func (luo *LoginUpdateOne) RemoveCustomerIDs(ids ...int) *LoginUpdateOne
- func (luo *LoginUpdateOne) Save(ctx context.Context) (*Login, error)
- func (luo *LoginUpdateOne) SaveX(ctx context.Context) *Login
- func (luo *LoginUpdateOne) Select(field string, fields ...string) *LoginUpdateOne
- func (luo *LoginUpdateOne) SetLastLogin(t time.Time) *LoginUpdateOne
- func (luo *LoginUpdateOne) SetNillableLastLogin(t *time.Time) *LoginUpdateOne
- func (luo *LoginUpdateOne) SetNillablePassword(s *string) *LoginUpdateOne
- func (luo *LoginUpdateOne) SetNillableUsername(s *string) *LoginUpdateOne
- func (luo *LoginUpdateOne) SetPassword(s string) *LoginUpdateOne
- func (luo *LoginUpdateOne) SetUpdatedAt(t time.Time) *LoginUpdateOne
- func (luo *LoginUpdateOne) SetUsername(s string) *LoginUpdateOne
- func (luo *LoginUpdateOne) Where(ps ...predicate.Login) *LoginUpdateOne
- type Logins
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Note
- func (n *Note) QueryBillingAddress() *BillingAddressQuery
- func (n *Note) QueryCustomer() *CustomerQuery
- func (n *Note) QueryDeliveryAddress() *DeliveryAddressQuery
- func (n *Note) QueryOrders() *OrderQuery
- func (n *Note) QueryTel() *TelQuery
- func (n *Note) String() string
- func (n *Note) Unwrap() *Note
- func (n *Note) Update() *NoteUpdateOne
- func (n *Note) Value(name string) (ent.Value, error)
- type NoteClient
- func (c *NoteClient) Create() *NoteCreate
- func (c *NoteClient) CreateBulk(builders ...*NoteCreate) *NoteCreateBulk
- func (c *NoteClient) Delete() *NoteDelete
- func (c *NoteClient) DeleteOne(n *Note) *NoteDeleteOne
- func (c *NoteClient) DeleteOneID(id int) *NoteDeleteOne
- func (c *NoteClient) Get(ctx context.Context, id int) (*Note, error)
- func (c *NoteClient) GetX(ctx context.Context, id int) *Note
- func (c *NoteClient) Hooks() []Hook
- func (c *NoteClient) Intercept(interceptors ...Interceptor)
- func (c *NoteClient) Interceptors() []Interceptor
- func (c *NoteClient) MapCreateBulk(slice any, setFunc func(*NoteCreate, int)) *NoteCreateBulk
- func (c *NoteClient) Query() *NoteQuery
- func (c *NoteClient) QueryBillingAddress(n *Note) *BillingAddressQuery
- func (c *NoteClient) QueryCustomer(n *Note) *CustomerQuery
- func (c *NoteClient) QueryDeliveryAddress(n *Note) *DeliveryAddressQuery
- func (c *NoteClient) QueryOrders(n *Note) *OrderQuery
- func (c *NoteClient) QueryTel(n *Note) *TelQuery
- func (c *NoteClient) Update() *NoteUpdate
- func (c *NoteClient) UpdateOne(n *Note) *NoteUpdateOne
- func (c *NoteClient) UpdateOneID(id int) *NoteUpdateOne
- func (c *NoteClient) Use(hooks ...Hook)
- type NoteCreate
- func (nc *NoteCreate) Exec(ctx context.Context) error
- func (nc *NoteCreate) ExecX(ctx context.Context)
- func (nc *NoteCreate) Mutation() *NoteMutation
- func (nc *NoteCreate) Save(ctx context.Context) (*Note, error)
- func (nc *NoteCreate) SaveX(ctx context.Context) *Note
- func (nc *NoteCreate) SetBillingAddress(b *BillingAddress) *NoteCreate
- func (nc *NoteCreate) SetBillingAddressID(id int) *NoteCreate
- func (nc *NoteCreate) SetContent(s string) *NoteCreate
- func (nc *NoteCreate) SetCreatedAt(t time.Time) *NoteCreate
- func (nc *NoteCreate) SetCustomer(c *Customer) *NoteCreate
- func (nc *NoteCreate) SetCustomerID(id int) *NoteCreate
- func (nc *NoteCreate) SetDeliveryAddress(d *DeliveryAddress) *NoteCreate
- func (nc *NoteCreate) SetDeliveryAddressID(id int) *NoteCreate
- func (nc *NoteCreate) SetNillableBillingAddressID(id *int) *NoteCreate
- func (nc *NoteCreate) SetNillableCreatedAt(t *time.Time) *NoteCreate
- func (nc *NoteCreate) SetNillableCustomerID(id *int) *NoteCreate
- func (nc *NoteCreate) SetNillableDeliveryAddressID(id *int) *NoteCreate
- func (nc *NoteCreate) SetNillableOrdersID(id *int) *NoteCreate
- func (nc *NoteCreate) SetNillableTelID(id *int) *NoteCreate
- func (nc *NoteCreate) SetNillableUpdatedAt(t *time.Time) *NoteCreate
- func (nc *NoteCreate) SetOrders(o *Order) *NoteCreate
- func (nc *NoteCreate) SetOrdersID(id int) *NoteCreate
- func (nc *NoteCreate) SetTel(t *Tel) *NoteCreate
- func (nc *NoteCreate) SetTelID(id int) *NoteCreate
- func (nc *NoteCreate) SetUpdatedAt(t time.Time) *NoteCreate
- type NoteCreateBulk
- type NoteDelete
- type NoteDeleteOne
- type NoteEdges
- type NoteGroupBy
- func (ngb *NoteGroupBy) Aggregate(fns ...AggregateFunc) *NoteGroupBy
- func (s *NoteGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NoteGroupBy) BoolX(ctx context.Context) bool
- func (s *NoteGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NoteGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NoteGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NoteGroupBy) Float64X(ctx context.Context) float64
- func (s *NoteGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NoteGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NoteGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NoteGroupBy) IntX(ctx context.Context) int
- func (s *NoteGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NoteGroupBy) IntsX(ctx context.Context) []int
- func (ngb *NoteGroupBy) Scan(ctx context.Context, v any) error
- func (s *NoteGroupBy) ScanX(ctx context.Context, v any)
- func (s *NoteGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NoteGroupBy) StringX(ctx context.Context) string
- func (s *NoteGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NoteGroupBy) StringsX(ctx context.Context) []string
- type NoteMutation
- func (m *NoteMutation) AddField(name string, value ent.Value) error
- func (m *NoteMutation) AddedEdges() []string
- func (m *NoteMutation) AddedField(name string) (ent.Value, bool)
- func (m *NoteMutation) AddedFields() []string
- func (m *NoteMutation) AddedIDs(name string) []ent.Value
- func (m *NoteMutation) BillingAddressCleared() bool
- func (m *NoteMutation) BillingAddressID() (id int, exists bool)
- func (m *NoteMutation) BillingAddressIDs() (ids []int)
- func (m *NoteMutation) ClearBillingAddress()
- func (m *NoteMutation) ClearCustomer()
- func (m *NoteMutation) ClearDeliveryAddress()
- func (m *NoteMutation) ClearEdge(name string) error
- func (m *NoteMutation) ClearField(name string) error
- func (m *NoteMutation) ClearOrders()
- func (m *NoteMutation) ClearTel()
- func (m *NoteMutation) ClearedEdges() []string
- func (m *NoteMutation) ClearedFields() []string
- func (m NoteMutation) Client() *Client
- func (m *NoteMutation) Content() (r string, exists bool)
- func (m *NoteMutation) CreatedAt() (r time.Time, exists bool)
- func (m *NoteMutation) CustomerCleared() bool
- func (m *NoteMutation) CustomerID() (id int, exists bool)
- func (m *NoteMutation) CustomerIDs() (ids []int)
- func (m *NoteMutation) DeliveryAddressCleared() bool
- func (m *NoteMutation) DeliveryAddressID() (id int, exists bool)
- func (m *NoteMutation) DeliveryAddressIDs() (ids []int)
- func (m *NoteMutation) EdgeCleared(name string) bool
- func (m *NoteMutation) Field(name string) (ent.Value, bool)
- func (m *NoteMutation) FieldCleared(name string) bool
- func (m *NoteMutation) Fields() []string
- func (m *NoteMutation) ID() (id int, exists bool)
- func (m *NoteMutation) IDs(ctx context.Context) ([]int, error)
- func (m *NoteMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *NoteMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NoteMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NoteMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NoteMutation) Op() Op
- func (m *NoteMutation) OrdersCleared() bool
- func (m *NoteMutation) OrdersID() (id int, exists bool)
- func (m *NoteMutation) OrdersIDs() (ids []int)
- func (m *NoteMutation) RemovedEdges() []string
- func (m *NoteMutation) RemovedIDs(name string) []ent.Value
- func (m *NoteMutation) ResetBillingAddress()
- func (m *NoteMutation) ResetContent()
- func (m *NoteMutation) ResetCreatedAt()
- func (m *NoteMutation) ResetCustomer()
- func (m *NoteMutation) ResetDeliveryAddress()
- func (m *NoteMutation) ResetEdge(name string) error
- func (m *NoteMutation) ResetField(name string) error
- func (m *NoteMutation) ResetOrders()
- func (m *NoteMutation) ResetTel()
- func (m *NoteMutation) ResetUpdatedAt()
- func (m *NoteMutation) SetBillingAddressID(id int)
- func (m *NoteMutation) SetContent(s string)
- func (m *NoteMutation) SetCreatedAt(t time.Time)
- func (m *NoteMutation) SetCustomerID(id int)
- func (m *NoteMutation) SetDeliveryAddressID(id int)
- func (m *NoteMutation) SetField(name string, value ent.Value) error
- func (m *NoteMutation) SetOp(op Op)
- func (m *NoteMutation) SetOrdersID(id int)
- func (m *NoteMutation) SetTelID(id int)
- func (m *NoteMutation) SetUpdatedAt(t time.Time)
- func (m *NoteMutation) TelCleared() bool
- func (m *NoteMutation) TelID() (id int, exists bool)
- func (m *NoteMutation) TelIDs() (ids []int)
- func (m NoteMutation) Tx() (*Tx, error)
- func (m *NoteMutation) Type() string
- func (m *NoteMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *NoteMutation) Where(ps ...predicate.Note)
- func (m *NoteMutation) WhereP(ps ...func(*sql.Selector))
- type NoteQuery
- func (nq *NoteQuery) Aggregate(fns ...AggregateFunc) *NoteSelect
- func (nq *NoteQuery) All(ctx context.Context) ([]*Note, error)
- func (nq *NoteQuery) AllX(ctx context.Context) []*Note
- func (nq *NoteQuery) Clone() *NoteQuery
- func (nq *NoteQuery) Count(ctx context.Context) (int, error)
- func (nq *NoteQuery) CountX(ctx context.Context) int
- func (nq *NoteQuery) Exist(ctx context.Context) (bool, error)
- func (nq *NoteQuery) ExistX(ctx context.Context) bool
- func (nq *NoteQuery) First(ctx context.Context) (*Note, error)
- func (nq *NoteQuery) FirstID(ctx context.Context) (id int, err error)
- func (nq *NoteQuery) FirstIDX(ctx context.Context) int
- func (nq *NoteQuery) FirstX(ctx context.Context) *Note
- func (nq *NoteQuery) GroupBy(field string, fields ...string) *NoteGroupBy
- func (nq *NoteQuery) IDs(ctx context.Context) (ids []int, err error)
- func (nq *NoteQuery) IDsX(ctx context.Context) []int
- func (nq *NoteQuery) Limit(limit int) *NoteQuery
- func (nq *NoteQuery) Offset(offset int) *NoteQuery
- func (nq *NoteQuery) Only(ctx context.Context) (*Note, error)
- func (nq *NoteQuery) OnlyID(ctx context.Context) (id int, err error)
- func (nq *NoteQuery) OnlyIDX(ctx context.Context) int
- func (nq *NoteQuery) OnlyX(ctx context.Context) *Note
- func (nq *NoteQuery) Order(o ...note.OrderOption) *NoteQuery
- func (nq *NoteQuery) QueryBillingAddress() *BillingAddressQuery
- func (nq *NoteQuery) QueryCustomer() *CustomerQuery
- func (nq *NoteQuery) QueryDeliveryAddress() *DeliveryAddressQuery
- func (nq *NoteQuery) QueryOrders() *OrderQuery
- func (nq *NoteQuery) QueryTel() *TelQuery
- func (nq *NoteQuery) Select(fields ...string) *NoteSelect
- func (nq *NoteQuery) Unique(unique bool) *NoteQuery
- func (nq *NoteQuery) Where(ps ...predicate.Note) *NoteQuery
- func (nq *NoteQuery) WithBillingAddress(opts ...func(*BillingAddressQuery)) *NoteQuery
- func (nq *NoteQuery) WithCustomer(opts ...func(*CustomerQuery)) *NoteQuery
- func (nq *NoteQuery) WithDeliveryAddress(opts ...func(*DeliveryAddressQuery)) *NoteQuery
- func (nq *NoteQuery) WithOrders(opts ...func(*OrderQuery)) *NoteQuery
- func (nq *NoteQuery) WithTel(opts ...func(*TelQuery)) *NoteQuery
- type NoteSelect
- func (ns *NoteSelect) Aggregate(fns ...AggregateFunc) *NoteSelect
- func (s *NoteSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NoteSelect) BoolX(ctx context.Context) bool
- func (s *NoteSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NoteSelect) BoolsX(ctx context.Context) []bool
- func (s *NoteSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NoteSelect) Float64X(ctx context.Context) float64
- func (s *NoteSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NoteSelect) Float64sX(ctx context.Context) []float64
- func (s *NoteSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NoteSelect) IntX(ctx context.Context) int
- func (s *NoteSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NoteSelect) IntsX(ctx context.Context) []int
- func (ns *NoteSelect) Scan(ctx context.Context, v any) error
- func (s *NoteSelect) ScanX(ctx context.Context, v any)
- func (s *NoteSelect) String(ctx context.Context) (_ string, err error)
- func (s *NoteSelect) StringX(ctx context.Context) string
- func (s *NoteSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NoteSelect) StringsX(ctx context.Context) []string
- type NoteUpdate
- func (nu *NoteUpdate) ClearBillingAddress() *NoteUpdate
- func (nu *NoteUpdate) ClearCustomer() *NoteUpdate
- func (nu *NoteUpdate) ClearDeliveryAddress() *NoteUpdate
- func (nu *NoteUpdate) ClearOrders() *NoteUpdate
- func (nu *NoteUpdate) ClearTel() *NoteUpdate
- func (nu *NoteUpdate) Exec(ctx context.Context) error
- func (nu *NoteUpdate) ExecX(ctx context.Context)
- func (nu *NoteUpdate) Mutation() *NoteMutation
- func (nu *NoteUpdate) Save(ctx context.Context) (int, error)
- func (nu *NoteUpdate) SaveX(ctx context.Context) int
- func (nu *NoteUpdate) SetBillingAddress(b *BillingAddress) *NoteUpdate
- func (nu *NoteUpdate) SetBillingAddressID(id int) *NoteUpdate
- func (nu *NoteUpdate) SetContent(s string) *NoteUpdate
- func (nu *NoteUpdate) SetCustomer(c *Customer) *NoteUpdate
- func (nu *NoteUpdate) SetCustomerID(id int) *NoteUpdate
- func (nu *NoteUpdate) SetDeliveryAddress(d *DeliveryAddress) *NoteUpdate
- func (nu *NoteUpdate) SetDeliveryAddressID(id int) *NoteUpdate
- func (nu *NoteUpdate) SetNillableBillingAddressID(id *int) *NoteUpdate
- func (nu *NoteUpdate) SetNillableContent(s *string) *NoteUpdate
- func (nu *NoteUpdate) SetNillableCustomerID(id *int) *NoteUpdate
- func (nu *NoteUpdate) SetNillableDeliveryAddressID(id *int) *NoteUpdate
- func (nu *NoteUpdate) SetNillableOrdersID(id *int) *NoteUpdate
- func (nu *NoteUpdate) SetNillableTelID(id *int) *NoteUpdate
- func (nu *NoteUpdate) SetOrders(o *Order) *NoteUpdate
- func (nu *NoteUpdate) SetOrdersID(id int) *NoteUpdate
- func (nu *NoteUpdate) SetTel(t *Tel) *NoteUpdate
- func (nu *NoteUpdate) SetTelID(id int) *NoteUpdate
- func (nu *NoteUpdate) SetUpdatedAt(t time.Time) *NoteUpdate
- func (nu *NoteUpdate) Where(ps ...predicate.Note) *NoteUpdate
- type NoteUpdateOne
- func (nuo *NoteUpdateOne) ClearBillingAddress() *NoteUpdateOne
- func (nuo *NoteUpdateOne) ClearCustomer() *NoteUpdateOne
- func (nuo *NoteUpdateOne) ClearDeliveryAddress() *NoteUpdateOne
- func (nuo *NoteUpdateOne) ClearOrders() *NoteUpdateOne
- func (nuo *NoteUpdateOne) ClearTel() *NoteUpdateOne
- func (nuo *NoteUpdateOne) Exec(ctx context.Context) error
- func (nuo *NoteUpdateOne) ExecX(ctx context.Context)
- func (nuo *NoteUpdateOne) Mutation() *NoteMutation
- func (nuo *NoteUpdateOne) Save(ctx context.Context) (*Note, error)
- func (nuo *NoteUpdateOne) SaveX(ctx context.Context) *Note
- func (nuo *NoteUpdateOne) Select(field string, fields ...string) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetBillingAddress(b *BillingAddress) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetBillingAddressID(id int) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetContent(s string) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetCustomer(c *Customer) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetCustomerID(id int) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetDeliveryAddress(d *DeliveryAddress) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetDeliveryAddressID(id int) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetNillableBillingAddressID(id *int) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetNillableContent(s *string) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetNillableCustomerID(id *int) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetNillableDeliveryAddressID(id *int) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetNillableOrdersID(id *int) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetNillableTelID(id *int) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetOrders(o *Order) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetOrdersID(id int) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetTel(t *Tel) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetTelID(id int) *NoteUpdateOne
- func (nuo *NoteUpdateOne) SetUpdatedAt(t time.Time) *NoteUpdateOne
- func (nuo *NoteUpdateOne) Where(ps ...predicate.Note) *NoteUpdateOne
- type Notes
- type Op
- type Option
- type Order
- type OrderClient
- func (c *OrderClient) Create() *OrderCreate
- func (c *OrderClient) CreateBulk(builders ...*OrderCreate) *OrderCreateBulk
- func (c *OrderClient) Delete() *OrderDelete
- func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne
- func (c *OrderClient) DeleteOneID(id int) *OrderDeleteOne
- func (c *OrderClient) Get(ctx context.Context, id int) (*Order, error)
- func (c *OrderClient) GetX(ctx context.Context, id int) *Order
- func (c *OrderClient) Hooks() []Hook
- func (c *OrderClient) Intercept(interceptors ...Interceptor)
- func (c *OrderClient) Interceptors() []Interceptor
- func (c *OrderClient) MapCreateBulk(slice any, setFunc func(*OrderCreate, int)) *OrderCreateBulk
- func (c *OrderClient) Query() *OrderQuery
- func (c *OrderClient) QueryAddress(o *Order) *BillingAddressQuery
- func (c *OrderClient) QueryCustomer(o *Order) *CustomerQuery
- func (c *OrderClient) QueryNotes(o *Order) *NoteQuery
- func (c *OrderClient) Update() *OrderUpdate
- func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne
- func (c *OrderClient) UpdateOneID(id int) *OrderUpdateOne
- func (c *OrderClient) Use(hooks ...Hook)
- type OrderCreate
- func (oc *OrderCreate) AddNoteIDs(ids ...int) *OrderCreate
- func (oc *OrderCreate) AddNotes(n ...*Note) *OrderCreate
- func (oc *OrderCreate) Exec(ctx context.Context) error
- func (oc *OrderCreate) ExecX(ctx context.Context)
- func (oc *OrderCreate) Mutation() *OrderMutation
- func (oc *OrderCreate) Save(ctx context.Context) (*Order, error)
- func (oc *OrderCreate) SaveX(ctx context.Context) *Order
- func (oc *OrderCreate) SetAddress(b *BillingAddress) *OrderCreate
- func (oc *OrderCreate) SetAddressID(id int) *OrderCreate
- func (oc *OrderCreate) SetCreatedAt(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetCustomer(c *Customer) *OrderCreate
- func (oc *OrderCreate) SetCustomerID(id int) *OrderCreate
- func (oc *OrderCreate) SetNillableAddressID(id *int) *OrderCreate
- func (oc *OrderCreate) SetNillableCreatedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNillableCustomerID(id *int) *OrderCreate
- func (oc *OrderCreate) SetNillableStatus(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillableUpdatedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetStatus(s string) *OrderCreate
- func (oc *OrderCreate) SetUpdatedAt(t time.Time) *OrderCreate
- type OrderCreateBulk
- type OrderDelete
- type OrderDeleteOne
- type OrderEdges
- type OrderFunc
- type OrderGroupBy
- func (ogb *OrderGroupBy) Aggregate(fns ...AggregateFunc) *OrderGroupBy
- func (s *OrderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderGroupBy) BoolX(ctx context.Context) bool
- func (s *OrderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderGroupBy) Float64X(ctx context.Context) float64
- func (s *OrderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrderGroupBy) IntX(ctx context.Context) int
- func (s *OrderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrderGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OrderGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrderGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrderGroupBy) StringX(ctx context.Context) string
- func (s *OrderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrderGroupBy) StringsX(ctx context.Context) []string
- type OrderMutation
- func (m *OrderMutation) AddField(name string, value ent.Value) error
- func (m *OrderMutation) AddNoteIDs(ids ...int)
- func (m *OrderMutation) AddedEdges() []string
- func (m *OrderMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderMutation) AddedFields() []string
- func (m *OrderMutation) AddedIDs(name string) []ent.Value
- func (m *OrderMutation) AddressCleared() bool
- func (m *OrderMutation) AddressID() (id int, exists bool)
- func (m *OrderMutation) AddressIDs() (ids []int)
- func (m *OrderMutation) ClearAddress()
- func (m *OrderMutation) ClearCustomer()
- func (m *OrderMutation) ClearEdge(name string) error
- func (m *OrderMutation) ClearField(name string) error
- func (m *OrderMutation) ClearNotes()
- func (m *OrderMutation) ClearedEdges() []string
- func (m *OrderMutation) ClearedFields() []string
- func (m OrderMutation) Client() *Client
- func (m *OrderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderMutation) CustomerCleared() bool
- func (m *OrderMutation) CustomerID() (id int, exists bool)
- func (m *OrderMutation) CustomerIDs() (ids []int)
- func (m *OrderMutation) EdgeCleared(name string) bool
- func (m *OrderMutation) Field(name string) (ent.Value, bool)
- func (m *OrderMutation) FieldCleared(name string) bool
- func (m *OrderMutation) Fields() []string
- func (m *OrderMutation) ID() (id int, exists bool)
- func (m *OrderMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OrderMutation) NotesCleared() bool
- func (m *OrderMutation) NotesIDs() (ids []int)
- func (m *OrderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderMutation) OldStatus(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) Op() Op
- func (m *OrderMutation) RemoveNoteIDs(ids ...int)
- func (m *OrderMutation) RemovedEdges() []string
- func (m *OrderMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderMutation) RemovedNotesIDs() (ids []int)
- func (m *OrderMutation) ResetAddress()
- func (m *OrderMutation) ResetCreatedAt()
- func (m *OrderMutation) ResetCustomer()
- func (m *OrderMutation) ResetEdge(name string) error
- func (m *OrderMutation) ResetField(name string) error
- func (m *OrderMutation) ResetNotes()
- func (m *OrderMutation) ResetStatus()
- func (m *OrderMutation) ResetUpdatedAt()
- func (m *OrderMutation) SetAddressID(id int)
- func (m *OrderMutation) SetCreatedAt(t time.Time)
- func (m *OrderMutation) SetCustomerID(id int)
- func (m *OrderMutation) SetField(name string, value ent.Value) error
- func (m *OrderMutation) SetOp(op Op)
- func (m *OrderMutation) SetStatus(s string)
- func (m *OrderMutation) SetUpdatedAt(t time.Time)
- func (m *OrderMutation) Status() (r string, exists bool)
- func (m OrderMutation) Tx() (*Tx, error)
- func (m *OrderMutation) Type() string
- func (m *OrderMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OrderMutation) Where(ps ...predicate.Order)
- func (m *OrderMutation) WhereP(ps ...func(*sql.Selector))
- type OrderQuery
- func (oq *OrderQuery) Aggregate(fns ...AggregateFunc) *OrderSelect
- func (oq *OrderQuery) All(ctx context.Context) ([]*Order, error)
- func (oq *OrderQuery) AllX(ctx context.Context) []*Order
- func (oq *OrderQuery) Clone() *OrderQuery
- func (oq *OrderQuery) Count(ctx context.Context) (int, error)
- func (oq *OrderQuery) CountX(ctx context.Context) int
- func (oq *OrderQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OrderQuery) ExistX(ctx context.Context) bool
- func (oq *OrderQuery) First(ctx context.Context) (*Order, error)
- func (oq *OrderQuery) FirstID(ctx context.Context) (id int, err error)
- func (oq *OrderQuery) FirstIDX(ctx context.Context) int
- func (oq *OrderQuery) FirstX(ctx context.Context) *Order
- func (oq *OrderQuery) GroupBy(field string, fields ...string) *OrderGroupBy
- func (oq *OrderQuery) IDs(ctx context.Context) (ids []int, err error)
- func (oq *OrderQuery) IDsX(ctx context.Context) []int
- func (oq *OrderQuery) Limit(limit int) *OrderQuery
- func (oq *OrderQuery) Offset(offset int) *OrderQuery
- func (oq *OrderQuery) Only(ctx context.Context) (*Order, error)
- func (oq *OrderQuery) OnlyID(ctx context.Context) (id int, err error)
- func (oq *OrderQuery) OnlyIDX(ctx context.Context) int
- func (oq *OrderQuery) OnlyX(ctx context.Context) *Order
- func (oq *OrderQuery) Order(o ...order.OrderOption) *OrderQuery
- func (oq *OrderQuery) QueryAddress() *BillingAddressQuery
- func (oq *OrderQuery) QueryCustomer() *CustomerQuery
- func (oq *OrderQuery) QueryNotes() *NoteQuery
- func (oq *OrderQuery) Select(fields ...string) *OrderSelect
- func (oq *OrderQuery) Unique(unique bool) *OrderQuery
- func (oq *OrderQuery) Where(ps ...predicate.Order) *OrderQuery
- func (oq *OrderQuery) WithAddress(opts ...func(*BillingAddressQuery)) *OrderQuery
- func (oq *OrderQuery) WithCustomer(opts ...func(*CustomerQuery)) *OrderQuery
- func (oq *OrderQuery) WithNotes(opts ...func(*NoteQuery)) *OrderQuery
- type OrderSelect
- func (os *OrderSelect) Aggregate(fns ...AggregateFunc) *OrderSelect
- func (s *OrderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderSelect) BoolX(ctx context.Context) bool
- func (s *OrderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderSelect) BoolsX(ctx context.Context) []bool
- func (s *OrderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderSelect) Float64X(ctx context.Context) float64
- func (s *OrderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderSelect) Float64sX(ctx context.Context) []float64
- func (s *OrderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrderSelect) IntX(ctx context.Context) int
- func (s *OrderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrderSelect) IntsX(ctx context.Context) []int
- func (os *OrderSelect) Scan(ctx context.Context, v any) error
- func (s *OrderSelect) ScanX(ctx context.Context, v any)
- func (s *OrderSelect) String(ctx context.Context) (_ string, err error)
- func (s *OrderSelect) StringX(ctx context.Context) string
- func (s *OrderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrderSelect) StringsX(ctx context.Context) []string
- type OrderUpdate
- func (ou *OrderUpdate) AddNoteIDs(ids ...int) *OrderUpdate
- func (ou *OrderUpdate) AddNotes(n ...*Note) *OrderUpdate
- func (ou *OrderUpdate) ClearAddress() *OrderUpdate
- func (ou *OrderUpdate) ClearCustomer() *OrderUpdate
- func (ou *OrderUpdate) ClearNotes() *OrderUpdate
- func (ou *OrderUpdate) Exec(ctx context.Context) error
- func (ou *OrderUpdate) ExecX(ctx context.Context)
- func (ou *OrderUpdate) Mutation() *OrderMutation
- func (ou *OrderUpdate) RemoveNoteIDs(ids ...int) *OrderUpdate
- func (ou *OrderUpdate) RemoveNotes(n ...*Note) *OrderUpdate
- func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
- func (ou *OrderUpdate) SaveX(ctx context.Context) int
- func (ou *OrderUpdate) SetAddress(b *BillingAddress) *OrderUpdate
- func (ou *OrderUpdate) SetAddressID(id int) *OrderUpdate
- func (ou *OrderUpdate) SetCustomer(c *Customer) *OrderUpdate
- func (ou *OrderUpdate) SetCustomerID(id int) *OrderUpdate
- func (ou *OrderUpdate) SetNillableAddressID(id *int) *OrderUpdate
- func (ou *OrderUpdate) SetNillableCustomerID(id *int) *OrderUpdate
- func (ou *OrderUpdate) SetNillableStatus(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetStatus(s string) *OrderUpdate
- func (ou *OrderUpdate) SetUpdatedAt(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
- type OrderUpdateOne
- func (ouo *OrderUpdateOne) AddNoteIDs(ids ...int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddNotes(n ...*Note) *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearAddress() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearCustomer() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearNotes() *OrderUpdateOne
- func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
- func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
- func (ouo *OrderUpdateOne) Mutation() *OrderMutation
- func (ouo *OrderUpdateOne) RemoveNoteIDs(ids ...int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) RemoveNotes(n ...*Note) *OrderUpdateOne
- func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
- func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
- func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetAddress(b *BillingAddress) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetAddressID(id int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetCustomer(c *Customer) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetCustomerID(id int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableAddressID(id *int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableCustomerID(id *int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableStatus(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetStatus(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetUpdatedAt(t time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) Where(ps ...predicate.Order) *OrderUpdateOne
- type Orders
- type Policy
- type Position
- type PositionClient
- func (c *PositionClient) Create() *PositionCreate
- func (c *PositionClient) CreateBulk(builders ...*PositionCreate) *PositionCreateBulk
- func (c *PositionClient) Delete() *PositionDelete
- func (c *PositionClient) DeleteOne(po *Position) *PositionDeleteOne
- func (c *PositionClient) DeleteOneID(id int) *PositionDeleteOne
- func (c *PositionClient) Get(ctx context.Context, id int) (*Position, error)
- func (c *PositionClient) GetX(ctx context.Context, id int) *Position
- func (c *PositionClient) Hooks() []Hook
- func (c *PositionClient) Intercept(interceptors ...Interceptor)
- func (c *PositionClient) Interceptors() []Interceptor
- func (c *PositionClient) MapCreateBulk(slice any, setFunc func(*PositionCreate, int)) *PositionCreateBulk
- func (c *PositionClient) Query() *PositionQuery
- func (c *PositionClient) Update() *PositionUpdate
- func (c *PositionClient) UpdateOne(po *Position) *PositionUpdateOne
- func (c *PositionClient) UpdateOneID(id int) *PositionUpdateOne
- func (c *PositionClient) Use(hooks ...Hook)
- type PositionCreate
- type PositionCreateBulk
- type PositionDelete
- type PositionDeleteOne
- type PositionGroupBy
- func (pgb *PositionGroupBy) Aggregate(fns ...AggregateFunc) *PositionGroupBy
- func (s *PositionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PositionGroupBy) BoolX(ctx context.Context) bool
- func (s *PositionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PositionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PositionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PositionGroupBy) Float64X(ctx context.Context) float64
- func (s *PositionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PositionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PositionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PositionGroupBy) IntX(ctx context.Context) int
- func (s *PositionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PositionGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PositionGroupBy) Scan(ctx context.Context, v any) error
- func (s *PositionGroupBy) ScanX(ctx context.Context, v any)
- func (s *PositionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PositionGroupBy) StringX(ctx context.Context) string
- func (s *PositionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PositionGroupBy) StringsX(ctx context.Context) []string
- type PositionMutation
- func (m *PositionMutation) AddField(name string, value ent.Value) error
- func (m *PositionMutation) AddedEdges() []string
- func (m *PositionMutation) AddedField(name string) (ent.Value, bool)
- func (m *PositionMutation) AddedFields() []string
- func (m *PositionMutation) AddedIDs(name string) []ent.Value
- func (m *PositionMutation) ClearEdge(name string) error
- func (m *PositionMutation) ClearField(name string) error
- func (m *PositionMutation) ClearedEdges() []string
- func (m *PositionMutation) ClearedFields() []string
- func (m PositionMutation) Client() *Client
- func (m *PositionMutation) EdgeCleared(name string) bool
- func (m *PositionMutation) Field(name string) (ent.Value, bool)
- func (m *PositionMutation) FieldCleared(name string) bool
- func (m *PositionMutation) Fields() []string
- func (m *PositionMutation) ID() (id int, exists bool)
- func (m *PositionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PositionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PositionMutation) Op() Op
- func (m *PositionMutation) RemovedEdges() []string
- func (m *PositionMutation) RemovedIDs(name string) []ent.Value
- func (m *PositionMutation) ResetEdge(name string) error
- func (m *PositionMutation) ResetField(name string) error
- func (m *PositionMutation) SetField(name string, value ent.Value) error
- func (m *PositionMutation) SetOp(op Op)
- func (m PositionMutation) Tx() (*Tx, error)
- func (m *PositionMutation) Type() string
- func (m *PositionMutation) Where(ps ...predicate.Position)
- func (m *PositionMutation) WhereP(ps ...func(*sql.Selector))
- type PositionQuery
- func (pq *PositionQuery) Aggregate(fns ...AggregateFunc) *PositionSelect
- func (pq *PositionQuery) All(ctx context.Context) ([]*Position, error)
- func (pq *PositionQuery) AllX(ctx context.Context) []*Position
- func (pq *PositionQuery) Clone() *PositionQuery
- func (pq *PositionQuery) Count(ctx context.Context) (int, error)
- func (pq *PositionQuery) CountX(ctx context.Context) int
- func (pq *PositionQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PositionQuery) ExistX(ctx context.Context) bool
- func (pq *PositionQuery) First(ctx context.Context) (*Position, error)
- func (pq *PositionQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *PositionQuery) FirstIDX(ctx context.Context) int
- func (pq *PositionQuery) FirstX(ctx context.Context) *Position
- func (pq *PositionQuery) GroupBy(field string, fields ...string) *PositionGroupBy
- func (pq *PositionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (pq *PositionQuery) IDsX(ctx context.Context) []int
- func (pq *PositionQuery) Limit(limit int) *PositionQuery
- func (pq *PositionQuery) Offset(offset int) *PositionQuery
- func (pq *PositionQuery) Only(ctx context.Context) (*Position, error)
- func (pq *PositionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *PositionQuery) OnlyIDX(ctx context.Context) int
- func (pq *PositionQuery) OnlyX(ctx context.Context) *Position
- func (pq *PositionQuery) Order(o ...position.OrderOption) *PositionQuery
- func (pq *PositionQuery) Select(fields ...string) *PositionSelect
- func (pq *PositionQuery) Unique(unique bool) *PositionQuery
- func (pq *PositionQuery) Where(ps ...predicate.Position) *PositionQuery
- type PositionSelect
- func (ps *PositionSelect) Aggregate(fns ...AggregateFunc) *PositionSelect
- func (s *PositionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PositionSelect) BoolX(ctx context.Context) bool
- func (s *PositionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PositionSelect) BoolsX(ctx context.Context) []bool
- func (s *PositionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PositionSelect) Float64X(ctx context.Context) float64
- func (s *PositionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PositionSelect) Float64sX(ctx context.Context) []float64
- func (s *PositionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PositionSelect) IntX(ctx context.Context) int
- func (s *PositionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PositionSelect) IntsX(ctx context.Context) []int
- func (ps *PositionSelect) Scan(ctx context.Context, v any) error
- func (s *PositionSelect) ScanX(ctx context.Context, v any)
- func (s *PositionSelect) String(ctx context.Context) (_ string, err error)
- func (s *PositionSelect) StringX(ctx context.Context) string
- func (s *PositionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PositionSelect) StringsX(ctx context.Context) []string
- type PositionUpdate
- func (pu *PositionUpdate) Exec(ctx context.Context) error
- func (pu *PositionUpdate) ExecX(ctx context.Context)
- func (pu *PositionUpdate) Mutation() *PositionMutation
- func (pu *PositionUpdate) Save(ctx context.Context) (int, error)
- func (pu *PositionUpdate) SaveX(ctx context.Context) int
- func (pu *PositionUpdate) Where(ps ...predicate.Position) *PositionUpdate
- type PositionUpdateOne
- func (puo *PositionUpdateOne) Exec(ctx context.Context) error
- func (puo *PositionUpdateOne) ExecX(ctx context.Context)
- func (puo *PositionUpdateOne) Mutation() *PositionMutation
- func (puo *PositionUpdateOne) Save(ctx context.Context) (*Position, error)
- func (puo *PositionUpdateOne) SaveX(ctx context.Context) *Position
- func (puo *PositionUpdateOne) Select(field string, fields ...string) *PositionUpdateOne
- func (puo *PositionUpdateOne) Where(ps ...predicate.Position) *PositionUpdateOne
- type Positions
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Role
- type RoleClient
- func (c *RoleClient) Create() *RoleCreate
- func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk
- func (c *RoleClient) Delete() *RoleDelete
- func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne
- func (c *RoleClient) DeleteOneID(id int) *RoleDeleteOne
- func (c *RoleClient) Get(ctx context.Context, id int) (*Role, error)
- func (c *RoleClient) GetX(ctx context.Context, id int) *Role
- func (c *RoleClient) Hooks() []Hook
- func (c *RoleClient) Intercept(interceptors ...Interceptor)
- func (c *RoleClient) Interceptors() []Interceptor
- func (c *RoleClient) MapCreateBulk(slice any, setFunc func(*RoleCreate, int)) *RoleCreateBulk
- func (c *RoleClient) Query() *RoleQuery
- func (c *RoleClient) Update() *RoleUpdate
- func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne
- func (c *RoleClient) UpdateOneID(id int) *RoleUpdateOne
- func (c *RoleClient) Use(hooks ...Hook)
- type RoleCreate
- type RoleCreateBulk
- type RoleDelete
- type RoleDeleteOne
- type RoleGroupBy
- func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy
- func (s *RoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleGroupBy) BoolX(ctx context.Context) bool
- func (s *RoleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleGroupBy) Float64X(ctx context.Context) float64
- func (s *RoleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RoleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RoleGroupBy) IntX(ctx context.Context) int
- func (s *RoleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RoleGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RoleGroupBy) Scan(ctx context.Context, v any) error
- func (s *RoleGroupBy) ScanX(ctx context.Context, v any)
- func (s *RoleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RoleGroupBy) StringX(ctx context.Context) string
- func (s *RoleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RoleGroupBy) StringsX(ctx context.Context) []string
- type RoleMutation
- func (m *RoleMutation) AddField(name string, value ent.Value) error
- func (m *RoleMutation) AddedEdges() []string
- func (m *RoleMutation) AddedField(name string) (ent.Value, bool)
- func (m *RoleMutation) AddedFields() []string
- func (m *RoleMutation) AddedIDs(name string) []ent.Value
- func (m *RoleMutation) ClearEdge(name string) error
- func (m *RoleMutation) ClearField(name string) error
- func (m *RoleMutation) ClearedEdges() []string
- func (m *RoleMutation) ClearedFields() []string
- func (m RoleMutation) Client() *Client
- func (m *RoleMutation) EdgeCleared(name string) bool
- func (m *RoleMutation) Field(name string) (ent.Value, bool)
- func (m *RoleMutation) FieldCleared(name string) bool
- func (m *RoleMutation) Fields() []string
- func (m *RoleMutation) ID() (id int, exists bool)
- func (m *RoleMutation) IDs(ctx context.Context) ([]int, error)
- func (m *RoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RoleMutation) Op() Op
- func (m *RoleMutation) RemovedEdges() []string
- func (m *RoleMutation) RemovedIDs(name string) []ent.Value
- func (m *RoleMutation) ResetEdge(name string) error
- func (m *RoleMutation) ResetField(name string) error
- func (m *RoleMutation) SetField(name string, value ent.Value) error
- func (m *RoleMutation) SetOp(op Op)
- func (m RoleMutation) Tx() (*Tx, error)
- func (m *RoleMutation) Type() string
- func (m *RoleMutation) Where(ps ...predicate.Role)
- func (m *RoleMutation) WhereP(ps ...func(*sql.Selector))
- type RoleQuery
- func (rq *RoleQuery) Aggregate(fns ...AggregateFunc) *RoleSelect
- func (rq *RoleQuery) All(ctx context.Context) ([]*Role, error)
- func (rq *RoleQuery) AllX(ctx context.Context) []*Role
- func (rq *RoleQuery) Clone() *RoleQuery
- func (rq *RoleQuery) Count(ctx context.Context) (int, error)
- func (rq *RoleQuery) CountX(ctx context.Context) int
- func (rq *RoleQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RoleQuery) ExistX(ctx context.Context) bool
- func (rq *RoleQuery) First(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) FirstID(ctx context.Context) (id int, err error)
- func (rq *RoleQuery) FirstIDX(ctx context.Context) int
- func (rq *RoleQuery) FirstX(ctx context.Context) *Role
- func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy
- func (rq *RoleQuery) IDs(ctx context.Context) (ids []int, err error)
- func (rq *RoleQuery) IDsX(ctx context.Context) []int
- func (rq *RoleQuery) Limit(limit int) *RoleQuery
- func (rq *RoleQuery) Offset(offset int) *RoleQuery
- func (rq *RoleQuery) Only(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rq *RoleQuery) OnlyIDX(ctx context.Context) int
- func (rq *RoleQuery) OnlyX(ctx context.Context) *Role
- func (rq *RoleQuery) Order(o ...role.OrderOption) *RoleQuery
- func (rq *RoleQuery) Select(fields ...string) *RoleSelect
- func (rq *RoleQuery) Unique(unique bool) *RoleQuery
- func (rq *RoleQuery) Where(ps ...predicate.Role) *RoleQuery
- type RoleSelect
- func (rs *RoleSelect) Aggregate(fns ...AggregateFunc) *RoleSelect
- func (s *RoleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleSelect) BoolX(ctx context.Context) bool
- func (s *RoleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleSelect) BoolsX(ctx context.Context) []bool
- func (s *RoleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleSelect) Float64X(ctx context.Context) float64
- func (s *RoleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleSelect) Float64sX(ctx context.Context) []float64
- func (s *RoleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RoleSelect) IntX(ctx context.Context) int
- func (s *RoleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RoleSelect) IntsX(ctx context.Context) []int
- func (rs *RoleSelect) Scan(ctx context.Context, v any) error
- func (s *RoleSelect) ScanX(ctx context.Context, v any)
- func (s *RoleSelect) String(ctx context.Context) (_ string, err error)
- func (s *RoleSelect) StringX(ctx context.Context) string
- func (s *RoleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RoleSelect) StringsX(ctx context.Context) []string
- type RoleUpdate
- func (ru *RoleUpdate) Exec(ctx context.Context) error
- func (ru *RoleUpdate) ExecX(ctx context.Context)
- func (ru *RoleUpdate) Mutation() *RoleMutation
- func (ru *RoleUpdate) Save(ctx context.Context) (int, error)
- func (ru *RoleUpdate) SaveX(ctx context.Context) int
- func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate
- type RoleUpdateOne
- func (ruo *RoleUpdateOne) Exec(ctx context.Context) error
- func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
- func (ruo *RoleUpdateOne) Mutation() *RoleMutation
- func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)
- func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role
- func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) Where(ps ...predicate.Role) *RoleUpdateOne
- type Roles
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tel
- type TelClient
- func (c *TelClient) Create() *TelCreate
- func (c *TelClient) CreateBulk(builders ...*TelCreate) *TelCreateBulk
- func (c *TelClient) Delete() *TelDelete
- func (c *TelClient) DeleteOne(t *Tel) *TelDeleteOne
- func (c *TelClient) DeleteOneID(id int) *TelDeleteOne
- func (c *TelClient) Get(ctx context.Context, id int) (*Tel, error)
- func (c *TelClient) GetX(ctx context.Context, id int) *Tel
- func (c *TelClient) Hooks() []Hook
- func (c *TelClient) Intercept(interceptors ...Interceptor)
- func (c *TelClient) Interceptors() []Interceptor
- func (c *TelClient) MapCreateBulk(slice any, setFunc func(*TelCreate, int)) *TelCreateBulk
- func (c *TelClient) Query() *TelQuery
- func (c *TelClient) QueryCustomer(t *Tel) *CustomerQuery
- func (c *TelClient) QueryNote(t *Tel) *NoteQuery
- func (c *TelClient) Update() *TelUpdate
- func (c *TelClient) UpdateOne(t *Tel) *TelUpdateOne
- func (c *TelClient) UpdateOneID(id int) *TelUpdateOne
- func (c *TelClient) Use(hooks ...Hook)
- type TelCreate
- func (tc *TelCreate) AddCustomer(c ...*Customer) *TelCreate
- func (tc *TelCreate) AddCustomerIDs(ids ...int) *TelCreate
- func (tc *TelCreate) Exec(ctx context.Context) error
- func (tc *TelCreate) ExecX(ctx context.Context)
- func (tc *TelCreate) Mutation() *TelMutation
- func (tc *TelCreate) Save(ctx context.Context) (*Tel, error)
- func (tc *TelCreate) SaveX(ctx context.Context) *Tel
- func (tc *TelCreate) SetCreatedAt(t time.Time) *TelCreate
- func (tc *TelCreate) SetNillableCreatedAt(t *time.Time) *TelCreate
- func (tc *TelCreate) SetNillableNoteID(id *int) *TelCreate
- func (tc *TelCreate) SetNillableUpdatedAt(t *time.Time) *TelCreate
- func (tc *TelCreate) SetNote(n *Note) *TelCreate
- func (tc *TelCreate) SetNoteID(id int) *TelCreate
- func (tc *TelCreate) SetTel(s string) *TelCreate
- func (tc *TelCreate) SetUpdatedAt(t time.Time) *TelCreate
- type TelCreateBulk
- type TelDelete
- type TelDeleteOne
- type TelEdges
- type TelGroupBy
- func (tgb *TelGroupBy) Aggregate(fns ...AggregateFunc) *TelGroupBy
- func (s *TelGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TelGroupBy) BoolX(ctx context.Context) bool
- func (s *TelGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TelGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TelGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TelGroupBy) Float64X(ctx context.Context) float64
- func (s *TelGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TelGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TelGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TelGroupBy) IntX(ctx context.Context) int
- func (s *TelGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TelGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TelGroupBy) Scan(ctx context.Context, v any) error
- func (s *TelGroupBy) ScanX(ctx context.Context, v any)
- func (s *TelGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TelGroupBy) StringX(ctx context.Context) string
- func (s *TelGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TelGroupBy) StringsX(ctx context.Context) []string
- type TelMutation
- func (m *TelMutation) AddCustomerIDs(ids ...int)
- func (m *TelMutation) AddField(name string, value ent.Value) error
- func (m *TelMutation) AddedEdges() []string
- func (m *TelMutation) AddedField(name string) (ent.Value, bool)
- func (m *TelMutation) AddedFields() []string
- func (m *TelMutation) AddedIDs(name string) []ent.Value
- func (m *TelMutation) ClearCustomer()
- func (m *TelMutation) ClearEdge(name string) error
- func (m *TelMutation) ClearField(name string) error
- func (m *TelMutation) ClearNote()
- func (m *TelMutation) ClearedEdges() []string
- func (m *TelMutation) ClearedFields() []string
- func (m TelMutation) Client() *Client
- func (m *TelMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TelMutation) CustomerCleared() bool
- func (m *TelMutation) CustomerIDs() (ids []int)
- func (m *TelMutation) EdgeCleared(name string) bool
- func (m *TelMutation) Field(name string) (ent.Value, bool)
- func (m *TelMutation) FieldCleared(name string) bool
- func (m *TelMutation) Fields() []string
- func (m *TelMutation) ID() (id int, exists bool)
- func (m *TelMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TelMutation) NoteCleared() bool
- func (m *TelMutation) NoteID() (id int, exists bool)
- func (m *TelMutation) NoteIDs() (ids []int)
- func (m *TelMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TelMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TelMutation) OldTel(ctx context.Context) (v string, err error)
- func (m *TelMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TelMutation) Op() Op
- func (m *TelMutation) RemoveCustomerIDs(ids ...int)
- func (m *TelMutation) RemovedCustomerIDs() (ids []int)
- func (m *TelMutation) RemovedEdges() []string
- func (m *TelMutation) RemovedIDs(name string) []ent.Value
- func (m *TelMutation) ResetCreatedAt()
- func (m *TelMutation) ResetCustomer()
- func (m *TelMutation) ResetEdge(name string) error
- func (m *TelMutation) ResetField(name string) error
- func (m *TelMutation) ResetNote()
- func (m *TelMutation) ResetTel()
- func (m *TelMutation) ResetUpdatedAt()
- func (m *TelMutation) SetCreatedAt(t time.Time)
- func (m *TelMutation) SetField(name string, value ent.Value) error
- func (m *TelMutation) SetNoteID(id int)
- func (m *TelMutation) SetOp(op Op)
- func (m *TelMutation) SetTel(s string)
- func (m *TelMutation) SetUpdatedAt(t time.Time)
- func (m *TelMutation) Tel() (r string, exists bool)
- func (m TelMutation) Tx() (*Tx, error)
- func (m *TelMutation) Type() string
- func (m *TelMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *TelMutation) Where(ps ...predicate.Tel)
- func (m *TelMutation) WhereP(ps ...func(*sql.Selector))
- type TelQuery
- func (tq *TelQuery) Aggregate(fns ...AggregateFunc) *TelSelect
- func (tq *TelQuery) All(ctx context.Context) ([]*Tel, error)
- func (tq *TelQuery) AllX(ctx context.Context) []*Tel
- func (tq *TelQuery) Clone() *TelQuery
- func (tq *TelQuery) Count(ctx context.Context) (int, error)
- func (tq *TelQuery) CountX(ctx context.Context) int
- func (tq *TelQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TelQuery) ExistX(ctx context.Context) bool
- func (tq *TelQuery) First(ctx context.Context) (*Tel, error)
- func (tq *TelQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TelQuery) FirstIDX(ctx context.Context) int
- func (tq *TelQuery) FirstX(ctx context.Context) *Tel
- func (tq *TelQuery) GroupBy(field string, fields ...string) *TelGroupBy
- func (tq *TelQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tq *TelQuery) IDsX(ctx context.Context) []int
- func (tq *TelQuery) Limit(limit int) *TelQuery
- func (tq *TelQuery) Offset(offset int) *TelQuery
- func (tq *TelQuery) Only(ctx context.Context) (*Tel, error)
- func (tq *TelQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TelQuery) OnlyIDX(ctx context.Context) int
- func (tq *TelQuery) OnlyX(ctx context.Context) *Tel
- func (tq *TelQuery) Order(o ...tel.OrderOption) *TelQuery
- func (tq *TelQuery) QueryCustomer() *CustomerQuery
- func (tq *TelQuery) QueryNote() *NoteQuery
- func (tq *TelQuery) Select(fields ...string) *TelSelect
- func (tq *TelQuery) Unique(unique bool) *TelQuery
- func (tq *TelQuery) Where(ps ...predicate.Tel) *TelQuery
- func (tq *TelQuery) WithCustomer(opts ...func(*CustomerQuery)) *TelQuery
- func (tq *TelQuery) WithNote(opts ...func(*NoteQuery)) *TelQuery
- type TelSelect
- func (ts *TelSelect) Aggregate(fns ...AggregateFunc) *TelSelect
- func (s *TelSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TelSelect) BoolX(ctx context.Context) bool
- func (s *TelSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TelSelect) BoolsX(ctx context.Context) []bool
- func (s *TelSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TelSelect) Float64X(ctx context.Context) float64
- func (s *TelSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TelSelect) Float64sX(ctx context.Context) []float64
- func (s *TelSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TelSelect) IntX(ctx context.Context) int
- func (s *TelSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TelSelect) IntsX(ctx context.Context) []int
- func (ts *TelSelect) Scan(ctx context.Context, v any) error
- func (s *TelSelect) ScanX(ctx context.Context, v any)
- func (s *TelSelect) String(ctx context.Context) (_ string, err error)
- func (s *TelSelect) StringX(ctx context.Context) string
- func (s *TelSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TelSelect) StringsX(ctx context.Context) []string
- type TelUpdate
- func (tu *TelUpdate) AddCustomer(c ...*Customer) *TelUpdate
- func (tu *TelUpdate) AddCustomerIDs(ids ...int) *TelUpdate
- func (tu *TelUpdate) ClearCustomer() *TelUpdate
- func (tu *TelUpdate) ClearNote() *TelUpdate
- func (tu *TelUpdate) Exec(ctx context.Context) error
- func (tu *TelUpdate) ExecX(ctx context.Context)
- func (tu *TelUpdate) Mutation() *TelMutation
- func (tu *TelUpdate) RemoveCustomer(c ...*Customer) *TelUpdate
- func (tu *TelUpdate) RemoveCustomerIDs(ids ...int) *TelUpdate
- func (tu *TelUpdate) Save(ctx context.Context) (int, error)
- func (tu *TelUpdate) SaveX(ctx context.Context) int
- func (tu *TelUpdate) SetNillableNoteID(id *int) *TelUpdate
- func (tu *TelUpdate) SetNillableTel(s *string) *TelUpdate
- func (tu *TelUpdate) SetNote(n *Note) *TelUpdate
- func (tu *TelUpdate) SetNoteID(id int) *TelUpdate
- func (tu *TelUpdate) SetTel(s string) *TelUpdate
- func (tu *TelUpdate) SetUpdatedAt(t time.Time) *TelUpdate
- func (tu *TelUpdate) Where(ps ...predicate.Tel) *TelUpdate
- type TelUpdateOne
- func (tuo *TelUpdateOne) AddCustomer(c ...*Customer) *TelUpdateOne
- func (tuo *TelUpdateOne) AddCustomerIDs(ids ...int) *TelUpdateOne
- func (tuo *TelUpdateOne) ClearCustomer() *TelUpdateOne
- func (tuo *TelUpdateOne) ClearNote() *TelUpdateOne
- func (tuo *TelUpdateOne) Exec(ctx context.Context) error
- func (tuo *TelUpdateOne) ExecX(ctx context.Context)
- func (tuo *TelUpdateOne) Mutation() *TelMutation
- func (tuo *TelUpdateOne) RemoveCustomer(c ...*Customer) *TelUpdateOne
- func (tuo *TelUpdateOne) RemoveCustomerIDs(ids ...int) *TelUpdateOne
- func (tuo *TelUpdateOne) Save(ctx context.Context) (*Tel, error)
- func (tuo *TelUpdateOne) SaveX(ctx context.Context) *Tel
- func (tuo *TelUpdateOne) Select(field string, fields ...string) *TelUpdateOne
- func (tuo *TelUpdateOne) SetNillableNoteID(id *int) *TelUpdateOne
- func (tuo *TelUpdateOne) SetNillableTel(s *string) *TelUpdateOne
- func (tuo *TelUpdateOne) SetNote(n *Note) *TelUpdateOne
- func (tuo *TelUpdateOne) SetNoteID(id int) *TelUpdateOne
- func (tuo *TelUpdateOne) SetTel(s string) *TelUpdateOne
- func (tuo *TelUpdateOne) SetUpdatedAt(t time.Time) *TelUpdateOne
- func (tuo *TelUpdateOne) Where(ps ...predicate.Tel) *TelUpdateOne
- type Tels
- 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 int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- 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) SetLastLogin(t time.Time) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- 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) AddField(name string, value ent.Value) error
- 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) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, 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) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) LastLogin() (r time.Time, exists bool)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldLastLogin(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetLastLogin()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetLastLogin(t time.Time)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) SetUsername(s string)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Username() (r string, 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 int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- 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 int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *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) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetLastLogin(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableLastLogin(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableUsername(s *string) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- 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) SetLastLogin(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastLogin(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUsername(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- 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. TypeBillingAddress = "BillingAddress" TypeCustomer = "Customer" TypeDeliveryAddress = "DeliveryAddress" TypeLogin = "Login" TypeNote = "Note" TypeOrder = "Order" TypePosition = "Position" TypeRole = "Role" TypeTel = "Tel" TypeUser = "User" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type BillingAddress ¶
type BillingAddress struct { // ID of the ent. ID int `json:"id,omitempty"` // City holds the value of the "city" field. City string `json:"city,omitempty"` // Street holds the value of the "street" field. Street string `json:"street,omitempty"` // Zip holds the value of the "zip" field. Zip string `json:"zip,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"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BillingAddressQuery when eager-loading is set. Edges BillingAddressEdges `json:"edges"` // contains filtered or unexported fields }
BillingAddress is the model entity for the BillingAddress schema.
func (*BillingAddress) QueryCustomer ¶
func (ba *BillingAddress) QueryCustomer() *CustomerQuery
QueryCustomer queries the "customer" edge of the BillingAddress entity.
func (*BillingAddress) QueryNotes ¶
func (ba *BillingAddress) QueryNotes() *NoteQuery
QueryNotes queries the "notes" edge of the BillingAddress entity.
func (*BillingAddress) String ¶
func (ba *BillingAddress) String() string
String implements the fmt.Stringer.
func (*BillingAddress) Unwrap ¶
func (ba *BillingAddress) Unwrap() *BillingAddress
Unwrap unwraps the BillingAddress 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 (*BillingAddress) Update ¶
func (ba *BillingAddress) Update() *BillingAddressUpdateOne
Update returns a builder for updating this BillingAddress. Note that you need to call BillingAddress.Unwrap() before calling this method if this BillingAddress was returned from a transaction, and the transaction was committed or rolled back.
type BillingAddressClient ¶
type BillingAddressClient struct {
// contains filtered or unexported fields
}
BillingAddressClient is a client for the BillingAddress schema.
func NewBillingAddressClient ¶
func NewBillingAddressClient(c config) *BillingAddressClient
NewBillingAddressClient returns a client for the BillingAddress from the given config.
func (*BillingAddressClient) Create ¶
func (c *BillingAddressClient) Create() *BillingAddressCreate
Create returns a builder for creating a BillingAddress entity.
func (*BillingAddressClient) CreateBulk ¶
func (c *BillingAddressClient) CreateBulk(builders ...*BillingAddressCreate) *BillingAddressCreateBulk
CreateBulk returns a builder for creating a bulk of BillingAddress entities.
func (*BillingAddressClient) Delete ¶
func (c *BillingAddressClient) Delete() *BillingAddressDelete
Delete returns a delete builder for BillingAddress.
func (*BillingAddressClient) DeleteOne ¶
func (c *BillingAddressClient) DeleteOne(ba *BillingAddress) *BillingAddressDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BillingAddressClient) DeleteOneID ¶
func (c *BillingAddressClient) DeleteOneID(id int) *BillingAddressDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*BillingAddressClient) Get ¶
func (c *BillingAddressClient) Get(ctx context.Context, id int) (*BillingAddress, error)
Get returns a BillingAddress entity by its id.
func (*BillingAddressClient) GetX ¶
func (c *BillingAddressClient) GetX(ctx context.Context, id int) *BillingAddress
GetX is like Get, but panics if an error occurs.
func (*BillingAddressClient) Hooks ¶
func (c *BillingAddressClient) Hooks() []Hook
Hooks returns the client hooks.
func (*BillingAddressClient) Intercept ¶
func (c *BillingAddressClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `billingaddress.Intercept(f(g(h())))`.
func (*BillingAddressClient) Interceptors ¶
func (c *BillingAddressClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*BillingAddressClient) MapCreateBulk ¶
func (c *BillingAddressClient) MapCreateBulk(slice any, setFunc func(*BillingAddressCreate, int)) *BillingAddressCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*BillingAddressClient) Query ¶
func (c *BillingAddressClient) Query() *BillingAddressQuery
Query returns a query builder for BillingAddress.
func (*BillingAddressClient) QueryCustomer ¶
func (c *BillingAddressClient) QueryCustomer(ba *BillingAddress) *CustomerQuery
QueryCustomer queries the customer edge of a BillingAddress.
func (*BillingAddressClient) QueryNotes ¶
func (c *BillingAddressClient) QueryNotes(ba *BillingAddress) *NoteQuery
QueryNotes queries the notes edge of a BillingAddress.
func (*BillingAddressClient) Update ¶
func (c *BillingAddressClient) Update() *BillingAddressUpdate
Update returns an update builder for BillingAddress.
func (*BillingAddressClient) UpdateOne ¶
func (c *BillingAddressClient) UpdateOne(ba *BillingAddress) *BillingAddressUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BillingAddressClient) UpdateOneID ¶
func (c *BillingAddressClient) UpdateOneID(id int) *BillingAddressUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BillingAddressClient) Use ¶
func (c *BillingAddressClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `billingaddress.Hooks(f(g(h())))`.
type BillingAddressCreate ¶
type BillingAddressCreate struct {
// contains filtered or unexported fields
}
BillingAddressCreate is the builder for creating a BillingAddress entity.
func (*BillingAddressCreate) AddNoteIDs ¶
func (bac *BillingAddressCreate) AddNoteIDs(ids ...int) *BillingAddressCreate
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*BillingAddressCreate) AddNotes ¶
func (bac *BillingAddressCreate) AddNotes(n ...*Note) *BillingAddressCreate
AddNotes adds the "notes" edges to the Note entity.
func (*BillingAddressCreate) Exec ¶
func (bac *BillingAddressCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BillingAddressCreate) ExecX ¶
func (bac *BillingAddressCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BillingAddressCreate) Mutation ¶
func (bac *BillingAddressCreate) Mutation() *BillingAddressMutation
Mutation returns the BillingAddressMutation object of the builder.
func (*BillingAddressCreate) Save ¶
func (bac *BillingAddressCreate) Save(ctx context.Context) (*BillingAddress, error)
Save creates the BillingAddress in the database.
func (*BillingAddressCreate) SaveX ¶
func (bac *BillingAddressCreate) SaveX(ctx context.Context) *BillingAddress
SaveX calls Save and panics if Save returns an error.
func (*BillingAddressCreate) SetCity ¶
func (bac *BillingAddressCreate) SetCity(s string) *BillingAddressCreate
SetCity sets the "city" field.
func (*BillingAddressCreate) SetCreatedAt ¶
func (bac *BillingAddressCreate) SetCreatedAt(t time.Time) *BillingAddressCreate
SetCreatedAt sets the "created_at" field.
func (*BillingAddressCreate) SetCustomer ¶
func (bac *BillingAddressCreate) SetCustomer(c *Customer) *BillingAddressCreate
SetCustomer sets the "customer" edge to the Customer entity.
func (*BillingAddressCreate) SetCustomerID ¶
func (bac *BillingAddressCreate) SetCustomerID(id int) *BillingAddressCreate
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*BillingAddressCreate) SetNillableCreatedAt ¶
func (bac *BillingAddressCreate) SetNillableCreatedAt(t *time.Time) *BillingAddressCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*BillingAddressCreate) SetNillableCustomerID ¶
func (bac *BillingAddressCreate) SetNillableCustomerID(id *int) *BillingAddressCreate
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*BillingAddressCreate) SetNillableUpdatedAt ¶
func (bac *BillingAddressCreate) SetNillableUpdatedAt(t *time.Time) *BillingAddressCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*BillingAddressCreate) SetStreet ¶
func (bac *BillingAddressCreate) SetStreet(s string) *BillingAddressCreate
SetStreet sets the "street" field.
func (*BillingAddressCreate) SetUpdatedAt ¶
func (bac *BillingAddressCreate) SetUpdatedAt(t time.Time) *BillingAddressCreate
SetUpdatedAt sets the "updated_at" field.
func (*BillingAddressCreate) SetZip ¶
func (bac *BillingAddressCreate) SetZip(s string) *BillingAddressCreate
SetZip sets the "zip" field.
type BillingAddressCreateBulk ¶
type BillingAddressCreateBulk struct {
// contains filtered or unexported fields
}
BillingAddressCreateBulk is the builder for creating many BillingAddress entities in bulk.
func (*BillingAddressCreateBulk) Exec ¶
func (bacb *BillingAddressCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BillingAddressCreateBulk) ExecX ¶
func (bacb *BillingAddressCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BillingAddressCreateBulk) Save ¶
func (bacb *BillingAddressCreateBulk) Save(ctx context.Context) ([]*BillingAddress, error)
Save creates the BillingAddress entities in the database.
func (*BillingAddressCreateBulk) SaveX ¶
func (bacb *BillingAddressCreateBulk) SaveX(ctx context.Context) []*BillingAddress
SaveX is like Save, but panics if an error occurs.
type BillingAddressDelete ¶
type BillingAddressDelete struct {
// contains filtered or unexported fields
}
BillingAddressDelete is the builder for deleting a BillingAddress entity.
func (*BillingAddressDelete) Exec ¶
func (bad *BillingAddressDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BillingAddressDelete) ExecX ¶
func (bad *BillingAddressDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BillingAddressDelete) Where ¶
func (bad *BillingAddressDelete) Where(ps ...predicate.BillingAddress) *BillingAddressDelete
Where appends a list predicates to the BillingAddressDelete builder.
type BillingAddressDeleteOne ¶
type BillingAddressDeleteOne struct {
// contains filtered or unexported fields
}
BillingAddressDeleteOne is the builder for deleting a single BillingAddress entity.
func (*BillingAddressDeleteOne) Exec ¶
func (bado *BillingAddressDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BillingAddressDeleteOne) ExecX ¶
func (bado *BillingAddressDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BillingAddressDeleteOne) Where ¶
func (bado *BillingAddressDeleteOne) Where(ps ...predicate.BillingAddress) *BillingAddressDeleteOne
Where appends a list predicates to the BillingAddressDelete builder.
type BillingAddressEdges ¶
type BillingAddressEdges struct { // Customer holds the value of the customer edge. Customer *Customer `json:"customer,omitempty"` // Notes holds the value of the notes edge. Notes []*Note `json:"notes,omitempty"` // contains filtered or unexported fields }
BillingAddressEdges holds the relations/edges for other nodes in the graph.
func (BillingAddressEdges) CustomerOrErr ¶
func (e BillingAddressEdges) CustomerOrErr() (*Customer, error)
CustomerOrErr returns the Customer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (BillingAddressEdges) NotesOrErr ¶
func (e BillingAddressEdges) NotesOrErr() ([]*Note, error)
NotesOrErr returns the Notes value or an error if the edge was not loaded in eager-loading.
type BillingAddressGroupBy ¶
type BillingAddressGroupBy struct {
// contains filtered or unexported fields
}
BillingAddressGroupBy is the group-by builder for BillingAddress entities.
func (*BillingAddressGroupBy) Aggregate ¶
func (bagb *BillingAddressGroupBy) Aggregate(fns ...AggregateFunc) *BillingAddressGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BillingAddressGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BillingAddressGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BillingAddressGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BillingAddressGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BillingAddressGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*BillingAddressGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BillingAddressGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BillingAddressGroupBy) Scan ¶
func (bagb *BillingAddressGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BillingAddressGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BillingAddressMutation ¶
type BillingAddressMutation struct {
// contains filtered or unexported fields
}
BillingAddressMutation represents an operation that mutates the BillingAddress nodes in the graph.
func (*BillingAddressMutation) AddField ¶
func (m *BillingAddressMutation) 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 (*BillingAddressMutation) AddNoteIDs ¶
func (m *BillingAddressMutation) AddNoteIDs(ids ...int)
AddNoteIDs adds the "notes" edge to the Note entity by ids.
func (*BillingAddressMutation) AddedEdges ¶
func (m *BillingAddressMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BillingAddressMutation) AddedField ¶
func (m *BillingAddressMutation) 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 (*BillingAddressMutation) AddedFields ¶
func (m *BillingAddressMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BillingAddressMutation) AddedIDs ¶
func (m *BillingAddressMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BillingAddressMutation) City ¶
func (m *BillingAddressMutation) City() (r string, exists bool)
City returns the value of the "city" field in the mutation.
func (*BillingAddressMutation) ClearCustomer ¶
func (m *BillingAddressMutation) ClearCustomer()
ClearCustomer clears the "customer" edge to the Customer entity.
func (*BillingAddressMutation) ClearEdge ¶
func (m *BillingAddressMutation) 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 (*BillingAddressMutation) ClearField ¶
func (m *BillingAddressMutation) 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 (*BillingAddressMutation) ClearNotes ¶
func (m *BillingAddressMutation) ClearNotes()
ClearNotes clears the "notes" edge to the Note entity.
func (*BillingAddressMutation) ClearedEdges ¶
func (m *BillingAddressMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BillingAddressMutation) ClearedFields ¶
func (m *BillingAddressMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BillingAddressMutation) Client ¶
func (m BillingAddressMutation) 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 (*BillingAddressMutation) CreatedAt ¶
func (m *BillingAddressMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*BillingAddressMutation) CustomerCleared ¶
func (m *BillingAddressMutation) CustomerCleared() bool
CustomerCleared reports if the "customer" edge to the Customer entity was cleared.
func (*BillingAddressMutation) CustomerID ¶
func (m *BillingAddressMutation) CustomerID() (id int, exists bool)
CustomerID returns the "customer" edge ID in the mutation.
func (*BillingAddressMutation) CustomerIDs ¶
func (m *BillingAddressMutation) CustomerIDs() (ids []int)
CustomerIDs returns the "customer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CustomerID instead. It exists only for internal usage by the builders.
func (*BillingAddressMutation) EdgeCleared ¶
func (m *BillingAddressMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BillingAddressMutation) Field ¶
func (m *BillingAddressMutation) 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 (*BillingAddressMutation) FieldCleared ¶
func (m *BillingAddressMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BillingAddressMutation) Fields ¶
func (m *BillingAddressMutation) 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 (*BillingAddressMutation) ID ¶
func (m *BillingAddressMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*BillingAddressMutation) IDs ¶
func (m *BillingAddressMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*BillingAddressMutation) NotesCleared ¶
func (m *BillingAddressMutation) NotesCleared() bool
NotesCleared reports if the "notes" edge to the Note entity was cleared.
func (*BillingAddressMutation) NotesIDs ¶
func (m *BillingAddressMutation) NotesIDs() (ids []int)
NotesIDs returns the "notes" edge IDs in the mutation.
func (*BillingAddressMutation) OldCity ¶
func (m *BillingAddressMutation) OldCity(ctx context.Context) (v string, err error)
OldCity returns the old "city" field's value of the BillingAddress entity. If the BillingAddress 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 (*BillingAddressMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the BillingAddress entity. If the BillingAddress 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 (*BillingAddressMutation) 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 (*BillingAddressMutation) OldStreet ¶
func (m *BillingAddressMutation) OldStreet(ctx context.Context) (v string, err error)
OldStreet returns the old "street" field's value of the BillingAddress entity. If the BillingAddress 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 (*BillingAddressMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the BillingAddress entity. If the BillingAddress 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 (*BillingAddressMutation) OldZip ¶
func (m *BillingAddressMutation) OldZip(ctx context.Context) (v string, err error)
OldZip returns the old "zip" field's value of the BillingAddress entity. If the BillingAddress 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 (*BillingAddressMutation) Op ¶
func (m *BillingAddressMutation) Op() Op
Op returns the operation name.
func (*BillingAddressMutation) RemoveNoteIDs ¶
func (m *BillingAddressMutation) RemoveNoteIDs(ids ...int)
RemoveNoteIDs removes the "notes" edge to the Note entity by IDs.
func (*BillingAddressMutation) RemovedEdges ¶
func (m *BillingAddressMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BillingAddressMutation) RemovedIDs ¶
func (m *BillingAddressMutation) 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 (*BillingAddressMutation) RemovedNotesIDs ¶
func (m *BillingAddressMutation) RemovedNotesIDs() (ids []int)
RemovedNotes returns the removed IDs of the "notes" edge to the Note entity.
func (*BillingAddressMutation) ResetCity ¶
func (m *BillingAddressMutation) ResetCity()
ResetCity resets all changes to the "city" field.
func (*BillingAddressMutation) ResetCreatedAt ¶
func (m *BillingAddressMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*BillingAddressMutation) ResetCustomer ¶
func (m *BillingAddressMutation) ResetCustomer()
ResetCustomer resets all changes to the "customer" edge.
func (*BillingAddressMutation) ResetEdge ¶
func (m *BillingAddressMutation) 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 (*BillingAddressMutation) ResetField ¶
func (m *BillingAddressMutation) 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 (*BillingAddressMutation) ResetNotes ¶
func (m *BillingAddressMutation) ResetNotes()
ResetNotes resets all changes to the "notes" edge.
func (*BillingAddressMutation) ResetStreet ¶
func (m *BillingAddressMutation) ResetStreet()
ResetStreet resets all changes to the "street" field.
func (*BillingAddressMutation) ResetUpdatedAt ¶
func (m *BillingAddressMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*BillingAddressMutation) ResetZip ¶
func (m *BillingAddressMutation) ResetZip()
ResetZip resets all changes to the "zip" field.
func (*BillingAddressMutation) SetCity ¶
func (m *BillingAddressMutation) SetCity(s string)
SetCity sets the "city" field.
func (*BillingAddressMutation) SetCreatedAt ¶
func (m *BillingAddressMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*BillingAddressMutation) SetCustomerID ¶
func (m *BillingAddressMutation) SetCustomerID(id int)
SetCustomerID sets the "customer" edge to the Customer entity by id.
func (*BillingAddressMutation) SetField ¶
func (m *BillingAddressMutation) 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 (*BillingAddressMutation) SetOp ¶
func (m *BillingAddressMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BillingAddressMutation) SetStreet ¶
func (m *BillingAddressMutation) SetStreet(s string)
SetStreet sets the "street" field.
func (*BillingAddressMutation) SetUpdatedAt ¶
func (m *BillingAddressMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*BillingAddressMutation) SetZip ¶
func (m *BillingAddressMutation) SetZip(s string)
SetZip sets the "zip" field.
func (*BillingAddressMutation) Street ¶
func (m *BillingAddressMutation) Street() (r string, exists bool)
Street returns the value of the "street" field in the mutation.
func (BillingAddressMutation) Tx ¶
func (m BillingAddressMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BillingAddressMutation) Type ¶
func (m *BillingAddressMutation) Type() string
Type returns the node type of this mutation (BillingAddress).
func (*BillingAddressMutation) UpdatedAt ¶
func (m *BillingAddressMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*BillingAddressMutation) Where ¶
func (m *BillingAddressMutation) Where(ps ...predicate.BillingAddress)
Where appends a list predicates to the BillingAddressMutation builder.
func (*BillingAddressMutation) WhereP ¶
func (m *BillingAddressMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the BillingAddressMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*BillingAddressMutation) Zip ¶
func (m *BillingAddressMutation) Zip() (r string, exists bool)
Zip returns the value of the "zip" field in the mutation.
type BillingAddressQuery ¶
type BillingAddressQuery struct {
// contains filtered or unexported fields
}
BillingAddressQuery is the builder for querying BillingAddress entities.
func (*BillingAddressQuery) Aggregate ¶
func (baq *BillingAddressQuery) Aggregate(fns ...AggregateFunc) *BillingAddressSelect
Aggregate returns a BillingAddressSelect configured with the given aggregations.
func (*BillingAddressQuery) All ¶
func (baq *BillingAddressQuery) All(ctx context.Context) ([]*BillingAddress, error)
All executes the query and returns a list of BillingAddresses.
func (*BillingAddressQuery) AllX ¶
func (baq *BillingAddressQuery) AllX(ctx context.Context) []*BillingAddress
AllX is like All, but panics if an error occurs.
func (*BillingAddressQuery) Clone ¶
func (baq *BillingAddressQuery) Clone() *BillingAddressQuery
Clone returns a duplicate of the BillingAddressQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BillingAddressQuery) Count ¶
func (baq *BillingAddressQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BillingAddressQuery) CountX ¶
func (baq *BillingAddressQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BillingAddressQuery) Exist ¶
func (baq *BillingAddressQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BillingAddressQuery) ExistX ¶
func (baq *BillingAddressQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BillingAddressQuery) First ¶
func (baq *BillingAddressQuery) First(ctx context.Context) (*BillingAddress, error)
First returns the first BillingAddress entity from the query. Returns a *NotFoundError when no BillingAddress was found.
func (*BillingAddressQuery) FirstID ¶
func (baq *BillingAddressQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first BillingAddress ID from the query. Returns a *NotFoundError when no BillingAddress ID was found.
func (*BillingAddressQuery) FirstIDX ¶
func (baq *BillingAddressQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*BillingAddressQuery) FirstX ¶
func (baq *BillingAddressQuery) FirstX(ctx context.Context) *BillingAddress
FirstX is like First, but panics if an error occurs.
func (*BillingAddressQuery) GroupBy ¶
func (baq *BillingAddressQuery) GroupBy(field string, fields ...string) *BillingAddressGroupBy
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 { City string `json:"city,omitempty"` Count int `json:"count,omitempty"` } client.BillingAddress.Query(). GroupBy(billingaddress.FieldCity). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BillingAddressQuery) IDs ¶
func (baq *BillingAddressQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of BillingAddress IDs.
func (*BillingAddressQuery) IDsX ¶
func (baq *BillingAddressQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*BillingAddressQuery) Limit ¶
func (baq *BillingAddressQuery) Limit(limit int) *BillingAddressQuery
Limit the number of records to be returned by this query.
func (*BillingAddressQuery) Offset ¶
func (baq *BillingAddressQuery) Offset(offset int) *BillingAddressQuery
Offset to start from.
func (*BillingAddressQuery) Only ¶
func (baq *BillingAddressQuery) Only(ctx context.Context) (*BillingAddress, error)
Only returns a single BillingAddress entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one BillingAddress entity is found. Returns a *NotFoundError when no BillingAddress entities are found.
func (*BillingAddressQuery) OnlyID ¶
func (baq *BillingAddressQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only BillingAddress ID in the query. Returns a *NotSingularError when more than one BillingAddress ID is found. Returns a *NotFoundError when no entities are found.
func (*BillingAddressQuery) OnlyIDX ¶
func (baq *BillingAddressQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BillingAddressQuery) OnlyX ¶
func (baq *BillingAddressQuery) OnlyX(ctx context.Context) *BillingAddress
OnlyX is like Only, but panics if an error occurs.
func (*BillingAddressQuery) Order ¶
func (baq *BillingAddressQuery) Order(o ...billingaddress.OrderOption) *BillingAddressQuery
Order specifies how the records should be ordered.
func (*BillingAddressQuery) QueryCustomer ¶
func (baq *BillingAddressQuery) QueryCustomer() *CustomerQuery
QueryCustomer chains the current query on the "customer" edge.
func (*BillingAddressQuery) QueryNotes ¶
func (baq *BillingAddressQuery) QueryNotes() *NoteQuery
QueryNotes chains the current query on the "notes" edge.
func (*BillingAddressQuery) Select ¶
func (baq *BillingAddressQuery) Select(fields ...string) *BillingAddressSelect
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 { City string `json:"city,omitempty"` } client.BillingAddress.Query(). Select(billingaddress.FieldCity). Scan(ctx, &v)
func (*BillingAddressQuery) Unique ¶
func (baq *BillingAddressQuery) Unique(unique bool) *BillingAddressQuery
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 (*BillingAddressQuery) Where ¶
func (baq *BillingAddressQuery) Where(ps ...predicate.BillingAddress) *BillingAddressQuery
Where adds a new predicate for the BillingAddressQuery builder.
func (*BillingAddressQuery) WithCustomer ¶
func (baq *BillingAddressQuery) WithCustomer(opts ...func(*CustomerQuery)) *BillingAddressQuery
WithCustomer tells the query-builder to eager-load the nodes that are connected to the "customer" edge. The optional arguments are used to configure the query builder of the edge.
func (*BillingAddressQuery) WithNotes ¶
func (baq *BillingAddressQuery) WithNotes(opts ...func(*NoteQuery)) *BillingAddressQuery
WithNotes tells the query-builder to eager-load the nodes that are connected to the "notes" edge. The optional arguments are used to configure the query builder of the edge.
type BillingAddressSelect ¶
type BillingAddressSelect struct { *BillingAddressQuery // contains filtered or unexported fields }
BillingAddressSelect is the builder for selecting fields of BillingAddress entities.
func (*BillingAddressSelect) Aggregate ¶
func (bas *BillingAddressSelect) Aggregate(fns ...AggregateFunc) *BillingAddressSelect
Aggregate adds the given aggregation functions to the selector query.
func (*BillingAddressSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BillingAddressSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BillingAddressSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BillingAddressSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BillingAddressSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BillingAddressSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BillingAddressSelect) Scan ¶
func (bas *BillingAddressSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BillingAddressSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BillingAddressUpdate ¶
type BillingAddressUpdate struct {
// contains filtered or unexported fields
}
BillingAddressUpdate is the builder for updating BillingAddress entities.
func (*BillingAddressUpdate) AddNoteIDs ¶
func (bau *BillingAddressUpdate) AddNoteIDs(ids ...int) *BillingAddressUpdate
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*BillingAddressUpdate) AddNotes ¶
func (bau *BillingAddressUpdate) AddNotes(n ...*Note) *BillingAddressUpdate
AddNotes adds the "notes" edges to the Note entity.
func (*BillingAddressUpdate) ClearCustomer ¶
func (bau *BillingAddressUpdate) ClearCustomer() *BillingAddressUpdate
ClearCustomer clears the "customer" edge to the Customer entity.
func (*BillingAddressUpdate) ClearNotes ¶
func (bau *BillingAddressUpdate) ClearNotes() *BillingAddressUpdate
ClearNotes clears all "notes" edges to the Note entity.
func (*BillingAddressUpdate) Exec ¶
func (bau *BillingAddressUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BillingAddressUpdate) ExecX ¶
func (bau *BillingAddressUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BillingAddressUpdate) Mutation ¶
func (bau *BillingAddressUpdate) Mutation() *BillingAddressMutation
Mutation returns the BillingAddressMutation object of the builder.
func (*BillingAddressUpdate) RemoveNoteIDs ¶
func (bau *BillingAddressUpdate) RemoveNoteIDs(ids ...int) *BillingAddressUpdate
RemoveNoteIDs removes the "notes" edge to Note entities by IDs.
func (*BillingAddressUpdate) RemoveNotes ¶
func (bau *BillingAddressUpdate) RemoveNotes(n ...*Note) *BillingAddressUpdate
RemoveNotes removes "notes" edges to Note entities.
func (*BillingAddressUpdate) Save ¶
func (bau *BillingAddressUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BillingAddressUpdate) SaveX ¶
func (bau *BillingAddressUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BillingAddressUpdate) SetCity ¶
func (bau *BillingAddressUpdate) SetCity(s string) *BillingAddressUpdate
SetCity sets the "city" field.
func (*BillingAddressUpdate) SetCustomer ¶
func (bau *BillingAddressUpdate) SetCustomer(c *Customer) *BillingAddressUpdate
SetCustomer sets the "customer" edge to the Customer entity.
func (*BillingAddressUpdate) SetCustomerID ¶
func (bau *BillingAddressUpdate) SetCustomerID(id int) *BillingAddressUpdate
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*BillingAddressUpdate) SetNillableCity ¶
func (bau *BillingAddressUpdate) SetNillableCity(s *string) *BillingAddressUpdate
SetNillableCity sets the "city" field if the given value is not nil.
func (*BillingAddressUpdate) SetNillableCustomerID ¶
func (bau *BillingAddressUpdate) SetNillableCustomerID(id *int) *BillingAddressUpdate
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*BillingAddressUpdate) SetNillableStreet ¶
func (bau *BillingAddressUpdate) SetNillableStreet(s *string) *BillingAddressUpdate
SetNillableStreet sets the "street" field if the given value is not nil.
func (*BillingAddressUpdate) SetNillableZip ¶
func (bau *BillingAddressUpdate) SetNillableZip(s *string) *BillingAddressUpdate
SetNillableZip sets the "zip" field if the given value is not nil.
func (*BillingAddressUpdate) SetStreet ¶
func (bau *BillingAddressUpdate) SetStreet(s string) *BillingAddressUpdate
SetStreet sets the "street" field.
func (*BillingAddressUpdate) SetUpdatedAt ¶
func (bau *BillingAddressUpdate) SetUpdatedAt(t time.Time) *BillingAddressUpdate
SetUpdatedAt sets the "updated_at" field.
func (*BillingAddressUpdate) SetZip ¶
func (bau *BillingAddressUpdate) SetZip(s string) *BillingAddressUpdate
SetZip sets the "zip" field.
func (*BillingAddressUpdate) Where ¶
func (bau *BillingAddressUpdate) Where(ps ...predicate.BillingAddress) *BillingAddressUpdate
Where appends a list predicates to the BillingAddressUpdate builder.
type BillingAddressUpdateOne ¶
type BillingAddressUpdateOne struct {
// contains filtered or unexported fields
}
BillingAddressUpdateOne is the builder for updating a single BillingAddress entity.
func (*BillingAddressUpdateOne) AddNoteIDs ¶
func (bauo *BillingAddressUpdateOne) AddNoteIDs(ids ...int) *BillingAddressUpdateOne
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*BillingAddressUpdateOne) AddNotes ¶
func (bauo *BillingAddressUpdateOne) AddNotes(n ...*Note) *BillingAddressUpdateOne
AddNotes adds the "notes" edges to the Note entity.
func (*BillingAddressUpdateOne) ClearCustomer ¶
func (bauo *BillingAddressUpdateOne) ClearCustomer() *BillingAddressUpdateOne
ClearCustomer clears the "customer" edge to the Customer entity.
func (*BillingAddressUpdateOne) ClearNotes ¶
func (bauo *BillingAddressUpdateOne) ClearNotes() *BillingAddressUpdateOne
ClearNotes clears all "notes" edges to the Note entity.
func (*BillingAddressUpdateOne) Exec ¶
func (bauo *BillingAddressUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BillingAddressUpdateOne) ExecX ¶
func (bauo *BillingAddressUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BillingAddressUpdateOne) Mutation ¶
func (bauo *BillingAddressUpdateOne) Mutation() *BillingAddressMutation
Mutation returns the BillingAddressMutation object of the builder.
func (*BillingAddressUpdateOne) RemoveNoteIDs ¶
func (bauo *BillingAddressUpdateOne) RemoveNoteIDs(ids ...int) *BillingAddressUpdateOne
RemoveNoteIDs removes the "notes" edge to Note entities by IDs.
func (*BillingAddressUpdateOne) RemoveNotes ¶
func (bauo *BillingAddressUpdateOne) RemoveNotes(n ...*Note) *BillingAddressUpdateOne
RemoveNotes removes "notes" edges to Note entities.
func (*BillingAddressUpdateOne) Save ¶
func (bauo *BillingAddressUpdateOne) Save(ctx context.Context) (*BillingAddress, error)
Save executes the query and returns the updated BillingAddress entity.
func (*BillingAddressUpdateOne) SaveX ¶
func (bauo *BillingAddressUpdateOne) SaveX(ctx context.Context) *BillingAddress
SaveX is like Save, but panics if an error occurs.
func (*BillingAddressUpdateOne) Select ¶
func (bauo *BillingAddressUpdateOne) Select(field string, fields ...string) *BillingAddressUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BillingAddressUpdateOne) SetCity ¶
func (bauo *BillingAddressUpdateOne) SetCity(s string) *BillingAddressUpdateOne
SetCity sets the "city" field.
func (*BillingAddressUpdateOne) SetCustomer ¶
func (bauo *BillingAddressUpdateOne) SetCustomer(c *Customer) *BillingAddressUpdateOne
SetCustomer sets the "customer" edge to the Customer entity.
func (*BillingAddressUpdateOne) SetCustomerID ¶
func (bauo *BillingAddressUpdateOne) SetCustomerID(id int) *BillingAddressUpdateOne
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*BillingAddressUpdateOne) SetNillableCity ¶
func (bauo *BillingAddressUpdateOne) SetNillableCity(s *string) *BillingAddressUpdateOne
SetNillableCity sets the "city" field if the given value is not nil.
func (*BillingAddressUpdateOne) SetNillableCustomerID ¶
func (bauo *BillingAddressUpdateOne) SetNillableCustomerID(id *int) *BillingAddressUpdateOne
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*BillingAddressUpdateOne) SetNillableStreet ¶
func (bauo *BillingAddressUpdateOne) SetNillableStreet(s *string) *BillingAddressUpdateOne
SetNillableStreet sets the "street" field if the given value is not nil.
func (*BillingAddressUpdateOne) SetNillableZip ¶
func (bauo *BillingAddressUpdateOne) SetNillableZip(s *string) *BillingAddressUpdateOne
SetNillableZip sets the "zip" field if the given value is not nil.
func (*BillingAddressUpdateOne) SetStreet ¶
func (bauo *BillingAddressUpdateOne) SetStreet(s string) *BillingAddressUpdateOne
SetStreet sets the "street" field.
func (*BillingAddressUpdateOne) SetUpdatedAt ¶
func (bauo *BillingAddressUpdateOne) SetUpdatedAt(t time.Time) *BillingAddressUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*BillingAddressUpdateOne) SetZip ¶
func (bauo *BillingAddressUpdateOne) SetZip(s string) *BillingAddressUpdateOne
SetZip sets the "zip" field.
func (*BillingAddressUpdateOne) Where ¶
func (bauo *BillingAddressUpdateOne) Where(ps ...predicate.BillingAddress) *BillingAddressUpdateOne
Where appends a list predicates to the BillingAddressUpdate builder.
type BillingAddresses ¶
type BillingAddresses []*BillingAddress
BillingAddresses is a parsable slice of BillingAddress.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // BillingAddress is the client for interacting with the BillingAddress builders. BillingAddress *BillingAddressClient // Customer is the client for interacting with the Customer builders. Customer *CustomerClient // DeliveryAddress is the client for interacting with the DeliveryAddress builders. DeliveryAddress *DeliveryAddressClient // Login is the client for interacting with the Login builders. Login *LoginClient // Note is the client for interacting with the Note builders. Note *NoteClient // Order is the client for interacting with the Order builders. Order *OrderClient // Position is the client for interacting with the Position builders. Position *PositionClient // Role is the client for interacting with the Role builders. Role *RoleClient // Tel is the client for interacting with the Tel builders. Tel *TelClient // 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(). BillingAddress. 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 Customer ¶
type Customer struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,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"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CustomerQuery when eager-loading is set. Edges CustomerEdges `json:"edges"` // contains filtered or unexported fields }
Customer is the model entity for the Customer schema.
func (*Customer) QueryBillingAddresses ¶
func (c *Customer) QueryBillingAddresses() *BillingAddressQuery
QueryBillingAddresses queries the "billing_addresses" edge of the Customer entity.
func (*Customer) QueryCreatedBy ¶
QueryCreatedBy queries the "created_by" edge of the Customer entity.
func (*Customer) QueryDeliveryAddresses ¶
func (c *Customer) QueryDeliveryAddresses() *DeliveryAddressQuery
QueryDeliveryAddresses queries the "delivery_addresses" edge of the Customer entity.
func (*Customer) QueryLogin ¶
func (c *Customer) QueryLogin() *LoginQuery
QueryLogin queries the "login" edge of the Customer entity.
func (*Customer) QueryNotes ¶
QueryNotes queries the "notes" edge of the Customer entity.
func (*Customer) QueryOrders ¶
func (c *Customer) QueryOrders() *OrderQuery
QueryOrders queries the "orders" edge of the Customer entity.
func (*Customer) Unwrap ¶
Unwrap unwraps the Customer 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 (*Customer) Update ¶
func (c *Customer) Update() *CustomerUpdateOne
Update returns a builder for updating this Customer. Note that you need to call Customer.Unwrap() before calling this method if this Customer was returned from a transaction, and the transaction was committed or rolled back.
type CustomerClient ¶
type CustomerClient struct {
// contains filtered or unexported fields
}
CustomerClient is a client for the Customer schema.
func NewCustomerClient ¶
func NewCustomerClient(c config) *CustomerClient
NewCustomerClient returns a client for the Customer from the given config.
func (*CustomerClient) Create ¶
func (c *CustomerClient) Create() *CustomerCreate
Create returns a builder for creating a Customer entity.
func (*CustomerClient) CreateBulk ¶
func (c *CustomerClient) CreateBulk(builders ...*CustomerCreate) *CustomerCreateBulk
CreateBulk returns a builder for creating a bulk of Customer entities.
func (*CustomerClient) Delete ¶
func (c *CustomerClient) Delete() *CustomerDelete
Delete returns a delete builder for Customer.
func (*CustomerClient) DeleteOne ¶
func (c *CustomerClient) DeleteOne(cu *Customer) *CustomerDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CustomerClient) DeleteOneID ¶
func (c *CustomerClient) DeleteOneID(id int) *CustomerDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CustomerClient) GetX ¶
func (c *CustomerClient) GetX(ctx context.Context, id int) *Customer
GetX is like Get, but panics if an error occurs.
func (*CustomerClient) Hooks ¶
func (c *CustomerClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CustomerClient) Intercept ¶
func (c *CustomerClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `customer.Intercept(f(g(h())))`.
func (*CustomerClient) Interceptors ¶
func (c *CustomerClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CustomerClient) MapCreateBulk ¶
func (c *CustomerClient) MapCreateBulk(slice any, setFunc func(*CustomerCreate, int)) *CustomerCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CustomerClient) Query ¶
func (c *CustomerClient) Query() *CustomerQuery
Query returns a query builder for Customer.
func (*CustomerClient) QueryBillingAddresses ¶
func (c *CustomerClient) QueryBillingAddresses(cu *Customer) *BillingAddressQuery
QueryBillingAddresses queries the billing_addresses edge of a Customer.
func (*CustomerClient) QueryCreatedBy ¶
func (c *CustomerClient) QueryCreatedBy(cu *Customer) *UserQuery
QueryCreatedBy queries the created_by edge of a Customer.
func (*CustomerClient) QueryDeliveryAddresses ¶
func (c *CustomerClient) QueryDeliveryAddresses(cu *Customer) *DeliveryAddressQuery
QueryDeliveryAddresses queries the delivery_addresses edge of a Customer.
func (*CustomerClient) QueryLogin ¶
func (c *CustomerClient) QueryLogin(cu *Customer) *LoginQuery
QueryLogin queries the login edge of a Customer.
func (*CustomerClient) QueryNotes ¶
func (c *CustomerClient) QueryNotes(cu *Customer) *NoteQuery
QueryNotes queries the notes edge of a Customer.
func (*CustomerClient) QueryOrders ¶
func (c *CustomerClient) QueryOrders(cu *Customer) *OrderQuery
QueryOrders queries the orders edge of a Customer.
func (*CustomerClient) QueryTels ¶
func (c *CustomerClient) QueryTels(cu *Customer) *TelQuery
QueryTels queries the tels edge of a Customer.
func (*CustomerClient) Update ¶
func (c *CustomerClient) Update() *CustomerUpdate
Update returns an update builder for Customer.
func (*CustomerClient) UpdateOne ¶
func (c *CustomerClient) UpdateOne(cu *Customer) *CustomerUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CustomerClient) UpdateOneID ¶
func (c *CustomerClient) UpdateOneID(id int) *CustomerUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CustomerClient) Use ¶
func (c *CustomerClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `customer.Hooks(f(g(h())))`.
type CustomerCreate ¶
type CustomerCreate struct {
// contains filtered or unexported fields
}
CustomerCreate is the builder for creating a Customer entity.
func (*CustomerCreate) AddBillingAddressIDs ¶
func (cc *CustomerCreate) AddBillingAddressIDs(ids ...int) *CustomerCreate
AddBillingAddressIDs adds the "billing_addresses" edge to the BillingAddress entity by IDs.
func (*CustomerCreate) AddBillingAddresses ¶
func (cc *CustomerCreate) AddBillingAddresses(b ...*BillingAddress) *CustomerCreate
AddBillingAddresses adds the "billing_addresses" edges to the BillingAddress entity.
func (*CustomerCreate) AddDeliveryAddressIDs ¶
func (cc *CustomerCreate) AddDeliveryAddressIDs(ids ...int) *CustomerCreate
AddDeliveryAddressIDs adds the "delivery_addresses" edge to the DeliveryAddress entity by IDs.
func (*CustomerCreate) AddDeliveryAddresses ¶
func (cc *CustomerCreate) AddDeliveryAddresses(d ...*DeliveryAddress) *CustomerCreate
AddDeliveryAddresses adds the "delivery_addresses" edges to the DeliveryAddress entity.
func (*CustomerCreate) AddNoteIDs ¶
func (cc *CustomerCreate) AddNoteIDs(ids ...int) *CustomerCreate
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*CustomerCreate) AddNotes ¶
func (cc *CustomerCreate) AddNotes(n ...*Note) *CustomerCreate
AddNotes adds the "notes" edges to the Note entity.
func (*CustomerCreate) AddOrderIDs ¶
func (cc *CustomerCreate) AddOrderIDs(ids ...int) *CustomerCreate
AddOrderIDs adds the "orders" edge to the Order entity by IDs.
func (*CustomerCreate) AddOrders ¶
func (cc *CustomerCreate) AddOrders(o ...*Order) *CustomerCreate
AddOrders adds the "orders" edges to the Order entity.
func (*CustomerCreate) AddTelIDs ¶
func (cc *CustomerCreate) AddTelIDs(ids ...int) *CustomerCreate
AddTelIDs adds the "tels" edge to the Tel entity by IDs.
func (*CustomerCreate) AddTels ¶
func (cc *CustomerCreate) AddTels(t ...*Tel) *CustomerCreate
AddTels adds the "tels" edges to the Tel entity.
func (*CustomerCreate) Exec ¶
func (cc *CustomerCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CustomerCreate) ExecX ¶
func (cc *CustomerCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CustomerCreate) Mutation ¶
func (cc *CustomerCreate) Mutation() *CustomerMutation
Mutation returns the CustomerMutation object of the builder.
func (*CustomerCreate) Save ¶
func (cc *CustomerCreate) Save(ctx context.Context) (*Customer, error)
Save creates the Customer in the database.
func (*CustomerCreate) SaveX ¶
func (cc *CustomerCreate) SaveX(ctx context.Context) *Customer
SaveX calls Save and panics if Save returns an error.
func (*CustomerCreate) SetCreatedAt ¶
func (cc *CustomerCreate) SetCreatedAt(t time.Time) *CustomerCreate
SetCreatedAt sets the "created_at" field.
func (*CustomerCreate) SetCreatedBy ¶
func (cc *CustomerCreate) SetCreatedBy(u *User) *CustomerCreate
SetCreatedBy sets the "created_by" edge to the User entity.
func (*CustomerCreate) SetCreatedByID ¶
func (cc *CustomerCreate) SetCreatedByID(id int) *CustomerCreate
SetCreatedByID sets the "created_by" edge to the User entity by ID.
func (*CustomerCreate) SetEmail ¶
func (cc *CustomerCreate) SetEmail(s string) *CustomerCreate
SetEmail sets the "email" field.
func (*CustomerCreate) SetLogin ¶
func (cc *CustomerCreate) SetLogin(l *Login) *CustomerCreate
SetLogin sets the "login" edge to the Login entity.
func (*CustomerCreate) SetLoginID ¶
func (cc *CustomerCreate) SetLoginID(id int) *CustomerCreate
SetLoginID sets the "login" edge to the Login entity by ID.
func (*CustomerCreate) SetName ¶
func (cc *CustomerCreate) SetName(s string) *CustomerCreate
SetName sets the "name" field.
func (*CustomerCreate) SetNillableCreatedAt ¶
func (cc *CustomerCreate) SetNillableCreatedAt(t *time.Time) *CustomerCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CustomerCreate) SetNillableCreatedByID ¶
func (cc *CustomerCreate) SetNillableCreatedByID(id *int) *CustomerCreate
SetNillableCreatedByID sets the "created_by" edge to the User entity by ID if the given value is not nil.
func (*CustomerCreate) SetNillableLoginID ¶
func (cc *CustomerCreate) SetNillableLoginID(id *int) *CustomerCreate
SetNillableLoginID sets the "login" edge to the Login entity by ID if the given value is not nil.
func (*CustomerCreate) SetNillableUpdatedAt ¶
func (cc *CustomerCreate) SetNillableUpdatedAt(t *time.Time) *CustomerCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CustomerCreate) SetPassword ¶
func (cc *CustomerCreate) SetPassword(s string) *CustomerCreate
SetPassword sets the "password" field.
func (*CustomerCreate) SetUpdatedAt ¶
func (cc *CustomerCreate) SetUpdatedAt(t time.Time) *CustomerCreate
SetUpdatedAt sets the "updated_at" field.
type CustomerCreateBulk ¶
type CustomerCreateBulk struct {
// contains filtered or unexported fields
}
CustomerCreateBulk is the builder for creating many Customer entities in bulk.
func (*CustomerCreateBulk) Exec ¶
func (ccb *CustomerCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CustomerCreateBulk) ExecX ¶
func (ccb *CustomerCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CustomerDelete ¶
type CustomerDelete struct {
// contains filtered or unexported fields
}
CustomerDelete is the builder for deleting a Customer entity.
func (*CustomerDelete) Exec ¶
func (cd *CustomerDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CustomerDelete) ExecX ¶
func (cd *CustomerDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CustomerDelete) Where ¶
func (cd *CustomerDelete) Where(ps ...predicate.Customer) *CustomerDelete
Where appends a list predicates to the CustomerDelete builder.
type CustomerDeleteOne ¶
type CustomerDeleteOne struct {
// contains filtered or unexported fields
}
CustomerDeleteOne is the builder for deleting a single Customer entity.
func (*CustomerDeleteOne) Exec ¶
func (cdo *CustomerDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CustomerDeleteOne) ExecX ¶
func (cdo *CustomerDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CustomerDeleteOne) Where ¶
func (cdo *CustomerDeleteOne) Where(ps ...predicate.Customer) *CustomerDeleteOne
Where appends a list predicates to the CustomerDelete builder.
type CustomerEdges ¶
type CustomerEdges struct { // Orders holds the value of the orders edge. Orders []*Order `json:"orders,omitempty"` // BillingAddresses holds the value of the billing_addresses edge. BillingAddresses []*BillingAddress `json:"billing_addresses,omitempty"` // DeliveryAddresses holds the value of the delivery_addresses edge. DeliveryAddresses []*DeliveryAddress `json:"delivery_addresses,omitempty"` // Tels holds the value of the tels edge. Tels []*Tel `json:"tels,omitempty"` // CreatedBy holds the value of the created_by edge. CreatedBy *User `json:"created_by,omitempty"` // Notes holds the value of the notes edge. Notes []*Note `json:"notes,omitempty"` // Login holds the value of the login edge. Login *Login `json:"login,omitempty"` // contains filtered or unexported fields }
CustomerEdges holds the relations/edges for other nodes in the graph.
func (CustomerEdges) BillingAddressesOrErr ¶
func (e CustomerEdges) BillingAddressesOrErr() ([]*BillingAddress, error)
BillingAddressesOrErr returns the BillingAddresses value or an error if the edge was not loaded in eager-loading.
func (CustomerEdges) CreatedByOrErr ¶
func (e CustomerEdges) CreatedByOrErr() (*User, error)
CreatedByOrErr returns the CreatedBy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CustomerEdges) DeliveryAddressesOrErr ¶
func (e CustomerEdges) DeliveryAddressesOrErr() ([]*DeliveryAddress, error)
DeliveryAddressesOrErr returns the DeliveryAddresses value or an error if the edge was not loaded in eager-loading.
func (CustomerEdges) LoginOrErr ¶
func (e CustomerEdges) LoginOrErr() (*Login, error)
LoginOrErr returns the Login value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CustomerEdges) NotesOrErr ¶
func (e CustomerEdges) NotesOrErr() ([]*Note, error)
NotesOrErr returns the Notes value or an error if the edge was not loaded in eager-loading.
func (CustomerEdges) OrdersOrErr ¶
func (e CustomerEdges) OrdersOrErr() ([]*Order, error)
OrdersOrErr returns the Orders value or an error if the edge was not loaded in eager-loading.
func (CustomerEdges) TelsOrErr ¶
func (e CustomerEdges) TelsOrErr() ([]*Tel, error)
TelsOrErr returns the Tels value or an error if the edge was not loaded in eager-loading.
type CustomerGroupBy ¶
type CustomerGroupBy struct {
// contains filtered or unexported fields
}
CustomerGroupBy is the group-by builder for Customer entities.
func (*CustomerGroupBy) Aggregate ¶
func (cgb *CustomerGroupBy) Aggregate(fns ...AggregateFunc) *CustomerGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CustomerGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CustomerGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CustomerGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CustomerGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CustomerGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CustomerGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CustomerGroupBy) Scan ¶
func (cgb *CustomerGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CustomerGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CustomerMutation ¶
type CustomerMutation struct {
// contains filtered or unexported fields
}
CustomerMutation represents an operation that mutates the Customer nodes in the graph.
func (*CustomerMutation) AddBillingAddressIDs ¶
func (m *CustomerMutation) AddBillingAddressIDs(ids ...int)
AddBillingAddressIDs adds the "billing_addresses" edge to the BillingAddress entity by ids.
func (*CustomerMutation) AddDeliveryAddressIDs ¶
func (m *CustomerMutation) AddDeliveryAddressIDs(ids ...int)
AddDeliveryAddressIDs adds the "delivery_addresses" edge to the DeliveryAddress entity by ids.
func (*CustomerMutation) AddField ¶
func (m *CustomerMutation) 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 (*CustomerMutation) AddNoteIDs ¶
func (m *CustomerMutation) AddNoteIDs(ids ...int)
AddNoteIDs adds the "notes" edge to the Note entity by ids.
func (*CustomerMutation) AddOrderIDs ¶
func (m *CustomerMutation) AddOrderIDs(ids ...int)
AddOrderIDs adds the "orders" edge to the Order entity by ids.
func (*CustomerMutation) AddTelIDs ¶
func (m *CustomerMutation) AddTelIDs(ids ...int)
AddTelIDs adds the "tels" edge to the Tel entity by ids.
func (*CustomerMutation) AddedEdges ¶
func (m *CustomerMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CustomerMutation) AddedField ¶
func (m *CustomerMutation) 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 (*CustomerMutation) AddedFields ¶
func (m *CustomerMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CustomerMutation) AddedIDs ¶
func (m *CustomerMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CustomerMutation) BillingAddressesCleared ¶
func (m *CustomerMutation) BillingAddressesCleared() bool
BillingAddressesCleared reports if the "billing_addresses" edge to the BillingAddress entity was cleared.
func (*CustomerMutation) BillingAddressesIDs ¶
func (m *CustomerMutation) BillingAddressesIDs() (ids []int)
BillingAddressesIDs returns the "billing_addresses" edge IDs in the mutation.
func (*CustomerMutation) ClearBillingAddresses ¶
func (m *CustomerMutation) ClearBillingAddresses()
ClearBillingAddresses clears the "billing_addresses" edge to the BillingAddress entity.
func (*CustomerMutation) ClearCreatedBy ¶
func (m *CustomerMutation) ClearCreatedBy()
ClearCreatedBy clears the "created_by" edge to the User entity.
func (*CustomerMutation) ClearDeliveryAddresses ¶
func (m *CustomerMutation) ClearDeliveryAddresses()
ClearDeliveryAddresses clears the "delivery_addresses" edge to the DeliveryAddress entity.
func (*CustomerMutation) ClearEdge ¶
func (m *CustomerMutation) 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 (*CustomerMutation) ClearField ¶
func (m *CustomerMutation) 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 (*CustomerMutation) ClearLogin ¶
func (m *CustomerMutation) ClearLogin()
ClearLogin clears the "login" edge to the Login entity.
func (*CustomerMutation) ClearNotes ¶
func (m *CustomerMutation) ClearNotes()
ClearNotes clears the "notes" edge to the Note entity.
func (*CustomerMutation) ClearOrders ¶
func (m *CustomerMutation) ClearOrders()
ClearOrders clears the "orders" edge to the Order entity.
func (*CustomerMutation) ClearTels ¶
func (m *CustomerMutation) ClearTels()
ClearTels clears the "tels" edge to the Tel entity.
func (*CustomerMutation) ClearedEdges ¶
func (m *CustomerMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CustomerMutation) ClearedFields ¶
func (m *CustomerMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CustomerMutation) Client ¶
func (m CustomerMutation) 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 (*CustomerMutation) CreatedAt ¶
func (m *CustomerMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CustomerMutation) CreatedByCleared ¶
func (m *CustomerMutation) CreatedByCleared() bool
CreatedByCleared reports if the "created_by" edge to the User entity was cleared.
func (*CustomerMutation) CreatedByID ¶
func (m *CustomerMutation) CreatedByID() (id int, exists bool)
CreatedByID returns the "created_by" edge ID in the mutation.
func (*CustomerMutation) CreatedByIDs ¶
func (m *CustomerMutation) CreatedByIDs() (ids []int)
CreatedByIDs returns the "created_by" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatedByID instead. It exists only for internal usage by the builders.
func (*CustomerMutation) DeliveryAddressesCleared ¶
func (m *CustomerMutation) DeliveryAddressesCleared() bool
DeliveryAddressesCleared reports if the "delivery_addresses" edge to the DeliveryAddress entity was cleared.
func (*CustomerMutation) DeliveryAddressesIDs ¶
func (m *CustomerMutation) DeliveryAddressesIDs() (ids []int)
DeliveryAddressesIDs returns the "delivery_addresses" edge IDs in the mutation.
func (*CustomerMutation) EdgeCleared ¶
func (m *CustomerMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CustomerMutation) Email ¶
func (m *CustomerMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*CustomerMutation) Field ¶
func (m *CustomerMutation) 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 (*CustomerMutation) FieldCleared ¶
func (m *CustomerMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CustomerMutation) Fields ¶
func (m *CustomerMutation) 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 (*CustomerMutation) ID ¶
func (m *CustomerMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CustomerMutation) IDs ¶
func (m *CustomerMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CustomerMutation) LoginCleared ¶
func (m *CustomerMutation) LoginCleared() bool
LoginCleared reports if the "login" edge to the Login entity was cleared.
func (*CustomerMutation) LoginID ¶
func (m *CustomerMutation) LoginID() (id int, exists bool)
LoginID returns the "login" edge ID in the mutation.
func (*CustomerMutation) LoginIDs ¶
func (m *CustomerMutation) LoginIDs() (ids []int)
LoginIDs returns the "login" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use LoginID instead. It exists only for internal usage by the builders.
func (*CustomerMutation) Name ¶
func (m *CustomerMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CustomerMutation) NotesCleared ¶
func (m *CustomerMutation) NotesCleared() bool
NotesCleared reports if the "notes" edge to the Note entity was cleared.
func (*CustomerMutation) NotesIDs ¶
func (m *CustomerMutation) NotesIDs() (ids []int)
NotesIDs returns the "notes" edge IDs in the mutation.
func (*CustomerMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Customer entity. If the Customer 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 (*CustomerMutation) OldEmail ¶
func (m *CustomerMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Customer entity. If the Customer 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 (*CustomerMutation) 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 (*CustomerMutation) OldName ¶
func (m *CustomerMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Customer entity. If the Customer 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 (*CustomerMutation) OldPassword ¶
func (m *CustomerMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the Customer entity. If the Customer 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 (*CustomerMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Customer entity. If the Customer 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 (*CustomerMutation) OrdersCleared ¶
func (m *CustomerMutation) OrdersCleared() bool
OrdersCleared reports if the "orders" edge to the Order entity was cleared.
func (*CustomerMutation) OrdersIDs ¶
func (m *CustomerMutation) OrdersIDs() (ids []int)
OrdersIDs returns the "orders" edge IDs in the mutation.
func (*CustomerMutation) Password ¶
func (m *CustomerMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*CustomerMutation) RemoveBillingAddressIDs ¶
func (m *CustomerMutation) RemoveBillingAddressIDs(ids ...int)
RemoveBillingAddressIDs removes the "billing_addresses" edge to the BillingAddress entity by IDs.
func (*CustomerMutation) RemoveDeliveryAddressIDs ¶
func (m *CustomerMutation) RemoveDeliveryAddressIDs(ids ...int)
RemoveDeliveryAddressIDs removes the "delivery_addresses" edge to the DeliveryAddress entity by IDs.
func (*CustomerMutation) RemoveNoteIDs ¶
func (m *CustomerMutation) RemoveNoteIDs(ids ...int)
RemoveNoteIDs removes the "notes" edge to the Note entity by IDs.
func (*CustomerMutation) RemoveOrderIDs ¶
func (m *CustomerMutation) RemoveOrderIDs(ids ...int)
RemoveOrderIDs removes the "orders" edge to the Order entity by IDs.
func (*CustomerMutation) RemoveTelIDs ¶
func (m *CustomerMutation) RemoveTelIDs(ids ...int)
RemoveTelIDs removes the "tels" edge to the Tel entity by IDs.
func (*CustomerMutation) RemovedBillingAddressesIDs ¶
func (m *CustomerMutation) RemovedBillingAddressesIDs() (ids []int)
RemovedBillingAddresses returns the removed IDs of the "billing_addresses" edge to the BillingAddress entity.
func (*CustomerMutation) RemovedDeliveryAddressesIDs ¶
func (m *CustomerMutation) RemovedDeliveryAddressesIDs() (ids []int)
RemovedDeliveryAddresses returns the removed IDs of the "delivery_addresses" edge to the DeliveryAddress entity.
func (*CustomerMutation) RemovedEdges ¶
func (m *CustomerMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CustomerMutation) RemovedIDs ¶
func (m *CustomerMutation) 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 (*CustomerMutation) RemovedNotesIDs ¶
func (m *CustomerMutation) RemovedNotesIDs() (ids []int)
RemovedNotes returns the removed IDs of the "notes" edge to the Note entity.
func (*CustomerMutation) RemovedOrdersIDs ¶
func (m *CustomerMutation) RemovedOrdersIDs() (ids []int)
RemovedOrders returns the removed IDs of the "orders" edge to the Order entity.
func (*CustomerMutation) RemovedTelsIDs ¶
func (m *CustomerMutation) RemovedTelsIDs() (ids []int)
RemovedTels returns the removed IDs of the "tels" edge to the Tel entity.
func (*CustomerMutation) ResetBillingAddresses ¶
func (m *CustomerMutation) ResetBillingAddresses()
ResetBillingAddresses resets all changes to the "billing_addresses" edge.
func (*CustomerMutation) ResetCreatedAt ¶
func (m *CustomerMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CustomerMutation) ResetCreatedBy ¶
func (m *CustomerMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" edge.
func (*CustomerMutation) ResetDeliveryAddresses ¶
func (m *CustomerMutation) ResetDeliveryAddresses()
ResetDeliveryAddresses resets all changes to the "delivery_addresses" edge.
func (*CustomerMutation) ResetEdge ¶
func (m *CustomerMutation) 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 (*CustomerMutation) ResetEmail ¶
func (m *CustomerMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*CustomerMutation) ResetField ¶
func (m *CustomerMutation) 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 (*CustomerMutation) ResetLogin ¶
func (m *CustomerMutation) ResetLogin()
ResetLogin resets all changes to the "login" edge.
func (*CustomerMutation) ResetName ¶
func (m *CustomerMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CustomerMutation) ResetNotes ¶
func (m *CustomerMutation) ResetNotes()
ResetNotes resets all changes to the "notes" edge.
func (*CustomerMutation) ResetOrders ¶
func (m *CustomerMutation) ResetOrders()
ResetOrders resets all changes to the "orders" edge.
func (*CustomerMutation) ResetPassword ¶
func (m *CustomerMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*CustomerMutation) ResetTels ¶
func (m *CustomerMutation) ResetTels()
ResetTels resets all changes to the "tels" edge.
func (*CustomerMutation) ResetUpdatedAt ¶
func (m *CustomerMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CustomerMutation) SetCreatedAt ¶
func (m *CustomerMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CustomerMutation) SetCreatedByID ¶
func (m *CustomerMutation) SetCreatedByID(id int)
SetCreatedByID sets the "created_by" edge to the User entity by id.
func (*CustomerMutation) SetEmail ¶
func (m *CustomerMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*CustomerMutation) SetField ¶
func (m *CustomerMutation) 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 (*CustomerMutation) SetLoginID ¶
func (m *CustomerMutation) SetLoginID(id int)
SetLoginID sets the "login" edge to the Login entity by id.
func (*CustomerMutation) SetName ¶
func (m *CustomerMutation) SetName(s string)
SetName sets the "name" field.
func (*CustomerMutation) SetOp ¶
func (m *CustomerMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CustomerMutation) SetPassword ¶
func (m *CustomerMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*CustomerMutation) SetUpdatedAt ¶
func (m *CustomerMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CustomerMutation) TelsCleared ¶
func (m *CustomerMutation) TelsCleared() bool
TelsCleared reports if the "tels" edge to the Tel entity was cleared.
func (*CustomerMutation) TelsIDs ¶
func (m *CustomerMutation) TelsIDs() (ids []int)
TelsIDs returns the "tels" edge IDs in the mutation.
func (CustomerMutation) Tx ¶
func (m CustomerMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CustomerMutation) Type ¶
func (m *CustomerMutation) Type() string
Type returns the node type of this mutation (Customer).
func (*CustomerMutation) UpdatedAt ¶
func (m *CustomerMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CustomerMutation) Where ¶
func (m *CustomerMutation) Where(ps ...predicate.Customer)
Where appends a list predicates to the CustomerMutation builder.
func (*CustomerMutation) WhereP ¶
func (m *CustomerMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CustomerMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CustomerQuery ¶
type CustomerQuery struct {
// contains filtered or unexported fields
}
CustomerQuery is the builder for querying Customer entities.
func (*CustomerQuery) Aggregate ¶
func (cq *CustomerQuery) Aggregate(fns ...AggregateFunc) *CustomerSelect
Aggregate returns a CustomerSelect configured with the given aggregations.
func (*CustomerQuery) All ¶
func (cq *CustomerQuery) All(ctx context.Context) ([]*Customer, error)
All executes the query and returns a list of Customers.
func (*CustomerQuery) AllX ¶
func (cq *CustomerQuery) AllX(ctx context.Context) []*Customer
AllX is like All, but panics if an error occurs.
func (*CustomerQuery) Clone ¶
func (cq *CustomerQuery) Clone() *CustomerQuery
Clone returns a duplicate of the CustomerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CustomerQuery) Count ¶
func (cq *CustomerQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CustomerQuery) CountX ¶
func (cq *CustomerQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CustomerQuery) Exist ¶
func (cq *CustomerQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CustomerQuery) ExistX ¶
func (cq *CustomerQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CustomerQuery) First ¶
func (cq *CustomerQuery) First(ctx context.Context) (*Customer, error)
First returns the first Customer entity from the query. Returns a *NotFoundError when no Customer was found.
func (*CustomerQuery) FirstID ¶
func (cq *CustomerQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Customer ID from the query. Returns a *NotFoundError when no Customer ID was found.
func (*CustomerQuery) FirstIDX ¶
func (cq *CustomerQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*CustomerQuery) FirstX ¶
func (cq *CustomerQuery) FirstX(ctx context.Context) *Customer
FirstX is like First, but panics if an error occurs.
func (*CustomerQuery) GroupBy ¶
func (cq *CustomerQuery) GroupBy(field string, fields ...string) *CustomerGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Customer.Query(). GroupBy(customer.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CustomerQuery) IDs ¶
func (cq *CustomerQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Customer IDs.
func (*CustomerQuery) IDsX ¶
func (cq *CustomerQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*CustomerQuery) Limit ¶
func (cq *CustomerQuery) Limit(limit int) *CustomerQuery
Limit the number of records to be returned by this query.
func (*CustomerQuery) Offset ¶
func (cq *CustomerQuery) Offset(offset int) *CustomerQuery
Offset to start from.
func (*CustomerQuery) Only ¶
func (cq *CustomerQuery) Only(ctx context.Context) (*Customer, error)
Only returns a single Customer entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Customer entity is found. Returns a *NotFoundError when no Customer entities are found.
func (*CustomerQuery) OnlyID ¶
func (cq *CustomerQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Customer ID in the query. Returns a *NotSingularError when more than one Customer ID is found. Returns a *NotFoundError when no entities are found.
func (*CustomerQuery) OnlyIDX ¶
func (cq *CustomerQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CustomerQuery) OnlyX ¶
func (cq *CustomerQuery) OnlyX(ctx context.Context) *Customer
OnlyX is like Only, but panics if an error occurs.
func (*CustomerQuery) Order ¶
func (cq *CustomerQuery) Order(o ...customer.OrderOption) *CustomerQuery
Order specifies how the records should be ordered.
func (*CustomerQuery) QueryBillingAddresses ¶
func (cq *CustomerQuery) QueryBillingAddresses() *BillingAddressQuery
QueryBillingAddresses chains the current query on the "billing_addresses" edge.
func (*CustomerQuery) QueryCreatedBy ¶
func (cq *CustomerQuery) QueryCreatedBy() *UserQuery
QueryCreatedBy chains the current query on the "created_by" edge.
func (*CustomerQuery) QueryDeliveryAddresses ¶
func (cq *CustomerQuery) QueryDeliveryAddresses() *DeliveryAddressQuery
QueryDeliveryAddresses chains the current query on the "delivery_addresses" edge.
func (*CustomerQuery) QueryLogin ¶
func (cq *CustomerQuery) QueryLogin() *LoginQuery
QueryLogin chains the current query on the "login" edge.
func (*CustomerQuery) QueryNotes ¶
func (cq *CustomerQuery) QueryNotes() *NoteQuery
QueryNotes chains the current query on the "notes" edge.
func (*CustomerQuery) QueryOrders ¶
func (cq *CustomerQuery) QueryOrders() *OrderQuery
QueryOrders chains the current query on the "orders" edge.
func (*CustomerQuery) QueryTels ¶
func (cq *CustomerQuery) QueryTels() *TelQuery
QueryTels chains the current query on the "tels" edge.
func (*CustomerQuery) Select ¶
func (cq *CustomerQuery) Select(fields ...string) *CustomerSelect
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 { Name string `json:"name,omitempty"` } client.Customer.Query(). Select(customer.FieldName). Scan(ctx, &v)
func (*CustomerQuery) Unique ¶
func (cq *CustomerQuery) Unique(unique bool) *CustomerQuery
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 (*CustomerQuery) Where ¶
func (cq *CustomerQuery) Where(ps ...predicate.Customer) *CustomerQuery
Where adds a new predicate for the CustomerQuery builder.
func (*CustomerQuery) WithBillingAddresses ¶
func (cq *CustomerQuery) WithBillingAddresses(opts ...func(*BillingAddressQuery)) *CustomerQuery
WithBillingAddresses tells the query-builder to eager-load the nodes that are connected to the "billing_addresses" edge. The optional arguments are used to configure the query builder of the edge.
func (*CustomerQuery) WithCreatedBy ¶
func (cq *CustomerQuery) WithCreatedBy(opts ...func(*UserQuery)) *CustomerQuery
WithCreatedBy tells the query-builder to eager-load the nodes that are connected to the "created_by" edge. The optional arguments are used to configure the query builder of the edge.
func (*CustomerQuery) WithDeliveryAddresses ¶
func (cq *CustomerQuery) WithDeliveryAddresses(opts ...func(*DeliveryAddressQuery)) *CustomerQuery
WithDeliveryAddresses tells the query-builder to eager-load the nodes that are connected to the "delivery_addresses" edge. The optional arguments are used to configure the query builder of the edge.
func (*CustomerQuery) WithLogin ¶
func (cq *CustomerQuery) WithLogin(opts ...func(*LoginQuery)) *CustomerQuery
WithLogin tells the query-builder to eager-load the nodes that are connected to the "login" edge. The optional arguments are used to configure the query builder of the edge.
func (*CustomerQuery) WithNotes ¶
func (cq *CustomerQuery) WithNotes(opts ...func(*NoteQuery)) *CustomerQuery
WithNotes tells the query-builder to eager-load the nodes that are connected to the "notes" edge. The optional arguments are used to configure the query builder of the edge.
func (*CustomerQuery) WithOrders ¶
func (cq *CustomerQuery) WithOrders(opts ...func(*OrderQuery)) *CustomerQuery
WithOrders tells the query-builder to eager-load the nodes that are connected to the "orders" edge. The optional arguments are used to configure the query builder of the edge.
func (*CustomerQuery) WithTels ¶
func (cq *CustomerQuery) WithTels(opts ...func(*TelQuery)) *CustomerQuery
WithTels tells the query-builder to eager-load the nodes that are connected to the "tels" edge. The optional arguments are used to configure the query builder of the edge.
type CustomerSelect ¶
type CustomerSelect struct { *CustomerQuery // contains filtered or unexported fields }
CustomerSelect is the builder for selecting fields of Customer entities.
func (*CustomerSelect) Aggregate ¶
func (cs *CustomerSelect) Aggregate(fns ...AggregateFunc) *CustomerSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CustomerSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CustomerSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CustomerSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CustomerSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CustomerSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CustomerSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CustomerSelect) Scan ¶
func (cs *CustomerSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CustomerSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CustomerUpdate ¶
type CustomerUpdate struct {
// contains filtered or unexported fields
}
CustomerUpdate is the builder for updating Customer entities.
func (*CustomerUpdate) AddBillingAddressIDs ¶
func (cu *CustomerUpdate) AddBillingAddressIDs(ids ...int) *CustomerUpdate
AddBillingAddressIDs adds the "billing_addresses" edge to the BillingAddress entity by IDs.
func (*CustomerUpdate) AddBillingAddresses ¶
func (cu *CustomerUpdate) AddBillingAddresses(b ...*BillingAddress) *CustomerUpdate
AddBillingAddresses adds the "billing_addresses" edges to the BillingAddress entity.
func (*CustomerUpdate) AddDeliveryAddressIDs ¶
func (cu *CustomerUpdate) AddDeliveryAddressIDs(ids ...int) *CustomerUpdate
AddDeliveryAddressIDs adds the "delivery_addresses" edge to the DeliveryAddress entity by IDs.
func (*CustomerUpdate) AddDeliveryAddresses ¶
func (cu *CustomerUpdate) AddDeliveryAddresses(d ...*DeliveryAddress) *CustomerUpdate
AddDeliveryAddresses adds the "delivery_addresses" edges to the DeliveryAddress entity.
func (*CustomerUpdate) AddNoteIDs ¶
func (cu *CustomerUpdate) AddNoteIDs(ids ...int) *CustomerUpdate
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*CustomerUpdate) AddNotes ¶
func (cu *CustomerUpdate) AddNotes(n ...*Note) *CustomerUpdate
AddNotes adds the "notes" edges to the Note entity.
func (*CustomerUpdate) AddOrderIDs ¶
func (cu *CustomerUpdate) AddOrderIDs(ids ...int) *CustomerUpdate
AddOrderIDs adds the "orders" edge to the Order entity by IDs.
func (*CustomerUpdate) AddOrders ¶
func (cu *CustomerUpdate) AddOrders(o ...*Order) *CustomerUpdate
AddOrders adds the "orders" edges to the Order entity.
func (*CustomerUpdate) AddTelIDs ¶
func (cu *CustomerUpdate) AddTelIDs(ids ...int) *CustomerUpdate
AddTelIDs adds the "tels" edge to the Tel entity by IDs.
func (*CustomerUpdate) AddTels ¶
func (cu *CustomerUpdate) AddTels(t ...*Tel) *CustomerUpdate
AddTels adds the "tels" edges to the Tel entity.
func (*CustomerUpdate) ClearBillingAddresses ¶
func (cu *CustomerUpdate) ClearBillingAddresses() *CustomerUpdate
ClearBillingAddresses clears all "billing_addresses" edges to the BillingAddress entity.
func (*CustomerUpdate) ClearCreatedBy ¶
func (cu *CustomerUpdate) ClearCreatedBy() *CustomerUpdate
ClearCreatedBy clears the "created_by" edge to the User entity.
func (*CustomerUpdate) ClearDeliveryAddresses ¶
func (cu *CustomerUpdate) ClearDeliveryAddresses() *CustomerUpdate
ClearDeliveryAddresses clears all "delivery_addresses" edges to the DeliveryAddress entity.
func (*CustomerUpdate) ClearLogin ¶
func (cu *CustomerUpdate) ClearLogin() *CustomerUpdate
ClearLogin clears the "login" edge to the Login entity.
func (*CustomerUpdate) ClearNotes ¶
func (cu *CustomerUpdate) ClearNotes() *CustomerUpdate
ClearNotes clears all "notes" edges to the Note entity.
func (*CustomerUpdate) ClearOrders ¶
func (cu *CustomerUpdate) ClearOrders() *CustomerUpdate
ClearOrders clears all "orders" edges to the Order entity.
func (*CustomerUpdate) ClearTels ¶
func (cu *CustomerUpdate) ClearTels() *CustomerUpdate
ClearTels clears all "tels" edges to the Tel entity.
func (*CustomerUpdate) Exec ¶
func (cu *CustomerUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CustomerUpdate) ExecX ¶
func (cu *CustomerUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CustomerUpdate) Mutation ¶
func (cu *CustomerUpdate) Mutation() *CustomerMutation
Mutation returns the CustomerMutation object of the builder.
func (*CustomerUpdate) RemoveBillingAddressIDs ¶
func (cu *CustomerUpdate) RemoveBillingAddressIDs(ids ...int) *CustomerUpdate
RemoveBillingAddressIDs removes the "billing_addresses" edge to BillingAddress entities by IDs.
func (*CustomerUpdate) RemoveBillingAddresses ¶
func (cu *CustomerUpdate) RemoveBillingAddresses(b ...*BillingAddress) *CustomerUpdate
RemoveBillingAddresses removes "billing_addresses" edges to BillingAddress entities.
func (*CustomerUpdate) RemoveDeliveryAddressIDs ¶
func (cu *CustomerUpdate) RemoveDeliveryAddressIDs(ids ...int) *CustomerUpdate
RemoveDeliveryAddressIDs removes the "delivery_addresses" edge to DeliveryAddress entities by IDs.
func (*CustomerUpdate) RemoveDeliveryAddresses ¶
func (cu *CustomerUpdate) RemoveDeliveryAddresses(d ...*DeliveryAddress) *CustomerUpdate
RemoveDeliveryAddresses removes "delivery_addresses" edges to DeliveryAddress entities.
func (*CustomerUpdate) RemoveNoteIDs ¶
func (cu *CustomerUpdate) RemoveNoteIDs(ids ...int) *CustomerUpdate
RemoveNoteIDs removes the "notes" edge to Note entities by IDs.
func (*CustomerUpdate) RemoveNotes ¶
func (cu *CustomerUpdate) RemoveNotes(n ...*Note) *CustomerUpdate
RemoveNotes removes "notes" edges to Note entities.
func (*CustomerUpdate) RemoveOrderIDs ¶
func (cu *CustomerUpdate) RemoveOrderIDs(ids ...int) *CustomerUpdate
RemoveOrderIDs removes the "orders" edge to Order entities by IDs.
func (*CustomerUpdate) RemoveOrders ¶
func (cu *CustomerUpdate) RemoveOrders(o ...*Order) *CustomerUpdate
RemoveOrders removes "orders" edges to Order entities.
func (*CustomerUpdate) RemoveTelIDs ¶
func (cu *CustomerUpdate) RemoveTelIDs(ids ...int) *CustomerUpdate
RemoveTelIDs removes the "tels" edge to Tel entities by IDs.
func (*CustomerUpdate) RemoveTels ¶
func (cu *CustomerUpdate) RemoveTels(t ...*Tel) *CustomerUpdate
RemoveTels removes "tels" edges to Tel entities.
func (*CustomerUpdate) Save ¶
func (cu *CustomerUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CustomerUpdate) SaveX ¶
func (cu *CustomerUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CustomerUpdate) SetCreatedBy ¶
func (cu *CustomerUpdate) SetCreatedBy(u *User) *CustomerUpdate
SetCreatedBy sets the "created_by" edge to the User entity.
func (*CustomerUpdate) SetCreatedByID ¶
func (cu *CustomerUpdate) SetCreatedByID(id int) *CustomerUpdate
SetCreatedByID sets the "created_by" edge to the User entity by ID.
func (*CustomerUpdate) SetEmail ¶
func (cu *CustomerUpdate) SetEmail(s string) *CustomerUpdate
SetEmail sets the "email" field.
func (*CustomerUpdate) SetLogin ¶
func (cu *CustomerUpdate) SetLogin(l *Login) *CustomerUpdate
SetLogin sets the "login" edge to the Login entity.
func (*CustomerUpdate) SetLoginID ¶
func (cu *CustomerUpdate) SetLoginID(id int) *CustomerUpdate
SetLoginID sets the "login" edge to the Login entity by ID.
func (*CustomerUpdate) SetName ¶
func (cu *CustomerUpdate) SetName(s string) *CustomerUpdate
SetName sets the "name" field.
func (*CustomerUpdate) SetNillableCreatedByID ¶
func (cu *CustomerUpdate) SetNillableCreatedByID(id *int) *CustomerUpdate
SetNillableCreatedByID sets the "created_by" edge to the User entity by ID if the given value is not nil.
func (*CustomerUpdate) SetNillableEmail ¶
func (cu *CustomerUpdate) SetNillableEmail(s *string) *CustomerUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*CustomerUpdate) SetNillableLoginID ¶
func (cu *CustomerUpdate) SetNillableLoginID(id *int) *CustomerUpdate
SetNillableLoginID sets the "login" edge to the Login entity by ID if the given value is not nil.
func (*CustomerUpdate) SetNillableName ¶
func (cu *CustomerUpdate) SetNillableName(s *string) *CustomerUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*CustomerUpdate) SetNillablePassword ¶
func (cu *CustomerUpdate) SetNillablePassword(s *string) *CustomerUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*CustomerUpdate) SetPassword ¶
func (cu *CustomerUpdate) SetPassword(s string) *CustomerUpdate
SetPassword sets the "password" field.
func (*CustomerUpdate) SetUpdatedAt ¶
func (cu *CustomerUpdate) SetUpdatedAt(t time.Time) *CustomerUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CustomerUpdate) Where ¶
func (cu *CustomerUpdate) Where(ps ...predicate.Customer) *CustomerUpdate
Where appends a list predicates to the CustomerUpdate builder.
type CustomerUpdateOne ¶
type CustomerUpdateOne struct {
// contains filtered or unexported fields
}
CustomerUpdateOne is the builder for updating a single Customer entity.
func (*CustomerUpdateOne) AddBillingAddressIDs ¶
func (cuo *CustomerUpdateOne) AddBillingAddressIDs(ids ...int) *CustomerUpdateOne
AddBillingAddressIDs adds the "billing_addresses" edge to the BillingAddress entity by IDs.
func (*CustomerUpdateOne) AddBillingAddresses ¶
func (cuo *CustomerUpdateOne) AddBillingAddresses(b ...*BillingAddress) *CustomerUpdateOne
AddBillingAddresses adds the "billing_addresses" edges to the BillingAddress entity.
func (*CustomerUpdateOne) AddDeliveryAddressIDs ¶
func (cuo *CustomerUpdateOne) AddDeliveryAddressIDs(ids ...int) *CustomerUpdateOne
AddDeliveryAddressIDs adds the "delivery_addresses" edge to the DeliveryAddress entity by IDs.
func (*CustomerUpdateOne) AddDeliveryAddresses ¶
func (cuo *CustomerUpdateOne) AddDeliveryAddresses(d ...*DeliveryAddress) *CustomerUpdateOne
AddDeliveryAddresses adds the "delivery_addresses" edges to the DeliveryAddress entity.
func (*CustomerUpdateOne) AddNoteIDs ¶
func (cuo *CustomerUpdateOne) AddNoteIDs(ids ...int) *CustomerUpdateOne
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*CustomerUpdateOne) AddNotes ¶
func (cuo *CustomerUpdateOne) AddNotes(n ...*Note) *CustomerUpdateOne
AddNotes adds the "notes" edges to the Note entity.
func (*CustomerUpdateOne) AddOrderIDs ¶
func (cuo *CustomerUpdateOne) AddOrderIDs(ids ...int) *CustomerUpdateOne
AddOrderIDs adds the "orders" edge to the Order entity by IDs.
func (*CustomerUpdateOne) AddOrders ¶
func (cuo *CustomerUpdateOne) AddOrders(o ...*Order) *CustomerUpdateOne
AddOrders adds the "orders" edges to the Order entity.
func (*CustomerUpdateOne) AddTelIDs ¶
func (cuo *CustomerUpdateOne) AddTelIDs(ids ...int) *CustomerUpdateOne
AddTelIDs adds the "tels" edge to the Tel entity by IDs.
func (*CustomerUpdateOne) AddTels ¶
func (cuo *CustomerUpdateOne) AddTels(t ...*Tel) *CustomerUpdateOne
AddTels adds the "tels" edges to the Tel entity.
func (*CustomerUpdateOne) ClearBillingAddresses ¶
func (cuo *CustomerUpdateOne) ClearBillingAddresses() *CustomerUpdateOne
ClearBillingAddresses clears all "billing_addresses" edges to the BillingAddress entity.
func (*CustomerUpdateOne) ClearCreatedBy ¶
func (cuo *CustomerUpdateOne) ClearCreatedBy() *CustomerUpdateOne
ClearCreatedBy clears the "created_by" edge to the User entity.
func (*CustomerUpdateOne) ClearDeliveryAddresses ¶
func (cuo *CustomerUpdateOne) ClearDeliveryAddresses() *CustomerUpdateOne
ClearDeliveryAddresses clears all "delivery_addresses" edges to the DeliveryAddress entity.
func (*CustomerUpdateOne) ClearLogin ¶
func (cuo *CustomerUpdateOne) ClearLogin() *CustomerUpdateOne
ClearLogin clears the "login" edge to the Login entity.
func (*CustomerUpdateOne) ClearNotes ¶
func (cuo *CustomerUpdateOne) ClearNotes() *CustomerUpdateOne
ClearNotes clears all "notes" edges to the Note entity.
func (*CustomerUpdateOne) ClearOrders ¶
func (cuo *CustomerUpdateOne) ClearOrders() *CustomerUpdateOne
ClearOrders clears all "orders" edges to the Order entity.
func (*CustomerUpdateOne) ClearTels ¶
func (cuo *CustomerUpdateOne) ClearTels() *CustomerUpdateOne
ClearTels clears all "tels" edges to the Tel entity.
func (*CustomerUpdateOne) Exec ¶
func (cuo *CustomerUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CustomerUpdateOne) ExecX ¶
func (cuo *CustomerUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CustomerUpdateOne) Mutation ¶
func (cuo *CustomerUpdateOne) Mutation() *CustomerMutation
Mutation returns the CustomerMutation object of the builder.
func (*CustomerUpdateOne) RemoveBillingAddressIDs ¶
func (cuo *CustomerUpdateOne) RemoveBillingAddressIDs(ids ...int) *CustomerUpdateOne
RemoveBillingAddressIDs removes the "billing_addresses" edge to BillingAddress entities by IDs.
func (*CustomerUpdateOne) RemoveBillingAddresses ¶
func (cuo *CustomerUpdateOne) RemoveBillingAddresses(b ...*BillingAddress) *CustomerUpdateOne
RemoveBillingAddresses removes "billing_addresses" edges to BillingAddress entities.
func (*CustomerUpdateOne) RemoveDeliveryAddressIDs ¶
func (cuo *CustomerUpdateOne) RemoveDeliveryAddressIDs(ids ...int) *CustomerUpdateOne
RemoveDeliveryAddressIDs removes the "delivery_addresses" edge to DeliveryAddress entities by IDs.
func (*CustomerUpdateOne) RemoveDeliveryAddresses ¶
func (cuo *CustomerUpdateOne) RemoveDeliveryAddresses(d ...*DeliveryAddress) *CustomerUpdateOne
RemoveDeliveryAddresses removes "delivery_addresses" edges to DeliveryAddress entities.
func (*CustomerUpdateOne) RemoveNoteIDs ¶
func (cuo *CustomerUpdateOne) RemoveNoteIDs(ids ...int) *CustomerUpdateOne
RemoveNoteIDs removes the "notes" edge to Note entities by IDs.
func (*CustomerUpdateOne) RemoveNotes ¶
func (cuo *CustomerUpdateOne) RemoveNotes(n ...*Note) *CustomerUpdateOne
RemoveNotes removes "notes" edges to Note entities.
func (*CustomerUpdateOne) RemoveOrderIDs ¶
func (cuo *CustomerUpdateOne) RemoveOrderIDs(ids ...int) *CustomerUpdateOne
RemoveOrderIDs removes the "orders" edge to Order entities by IDs.
func (*CustomerUpdateOne) RemoveOrders ¶
func (cuo *CustomerUpdateOne) RemoveOrders(o ...*Order) *CustomerUpdateOne
RemoveOrders removes "orders" edges to Order entities.
func (*CustomerUpdateOne) RemoveTelIDs ¶
func (cuo *CustomerUpdateOne) RemoveTelIDs(ids ...int) *CustomerUpdateOne
RemoveTelIDs removes the "tels" edge to Tel entities by IDs.
func (*CustomerUpdateOne) RemoveTels ¶
func (cuo *CustomerUpdateOne) RemoveTels(t ...*Tel) *CustomerUpdateOne
RemoveTels removes "tels" edges to Tel entities.
func (*CustomerUpdateOne) Save ¶
func (cuo *CustomerUpdateOne) Save(ctx context.Context) (*Customer, error)
Save executes the query and returns the updated Customer entity.
func (*CustomerUpdateOne) SaveX ¶
func (cuo *CustomerUpdateOne) SaveX(ctx context.Context) *Customer
SaveX is like Save, but panics if an error occurs.
func (*CustomerUpdateOne) Select ¶
func (cuo *CustomerUpdateOne) Select(field string, fields ...string) *CustomerUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CustomerUpdateOne) SetCreatedBy ¶
func (cuo *CustomerUpdateOne) SetCreatedBy(u *User) *CustomerUpdateOne
SetCreatedBy sets the "created_by" edge to the User entity.
func (*CustomerUpdateOne) SetCreatedByID ¶
func (cuo *CustomerUpdateOne) SetCreatedByID(id int) *CustomerUpdateOne
SetCreatedByID sets the "created_by" edge to the User entity by ID.
func (*CustomerUpdateOne) SetEmail ¶
func (cuo *CustomerUpdateOne) SetEmail(s string) *CustomerUpdateOne
SetEmail sets the "email" field.
func (*CustomerUpdateOne) SetLogin ¶
func (cuo *CustomerUpdateOne) SetLogin(l *Login) *CustomerUpdateOne
SetLogin sets the "login" edge to the Login entity.
func (*CustomerUpdateOne) SetLoginID ¶
func (cuo *CustomerUpdateOne) SetLoginID(id int) *CustomerUpdateOne
SetLoginID sets the "login" edge to the Login entity by ID.
func (*CustomerUpdateOne) SetName ¶
func (cuo *CustomerUpdateOne) SetName(s string) *CustomerUpdateOne
SetName sets the "name" field.
func (*CustomerUpdateOne) SetNillableCreatedByID ¶
func (cuo *CustomerUpdateOne) SetNillableCreatedByID(id *int) *CustomerUpdateOne
SetNillableCreatedByID sets the "created_by" edge to the User entity by ID if the given value is not nil.
func (*CustomerUpdateOne) SetNillableEmail ¶
func (cuo *CustomerUpdateOne) SetNillableEmail(s *string) *CustomerUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*CustomerUpdateOne) SetNillableLoginID ¶
func (cuo *CustomerUpdateOne) SetNillableLoginID(id *int) *CustomerUpdateOne
SetNillableLoginID sets the "login" edge to the Login entity by ID if the given value is not nil.
func (*CustomerUpdateOne) SetNillableName ¶
func (cuo *CustomerUpdateOne) SetNillableName(s *string) *CustomerUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*CustomerUpdateOne) SetNillablePassword ¶
func (cuo *CustomerUpdateOne) SetNillablePassword(s *string) *CustomerUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*CustomerUpdateOne) SetPassword ¶
func (cuo *CustomerUpdateOne) SetPassword(s string) *CustomerUpdateOne
SetPassword sets the "password" field.
func (*CustomerUpdateOne) SetUpdatedAt ¶
func (cuo *CustomerUpdateOne) SetUpdatedAt(t time.Time) *CustomerUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CustomerUpdateOne) Where ¶
func (cuo *CustomerUpdateOne) Where(ps ...predicate.Customer) *CustomerUpdateOne
Where appends a list predicates to the CustomerUpdate builder.
type DeliveryAddress ¶
type DeliveryAddress struct { // ID of the ent. ID int `json:"id,omitempty"` // City holds the value of the "city" field. City string `json:"city,omitempty"` // Street holds the value of the "street" field. Street string `json:"street,omitempty"` // Zip holds the value of the "zip" field. Zip string `json:"zip,omitempty"` // Number holds the value of the "number" field. Number string `json:"number,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"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DeliveryAddressQuery when eager-loading is set. Edges DeliveryAddressEdges `json:"edges"` // contains filtered or unexported fields }
DeliveryAddress is the model entity for the DeliveryAddress schema.
func (*DeliveryAddress) QueryCustomer ¶
func (da *DeliveryAddress) QueryCustomer() *CustomerQuery
QueryCustomer queries the "customer" edge of the DeliveryAddress entity.
func (*DeliveryAddress) QueryNotes ¶
func (da *DeliveryAddress) QueryNotes() *NoteQuery
QueryNotes queries the "notes" edge of the DeliveryAddress entity.
func (*DeliveryAddress) QueryTelephone ¶
func (da *DeliveryAddress) QueryTelephone() *TelQuery
QueryTelephone queries the "telephone" edge of the DeliveryAddress entity.
func (*DeliveryAddress) String ¶
func (da *DeliveryAddress) String() string
String implements the fmt.Stringer.
func (*DeliveryAddress) Unwrap ¶
func (da *DeliveryAddress) Unwrap() *DeliveryAddress
Unwrap unwraps the DeliveryAddress 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 (*DeliveryAddress) Update ¶
func (da *DeliveryAddress) Update() *DeliveryAddressUpdateOne
Update returns a builder for updating this DeliveryAddress. Note that you need to call DeliveryAddress.Unwrap() before calling this method if this DeliveryAddress was returned from a transaction, and the transaction was committed or rolled back.
type DeliveryAddressClient ¶
type DeliveryAddressClient struct {
// contains filtered or unexported fields
}
DeliveryAddressClient is a client for the DeliveryAddress schema.
func NewDeliveryAddressClient ¶
func NewDeliveryAddressClient(c config) *DeliveryAddressClient
NewDeliveryAddressClient returns a client for the DeliveryAddress from the given config.
func (*DeliveryAddressClient) Create ¶
func (c *DeliveryAddressClient) Create() *DeliveryAddressCreate
Create returns a builder for creating a DeliveryAddress entity.
func (*DeliveryAddressClient) CreateBulk ¶
func (c *DeliveryAddressClient) CreateBulk(builders ...*DeliveryAddressCreate) *DeliveryAddressCreateBulk
CreateBulk returns a builder for creating a bulk of DeliveryAddress entities.
func (*DeliveryAddressClient) Delete ¶
func (c *DeliveryAddressClient) Delete() *DeliveryAddressDelete
Delete returns a delete builder for DeliveryAddress.
func (*DeliveryAddressClient) DeleteOne ¶
func (c *DeliveryAddressClient) DeleteOne(da *DeliveryAddress) *DeliveryAddressDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DeliveryAddressClient) DeleteOneID ¶
func (c *DeliveryAddressClient) DeleteOneID(id int) *DeliveryAddressDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DeliveryAddressClient) Get ¶
func (c *DeliveryAddressClient) Get(ctx context.Context, id int) (*DeliveryAddress, error)
Get returns a DeliveryAddress entity by its id.
func (*DeliveryAddressClient) GetX ¶
func (c *DeliveryAddressClient) GetX(ctx context.Context, id int) *DeliveryAddress
GetX is like Get, but panics if an error occurs.
func (*DeliveryAddressClient) Hooks ¶
func (c *DeliveryAddressClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DeliveryAddressClient) Intercept ¶
func (c *DeliveryAddressClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `deliveryaddress.Intercept(f(g(h())))`.
func (*DeliveryAddressClient) Interceptors ¶
func (c *DeliveryAddressClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DeliveryAddressClient) MapCreateBulk ¶
func (c *DeliveryAddressClient) MapCreateBulk(slice any, setFunc func(*DeliveryAddressCreate, int)) *DeliveryAddressCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*DeliveryAddressClient) Query ¶
func (c *DeliveryAddressClient) Query() *DeliveryAddressQuery
Query returns a query builder for DeliveryAddress.
func (*DeliveryAddressClient) QueryCustomer ¶
func (c *DeliveryAddressClient) QueryCustomer(da *DeliveryAddress) *CustomerQuery
QueryCustomer queries the customer edge of a DeliveryAddress.
func (*DeliveryAddressClient) QueryNotes ¶
func (c *DeliveryAddressClient) QueryNotes(da *DeliveryAddress) *NoteQuery
QueryNotes queries the notes edge of a DeliveryAddress.
func (*DeliveryAddressClient) QueryTelephone ¶
func (c *DeliveryAddressClient) QueryTelephone(da *DeliveryAddress) *TelQuery
QueryTelephone queries the telephone edge of a DeliveryAddress.
func (*DeliveryAddressClient) Update ¶
func (c *DeliveryAddressClient) Update() *DeliveryAddressUpdate
Update returns an update builder for DeliveryAddress.
func (*DeliveryAddressClient) UpdateOne ¶
func (c *DeliveryAddressClient) UpdateOne(da *DeliveryAddress) *DeliveryAddressUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DeliveryAddressClient) UpdateOneID ¶
func (c *DeliveryAddressClient) UpdateOneID(id int) *DeliveryAddressUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DeliveryAddressClient) Use ¶
func (c *DeliveryAddressClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deliveryaddress.Hooks(f(g(h())))`.
type DeliveryAddressCreate ¶
type DeliveryAddressCreate struct {
// contains filtered or unexported fields
}
DeliveryAddressCreate is the builder for creating a DeliveryAddress entity.
func (*DeliveryAddressCreate) AddNoteIDs ¶
func (dac *DeliveryAddressCreate) AddNoteIDs(ids ...int) *DeliveryAddressCreate
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*DeliveryAddressCreate) AddNotes ¶
func (dac *DeliveryAddressCreate) AddNotes(n ...*Note) *DeliveryAddressCreate
AddNotes adds the "notes" edges to the Note entity.
func (*DeliveryAddressCreate) Exec ¶
func (dac *DeliveryAddressCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DeliveryAddressCreate) ExecX ¶
func (dac *DeliveryAddressCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeliveryAddressCreate) Mutation ¶
func (dac *DeliveryAddressCreate) Mutation() *DeliveryAddressMutation
Mutation returns the DeliveryAddressMutation object of the builder.
func (*DeliveryAddressCreate) Save ¶
func (dac *DeliveryAddressCreate) Save(ctx context.Context) (*DeliveryAddress, error)
Save creates the DeliveryAddress in the database.
func (*DeliveryAddressCreate) SaveX ¶
func (dac *DeliveryAddressCreate) SaveX(ctx context.Context) *DeliveryAddress
SaveX calls Save and panics if Save returns an error.
func (*DeliveryAddressCreate) SetCity ¶
func (dac *DeliveryAddressCreate) SetCity(s string) *DeliveryAddressCreate
SetCity sets the "city" field.
func (*DeliveryAddressCreate) SetCreatedAt ¶
func (dac *DeliveryAddressCreate) SetCreatedAt(t time.Time) *DeliveryAddressCreate
SetCreatedAt sets the "created_at" field.
func (*DeliveryAddressCreate) SetCustomer ¶
func (dac *DeliveryAddressCreate) SetCustomer(c *Customer) *DeliveryAddressCreate
SetCustomer sets the "customer" edge to the Customer entity.
func (*DeliveryAddressCreate) SetCustomerID ¶
func (dac *DeliveryAddressCreate) SetCustomerID(id int) *DeliveryAddressCreate
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*DeliveryAddressCreate) SetNillableCreatedAt ¶
func (dac *DeliveryAddressCreate) SetNillableCreatedAt(t *time.Time) *DeliveryAddressCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DeliveryAddressCreate) SetNillableCustomerID ¶
func (dac *DeliveryAddressCreate) SetNillableCustomerID(id *int) *DeliveryAddressCreate
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*DeliveryAddressCreate) SetNillableTelephoneID ¶
func (dac *DeliveryAddressCreate) SetNillableTelephoneID(id *int) *DeliveryAddressCreate
SetNillableTelephoneID sets the "telephone" edge to the Tel entity by ID if the given value is not nil.
func (*DeliveryAddressCreate) SetNillableUpdatedAt ¶
func (dac *DeliveryAddressCreate) SetNillableUpdatedAt(t *time.Time) *DeliveryAddressCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DeliveryAddressCreate) SetNumber ¶
func (dac *DeliveryAddressCreate) SetNumber(s string) *DeliveryAddressCreate
SetNumber sets the "number" field.
func (*DeliveryAddressCreate) SetStreet ¶
func (dac *DeliveryAddressCreate) SetStreet(s string) *DeliveryAddressCreate
SetStreet sets the "street" field.
func (*DeliveryAddressCreate) SetTelephone ¶
func (dac *DeliveryAddressCreate) SetTelephone(t *Tel) *DeliveryAddressCreate
SetTelephone sets the "telephone" edge to the Tel entity.
func (*DeliveryAddressCreate) SetTelephoneID ¶
func (dac *DeliveryAddressCreate) SetTelephoneID(id int) *DeliveryAddressCreate
SetTelephoneID sets the "telephone" edge to the Tel entity by ID.
func (*DeliveryAddressCreate) SetUpdatedAt ¶
func (dac *DeliveryAddressCreate) SetUpdatedAt(t time.Time) *DeliveryAddressCreate
SetUpdatedAt sets the "updated_at" field.
func (*DeliveryAddressCreate) SetZip ¶
func (dac *DeliveryAddressCreate) SetZip(s string) *DeliveryAddressCreate
SetZip sets the "zip" field.
type DeliveryAddressCreateBulk ¶
type DeliveryAddressCreateBulk struct {
// contains filtered or unexported fields
}
DeliveryAddressCreateBulk is the builder for creating many DeliveryAddress entities in bulk.
func (*DeliveryAddressCreateBulk) Exec ¶
func (dacb *DeliveryAddressCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DeliveryAddressCreateBulk) ExecX ¶
func (dacb *DeliveryAddressCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeliveryAddressCreateBulk) Save ¶
func (dacb *DeliveryAddressCreateBulk) Save(ctx context.Context) ([]*DeliveryAddress, error)
Save creates the DeliveryAddress entities in the database.
func (*DeliveryAddressCreateBulk) SaveX ¶
func (dacb *DeliveryAddressCreateBulk) SaveX(ctx context.Context) []*DeliveryAddress
SaveX is like Save, but panics if an error occurs.
type DeliveryAddressDelete ¶
type DeliveryAddressDelete struct {
// contains filtered or unexported fields
}
DeliveryAddressDelete is the builder for deleting a DeliveryAddress entity.
func (*DeliveryAddressDelete) Exec ¶
func (dad *DeliveryAddressDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DeliveryAddressDelete) ExecX ¶
func (dad *DeliveryAddressDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DeliveryAddressDelete) Where ¶
func (dad *DeliveryAddressDelete) Where(ps ...predicate.DeliveryAddress) *DeliveryAddressDelete
Where appends a list predicates to the DeliveryAddressDelete builder.
type DeliveryAddressDeleteOne ¶
type DeliveryAddressDeleteOne struct {
// contains filtered or unexported fields
}
DeliveryAddressDeleteOne is the builder for deleting a single DeliveryAddress entity.
func (*DeliveryAddressDeleteOne) Exec ¶
func (dado *DeliveryAddressDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DeliveryAddressDeleteOne) ExecX ¶
func (dado *DeliveryAddressDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeliveryAddressDeleteOne) Where ¶
func (dado *DeliveryAddressDeleteOne) Where(ps ...predicate.DeliveryAddress) *DeliveryAddressDeleteOne
Where appends a list predicates to the DeliveryAddressDelete builder.
type DeliveryAddressEdges ¶
type DeliveryAddressEdges struct { // Telephone holds the value of the telephone edge. Telephone *Tel `json:"telephone,omitempty"` // Notes holds the value of the notes edge. Notes []*Note `json:"notes,omitempty"` // Customer holds the value of the customer edge. Customer *Customer `json:"customer,omitempty"` // contains filtered or unexported fields }
DeliveryAddressEdges holds the relations/edges for other nodes in the graph.
func (DeliveryAddressEdges) CustomerOrErr ¶
func (e DeliveryAddressEdges) CustomerOrErr() (*Customer, error)
CustomerOrErr returns the Customer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (DeliveryAddressEdges) NotesOrErr ¶
func (e DeliveryAddressEdges) NotesOrErr() ([]*Note, error)
NotesOrErr returns the Notes value or an error if the edge was not loaded in eager-loading.
func (DeliveryAddressEdges) TelephoneOrErr ¶
func (e DeliveryAddressEdges) TelephoneOrErr() (*Tel, error)
TelephoneOrErr returns the Telephone value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DeliveryAddressGroupBy ¶
type DeliveryAddressGroupBy struct {
// contains filtered or unexported fields
}
DeliveryAddressGroupBy is the group-by builder for DeliveryAddress entities.
func (*DeliveryAddressGroupBy) Aggregate ¶
func (dagb *DeliveryAddressGroupBy) Aggregate(fns ...AggregateFunc) *DeliveryAddressGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DeliveryAddressGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*DeliveryAddressGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressGroupBy) Scan ¶
func (dagb *DeliveryAddressGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DeliveryAddressGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DeliveryAddressMutation ¶
type DeliveryAddressMutation struct {
// contains filtered or unexported fields
}
DeliveryAddressMutation represents an operation that mutates the DeliveryAddress nodes in the graph.
func (*DeliveryAddressMutation) AddField ¶
func (m *DeliveryAddressMutation) 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 (*DeliveryAddressMutation) AddNoteIDs ¶
func (m *DeliveryAddressMutation) AddNoteIDs(ids ...int)
AddNoteIDs adds the "notes" edge to the Note entity by ids.
func (*DeliveryAddressMutation) AddedEdges ¶
func (m *DeliveryAddressMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DeliveryAddressMutation) AddedField ¶
func (m *DeliveryAddressMutation) 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 (*DeliveryAddressMutation) AddedFields ¶
func (m *DeliveryAddressMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DeliveryAddressMutation) AddedIDs ¶
func (m *DeliveryAddressMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DeliveryAddressMutation) City ¶
func (m *DeliveryAddressMutation) City() (r string, exists bool)
City returns the value of the "city" field in the mutation.
func (*DeliveryAddressMutation) ClearCustomer ¶
func (m *DeliveryAddressMutation) ClearCustomer()
ClearCustomer clears the "customer" edge to the Customer entity.
func (*DeliveryAddressMutation) ClearEdge ¶
func (m *DeliveryAddressMutation) 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 (*DeliveryAddressMutation) ClearField ¶
func (m *DeliveryAddressMutation) 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 (*DeliveryAddressMutation) ClearNotes ¶
func (m *DeliveryAddressMutation) ClearNotes()
ClearNotes clears the "notes" edge to the Note entity.
func (*DeliveryAddressMutation) ClearTelephone ¶
func (m *DeliveryAddressMutation) ClearTelephone()
ClearTelephone clears the "telephone" edge to the Tel entity.
func (*DeliveryAddressMutation) ClearedEdges ¶
func (m *DeliveryAddressMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DeliveryAddressMutation) ClearedFields ¶
func (m *DeliveryAddressMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DeliveryAddressMutation) Client ¶
func (m DeliveryAddressMutation) 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 (*DeliveryAddressMutation) CreatedAt ¶
func (m *DeliveryAddressMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DeliveryAddressMutation) CustomerCleared ¶
func (m *DeliveryAddressMutation) CustomerCleared() bool
CustomerCleared reports if the "customer" edge to the Customer entity was cleared.
func (*DeliveryAddressMutation) CustomerID ¶
func (m *DeliveryAddressMutation) CustomerID() (id int, exists bool)
CustomerID returns the "customer" edge ID in the mutation.
func (*DeliveryAddressMutation) CustomerIDs ¶
func (m *DeliveryAddressMutation) CustomerIDs() (ids []int)
CustomerIDs returns the "customer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CustomerID instead. It exists only for internal usage by the builders.
func (*DeliveryAddressMutation) EdgeCleared ¶
func (m *DeliveryAddressMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DeliveryAddressMutation) Field ¶
func (m *DeliveryAddressMutation) 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 (*DeliveryAddressMutation) FieldCleared ¶
func (m *DeliveryAddressMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DeliveryAddressMutation) Fields ¶
func (m *DeliveryAddressMutation) 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 (*DeliveryAddressMutation) ID ¶
func (m *DeliveryAddressMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*DeliveryAddressMutation) IDs ¶
func (m *DeliveryAddressMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DeliveryAddressMutation) NotesCleared ¶
func (m *DeliveryAddressMutation) NotesCleared() bool
NotesCleared reports if the "notes" edge to the Note entity was cleared.
func (*DeliveryAddressMutation) NotesIDs ¶
func (m *DeliveryAddressMutation) NotesIDs() (ids []int)
NotesIDs returns the "notes" edge IDs in the mutation.
func (*DeliveryAddressMutation) Number ¶
func (m *DeliveryAddressMutation) Number() (r string, exists bool)
Number returns the value of the "number" field in the mutation.
func (*DeliveryAddressMutation) OldCity ¶
func (m *DeliveryAddressMutation) OldCity(ctx context.Context) (v string, err error)
OldCity returns the old "city" field's value of the DeliveryAddress entity. If the DeliveryAddress 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 (*DeliveryAddressMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the DeliveryAddress entity. If the DeliveryAddress 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 (*DeliveryAddressMutation) 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 (*DeliveryAddressMutation) OldNumber ¶
func (m *DeliveryAddressMutation) OldNumber(ctx context.Context) (v string, err error)
OldNumber returns the old "number" field's value of the DeliveryAddress entity. If the DeliveryAddress 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 (*DeliveryAddressMutation) OldStreet ¶
func (m *DeliveryAddressMutation) OldStreet(ctx context.Context) (v string, err error)
OldStreet returns the old "street" field's value of the DeliveryAddress entity. If the DeliveryAddress 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 (*DeliveryAddressMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the DeliveryAddress entity. If the DeliveryAddress 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 (*DeliveryAddressMutation) OldZip ¶
func (m *DeliveryAddressMutation) OldZip(ctx context.Context) (v string, err error)
OldZip returns the old "zip" field's value of the DeliveryAddress entity. If the DeliveryAddress 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 (*DeliveryAddressMutation) Op ¶
func (m *DeliveryAddressMutation) Op() Op
Op returns the operation name.
func (*DeliveryAddressMutation) RemoveNoteIDs ¶
func (m *DeliveryAddressMutation) RemoveNoteIDs(ids ...int)
RemoveNoteIDs removes the "notes" edge to the Note entity by IDs.
func (*DeliveryAddressMutation) RemovedEdges ¶
func (m *DeliveryAddressMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DeliveryAddressMutation) RemovedIDs ¶
func (m *DeliveryAddressMutation) 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 (*DeliveryAddressMutation) RemovedNotesIDs ¶
func (m *DeliveryAddressMutation) RemovedNotesIDs() (ids []int)
RemovedNotes returns the removed IDs of the "notes" edge to the Note entity.
func (*DeliveryAddressMutation) ResetCity ¶
func (m *DeliveryAddressMutation) ResetCity()
ResetCity resets all changes to the "city" field.
func (*DeliveryAddressMutation) ResetCreatedAt ¶
func (m *DeliveryAddressMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DeliveryAddressMutation) ResetCustomer ¶
func (m *DeliveryAddressMutation) ResetCustomer()
ResetCustomer resets all changes to the "customer" edge.
func (*DeliveryAddressMutation) ResetEdge ¶
func (m *DeliveryAddressMutation) 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 (*DeliveryAddressMutation) ResetField ¶
func (m *DeliveryAddressMutation) 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 (*DeliveryAddressMutation) ResetNotes ¶
func (m *DeliveryAddressMutation) ResetNotes()
ResetNotes resets all changes to the "notes" edge.
func (*DeliveryAddressMutation) ResetNumber ¶
func (m *DeliveryAddressMutation) ResetNumber()
ResetNumber resets all changes to the "number" field.
func (*DeliveryAddressMutation) ResetStreet ¶
func (m *DeliveryAddressMutation) ResetStreet()
ResetStreet resets all changes to the "street" field.
func (*DeliveryAddressMutation) ResetTelephone ¶
func (m *DeliveryAddressMutation) ResetTelephone()
ResetTelephone resets all changes to the "telephone" edge.
func (*DeliveryAddressMutation) ResetUpdatedAt ¶
func (m *DeliveryAddressMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DeliveryAddressMutation) ResetZip ¶
func (m *DeliveryAddressMutation) ResetZip()
ResetZip resets all changes to the "zip" field.
func (*DeliveryAddressMutation) SetCity ¶
func (m *DeliveryAddressMutation) SetCity(s string)
SetCity sets the "city" field.
func (*DeliveryAddressMutation) SetCreatedAt ¶
func (m *DeliveryAddressMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DeliveryAddressMutation) SetCustomerID ¶
func (m *DeliveryAddressMutation) SetCustomerID(id int)
SetCustomerID sets the "customer" edge to the Customer entity by id.
func (*DeliveryAddressMutation) SetField ¶
func (m *DeliveryAddressMutation) 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 (*DeliveryAddressMutation) SetNumber ¶
func (m *DeliveryAddressMutation) SetNumber(s string)
SetNumber sets the "number" field.
func (*DeliveryAddressMutation) SetOp ¶
func (m *DeliveryAddressMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DeliveryAddressMutation) SetStreet ¶
func (m *DeliveryAddressMutation) SetStreet(s string)
SetStreet sets the "street" field.
func (*DeliveryAddressMutation) SetTelephoneID ¶
func (m *DeliveryAddressMutation) SetTelephoneID(id int)
SetTelephoneID sets the "telephone" edge to the Tel entity by id.
func (*DeliveryAddressMutation) SetUpdatedAt ¶
func (m *DeliveryAddressMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DeliveryAddressMutation) SetZip ¶
func (m *DeliveryAddressMutation) SetZip(s string)
SetZip sets the "zip" field.
func (*DeliveryAddressMutation) Street ¶
func (m *DeliveryAddressMutation) Street() (r string, exists bool)
Street returns the value of the "street" field in the mutation.
func (*DeliveryAddressMutation) TelephoneCleared ¶
func (m *DeliveryAddressMutation) TelephoneCleared() bool
TelephoneCleared reports if the "telephone" edge to the Tel entity was cleared.
func (*DeliveryAddressMutation) TelephoneID ¶
func (m *DeliveryAddressMutation) TelephoneID() (id int, exists bool)
TelephoneID returns the "telephone" edge ID in the mutation.
func (*DeliveryAddressMutation) TelephoneIDs ¶
func (m *DeliveryAddressMutation) TelephoneIDs() (ids []int)
TelephoneIDs returns the "telephone" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TelephoneID instead. It exists only for internal usage by the builders.
func (DeliveryAddressMutation) Tx ¶
func (m DeliveryAddressMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DeliveryAddressMutation) Type ¶
func (m *DeliveryAddressMutation) Type() string
Type returns the node type of this mutation (DeliveryAddress).
func (*DeliveryAddressMutation) UpdatedAt ¶
func (m *DeliveryAddressMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DeliveryAddressMutation) Where ¶
func (m *DeliveryAddressMutation) Where(ps ...predicate.DeliveryAddress)
Where appends a list predicates to the DeliveryAddressMutation builder.
func (*DeliveryAddressMutation) WhereP ¶
func (m *DeliveryAddressMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DeliveryAddressMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*DeliveryAddressMutation) Zip ¶
func (m *DeliveryAddressMutation) Zip() (r string, exists bool)
Zip returns the value of the "zip" field in the mutation.
type DeliveryAddressQuery ¶
type DeliveryAddressQuery struct {
// contains filtered or unexported fields
}
DeliveryAddressQuery is the builder for querying DeliveryAddress entities.
func (*DeliveryAddressQuery) Aggregate ¶
func (daq *DeliveryAddressQuery) Aggregate(fns ...AggregateFunc) *DeliveryAddressSelect
Aggregate returns a DeliveryAddressSelect configured with the given aggregations.
func (*DeliveryAddressQuery) All ¶
func (daq *DeliveryAddressQuery) All(ctx context.Context) ([]*DeliveryAddress, error)
All executes the query and returns a list of DeliveryAddresses.
func (*DeliveryAddressQuery) AllX ¶
func (daq *DeliveryAddressQuery) AllX(ctx context.Context) []*DeliveryAddress
AllX is like All, but panics if an error occurs.
func (*DeliveryAddressQuery) Clone ¶
func (daq *DeliveryAddressQuery) Clone() *DeliveryAddressQuery
Clone returns a duplicate of the DeliveryAddressQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DeliveryAddressQuery) Count ¶
func (daq *DeliveryAddressQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DeliveryAddressQuery) CountX ¶
func (daq *DeliveryAddressQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DeliveryAddressQuery) Exist ¶
func (daq *DeliveryAddressQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DeliveryAddressQuery) ExistX ¶
func (daq *DeliveryAddressQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DeliveryAddressQuery) First ¶
func (daq *DeliveryAddressQuery) First(ctx context.Context) (*DeliveryAddress, error)
First returns the first DeliveryAddress entity from the query. Returns a *NotFoundError when no DeliveryAddress was found.
func (*DeliveryAddressQuery) FirstID ¶
func (daq *DeliveryAddressQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DeliveryAddress ID from the query. Returns a *NotFoundError when no DeliveryAddress ID was found.
func (*DeliveryAddressQuery) FirstIDX ¶
func (daq *DeliveryAddressQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DeliveryAddressQuery) FirstX ¶
func (daq *DeliveryAddressQuery) FirstX(ctx context.Context) *DeliveryAddress
FirstX is like First, but panics if an error occurs.
func (*DeliveryAddressQuery) GroupBy ¶
func (daq *DeliveryAddressQuery) GroupBy(field string, fields ...string) *DeliveryAddressGroupBy
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 { City string `json:"city,omitempty"` Count int `json:"count,omitempty"` } client.DeliveryAddress.Query(). GroupBy(deliveryaddress.FieldCity). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DeliveryAddressQuery) IDs ¶
func (daq *DeliveryAddressQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of DeliveryAddress IDs.
func (*DeliveryAddressQuery) IDsX ¶
func (daq *DeliveryAddressQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DeliveryAddressQuery) Limit ¶
func (daq *DeliveryAddressQuery) Limit(limit int) *DeliveryAddressQuery
Limit the number of records to be returned by this query.
func (*DeliveryAddressQuery) Offset ¶
func (daq *DeliveryAddressQuery) Offset(offset int) *DeliveryAddressQuery
Offset to start from.
func (*DeliveryAddressQuery) Only ¶
func (daq *DeliveryAddressQuery) Only(ctx context.Context) (*DeliveryAddress, error)
Only returns a single DeliveryAddress entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeliveryAddress entity is found. Returns a *NotFoundError when no DeliveryAddress entities are found.
func (*DeliveryAddressQuery) OnlyID ¶
func (daq *DeliveryAddressQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DeliveryAddress ID in the query. Returns a *NotSingularError when more than one DeliveryAddress ID is found. Returns a *NotFoundError when no entities are found.
func (*DeliveryAddressQuery) OnlyIDX ¶
func (daq *DeliveryAddressQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DeliveryAddressQuery) OnlyX ¶
func (daq *DeliveryAddressQuery) OnlyX(ctx context.Context) *DeliveryAddress
OnlyX is like Only, but panics if an error occurs.
func (*DeliveryAddressQuery) Order ¶
func (daq *DeliveryAddressQuery) Order(o ...deliveryaddress.OrderOption) *DeliveryAddressQuery
Order specifies how the records should be ordered.
func (*DeliveryAddressQuery) QueryCustomer ¶
func (daq *DeliveryAddressQuery) QueryCustomer() *CustomerQuery
QueryCustomer chains the current query on the "customer" edge.
func (*DeliveryAddressQuery) QueryNotes ¶
func (daq *DeliveryAddressQuery) QueryNotes() *NoteQuery
QueryNotes chains the current query on the "notes" edge.
func (*DeliveryAddressQuery) QueryTelephone ¶
func (daq *DeliveryAddressQuery) QueryTelephone() *TelQuery
QueryTelephone chains the current query on the "telephone" edge.
func (*DeliveryAddressQuery) Select ¶
func (daq *DeliveryAddressQuery) Select(fields ...string) *DeliveryAddressSelect
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 { City string `json:"city,omitempty"` } client.DeliveryAddress.Query(). Select(deliveryaddress.FieldCity). Scan(ctx, &v)
func (*DeliveryAddressQuery) Unique ¶
func (daq *DeliveryAddressQuery) Unique(unique bool) *DeliveryAddressQuery
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 (*DeliveryAddressQuery) Where ¶
func (daq *DeliveryAddressQuery) Where(ps ...predicate.DeliveryAddress) *DeliveryAddressQuery
Where adds a new predicate for the DeliveryAddressQuery builder.
func (*DeliveryAddressQuery) WithCustomer ¶
func (daq *DeliveryAddressQuery) WithCustomer(opts ...func(*CustomerQuery)) *DeliveryAddressQuery
WithCustomer tells the query-builder to eager-load the nodes that are connected to the "customer" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeliveryAddressQuery) WithNotes ¶
func (daq *DeliveryAddressQuery) WithNotes(opts ...func(*NoteQuery)) *DeliveryAddressQuery
WithNotes tells the query-builder to eager-load the nodes that are connected to the "notes" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeliveryAddressQuery) WithTelephone ¶
func (daq *DeliveryAddressQuery) WithTelephone(opts ...func(*TelQuery)) *DeliveryAddressQuery
WithTelephone tells the query-builder to eager-load the nodes that are connected to the "telephone" edge. The optional arguments are used to configure the query builder of the edge.
type DeliveryAddressSelect ¶
type DeliveryAddressSelect struct { *DeliveryAddressQuery // contains filtered or unexported fields }
DeliveryAddressSelect is the builder for selecting fields of DeliveryAddress entities.
func (*DeliveryAddressSelect) Aggregate ¶
func (das *DeliveryAddressSelect) Aggregate(fns ...AggregateFunc) *DeliveryAddressSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DeliveryAddressSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*DeliveryAddressSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DeliveryAddressSelect) Scan ¶
func (das *DeliveryAddressSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DeliveryAddressSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DeliveryAddressUpdate ¶
type DeliveryAddressUpdate struct {
// contains filtered or unexported fields
}
DeliveryAddressUpdate is the builder for updating DeliveryAddress entities.
func (*DeliveryAddressUpdate) AddNoteIDs ¶
func (dau *DeliveryAddressUpdate) AddNoteIDs(ids ...int) *DeliveryAddressUpdate
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*DeliveryAddressUpdate) AddNotes ¶
func (dau *DeliveryAddressUpdate) AddNotes(n ...*Note) *DeliveryAddressUpdate
AddNotes adds the "notes" edges to the Note entity.
func (*DeliveryAddressUpdate) ClearCustomer ¶
func (dau *DeliveryAddressUpdate) ClearCustomer() *DeliveryAddressUpdate
ClearCustomer clears the "customer" edge to the Customer entity.
func (*DeliveryAddressUpdate) ClearNotes ¶
func (dau *DeliveryAddressUpdate) ClearNotes() *DeliveryAddressUpdate
ClearNotes clears all "notes" edges to the Note entity.
func (*DeliveryAddressUpdate) ClearTelephone ¶
func (dau *DeliveryAddressUpdate) ClearTelephone() *DeliveryAddressUpdate
ClearTelephone clears the "telephone" edge to the Tel entity.
func (*DeliveryAddressUpdate) Exec ¶
func (dau *DeliveryAddressUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DeliveryAddressUpdate) ExecX ¶
func (dau *DeliveryAddressUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeliveryAddressUpdate) Mutation ¶
func (dau *DeliveryAddressUpdate) Mutation() *DeliveryAddressMutation
Mutation returns the DeliveryAddressMutation object of the builder.
func (*DeliveryAddressUpdate) RemoveNoteIDs ¶
func (dau *DeliveryAddressUpdate) RemoveNoteIDs(ids ...int) *DeliveryAddressUpdate
RemoveNoteIDs removes the "notes" edge to Note entities by IDs.
func (*DeliveryAddressUpdate) RemoveNotes ¶
func (dau *DeliveryAddressUpdate) RemoveNotes(n ...*Note) *DeliveryAddressUpdate
RemoveNotes removes "notes" edges to Note entities.
func (*DeliveryAddressUpdate) Save ¶
func (dau *DeliveryAddressUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DeliveryAddressUpdate) SaveX ¶
func (dau *DeliveryAddressUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DeliveryAddressUpdate) SetCustomer ¶
func (dau *DeliveryAddressUpdate) SetCustomer(c *Customer) *DeliveryAddressUpdate
SetCustomer sets the "customer" edge to the Customer entity.
func (*DeliveryAddressUpdate) SetCustomerID ¶
func (dau *DeliveryAddressUpdate) SetCustomerID(id int) *DeliveryAddressUpdate
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*DeliveryAddressUpdate) SetNillableCustomerID ¶
func (dau *DeliveryAddressUpdate) SetNillableCustomerID(id *int) *DeliveryAddressUpdate
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*DeliveryAddressUpdate) SetNillableNumber ¶
func (dau *DeliveryAddressUpdate) SetNillableNumber(s *string) *DeliveryAddressUpdate
SetNillableNumber sets the "number" field if the given value is not nil.
func (*DeliveryAddressUpdate) SetNillableTelephoneID ¶
func (dau *DeliveryAddressUpdate) SetNillableTelephoneID(id *int) *DeliveryAddressUpdate
SetNillableTelephoneID sets the "telephone" edge to the Tel entity by ID if the given value is not nil.
func (*DeliveryAddressUpdate) SetNumber ¶
func (dau *DeliveryAddressUpdate) SetNumber(s string) *DeliveryAddressUpdate
SetNumber sets the "number" field.
func (*DeliveryAddressUpdate) SetTelephone ¶
func (dau *DeliveryAddressUpdate) SetTelephone(t *Tel) *DeliveryAddressUpdate
SetTelephone sets the "telephone" edge to the Tel entity.
func (*DeliveryAddressUpdate) SetTelephoneID ¶
func (dau *DeliveryAddressUpdate) SetTelephoneID(id int) *DeliveryAddressUpdate
SetTelephoneID sets the "telephone" edge to the Tel entity by ID.
func (*DeliveryAddressUpdate) SetUpdatedAt ¶
func (dau *DeliveryAddressUpdate) SetUpdatedAt(t time.Time) *DeliveryAddressUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DeliveryAddressUpdate) Where ¶
func (dau *DeliveryAddressUpdate) Where(ps ...predicate.DeliveryAddress) *DeliveryAddressUpdate
Where appends a list predicates to the DeliveryAddressUpdate builder.
type DeliveryAddressUpdateOne ¶
type DeliveryAddressUpdateOne struct {
// contains filtered or unexported fields
}
DeliveryAddressUpdateOne is the builder for updating a single DeliveryAddress entity.
func (*DeliveryAddressUpdateOne) AddNoteIDs ¶
func (dauo *DeliveryAddressUpdateOne) AddNoteIDs(ids ...int) *DeliveryAddressUpdateOne
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*DeliveryAddressUpdateOne) AddNotes ¶
func (dauo *DeliveryAddressUpdateOne) AddNotes(n ...*Note) *DeliveryAddressUpdateOne
AddNotes adds the "notes" edges to the Note entity.
func (*DeliveryAddressUpdateOne) ClearCustomer ¶
func (dauo *DeliveryAddressUpdateOne) ClearCustomer() *DeliveryAddressUpdateOne
ClearCustomer clears the "customer" edge to the Customer entity.
func (*DeliveryAddressUpdateOne) ClearNotes ¶
func (dauo *DeliveryAddressUpdateOne) ClearNotes() *DeliveryAddressUpdateOne
ClearNotes clears all "notes" edges to the Note entity.
func (*DeliveryAddressUpdateOne) ClearTelephone ¶
func (dauo *DeliveryAddressUpdateOne) ClearTelephone() *DeliveryAddressUpdateOne
ClearTelephone clears the "telephone" edge to the Tel entity.
func (*DeliveryAddressUpdateOne) Exec ¶
func (dauo *DeliveryAddressUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DeliveryAddressUpdateOne) ExecX ¶
func (dauo *DeliveryAddressUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeliveryAddressUpdateOne) Mutation ¶
func (dauo *DeliveryAddressUpdateOne) Mutation() *DeliveryAddressMutation
Mutation returns the DeliveryAddressMutation object of the builder.
func (*DeliveryAddressUpdateOne) RemoveNoteIDs ¶
func (dauo *DeliveryAddressUpdateOne) RemoveNoteIDs(ids ...int) *DeliveryAddressUpdateOne
RemoveNoteIDs removes the "notes" edge to Note entities by IDs.
func (*DeliveryAddressUpdateOne) RemoveNotes ¶
func (dauo *DeliveryAddressUpdateOne) RemoveNotes(n ...*Note) *DeliveryAddressUpdateOne
RemoveNotes removes "notes" edges to Note entities.
func (*DeliveryAddressUpdateOne) Save ¶
func (dauo *DeliveryAddressUpdateOne) Save(ctx context.Context) (*DeliveryAddress, error)
Save executes the query and returns the updated DeliveryAddress entity.
func (*DeliveryAddressUpdateOne) SaveX ¶
func (dauo *DeliveryAddressUpdateOne) SaveX(ctx context.Context) *DeliveryAddress
SaveX is like Save, but panics if an error occurs.
func (*DeliveryAddressUpdateOne) Select ¶
func (dauo *DeliveryAddressUpdateOne) Select(field string, fields ...string) *DeliveryAddressUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DeliveryAddressUpdateOne) SetCustomer ¶
func (dauo *DeliveryAddressUpdateOne) SetCustomer(c *Customer) *DeliveryAddressUpdateOne
SetCustomer sets the "customer" edge to the Customer entity.
func (*DeliveryAddressUpdateOne) SetCustomerID ¶
func (dauo *DeliveryAddressUpdateOne) SetCustomerID(id int) *DeliveryAddressUpdateOne
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*DeliveryAddressUpdateOne) SetNillableCustomerID ¶
func (dauo *DeliveryAddressUpdateOne) SetNillableCustomerID(id *int) *DeliveryAddressUpdateOne
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*DeliveryAddressUpdateOne) SetNillableNumber ¶
func (dauo *DeliveryAddressUpdateOne) SetNillableNumber(s *string) *DeliveryAddressUpdateOne
SetNillableNumber sets the "number" field if the given value is not nil.
func (*DeliveryAddressUpdateOne) SetNillableTelephoneID ¶
func (dauo *DeliveryAddressUpdateOne) SetNillableTelephoneID(id *int) *DeliveryAddressUpdateOne
SetNillableTelephoneID sets the "telephone" edge to the Tel entity by ID if the given value is not nil.
func (*DeliveryAddressUpdateOne) SetNumber ¶
func (dauo *DeliveryAddressUpdateOne) SetNumber(s string) *DeliveryAddressUpdateOne
SetNumber sets the "number" field.
func (*DeliveryAddressUpdateOne) SetTelephone ¶
func (dauo *DeliveryAddressUpdateOne) SetTelephone(t *Tel) *DeliveryAddressUpdateOne
SetTelephone sets the "telephone" edge to the Tel entity.
func (*DeliveryAddressUpdateOne) SetTelephoneID ¶
func (dauo *DeliveryAddressUpdateOne) SetTelephoneID(id int) *DeliveryAddressUpdateOne
SetTelephoneID sets the "telephone" edge to the Tel entity by ID.
func (*DeliveryAddressUpdateOne) SetUpdatedAt ¶
func (dauo *DeliveryAddressUpdateOne) SetUpdatedAt(t time.Time) *DeliveryAddressUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DeliveryAddressUpdateOne) Where ¶
func (dauo *DeliveryAddressUpdateOne) Where(ps ...predicate.DeliveryAddress) *DeliveryAddressUpdateOne
Where appends a list predicates to the DeliveryAddressUpdate builder.
type DeliveryAddresses ¶
type DeliveryAddresses []*DeliveryAddress
DeliveryAddresses is a parsable slice of DeliveryAddress.
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 Login ¶
type Login struct { // ID of the ent. ID int `json:"id,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // LastLogin holds the value of the "last_login" field. LastLogin time.Time `json:"last_login,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"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the LoginQuery when eager-loading is set. Edges LoginEdges `json:"edges"` // contains filtered or unexported fields }
Login is the model entity for the Login schema.
func (*Login) QueryCustomer ¶
func (l *Login) QueryCustomer() *CustomerQuery
QueryCustomer queries the "customer" edge of the Login entity.
func (*Login) Unwrap ¶
Unwrap unwraps the Login 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 (*Login) Update ¶
func (l *Login) Update() *LoginUpdateOne
Update returns a builder for updating this Login. Note that you need to call Login.Unwrap() before calling this method if this Login was returned from a transaction, and the transaction was committed or rolled back.
type LoginClient ¶
type LoginClient struct {
// contains filtered or unexported fields
}
LoginClient is a client for the Login schema.
func NewLoginClient ¶
func NewLoginClient(c config) *LoginClient
NewLoginClient returns a client for the Login from the given config.
func (*LoginClient) Create ¶
func (c *LoginClient) Create() *LoginCreate
Create returns a builder for creating a Login entity.
func (*LoginClient) CreateBulk ¶
func (c *LoginClient) CreateBulk(builders ...*LoginCreate) *LoginCreateBulk
CreateBulk returns a builder for creating a bulk of Login entities.
func (*LoginClient) Delete ¶
func (c *LoginClient) Delete() *LoginDelete
Delete returns a delete builder for Login.
func (*LoginClient) DeleteOne ¶
func (c *LoginClient) DeleteOne(l *Login) *LoginDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LoginClient) DeleteOneID ¶
func (c *LoginClient) DeleteOneID(id int) *LoginDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LoginClient) GetX ¶
func (c *LoginClient) GetX(ctx context.Context, id int) *Login
GetX is like Get, but panics if an error occurs.
func (*LoginClient) Intercept ¶
func (c *LoginClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `login.Intercept(f(g(h())))`.
func (*LoginClient) Interceptors ¶
func (c *LoginClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LoginClient) MapCreateBulk ¶
func (c *LoginClient) MapCreateBulk(slice any, setFunc func(*LoginCreate, int)) *LoginCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*LoginClient) Query ¶
func (c *LoginClient) Query() *LoginQuery
Query returns a query builder for Login.
func (*LoginClient) QueryCustomer ¶
func (c *LoginClient) QueryCustomer(l *Login) *CustomerQuery
QueryCustomer queries the customer edge of a Login.
func (*LoginClient) Update ¶
func (c *LoginClient) Update() *LoginUpdate
Update returns an update builder for Login.
func (*LoginClient) UpdateOne ¶
func (c *LoginClient) UpdateOne(l *Login) *LoginUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LoginClient) UpdateOneID ¶
func (c *LoginClient) UpdateOneID(id int) *LoginUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LoginClient) Use ¶
func (c *LoginClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `login.Hooks(f(g(h())))`.
type LoginCreate ¶
type LoginCreate struct {
// contains filtered or unexported fields
}
LoginCreate is the builder for creating a Login entity.
func (*LoginCreate) AddCustomer ¶
func (lc *LoginCreate) AddCustomer(c ...*Customer) *LoginCreate
AddCustomer adds the "customer" edges to the Customer entity.
func (*LoginCreate) AddCustomerIDs ¶
func (lc *LoginCreate) AddCustomerIDs(ids ...int) *LoginCreate
AddCustomerIDs adds the "customer" edge to the Customer entity by IDs.
func (*LoginCreate) Exec ¶
func (lc *LoginCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LoginCreate) ExecX ¶
func (lc *LoginCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LoginCreate) Mutation ¶
func (lc *LoginCreate) Mutation() *LoginMutation
Mutation returns the LoginMutation object of the builder.
func (*LoginCreate) Save ¶
func (lc *LoginCreate) Save(ctx context.Context) (*Login, error)
Save creates the Login in the database.
func (*LoginCreate) SaveX ¶
func (lc *LoginCreate) SaveX(ctx context.Context) *Login
SaveX calls Save and panics if Save returns an error.
func (*LoginCreate) SetCreatedAt ¶
func (lc *LoginCreate) SetCreatedAt(t time.Time) *LoginCreate
SetCreatedAt sets the "created_at" field.
func (*LoginCreate) SetLastLogin ¶
func (lc *LoginCreate) SetLastLogin(t time.Time) *LoginCreate
SetLastLogin sets the "last_login" field.
func (*LoginCreate) SetNillableCreatedAt ¶
func (lc *LoginCreate) SetNillableCreatedAt(t *time.Time) *LoginCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LoginCreate) SetNillableUpdatedAt ¶
func (lc *LoginCreate) SetNillableUpdatedAt(t *time.Time) *LoginCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*LoginCreate) SetPassword ¶
func (lc *LoginCreate) SetPassword(s string) *LoginCreate
SetPassword sets the "password" field.
func (*LoginCreate) SetUpdatedAt ¶
func (lc *LoginCreate) SetUpdatedAt(t time.Time) *LoginCreate
SetUpdatedAt sets the "updated_at" field.
func (*LoginCreate) SetUsername ¶
func (lc *LoginCreate) SetUsername(s string) *LoginCreate
SetUsername sets the "username" field.
type LoginCreateBulk ¶
type LoginCreateBulk struct {
// contains filtered or unexported fields
}
LoginCreateBulk is the builder for creating many Login entities in bulk.
func (*LoginCreateBulk) Exec ¶
func (lcb *LoginCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LoginCreateBulk) ExecX ¶
func (lcb *LoginCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LoginDelete ¶
type LoginDelete struct {
// contains filtered or unexported fields
}
LoginDelete is the builder for deleting a Login entity.
func (*LoginDelete) Exec ¶
func (ld *LoginDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LoginDelete) ExecX ¶
func (ld *LoginDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LoginDelete) Where ¶
func (ld *LoginDelete) Where(ps ...predicate.Login) *LoginDelete
Where appends a list predicates to the LoginDelete builder.
type LoginDeleteOne ¶
type LoginDeleteOne struct {
// contains filtered or unexported fields
}
LoginDeleteOne is the builder for deleting a single Login entity.
func (*LoginDeleteOne) Exec ¶
func (ldo *LoginDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LoginDeleteOne) ExecX ¶
func (ldo *LoginDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LoginDeleteOne) Where ¶
func (ldo *LoginDeleteOne) Where(ps ...predicate.Login) *LoginDeleteOne
Where appends a list predicates to the LoginDelete builder.
type LoginEdges ¶
type LoginEdges struct { // Customer holds the value of the customer edge. Customer []*Customer `json:"customer,omitempty"` // contains filtered or unexported fields }
LoginEdges holds the relations/edges for other nodes in the graph.
func (LoginEdges) CustomerOrErr ¶
func (e LoginEdges) CustomerOrErr() ([]*Customer, error)
CustomerOrErr returns the Customer value or an error if the edge was not loaded in eager-loading.
type LoginGroupBy ¶
type LoginGroupBy struct {
// contains filtered or unexported fields
}
LoginGroupBy is the group-by builder for Login entities.
func (*LoginGroupBy) Aggregate ¶
func (lgb *LoginGroupBy) Aggregate(fns ...AggregateFunc) *LoginGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LoginGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LoginGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LoginGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LoginGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LoginGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LoginGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LoginGroupBy) Scan ¶
func (lgb *LoginGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LoginGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LoginMutation ¶
type LoginMutation struct {
// contains filtered or unexported fields
}
LoginMutation represents an operation that mutates the Login nodes in the graph.
func (*LoginMutation) AddCustomerIDs ¶
func (m *LoginMutation) AddCustomerIDs(ids ...int)
AddCustomerIDs adds the "customer" edge to the Customer entity by ids.
func (*LoginMutation) AddField ¶
func (m *LoginMutation) 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 (*LoginMutation) AddedEdges ¶
func (m *LoginMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LoginMutation) AddedField ¶
func (m *LoginMutation) 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 (*LoginMutation) AddedFields ¶
func (m *LoginMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LoginMutation) AddedIDs ¶
func (m *LoginMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LoginMutation) ClearCustomer ¶
func (m *LoginMutation) ClearCustomer()
ClearCustomer clears the "customer" edge to the Customer entity.
func (*LoginMutation) ClearEdge ¶
func (m *LoginMutation) 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 (*LoginMutation) ClearField ¶
func (m *LoginMutation) 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 (*LoginMutation) ClearedEdges ¶
func (m *LoginMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LoginMutation) ClearedFields ¶
func (m *LoginMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LoginMutation) Client ¶
func (m LoginMutation) 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 (*LoginMutation) CreatedAt ¶
func (m *LoginMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*LoginMutation) CustomerCleared ¶
func (m *LoginMutation) CustomerCleared() bool
CustomerCleared reports if the "customer" edge to the Customer entity was cleared.
func (*LoginMutation) CustomerIDs ¶
func (m *LoginMutation) CustomerIDs() (ids []int)
CustomerIDs returns the "customer" edge IDs in the mutation.
func (*LoginMutation) EdgeCleared ¶
func (m *LoginMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LoginMutation) Field ¶
func (m *LoginMutation) 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 (*LoginMutation) FieldCleared ¶
func (m *LoginMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LoginMutation) Fields ¶
func (m *LoginMutation) 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 (*LoginMutation) ID ¶
func (m *LoginMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*LoginMutation) IDs ¶
func (m *LoginMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*LoginMutation) LastLogin ¶
func (m *LoginMutation) LastLogin() (r time.Time, exists bool)
LastLogin returns the value of the "last_login" field in the mutation.
func (*LoginMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Login entity. If the Login 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 (*LoginMutation) 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 (*LoginMutation) OldLastLogin ¶
OldLastLogin returns the old "last_login" field's value of the Login entity. If the Login 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 (*LoginMutation) OldPassword ¶
func (m *LoginMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the Login entity. If the Login 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 (*LoginMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Login entity. If the Login 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 (*LoginMutation) OldUsername ¶
func (m *LoginMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the Login entity. If the Login 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 (*LoginMutation) Password ¶
func (m *LoginMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*LoginMutation) RemoveCustomerIDs ¶
func (m *LoginMutation) RemoveCustomerIDs(ids ...int)
RemoveCustomerIDs removes the "customer" edge to the Customer entity by IDs.
func (*LoginMutation) RemovedCustomerIDs ¶
func (m *LoginMutation) RemovedCustomerIDs() (ids []int)
RemovedCustomer returns the removed IDs of the "customer" edge to the Customer entity.
func (*LoginMutation) RemovedEdges ¶
func (m *LoginMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LoginMutation) RemovedIDs ¶
func (m *LoginMutation) 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 (*LoginMutation) ResetCreatedAt ¶
func (m *LoginMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*LoginMutation) ResetCustomer ¶
func (m *LoginMutation) ResetCustomer()
ResetCustomer resets all changes to the "customer" edge.
func (*LoginMutation) ResetEdge ¶
func (m *LoginMutation) 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 (*LoginMutation) ResetField ¶
func (m *LoginMutation) 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 (*LoginMutation) ResetLastLogin ¶
func (m *LoginMutation) ResetLastLogin()
ResetLastLogin resets all changes to the "last_login" field.
func (*LoginMutation) ResetPassword ¶
func (m *LoginMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*LoginMutation) ResetUpdatedAt ¶
func (m *LoginMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*LoginMutation) ResetUsername ¶
func (m *LoginMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*LoginMutation) SetCreatedAt ¶
func (m *LoginMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*LoginMutation) SetField ¶
func (m *LoginMutation) 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 (*LoginMutation) SetLastLogin ¶
func (m *LoginMutation) SetLastLogin(t time.Time)
SetLastLogin sets the "last_login" field.
func (*LoginMutation) SetOp ¶
func (m *LoginMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LoginMutation) SetPassword ¶
func (m *LoginMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*LoginMutation) SetUpdatedAt ¶
func (m *LoginMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*LoginMutation) SetUsername ¶
func (m *LoginMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (LoginMutation) Tx ¶
func (m LoginMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LoginMutation) Type ¶
func (m *LoginMutation) Type() string
Type returns the node type of this mutation (Login).
func (*LoginMutation) UpdatedAt ¶
func (m *LoginMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*LoginMutation) Username ¶
func (m *LoginMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*LoginMutation) Where ¶
func (m *LoginMutation) Where(ps ...predicate.Login)
Where appends a list predicates to the LoginMutation builder.
func (*LoginMutation) WhereP ¶
func (m *LoginMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LoginMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LoginQuery ¶
type LoginQuery struct {
// contains filtered or unexported fields
}
LoginQuery is the builder for querying Login entities.
func (*LoginQuery) Aggregate ¶
func (lq *LoginQuery) Aggregate(fns ...AggregateFunc) *LoginSelect
Aggregate returns a LoginSelect configured with the given aggregations.
func (*LoginQuery) All ¶
func (lq *LoginQuery) All(ctx context.Context) ([]*Login, error)
All executes the query and returns a list of Logins.
func (*LoginQuery) AllX ¶
func (lq *LoginQuery) AllX(ctx context.Context) []*Login
AllX is like All, but panics if an error occurs.
func (*LoginQuery) Clone ¶
func (lq *LoginQuery) Clone() *LoginQuery
Clone returns a duplicate of the LoginQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LoginQuery) Count ¶
func (lq *LoginQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LoginQuery) CountX ¶
func (lq *LoginQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LoginQuery) Exist ¶
func (lq *LoginQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LoginQuery) ExistX ¶
func (lq *LoginQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LoginQuery) First ¶
func (lq *LoginQuery) First(ctx context.Context) (*Login, error)
First returns the first Login entity from the query. Returns a *NotFoundError when no Login was found.
func (*LoginQuery) FirstID ¶
func (lq *LoginQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Login ID from the query. Returns a *NotFoundError when no Login ID was found.
func (*LoginQuery) FirstIDX ¶
func (lq *LoginQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*LoginQuery) FirstX ¶
func (lq *LoginQuery) FirstX(ctx context.Context) *Login
FirstX is like First, but panics if an error occurs.
func (*LoginQuery) GroupBy ¶
func (lq *LoginQuery) GroupBy(field string, fields ...string) *LoginGroupBy
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 { Username string `json:"username,omitempty"` Count int `json:"count,omitempty"` } client.Login.Query(). GroupBy(login.FieldUsername). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LoginQuery) IDs ¶
func (lq *LoginQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Login IDs.
func (*LoginQuery) IDsX ¶
func (lq *LoginQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*LoginQuery) Limit ¶
func (lq *LoginQuery) Limit(limit int) *LoginQuery
Limit the number of records to be returned by this query.
func (*LoginQuery) Offset ¶
func (lq *LoginQuery) Offset(offset int) *LoginQuery
Offset to start from.
func (*LoginQuery) Only ¶
func (lq *LoginQuery) Only(ctx context.Context) (*Login, error)
Only returns a single Login entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Login entity is found. Returns a *NotFoundError when no Login entities are found.
func (*LoginQuery) OnlyID ¶
func (lq *LoginQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Login ID in the query. Returns a *NotSingularError when more than one Login ID is found. Returns a *NotFoundError when no entities are found.
func (*LoginQuery) OnlyIDX ¶
func (lq *LoginQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LoginQuery) OnlyX ¶
func (lq *LoginQuery) OnlyX(ctx context.Context) *Login
OnlyX is like Only, but panics if an error occurs.
func (*LoginQuery) Order ¶
func (lq *LoginQuery) Order(o ...login.OrderOption) *LoginQuery
Order specifies how the records should be ordered.
func (*LoginQuery) QueryCustomer ¶
func (lq *LoginQuery) QueryCustomer() *CustomerQuery
QueryCustomer chains the current query on the "customer" edge.
func (*LoginQuery) Select ¶
func (lq *LoginQuery) Select(fields ...string) *LoginSelect
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 { Username string `json:"username,omitempty"` } client.Login.Query(). Select(login.FieldUsername). Scan(ctx, &v)
func (*LoginQuery) Unique ¶
func (lq *LoginQuery) Unique(unique bool) *LoginQuery
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 (*LoginQuery) Where ¶
func (lq *LoginQuery) Where(ps ...predicate.Login) *LoginQuery
Where adds a new predicate for the LoginQuery builder.
func (*LoginQuery) WithCustomer ¶
func (lq *LoginQuery) WithCustomer(opts ...func(*CustomerQuery)) *LoginQuery
WithCustomer tells the query-builder to eager-load the nodes that are connected to the "customer" edge. The optional arguments are used to configure the query builder of the edge.
type LoginSelect ¶
type LoginSelect struct { *LoginQuery // contains filtered or unexported fields }
LoginSelect is the builder for selecting fields of Login entities.
func (*LoginSelect) Aggregate ¶
func (ls *LoginSelect) Aggregate(fns ...AggregateFunc) *LoginSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LoginSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LoginSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LoginSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LoginSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LoginSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LoginSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LoginSelect) Scan ¶
func (ls *LoginSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LoginSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LoginUpdate ¶
type LoginUpdate struct {
// contains filtered or unexported fields
}
LoginUpdate is the builder for updating Login entities.
func (*LoginUpdate) AddCustomer ¶
func (lu *LoginUpdate) AddCustomer(c ...*Customer) *LoginUpdate
AddCustomer adds the "customer" edges to the Customer entity.
func (*LoginUpdate) AddCustomerIDs ¶
func (lu *LoginUpdate) AddCustomerIDs(ids ...int) *LoginUpdate
AddCustomerIDs adds the "customer" edge to the Customer entity by IDs.
func (*LoginUpdate) ClearCustomer ¶
func (lu *LoginUpdate) ClearCustomer() *LoginUpdate
ClearCustomer clears all "customer" edges to the Customer entity.
func (*LoginUpdate) Exec ¶
func (lu *LoginUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LoginUpdate) ExecX ¶
func (lu *LoginUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LoginUpdate) Mutation ¶
func (lu *LoginUpdate) Mutation() *LoginMutation
Mutation returns the LoginMutation object of the builder.
func (*LoginUpdate) RemoveCustomer ¶
func (lu *LoginUpdate) RemoveCustomer(c ...*Customer) *LoginUpdate
RemoveCustomer removes "customer" edges to Customer entities.
func (*LoginUpdate) RemoveCustomerIDs ¶
func (lu *LoginUpdate) RemoveCustomerIDs(ids ...int) *LoginUpdate
RemoveCustomerIDs removes the "customer" edge to Customer entities by IDs.
func (*LoginUpdate) Save ¶
func (lu *LoginUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LoginUpdate) SaveX ¶
func (lu *LoginUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LoginUpdate) SetLastLogin ¶
func (lu *LoginUpdate) SetLastLogin(t time.Time) *LoginUpdate
SetLastLogin sets the "last_login" field.
func (*LoginUpdate) SetNillableLastLogin ¶
func (lu *LoginUpdate) SetNillableLastLogin(t *time.Time) *LoginUpdate
SetNillableLastLogin sets the "last_login" field if the given value is not nil.
func (*LoginUpdate) SetNillablePassword ¶
func (lu *LoginUpdate) SetNillablePassword(s *string) *LoginUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*LoginUpdate) SetNillableUsername ¶
func (lu *LoginUpdate) SetNillableUsername(s *string) *LoginUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*LoginUpdate) SetPassword ¶
func (lu *LoginUpdate) SetPassword(s string) *LoginUpdate
SetPassword sets the "password" field.
func (*LoginUpdate) SetUpdatedAt ¶
func (lu *LoginUpdate) SetUpdatedAt(t time.Time) *LoginUpdate
SetUpdatedAt sets the "updated_at" field.
func (*LoginUpdate) SetUsername ¶
func (lu *LoginUpdate) SetUsername(s string) *LoginUpdate
SetUsername sets the "username" field.
func (*LoginUpdate) Where ¶
func (lu *LoginUpdate) Where(ps ...predicate.Login) *LoginUpdate
Where appends a list predicates to the LoginUpdate builder.
type LoginUpdateOne ¶
type LoginUpdateOne struct {
// contains filtered or unexported fields
}
LoginUpdateOne is the builder for updating a single Login entity.
func (*LoginUpdateOne) AddCustomer ¶
func (luo *LoginUpdateOne) AddCustomer(c ...*Customer) *LoginUpdateOne
AddCustomer adds the "customer" edges to the Customer entity.
func (*LoginUpdateOne) AddCustomerIDs ¶
func (luo *LoginUpdateOne) AddCustomerIDs(ids ...int) *LoginUpdateOne
AddCustomerIDs adds the "customer" edge to the Customer entity by IDs.
func (*LoginUpdateOne) ClearCustomer ¶
func (luo *LoginUpdateOne) ClearCustomer() *LoginUpdateOne
ClearCustomer clears all "customer" edges to the Customer entity.
func (*LoginUpdateOne) Exec ¶
func (luo *LoginUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LoginUpdateOne) ExecX ¶
func (luo *LoginUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LoginUpdateOne) Mutation ¶
func (luo *LoginUpdateOne) Mutation() *LoginMutation
Mutation returns the LoginMutation object of the builder.
func (*LoginUpdateOne) RemoveCustomer ¶
func (luo *LoginUpdateOne) RemoveCustomer(c ...*Customer) *LoginUpdateOne
RemoveCustomer removes "customer" edges to Customer entities.
func (*LoginUpdateOne) RemoveCustomerIDs ¶
func (luo *LoginUpdateOne) RemoveCustomerIDs(ids ...int) *LoginUpdateOne
RemoveCustomerIDs removes the "customer" edge to Customer entities by IDs.
func (*LoginUpdateOne) Save ¶
func (luo *LoginUpdateOne) Save(ctx context.Context) (*Login, error)
Save executes the query and returns the updated Login entity.
func (*LoginUpdateOne) SaveX ¶
func (luo *LoginUpdateOne) SaveX(ctx context.Context) *Login
SaveX is like Save, but panics if an error occurs.
func (*LoginUpdateOne) Select ¶
func (luo *LoginUpdateOne) Select(field string, fields ...string) *LoginUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LoginUpdateOne) SetLastLogin ¶
func (luo *LoginUpdateOne) SetLastLogin(t time.Time) *LoginUpdateOne
SetLastLogin sets the "last_login" field.
func (*LoginUpdateOne) SetNillableLastLogin ¶
func (luo *LoginUpdateOne) SetNillableLastLogin(t *time.Time) *LoginUpdateOne
SetNillableLastLogin sets the "last_login" field if the given value is not nil.
func (*LoginUpdateOne) SetNillablePassword ¶
func (luo *LoginUpdateOne) SetNillablePassword(s *string) *LoginUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*LoginUpdateOne) SetNillableUsername ¶
func (luo *LoginUpdateOne) SetNillableUsername(s *string) *LoginUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*LoginUpdateOne) SetPassword ¶
func (luo *LoginUpdateOne) SetPassword(s string) *LoginUpdateOne
SetPassword sets the "password" field.
func (*LoginUpdateOne) SetUpdatedAt ¶
func (luo *LoginUpdateOne) SetUpdatedAt(t time.Time) *LoginUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*LoginUpdateOne) SetUsername ¶
func (luo *LoginUpdateOne) SetUsername(s string) *LoginUpdateOne
SetUsername sets the "username" field.
func (*LoginUpdateOne) Where ¶
func (luo *LoginUpdateOne) Where(ps ...predicate.Login) *LoginUpdateOne
Where appends a list predicates to the LoginUpdate builder.
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 Note ¶
type Note struct { // ID of the ent. ID int `json:"id,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,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"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NoteQuery when eager-loading is set. Edges NoteEdges `json:"edges"` // contains filtered or unexported fields }
Note is the model entity for the Note schema.
func (*Note) QueryBillingAddress ¶
func (n *Note) QueryBillingAddress() *BillingAddressQuery
QueryBillingAddress queries the "billing_address" edge of the Note entity.
func (*Note) QueryCustomer ¶
func (n *Note) QueryCustomer() *CustomerQuery
QueryCustomer queries the "customer" edge of the Note entity.
func (*Note) QueryDeliveryAddress ¶
func (n *Note) QueryDeliveryAddress() *DeliveryAddressQuery
QueryDeliveryAddress queries the "delivery_address" edge of the Note entity.
func (*Note) QueryOrders ¶
func (n *Note) QueryOrders() *OrderQuery
QueryOrders queries the "orders" edge of the Note entity.
func (*Note) Unwrap ¶
Unwrap unwraps the Note 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 (*Note) Update ¶
func (n *Note) Update() *NoteUpdateOne
Update returns a builder for updating this Note. Note that you need to call Note.Unwrap() before calling this method if this Note was returned from a transaction, and the transaction was committed or rolled back.
type NoteClient ¶
type NoteClient struct {
// contains filtered or unexported fields
}
NoteClient is a client for the Note schema.
func NewNoteClient ¶
func NewNoteClient(c config) *NoteClient
NewNoteClient returns a client for the Note from the given config.
func (*NoteClient) Create ¶
func (c *NoteClient) Create() *NoteCreate
Create returns a builder for creating a Note entity.
func (*NoteClient) CreateBulk ¶
func (c *NoteClient) CreateBulk(builders ...*NoteCreate) *NoteCreateBulk
CreateBulk returns a builder for creating a bulk of Note entities.
func (*NoteClient) Delete ¶
func (c *NoteClient) Delete() *NoteDelete
Delete returns a delete builder for Note.
func (*NoteClient) DeleteOne ¶
func (c *NoteClient) DeleteOne(n *Note) *NoteDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NoteClient) DeleteOneID ¶
func (c *NoteClient) DeleteOneID(id int) *NoteDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NoteClient) GetX ¶
func (c *NoteClient) GetX(ctx context.Context, id int) *Note
GetX is like Get, but panics if an error occurs.
func (*NoteClient) Intercept ¶
func (c *NoteClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `note.Intercept(f(g(h())))`.
func (*NoteClient) Interceptors ¶
func (c *NoteClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NoteClient) MapCreateBulk ¶
func (c *NoteClient) MapCreateBulk(slice any, setFunc func(*NoteCreate, int)) *NoteCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*NoteClient) Query ¶
func (c *NoteClient) Query() *NoteQuery
Query returns a query builder for Note.
func (*NoteClient) QueryBillingAddress ¶
func (c *NoteClient) QueryBillingAddress(n *Note) *BillingAddressQuery
QueryBillingAddress queries the billing_address edge of a Note.
func (*NoteClient) QueryCustomer ¶
func (c *NoteClient) QueryCustomer(n *Note) *CustomerQuery
QueryCustomer queries the customer edge of a Note.
func (*NoteClient) QueryDeliveryAddress ¶
func (c *NoteClient) QueryDeliveryAddress(n *Note) *DeliveryAddressQuery
QueryDeliveryAddress queries the delivery_address edge of a Note.
func (*NoteClient) QueryOrders ¶
func (c *NoteClient) QueryOrders(n *Note) *OrderQuery
QueryOrders queries the orders edge of a Note.
func (*NoteClient) QueryTel ¶
func (c *NoteClient) QueryTel(n *Note) *TelQuery
QueryTel queries the tel edge of a Note.
func (*NoteClient) Update ¶
func (c *NoteClient) Update() *NoteUpdate
Update returns an update builder for Note.
func (*NoteClient) UpdateOne ¶
func (c *NoteClient) UpdateOne(n *Note) *NoteUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NoteClient) UpdateOneID ¶
func (c *NoteClient) UpdateOneID(id int) *NoteUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NoteClient) Use ¶
func (c *NoteClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `note.Hooks(f(g(h())))`.
type NoteCreate ¶
type NoteCreate struct {
// contains filtered or unexported fields
}
NoteCreate is the builder for creating a Note entity.
func (*NoteCreate) Exec ¶
func (nc *NoteCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NoteCreate) ExecX ¶
func (nc *NoteCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoteCreate) Mutation ¶
func (nc *NoteCreate) Mutation() *NoteMutation
Mutation returns the NoteMutation object of the builder.
func (*NoteCreate) Save ¶
func (nc *NoteCreate) Save(ctx context.Context) (*Note, error)
Save creates the Note in the database.
func (*NoteCreate) SaveX ¶
func (nc *NoteCreate) SaveX(ctx context.Context) *Note
SaveX calls Save and panics if Save returns an error.
func (*NoteCreate) SetBillingAddress ¶
func (nc *NoteCreate) SetBillingAddress(b *BillingAddress) *NoteCreate
SetBillingAddress sets the "billing_address" edge to the BillingAddress entity.
func (*NoteCreate) SetBillingAddressID ¶
func (nc *NoteCreate) SetBillingAddressID(id int) *NoteCreate
SetBillingAddressID sets the "billing_address" edge to the BillingAddress entity by ID.
func (*NoteCreate) SetContent ¶
func (nc *NoteCreate) SetContent(s string) *NoteCreate
SetContent sets the "content" field.
func (*NoteCreate) SetCreatedAt ¶
func (nc *NoteCreate) SetCreatedAt(t time.Time) *NoteCreate
SetCreatedAt sets the "created_at" field.
func (*NoteCreate) SetCustomer ¶
func (nc *NoteCreate) SetCustomer(c *Customer) *NoteCreate
SetCustomer sets the "customer" edge to the Customer entity.
func (*NoteCreate) SetCustomerID ¶
func (nc *NoteCreate) SetCustomerID(id int) *NoteCreate
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*NoteCreate) SetDeliveryAddress ¶
func (nc *NoteCreate) SetDeliveryAddress(d *DeliveryAddress) *NoteCreate
SetDeliveryAddress sets the "delivery_address" edge to the DeliveryAddress entity.
func (*NoteCreate) SetDeliveryAddressID ¶
func (nc *NoteCreate) SetDeliveryAddressID(id int) *NoteCreate
SetDeliveryAddressID sets the "delivery_address" edge to the DeliveryAddress entity by ID.
func (*NoteCreate) SetNillableBillingAddressID ¶
func (nc *NoteCreate) SetNillableBillingAddressID(id *int) *NoteCreate
SetNillableBillingAddressID sets the "billing_address" edge to the BillingAddress entity by ID if the given value is not nil.
func (*NoteCreate) SetNillableCreatedAt ¶
func (nc *NoteCreate) SetNillableCreatedAt(t *time.Time) *NoteCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*NoteCreate) SetNillableCustomerID ¶
func (nc *NoteCreate) SetNillableCustomerID(id *int) *NoteCreate
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*NoteCreate) SetNillableDeliveryAddressID ¶
func (nc *NoteCreate) SetNillableDeliveryAddressID(id *int) *NoteCreate
SetNillableDeliveryAddressID sets the "delivery_address" edge to the DeliveryAddress entity by ID if the given value is not nil.
func (*NoteCreate) SetNillableOrdersID ¶
func (nc *NoteCreate) SetNillableOrdersID(id *int) *NoteCreate
SetNillableOrdersID sets the "orders" edge to the Order entity by ID if the given value is not nil.
func (*NoteCreate) SetNillableTelID ¶
func (nc *NoteCreate) SetNillableTelID(id *int) *NoteCreate
SetNillableTelID sets the "tel" edge to the Tel entity by ID if the given value is not nil.
func (*NoteCreate) SetNillableUpdatedAt ¶
func (nc *NoteCreate) SetNillableUpdatedAt(t *time.Time) *NoteCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*NoteCreate) SetOrders ¶
func (nc *NoteCreate) SetOrders(o *Order) *NoteCreate
SetOrders sets the "orders" edge to the Order entity.
func (*NoteCreate) SetOrdersID ¶
func (nc *NoteCreate) SetOrdersID(id int) *NoteCreate
SetOrdersID sets the "orders" edge to the Order entity by ID.
func (*NoteCreate) SetTel ¶
func (nc *NoteCreate) SetTel(t *Tel) *NoteCreate
SetTel sets the "tel" edge to the Tel entity.
func (*NoteCreate) SetTelID ¶
func (nc *NoteCreate) SetTelID(id int) *NoteCreate
SetTelID sets the "tel" edge to the Tel entity by ID.
func (*NoteCreate) SetUpdatedAt ¶
func (nc *NoteCreate) SetUpdatedAt(t time.Time) *NoteCreate
SetUpdatedAt sets the "updated_at" field.
type NoteCreateBulk ¶
type NoteCreateBulk struct {
// contains filtered or unexported fields
}
NoteCreateBulk is the builder for creating many Note entities in bulk.
func (*NoteCreateBulk) Exec ¶
func (ncb *NoteCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NoteCreateBulk) ExecX ¶
func (ncb *NoteCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NoteDelete ¶
type NoteDelete struct {
// contains filtered or unexported fields
}
NoteDelete is the builder for deleting a Note entity.
func (*NoteDelete) Exec ¶
func (nd *NoteDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NoteDelete) ExecX ¶
func (nd *NoteDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NoteDelete) Where ¶
func (nd *NoteDelete) Where(ps ...predicate.Note) *NoteDelete
Where appends a list predicates to the NoteDelete builder.
type NoteDeleteOne ¶
type NoteDeleteOne struct {
// contains filtered or unexported fields
}
NoteDeleteOne is the builder for deleting a single Note entity.
func (*NoteDeleteOne) Exec ¶
func (ndo *NoteDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NoteDeleteOne) ExecX ¶
func (ndo *NoteDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoteDeleteOne) Where ¶
func (ndo *NoteDeleteOne) Where(ps ...predicate.Note) *NoteDeleteOne
Where appends a list predicates to the NoteDelete builder.
type NoteEdges ¶
type NoteEdges struct { // Customer holds the value of the customer edge. Customer *Customer `json:"customer,omitempty"` // Orders holds the value of the orders edge. Orders *Order `json:"orders,omitempty"` // BillingAddress holds the value of the billing_address edge. BillingAddress *BillingAddress `json:"billing_address,omitempty"` // DeliveryAddress holds the value of the delivery_address edge. DeliveryAddress *DeliveryAddress `json:"delivery_address,omitempty"` // Tel holds the value of the tel edge. Tel *Tel `json:"tel,omitempty"` // contains filtered or unexported fields }
NoteEdges holds the relations/edges for other nodes in the graph.
func (NoteEdges) BillingAddressOrErr ¶
func (e NoteEdges) BillingAddressOrErr() (*BillingAddress, error)
BillingAddressOrErr returns the BillingAddress value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NoteEdges) CustomerOrErr ¶
CustomerOrErr returns the Customer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NoteEdges) DeliveryAddressOrErr ¶
func (e NoteEdges) DeliveryAddressOrErr() (*DeliveryAddress, error)
DeliveryAddressOrErr returns the DeliveryAddress value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NoteEdges) OrdersOrErr ¶
OrdersOrErr returns the Orders value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NoteGroupBy ¶
type NoteGroupBy struct {
// contains filtered or unexported fields
}
NoteGroupBy is the group-by builder for Note entities.
func (*NoteGroupBy) Aggregate ¶
func (ngb *NoteGroupBy) Aggregate(fns ...AggregateFunc) *NoteGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NoteGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NoteGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NoteGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NoteGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NoteGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NoteGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NoteGroupBy) Scan ¶
func (ngb *NoteGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NoteGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NoteMutation ¶
type NoteMutation struct {
// contains filtered or unexported fields
}
NoteMutation represents an operation that mutates the Note nodes in the graph.
func (*NoteMutation) AddField ¶
func (m *NoteMutation) 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 (*NoteMutation) AddedEdges ¶
func (m *NoteMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NoteMutation) AddedField ¶
func (m *NoteMutation) 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 (*NoteMutation) AddedFields ¶
func (m *NoteMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NoteMutation) AddedIDs ¶
func (m *NoteMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NoteMutation) BillingAddressCleared ¶
func (m *NoteMutation) BillingAddressCleared() bool
BillingAddressCleared reports if the "billing_address" edge to the BillingAddress entity was cleared.
func (*NoteMutation) BillingAddressID ¶
func (m *NoteMutation) BillingAddressID() (id int, exists bool)
BillingAddressID returns the "billing_address" edge ID in the mutation.
func (*NoteMutation) BillingAddressIDs ¶
func (m *NoteMutation) BillingAddressIDs() (ids []int)
BillingAddressIDs returns the "billing_address" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BillingAddressID instead. It exists only for internal usage by the builders.
func (*NoteMutation) ClearBillingAddress ¶
func (m *NoteMutation) ClearBillingAddress()
ClearBillingAddress clears the "billing_address" edge to the BillingAddress entity.
func (*NoteMutation) ClearCustomer ¶
func (m *NoteMutation) ClearCustomer()
ClearCustomer clears the "customer" edge to the Customer entity.
func (*NoteMutation) ClearDeliveryAddress ¶
func (m *NoteMutation) ClearDeliveryAddress()
ClearDeliveryAddress clears the "delivery_address" edge to the DeliveryAddress entity.
func (*NoteMutation) ClearEdge ¶
func (m *NoteMutation) 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 (*NoteMutation) ClearField ¶
func (m *NoteMutation) 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 (*NoteMutation) ClearOrders ¶
func (m *NoteMutation) ClearOrders()
ClearOrders clears the "orders" edge to the Order entity.
func (*NoteMutation) ClearTel ¶
func (m *NoteMutation) ClearTel()
ClearTel clears the "tel" edge to the Tel entity.
func (*NoteMutation) ClearedEdges ¶
func (m *NoteMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NoteMutation) ClearedFields ¶
func (m *NoteMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NoteMutation) Client ¶
func (m NoteMutation) 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 (*NoteMutation) Content ¶
func (m *NoteMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*NoteMutation) CreatedAt ¶
func (m *NoteMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*NoteMutation) CustomerCleared ¶
func (m *NoteMutation) CustomerCleared() bool
CustomerCleared reports if the "customer" edge to the Customer entity was cleared.
func (*NoteMutation) CustomerID ¶
func (m *NoteMutation) CustomerID() (id int, exists bool)
CustomerID returns the "customer" edge ID in the mutation.
func (*NoteMutation) CustomerIDs ¶
func (m *NoteMutation) CustomerIDs() (ids []int)
CustomerIDs returns the "customer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CustomerID instead. It exists only for internal usage by the builders.
func (*NoteMutation) DeliveryAddressCleared ¶
func (m *NoteMutation) DeliveryAddressCleared() bool
DeliveryAddressCleared reports if the "delivery_address" edge to the DeliveryAddress entity was cleared.
func (*NoteMutation) DeliveryAddressID ¶
func (m *NoteMutation) DeliveryAddressID() (id int, exists bool)
DeliveryAddressID returns the "delivery_address" edge ID in the mutation.
func (*NoteMutation) DeliveryAddressIDs ¶
func (m *NoteMutation) DeliveryAddressIDs() (ids []int)
DeliveryAddressIDs returns the "delivery_address" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeliveryAddressID instead. It exists only for internal usage by the builders.
func (*NoteMutation) EdgeCleared ¶
func (m *NoteMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NoteMutation) Field ¶
func (m *NoteMutation) 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 (*NoteMutation) FieldCleared ¶
func (m *NoteMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NoteMutation) Fields ¶
func (m *NoteMutation) 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 (*NoteMutation) ID ¶
func (m *NoteMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*NoteMutation) IDs ¶
func (m *NoteMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*NoteMutation) OldContent ¶
func (m *NoteMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Note entity. If the Note 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 (*NoteMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Note entity. If the Note 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 (*NoteMutation) 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 (*NoteMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Note entity. If the Note 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 (*NoteMutation) OrdersCleared ¶
func (m *NoteMutation) OrdersCleared() bool
OrdersCleared reports if the "orders" edge to the Order entity was cleared.
func (*NoteMutation) OrdersID ¶
func (m *NoteMutation) OrdersID() (id int, exists bool)
OrdersID returns the "orders" edge ID in the mutation.
func (*NoteMutation) OrdersIDs ¶
func (m *NoteMutation) OrdersIDs() (ids []int)
OrdersIDs returns the "orders" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrdersID instead. It exists only for internal usage by the builders.
func (*NoteMutation) RemovedEdges ¶
func (m *NoteMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NoteMutation) RemovedIDs ¶
func (m *NoteMutation) 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 (*NoteMutation) ResetBillingAddress ¶
func (m *NoteMutation) ResetBillingAddress()
ResetBillingAddress resets all changes to the "billing_address" edge.
func (*NoteMutation) ResetContent ¶
func (m *NoteMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*NoteMutation) ResetCreatedAt ¶
func (m *NoteMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*NoteMutation) ResetCustomer ¶
func (m *NoteMutation) ResetCustomer()
ResetCustomer resets all changes to the "customer" edge.
func (*NoteMutation) ResetDeliveryAddress ¶
func (m *NoteMutation) ResetDeliveryAddress()
ResetDeliveryAddress resets all changes to the "delivery_address" edge.
func (*NoteMutation) ResetEdge ¶
func (m *NoteMutation) 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 (*NoteMutation) ResetField ¶
func (m *NoteMutation) 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 (*NoteMutation) ResetOrders ¶
func (m *NoteMutation) ResetOrders()
ResetOrders resets all changes to the "orders" edge.
func (*NoteMutation) ResetTel ¶
func (m *NoteMutation) ResetTel()
ResetTel resets all changes to the "tel" edge.
func (*NoteMutation) ResetUpdatedAt ¶
func (m *NoteMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*NoteMutation) SetBillingAddressID ¶
func (m *NoteMutation) SetBillingAddressID(id int)
SetBillingAddressID sets the "billing_address" edge to the BillingAddress entity by id.
func (*NoteMutation) SetContent ¶
func (m *NoteMutation) SetContent(s string)
SetContent sets the "content" field.
func (*NoteMutation) SetCreatedAt ¶
func (m *NoteMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*NoteMutation) SetCustomerID ¶
func (m *NoteMutation) SetCustomerID(id int)
SetCustomerID sets the "customer" edge to the Customer entity by id.
func (*NoteMutation) SetDeliveryAddressID ¶
func (m *NoteMutation) SetDeliveryAddressID(id int)
SetDeliveryAddressID sets the "delivery_address" edge to the DeliveryAddress entity by id.
func (*NoteMutation) SetField ¶
func (m *NoteMutation) 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 (*NoteMutation) SetOp ¶
func (m *NoteMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NoteMutation) SetOrdersID ¶
func (m *NoteMutation) SetOrdersID(id int)
SetOrdersID sets the "orders" edge to the Order entity by id.
func (*NoteMutation) SetTelID ¶
func (m *NoteMutation) SetTelID(id int)
SetTelID sets the "tel" edge to the Tel entity by id.
func (*NoteMutation) SetUpdatedAt ¶
func (m *NoteMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*NoteMutation) TelCleared ¶
func (m *NoteMutation) TelCleared() bool
TelCleared reports if the "tel" edge to the Tel entity was cleared.
func (*NoteMutation) TelID ¶
func (m *NoteMutation) TelID() (id int, exists bool)
TelID returns the "tel" edge ID in the mutation.
func (*NoteMutation) TelIDs ¶
func (m *NoteMutation) TelIDs() (ids []int)
TelIDs returns the "tel" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TelID instead. It exists only for internal usage by the builders.
func (NoteMutation) Tx ¶
func (m NoteMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NoteMutation) Type ¶
func (m *NoteMutation) Type() string
Type returns the node type of this mutation (Note).
func (*NoteMutation) UpdatedAt ¶
func (m *NoteMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*NoteMutation) Where ¶
func (m *NoteMutation) Where(ps ...predicate.Note)
Where appends a list predicates to the NoteMutation builder.
func (*NoteMutation) WhereP ¶
func (m *NoteMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NoteMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NoteQuery ¶
type NoteQuery struct {
// contains filtered or unexported fields
}
NoteQuery is the builder for querying Note entities.
func (*NoteQuery) Aggregate ¶
func (nq *NoteQuery) Aggregate(fns ...AggregateFunc) *NoteSelect
Aggregate returns a NoteSelect configured with the given aggregations.
func (*NoteQuery) Clone ¶
Clone returns a duplicate of the NoteQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NoteQuery) First ¶
First returns the first Note entity from the query. Returns a *NotFoundError when no Note was found.
func (*NoteQuery) FirstID ¶
FirstID returns the first Note ID from the query. Returns a *NotFoundError when no Note ID was found.
func (*NoteQuery) GroupBy ¶
func (nq *NoteQuery) GroupBy(field string, fields ...string) *NoteGroupBy
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 { Content string `json:"content,omitempty"` Count int `json:"count,omitempty"` } client.Note.Query(). GroupBy(note.FieldContent). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NoteQuery) Only ¶
Only returns a single Note entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Note entity is found. Returns a *NotFoundError when no Note entities are found.
func (*NoteQuery) OnlyID ¶
OnlyID is like Only, but returns the only Note ID in the query. Returns a *NotSingularError when more than one Note ID is found. Returns a *NotFoundError when no entities are found.
func (*NoteQuery) Order ¶
func (nq *NoteQuery) Order(o ...note.OrderOption) *NoteQuery
Order specifies how the records should be ordered.
func (*NoteQuery) QueryBillingAddress ¶
func (nq *NoteQuery) QueryBillingAddress() *BillingAddressQuery
QueryBillingAddress chains the current query on the "billing_address" edge.
func (*NoteQuery) QueryCustomer ¶
func (nq *NoteQuery) QueryCustomer() *CustomerQuery
QueryCustomer chains the current query on the "customer" edge.
func (*NoteQuery) QueryDeliveryAddress ¶
func (nq *NoteQuery) QueryDeliveryAddress() *DeliveryAddressQuery
QueryDeliveryAddress chains the current query on the "delivery_address" edge.
func (*NoteQuery) QueryOrders ¶
func (nq *NoteQuery) QueryOrders() *OrderQuery
QueryOrders chains the current query on the "orders" edge.
func (*NoteQuery) Select ¶
func (nq *NoteQuery) Select(fields ...string) *NoteSelect
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 { Content string `json:"content,omitempty"` } client.Note.Query(). Select(note.FieldContent). Scan(ctx, &v)
func (*NoteQuery) 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 (*NoteQuery) WithBillingAddress ¶
func (nq *NoteQuery) WithBillingAddress(opts ...func(*BillingAddressQuery)) *NoteQuery
WithBillingAddress tells the query-builder to eager-load the nodes that are connected to the "billing_address" edge. The optional arguments are used to configure the query builder of the edge.
func (*NoteQuery) WithCustomer ¶
func (nq *NoteQuery) WithCustomer(opts ...func(*CustomerQuery)) *NoteQuery
WithCustomer tells the query-builder to eager-load the nodes that are connected to the "customer" edge. The optional arguments are used to configure the query builder of the edge.
func (*NoteQuery) WithDeliveryAddress ¶
func (nq *NoteQuery) WithDeliveryAddress(opts ...func(*DeliveryAddressQuery)) *NoteQuery
WithDeliveryAddress tells the query-builder to eager-load the nodes that are connected to the "delivery_address" edge. The optional arguments are used to configure the query builder of the edge.
func (*NoteQuery) WithOrders ¶
func (nq *NoteQuery) WithOrders(opts ...func(*OrderQuery)) *NoteQuery
WithOrders tells the query-builder to eager-load the nodes that are connected to the "orders" edge. The optional arguments are used to configure the query builder of the edge.
type NoteSelect ¶
type NoteSelect struct { *NoteQuery // contains filtered or unexported fields }
NoteSelect is the builder for selecting fields of Note entities.
func (*NoteSelect) Aggregate ¶
func (ns *NoteSelect) Aggregate(fns ...AggregateFunc) *NoteSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NoteSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NoteSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NoteSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NoteSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NoteSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NoteSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NoteSelect) Scan ¶
func (ns *NoteSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NoteSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NoteUpdate ¶
type NoteUpdate struct {
// contains filtered or unexported fields
}
NoteUpdate is the builder for updating Note entities.
func (*NoteUpdate) ClearBillingAddress ¶
func (nu *NoteUpdate) ClearBillingAddress() *NoteUpdate
ClearBillingAddress clears the "billing_address" edge to the BillingAddress entity.
func (*NoteUpdate) ClearCustomer ¶
func (nu *NoteUpdate) ClearCustomer() *NoteUpdate
ClearCustomer clears the "customer" edge to the Customer entity.
func (*NoteUpdate) ClearDeliveryAddress ¶
func (nu *NoteUpdate) ClearDeliveryAddress() *NoteUpdate
ClearDeliveryAddress clears the "delivery_address" edge to the DeliveryAddress entity.
func (*NoteUpdate) ClearOrders ¶
func (nu *NoteUpdate) ClearOrders() *NoteUpdate
ClearOrders clears the "orders" edge to the Order entity.
func (*NoteUpdate) ClearTel ¶
func (nu *NoteUpdate) ClearTel() *NoteUpdate
ClearTel clears the "tel" edge to the Tel entity.
func (*NoteUpdate) Exec ¶
func (nu *NoteUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NoteUpdate) ExecX ¶
func (nu *NoteUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoteUpdate) Mutation ¶
func (nu *NoteUpdate) Mutation() *NoteMutation
Mutation returns the NoteMutation object of the builder.
func (*NoteUpdate) Save ¶
func (nu *NoteUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NoteUpdate) SaveX ¶
func (nu *NoteUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NoteUpdate) SetBillingAddress ¶
func (nu *NoteUpdate) SetBillingAddress(b *BillingAddress) *NoteUpdate
SetBillingAddress sets the "billing_address" edge to the BillingAddress entity.
func (*NoteUpdate) SetBillingAddressID ¶
func (nu *NoteUpdate) SetBillingAddressID(id int) *NoteUpdate
SetBillingAddressID sets the "billing_address" edge to the BillingAddress entity by ID.
func (*NoteUpdate) SetContent ¶
func (nu *NoteUpdate) SetContent(s string) *NoteUpdate
SetContent sets the "content" field.
func (*NoteUpdate) SetCustomer ¶
func (nu *NoteUpdate) SetCustomer(c *Customer) *NoteUpdate
SetCustomer sets the "customer" edge to the Customer entity.
func (*NoteUpdate) SetCustomerID ¶
func (nu *NoteUpdate) SetCustomerID(id int) *NoteUpdate
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*NoteUpdate) SetDeliveryAddress ¶
func (nu *NoteUpdate) SetDeliveryAddress(d *DeliveryAddress) *NoteUpdate
SetDeliveryAddress sets the "delivery_address" edge to the DeliveryAddress entity.
func (*NoteUpdate) SetDeliveryAddressID ¶
func (nu *NoteUpdate) SetDeliveryAddressID(id int) *NoteUpdate
SetDeliveryAddressID sets the "delivery_address" edge to the DeliveryAddress entity by ID.
func (*NoteUpdate) SetNillableBillingAddressID ¶
func (nu *NoteUpdate) SetNillableBillingAddressID(id *int) *NoteUpdate
SetNillableBillingAddressID sets the "billing_address" edge to the BillingAddress entity by ID if the given value is not nil.
func (*NoteUpdate) SetNillableContent ¶
func (nu *NoteUpdate) SetNillableContent(s *string) *NoteUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*NoteUpdate) SetNillableCustomerID ¶
func (nu *NoteUpdate) SetNillableCustomerID(id *int) *NoteUpdate
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*NoteUpdate) SetNillableDeliveryAddressID ¶
func (nu *NoteUpdate) SetNillableDeliveryAddressID(id *int) *NoteUpdate
SetNillableDeliveryAddressID sets the "delivery_address" edge to the DeliveryAddress entity by ID if the given value is not nil.
func (*NoteUpdate) SetNillableOrdersID ¶
func (nu *NoteUpdate) SetNillableOrdersID(id *int) *NoteUpdate
SetNillableOrdersID sets the "orders" edge to the Order entity by ID if the given value is not nil.
func (*NoteUpdate) SetNillableTelID ¶
func (nu *NoteUpdate) SetNillableTelID(id *int) *NoteUpdate
SetNillableTelID sets the "tel" edge to the Tel entity by ID if the given value is not nil.
func (*NoteUpdate) SetOrders ¶
func (nu *NoteUpdate) SetOrders(o *Order) *NoteUpdate
SetOrders sets the "orders" edge to the Order entity.
func (*NoteUpdate) SetOrdersID ¶
func (nu *NoteUpdate) SetOrdersID(id int) *NoteUpdate
SetOrdersID sets the "orders" edge to the Order entity by ID.
func (*NoteUpdate) SetTel ¶
func (nu *NoteUpdate) SetTel(t *Tel) *NoteUpdate
SetTel sets the "tel" edge to the Tel entity.
func (*NoteUpdate) SetTelID ¶
func (nu *NoteUpdate) SetTelID(id int) *NoteUpdate
SetTelID sets the "tel" edge to the Tel entity by ID.
func (*NoteUpdate) SetUpdatedAt ¶
func (nu *NoteUpdate) SetUpdatedAt(t time.Time) *NoteUpdate
SetUpdatedAt sets the "updated_at" field.
func (*NoteUpdate) Where ¶
func (nu *NoteUpdate) Where(ps ...predicate.Note) *NoteUpdate
Where appends a list predicates to the NoteUpdate builder.
type NoteUpdateOne ¶
type NoteUpdateOne struct {
// contains filtered or unexported fields
}
NoteUpdateOne is the builder for updating a single Note entity.
func (*NoteUpdateOne) ClearBillingAddress ¶
func (nuo *NoteUpdateOne) ClearBillingAddress() *NoteUpdateOne
ClearBillingAddress clears the "billing_address" edge to the BillingAddress entity.
func (*NoteUpdateOne) ClearCustomer ¶
func (nuo *NoteUpdateOne) ClearCustomer() *NoteUpdateOne
ClearCustomer clears the "customer" edge to the Customer entity.
func (*NoteUpdateOne) ClearDeliveryAddress ¶
func (nuo *NoteUpdateOne) ClearDeliveryAddress() *NoteUpdateOne
ClearDeliveryAddress clears the "delivery_address" edge to the DeliveryAddress entity.
func (*NoteUpdateOne) ClearOrders ¶
func (nuo *NoteUpdateOne) ClearOrders() *NoteUpdateOne
ClearOrders clears the "orders" edge to the Order entity.
func (*NoteUpdateOne) ClearTel ¶
func (nuo *NoteUpdateOne) ClearTel() *NoteUpdateOne
ClearTel clears the "tel" edge to the Tel entity.
func (*NoteUpdateOne) Exec ¶
func (nuo *NoteUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NoteUpdateOne) ExecX ¶
func (nuo *NoteUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NoteUpdateOne) Mutation ¶
func (nuo *NoteUpdateOne) Mutation() *NoteMutation
Mutation returns the NoteMutation object of the builder.
func (*NoteUpdateOne) Save ¶
func (nuo *NoteUpdateOne) Save(ctx context.Context) (*Note, error)
Save executes the query and returns the updated Note entity.
func (*NoteUpdateOne) SaveX ¶
func (nuo *NoteUpdateOne) SaveX(ctx context.Context) *Note
SaveX is like Save, but panics if an error occurs.
func (*NoteUpdateOne) Select ¶
func (nuo *NoteUpdateOne) Select(field string, fields ...string) *NoteUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NoteUpdateOne) SetBillingAddress ¶
func (nuo *NoteUpdateOne) SetBillingAddress(b *BillingAddress) *NoteUpdateOne
SetBillingAddress sets the "billing_address" edge to the BillingAddress entity.
func (*NoteUpdateOne) SetBillingAddressID ¶
func (nuo *NoteUpdateOne) SetBillingAddressID(id int) *NoteUpdateOne
SetBillingAddressID sets the "billing_address" edge to the BillingAddress entity by ID.
func (*NoteUpdateOne) SetContent ¶
func (nuo *NoteUpdateOne) SetContent(s string) *NoteUpdateOne
SetContent sets the "content" field.
func (*NoteUpdateOne) SetCustomer ¶
func (nuo *NoteUpdateOne) SetCustomer(c *Customer) *NoteUpdateOne
SetCustomer sets the "customer" edge to the Customer entity.
func (*NoteUpdateOne) SetCustomerID ¶
func (nuo *NoteUpdateOne) SetCustomerID(id int) *NoteUpdateOne
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*NoteUpdateOne) SetDeliveryAddress ¶
func (nuo *NoteUpdateOne) SetDeliveryAddress(d *DeliveryAddress) *NoteUpdateOne
SetDeliveryAddress sets the "delivery_address" edge to the DeliveryAddress entity.
func (*NoteUpdateOne) SetDeliveryAddressID ¶
func (nuo *NoteUpdateOne) SetDeliveryAddressID(id int) *NoteUpdateOne
SetDeliveryAddressID sets the "delivery_address" edge to the DeliveryAddress entity by ID.
func (*NoteUpdateOne) SetNillableBillingAddressID ¶
func (nuo *NoteUpdateOne) SetNillableBillingAddressID(id *int) *NoteUpdateOne
SetNillableBillingAddressID sets the "billing_address" edge to the BillingAddress entity by ID if the given value is not nil.
func (*NoteUpdateOne) SetNillableContent ¶
func (nuo *NoteUpdateOne) SetNillableContent(s *string) *NoteUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*NoteUpdateOne) SetNillableCustomerID ¶
func (nuo *NoteUpdateOne) SetNillableCustomerID(id *int) *NoteUpdateOne
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*NoteUpdateOne) SetNillableDeliveryAddressID ¶
func (nuo *NoteUpdateOne) SetNillableDeliveryAddressID(id *int) *NoteUpdateOne
SetNillableDeliveryAddressID sets the "delivery_address" edge to the DeliveryAddress entity by ID if the given value is not nil.
func (*NoteUpdateOne) SetNillableOrdersID ¶
func (nuo *NoteUpdateOne) SetNillableOrdersID(id *int) *NoteUpdateOne
SetNillableOrdersID sets the "orders" edge to the Order entity by ID if the given value is not nil.
func (*NoteUpdateOne) SetNillableTelID ¶
func (nuo *NoteUpdateOne) SetNillableTelID(id *int) *NoteUpdateOne
SetNillableTelID sets the "tel" edge to the Tel entity by ID if the given value is not nil.
func (*NoteUpdateOne) SetOrders ¶
func (nuo *NoteUpdateOne) SetOrders(o *Order) *NoteUpdateOne
SetOrders sets the "orders" edge to the Order entity.
func (*NoteUpdateOne) SetOrdersID ¶
func (nuo *NoteUpdateOne) SetOrdersID(id int) *NoteUpdateOne
SetOrdersID sets the "orders" edge to the Order entity by ID.
func (*NoteUpdateOne) SetTel ¶
func (nuo *NoteUpdateOne) SetTel(t *Tel) *NoteUpdateOne
SetTel sets the "tel" edge to the Tel entity.
func (*NoteUpdateOne) SetTelID ¶
func (nuo *NoteUpdateOne) SetTelID(id int) *NoteUpdateOne
SetTelID sets the "tel" edge to the Tel entity by ID.
func (*NoteUpdateOne) SetUpdatedAt ¶
func (nuo *NoteUpdateOne) SetUpdatedAt(t time.Time) *NoteUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*NoteUpdateOne) Where ¶
func (nuo *NoteUpdateOne) Where(ps ...predicate.Note) *NoteUpdateOne
Where appends a list predicates to the NoteUpdate builder.
type Order ¶
type Order struct { // ID of the ent. ID int `json:"id,omitempty"` // Status holds the value of the "status" field. Status string `json:"status,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"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the OrderQuery when eager-loading is set. Edges OrderEdges `json:"edges"` // contains filtered or unexported fields }
Order is the model entity for the Order schema.
func (*Order) QueryAddress ¶
func (o *Order) QueryAddress() *BillingAddressQuery
QueryAddress queries the "address" edge of the Order entity.
func (*Order) QueryCustomer ¶
func (o *Order) QueryCustomer() *CustomerQuery
QueryCustomer queries the "customer" edge of the Order entity.
func (*Order) QueryNotes ¶
QueryNotes queries the "notes" edge of the Order entity.
func (*Order) Unwrap ¶
Unwrap unwraps the Order 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 (*Order) Update ¶
func (o *Order) Update() *OrderUpdateOne
Update returns a builder for updating this Order. Note that you need to call Order.Unwrap() before calling this method if this Order was returned from a transaction, and the transaction was committed or rolled back.
type OrderClient ¶
type OrderClient struct {
// contains filtered or unexported fields
}
OrderClient is a client for the Order schema.
func NewOrderClient ¶
func NewOrderClient(c config) *OrderClient
NewOrderClient returns a client for the Order from the given config.
func (*OrderClient) Create ¶
func (c *OrderClient) Create() *OrderCreate
Create returns a builder for creating a Order entity.
func (*OrderClient) CreateBulk ¶
func (c *OrderClient) CreateBulk(builders ...*OrderCreate) *OrderCreateBulk
CreateBulk returns a builder for creating a bulk of Order entities.
func (*OrderClient) Delete ¶
func (c *OrderClient) Delete() *OrderDelete
Delete returns a delete builder for Order.
func (*OrderClient) DeleteOne ¶
func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OrderClient) DeleteOneID ¶
func (c *OrderClient) DeleteOneID(id int) *OrderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrderClient) GetX ¶
func (c *OrderClient) GetX(ctx context.Context, id int) *Order
GetX is like Get, but panics if an error occurs.
func (*OrderClient) Intercept ¶
func (c *OrderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `order.Intercept(f(g(h())))`.
func (*OrderClient) Interceptors ¶
func (c *OrderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrderClient) MapCreateBulk ¶
func (c *OrderClient) MapCreateBulk(slice any, setFunc func(*OrderCreate, int)) *OrderCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*OrderClient) Query ¶
func (c *OrderClient) Query() *OrderQuery
Query returns a query builder for Order.
func (*OrderClient) QueryAddress ¶
func (c *OrderClient) QueryAddress(o *Order) *BillingAddressQuery
QueryAddress queries the address edge of a Order.
func (*OrderClient) QueryCustomer ¶
func (c *OrderClient) QueryCustomer(o *Order) *CustomerQuery
QueryCustomer queries the customer edge of a Order.
func (*OrderClient) QueryNotes ¶
func (c *OrderClient) QueryNotes(o *Order) *NoteQuery
QueryNotes queries the notes edge of a Order.
func (*OrderClient) Update ¶
func (c *OrderClient) Update() *OrderUpdate
Update returns an update builder for Order.
func (*OrderClient) UpdateOne ¶
func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderClient) UpdateOneID ¶
func (c *OrderClient) UpdateOneID(id int) *OrderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderClient) Use ¶
func (c *OrderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `order.Hooks(f(g(h())))`.
type OrderCreate ¶
type OrderCreate struct {
// contains filtered or unexported fields
}
OrderCreate is the builder for creating a Order entity.
func (*OrderCreate) AddNoteIDs ¶
func (oc *OrderCreate) AddNoteIDs(ids ...int) *OrderCreate
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*OrderCreate) AddNotes ¶
func (oc *OrderCreate) AddNotes(n ...*Note) *OrderCreate
AddNotes adds the "notes" edges to the Note entity.
func (*OrderCreate) Exec ¶
func (oc *OrderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderCreate) ExecX ¶
func (oc *OrderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderCreate) Mutation ¶
func (oc *OrderCreate) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderCreate) Save ¶
func (oc *OrderCreate) Save(ctx context.Context) (*Order, error)
Save creates the Order in the database.
func (*OrderCreate) SaveX ¶
func (oc *OrderCreate) SaveX(ctx context.Context) *Order
SaveX calls Save and panics if Save returns an error.
func (*OrderCreate) SetAddress ¶
func (oc *OrderCreate) SetAddress(b *BillingAddress) *OrderCreate
SetAddress sets the "address" edge to the BillingAddress entity.
func (*OrderCreate) SetAddressID ¶
func (oc *OrderCreate) SetAddressID(id int) *OrderCreate
SetAddressID sets the "address" edge to the BillingAddress entity by ID.
func (*OrderCreate) SetCreatedAt ¶
func (oc *OrderCreate) SetCreatedAt(t time.Time) *OrderCreate
SetCreatedAt sets the "created_at" field.
func (*OrderCreate) SetCustomer ¶
func (oc *OrderCreate) SetCustomer(c *Customer) *OrderCreate
SetCustomer sets the "customer" edge to the Customer entity.
func (*OrderCreate) SetCustomerID ¶
func (oc *OrderCreate) SetCustomerID(id int) *OrderCreate
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*OrderCreate) SetNillableAddressID ¶
func (oc *OrderCreate) SetNillableAddressID(id *int) *OrderCreate
SetNillableAddressID sets the "address" edge to the BillingAddress entity by ID if the given value is not nil.
func (*OrderCreate) SetNillableCreatedAt ¶
func (oc *OrderCreate) SetNillableCreatedAt(t *time.Time) *OrderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderCreate) SetNillableCustomerID ¶
func (oc *OrderCreate) SetNillableCustomerID(id *int) *OrderCreate
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*OrderCreate) SetNillableStatus ¶
func (oc *OrderCreate) SetNillableStatus(s *string) *OrderCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderCreate) SetNillableUpdatedAt ¶
func (oc *OrderCreate) SetNillableUpdatedAt(t *time.Time) *OrderCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderCreate) SetStatus ¶
func (oc *OrderCreate) SetStatus(s string) *OrderCreate
SetStatus sets the "status" field.
func (*OrderCreate) SetUpdatedAt ¶
func (oc *OrderCreate) SetUpdatedAt(t time.Time) *OrderCreate
SetUpdatedAt sets the "updated_at" field.
type OrderCreateBulk ¶
type OrderCreateBulk struct {
// contains filtered or unexported fields
}
OrderCreateBulk is the builder for creating many Order entities in bulk.
func (*OrderCreateBulk) Exec ¶
func (ocb *OrderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderCreateBulk) ExecX ¶
func (ocb *OrderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type OrderDelete ¶
type OrderDelete struct {
// contains filtered or unexported fields
}
OrderDelete is the builder for deleting a Order entity.
func (*OrderDelete) Exec ¶
func (od *OrderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderDelete) ExecX ¶
func (od *OrderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderDelete) Where ¶
func (od *OrderDelete) Where(ps ...predicate.Order) *OrderDelete
Where appends a list predicates to the OrderDelete builder.
type OrderDeleteOne ¶
type OrderDeleteOne struct {
// contains filtered or unexported fields
}
OrderDeleteOne is the builder for deleting a single Order entity.
func (*OrderDeleteOne) Exec ¶
func (odo *OrderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderDeleteOne) ExecX ¶
func (odo *OrderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderDeleteOne) Where ¶
func (odo *OrderDeleteOne) Where(ps ...predicate.Order) *OrderDeleteOne
Where appends a list predicates to the OrderDelete builder.
type OrderEdges ¶
type OrderEdges struct { // Customer holds the value of the customer edge. Customer *Customer `json:"customer,omitempty"` // Address holds the value of the address edge. Address *BillingAddress `json:"address,omitempty"` // Notes holds the value of the notes edge. Notes []*Note `json:"notes,omitempty"` // contains filtered or unexported fields }
OrderEdges holds the relations/edges for other nodes in the graph.
func (OrderEdges) AddressOrErr ¶
func (e OrderEdges) AddressOrErr() (*BillingAddress, error)
AddressOrErr returns the Address value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) CustomerOrErr ¶
func (e OrderEdges) CustomerOrErr() (*Customer, error)
CustomerOrErr returns the Customer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) NotesOrErr ¶
func (e OrderEdges) NotesOrErr() ([]*Note, error)
NotesOrErr returns the Notes value or an error if the edge was not loaded in eager-loading.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type OrderGroupBy ¶
type OrderGroupBy struct {
// contains filtered or unexported fields
}
OrderGroupBy is the group-by builder for Order entities.
func (*OrderGroupBy) Aggregate ¶
func (ogb *OrderGroupBy) Aggregate(fns ...AggregateFunc) *OrderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Scan ¶
func (ogb *OrderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderMutation ¶
type OrderMutation struct {
// contains filtered or unexported fields
}
OrderMutation represents an operation that mutates the Order nodes in the graph.
func (*OrderMutation) AddField ¶
func (m *OrderMutation) 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 (*OrderMutation) AddNoteIDs ¶
func (m *OrderMutation) AddNoteIDs(ids ...int)
AddNoteIDs adds the "notes" edge to the Note entity by ids.
func (*OrderMutation) AddedEdges ¶
func (m *OrderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderMutation) AddedField ¶
func (m *OrderMutation) 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 (*OrderMutation) AddedFields ¶
func (m *OrderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderMutation) AddedIDs ¶
func (m *OrderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderMutation) AddressCleared ¶
func (m *OrderMutation) AddressCleared() bool
AddressCleared reports if the "address" edge to the BillingAddress entity was cleared.
func (*OrderMutation) AddressID ¶
func (m *OrderMutation) AddressID() (id int, exists bool)
AddressID returns the "address" edge ID in the mutation.
func (*OrderMutation) AddressIDs ¶
func (m *OrderMutation) AddressIDs() (ids []int)
AddressIDs returns the "address" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AddressID instead. It exists only for internal usage by the builders.
func (*OrderMutation) ClearAddress ¶
func (m *OrderMutation) ClearAddress()
ClearAddress clears the "address" edge to the BillingAddress entity.
func (*OrderMutation) ClearCustomer ¶
func (m *OrderMutation) ClearCustomer()
ClearCustomer clears the "customer" edge to the Customer entity.
func (*OrderMutation) ClearEdge ¶
func (m *OrderMutation) 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 (*OrderMutation) ClearField ¶
func (m *OrderMutation) 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 (*OrderMutation) ClearNotes ¶
func (m *OrderMutation) ClearNotes()
ClearNotes clears the "notes" edge to the Note entity.
func (*OrderMutation) ClearedEdges ¶
func (m *OrderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderMutation) ClearedFields ¶
func (m *OrderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderMutation) Client ¶
func (m OrderMutation) 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 (*OrderMutation) CreatedAt ¶
func (m *OrderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderMutation) CustomerCleared ¶
func (m *OrderMutation) CustomerCleared() bool
CustomerCleared reports if the "customer" edge to the Customer entity was cleared.
func (*OrderMutation) CustomerID ¶
func (m *OrderMutation) CustomerID() (id int, exists bool)
CustomerID returns the "customer" edge ID in the mutation.
func (*OrderMutation) CustomerIDs ¶
func (m *OrderMutation) CustomerIDs() (ids []int)
CustomerIDs returns the "customer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CustomerID instead. It exists only for internal usage by the builders.
func (*OrderMutation) EdgeCleared ¶
func (m *OrderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderMutation) Field ¶
func (m *OrderMutation) 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 (*OrderMutation) FieldCleared ¶
func (m *OrderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderMutation) Fields ¶
func (m *OrderMutation) 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 (*OrderMutation) ID ¶
func (m *OrderMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OrderMutation) IDs ¶
func (m *OrderMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OrderMutation) NotesCleared ¶
func (m *OrderMutation) NotesCleared() bool
NotesCleared reports if the "notes" edge to the Note entity was cleared.
func (*OrderMutation) NotesIDs ¶
func (m *OrderMutation) NotesIDs() (ids []int)
NotesIDs returns the "notes" edge IDs in the mutation.
func (*OrderMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Order entity. If the Order 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 (*OrderMutation) 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 (*OrderMutation) OldStatus ¶
func (m *OrderMutation) OldStatus(ctx context.Context) (v string, err error)
OldStatus returns the old "status" field's value of the Order entity. If the Order 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 (*OrderMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Order entity. If the Order 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 (*OrderMutation) RemoveNoteIDs ¶
func (m *OrderMutation) RemoveNoteIDs(ids ...int)
RemoveNoteIDs removes the "notes" edge to the Note entity by IDs.
func (*OrderMutation) RemovedEdges ¶
func (m *OrderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderMutation) RemovedIDs ¶
func (m *OrderMutation) 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 (*OrderMutation) RemovedNotesIDs ¶
func (m *OrderMutation) RemovedNotesIDs() (ids []int)
RemovedNotes returns the removed IDs of the "notes" edge to the Note entity.
func (*OrderMutation) ResetAddress ¶
func (m *OrderMutation) ResetAddress()
ResetAddress resets all changes to the "address" edge.
func (*OrderMutation) ResetCreatedAt ¶
func (m *OrderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderMutation) ResetCustomer ¶
func (m *OrderMutation) ResetCustomer()
ResetCustomer resets all changes to the "customer" edge.
func (*OrderMutation) ResetEdge ¶
func (m *OrderMutation) 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 (*OrderMutation) ResetField ¶
func (m *OrderMutation) 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 (*OrderMutation) ResetNotes ¶
func (m *OrderMutation) ResetNotes()
ResetNotes resets all changes to the "notes" edge.
func (*OrderMutation) ResetStatus ¶
func (m *OrderMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*OrderMutation) ResetUpdatedAt ¶
func (m *OrderMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrderMutation) SetAddressID ¶
func (m *OrderMutation) SetAddressID(id int)
SetAddressID sets the "address" edge to the BillingAddress entity by id.
func (*OrderMutation) SetCreatedAt ¶
func (m *OrderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderMutation) SetCustomerID ¶
func (m *OrderMutation) SetCustomerID(id int)
SetCustomerID sets the "customer" edge to the Customer entity by id.
func (*OrderMutation) SetField ¶
func (m *OrderMutation) 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 (*OrderMutation) SetOp ¶
func (m *OrderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderMutation) SetStatus ¶
func (m *OrderMutation) SetStatus(s string)
SetStatus sets the "status" field.
func (*OrderMutation) SetUpdatedAt ¶
func (m *OrderMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OrderMutation) Status ¶
func (m *OrderMutation) Status() (r string, exists bool)
Status returns the value of the "status" field in the mutation.
func (OrderMutation) Tx ¶
func (m OrderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderMutation) Type ¶
func (m *OrderMutation) Type() string
Type returns the node type of this mutation (Order).
func (*OrderMutation) UpdatedAt ¶
func (m *OrderMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OrderMutation) Where ¶
func (m *OrderMutation) Where(ps ...predicate.Order)
Where appends a list predicates to the OrderMutation builder.
func (*OrderMutation) WhereP ¶
func (m *OrderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrderQuery ¶
type OrderQuery struct {
// contains filtered or unexported fields
}
OrderQuery is the builder for querying Order entities.
func (*OrderQuery) Aggregate ¶
func (oq *OrderQuery) Aggregate(fns ...AggregateFunc) *OrderSelect
Aggregate returns a OrderSelect configured with the given aggregations.
func (*OrderQuery) All ¶
func (oq *OrderQuery) All(ctx context.Context) ([]*Order, error)
All executes the query and returns a list of Orders.
func (*OrderQuery) AllX ¶
func (oq *OrderQuery) AllX(ctx context.Context) []*Order
AllX is like All, but panics if an error occurs.
func (*OrderQuery) Clone ¶
func (oq *OrderQuery) Clone() *OrderQuery
Clone returns a duplicate of the OrderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderQuery) Count ¶
func (oq *OrderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderQuery) CountX ¶
func (oq *OrderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderQuery) Exist ¶
func (oq *OrderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderQuery) ExistX ¶
func (oq *OrderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderQuery) First ¶
func (oq *OrderQuery) First(ctx context.Context) (*Order, error)
First returns the first Order entity from the query. Returns a *NotFoundError when no Order was found.
func (*OrderQuery) FirstID ¶
func (oq *OrderQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Order ID from the query. Returns a *NotFoundError when no Order ID was found.
func (*OrderQuery) FirstIDX ¶
func (oq *OrderQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderQuery) FirstX ¶
func (oq *OrderQuery) FirstX(ctx context.Context) *Order
FirstX is like First, but panics if an error occurs.
func (*OrderQuery) GroupBy ¶
func (oq *OrderQuery) GroupBy(field string, fields ...string) *OrderGroupBy
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 { Status string `json:"status,omitempty"` Count int `json:"count,omitempty"` } client.Order.Query(). GroupBy(order.FieldStatus). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderQuery) IDs ¶
func (oq *OrderQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Order IDs.
func (*OrderQuery) IDsX ¶
func (oq *OrderQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OrderQuery) Limit ¶
func (oq *OrderQuery) Limit(limit int) *OrderQuery
Limit the number of records to be returned by this query.
func (*OrderQuery) Offset ¶
func (oq *OrderQuery) Offset(offset int) *OrderQuery
Offset to start from.
func (*OrderQuery) Only ¶
func (oq *OrderQuery) Only(ctx context.Context) (*Order, error)
Only returns a single Order entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Order entity is found. Returns a *NotFoundError when no Order entities are found.
func (*OrderQuery) OnlyID ¶
func (oq *OrderQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Order ID in the query. Returns a *NotSingularError when more than one Order ID is found. Returns a *NotFoundError when no entities are found.
func (*OrderQuery) OnlyIDX ¶
func (oq *OrderQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderQuery) OnlyX ¶
func (oq *OrderQuery) OnlyX(ctx context.Context) *Order
OnlyX is like Only, but panics if an error occurs.
func (*OrderQuery) Order ¶
func (oq *OrderQuery) Order(o ...order.OrderOption) *OrderQuery
Order specifies how the records should be ordered.
func (*OrderQuery) QueryAddress ¶
func (oq *OrderQuery) QueryAddress() *BillingAddressQuery
QueryAddress chains the current query on the "address" edge.
func (*OrderQuery) QueryCustomer ¶
func (oq *OrderQuery) QueryCustomer() *CustomerQuery
QueryCustomer chains the current query on the "customer" edge.
func (*OrderQuery) QueryNotes ¶
func (oq *OrderQuery) QueryNotes() *NoteQuery
QueryNotes chains the current query on the "notes" edge.
func (*OrderQuery) Select ¶
func (oq *OrderQuery) Select(fields ...string) *OrderSelect
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 { Status string `json:"status,omitempty"` } client.Order.Query(). Select(order.FieldStatus). Scan(ctx, &v)
func (*OrderQuery) Unique ¶
func (oq *OrderQuery) Unique(unique bool) *OrderQuery
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 (*OrderQuery) Where ¶
func (oq *OrderQuery) Where(ps ...predicate.Order) *OrderQuery
Where adds a new predicate for the OrderQuery builder.
func (*OrderQuery) WithAddress ¶
func (oq *OrderQuery) WithAddress(opts ...func(*BillingAddressQuery)) *OrderQuery
WithAddress tells the query-builder to eager-load the nodes that are connected to the "address" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithCustomer ¶
func (oq *OrderQuery) WithCustomer(opts ...func(*CustomerQuery)) *OrderQuery
WithCustomer tells the query-builder to eager-load the nodes that are connected to the "customer" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithNotes ¶
func (oq *OrderQuery) WithNotes(opts ...func(*NoteQuery)) *OrderQuery
WithNotes tells the query-builder to eager-load the nodes that are connected to the "notes" edge. The optional arguments are used to configure the query builder of the edge.
type OrderSelect ¶
type OrderSelect struct { *OrderQuery // contains filtered or unexported fields }
OrderSelect is the builder for selecting fields of Order entities.
func (*OrderSelect) Aggregate ¶
func (os *OrderSelect) Aggregate(fns ...AggregateFunc) *OrderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Scan ¶
func (os *OrderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderUpdate ¶
type OrderUpdate struct {
// contains filtered or unexported fields
}
OrderUpdate is the builder for updating Order entities.
func (*OrderUpdate) AddNoteIDs ¶
func (ou *OrderUpdate) AddNoteIDs(ids ...int) *OrderUpdate
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*OrderUpdate) AddNotes ¶
func (ou *OrderUpdate) AddNotes(n ...*Note) *OrderUpdate
AddNotes adds the "notes" edges to the Note entity.
func (*OrderUpdate) ClearAddress ¶
func (ou *OrderUpdate) ClearAddress() *OrderUpdate
ClearAddress clears the "address" edge to the BillingAddress entity.
func (*OrderUpdate) ClearCustomer ¶
func (ou *OrderUpdate) ClearCustomer() *OrderUpdate
ClearCustomer clears the "customer" edge to the Customer entity.
func (*OrderUpdate) ClearNotes ¶
func (ou *OrderUpdate) ClearNotes() *OrderUpdate
ClearNotes clears all "notes" edges to the Note entity.
func (*OrderUpdate) Exec ¶
func (ou *OrderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderUpdate) ExecX ¶
func (ou *OrderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdate) Mutation ¶
func (ou *OrderUpdate) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdate) RemoveNoteIDs ¶
func (ou *OrderUpdate) RemoveNoteIDs(ids ...int) *OrderUpdate
RemoveNoteIDs removes the "notes" edge to Note entities by IDs.
func (*OrderUpdate) RemoveNotes ¶
func (ou *OrderUpdate) RemoveNotes(n ...*Note) *OrderUpdate
RemoveNotes removes "notes" edges to Note entities.
func (*OrderUpdate) Save ¶
func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderUpdate) SaveX ¶
func (ou *OrderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdate) SetAddress ¶
func (ou *OrderUpdate) SetAddress(b *BillingAddress) *OrderUpdate
SetAddress sets the "address" edge to the BillingAddress entity.
func (*OrderUpdate) SetAddressID ¶
func (ou *OrderUpdate) SetAddressID(id int) *OrderUpdate
SetAddressID sets the "address" edge to the BillingAddress entity by ID.
func (*OrderUpdate) SetCustomer ¶
func (ou *OrderUpdate) SetCustomer(c *Customer) *OrderUpdate
SetCustomer sets the "customer" edge to the Customer entity.
func (*OrderUpdate) SetCustomerID ¶
func (ou *OrderUpdate) SetCustomerID(id int) *OrderUpdate
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*OrderUpdate) SetNillableAddressID ¶
func (ou *OrderUpdate) SetNillableAddressID(id *int) *OrderUpdate
SetNillableAddressID sets the "address" edge to the BillingAddress entity by ID if the given value is not nil.
func (*OrderUpdate) SetNillableCustomerID ¶
func (ou *OrderUpdate) SetNillableCustomerID(id *int) *OrderUpdate
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*OrderUpdate) SetNillableStatus ¶
func (ou *OrderUpdate) SetNillableStatus(s *string) *OrderUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderUpdate) SetStatus ¶
func (ou *OrderUpdate) SetStatus(s string) *OrderUpdate
SetStatus sets the "status" field.
func (*OrderUpdate) SetUpdatedAt ¶
func (ou *OrderUpdate) SetUpdatedAt(t time.Time) *OrderUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrderUpdate) Where ¶
func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
Where appends a list predicates to the OrderUpdate builder.
type OrderUpdateOne ¶
type OrderUpdateOne struct {
// contains filtered or unexported fields
}
OrderUpdateOne is the builder for updating a single Order entity.
func (*OrderUpdateOne) AddNoteIDs ¶
func (ouo *OrderUpdateOne) AddNoteIDs(ids ...int) *OrderUpdateOne
AddNoteIDs adds the "notes" edge to the Note entity by IDs.
func (*OrderUpdateOne) AddNotes ¶
func (ouo *OrderUpdateOne) AddNotes(n ...*Note) *OrderUpdateOne
AddNotes adds the "notes" edges to the Note entity.
func (*OrderUpdateOne) ClearAddress ¶
func (ouo *OrderUpdateOne) ClearAddress() *OrderUpdateOne
ClearAddress clears the "address" edge to the BillingAddress entity.
func (*OrderUpdateOne) ClearCustomer ¶
func (ouo *OrderUpdateOne) ClearCustomer() *OrderUpdateOne
ClearCustomer clears the "customer" edge to the Customer entity.
func (*OrderUpdateOne) ClearNotes ¶
func (ouo *OrderUpdateOne) ClearNotes() *OrderUpdateOne
ClearNotes clears all "notes" edges to the Note entity.
func (*OrderUpdateOne) Exec ¶
func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderUpdateOne) ExecX ¶
func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdateOne) Mutation ¶
func (ouo *OrderUpdateOne) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdateOne) RemoveNoteIDs ¶
func (ouo *OrderUpdateOne) RemoveNoteIDs(ids ...int) *OrderUpdateOne
RemoveNoteIDs removes the "notes" edge to Note entities by IDs.
func (*OrderUpdateOne) RemoveNotes ¶
func (ouo *OrderUpdateOne) RemoveNotes(n ...*Note) *OrderUpdateOne
RemoveNotes removes "notes" edges to Note entities.
func (*OrderUpdateOne) Save ¶
func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
Save executes the query and returns the updated Order entity.
func (*OrderUpdateOne) SaveX ¶
func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdateOne) Select ¶
func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderUpdateOne) SetAddress ¶
func (ouo *OrderUpdateOne) SetAddress(b *BillingAddress) *OrderUpdateOne
SetAddress sets the "address" edge to the BillingAddress entity.
func (*OrderUpdateOne) SetAddressID ¶
func (ouo *OrderUpdateOne) SetAddressID(id int) *OrderUpdateOne
SetAddressID sets the "address" edge to the BillingAddress entity by ID.
func (*OrderUpdateOne) SetCustomer ¶
func (ouo *OrderUpdateOne) SetCustomer(c *Customer) *OrderUpdateOne
SetCustomer sets the "customer" edge to the Customer entity.
func (*OrderUpdateOne) SetCustomerID ¶
func (ouo *OrderUpdateOne) SetCustomerID(id int) *OrderUpdateOne
SetCustomerID sets the "customer" edge to the Customer entity by ID.
func (*OrderUpdateOne) SetNillableAddressID ¶
func (ouo *OrderUpdateOne) SetNillableAddressID(id *int) *OrderUpdateOne
SetNillableAddressID sets the "address" edge to the BillingAddress entity by ID if the given value is not nil.
func (*OrderUpdateOne) SetNillableCustomerID ¶
func (ouo *OrderUpdateOne) SetNillableCustomerID(id *int) *OrderUpdateOne
SetNillableCustomerID sets the "customer" edge to the Customer entity by ID if the given value is not nil.
func (*OrderUpdateOne) SetNillableStatus ¶
func (ouo *OrderUpdateOne) SetNillableStatus(s *string) *OrderUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderUpdateOne) SetStatus ¶
func (ouo *OrderUpdateOne) SetStatus(s string) *OrderUpdateOne
SetStatus sets the "status" field.
func (*OrderUpdateOne) SetUpdatedAt ¶
func (ouo *OrderUpdateOne) SetUpdatedAt(t time.Time) *OrderUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OrderUpdateOne) Where ¶
func (ouo *OrderUpdateOne) Where(ps ...predicate.Order) *OrderUpdateOne
Where appends a list predicates to the OrderUpdate builder.
type Position ¶
type Position struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
Position is the model entity for the Position schema.
func (*Position) Unwrap ¶
Unwrap unwraps the Position 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 (*Position) Update ¶
func (po *Position) Update() *PositionUpdateOne
Update returns a builder for updating this Position. Note that you need to call Position.Unwrap() before calling this method if this Position was returned from a transaction, and the transaction was committed or rolled back.
type PositionClient ¶
type PositionClient struct {
// contains filtered or unexported fields
}
PositionClient is a client for the Position schema.
func NewPositionClient ¶
func NewPositionClient(c config) *PositionClient
NewPositionClient returns a client for the Position from the given config.
func (*PositionClient) Create ¶
func (c *PositionClient) Create() *PositionCreate
Create returns a builder for creating a Position entity.
func (*PositionClient) CreateBulk ¶
func (c *PositionClient) CreateBulk(builders ...*PositionCreate) *PositionCreateBulk
CreateBulk returns a builder for creating a bulk of Position entities.
func (*PositionClient) Delete ¶
func (c *PositionClient) Delete() *PositionDelete
Delete returns a delete builder for Position.
func (*PositionClient) DeleteOne ¶
func (c *PositionClient) DeleteOne(po *Position) *PositionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PositionClient) DeleteOneID ¶
func (c *PositionClient) DeleteOneID(id int) *PositionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PositionClient) GetX ¶
func (c *PositionClient) GetX(ctx context.Context, id int) *Position
GetX is like Get, but panics if an error occurs.
func (*PositionClient) Hooks ¶
func (c *PositionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PositionClient) Intercept ¶
func (c *PositionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `position.Intercept(f(g(h())))`.
func (*PositionClient) Interceptors ¶
func (c *PositionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PositionClient) MapCreateBulk ¶
func (c *PositionClient) MapCreateBulk(slice any, setFunc func(*PositionCreate, int)) *PositionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PositionClient) Query ¶
func (c *PositionClient) Query() *PositionQuery
Query returns a query builder for Position.
func (*PositionClient) Update ¶
func (c *PositionClient) Update() *PositionUpdate
Update returns an update builder for Position.
func (*PositionClient) UpdateOne ¶
func (c *PositionClient) UpdateOne(po *Position) *PositionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PositionClient) UpdateOneID ¶
func (c *PositionClient) UpdateOneID(id int) *PositionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PositionClient) Use ¶
func (c *PositionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `position.Hooks(f(g(h())))`.
type PositionCreate ¶
type PositionCreate struct {
// contains filtered or unexported fields
}
PositionCreate is the builder for creating a Position entity.
func (*PositionCreate) Exec ¶
func (pc *PositionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PositionCreate) ExecX ¶
func (pc *PositionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PositionCreate) Mutation ¶
func (pc *PositionCreate) Mutation() *PositionMutation
Mutation returns the PositionMutation object of the builder.
type PositionCreateBulk ¶
type PositionCreateBulk struct {
// contains filtered or unexported fields
}
PositionCreateBulk is the builder for creating many Position entities in bulk.
func (*PositionCreateBulk) Exec ¶
func (pcb *PositionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PositionCreateBulk) ExecX ¶
func (pcb *PositionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PositionDelete ¶
type PositionDelete struct {
// contains filtered or unexported fields
}
PositionDelete is the builder for deleting a Position entity.
func (*PositionDelete) Exec ¶
func (pd *PositionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PositionDelete) ExecX ¶
func (pd *PositionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PositionDelete) Where ¶
func (pd *PositionDelete) Where(ps ...predicate.Position) *PositionDelete
Where appends a list predicates to the PositionDelete builder.
type PositionDeleteOne ¶
type PositionDeleteOne struct {
// contains filtered or unexported fields
}
PositionDeleteOne is the builder for deleting a single Position entity.
func (*PositionDeleteOne) Exec ¶
func (pdo *PositionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PositionDeleteOne) ExecX ¶
func (pdo *PositionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PositionDeleteOne) Where ¶
func (pdo *PositionDeleteOne) Where(ps ...predicate.Position) *PositionDeleteOne
Where appends a list predicates to the PositionDelete builder.
type PositionGroupBy ¶
type PositionGroupBy struct {
// contains filtered or unexported fields
}
PositionGroupBy is the group-by builder for Position entities.
func (*PositionGroupBy) Aggregate ¶
func (pgb *PositionGroupBy) Aggregate(fns ...AggregateFunc) *PositionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PositionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Scan ¶
func (pgb *PositionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PositionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PositionMutation ¶
type PositionMutation struct {
// contains filtered or unexported fields
}
PositionMutation represents an operation that mutates the Position nodes in the graph.
func (*PositionMutation) AddField ¶
func (m *PositionMutation) 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 (*PositionMutation) AddedEdges ¶
func (m *PositionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PositionMutation) AddedField ¶
func (m *PositionMutation) 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 (*PositionMutation) AddedFields ¶
func (m *PositionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PositionMutation) AddedIDs ¶
func (m *PositionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PositionMutation) ClearEdge ¶
func (m *PositionMutation) 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 (*PositionMutation) ClearField ¶
func (m *PositionMutation) 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 (*PositionMutation) ClearedEdges ¶
func (m *PositionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PositionMutation) ClearedFields ¶
func (m *PositionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PositionMutation) Client ¶
func (m PositionMutation) 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 (*PositionMutation) EdgeCleared ¶
func (m *PositionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PositionMutation) Field ¶
func (m *PositionMutation) 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 (*PositionMutation) FieldCleared ¶
func (m *PositionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PositionMutation) Fields ¶
func (m *PositionMutation) 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 (*PositionMutation) ID ¶
func (m *PositionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PositionMutation) IDs ¶
func (m *PositionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PositionMutation) 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 (*PositionMutation) RemovedEdges ¶
func (m *PositionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PositionMutation) RemovedIDs ¶
func (m *PositionMutation) 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 (*PositionMutation) ResetEdge ¶
func (m *PositionMutation) 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 (*PositionMutation) ResetField ¶
func (m *PositionMutation) 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 (*PositionMutation) SetField ¶
func (m *PositionMutation) 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 (*PositionMutation) SetOp ¶
func (m *PositionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (PositionMutation) Tx ¶
func (m PositionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PositionMutation) Type ¶
func (m *PositionMutation) Type() string
Type returns the node type of this mutation (Position).
func (*PositionMutation) Where ¶
func (m *PositionMutation) Where(ps ...predicate.Position)
Where appends a list predicates to the PositionMutation builder.
func (*PositionMutation) WhereP ¶
func (m *PositionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PositionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PositionQuery ¶
type PositionQuery struct {
// contains filtered or unexported fields
}
PositionQuery is the builder for querying Position entities.
func (*PositionQuery) Aggregate ¶
func (pq *PositionQuery) Aggregate(fns ...AggregateFunc) *PositionSelect
Aggregate returns a PositionSelect configured with the given aggregations.
func (*PositionQuery) All ¶
func (pq *PositionQuery) All(ctx context.Context) ([]*Position, error)
All executes the query and returns a list of Positions.
func (*PositionQuery) AllX ¶
func (pq *PositionQuery) AllX(ctx context.Context) []*Position
AllX is like All, but panics if an error occurs.
func (*PositionQuery) Clone ¶
func (pq *PositionQuery) Clone() *PositionQuery
Clone returns a duplicate of the PositionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PositionQuery) Count ¶
func (pq *PositionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PositionQuery) CountX ¶
func (pq *PositionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PositionQuery) Exist ¶
func (pq *PositionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PositionQuery) ExistX ¶
func (pq *PositionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PositionQuery) First ¶
func (pq *PositionQuery) First(ctx context.Context) (*Position, error)
First returns the first Position entity from the query. Returns a *NotFoundError when no Position was found.
func (*PositionQuery) FirstID ¶
func (pq *PositionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Position ID from the query. Returns a *NotFoundError when no Position ID was found.
func (*PositionQuery) FirstIDX ¶
func (pq *PositionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PositionQuery) FirstX ¶
func (pq *PositionQuery) FirstX(ctx context.Context) *Position
FirstX is like First, but panics if an error occurs.
func (*PositionQuery) GroupBy ¶
func (pq *PositionQuery) GroupBy(field string, fields ...string) *PositionGroupBy
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.
func (*PositionQuery) IDs ¶
func (pq *PositionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Position IDs.
func (*PositionQuery) IDsX ¶
func (pq *PositionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PositionQuery) Limit ¶
func (pq *PositionQuery) Limit(limit int) *PositionQuery
Limit the number of records to be returned by this query.
func (*PositionQuery) Offset ¶
func (pq *PositionQuery) Offset(offset int) *PositionQuery
Offset to start from.
func (*PositionQuery) Only ¶
func (pq *PositionQuery) Only(ctx context.Context) (*Position, error)
Only returns a single Position entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Position entity is found. Returns a *NotFoundError when no Position entities are found.
func (*PositionQuery) OnlyID ¶
func (pq *PositionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Position ID in the query. Returns a *NotSingularError when more than one Position ID is found. Returns a *NotFoundError when no entities are found.
func (*PositionQuery) OnlyIDX ¶
func (pq *PositionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PositionQuery) OnlyX ¶
func (pq *PositionQuery) OnlyX(ctx context.Context) *Position
OnlyX is like Only, but panics if an error occurs.
func (*PositionQuery) Order ¶
func (pq *PositionQuery) Order(o ...position.OrderOption) *PositionQuery
Order specifies how the records should be ordered.
func (*PositionQuery) Select ¶
func (pq *PositionQuery) Select(fields ...string) *PositionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*PositionQuery) Unique ¶
func (pq *PositionQuery) Unique(unique bool) *PositionQuery
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 (*PositionQuery) Where ¶
func (pq *PositionQuery) Where(ps ...predicate.Position) *PositionQuery
Where adds a new predicate for the PositionQuery builder.
type PositionSelect ¶
type PositionSelect struct { *PositionQuery // contains filtered or unexported fields }
PositionSelect is the builder for selecting fields of Position entities.
func (*PositionSelect) Aggregate ¶
func (ps *PositionSelect) Aggregate(fns ...AggregateFunc) *PositionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PositionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PositionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PositionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PositionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PositionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PositionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PositionSelect) Scan ¶
func (ps *PositionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PositionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PositionUpdate ¶
type PositionUpdate struct {
// contains filtered or unexported fields
}
PositionUpdate is the builder for updating Position entities.
func (*PositionUpdate) Exec ¶
func (pu *PositionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PositionUpdate) ExecX ¶
func (pu *PositionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PositionUpdate) Mutation ¶
func (pu *PositionUpdate) Mutation() *PositionMutation
Mutation returns the PositionMutation object of the builder.
func (*PositionUpdate) Save ¶
func (pu *PositionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PositionUpdate) SaveX ¶
func (pu *PositionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PositionUpdate) Where ¶
func (pu *PositionUpdate) Where(ps ...predicate.Position) *PositionUpdate
Where appends a list predicates to the PositionUpdate builder.
type PositionUpdateOne ¶
type PositionUpdateOne struct {
// contains filtered or unexported fields
}
PositionUpdateOne is the builder for updating a single Position entity.
func (*PositionUpdateOne) Exec ¶
func (puo *PositionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PositionUpdateOne) ExecX ¶
func (puo *PositionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PositionUpdateOne) Mutation ¶
func (puo *PositionUpdateOne) Mutation() *PositionMutation
Mutation returns the PositionMutation object of the builder.
func (*PositionUpdateOne) Save ¶
func (puo *PositionUpdateOne) Save(ctx context.Context) (*Position, error)
Save executes the query and returns the updated Position entity.
func (*PositionUpdateOne) SaveX ¶
func (puo *PositionUpdateOne) SaveX(ctx context.Context) *Position
SaveX is like Save, but panics if an error occurs.
func (*PositionUpdateOne) Select ¶
func (puo *PositionUpdateOne) Select(field string, fields ...string) *PositionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PositionUpdateOne) Where ¶
func (puo *PositionUpdateOne) Where(ps ...predicate.Position) *PositionUpdateOne
Where appends a list predicates to the PositionUpdate builder.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type Role ¶
type Role struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
Role is the model entity for the Role schema.
func (*Role) Unwrap ¶
Unwrap unwraps the Role 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 (*Role) Update ¶
func (r *Role) Update() *RoleUpdateOne
Update returns a builder for updating this Role. Note that you need to call Role.Unwrap() before calling this method if this Role was returned from a transaction, and the transaction was committed or rolled back.
type RoleClient ¶
type RoleClient struct {
// contains filtered or unexported fields
}
RoleClient is a client for the Role schema.
func NewRoleClient ¶
func NewRoleClient(c config) *RoleClient
NewRoleClient returns a client for the Role from the given config.
func (*RoleClient) Create ¶
func (c *RoleClient) Create() *RoleCreate
Create returns a builder for creating a Role entity.
func (*RoleClient) CreateBulk ¶
func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk
CreateBulk returns a builder for creating a bulk of Role entities.
func (*RoleClient) Delete ¶
func (c *RoleClient) Delete() *RoleDelete
Delete returns a delete builder for Role.
func (*RoleClient) DeleteOne ¶
func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RoleClient) DeleteOneID ¶
func (c *RoleClient) DeleteOneID(id int) *RoleDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RoleClient) GetX ¶
func (c *RoleClient) GetX(ctx context.Context, id int) *Role
GetX is like Get, but panics if an error occurs.
func (*RoleClient) Intercept ¶
func (c *RoleClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `role.Intercept(f(g(h())))`.
func (*RoleClient) Interceptors ¶
func (c *RoleClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RoleClient) MapCreateBulk ¶
func (c *RoleClient) MapCreateBulk(slice any, setFunc func(*RoleCreate, int)) *RoleCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*RoleClient) Query ¶
func (c *RoleClient) Query() *RoleQuery
Query returns a query builder for Role.
func (*RoleClient) Update ¶
func (c *RoleClient) Update() *RoleUpdate
Update returns an update builder for Role.
func (*RoleClient) UpdateOne ¶
func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RoleClient) UpdateOneID ¶
func (c *RoleClient) UpdateOneID(id int) *RoleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RoleClient) Use ¶
func (c *RoleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `role.Hooks(f(g(h())))`.
type RoleCreate ¶
type RoleCreate struct {
// contains filtered or unexported fields
}
RoleCreate is the builder for creating a Role entity.
func (*RoleCreate) Exec ¶
func (rc *RoleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleCreate) ExecX ¶
func (rc *RoleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleCreate) Mutation ¶
func (rc *RoleCreate) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
type RoleCreateBulk ¶
type RoleCreateBulk struct {
// contains filtered or unexported fields
}
RoleCreateBulk is the builder for creating many Role entities in bulk.
func (*RoleCreateBulk) Exec ¶
func (rcb *RoleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleCreateBulk) ExecX ¶
func (rcb *RoleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RoleDelete ¶
type RoleDelete struct {
// contains filtered or unexported fields
}
RoleDelete is the builder for deleting a Role entity.
func (*RoleDelete) Exec ¶
func (rd *RoleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RoleDelete) ExecX ¶
func (rd *RoleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RoleDelete) Where ¶
func (rd *RoleDelete) Where(ps ...predicate.Role) *RoleDelete
Where appends a list predicates to the RoleDelete builder.
type RoleDeleteOne ¶
type RoleDeleteOne struct {
// contains filtered or unexported fields
}
RoleDeleteOne is the builder for deleting a single Role entity.
func (*RoleDeleteOne) Exec ¶
func (rdo *RoleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RoleDeleteOne) ExecX ¶
func (rdo *RoleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleDeleteOne) Where ¶
func (rdo *RoleDeleteOne) Where(ps ...predicate.Role) *RoleDeleteOne
Where appends a list predicates to the RoleDelete builder.
type RoleGroupBy ¶
type RoleGroupBy struct {
// contains filtered or unexported fields
}
RoleGroupBy is the group-by builder for Role entities.
func (*RoleGroupBy) Aggregate ¶
func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RoleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Scan ¶
func (rgb *RoleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RoleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoleMutation ¶
type RoleMutation struct {
// contains filtered or unexported fields
}
RoleMutation represents an operation that mutates the Role nodes in the graph.
func (*RoleMutation) AddField ¶
func (m *RoleMutation) 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 (*RoleMutation) AddedEdges ¶
func (m *RoleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RoleMutation) AddedField ¶
func (m *RoleMutation) 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 (*RoleMutation) AddedFields ¶
func (m *RoleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RoleMutation) AddedIDs ¶
func (m *RoleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RoleMutation) ClearEdge ¶
func (m *RoleMutation) 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 (*RoleMutation) ClearField ¶
func (m *RoleMutation) 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 (*RoleMutation) ClearedEdges ¶
func (m *RoleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RoleMutation) ClearedFields ¶
func (m *RoleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RoleMutation) Client ¶
func (m RoleMutation) 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 (*RoleMutation) EdgeCleared ¶
func (m *RoleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RoleMutation) Field ¶
func (m *RoleMutation) 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 (*RoleMutation) FieldCleared ¶
func (m *RoleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RoleMutation) Fields ¶
func (m *RoleMutation) 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 (*RoleMutation) ID ¶
func (m *RoleMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RoleMutation) IDs ¶
func (m *RoleMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RoleMutation) 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 (*RoleMutation) RemovedEdges ¶
func (m *RoleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RoleMutation) RemovedIDs ¶
func (m *RoleMutation) 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 (*RoleMutation) ResetEdge ¶
func (m *RoleMutation) 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 (*RoleMutation) ResetField ¶
func (m *RoleMutation) 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 (*RoleMutation) SetField ¶
func (m *RoleMutation) 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 (*RoleMutation) SetOp ¶
func (m *RoleMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (RoleMutation) Tx ¶
func (m RoleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RoleMutation) Type ¶
func (m *RoleMutation) Type() string
Type returns the node type of this mutation (Role).
func (*RoleMutation) Where ¶
func (m *RoleMutation) Where(ps ...predicate.Role)
Where appends a list predicates to the RoleMutation builder.
func (*RoleMutation) WhereP ¶
func (m *RoleMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RoleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RoleQuery ¶
type RoleQuery struct {
// contains filtered or unexported fields
}
RoleQuery is the builder for querying Role entities.
func (*RoleQuery) Aggregate ¶
func (rq *RoleQuery) Aggregate(fns ...AggregateFunc) *RoleSelect
Aggregate returns a RoleSelect configured with the given aggregations.
func (*RoleQuery) Clone ¶
Clone returns a duplicate of the RoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RoleQuery) First ¶
First returns the first Role entity from the query. Returns a *NotFoundError when no Role was found.
func (*RoleQuery) FirstID ¶
FirstID returns the first Role ID from the query. Returns a *NotFoundError when no Role ID was found.
func (*RoleQuery) GroupBy ¶
func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy
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.
func (*RoleQuery) Only ¶
Only returns a single Role entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Role entity is found. Returns a *NotFoundError when no Role entities are found.
func (*RoleQuery) OnlyID ¶
OnlyID is like Only, but returns the only Role ID in the query. Returns a *NotSingularError when more than one Role ID is found. Returns a *NotFoundError when no entities are found.
func (*RoleQuery) Order ¶
func (rq *RoleQuery) Order(o ...role.OrderOption) *RoleQuery
Order specifies how the records should be ordered.
func (*RoleQuery) Select ¶
func (rq *RoleQuery) Select(fields ...string) *RoleSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
type RoleSelect ¶
type RoleSelect struct { *RoleQuery // contains filtered or unexported fields }
RoleSelect is the builder for selecting fields of Role entities.
func (*RoleSelect) Aggregate ¶
func (rs *RoleSelect) Aggregate(fns ...AggregateFunc) *RoleSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RoleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Scan ¶
func (rs *RoleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RoleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoleUpdate ¶
type RoleUpdate struct {
// contains filtered or unexported fields
}
RoleUpdate is the builder for updating Role entities.
func (*RoleUpdate) Exec ¶
func (ru *RoleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUpdate) ExecX ¶
func (ru *RoleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdate) Mutation ¶
func (ru *RoleUpdate) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdate) Save ¶
func (ru *RoleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RoleUpdate) SaveX ¶
func (ru *RoleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RoleUpdate) Where ¶
func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate
Where appends a list predicates to the RoleUpdate builder.
type RoleUpdateOne ¶
type RoleUpdateOne struct {
// contains filtered or unexported fields
}
RoleUpdateOne is the builder for updating a single Role entity.
func (*RoleUpdateOne) Exec ¶
func (ruo *RoleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RoleUpdateOne) ExecX ¶
func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdateOne) Mutation ¶
func (ruo *RoleUpdateOne) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdateOne) Save ¶
func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)
Save executes the query and returns the updated Role entity.
func (*RoleUpdateOne) SaveX ¶
func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role
SaveX is like Save, but panics if an error occurs.
func (*RoleUpdateOne) Select ¶
func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RoleUpdateOne) Where ¶
func (ruo *RoleUpdateOne) Where(ps ...predicate.Role) *RoleUpdateOne
Where appends a list predicates to the RoleUpdate builder.
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 Tel ¶
type Tel struct { // ID of the ent. ID int `json:"id,omitempty"` // Tel holds the value of the "tel" field. Tel string `json:"tel,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"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TelQuery when eager-loading is set. Edges TelEdges `json:"edges"` // contains filtered or unexported fields }
Tel is the model entity for the Tel schema.
func (*Tel) QueryCustomer ¶
func (t *Tel) QueryCustomer() *CustomerQuery
QueryCustomer queries the "customer" edge of the Tel entity.
func (*Tel) Unwrap ¶
Unwrap unwraps the Tel 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 (*Tel) Update ¶
func (t *Tel) Update() *TelUpdateOne
Update returns a builder for updating this Tel. Note that you need to call Tel.Unwrap() before calling this method if this Tel was returned from a transaction, and the transaction was committed or rolled back.
type TelClient ¶
type TelClient struct {
// contains filtered or unexported fields
}
TelClient is a client for the Tel schema.
func NewTelClient ¶
func NewTelClient(c config) *TelClient
NewTelClient returns a client for the Tel from the given config.
func (*TelClient) CreateBulk ¶
func (c *TelClient) CreateBulk(builders ...*TelCreate) *TelCreateBulk
CreateBulk returns a builder for creating a bulk of Tel entities.
func (*TelClient) DeleteOne ¶
func (c *TelClient) DeleteOne(t *Tel) *TelDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TelClient) DeleteOneID ¶
func (c *TelClient) DeleteOneID(id int) *TelDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TelClient) Intercept ¶
func (c *TelClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tel.Intercept(f(g(h())))`.
func (*TelClient) Interceptors ¶
func (c *TelClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TelClient) MapCreateBulk ¶
func (c *TelClient) MapCreateBulk(slice any, setFunc func(*TelCreate, int)) *TelCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TelClient) QueryCustomer ¶
func (c *TelClient) QueryCustomer(t *Tel) *CustomerQuery
QueryCustomer queries the customer edge of a Tel.
func (*TelClient) UpdateOne ¶
func (c *TelClient) UpdateOne(t *Tel) *TelUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TelClient) UpdateOneID ¶
func (c *TelClient) UpdateOneID(id int) *TelUpdateOne
UpdateOneID returns an update builder for the given id.
type TelCreate ¶
type TelCreate struct {
// contains filtered or unexported fields
}
TelCreate is the builder for creating a Tel entity.
func (*TelCreate) AddCustomer ¶
AddCustomer adds the "customer" edges to the Customer entity.
func (*TelCreate) AddCustomerIDs ¶
AddCustomerIDs adds the "customer" edge to the Customer entity by IDs.
func (*TelCreate) Mutation ¶
func (tc *TelCreate) Mutation() *TelMutation
Mutation returns the TelMutation object of the builder.
func (*TelCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*TelCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TelCreate) SetNillableNoteID ¶
SetNillableNoteID sets the "note" edge to the Note entity by ID if the given value is not nil.
func (*TelCreate) SetNillableUpdatedAt ¶
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
type TelCreateBulk ¶
type TelCreateBulk struct {
// contains filtered or unexported fields
}
TelCreateBulk is the builder for creating many Tel entities in bulk.
func (*TelCreateBulk) Exec ¶
func (tcb *TelCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TelCreateBulk) ExecX ¶
func (tcb *TelCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TelDelete ¶
type TelDelete struct {
// contains filtered or unexported fields
}
TelDelete is the builder for deleting a Tel entity.
func (*TelDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type TelDeleteOne ¶
type TelDeleteOne struct {
// contains filtered or unexported fields
}
TelDeleteOne is the builder for deleting a single Tel entity.
func (*TelDeleteOne) Exec ¶
func (tdo *TelDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TelDeleteOne) ExecX ¶
func (tdo *TelDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TelDeleteOne) Where ¶
func (tdo *TelDeleteOne) Where(ps ...predicate.Tel) *TelDeleteOne
Where appends a list predicates to the TelDelete builder.
type TelEdges ¶
type TelEdges struct { // Note holds the value of the note edge. Note *Note `json:"note,omitempty"` // Customer holds the value of the customer edge. Customer []*Customer `json:"customer,omitempty"` // contains filtered or unexported fields }
TelEdges holds the relations/edges for other nodes in the graph.
func (TelEdges) CustomerOrErr ¶
CustomerOrErr returns the Customer value or an error if the edge was not loaded in eager-loading.
type TelGroupBy ¶
type TelGroupBy struct {
// contains filtered or unexported fields
}
TelGroupBy is the group-by builder for Tel entities.
func (*TelGroupBy) Aggregate ¶
func (tgb *TelGroupBy) Aggregate(fns ...AggregateFunc) *TelGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TelGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TelGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TelGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TelGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TelGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TelGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TelGroupBy) Scan ¶
func (tgb *TelGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TelGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TelMutation ¶
type TelMutation struct {
// contains filtered or unexported fields
}
TelMutation represents an operation that mutates the Tel nodes in the graph.
func (*TelMutation) AddCustomerIDs ¶
func (m *TelMutation) AddCustomerIDs(ids ...int)
AddCustomerIDs adds the "customer" edge to the Customer entity by ids.
func (*TelMutation) AddField ¶
func (m *TelMutation) 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 (*TelMutation) AddedEdges ¶
func (m *TelMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TelMutation) AddedField ¶
func (m *TelMutation) 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 (*TelMutation) AddedFields ¶
func (m *TelMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TelMutation) AddedIDs ¶
func (m *TelMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TelMutation) ClearCustomer ¶
func (m *TelMutation) ClearCustomer()
ClearCustomer clears the "customer" edge to the Customer entity.
func (*TelMutation) ClearEdge ¶
func (m *TelMutation) 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 (*TelMutation) ClearField ¶
func (m *TelMutation) 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 (*TelMutation) ClearNote ¶
func (m *TelMutation) ClearNote()
ClearNote clears the "note" edge to the Note entity.
func (*TelMutation) ClearedEdges ¶
func (m *TelMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TelMutation) ClearedFields ¶
func (m *TelMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TelMutation) Client ¶
func (m TelMutation) 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 (*TelMutation) CreatedAt ¶
func (m *TelMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TelMutation) CustomerCleared ¶
func (m *TelMutation) CustomerCleared() bool
CustomerCleared reports if the "customer" edge to the Customer entity was cleared.
func (*TelMutation) CustomerIDs ¶
func (m *TelMutation) CustomerIDs() (ids []int)
CustomerIDs returns the "customer" edge IDs in the mutation.
func (*TelMutation) EdgeCleared ¶
func (m *TelMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TelMutation) Field ¶
func (m *TelMutation) 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 (*TelMutation) FieldCleared ¶
func (m *TelMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TelMutation) Fields ¶
func (m *TelMutation) 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 (*TelMutation) ID ¶
func (m *TelMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TelMutation) IDs ¶
func (m *TelMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TelMutation) NoteCleared ¶
func (m *TelMutation) NoteCleared() bool
NoteCleared reports if the "note" edge to the Note entity was cleared.
func (*TelMutation) NoteID ¶
func (m *TelMutation) NoteID() (id int, exists bool)
NoteID returns the "note" edge ID in the mutation.
func (*TelMutation) NoteIDs ¶
func (m *TelMutation) NoteIDs() (ids []int)
NoteIDs returns the "note" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NoteID instead. It exists only for internal usage by the builders.
func (*TelMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Tel entity. If the Tel 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 (*TelMutation) 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 (*TelMutation) OldTel ¶
func (m *TelMutation) OldTel(ctx context.Context) (v string, err error)
OldTel returns the old "tel" field's value of the Tel entity. If the Tel 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 (*TelMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Tel entity. If the Tel 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 (*TelMutation) RemoveCustomerIDs ¶
func (m *TelMutation) RemoveCustomerIDs(ids ...int)
RemoveCustomerIDs removes the "customer" edge to the Customer entity by IDs.
func (*TelMutation) RemovedCustomerIDs ¶
func (m *TelMutation) RemovedCustomerIDs() (ids []int)
RemovedCustomer returns the removed IDs of the "customer" edge to the Customer entity.
func (*TelMutation) RemovedEdges ¶
func (m *TelMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TelMutation) RemovedIDs ¶
func (m *TelMutation) 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 (*TelMutation) ResetCreatedAt ¶
func (m *TelMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TelMutation) ResetCustomer ¶
func (m *TelMutation) ResetCustomer()
ResetCustomer resets all changes to the "customer" edge.
func (*TelMutation) ResetEdge ¶
func (m *TelMutation) 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 (*TelMutation) ResetField ¶
func (m *TelMutation) 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 (*TelMutation) ResetNote ¶
func (m *TelMutation) ResetNote()
ResetNote resets all changes to the "note" edge.
func (*TelMutation) ResetTel ¶
func (m *TelMutation) ResetTel()
ResetTel resets all changes to the "tel" field.
func (*TelMutation) ResetUpdatedAt ¶
func (m *TelMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*TelMutation) SetCreatedAt ¶
func (m *TelMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TelMutation) SetField ¶
func (m *TelMutation) 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 (*TelMutation) SetNoteID ¶
func (m *TelMutation) SetNoteID(id int)
SetNoteID sets the "note" edge to the Note entity by id.
func (*TelMutation) SetOp ¶
func (m *TelMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TelMutation) SetUpdatedAt ¶
func (m *TelMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*TelMutation) Tel ¶
func (m *TelMutation) Tel() (r string, exists bool)
Tel returns the value of the "tel" field in the mutation.
func (TelMutation) Tx ¶
func (m TelMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TelMutation) Type ¶
func (m *TelMutation) Type() string
Type returns the node type of this mutation (Tel).
func (*TelMutation) UpdatedAt ¶
func (m *TelMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*TelMutation) Where ¶
func (m *TelMutation) Where(ps ...predicate.Tel)
Where appends a list predicates to the TelMutation builder.
func (*TelMutation) WhereP ¶
func (m *TelMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TelMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TelQuery ¶
type TelQuery struct {
// contains filtered or unexported fields
}
TelQuery is the builder for querying Tel entities.
func (*TelQuery) Aggregate ¶
func (tq *TelQuery) Aggregate(fns ...AggregateFunc) *TelSelect
Aggregate returns a TelSelect configured with the given aggregations.
func (*TelQuery) Clone ¶
Clone returns a duplicate of the TelQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TelQuery) First ¶
First returns the first Tel entity from the query. Returns a *NotFoundError when no Tel was found.
func (*TelQuery) FirstID ¶
FirstID returns the first Tel ID from the query. Returns a *NotFoundError when no Tel ID was found.
func (*TelQuery) GroupBy ¶
func (tq *TelQuery) GroupBy(field string, fields ...string) *TelGroupBy
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 { Tel string `json:"tel,omitempty"` Count int `json:"count,omitempty"` } client.Tel.Query(). GroupBy(tel.FieldTel). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TelQuery) Only ¶
Only returns a single Tel entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tel entity is found. Returns a *NotFoundError when no Tel entities are found.
func (*TelQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tel ID in the query. Returns a *NotSingularError when more than one Tel ID is found. Returns a *NotFoundError when no entities are found.
func (*TelQuery) Order ¶
func (tq *TelQuery) Order(o ...tel.OrderOption) *TelQuery
Order specifies how the records should be ordered.
func (*TelQuery) QueryCustomer ¶
func (tq *TelQuery) QueryCustomer() *CustomerQuery
QueryCustomer chains the current query on the "customer" edge.
func (*TelQuery) Select ¶
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 { Tel string `json:"tel,omitempty"` } client.Tel.Query(). Select(tel.FieldTel). Scan(ctx, &v)
func (*TelQuery) 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 (*TelQuery) WithCustomer ¶
func (tq *TelQuery) WithCustomer(opts ...func(*CustomerQuery)) *TelQuery
WithCustomer tells the query-builder to eager-load the nodes that are connected to the "customer" edge. The optional arguments are used to configure the query builder of the edge.
type TelSelect ¶
type TelSelect struct { *TelQuery // contains filtered or unexported fields }
TelSelect is the builder for selecting fields of Tel entities.
func (*TelSelect) Aggregate ¶
func (ts *TelSelect) Aggregate(fns ...AggregateFunc) *TelSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TelSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TelSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TelSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TelSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TelSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TelSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TelSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TelUpdate ¶
type TelUpdate struct {
// contains filtered or unexported fields
}
TelUpdate is the builder for updating Tel entities.
func (*TelUpdate) AddCustomer ¶
AddCustomer adds the "customer" edges to the Customer entity.
func (*TelUpdate) AddCustomerIDs ¶
AddCustomerIDs adds the "customer" edge to the Customer entity by IDs.
func (*TelUpdate) ClearCustomer ¶
ClearCustomer clears all "customer" edges to the Customer entity.
func (*TelUpdate) Mutation ¶
func (tu *TelUpdate) Mutation() *TelMutation
Mutation returns the TelMutation object of the builder.
func (*TelUpdate) RemoveCustomer ¶
RemoveCustomer removes "customer" edges to Customer entities.
func (*TelUpdate) RemoveCustomerIDs ¶
RemoveCustomerIDs removes the "customer" edge to Customer entities by IDs.
func (*TelUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*TelUpdate) SetNillableNoteID ¶
SetNillableNoteID sets the "note" edge to the Note entity by ID if the given value is not nil.
func (*TelUpdate) SetNillableTel ¶
SetNillableTel sets the "tel" field if the given value is not nil.
func (*TelUpdate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
type TelUpdateOne ¶
type TelUpdateOne struct {
// contains filtered or unexported fields
}
TelUpdateOne is the builder for updating a single Tel entity.
func (*TelUpdateOne) AddCustomer ¶
func (tuo *TelUpdateOne) AddCustomer(c ...*Customer) *TelUpdateOne
AddCustomer adds the "customer" edges to the Customer entity.
func (*TelUpdateOne) AddCustomerIDs ¶
func (tuo *TelUpdateOne) AddCustomerIDs(ids ...int) *TelUpdateOne
AddCustomerIDs adds the "customer" edge to the Customer entity by IDs.
func (*TelUpdateOne) ClearCustomer ¶
func (tuo *TelUpdateOne) ClearCustomer() *TelUpdateOne
ClearCustomer clears all "customer" edges to the Customer entity.
func (*TelUpdateOne) ClearNote ¶
func (tuo *TelUpdateOne) ClearNote() *TelUpdateOne
ClearNote clears the "note" edge to the Note entity.
func (*TelUpdateOne) Exec ¶
func (tuo *TelUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TelUpdateOne) ExecX ¶
func (tuo *TelUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TelUpdateOne) Mutation ¶
func (tuo *TelUpdateOne) Mutation() *TelMutation
Mutation returns the TelMutation object of the builder.
func (*TelUpdateOne) RemoveCustomer ¶
func (tuo *TelUpdateOne) RemoveCustomer(c ...*Customer) *TelUpdateOne
RemoveCustomer removes "customer" edges to Customer entities.
func (*TelUpdateOne) RemoveCustomerIDs ¶
func (tuo *TelUpdateOne) RemoveCustomerIDs(ids ...int) *TelUpdateOne
RemoveCustomerIDs removes the "customer" edge to Customer entities by IDs.
func (*TelUpdateOne) Save ¶
func (tuo *TelUpdateOne) Save(ctx context.Context) (*Tel, error)
Save executes the query and returns the updated Tel entity.
func (*TelUpdateOne) SaveX ¶
func (tuo *TelUpdateOne) SaveX(ctx context.Context) *Tel
SaveX is like Save, but panics if an error occurs.
func (*TelUpdateOne) Select ¶
func (tuo *TelUpdateOne) Select(field string, fields ...string) *TelUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TelUpdateOne) SetNillableNoteID ¶
func (tuo *TelUpdateOne) SetNillableNoteID(id *int) *TelUpdateOne
SetNillableNoteID sets the "note" edge to the Note entity by ID if the given value is not nil.
func (*TelUpdateOne) SetNillableTel ¶
func (tuo *TelUpdateOne) SetNillableTel(s *string) *TelUpdateOne
SetNillableTel sets the "tel" field if the given value is not nil.
func (*TelUpdateOne) SetNote ¶
func (tuo *TelUpdateOne) SetNote(n *Note) *TelUpdateOne
SetNote sets the "note" edge to the Note entity.
func (*TelUpdateOne) SetNoteID ¶
func (tuo *TelUpdateOne) SetNoteID(id int) *TelUpdateOne
SetNoteID sets the "note" edge to the Note entity by ID.
func (*TelUpdateOne) SetTel ¶
func (tuo *TelUpdateOne) SetTel(s string) *TelUpdateOne
SetTel sets the "tel" field.
func (*TelUpdateOne) SetUpdatedAt ¶
func (tuo *TelUpdateOne) SetUpdatedAt(t time.Time) *TelUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*TelUpdateOne) Where ¶
func (tuo *TelUpdateOne) Where(ps ...predicate.Tel) *TelUpdateOne
Where appends a list predicates to the TelUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // BillingAddress is the client for interacting with the BillingAddress builders. BillingAddress *BillingAddressClient // Customer is the client for interacting with the Customer builders. Customer *CustomerClient // DeliveryAddress is the client for interacting with the DeliveryAddress builders. DeliveryAddress *DeliveryAddressClient // Login is the client for interacting with the Login builders. Login *LoginClient // Note is the client for interacting with the Note builders. Note *NoteClient // Order is the client for interacting with the Order builders. Order *OrderClient // Position is the client for interacting with the Position builders. Position *PositionClient // Role is the client for interacting with the Role builders. Role *RoleClient // Tel is the client for interacting with the Tel builders. Tel *TelClient // 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 int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // LastLogin holds the value of the "last_login" field. LastLogin time.Time `json:"last_login,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // contains filtered or unexported fields }
User is the model entity for the User schema.
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 int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept 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) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for 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 int) *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) 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) 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) SetLastLogin ¶
func (uc *UserCreate) SetLastLogin(t time.Time) *UserCreate
SetLastLogin sets the "last_login" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" 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.
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.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
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) 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) 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) 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) 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) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" 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) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) LastLogin ¶
func (m *UserMutation) LastLogin() (r time.Time, exists bool)
LastLogin returns the value of the "last_login" field in the mutation.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" 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) 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) OldLastLogin ¶
OldLastLogin returns the old "last_login" 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) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "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) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" 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) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" 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) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
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) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" 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) ResetLastLogin ¶
func (m *UserMutation) ResetLastLogin()
ResetLastLogin resets all changes to the "last_login" field.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" 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) SetLastLogin ¶
func (m *UserMutation) SetLastLogin(t time.Time)
SetLastLogin sets the "last_login" field.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" 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) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" 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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldName). 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) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
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 { Name string `json:"name,omitempty"` } client.User.Query(). Select(user.FieldName). Scan(ctx, &v)
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) 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) 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) SetLastLogin ¶
func (uu *UserUpdate) SetLastLogin(t time.Time) *UserUpdate
SetLastLogin sets the "last_login" field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableLastLogin ¶
func (uu *UserUpdate) SetNillableLastLogin(t *time.Time) *UserUpdate
SetNillableLastLogin sets the "last_login" field if the given value is not nil.
func (*UserUpdate) SetNillableName ¶
func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetNillableUsername ¶
func (uu *UserUpdate) SetNillableUsername(s *string) *UserUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" 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) 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) 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) SetLastLogin ¶
func (uuo *UserUpdateOne) SetLastLogin(t time.Time) *UserUpdateOne
SetLastLogin sets the "last_login" field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableLastLogin ¶
func (uuo *UserUpdateOne) SetNillableLastLogin(t *time.Time) *UserUpdateOne
SetNillableLastLogin sets the "last_login" field if the given value is not nil.
func (*UserUpdateOne) SetNillableName ¶
func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUsername ¶
func (uuo *UserUpdateOne) SetNillableUsername(s *string) *UserUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
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 ¶
- billingaddress.go
- billingaddress_create.go
- billingaddress_delete.go
- billingaddress_query.go
- billingaddress_update.go
- client.go
- customer.go
- customer_create.go
- customer_delete.go
- customer_query.go
- customer_update.go
- deliveryaddress.go
- deliveryaddress_create.go
- deliveryaddress_delete.go
- deliveryaddress_query.go
- deliveryaddress_update.go
- ent.go
- generate.go
- login.go
- login_create.go
- login_delete.go
- login_query.go
- login_update.go
- mutation.go
- note.go
- note_create.go
- note_delete.go
- note_query.go
- note_update.go
- order.go
- order_create.go
- order_delete.go
- order_query.go
- order_update.go
- position.go
- position_create.go
- position_delete.go
- position_query.go
- position_update.go
- role.go
- role_create.go
- role_delete.go
- role_query.go
- role_update.go
- runtime.go
- tel.go
- tel_create.go
- tel_delete.go
- tel_query.go
- tel_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go