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 Attachment
- func (a *Attachment) GetID() uuid.UUID
- func (a *Attachment) QueryDocument() *DocumentQuery
- func (a *Attachment) QueryItem() *ItemQuery
- func (a *Attachment) String() string
- func (a *Attachment) Unwrap() *Attachment
- func (a *Attachment) Update() *AttachmentUpdateOne
- func (a *Attachment) Value(name string) (ent.Value, error)
- type AttachmentClient
- func (c *AttachmentClient) Create() *AttachmentCreate
- func (c *AttachmentClient) CreateBulk(builders ...*AttachmentCreate) *AttachmentCreateBulk
- func (c *AttachmentClient) Delete() *AttachmentDelete
- func (c *AttachmentClient) DeleteOne(a *Attachment) *AttachmentDeleteOne
- func (c *AttachmentClient) DeleteOneID(id uuid.UUID) *AttachmentDeleteOne
- func (c *AttachmentClient) Get(ctx context.Context, id uuid.UUID) (*Attachment, error)
- func (c *AttachmentClient) GetX(ctx context.Context, id uuid.UUID) *Attachment
- func (c *AttachmentClient) Hooks() []Hook
- func (c *AttachmentClient) Intercept(interceptors ...Interceptor)
- func (c *AttachmentClient) Interceptors() []Interceptor
- func (c *AttachmentClient) MapCreateBulk(slice any, setFunc func(*AttachmentCreate, int)) *AttachmentCreateBulk
- func (c *AttachmentClient) Query() *AttachmentQuery
- func (c *AttachmentClient) QueryDocument(a *Attachment) *DocumentQuery
- func (c *AttachmentClient) QueryItem(a *Attachment) *ItemQuery
- func (c *AttachmentClient) Update() *AttachmentUpdate
- func (c *AttachmentClient) UpdateOne(a *Attachment) *AttachmentUpdateOne
- func (c *AttachmentClient) UpdateOneID(id uuid.UUID) *AttachmentUpdateOne
- func (c *AttachmentClient) Use(hooks ...Hook)
- type AttachmentCreate
- func (ac *AttachmentCreate) Exec(ctx context.Context) error
- func (ac *AttachmentCreate) ExecX(ctx context.Context)
- func (ac *AttachmentCreate) Mutation() *AttachmentMutation
- func (ac *AttachmentCreate) Save(ctx context.Context) (*Attachment, error)
- func (ac *AttachmentCreate) SaveX(ctx context.Context) *Attachment
- func (ac *AttachmentCreate) SetCreatedAt(t time.Time) *AttachmentCreate
- func (ac *AttachmentCreate) SetDocument(d *Document) *AttachmentCreate
- func (ac *AttachmentCreate) SetDocumentID(id uuid.UUID) *AttachmentCreate
- func (ac *AttachmentCreate) SetID(u uuid.UUID) *AttachmentCreate
- func (ac *AttachmentCreate) SetItem(i *Item) *AttachmentCreate
- func (ac *AttachmentCreate) SetItemID(id uuid.UUID) *AttachmentCreate
- func (ac *AttachmentCreate) SetNillableCreatedAt(t *time.Time) *AttachmentCreate
- func (ac *AttachmentCreate) SetNillableID(u *uuid.UUID) *AttachmentCreate
- func (ac *AttachmentCreate) SetNillablePrimary(b *bool) *AttachmentCreate
- func (ac *AttachmentCreate) SetNillableType(a *attachment.Type) *AttachmentCreate
- func (ac *AttachmentCreate) SetNillableUpdatedAt(t *time.Time) *AttachmentCreate
- func (ac *AttachmentCreate) SetPrimary(b bool) *AttachmentCreate
- func (ac *AttachmentCreate) SetType(a attachment.Type) *AttachmentCreate
- func (ac *AttachmentCreate) SetUpdatedAt(t time.Time) *AttachmentCreate
- type AttachmentCreateBulk
- type AttachmentDelete
- type AttachmentDeleteOne
- type AttachmentEdges
- type AttachmentGroupBy
- func (agb *AttachmentGroupBy) Aggregate(fns ...AggregateFunc) *AttachmentGroupBy
- func (s *AttachmentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AttachmentGroupBy) BoolX(ctx context.Context) bool
- func (s *AttachmentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AttachmentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AttachmentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AttachmentGroupBy) Float64X(ctx context.Context) float64
- func (s *AttachmentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AttachmentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AttachmentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AttachmentGroupBy) IntX(ctx context.Context) int
- func (s *AttachmentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AttachmentGroupBy) IntsX(ctx context.Context) []int
- func (agb *AttachmentGroupBy) Scan(ctx context.Context, v any) error
- func (s *AttachmentGroupBy) ScanX(ctx context.Context, v any)
- func (s *AttachmentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AttachmentGroupBy) StringX(ctx context.Context) string
- func (s *AttachmentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AttachmentGroupBy) StringsX(ctx context.Context) []string
- type AttachmentMutation
- func (m *AttachmentMutation) AddField(name string, value ent.Value) error
- func (m *AttachmentMutation) AddedEdges() []string
- func (m *AttachmentMutation) AddedField(name string) (ent.Value, bool)
- func (m *AttachmentMutation) AddedFields() []string
- func (m *AttachmentMutation) AddedIDs(name string) []ent.Value
- func (m *AttachmentMutation) ClearDocument()
- func (m *AttachmentMutation) ClearEdge(name string) error
- func (m *AttachmentMutation) ClearField(name string) error
- func (m *AttachmentMutation) ClearItem()
- func (m *AttachmentMutation) ClearedEdges() []string
- func (m *AttachmentMutation) ClearedFields() []string
- func (m AttachmentMutation) Client() *Client
- func (m *AttachmentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AttachmentMutation) DocumentCleared() bool
- func (m *AttachmentMutation) DocumentID() (id uuid.UUID, exists bool)
- func (m *AttachmentMutation) DocumentIDs() (ids []uuid.UUID)
- func (m *AttachmentMutation) EdgeCleared(name string) bool
- func (m *AttachmentMutation) Field(name string) (ent.Value, bool)
- func (m *AttachmentMutation) FieldCleared(name string) bool
- func (m *AttachmentMutation) Fields() []string
- func (m *AttachmentMutation) GetType() (r attachment.Type, exists bool)
- func (m *AttachmentMutation) ID() (id uuid.UUID, exists bool)
- func (m *AttachmentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AttachmentMutation) ItemCleared() bool
- func (m *AttachmentMutation) ItemID() (id uuid.UUID, exists bool)
- func (m *AttachmentMutation) ItemIDs() (ids []uuid.UUID)
- func (m *AttachmentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AttachmentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AttachmentMutation) OldPrimary(ctx context.Context) (v bool, err error)
- func (m *AttachmentMutation) OldType(ctx context.Context) (v attachment.Type, err error)
- func (m *AttachmentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AttachmentMutation) Op() Op
- func (m *AttachmentMutation) Primary() (r bool, exists bool)
- func (m *AttachmentMutation) RemovedEdges() []string
- func (m *AttachmentMutation) RemovedIDs(name string) []ent.Value
- func (m *AttachmentMutation) ResetCreatedAt()
- func (m *AttachmentMutation) ResetDocument()
- func (m *AttachmentMutation) ResetEdge(name string) error
- func (m *AttachmentMutation) ResetField(name string) error
- func (m *AttachmentMutation) ResetItem()
- func (m *AttachmentMutation) ResetPrimary()
- func (m *AttachmentMutation) ResetType()
- func (m *AttachmentMutation) ResetUpdatedAt()
- func (m *AttachmentMutation) SetCreatedAt(t time.Time)
- func (m *AttachmentMutation) SetDocumentID(id uuid.UUID)
- func (m *AttachmentMutation) SetField(name string, value ent.Value) error
- func (m *AttachmentMutation) SetID(id uuid.UUID)
- func (m *AttachmentMutation) SetItemID(id uuid.UUID)
- func (m *AttachmentMutation) SetOp(op Op)
- func (m *AttachmentMutation) SetPrimary(b bool)
- func (m *AttachmentMutation) SetType(a attachment.Type)
- func (m *AttachmentMutation) SetUpdatedAt(t time.Time)
- func (m AttachmentMutation) Tx() (*Tx, error)
- func (m *AttachmentMutation) Type() string
- func (m *AttachmentMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AttachmentMutation) Where(ps ...predicate.Attachment)
- func (m *AttachmentMutation) WhereP(ps ...func(*sql.Selector))
- type AttachmentQuery
- func (aq *AttachmentQuery) Aggregate(fns ...AggregateFunc) *AttachmentSelect
- func (aq *AttachmentQuery) All(ctx context.Context) ([]*Attachment, error)
- func (aq *AttachmentQuery) AllX(ctx context.Context) []*Attachment
- func (aq *AttachmentQuery) Clone() *AttachmentQuery
- func (aq *AttachmentQuery) Count(ctx context.Context) (int, error)
- func (aq *AttachmentQuery) CountX(ctx context.Context) int
- func (aq *AttachmentQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AttachmentQuery) ExistX(ctx context.Context) bool
- func (aq *AttachmentQuery) First(ctx context.Context) (*Attachment, error)
- func (aq *AttachmentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AttachmentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (aq *AttachmentQuery) FirstX(ctx context.Context) *Attachment
- func (aq *AttachmentQuery) GroupBy(field string, fields ...string) *AttachmentGroupBy
- func (aq *AttachmentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (aq *AttachmentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (aq *AttachmentQuery) Limit(limit int) *AttachmentQuery
- func (aq *AttachmentQuery) Offset(offset int) *AttachmentQuery
- func (aq *AttachmentQuery) Only(ctx context.Context) (*Attachment, error)
- func (aq *AttachmentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AttachmentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (aq *AttachmentQuery) OnlyX(ctx context.Context) *Attachment
- func (aq *AttachmentQuery) Order(o ...attachment.OrderOption) *AttachmentQuery
- func (aq *AttachmentQuery) QueryDocument() *DocumentQuery
- func (aq *AttachmentQuery) QueryItem() *ItemQuery
- func (aq *AttachmentQuery) Select(fields ...string) *AttachmentSelect
- func (aq *AttachmentQuery) Unique(unique bool) *AttachmentQuery
- func (aq *AttachmentQuery) Where(ps ...predicate.Attachment) *AttachmentQuery
- func (aq *AttachmentQuery) WithDocument(opts ...func(*DocumentQuery)) *AttachmentQuery
- func (aq *AttachmentQuery) WithItem(opts ...func(*ItemQuery)) *AttachmentQuery
- type AttachmentSelect
- func (as *AttachmentSelect) Aggregate(fns ...AggregateFunc) *AttachmentSelect
- func (s *AttachmentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AttachmentSelect) BoolX(ctx context.Context) bool
- func (s *AttachmentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AttachmentSelect) BoolsX(ctx context.Context) []bool
- func (s *AttachmentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AttachmentSelect) Float64X(ctx context.Context) float64
- func (s *AttachmentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AttachmentSelect) Float64sX(ctx context.Context) []float64
- func (s *AttachmentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AttachmentSelect) IntX(ctx context.Context) int
- func (s *AttachmentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AttachmentSelect) IntsX(ctx context.Context) []int
- func (as *AttachmentSelect) Scan(ctx context.Context, v any) error
- func (s *AttachmentSelect) ScanX(ctx context.Context, v any)
- func (s *AttachmentSelect) String(ctx context.Context) (_ string, err error)
- func (s *AttachmentSelect) StringX(ctx context.Context) string
- func (s *AttachmentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AttachmentSelect) StringsX(ctx context.Context) []string
- type AttachmentUpdate
- func (au *AttachmentUpdate) ClearDocument() *AttachmentUpdate
- func (au *AttachmentUpdate) ClearItem() *AttachmentUpdate
- func (au *AttachmentUpdate) Exec(ctx context.Context) error
- func (au *AttachmentUpdate) ExecX(ctx context.Context)
- func (au *AttachmentUpdate) Mutation() *AttachmentMutation
- func (au *AttachmentUpdate) Save(ctx context.Context) (int, error)
- func (au *AttachmentUpdate) SaveX(ctx context.Context) int
- func (au *AttachmentUpdate) SetDocument(d *Document) *AttachmentUpdate
- func (au *AttachmentUpdate) SetDocumentID(id uuid.UUID) *AttachmentUpdate
- func (au *AttachmentUpdate) SetItem(i *Item) *AttachmentUpdate
- func (au *AttachmentUpdate) SetItemID(id uuid.UUID) *AttachmentUpdate
- func (au *AttachmentUpdate) SetNillablePrimary(b *bool) *AttachmentUpdate
- func (au *AttachmentUpdate) SetNillableType(a *attachment.Type) *AttachmentUpdate
- func (au *AttachmentUpdate) SetPrimary(b bool) *AttachmentUpdate
- func (au *AttachmentUpdate) SetType(a attachment.Type) *AttachmentUpdate
- func (au *AttachmentUpdate) SetUpdatedAt(t time.Time) *AttachmentUpdate
- func (au *AttachmentUpdate) Where(ps ...predicate.Attachment) *AttachmentUpdate
- type AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) ClearDocument() *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) ClearItem() *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) Exec(ctx context.Context) error
- func (auo *AttachmentUpdateOne) ExecX(ctx context.Context)
- func (auo *AttachmentUpdateOne) Mutation() *AttachmentMutation
- func (auo *AttachmentUpdateOne) Save(ctx context.Context) (*Attachment, error)
- func (auo *AttachmentUpdateOne) SaveX(ctx context.Context) *Attachment
- func (auo *AttachmentUpdateOne) Select(field string, fields ...string) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetDocument(d *Document) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetDocumentID(id uuid.UUID) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetItem(i *Item) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetItemID(id uuid.UUID) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetNillablePrimary(b *bool) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetNillableType(a *attachment.Type) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetPrimary(b bool) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetType(a attachment.Type) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetUpdatedAt(t time.Time) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) Where(ps ...predicate.Attachment) *AttachmentUpdateOne
- type Attachments
- type AuthRoles
- type AuthRolesClient
- func (c *AuthRolesClient) Create() *AuthRolesCreate
- func (c *AuthRolesClient) CreateBulk(builders ...*AuthRolesCreate) *AuthRolesCreateBulk
- func (c *AuthRolesClient) Delete() *AuthRolesDelete
- func (c *AuthRolesClient) DeleteOne(ar *AuthRoles) *AuthRolesDeleteOne
- func (c *AuthRolesClient) DeleteOneID(id int) *AuthRolesDeleteOne
- func (c *AuthRolesClient) Get(ctx context.Context, id int) (*AuthRoles, error)
- func (c *AuthRolesClient) GetX(ctx context.Context, id int) *AuthRoles
- func (c *AuthRolesClient) Hooks() []Hook
- func (c *AuthRolesClient) Intercept(interceptors ...Interceptor)
- func (c *AuthRolesClient) Interceptors() []Interceptor
- func (c *AuthRolesClient) MapCreateBulk(slice any, setFunc func(*AuthRolesCreate, int)) *AuthRolesCreateBulk
- func (c *AuthRolesClient) Query() *AuthRolesQuery
- func (c *AuthRolesClient) QueryToken(ar *AuthRoles) *AuthTokensQuery
- func (c *AuthRolesClient) Update() *AuthRolesUpdate
- func (c *AuthRolesClient) UpdateOne(ar *AuthRoles) *AuthRolesUpdateOne
- func (c *AuthRolesClient) UpdateOneID(id int) *AuthRolesUpdateOne
- func (c *AuthRolesClient) Use(hooks ...Hook)
- type AuthRolesCreate
- func (arc *AuthRolesCreate) Exec(ctx context.Context) error
- func (arc *AuthRolesCreate) ExecX(ctx context.Context)
- func (arc *AuthRolesCreate) Mutation() *AuthRolesMutation
- func (arc *AuthRolesCreate) Save(ctx context.Context) (*AuthRoles, error)
- func (arc *AuthRolesCreate) SaveX(ctx context.Context) *AuthRoles
- func (arc *AuthRolesCreate) SetNillableRole(a *authroles.Role) *AuthRolesCreate
- func (arc *AuthRolesCreate) SetNillableTokenID(id *uuid.UUID) *AuthRolesCreate
- func (arc *AuthRolesCreate) SetRole(a authroles.Role) *AuthRolesCreate
- func (arc *AuthRolesCreate) SetToken(a *AuthTokens) *AuthRolesCreate
- func (arc *AuthRolesCreate) SetTokenID(id uuid.UUID) *AuthRolesCreate
- type AuthRolesCreateBulk
- type AuthRolesDelete
- type AuthRolesDeleteOne
- type AuthRolesEdges
- type AuthRolesGroupBy
- func (argb *AuthRolesGroupBy) Aggregate(fns ...AggregateFunc) *AuthRolesGroupBy
- func (s *AuthRolesGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuthRolesGroupBy) BoolX(ctx context.Context) bool
- func (s *AuthRolesGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AuthRolesGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AuthRolesGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuthRolesGroupBy) Float64X(ctx context.Context) float64
- func (s *AuthRolesGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuthRolesGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AuthRolesGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AuthRolesGroupBy) IntX(ctx context.Context) int
- func (s *AuthRolesGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AuthRolesGroupBy) IntsX(ctx context.Context) []int
- func (argb *AuthRolesGroupBy) Scan(ctx context.Context, v any) error
- func (s *AuthRolesGroupBy) ScanX(ctx context.Context, v any)
- func (s *AuthRolesGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AuthRolesGroupBy) StringX(ctx context.Context) string
- func (s *AuthRolesGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AuthRolesGroupBy) StringsX(ctx context.Context) []string
- type AuthRolesMutation
- func (m *AuthRolesMutation) AddField(name string, value ent.Value) error
- func (m *AuthRolesMutation) AddedEdges() []string
- func (m *AuthRolesMutation) AddedField(name string) (ent.Value, bool)
- func (m *AuthRolesMutation) AddedFields() []string
- func (m *AuthRolesMutation) AddedIDs(name string) []ent.Value
- func (m *AuthRolesMutation) ClearEdge(name string) error
- func (m *AuthRolesMutation) ClearField(name string) error
- func (m *AuthRolesMutation) ClearToken()
- func (m *AuthRolesMutation) ClearedEdges() []string
- func (m *AuthRolesMutation) ClearedFields() []string
- func (m AuthRolesMutation) Client() *Client
- func (m *AuthRolesMutation) EdgeCleared(name string) bool
- func (m *AuthRolesMutation) Field(name string) (ent.Value, bool)
- func (m *AuthRolesMutation) FieldCleared(name string) bool
- func (m *AuthRolesMutation) Fields() []string
- func (m *AuthRolesMutation) ID() (id int, exists bool)
- func (m *AuthRolesMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AuthRolesMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AuthRolesMutation) OldRole(ctx context.Context) (v authroles.Role, err error)
- func (m *AuthRolesMutation) Op() Op
- func (m *AuthRolesMutation) RemovedEdges() []string
- func (m *AuthRolesMutation) RemovedIDs(name string) []ent.Value
- func (m *AuthRolesMutation) ResetEdge(name string) error
- func (m *AuthRolesMutation) ResetField(name string) error
- func (m *AuthRolesMutation) ResetRole()
- func (m *AuthRolesMutation) ResetToken()
- func (m *AuthRolesMutation) Role() (r authroles.Role, exists bool)
- func (m *AuthRolesMutation) SetField(name string, value ent.Value) error
- func (m *AuthRolesMutation) SetOp(op Op)
- func (m *AuthRolesMutation) SetRole(a authroles.Role)
- func (m *AuthRolesMutation) SetTokenID(id uuid.UUID)
- func (m *AuthRolesMutation) TokenCleared() bool
- func (m *AuthRolesMutation) TokenID() (id uuid.UUID, exists bool)
- func (m *AuthRolesMutation) TokenIDs() (ids []uuid.UUID)
- func (m AuthRolesMutation) Tx() (*Tx, error)
- func (m *AuthRolesMutation) Type() string
- func (m *AuthRolesMutation) Where(ps ...predicate.AuthRoles)
- func (m *AuthRolesMutation) WhereP(ps ...func(*sql.Selector))
- type AuthRolesQuery
- func (arq *AuthRolesQuery) Aggregate(fns ...AggregateFunc) *AuthRolesSelect
- func (arq *AuthRolesQuery) All(ctx context.Context) ([]*AuthRoles, error)
- func (arq *AuthRolesQuery) AllX(ctx context.Context) []*AuthRoles
- func (arq *AuthRolesQuery) Clone() *AuthRolesQuery
- func (arq *AuthRolesQuery) Count(ctx context.Context) (int, error)
- func (arq *AuthRolesQuery) CountX(ctx context.Context) int
- func (arq *AuthRolesQuery) Exist(ctx context.Context) (bool, error)
- func (arq *AuthRolesQuery) ExistX(ctx context.Context) bool
- func (arq *AuthRolesQuery) First(ctx context.Context) (*AuthRoles, error)
- func (arq *AuthRolesQuery) FirstID(ctx context.Context) (id int, err error)
- func (arq *AuthRolesQuery) FirstIDX(ctx context.Context) int
- func (arq *AuthRolesQuery) FirstX(ctx context.Context) *AuthRoles
- func (arq *AuthRolesQuery) GroupBy(field string, fields ...string) *AuthRolesGroupBy
- func (arq *AuthRolesQuery) IDs(ctx context.Context) (ids []int, err error)
- func (arq *AuthRolesQuery) IDsX(ctx context.Context) []int
- func (arq *AuthRolesQuery) Limit(limit int) *AuthRolesQuery
- func (arq *AuthRolesQuery) Offset(offset int) *AuthRolesQuery
- func (arq *AuthRolesQuery) Only(ctx context.Context) (*AuthRoles, error)
- func (arq *AuthRolesQuery) OnlyID(ctx context.Context) (id int, err error)
- func (arq *AuthRolesQuery) OnlyIDX(ctx context.Context) int
- func (arq *AuthRolesQuery) OnlyX(ctx context.Context) *AuthRoles
- func (arq *AuthRolesQuery) Order(o ...authroles.OrderOption) *AuthRolesQuery
- func (arq *AuthRolesQuery) QueryToken() *AuthTokensQuery
- func (arq *AuthRolesQuery) Select(fields ...string) *AuthRolesSelect
- func (arq *AuthRolesQuery) Unique(unique bool) *AuthRolesQuery
- func (arq *AuthRolesQuery) Where(ps ...predicate.AuthRoles) *AuthRolesQuery
- func (arq *AuthRolesQuery) WithToken(opts ...func(*AuthTokensQuery)) *AuthRolesQuery
- type AuthRolesSelect
- func (ars *AuthRolesSelect) Aggregate(fns ...AggregateFunc) *AuthRolesSelect
- func (s *AuthRolesSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuthRolesSelect) BoolX(ctx context.Context) bool
- func (s *AuthRolesSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AuthRolesSelect) BoolsX(ctx context.Context) []bool
- func (s *AuthRolesSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuthRolesSelect) Float64X(ctx context.Context) float64
- func (s *AuthRolesSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuthRolesSelect) Float64sX(ctx context.Context) []float64
- func (s *AuthRolesSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AuthRolesSelect) IntX(ctx context.Context) int
- func (s *AuthRolesSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AuthRolesSelect) IntsX(ctx context.Context) []int
- func (ars *AuthRolesSelect) Scan(ctx context.Context, v any) error
- func (s *AuthRolesSelect) ScanX(ctx context.Context, v any)
- func (s *AuthRolesSelect) String(ctx context.Context) (_ string, err error)
- func (s *AuthRolesSelect) StringX(ctx context.Context) string
- func (s *AuthRolesSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AuthRolesSelect) StringsX(ctx context.Context) []string
- type AuthRolesSlice
- type AuthRolesUpdate
- func (aru *AuthRolesUpdate) ClearToken() *AuthRolesUpdate
- func (aru *AuthRolesUpdate) Exec(ctx context.Context) error
- func (aru *AuthRolesUpdate) ExecX(ctx context.Context)
- func (aru *AuthRolesUpdate) Mutation() *AuthRolesMutation
- func (aru *AuthRolesUpdate) Save(ctx context.Context) (int, error)
- func (aru *AuthRolesUpdate) SaveX(ctx context.Context) int
- func (aru *AuthRolesUpdate) SetNillableRole(a *authroles.Role) *AuthRolesUpdate
- func (aru *AuthRolesUpdate) SetNillableTokenID(id *uuid.UUID) *AuthRolesUpdate
- func (aru *AuthRolesUpdate) SetRole(a authroles.Role) *AuthRolesUpdate
- func (aru *AuthRolesUpdate) SetToken(a *AuthTokens) *AuthRolesUpdate
- func (aru *AuthRolesUpdate) SetTokenID(id uuid.UUID) *AuthRolesUpdate
- func (aru *AuthRolesUpdate) Where(ps ...predicate.AuthRoles) *AuthRolesUpdate
- type AuthRolesUpdateOne
- func (aruo *AuthRolesUpdateOne) ClearToken() *AuthRolesUpdateOne
- func (aruo *AuthRolesUpdateOne) Exec(ctx context.Context) error
- func (aruo *AuthRolesUpdateOne) ExecX(ctx context.Context)
- func (aruo *AuthRolesUpdateOne) Mutation() *AuthRolesMutation
- func (aruo *AuthRolesUpdateOne) Save(ctx context.Context) (*AuthRoles, error)
- func (aruo *AuthRolesUpdateOne) SaveX(ctx context.Context) *AuthRoles
- func (aruo *AuthRolesUpdateOne) Select(field string, fields ...string) *AuthRolesUpdateOne
- func (aruo *AuthRolesUpdateOne) SetNillableRole(a *authroles.Role) *AuthRolesUpdateOne
- func (aruo *AuthRolesUpdateOne) SetNillableTokenID(id *uuid.UUID) *AuthRolesUpdateOne
- func (aruo *AuthRolesUpdateOne) SetRole(a authroles.Role) *AuthRolesUpdateOne
- func (aruo *AuthRolesUpdateOne) SetToken(a *AuthTokens) *AuthRolesUpdateOne
- func (aruo *AuthRolesUpdateOne) SetTokenID(id uuid.UUID) *AuthRolesUpdateOne
- func (aruo *AuthRolesUpdateOne) Where(ps ...predicate.AuthRoles) *AuthRolesUpdateOne
- type AuthTokens
- func (at *AuthTokens) GetID() uuid.UUID
- func (at *AuthTokens) QueryRoles() *AuthRolesQuery
- func (at *AuthTokens) QueryUser() *UserQuery
- func (at *AuthTokens) String() string
- func (at *AuthTokens) Unwrap() *AuthTokens
- func (at *AuthTokens) Update() *AuthTokensUpdateOne
- func (at *AuthTokens) Value(name string) (ent.Value, error)
- type AuthTokensClient
- func (c *AuthTokensClient) Create() *AuthTokensCreate
- func (c *AuthTokensClient) CreateBulk(builders ...*AuthTokensCreate) *AuthTokensCreateBulk
- func (c *AuthTokensClient) Delete() *AuthTokensDelete
- func (c *AuthTokensClient) DeleteOne(at *AuthTokens) *AuthTokensDeleteOne
- func (c *AuthTokensClient) DeleteOneID(id uuid.UUID) *AuthTokensDeleteOne
- func (c *AuthTokensClient) Get(ctx context.Context, id uuid.UUID) (*AuthTokens, error)
- func (c *AuthTokensClient) GetX(ctx context.Context, id uuid.UUID) *AuthTokens
- func (c *AuthTokensClient) Hooks() []Hook
- func (c *AuthTokensClient) Intercept(interceptors ...Interceptor)
- func (c *AuthTokensClient) Interceptors() []Interceptor
- func (c *AuthTokensClient) MapCreateBulk(slice any, setFunc func(*AuthTokensCreate, int)) *AuthTokensCreateBulk
- func (c *AuthTokensClient) Query() *AuthTokensQuery
- func (c *AuthTokensClient) QueryRoles(at *AuthTokens) *AuthRolesQuery
- func (c *AuthTokensClient) QueryUser(at *AuthTokens) *UserQuery
- func (c *AuthTokensClient) Update() *AuthTokensUpdate
- func (c *AuthTokensClient) UpdateOne(at *AuthTokens) *AuthTokensUpdateOne
- func (c *AuthTokensClient) UpdateOneID(id uuid.UUID) *AuthTokensUpdateOne
- func (c *AuthTokensClient) Use(hooks ...Hook)
- type AuthTokensCreate
- func (atc *AuthTokensCreate) Exec(ctx context.Context) error
- func (atc *AuthTokensCreate) ExecX(ctx context.Context)
- func (atc *AuthTokensCreate) Mutation() *AuthTokensMutation
- func (atc *AuthTokensCreate) Save(ctx context.Context) (*AuthTokens, error)
- func (atc *AuthTokensCreate) SaveX(ctx context.Context) *AuthTokens
- func (atc *AuthTokensCreate) SetCreatedAt(t time.Time) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetExpiresAt(t time.Time) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetID(u uuid.UUID) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetNillableCreatedAt(t *time.Time) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetNillableExpiresAt(t *time.Time) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetNillableID(u *uuid.UUID) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetNillableRolesID(id *int) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetNillableUpdatedAt(t *time.Time) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetNillableUserID(id *uuid.UUID) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetRoles(a *AuthRoles) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetRolesID(id int) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetToken(b []byte) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetUpdatedAt(t time.Time) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetUser(u *User) *AuthTokensCreate
- func (atc *AuthTokensCreate) SetUserID(id uuid.UUID) *AuthTokensCreate
- type AuthTokensCreateBulk
- type AuthTokensDelete
- type AuthTokensDeleteOne
- type AuthTokensEdges
- type AuthTokensGroupBy
- func (atgb *AuthTokensGroupBy) Aggregate(fns ...AggregateFunc) *AuthTokensGroupBy
- func (s *AuthTokensGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuthTokensGroupBy) BoolX(ctx context.Context) bool
- func (s *AuthTokensGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AuthTokensGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AuthTokensGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuthTokensGroupBy) Float64X(ctx context.Context) float64
- func (s *AuthTokensGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuthTokensGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AuthTokensGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AuthTokensGroupBy) IntX(ctx context.Context) int
- func (s *AuthTokensGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AuthTokensGroupBy) IntsX(ctx context.Context) []int
- func (atgb *AuthTokensGroupBy) Scan(ctx context.Context, v any) error
- func (s *AuthTokensGroupBy) ScanX(ctx context.Context, v any)
- func (s *AuthTokensGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AuthTokensGroupBy) StringX(ctx context.Context) string
- func (s *AuthTokensGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AuthTokensGroupBy) StringsX(ctx context.Context) []string
- type AuthTokensMutation
- func (m *AuthTokensMutation) AddField(name string, value ent.Value) error
- func (m *AuthTokensMutation) AddedEdges() []string
- func (m *AuthTokensMutation) AddedField(name string) (ent.Value, bool)
- func (m *AuthTokensMutation) AddedFields() []string
- func (m *AuthTokensMutation) AddedIDs(name string) []ent.Value
- func (m *AuthTokensMutation) ClearEdge(name string) error
- func (m *AuthTokensMutation) ClearField(name string) error
- func (m *AuthTokensMutation) ClearRoles()
- func (m *AuthTokensMutation) ClearUser()
- func (m *AuthTokensMutation) ClearedEdges() []string
- func (m *AuthTokensMutation) ClearedFields() []string
- func (m AuthTokensMutation) Client() *Client
- func (m *AuthTokensMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AuthTokensMutation) EdgeCleared(name string) bool
- func (m *AuthTokensMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *AuthTokensMutation) Field(name string) (ent.Value, bool)
- func (m *AuthTokensMutation) FieldCleared(name string) bool
- func (m *AuthTokensMutation) Fields() []string
- func (m *AuthTokensMutation) ID() (id uuid.UUID, exists bool)
- func (m *AuthTokensMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AuthTokensMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AuthTokensMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)
- func (m *AuthTokensMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AuthTokensMutation) OldToken(ctx context.Context) (v []byte, err error)
- func (m *AuthTokensMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AuthTokensMutation) Op() Op
- func (m *AuthTokensMutation) RemovedEdges() []string
- func (m *AuthTokensMutation) RemovedIDs(name string) []ent.Value
- func (m *AuthTokensMutation) ResetCreatedAt()
- func (m *AuthTokensMutation) ResetEdge(name string) error
- func (m *AuthTokensMutation) ResetExpiresAt()
- func (m *AuthTokensMutation) ResetField(name string) error
- func (m *AuthTokensMutation) ResetRoles()
- func (m *AuthTokensMutation) ResetToken()
- func (m *AuthTokensMutation) ResetUpdatedAt()
- func (m *AuthTokensMutation) ResetUser()
- func (m *AuthTokensMutation) RolesCleared() bool
- func (m *AuthTokensMutation) RolesID() (id int, exists bool)
- func (m *AuthTokensMutation) RolesIDs() (ids []int)
- func (m *AuthTokensMutation) SetCreatedAt(t time.Time)
- func (m *AuthTokensMutation) SetExpiresAt(t time.Time)
- func (m *AuthTokensMutation) SetField(name string, value ent.Value) error
- func (m *AuthTokensMutation) SetID(id uuid.UUID)
- func (m *AuthTokensMutation) SetOp(op Op)
- func (m *AuthTokensMutation) SetRolesID(id int)
- func (m *AuthTokensMutation) SetToken(b []byte)
- func (m *AuthTokensMutation) SetUpdatedAt(t time.Time)
- func (m *AuthTokensMutation) SetUserID(id uuid.UUID)
- func (m *AuthTokensMutation) Token() (r []byte, exists bool)
- func (m AuthTokensMutation) Tx() (*Tx, error)
- func (m *AuthTokensMutation) Type() string
- func (m *AuthTokensMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AuthTokensMutation) UserCleared() bool
- func (m *AuthTokensMutation) UserID() (id uuid.UUID, exists bool)
- func (m *AuthTokensMutation) UserIDs() (ids []uuid.UUID)
- func (m *AuthTokensMutation) Where(ps ...predicate.AuthTokens)
- func (m *AuthTokensMutation) WhereP(ps ...func(*sql.Selector))
- type AuthTokensQuery
- func (atq *AuthTokensQuery) Aggregate(fns ...AggregateFunc) *AuthTokensSelect
- func (atq *AuthTokensQuery) All(ctx context.Context) ([]*AuthTokens, error)
- func (atq *AuthTokensQuery) AllX(ctx context.Context) []*AuthTokens
- func (atq *AuthTokensQuery) Clone() *AuthTokensQuery
- func (atq *AuthTokensQuery) Count(ctx context.Context) (int, error)
- func (atq *AuthTokensQuery) CountX(ctx context.Context) int
- func (atq *AuthTokensQuery) Exist(ctx context.Context) (bool, error)
- func (atq *AuthTokensQuery) ExistX(ctx context.Context) bool
- func (atq *AuthTokensQuery) First(ctx context.Context) (*AuthTokens, error)
- func (atq *AuthTokensQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (atq *AuthTokensQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (atq *AuthTokensQuery) FirstX(ctx context.Context) *AuthTokens
- func (atq *AuthTokensQuery) GroupBy(field string, fields ...string) *AuthTokensGroupBy
- func (atq *AuthTokensQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (atq *AuthTokensQuery) IDsX(ctx context.Context) []uuid.UUID
- func (atq *AuthTokensQuery) Limit(limit int) *AuthTokensQuery
- func (atq *AuthTokensQuery) Offset(offset int) *AuthTokensQuery
- func (atq *AuthTokensQuery) Only(ctx context.Context) (*AuthTokens, error)
- func (atq *AuthTokensQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (atq *AuthTokensQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (atq *AuthTokensQuery) OnlyX(ctx context.Context) *AuthTokens
- func (atq *AuthTokensQuery) Order(o ...authtokens.OrderOption) *AuthTokensQuery
- func (atq *AuthTokensQuery) QueryRoles() *AuthRolesQuery
- func (atq *AuthTokensQuery) QueryUser() *UserQuery
- func (atq *AuthTokensQuery) Select(fields ...string) *AuthTokensSelect
- func (atq *AuthTokensQuery) Unique(unique bool) *AuthTokensQuery
- func (atq *AuthTokensQuery) Where(ps ...predicate.AuthTokens) *AuthTokensQuery
- func (atq *AuthTokensQuery) WithRoles(opts ...func(*AuthRolesQuery)) *AuthTokensQuery
- func (atq *AuthTokensQuery) WithUser(opts ...func(*UserQuery)) *AuthTokensQuery
- type AuthTokensSelect
- func (ats *AuthTokensSelect) Aggregate(fns ...AggregateFunc) *AuthTokensSelect
- func (s *AuthTokensSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuthTokensSelect) BoolX(ctx context.Context) bool
- func (s *AuthTokensSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AuthTokensSelect) BoolsX(ctx context.Context) []bool
- func (s *AuthTokensSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuthTokensSelect) Float64X(ctx context.Context) float64
- func (s *AuthTokensSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuthTokensSelect) Float64sX(ctx context.Context) []float64
- func (s *AuthTokensSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AuthTokensSelect) IntX(ctx context.Context) int
- func (s *AuthTokensSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AuthTokensSelect) IntsX(ctx context.Context) []int
- func (ats *AuthTokensSelect) Scan(ctx context.Context, v any) error
- func (s *AuthTokensSelect) ScanX(ctx context.Context, v any)
- func (s *AuthTokensSelect) String(ctx context.Context) (_ string, err error)
- func (s *AuthTokensSelect) StringX(ctx context.Context) string
- func (s *AuthTokensSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AuthTokensSelect) StringsX(ctx context.Context) []string
- type AuthTokensSlice
- type AuthTokensUpdate
- func (atu *AuthTokensUpdate) ClearRoles() *AuthTokensUpdate
- func (atu *AuthTokensUpdate) ClearUser() *AuthTokensUpdate
- func (atu *AuthTokensUpdate) Exec(ctx context.Context) error
- func (atu *AuthTokensUpdate) ExecX(ctx context.Context)
- func (atu *AuthTokensUpdate) Mutation() *AuthTokensMutation
- func (atu *AuthTokensUpdate) Save(ctx context.Context) (int, error)
- func (atu *AuthTokensUpdate) SaveX(ctx context.Context) int
- func (atu *AuthTokensUpdate) SetExpiresAt(t time.Time) *AuthTokensUpdate
- func (atu *AuthTokensUpdate) SetNillableExpiresAt(t *time.Time) *AuthTokensUpdate
- func (atu *AuthTokensUpdate) SetNillableRolesID(id *int) *AuthTokensUpdate
- func (atu *AuthTokensUpdate) SetNillableUserID(id *uuid.UUID) *AuthTokensUpdate
- func (atu *AuthTokensUpdate) SetRoles(a *AuthRoles) *AuthTokensUpdate
- func (atu *AuthTokensUpdate) SetRolesID(id int) *AuthTokensUpdate
- func (atu *AuthTokensUpdate) SetToken(b []byte) *AuthTokensUpdate
- func (atu *AuthTokensUpdate) SetUpdatedAt(t time.Time) *AuthTokensUpdate
- func (atu *AuthTokensUpdate) SetUser(u *User) *AuthTokensUpdate
- func (atu *AuthTokensUpdate) SetUserID(id uuid.UUID) *AuthTokensUpdate
- func (atu *AuthTokensUpdate) Where(ps ...predicate.AuthTokens) *AuthTokensUpdate
- type AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) ClearRoles() *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) ClearUser() *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) Exec(ctx context.Context) error
- func (atuo *AuthTokensUpdateOne) ExecX(ctx context.Context)
- func (atuo *AuthTokensUpdateOne) Mutation() *AuthTokensMutation
- func (atuo *AuthTokensUpdateOne) Save(ctx context.Context) (*AuthTokens, error)
- func (atuo *AuthTokensUpdateOne) SaveX(ctx context.Context) *AuthTokens
- func (atuo *AuthTokensUpdateOne) Select(field string, fields ...string) *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) SetExpiresAt(t time.Time) *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) SetNillableExpiresAt(t *time.Time) *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) SetNillableRolesID(id *int) *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) SetNillableUserID(id *uuid.UUID) *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) SetRoles(a *AuthRoles) *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) SetRolesID(id int) *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) SetToken(b []byte) *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) SetUpdatedAt(t time.Time) *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) SetUser(u *User) *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) SetUserID(id uuid.UUID) *AuthTokensUpdateOne
- func (atuo *AuthTokensUpdateOne) Where(ps ...predicate.AuthTokens) *AuthTokensUpdateOne
- 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) Sql() *sql.DB
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Document
- func (d *Document) GetID() uuid.UUID
- func (d *Document) QueryAttachments() *AttachmentQuery
- func (d *Document) QueryGroup() *GroupQuery
- func (d *Document) String() string
- func (d *Document) Unwrap() *Document
- func (d *Document) Update() *DocumentUpdateOne
- func (d *Document) Value(name string) (ent.Value, error)
- type DocumentClient
- func (c *DocumentClient) Create() *DocumentCreate
- func (c *DocumentClient) CreateBulk(builders ...*DocumentCreate) *DocumentCreateBulk
- func (c *DocumentClient) Delete() *DocumentDelete
- func (c *DocumentClient) DeleteOne(d *Document) *DocumentDeleteOne
- func (c *DocumentClient) DeleteOneID(id uuid.UUID) *DocumentDeleteOne
- func (c *DocumentClient) Get(ctx context.Context, id uuid.UUID) (*Document, error)
- func (c *DocumentClient) GetX(ctx context.Context, id uuid.UUID) *Document
- func (c *DocumentClient) Hooks() []Hook
- func (c *DocumentClient) Intercept(interceptors ...Interceptor)
- func (c *DocumentClient) Interceptors() []Interceptor
- func (c *DocumentClient) MapCreateBulk(slice any, setFunc func(*DocumentCreate, int)) *DocumentCreateBulk
- func (c *DocumentClient) Query() *DocumentQuery
- func (c *DocumentClient) QueryAttachments(d *Document) *AttachmentQuery
- func (c *DocumentClient) QueryGroup(d *Document) *GroupQuery
- func (c *DocumentClient) Update() *DocumentUpdate
- func (c *DocumentClient) UpdateOne(d *Document) *DocumentUpdateOne
- func (c *DocumentClient) UpdateOneID(id uuid.UUID) *DocumentUpdateOne
- func (c *DocumentClient) Use(hooks ...Hook)
- type DocumentCreate
- func (dc *DocumentCreate) AddAttachmentIDs(ids ...uuid.UUID) *DocumentCreate
- func (dc *DocumentCreate) AddAttachments(a ...*Attachment) *DocumentCreate
- func (dc *DocumentCreate) Exec(ctx context.Context) error
- func (dc *DocumentCreate) ExecX(ctx context.Context)
- func (dc *DocumentCreate) Mutation() *DocumentMutation
- func (dc *DocumentCreate) Save(ctx context.Context) (*Document, error)
- func (dc *DocumentCreate) SaveX(ctx context.Context) *Document
- func (dc *DocumentCreate) SetCreatedAt(t time.Time) *DocumentCreate
- func (dc *DocumentCreate) SetGroup(g *Group) *DocumentCreate
- func (dc *DocumentCreate) SetGroupID(id uuid.UUID) *DocumentCreate
- func (dc *DocumentCreate) SetID(u uuid.UUID) *DocumentCreate
- func (dc *DocumentCreate) SetNillableCreatedAt(t *time.Time) *DocumentCreate
- func (dc *DocumentCreate) SetNillableID(u *uuid.UUID) *DocumentCreate
- func (dc *DocumentCreate) SetNillableUpdatedAt(t *time.Time) *DocumentCreate
- func (dc *DocumentCreate) SetPath(s string) *DocumentCreate
- func (dc *DocumentCreate) SetTitle(s string) *DocumentCreate
- func (dc *DocumentCreate) SetUpdatedAt(t time.Time) *DocumentCreate
- type DocumentCreateBulk
- type DocumentDelete
- type DocumentDeleteOne
- type DocumentEdges
- type DocumentGroupBy
- func (dgb *DocumentGroupBy) Aggregate(fns ...AggregateFunc) *DocumentGroupBy
- func (s *DocumentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DocumentGroupBy) BoolX(ctx context.Context) bool
- func (s *DocumentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DocumentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DocumentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DocumentGroupBy) Float64X(ctx context.Context) float64
- func (s *DocumentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DocumentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DocumentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DocumentGroupBy) IntX(ctx context.Context) int
- func (s *DocumentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DocumentGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DocumentGroupBy) Scan(ctx context.Context, v any) error
- func (s *DocumentGroupBy) ScanX(ctx context.Context, v any)
- func (s *DocumentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DocumentGroupBy) StringX(ctx context.Context) string
- func (s *DocumentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DocumentGroupBy) StringsX(ctx context.Context) []string
- type DocumentMutation
- func (m *DocumentMutation) AddAttachmentIDs(ids ...uuid.UUID)
- func (m *DocumentMutation) AddField(name string, value ent.Value) error
- func (m *DocumentMutation) AddedEdges() []string
- func (m *DocumentMutation) AddedField(name string) (ent.Value, bool)
- func (m *DocumentMutation) AddedFields() []string
- func (m *DocumentMutation) AddedIDs(name string) []ent.Value
- func (m *DocumentMutation) AttachmentsCleared() bool
- func (m *DocumentMutation) AttachmentsIDs() (ids []uuid.UUID)
- func (m *DocumentMutation) ClearAttachments()
- func (m *DocumentMutation) ClearEdge(name string) error
- func (m *DocumentMutation) ClearField(name string) error
- func (m *DocumentMutation) ClearGroup()
- func (m *DocumentMutation) ClearedEdges() []string
- func (m *DocumentMutation) ClearedFields() []string
- func (m DocumentMutation) Client() *Client
- func (m *DocumentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DocumentMutation) EdgeCleared(name string) bool
- func (m *DocumentMutation) Field(name string) (ent.Value, bool)
- func (m *DocumentMutation) FieldCleared(name string) bool
- func (m *DocumentMutation) Fields() []string
- func (m *DocumentMutation) GroupCleared() bool
- func (m *DocumentMutation) GroupID() (id uuid.UUID, exists bool)
- func (m *DocumentMutation) GroupIDs() (ids []uuid.UUID)
- func (m *DocumentMutation) ID() (id uuid.UUID, exists bool)
- func (m *DocumentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *DocumentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DocumentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DocumentMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *DocumentMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *DocumentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DocumentMutation) Op() Op
- func (m *DocumentMutation) Path() (r string, exists bool)
- func (m *DocumentMutation) RemoveAttachmentIDs(ids ...uuid.UUID)
- func (m *DocumentMutation) RemovedAttachmentsIDs() (ids []uuid.UUID)
- func (m *DocumentMutation) RemovedEdges() []string
- func (m *DocumentMutation) RemovedIDs(name string) []ent.Value
- func (m *DocumentMutation) ResetAttachments()
- func (m *DocumentMutation) ResetCreatedAt()
- func (m *DocumentMutation) ResetEdge(name string) error
- func (m *DocumentMutation) ResetField(name string) error
- func (m *DocumentMutation) ResetGroup()
- func (m *DocumentMutation) ResetPath()
- func (m *DocumentMutation) ResetTitle()
- func (m *DocumentMutation) ResetUpdatedAt()
- func (m *DocumentMutation) SetCreatedAt(t time.Time)
- func (m *DocumentMutation) SetField(name string, value ent.Value) error
- func (m *DocumentMutation) SetGroupID(id uuid.UUID)
- func (m *DocumentMutation) SetID(id uuid.UUID)
- func (m *DocumentMutation) SetOp(op Op)
- func (m *DocumentMutation) SetPath(s string)
- func (m *DocumentMutation) SetTitle(s string)
- func (m *DocumentMutation) SetUpdatedAt(t time.Time)
- func (m *DocumentMutation) Title() (r string, exists bool)
- func (m DocumentMutation) Tx() (*Tx, error)
- func (m *DocumentMutation) Type() string
- func (m *DocumentMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DocumentMutation) Where(ps ...predicate.Document)
- func (m *DocumentMutation) WhereP(ps ...func(*sql.Selector))
- type DocumentQuery
- func (dq *DocumentQuery) Aggregate(fns ...AggregateFunc) *DocumentSelect
- func (dq *DocumentQuery) All(ctx context.Context) ([]*Document, error)
- func (dq *DocumentQuery) AllX(ctx context.Context) []*Document
- func (dq *DocumentQuery) Clone() *DocumentQuery
- func (dq *DocumentQuery) Count(ctx context.Context) (int, error)
- func (dq *DocumentQuery) CountX(ctx context.Context) int
- func (dq *DocumentQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DocumentQuery) ExistX(ctx context.Context) bool
- func (dq *DocumentQuery) First(ctx context.Context) (*Document, error)
- func (dq *DocumentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (dq *DocumentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (dq *DocumentQuery) FirstX(ctx context.Context) *Document
- func (dq *DocumentQuery) GroupBy(field string, fields ...string) *DocumentGroupBy
- func (dq *DocumentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (dq *DocumentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (dq *DocumentQuery) Limit(limit int) *DocumentQuery
- func (dq *DocumentQuery) Offset(offset int) *DocumentQuery
- func (dq *DocumentQuery) Only(ctx context.Context) (*Document, error)
- func (dq *DocumentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (dq *DocumentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (dq *DocumentQuery) OnlyX(ctx context.Context) *Document
- func (dq *DocumentQuery) Order(o ...document.OrderOption) *DocumentQuery
- func (dq *DocumentQuery) QueryAttachments() *AttachmentQuery
- func (dq *DocumentQuery) QueryGroup() *GroupQuery
- func (dq *DocumentQuery) Select(fields ...string) *DocumentSelect
- func (dq *DocumentQuery) Unique(unique bool) *DocumentQuery
- func (dq *DocumentQuery) Where(ps ...predicate.Document) *DocumentQuery
- func (dq *DocumentQuery) WithAttachments(opts ...func(*AttachmentQuery)) *DocumentQuery
- func (dq *DocumentQuery) WithGroup(opts ...func(*GroupQuery)) *DocumentQuery
- type DocumentSelect
- func (ds *DocumentSelect) Aggregate(fns ...AggregateFunc) *DocumentSelect
- func (s *DocumentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DocumentSelect) BoolX(ctx context.Context) bool
- func (s *DocumentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DocumentSelect) BoolsX(ctx context.Context) []bool
- func (s *DocumentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DocumentSelect) Float64X(ctx context.Context) float64
- func (s *DocumentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DocumentSelect) Float64sX(ctx context.Context) []float64
- func (s *DocumentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DocumentSelect) IntX(ctx context.Context) int
- func (s *DocumentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DocumentSelect) IntsX(ctx context.Context) []int
- func (ds *DocumentSelect) Scan(ctx context.Context, v any) error
- func (s *DocumentSelect) ScanX(ctx context.Context, v any)
- func (s *DocumentSelect) String(ctx context.Context) (_ string, err error)
- func (s *DocumentSelect) StringX(ctx context.Context) string
- func (s *DocumentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DocumentSelect) StringsX(ctx context.Context) []string
- type DocumentUpdate
- func (du *DocumentUpdate) AddAttachmentIDs(ids ...uuid.UUID) *DocumentUpdate
- func (du *DocumentUpdate) AddAttachments(a ...*Attachment) *DocumentUpdate
- func (du *DocumentUpdate) ClearAttachments() *DocumentUpdate
- func (du *DocumentUpdate) ClearGroup() *DocumentUpdate
- func (du *DocumentUpdate) Exec(ctx context.Context) error
- func (du *DocumentUpdate) ExecX(ctx context.Context)
- func (du *DocumentUpdate) Mutation() *DocumentMutation
- func (du *DocumentUpdate) RemoveAttachmentIDs(ids ...uuid.UUID) *DocumentUpdate
- func (du *DocumentUpdate) RemoveAttachments(a ...*Attachment) *DocumentUpdate
- func (du *DocumentUpdate) Save(ctx context.Context) (int, error)
- func (du *DocumentUpdate) SaveX(ctx context.Context) int
- func (du *DocumentUpdate) SetGroup(g *Group) *DocumentUpdate
- func (du *DocumentUpdate) SetGroupID(id uuid.UUID) *DocumentUpdate
- func (du *DocumentUpdate) SetNillablePath(s *string) *DocumentUpdate
- func (du *DocumentUpdate) SetNillableTitle(s *string) *DocumentUpdate
- func (du *DocumentUpdate) SetPath(s string) *DocumentUpdate
- func (du *DocumentUpdate) SetTitle(s string) *DocumentUpdate
- func (du *DocumentUpdate) SetUpdatedAt(t time.Time) *DocumentUpdate
- func (du *DocumentUpdate) Where(ps ...predicate.Document) *DocumentUpdate
- type DocumentUpdateOne
- func (duo *DocumentUpdateOne) AddAttachmentIDs(ids ...uuid.UUID) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) AddAttachments(a ...*Attachment) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) ClearAttachments() *DocumentUpdateOne
- func (duo *DocumentUpdateOne) ClearGroup() *DocumentUpdateOne
- func (duo *DocumentUpdateOne) Exec(ctx context.Context) error
- func (duo *DocumentUpdateOne) ExecX(ctx context.Context)
- func (duo *DocumentUpdateOne) Mutation() *DocumentMutation
- func (duo *DocumentUpdateOne) RemoveAttachmentIDs(ids ...uuid.UUID) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) RemoveAttachments(a ...*Attachment) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) Save(ctx context.Context) (*Document, error)
- func (duo *DocumentUpdateOne) SaveX(ctx context.Context) *Document
- func (duo *DocumentUpdateOne) Select(field string, fields ...string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetGroup(g *Group) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetGroupID(id uuid.UUID) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetNillablePath(s *string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetNillableTitle(s *string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetPath(s string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetTitle(s string) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) SetUpdatedAt(t time.Time) *DocumentUpdateOne
- func (duo *DocumentUpdateOne) Where(ps ...predicate.Document) *DocumentUpdateOne
- type Documents
- type Group
- func (gr *Group) GetID() uuid.UUID
- func (gr *Group) QueryDocuments() *DocumentQuery
- func (gr *Group) QueryInvitationTokens() *GroupInvitationTokenQuery
- func (gr *Group) QueryItems() *ItemQuery
- func (gr *Group) QueryLabels() *LabelQuery
- func (gr *Group) QueryLocations() *LocationQuery
- func (gr *Group) QueryNotifiers() *NotifierQuery
- func (gr *Group) QueryUsers() *UserQuery
- func (gr *Group) String() string
- func (gr *Group) Unwrap() *Group
- func (gr *Group) Update() *GroupUpdateOne
- func (gr *Group) Value(name string) (ent.Value, error)
- type GroupClient
- func (c *GroupClient) Create() *GroupCreate
- func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
- func (c *GroupClient) Delete() *GroupDelete
- func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
- func (c *GroupClient) DeleteOneID(id uuid.UUID) *GroupDeleteOne
- func (c *GroupClient) Get(ctx context.Context, id uuid.UUID) (*Group, error)
- func (c *GroupClient) GetX(ctx context.Context, id uuid.UUID) *Group
- func (c *GroupClient) Hooks() []Hook
- func (c *GroupClient) Intercept(interceptors ...Interceptor)
- func (c *GroupClient) Interceptors() []Interceptor
- func (c *GroupClient) MapCreateBulk(slice any, setFunc func(*GroupCreate, int)) *GroupCreateBulk
- func (c *GroupClient) Query() *GroupQuery
- func (c *GroupClient) QueryDocuments(gr *Group) *DocumentQuery
- func (c *GroupClient) QueryInvitationTokens(gr *Group) *GroupInvitationTokenQuery
- func (c *GroupClient) QueryItems(gr *Group) *ItemQuery
- func (c *GroupClient) QueryLabels(gr *Group) *LabelQuery
- func (c *GroupClient) QueryLocations(gr *Group) *LocationQuery
- func (c *GroupClient) QueryNotifiers(gr *Group) *NotifierQuery
- func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
- func (c *GroupClient) Update() *GroupUpdate
- func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
- func (c *GroupClient) UpdateOneID(id uuid.UUID) *GroupUpdateOne
- func (c *GroupClient) Use(hooks ...Hook)
- type GroupCreate
- func (gc *GroupCreate) AddDocumentIDs(ids ...uuid.UUID) *GroupCreate
- func (gc *GroupCreate) AddDocuments(d ...*Document) *GroupCreate
- func (gc *GroupCreate) AddInvitationTokenIDs(ids ...uuid.UUID) *GroupCreate
- func (gc *GroupCreate) AddInvitationTokens(g ...*GroupInvitationToken) *GroupCreate
- func (gc *GroupCreate) AddItemIDs(ids ...uuid.UUID) *GroupCreate
- func (gc *GroupCreate) AddItems(i ...*Item) *GroupCreate
- func (gc *GroupCreate) AddLabelIDs(ids ...uuid.UUID) *GroupCreate
- func (gc *GroupCreate) AddLabels(l ...*Label) *GroupCreate
- func (gc *GroupCreate) AddLocationIDs(ids ...uuid.UUID) *GroupCreate
- func (gc *GroupCreate) AddLocations(l ...*Location) *GroupCreate
- func (gc *GroupCreate) AddNotifierIDs(ids ...uuid.UUID) *GroupCreate
- func (gc *GroupCreate) AddNotifiers(n ...*Notifier) *GroupCreate
- func (gc *GroupCreate) AddUserIDs(ids ...uuid.UUID) *GroupCreate
- func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
- func (gc *GroupCreate) Exec(ctx context.Context) error
- func (gc *GroupCreate) ExecX(ctx context.Context)
- func (gc *GroupCreate) Mutation() *GroupMutation
- func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
- func (gc *GroupCreate) SaveX(ctx context.Context) *Group
- func (gc *GroupCreate) SetCreatedAt(t time.Time) *GroupCreate
- func (gc *GroupCreate) SetCurrency(s string) *GroupCreate
- func (gc *GroupCreate) SetID(u uuid.UUID) *GroupCreate
- func (gc *GroupCreate) SetName(s string) *GroupCreate
- func (gc *GroupCreate) SetNillableCreatedAt(t *time.Time) *GroupCreate
- func (gc *GroupCreate) SetNillableCurrency(s *string) *GroupCreate
- func (gc *GroupCreate) SetNillableID(u *uuid.UUID) *GroupCreate
- func (gc *GroupCreate) SetNillableUpdatedAt(t *time.Time) *GroupCreate
- func (gc *GroupCreate) SetUpdatedAt(t time.Time) *GroupCreate
- type GroupCreateBulk
- type GroupDelete
- type GroupDeleteOne
- type GroupEdges
- func (e GroupEdges) DocumentsOrErr() ([]*Document, error)
- func (e GroupEdges) InvitationTokensOrErr() ([]*GroupInvitationToken, error)
- func (e GroupEdges) ItemsOrErr() ([]*Item, error)
- func (e GroupEdges) LabelsOrErr() ([]*Label, error)
- func (e GroupEdges) LocationsOrErr() ([]*Location, error)
- func (e GroupEdges) NotifiersOrErr() ([]*Notifier, error)
- func (e GroupEdges) UsersOrErr() ([]*User, error)
- type GroupGroupBy
- func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
- func (s *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupGroupBy) BoolX(ctx context.Context) bool
- func (s *GroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupGroupBy) Float64X(ctx context.Context) float64
- func (s *GroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroupGroupBy) IntX(ctx context.Context) int
- func (s *GroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroupGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroupGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroupGroupBy) StringX(ctx context.Context) string
- func (s *GroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroupGroupBy) StringsX(ctx context.Context) []string
- type GroupInvitationToken
- func (git *GroupInvitationToken) GetID() uuid.UUID
- func (git *GroupInvitationToken) QueryGroup() *GroupQuery
- func (git *GroupInvitationToken) String() string
- func (git *GroupInvitationToken) Unwrap() *GroupInvitationToken
- func (git *GroupInvitationToken) Update() *GroupInvitationTokenUpdateOne
- func (git *GroupInvitationToken) Value(name string) (ent.Value, error)
- type GroupInvitationTokenClient
- func (c *GroupInvitationTokenClient) Create() *GroupInvitationTokenCreate
- func (c *GroupInvitationTokenClient) CreateBulk(builders ...*GroupInvitationTokenCreate) *GroupInvitationTokenCreateBulk
- func (c *GroupInvitationTokenClient) Delete() *GroupInvitationTokenDelete
- func (c *GroupInvitationTokenClient) DeleteOne(git *GroupInvitationToken) *GroupInvitationTokenDeleteOne
- func (c *GroupInvitationTokenClient) DeleteOneID(id uuid.UUID) *GroupInvitationTokenDeleteOne
- func (c *GroupInvitationTokenClient) Get(ctx context.Context, id uuid.UUID) (*GroupInvitationToken, error)
- func (c *GroupInvitationTokenClient) GetX(ctx context.Context, id uuid.UUID) *GroupInvitationToken
- func (c *GroupInvitationTokenClient) Hooks() []Hook
- func (c *GroupInvitationTokenClient) Intercept(interceptors ...Interceptor)
- func (c *GroupInvitationTokenClient) Interceptors() []Interceptor
- func (c *GroupInvitationTokenClient) MapCreateBulk(slice any, setFunc func(*GroupInvitationTokenCreate, int)) *GroupInvitationTokenCreateBulk
- func (c *GroupInvitationTokenClient) Query() *GroupInvitationTokenQuery
- func (c *GroupInvitationTokenClient) QueryGroup(git *GroupInvitationToken) *GroupQuery
- func (c *GroupInvitationTokenClient) Update() *GroupInvitationTokenUpdate
- func (c *GroupInvitationTokenClient) UpdateOne(git *GroupInvitationToken) *GroupInvitationTokenUpdateOne
- func (c *GroupInvitationTokenClient) UpdateOneID(id uuid.UUID) *GroupInvitationTokenUpdateOne
- func (c *GroupInvitationTokenClient) Use(hooks ...Hook)
- type GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) Exec(ctx context.Context) error
- func (gitc *GroupInvitationTokenCreate) ExecX(ctx context.Context)
- func (gitc *GroupInvitationTokenCreate) Mutation() *GroupInvitationTokenMutation
- func (gitc *GroupInvitationTokenCreate) Save(ctx context.Context) (*GroupInvitationToken, error)
- func (gitc *GroupInvitationTokenCreate) SaveX(ctx context.Context) *GroupInvitationToken
- func (gitc *GroupInvitationTokenCreate) SetCreatedAt(t time.Time) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetExpiresAt(t time.Time) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetGroup(g *Group) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetGroupID(id uuid.UUID) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetID(u uuid.UUID) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetNillableCreatedAt(t *time.Time) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetNillableExpiresAt(t *time.Time) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetNillableGroupID(id *uuid.UUID) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetNillableID(u *uuid.UUID) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetNillableUpdatedAt(t *time.Time) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetNillableUses(i *int) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetToken(b []byte) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetUpdatedAt(t time.Time) *GroupInvitationTokenCreate
- func (gitc *GroupInvitationTokenCreate) SetUses(i int) *GroupInvitationTokenCreate
- type GroupInvitationTokenCreateBulk
- func (gitcb *GroupInvitationTokenCreateBulk) Exec(ctx context.Context) error
- func (gitcb *GroupInvitationTokenCreateBulk) ExecX(ctx context.Context)
- func (gitcb *GroupInvitationTokenCreateBulk) Save(ctx context.Context) ([]*GroupInvitationToken, error)
- func (gitcb *GroupInvitationTokenCreateBulk) SaveX(ctx context.Context) []*GroupInvitationToken
- type GroupInvitationTokenDelete
- type GroupInvitationTokenDeleteOne
- type GroupInvitationTokenEdges
- type GroupInvitationTokenGroupBy
- func (gitgb *GroupInvitationTokenGroupBy) Aggregate(fns ...AggregateFunc) *GroupInvitationTokenGroupBy
- func (s *GroupInvitationTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupInvitationTokenGroupBy) BoolX(ctx context.Context) bool
- func (s *GroupInvitationTokenGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupInvitationTokenGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroupInvitationTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupInvitationTokenGroupBy) Float64X(ctx context.Context) float64
- func (s *GroupInvitationTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupInvitationTokenGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroupInvitationTokenGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroupInvitationTokenGroupBy) IntX(ctx context.Context) int
- func (s *GroupInvitationTokenGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroupInvitationTokenGroupBy) IntsX(ctx context.Context) []int
- func (gitgb *GroupInvitationTokenGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroupInvitationTokenGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroupInvitationTokenGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroupInvitationTokenGroupBy) StringX(ctx context.Context) string
- func (s *GroupInvitationTokenGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroupInvitationTokenGroupBy) StringsX(ctx context.Context) []string
- type GroupInvitationTokenMutation
- func (m *GroupInvitationTokenMutation) AddField(name string, value ent.Value) error
- func (m *GroupInvitationTokenMutation) AddUses(i int)
- func (m *GroupInvitationTokenMutation) AddedEdges() []string
- func (m *GroupInvitationTokenMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupInvitationTokenMutation) AddedFields() []string
- func (m *GroupInvitationTokenMutation) AddedIDs(name string) []ent.Value
- func (m *GroupInvitationTokenMutation) AddedUses() (r int, exists bool)
- func (m *GroupInvitationTokenMutation) ClearEdge(name string) error
- func (m *GroupInvitationTokenMutation) ClearField(name string) error
- func (m *GroupInvitationTokenMutation) ClearGroup()
- func (m *GroupInvitationTokenMutation) ClearedEdges() []string
- func (m *GroupInvitationTokenMutation) ClearedFields() []string
- func (m GroupInvitationTokenMutation) Client() *Client
- func (m *GroupInvitationTokenMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GroupInvitationTokenMutation) EdgeCleared(name string) bool
- func (m *GroupInvitationTokenMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *GroupInvitationTokenMutation) Field(name string) (ent.Value, bool)
- func (m *GroupInvitationTokenMutation) FieldCleared(name string) bool
- func (m *GroupInvitationTokenMutation) Fields() []string
- func (m *GroupInvitationTokenMutation) GroupCleared() bool
- func (m *GroupInvitationTokenMutation) GroupID() (id uuid.UUID, exists bool)
- func (m *GroupInvitationTokenMutation) GroupIDs() (ids []uuid.UUID)
- func (m *GroupInvitationTokenMutation) ID() (id uuid.UUID, exists bool)
- func (m *GroupInvitationTokenMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *GroupInvitationTokenMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupInvitationTokenMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupInvitationTokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupInvitationTokenMutation) OldToken(ctx context.Context) (v []byte, err error)
- func (m *GroupInvitationTokenMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupInvitationTokenMutation) OldUses(ctx context.Context) (v int, err error)
- func (m *GroupInvitationTokenMutation) Op() Op
- func (m *GroupInvitationTokenMutation) RemovedEdges() []string
- func (m *GroupInvitationTokenMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupInvitationTokenMutation) ResetCreatedAt()
- func (m *GroupInvitationTokenMutation) ResetEdge(name string) error
- func (m *GroupInvitationTokenMutation) ResetExpiresAt()
- func (m *GroupInvitationTokenMutation) ResetField(name string) error
- func (m *GroupInvitationTokenMutation) ResetGroup()
- func (m *GroupInvitationTokenMutation) ResetToken()
- func (m *GroupInvitationTokenMutation) ResetUpdatedAt()
- func (m *GroupInvitationTokenMutation) ResetUses()
- func (m *GroupInvitationTokenMutation) SetCreatedAt(t time.Time)
- func (m *GroupInvitationTokenMutation) SetExpiresAt(t time.Time)
- func (m *GroupInvitationTokenMutation) SetField(name string, value ent.Value) error
- func (m *GroupInvitationTokenMutation) SetGroupID(id uuid.UUID)
- func (m *GroupInvitationTokenMutation) SetID(id uuid.UUID)
- func (m *GroupInvitationTokenMutation) SetOp(op Op)
- func (m *GroupInvitationTokenMutation) SetToken(b []byte)
- func (m *GroupInvitationTokenMutation) SetUpdatedAt(t time.Time)
- func (m *GroupInvitationTokenMutation) SetUses(i int)
- func (m *GroupInvitationTokenMutation) Token() (r []byte, exists bool)
- func (m GroupInvitationTokenMutation) Tx() (*Tx, error)
- func (m *GroupInvitationTokenMutation) Type() string
- func (m *GroupInvitationTokenMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *GroupInvitationTokenMutation) Uses() (r int, exists bool)
- func (m *GroupInvitationTokenMutation) Where(ps ...predicate.GroupInvitationToken)
- func (m *GroupInvitationTokenMutation) WhereP(ps ...func(*sql.Selector))
- type GroupInvitationTokenQuery
- func (gitq *GroupInvitationTokenQuery) Aggregate(fns ...AggregateFunc) *GroupInvitationTokenSelect
- func (gitq *GroupInvitationTokenQuery) All(ctx context.Context) ([]*GroupInvitationToken, error)
- func (gitq *GroupInvitationTokenQuery) AllX(ctx context.Context) []*GroupInvitationToken
- func (gitq *GroupInvitationTokenQuery) Clone() *GroupInvitationTokenQuery
- func (gitq *GroupInvitationTokenQuery) Count(ctx context.Context) (int, error)
- func (gitq *GroupInvitationTokenQuery) CountX(ctx context.Context) int
- func (gitq *GroupInvitationTokenQuery) Exist(ctx context.Context) (bool, error)
- func (gitq *GroupInvitationTokenQuery) ExistX(ctx context.Context) bool
- func (gitq *GroupInvitationTokenQuery) First(ctx context.Context) (*GroupInvitationToken, error)
- func (gitq *GroupInvitationTokenQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (gitq *GroupInvitationTokenQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (gitq *GroupInvitationTokenQuery) FirstX(ctx context.Context) *GroupInvitationToken
- func (gitq *GroupInvitationTokenQuery) GroupBy(field string, fields ...string) *GroupInvitationTokenGroupBy
- func (gitq *GroupInvitationTokenQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (gitq *GroupInvitationTokenQuery) IDsX(ctx context.Context) []uuid.UUID
- func (gitq *GroupInvitationTokenQuery) Limit(limit int) *GroupInvitationTokenQuery
- func (gitq *GroupInvitationTokenQuery) Offset(offset int) *GroupInvitationTokenQuery
- func (gitq *GroupInvitationTokenQuery) Only(ctx context.Context) (*GroupInvitationToken, error)
- func (gitq *GroupInvitationTokenQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (gitq *GroupInvitationTokenQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (gitq *GroupInvitationTokenQuery) OnlyX(ctx context.Context) *GroupInvitationToken
- func (gitq *GroupInvitationTokenQuery) Order(o ...groupinvitationtoken.OrderOption) *GroupInvitationTokenQuery
- func (gitq *GroupInvitationTokenQuery) QueryGroup() *GroupQuery
- func (gitq *GroupInvitationTokenQuery) Select(fields ...string) *GroupInvitationTokenSelect
- func (gitq *GroupInvitationTokenQuery) Unique(unique bool) *GroupInvitationTokenQuery
- func (gitq *GroupInvitationTokenQuery) Where(ps ...predicate.GroupInvitationToken) *GroupInvitationTokenQuery
- func (gitq *GroupInvitationTokenQuery) WithGroup(opts ...func(*GroupQuery)) *GroupInvitationTokenQuery
- type GroupInvitationTokenSelect
- func (gits *GroupInvitationTokenSelect) Aggregate(fns ...AggregateFunc) *GroupInvitationTokenSelect
- func (s *GroupInvitationTokenSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupInvitationTokenSelect) BoolX(ctx context.Context) bool
- func (s *GroupInvitationTokenSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupInvitationTokenSelect) BoolsX(ctx context.Context) []bool
- func (s *GroupInvitationTokenSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupInvitationTokenSelect) Float64X(ctx context.Context) float64
- func (s *GroupInvitationTokenSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupInvitationTokenSelect) Float64sX(ctx context.Context) []float64
- func (s *GroupInvitationTokenSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroupInvitationTokenSelect) IntX(ctx context.Context) int
- func (s *GroupInvitationTokenSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroupInvitationTokenSelect) IntsX(ctx context.Context) []int
- func (gits *GroupInvitationTokenSelect) Scan(ctx context.Context, v any) error
- func (s *GroupInvitationTokenSelect) ScanX(ctx context.Context, v any)
- func (s *GroupInvitationTokenSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroupInvitationTokenSelect) StringX(ctx context.Context) string
- func (s *GroupInvitationTokenSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroupInvitationTokenSelect) StringsX(ctx context.Context) []string
- type GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) AddUses(i int) *GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) ClearGroup() *GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) Exec(ctx context.Context) error
- func (gitu *GroupInvitationTokenUpdate) ExecX(ctx context.Context)
- func (gitu *GroupInvitationTokenUpdate) Mutation() *GroupInvitationTokenMutation
- func (gitu *GroupInvitationTokenUpdate) Save(ctx context.Context) (int, error)
- func (gitu *GroupInvitationTokenUpdate) SaveX(ctx context.Context) int
- func (gitu *GroupInvitationTokenUpdate) SetExpiresAt(t time.Time) *GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) SetGroup(g *Group) *GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) SetGroupID(id uuid.UUID) *GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) SetNillableExpiresAt(t *time.Time) *GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) SetNillableGroupID(id *uuid.UUID) *GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) SetNillableUses(i *int) *GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) SetToken(b []byte) *GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) SetUpdatedAt(t time.Time) *GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) SetUses(i int) *GroupInvitationTokenUpdate
- func (gitu *GroupInvitationTokenUpdate) Where(ps ...predicate.GroupInvitationToken) *GroupInvitationTokenUpdate
- type GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) AddUses(i int) *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) ClearGroup() *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) Exec(ctx context.Context) error
- func (gituo *GroupInvitationTokenUpdateOne) ExecX(ctx context.Context)
- func (gituo *GroupInvitationTokenUpdateOne) Mutation() *GroupInvitationTokenMutation
- func (gituo *GroupInvitationTokenUpdateOne) Save(ctx context.Context) (*GroupInvitationToken, error)
- func (gituo *GroupInvitationTokenUpdateOne) SaveX(ctx context.Context) *GroupInvitationToken
- func (gituo *GroupInvitationTokenUpdateOne) Select(field string, fields ...string) *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) SetExpiresAt(t time.Time) *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) SetGroup(g *Group) *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) SetGroupID(id uuid.UUID) *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) SetNillableExpiresAt(t *time.Time) *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) SetNillableGroupID(id *uuid.UUID) *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) SetNillableUses(i *int) *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) SetToken(b []byte) *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) SetUpdatedAt(t time.Time) *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) SetUses(i int) *GroupInvitationTokenUpdateOne
- func (gituo *GroupInvitationTokenUpdateOne) Where(ps ...predicate.GroupInvitationToken) *GroupInvitationTokenUpdateOne
- type GroupInvitationTokens
- type GroupMutation
- func (m *GroupMutation) AddDocumentIDs(ids ...uuid.UUID)
- func (m *GroupMutation) AddField(name string, value ent.Value) error
- func (m *GroupMutation) AddInvitationTokenIDs(ids ...uuid.UUID)
- func (m *GroupMutation) AddItemIDs(ids ...uuid.UUID)
- func (m *GroupMutation) AddLabelIDs(ids ...uuid.UUID)
- func (m *GroupMutation) AddLocationIDs(ids ...uuid.UUID)
- func (m *GroupMutation) AddNotifierIDs(ids ...uuid.UUID)
- func (m *GroupMutation) AddUserIDs(ids ...uuid.UUID)
- func (m *GroupMutation) AddedEdges() []string
- func (m *GroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupMutation) AddedFields() []string
- func (m *GroupMutation) AddedIDs(name string) []ent.Value
- func (m *GroupMutation) ClearDocuments()
- func (m *GroupMutation) ClearEdge(name string) error
- func (m *GroupMutation) ClearField(name string) error
- func (m *GroupMutation) ClearInvitationTokens()
- func (m *GroupMutation) ClearItems()
- func (m *GroupMutation) ClearLabels()
- func (m *GroupMutation) ClearLocations()
- func (m *GroupMutation) ClearNotifiers()
- func (m *GroupMutation) ClearUsers()
- func (m *GroupMutation) ClearedEdges() []string
- func (m *GroupMutation) ClearedFields() []string
- func (m GroupMutation) Client() *Client
- func (m *GroupMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GroupMutation) Currency() (r string, exists bool)
- func (m *GroupMutation) DocumentsCleared() bool
- func (m *GroupMutation) DocumentsIDs() (ids []uuid.UUID)
- func (m *GroupMutation) EdgeCleared(name string) bool
- func (m *GroupMutation) Field(name string) (ent.Value, bool)
- func (m *GroupMutation) FieldCleared(name string) bool
- func (m *GroupMutation) Fields() []string
- func (m *GroupMutation) ID() (id uuid.UUID, exists bool)
- func (m *GroupMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *GroupMutation) InvitationTokensCleared() bool
- func (m *GroupMutation) InvitationTokensIDs() (ids []uuid.UUID)
- func (m *GroupMutation) ItemsCleared() bool
- func (m *GroupMutation) ItemsIDs() (ids []uuid.UUID)
- func (m *GroupMutation) LabelsCleared() bool
- func (m *GroupMutation) LabelsIDs() (ids []uuid.UUID)
- func (m *GroupMutation) LocationsCleared() bool
- func (m *GroupMutation) LocationsIDs() (ids []uuid.UUID)
- func (m *GroupMutation) Name() (r string, exists bool)
- func (m *GroupMutation) NotifiersCleared() bool
- func (m *GroupMutation) NotifiersIDs() (ids []uuid.UUID)
- func (m *GroupMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupMutation) OldCurrency(ctx context.Context) (v string, err error)
- func (m *GroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GroupMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupMutation) Op() Op
- func (m *GroupMutation) RemoveDocumentIDs(ids ...uuid.UUID)
- func (m *GroupMutation) RemoveInvitationTokenIDs(ids ...uuid.UUID)
- func (m *GroupMutation) RemoveItemIDs(ids ...uuid.UUID)
- func (m *GroupMutation) RemoveLabelIDs(ids ...uuid.UUID)
- func (m *GroupMutation) RemoveLocationIDs(ids ...uuid.UUID)
- func (m *GroupMutation) RemoveNotifierIDs(ids ...uuid.UUID)
- func (m *GroupMutation) RemoveUserIDs(ids ...uuid.UUID)
- func (m *GroupMutation) RemovedDocumentsIDs() (ids []uuid.UUID)
- func (m *GroupMutation) RemovedEdges() []string
- func (m *GroupMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupMutation) RemovedInvitationTokensIDs() (ids []uuid.UUID)
- func (m *GroupMutation) RemovedItemsIDs() (ids []uuid.UUID)
- func (m *GroupMutation) RemovedLabelsIDs() (ids []uuid.UUID)
- func (m *GroupMutation) RemovedLocationsIDs() (ids []uuid.UUID)
- func (m *GroupMutation) RemovedNotifiersIDs() (ids []uuid.UUID)
- func (m *GroupMutation) RemovedUsersIDs() (ids []uuid.UUID)
- func (m *GroupMutation) ResetCreatedAt()
- func (m *GroupMutation) ResetCurrency()
- func (m *GroupMutation) ResetDocuments()
- func (m *GroupMutation) ResetEdge(name string) error
- func (m *GroupMutation) ResetField(name string) error
- func (m *GroupMutation) ResetInvitationTokens()
- func (m *GroupMutation) ResetItems()
- func (m *GroupMutation) ResetLabels()
- func (m *GroupMutation) ResetLocations()
- func (m *GroupMutation) ResetName()
- func (m *GroupMutation) ResetNotifiers()
- func (m *GroupMutation) ResetUpdatedAt()
- func (m *GroupMutation) ResetUsers()
- func (m *GroupMutation) SetCreatedAt(t time.Time)
- func (m *GroupMutation) SetCurrency(s string)
- func (m *GroupMutation) SetField(name string, value ent.Value) error
- func (m *GroupMutation) SetID(id uuid.UUID)
- func (m *GroupMutation) SetName(s string)
- func (m *GroupMutation) SetOp(op Op)
- func (m *GroupMutation) SetUpdatedAt(t time.Time)
- func (m GroupMutation) Tx() (*Tx, error)
- func (m *GroupMutation) Type() string
- func (m *GroupMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *GroupMutation) UsersCleared() bool
- func (m *GroupMutation) UsersIDs() (ids []uuid.UUID)
- func (m *GroupMutation) Where(ps ...predicate.Group)
- func (m *GroupMutation) WhereP(ps ...func(*sql.Selector))
- type GroupQuery
- func (gq *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect
- func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
- func (gq *GroupQuery) AllX(ctx context.Context) []*Group
- func (gq *GroupQuery) Clone() *GroupQuery
- func (gq *GroupQuery) Count(ctx context.Context) (int, error)
- func (gq *GroupQuery) CountX(ctx context.Context) int
- func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GroupQuery) ExistX(ctx context.Context) bool
- func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (gq *GroupQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (gq *GroupQuery) FirstX(ctx context.Context) *Group
- func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
- func (gq *GroupQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (gq *GroupQuery) IDsX(ctx context.Context) []uuid.UUID
- func (gq *GroupQuery) Limit(limit int) *GroupQuery
- func (gq *GroupQuery) Offset(offset int) *GroupQuery
- func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (gq *GroupQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
- func (gq *GroupQuery) Order(o ...group.OrderOption) *GroupQuery
- func (gq *GroupQuery) QueryDocuments() *DocumentQuery
- func (gq *GroupQuery) QueryInvitationTokens() *GroupInvitationTokenQuery
- func (gq *GroupQuery) QueryItems() *ItemQuery
- func (gq *GroupQuery) QueryLabels() *LabelQuery
- func (gq *GroupQuery) QueryLocations() *LocationQuery
- func (gq *GroupQuery) QueryNotifiers() *NotifierQuery
- func (gq *GroupQuery) QueryUsers() *UserQuery
- func (gq *GroupQuery) Select(fields ...string) *GroupSelect
- func (gq *GroupQuery) Unique(unique bool) *GroupQuery
- func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
- func (gq *GroupQuery) WithDocuments(opts ...func(*DocumentQuery)) *GroupQuery
- func (gq *GroupQuery) WithInvitationTokens(opts ...func(*GroupInvitationTokenQuery)) *GroupQuery
- func (gq *GroupQuery) WithItems(opts ...func(*ItemQuery)) *GroupQuery
- func (gq *GroupQuery) WithLabels(opts ...func(*LabelQuery)) *GroupQuery
- func (gq *GroupQuery) WithLocations(opts ...func(*LocationQuery)) *GroupQuery
- func (gq *GroupQuery) WithNotifiers(opts ...func(*NotifierQuery)) *GroupQuery
- func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
- type GroupSelect
- func (gs *GroupSelect) Aggregate(fns ...AggregateFunc) *GroupSelect
- func (s *GroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupSelect) BoolX(ctx context.Context) bool
- func (s *GroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupSelect) BoolsX(ctx context.Context) []bool
- func (s *GroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupSelect) Float64X(ctx context.Context) float64
- func (s *GroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupSelect) Float64sX(ctx context.Context) []float64
- func (s *GroupSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroupSelect) IntX(ctx context.Context) int
- func (s *GroupSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroupSelect) IntsX(ctx context.Context) []int
- func (gs *GroupSelect) Scan(ctx context.Context, v any) error
- func (s *GroupSelect) ScanX(ctx context.Context, v any)
- func (s *GroupSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroupSelect) StringX(ctx context.Context) string
- func (s *GroupSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroupSelect) StringsX(ctx context.Context) []string
- type GroupUpdate
- func (gu *GroupUpdate) AddDocumentIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) AddDocuments(d ...*Document) *GroupUpdate
- func (gu *GroupUpdate) AddInvitationTokenIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) AddInvitationTokens(g ...*GroupInvitationToken) *GroupUpdate
- func (gu *GroupUpdate) AddItemIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) AddItems(i ...*Item) *GroupUpdate
- func (gu *GroupUpdate) AddLabelIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) AddLabels(l ...*Label) *GroupUpdate
- func (gu *GroupUpdate) AddLocationIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) AddLocations(l ...*Location) *GroupUpdate
- func (gu *GroupUpdate) AddNotifierIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) AddNotifiers(n ...*Notifier) *GroupUpdate
- func (gu *GroupUpdate) AddUserIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) ClearDocuments() *GroupUpdate
- func (gu *GroupUpdate) ClearInvitationTokens() *GroupUpdate
- func (gu *GroupUpdate) ClearItems() *GroupUpdate
- func (gu *GroupUpdate) ClearLabels() *GroupUpdate
- func (gu *GroupUpdate) ClearLocations() *GroupUpdate
- func (gu *GroupUpdate) ClearNotifiers() *GroupUpdate
- func (gu *GroupUpdate) ClearUsers() *GroupUpdate
- func (gu *GroupUpdate) Exec(ctx context.Context) error
- func (gu *GroupUpdate) ExecX(ctx context.Context)
- func (gu *GroupUpdate) Mutation() *GroupMutation
- func (gu *GroupUpdate) RemoveDocumentIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) RemoveDocuments(d ...*Document) *GroupUpdate
- func (gu *GroupUpdate) RemoveInvitationTokenIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) RemoveInvitationTokens(g ...*GroupInvitationToken) *GroupUpdate
- func (gu *GroupUpdate) RemoveItemIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) RemoveItems(i ...*Item) *GroupUpdate
- func (gu *GroupUpdate) RemoveLabelIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) RemoveLabels(l ...*Label) *GroupUpdate
- func (gu *GroupUpdate) RemoveLocationIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) RemoveLocations(l ...*Location) *GroupUpdate
- func (gu *GroupUpdate) RemoveNotifierIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) RemoveNotifiers(n ...*Notifier) *GroupUpdate
- func (gu *GroupUpdate) RemoveUserIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
- func (gu *GroupUpdate) SaveX(ctx context.Context) int
- func (gu *GroupUpdate) SetCurrency(s string) *GroupUpdate
- func (gu *GroupUpdate) SetName(s string) *GroupUpdate
- func (gu *GroupUpdate) SetNillableCurrency(s *string) *GroupUpdate
- func (gu *GroupUpdate) SetNillableName(s *string) *GroupUpdate
- func (gu *GroupUpdate) SetUpdatedAt(t time.Time) *GroupUpdate
- func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
- type GroupUpdateOne
- func (guo *GroupUpdateOne) AddDocumentIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddDocuments(d ...*Document) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddInvitationTokenIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddInvitationTokens(g ...*GroupInvitationToken) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddItemIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddItems(i ...*Item) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddLabelIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddLabels(l ...*Label) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddLocationIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddLocations(l ...*Location) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddNotifierIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddNotifiers(n ...*Notifier) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddUserIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearDocuments() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearInvitationTokens() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearItems() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearLabels() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearLocations() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearNotifiers() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
- func (guo *GroupUpdateOne) Exec(ctx context.Context) error
- func (guo *GroupUpdateOne) ExecX(ctx context.Context)
- func (guo *GroupUpdateOne) Mutation() *GroupMutation
- func (guo *GroupUpdateOne) RemoveDocumentIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveDocuments(d ...*Document) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveInvitationTokenIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveInvitationTokens(g ...*GroupInvitationToken) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveItemIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveItems(i ...*Item) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveLabelIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveLabels(l ...*Label) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveLocationIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveLocations(l ...*Location) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveNotifierIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveNotifiers(n ...*Notifier) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
- func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
- func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetCurrency(s string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableCurrency(s *string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableName(s *string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetUpdatedAt(t time.Time) *GroupUpdateOne
- func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne
- type Groups
- type Hook
- type InterceptFunc
- type Interceptor
- type Item
- func (i *Item) GetID() uuid.UUID
- func (i *Item) QueryAttachments() *AttachmentQuery
- func (i *Item) QueryChildren() *ItemQuery
- func (i *Item) QueryFields() *ItemFieldQuery
- func (i *Item) QueryGroup() *GroupQuery
- func (i *Item) QueryLabel() *LabelQuery
- func (i *Item) QueryLocation() *LocationQuery
- func (i *Item) QueryMaintenanceEntries() *MaintenanceEntryQuery
- func (i *Item) QueryParent() *ItemQuery
- func (i *Item) String() string
- func (i *Item) Unwrap() *Item
- func (i *Item) Update() *ItemUpdateOne
- func (i *Item) Value(name string) (ent.Value, error)
- type ItemClient
- func (c *ItemClient) Create() *ItemCreate
- func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk
- func (c *ItemClient) Delete() *ItemDelete
- func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne
- func (c *ItemClient) DeleteOneID(id uuid.UUID) *ItemDeleteOne
- func (c *ItemClient) Get(ctx context.Context, id uuid.UUID) (*Item, error)
- func (c *ItemClient) GetX(ctx context.Context, id uuid.UUID) *Item
- func (c *ItemClient) Hooks() []Hook
- func (c *ItemClient) Intercept(interceptors ...Interceptor)
- func (c *ItemClient) Interceptors() []Interceptor
- func (c *ItemClient) MapCreateBulk(slice any, setFunc func(*ItemCreate, int)) *ItemCreateBulk
- func (c *ItemClient) Query() *ItemQuery
- func (c *ItemClient) QueryAttachments(i *Item) *AttachmentQuery
- func (c *ItemClient) QueryChildren(i *Item) *ItemQuery
- func (c *ItemClient) QueryFields(i *Item) *ItemFieldQuery
- func (c *ItemClient) QueryGroup(i *Item) *GroupQuery
- func (c *ItemClient) QueryLabel(i *Item) *LabelQuery
- func (c *ItemClient) QueryLocation(i *Item) *LocationQuery
- func (c *ItemClient) QueryMaintenanceEntries(i *Item) *MaintenanceEntryQuery
- func (c *ItemClient) QueryParent(i *Item) *ItemQuery
- func (c *ItemClient) Update() *ItemUpdate
- func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne
- func (c *ItemClient) UpdateOneID(id uuid.UUID) *ItemUpdateOne
- func (c *ItemClient) Use(hooks ...Hook)
- type ItemCreate
- func (ic *ItemCreate) AddAttachmentIDs(ids ...uuid.UUID) *ItemCreate
- func (ic *ItemCreate) AddAttachments(a ...*Attachment) *ItemCreate
- func (ic *ItemCreate) AddChildIDs(ids ...uuid.UUID) *ItemCreate
- func (ic *ItemCreate) AddChildren(i ...*Item) *ItemCreate
- func (ic *ItemCreate) AddFieldIDs(ids ...uuid.UUID) *ItemCreate
- func (ic *ItemCreate) AddFields(i ...*ItemField) *ItemCreate
- func (ic *ItemCreate) AddLabel(l ...*Label) *ItemCreate
- func (ic *ItemCreate) AddLabelIDs(ids ...uuid.UUID) *ItemCreate
- func (ic *ItemCreate) AddMaintenanceEntries(m ...*MaintenanceEntry) *ItemCreate
- func (ic *ItemCreate) AddMaintenanceEntryIDs(ids ...uuid.UUID) *ItemCreate
- func (ic *ItemCreate) Exec(ctx context.Context) error
- func (ic *ItemCreate) ExecX(ctx context.Context)
- func (ic *ItemCreate) Mutation() *ItemMutation
- func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)
- func (ic *ItemCreate) SaveX(ctx context.Context) *Item
- func (ic *ItemCreate) SetArchived(b bool) *ItemCreate
- func (ic *ItemCreate) SetAssetID(i int) *ItemCreate
- func (ic *ItemCreate) SetCreatedAt(t time.Time) *ItemCreate
- func (ic *ItemCreate) SetDescription(s string) *ItemCreate
- func (ic *ItemCreate) SetGroup(g *Group) *ItemCreate
- func (ic *ItemCreate) SetGroupID(id uuid.UUID) *ItemCreate
- func (ic *ItemCreate) SetID(u uuid.UUID) *ItemCreate
- func (ic *ItemCreate) SetImportRef(s string) *ItemCreate
- func (ic *ItemCreate) SetInsured(b bool) *ItemCreate
- func (ic *ItemCreate) SetLifetimeWarranty(b bool) *ItemCreate
- func (ic *ItemCreate) SetLocation(l *Location) *ItemCreate
- func (ic *ItemCreate) SetLocationID(id uuid.UUID) *ItemCreate
- func (ic *ItemCreate) SetManufacturer(s string) *ItemCreate
- func (ic *ItemCreate) SetModelNumber(s string) *ItemCreate
- func (ic *ItemCreate) SetName(s string) *ItemCreate
- func (ic *ItemCreate) SetNillableArchived(b *bool) *ItemCreate
- func (ic *ItemCreate) SetNillableAssetID(i *int) *ItemCreate
- func (ic *ItemCreate) SetNillableCreatedAt(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetNillableDescription(s *string) *ItemCreate
- func (ic *ItemCreate) SetNillableID(u *uuid.UUID) *ItemCreate
- func (ic *ItemCreate) SetNillableImportRef(s *string) *ItemCreate
- func (ic *ItemCreate) SetNillableInsured(b *bool) *ItemCreate
- func (ic *ItemCreate) SetNillableLifetimeWarranty(b *bool) *ItemCreate
- func (ic *ItemCreate) SetNillableLocationID(id *uuid.UUID) *ItemCreate
- func (ic *ItemCreate) SetNillableManufacturer(s *string) *ItemCreate
- func (ic *ItemCreate) SetNillableModelNumber(s *string) *ItemCreate
- func (ic *ItemCreate) SetNillableNotes(s *string) *ItemCreate
- func (ic *ItemCreate) SetNillableParentID(id *uuid.UUID) *ItemCreate
- func (ic *ItemCreate) SetNillablePurchaseFrom(s *string) *ItemCreate
- func (ic *ItemCreate) SetNillablePurchasePrice(f *float64) *ItemCreate
- func (ic *ItemCreate) SetNillablePurchaseTime(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetNillableQuantity(i *int) *ItemCreate
- func (ic *ItemCreate) SetNillableSerialNumber(s *string) *ItemCreate
- func (ic *ItemCreate) SetNillableSoldNotes(s *string) *ItemCreate
- func (ic *ItemCreate) SetNillableSoldPrice(f *float64) *ItemCreate
- func (ic *ItemCreate) SetNillableSoldTime(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetNillableSoldTo(s *string) *ItemCreate
- func (ic *ItemCreate) SetNillableUpdatedAt(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetNillableWarrantyDetails(s *string) *ItemCreate
- func (ic *ItemCreate) SetNillableWarrantyExpires(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetNotes(s string) *ItemCreate
- func (ic *ItemCreate) SetParent(i *Item) *ItemCreate
- func (ic *ItemCreate) SetParentID(id uuid.UUID) *ItemCreate
- func (ic *ItemCreate) SetPurchaseFrom(s string) *ItemCreate
- func (ic *ItemCreate) SetPurchasePrice(f float64) *ItemCreate
- func (ic *ItemCreate) SetPurchaseTime(t time.Time) *ItemCreate
- func (ic *ItemCreate) SetQuantity(i int) *ItemCreate
- func (ic *ItemCreate) SetSerialNumber(s string) *ItemCreate
- func (ic *ItemCreate) SetSoldNotes(s string) *ItemCreate
- func (ic *ItemCreate) SetSoldPrice(f float64) *ItemCreate
- func (ic *ItemCreate) SetSoldTime(t time.Time) *ItemCreate
- func (ic *ItemCreate) SetSoldTo(s string) *ItemCreate
- func (ic *ItemCreate) SetUpdatedAt(t time.Time) *ItemCreate
- func (ic *ItemCreate) SetWarrantyDetails(s string) *ItemCreate
- func (ic *ItemCreate) SetWarrantyExpires(t time.Time) *ItemCreate
- type ItemCreateBulk
- type ItemDelete
- type ItemDeleteOne
- type ItemEdges
- func (e ItemEdges) AttachmentsOrErr() ([]*Attachment, error)
- func (e ItemEdges) ChildrenOrErr() ([]*Item, error)
- func (e ItemEdges) FieldsOrErr() ([]*ItemField, error)
- func (e ItemEdges) GroupOrErr() (*Group, error)
- func (e ItemEdges) LabelOrErr() ([]*Label, error)
- func (e ItemEdges) LocationOrErr() (*Location, error)
- func (e ItemEdges) MaintenanceEntriesOrErr() ([]*MaintenanceEntry, error)
- func (e ItemEdges) ParentOrErr() (*Item, error)
- type ItemField
- type ItemFieldClient
- func (c *ItemFieldClient) Create() *ItemFieldCreate
- func (c *ItemFieldClient) CreateBulk(builders ...*ItemFieldCreate) *ItemFieldCreateBulk
- func (c *ItemFieldClient) Delete() *ItemFieldDelete
- func (c *ItemFieldClient) DeleteOne(_if *ItemField) *ItemFieldDeleteOne
- func (c *ItemFieldClient) DeleteOneID(id uuid.UUID) *ItemFieldDeleteOne
- func (c *ItemFieldClient) Get(ctx context.Context, id uuid.UUID) (*ItemField, error)
- func (c *ItemFieldClient) GetX(ctx context.Context, id uuid.UUID) *ItemField
- func (c *ItemFieldClient) Hooks() []Hook
- func (c *ItemFieldClient) Intercept(interceptors ...Interceptor)
- func (c *ItemFieldClient) Interceptors() []Interceptor
- func (c *ItemFieldClient) MapCreateBulk(slice any, setFunc func(*ItemFieldCreate, int)) *ItemFieldCreateBulk
- func (c *ItemFieldClient) Query() *ItemFieldQuery
- func (c *ItemFieldClient) QueryItem(_if *ItemField) *ItemQuery
- func (c *ItemFieldClient) Update() *ItemFieldUpdate
- func (c *ItemFieldClient) UpdateOne(_if *ItemField) *ItemFieldUpdateOne
- func (c *ItemFieldClient) UpdateOneID(id uuid.UUID) *ItemFieldUpdateOne
- func (c *ItemFieldClient) Use(hooks ...Hook)
- type ItemFieldCreate
- func (ifc *ItemFieldCreate) Exec(ctx context.Context) error
- func (ifc *ItemFieldCreate) ExecX(ctx context.Context)
- func (ifc *ItemFieldCreate) Mutation() *ItemFieldMutation
- func (ifc *ItemFieldCreate) Save(ctx context.Context) (*ItemField, error)
- func (ifc *ItemFieldCreate) SaveX(ctx context.Context) *ItemField
- func (ifc *ItemFieldCreate) SetBooleanValue(b bool) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetCreatedAt(t time.Time) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetDescription(s string) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetID(u uuid.UUID) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetItem(i *Item) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetItemID(id uuid.UUID) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetName(s string) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetNillableBooleanValue(b *bool) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetNillableCreatedAt(t *time.Time) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetNillableDescription(s *string) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetNillableID(u *uuid.UUID) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetNillableItemID(id *uuid.UUID) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetNillableNumberValue(i *int) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetNillableTextValue(s *string) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetNillableTimeValue(t *time.Time) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetNillableUpdatedAt(t *time.Time) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetNumberValue(i int) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetTextValue(s string) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetTimeValue(t time.Time) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetType(i itemfield.Type) *ItemFieldCreate
- func (ifc *ItemFieldCreate) SetUpdatedAt(t time.Time) *ItemFieldCreate
- type ItemFieldCreateBulk
- type ItemFieldDelete
- type ItemFieldDeleteOne
- type ItemFieldEdges
- type ItemFieldGroupBy
- func (ifgb *ItemFieldGroupBy) Aggregate(fns ...AggregateFunc) *ItemFieldGroupBy
- func (s *ItemFieldGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemFieldGroupBy) BoolX(ctx context.Context) bool
- func (s *ItemFieldGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemFieldGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ItemFieldGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemFieldGroupBy) Float64X(ctx context.Context) float64
- func (s *ItemFieldGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemFieldGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ItemFieldGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ItemFieldGroupBy) IntX(ctx context.Context) int
- func (s *ItemFieldGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ItemFieldGroupBy) IntsX(ctx context.Context) []int
- func (ifgb *ItemFieldGroupBy) Scan(ctx context.Context, v any) error
- func (s *ItemFieldGroupBy) ScanX(ctx context.Context, v any)
- func (s *ItemFieldGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ItemFieldGroupBy) StringX(ctx context.Context) string
- func (s *ItemFieldGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ItemFieldGroupBy) StringsX(ctx context.Context) []string
- type ItemFieldMutation
- func (m *ItemFieldMutation) AddField(name string, value ent.Value) error
- func (m *ItemFieldMutation) AddNumberValue(i int)
- func (m *ItemFieldMutation) AddedEdges() []string
- func (m *ItemFieldMutation) AddedField(name string) (ent.Value, bool)
- func (m *ItemFieldMutation) AddedFields() []string
- func (m *ItemFieldMutation) AddedIDs(name string) []ent.Value
- func (m *ItemFieldMutation) AddedNumberValue() (r int, exists bool)
- func (m *ItemFieldMutation) BooleanValue() (r bool, exists bool)
- func (m *ItemFieldMutation) ClearDescription()
- func (m *ItemFieldMutation) ClearEdge(name string) error
- func (m *ItemFieldMutation) ClearField(name string) error
- func (m *ItemFieldMutation) ClearItem()
- func (m *ItemFieldMutation) ClearNumberValue()
- func (m *ItemFieldMutation) ClearTextValue()
- func (m *ItemFieldMutation) ClearedEdges() []string
- func (m *ItemFieldMutation) ClearedFields() []string
- func (m ItemFieldMutation) Client() *Client
- func (m *ItemFieldMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ItemFieldMutation) Description() (r string, exists bool)
- func (m *ItemFieldMutation) DescriptionCleared() bool
- func (m *ItemFieldMutation) EdgeCleared(name string) bool
- func (m *ItemFieldMutation) Field(name string) (ent.Value, bool)
- func (m *ItemFieldMutation) FieldCleared(name string) bool
- func (m *ItemFieldMutation) Fields() []string
- func (m *ItemFieldMutation) GetType() (r itemfield.Type, exists bool)
- func (m *ItemFieldMutation) ID() (id uuid.UUID, exists bool)
- func (m *ItemFieldMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ItemFieldMutation) ItemCleared() bool
- func (m *ItemFieldMutation) ItemID() (id uuid.UUID, exists bool)
- func (m *ItemFieldMutation) ItemIDs() (ids []uuid.UUID)
- func (m *ItemFieldMutation) Name() (r string, exists bool)
- func (m *ItemFieldMutation) NumberValue() (r int, exists bool)
- func (m *ItemFieldMutation) NumberValueCleared() bool
- func (m *ItemFieldMutation) OldBooleanValue(ctx context.Context) (v bool, err error)
- func (m *ItemFieldMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ItemFieldMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *ItemFieldMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ItemFieldMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ItemFieldMutation) OldNumberValue(ctx context.Context) (v int, err error)
- func (m *ItemFieldMutation) OldTextValue(ctx context.Context) (v string, err error)
- func (m *ItemFieldMutation) OldTimeValue(ctx context.Context) (v time.Time, err error)
- func (m *ItemFieldMutation) OldType(ctx context.Context) (v itemfield.Type, err error)
- func (m *ItemFieldMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ItemFieldMutation) Op() Op
- func (m *ItemFieldMutation) RemovedEdges() []string
- func (m *ItemFieldMutation) RemovedIDs(name string) []ent.Value
- func (m *ItemFieldMutation) ResetBooleanValue()
- func (m *ItemFieldMutation) ResetCreatedAt()
- func (m *ItemFieldMutation) ResetDescription()
- func (m *ItemFieldMutation) ResetEdge(name string) error
- func (m *ItemFieldMutation) ResetField(name string) error
- func (m *ItemFieldMutation) ResetItem()
- func (m *ItemFieldMutation) ResetName()
- func (m *ItemFieldMutation) ResetNumberValue()
- func (m *ItemFieldMutation) ResetTextValue()
- func (m *ItemFieldMutation) ResetTimeValue()
- func (m *ItemFieldMutation) ResetType()
- func (m *ItemFieldMutation) ResetUpdatedAt()
- func (m *ItemFieldMutation) SetBooleanValue(b bool)
- func (m *ItemFieldMutation) SetCreatedAt(t time.Time)
- func (m *ItemFieldMutation) SetDescription(s string)
- func (m *ItemFieldMutation) SetField(name string, value ent.Value) error
- func (m *ItemFieldMutation) SetID(id uuid.UUID)
- func (m *ItemFieldMutation) SetItemID(id uuid.UUID)
- func (m *ItemFieldMutation) SetName(s string)
- func (m *ItemFieldMutation) SetNumberValue(i int)
- func (m *ItemFieldMutation) SetOp(op Op)
- func (m *ItemFieldMutation) SetTextValue(s string)
- func (m *ItemFieldMutation) SetTimeValue(t time.Time)
- func (m *ItemFieldMutation) SetType(i itemfield.Type)
- func (m *ItemFieldMutation) SetUpdatedAt(t time.Time)
- func (m *ItemFieldMutation) TextValue() (r string, exists bool)
- func (m *ItemFieldMutation) TextValueCleared() bool
- func (m *ItemFieldMutation) TimeValue() (r time.Time, exists bool)
- func (m ItemFieldMutation) Tx() (*Tx, error)
- func (m *ItemFieldMutation) Type() string
- func (m *ItemFieldMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ItemFieldMutation) Where(ps ...predicate.ItemField)
- func (m *ItemFieldMutation) WhereP(ps ...func(*sql.Selector))
- type ItemFieldQuery
- func (ifq *ItemFieldQuery) Aggregate(fns ...AggregateFunc) *ItemFieldSelect
- func (ifq *ItemFieldQuery) All(ctx context.Context) ([]*ItemField, error)
- func (ifq *ItemFieldQuery) AllX(ctx context.Context) []*ItemField
- func (ifq *ItemFieldQuery) Clone() *ItemFieldQuery
- func (ifq *ItemFieldQuery) Count(ctx context.Context) (int, error)
- func (ifq *ItemFieldQuery) CountX(ctx context.Context) int
- func (ifq *ItemFieldQuery) Exist(ctx context.Context) (bool, error)
- func (ifq *ItemFieldQuery) ExistX(ctx context.Context) bool
- func (ifq *ItemFieldQuery) First(ctx context.Context) (*ItemField, error)
- func (ifq *ItemFieldQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (ifq *ItemFieldQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (ifq *ItemFieldQuery) FirstX(ctx context.Context) *ItemField
- func (ifq *ItemFieldQuery) GroupBy(field string, fields ...string) *ItemFieldGroupBy
- func (ifq *ItemFieldQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (ifq *ItemFieldQuery) IDsX(ctx context.Context) []uuid.UUID
- func (ifq *ItemFieldQuery) Limit(limit int) *ItemFieldQuery
- func (ifq *ItemFieldQuery) Offset(offset int) *ItemFieldQuery
- func (ifq *ItemFieldQuery) Only(ctx context.Context) (*ItemField, error)
- func (ifq *ItemFieldQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (ifq *ItemFieldQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (ifq *ItemFieldQuery) OnlyX(ctx context.Context) *ItemField
- func (ifq *ItemFieldQuery) Order(o ...itemfield.OrderOption) *ItemFieldQuery
- func (ifq *ItemFieldQuery) QueryItem() *ItemQuery
- func (ifq *ItemFieldQuery) Select(fields ...string) *ItemFieldSelect
- func (ifq *ItemFieldQuery) Unique(unique bool) *ItemFieldQuery
- func (ifq *ItemFieldQuery) Where(ps ...predicate.ItemField) *ItemFieldQuery
- func (ifq *ItemFieldQuery) WithItem(opts ...func(*ItemQuery)) *ItemFieldQuery
- type ItemFieldSelect
- func (ifs *ItemFieldSelect) Aggregate(fns ...AggregateFunc) *ItemFieldSelect
- func (s *ItemFieldSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemFieldSelect) BoolX(ctx context.Context) bool
- func (s *ItemFieldSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemFieldSelect) BoolsX(ctx context.Context) []bool
- func (s *ItemFieldSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemFieldSelect) Float64X(ctx context.Context) float64
- func (s *ItemFieldSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemFieldSelect) Float64sX(ctx context.Context) []float64
- func (s *ItemFieldSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ItemFieldSelect) IntX(ctx context.Context) int
- func (s *ItemFieldSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ItemFieldSelect) IntsX(ctx context.Context) []int
- func (ifs *ItemFieldSelect) Scan(ctx context.Context, v any) error
- func (s *ItemFieldSelect) ScanX(ctx context.Context, v any)
- func (s *ItemFieldSelect) String(ctx context.Context) (_ string, err error)
- func (s *ItemFieldSelect) StringX(ctx context.Context) string
- func (s *ItemFieldSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ItemFieldSelect) StringsX(ctx context.Context) []string
- type ItemFieldUpdate
- func (ifu *ItemFieldUpdate) AddNumberValue(i int) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) ClearDescription() *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) ClearItem() *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) ClearNumberValue() *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) ClearTextValue() *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) Exec(ctx context.Context) error
- func (ifu *ItemFieldUpdate) ExecX(ctx context.Context)
- func (ifu *ItemFieldUpdate) Mutation() *ItemFieldMutation
- func (ifu *ItemFieldUpdate) Save(ctx context.Context) (int, error)
- func (ifu *ItemFieldUpdate) SaveX(ctx context.Context) int
- func (ifu *ItemFieldUpdate) SetBooleanValue(b bool) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetDescription(s string) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetItem(i *Item) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetItemID(id uuid.UUID) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetName(s string) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetNillableBooleanValue(b *bool) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetNillableDescription(s *string) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetNillableItemID(id *uuid.UUID) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetNillableName(s *string) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetNillableNumberValue(i *int) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetNillableTextValue(s *string) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetNillableTimeValue(t *time.Time) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetNillableType(i *itemfield.Type) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetNumberValue(i int) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetTextValue(s string) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetTimeValue(t time.Time) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetType(i itemfield.Type) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) SetUpdatedAt(t time.Time) *ItemFieldUpdate
- func (ifu *ItemFieldUpdate) Where(ps ...predicate.ItemField) *ItemFieldUpdate
- type ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) AddNumberValue(i int) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) ClearDescription() *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) ClearItem() *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) ClearNumberValue() *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) ClearTextValue() *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) Exec(ctx context.Context) error
- func (ifuo *ItemFieldUpdateOne) ExecX(ctx context.Context)
- func (ifuo *ItemFieldUpdateOne) Mutation() *ItemFieldMutation
- func (ifuo *ItemFieldUpdateOne) Save(ctx context.Context) (*ItemField, error)
- func (ifuo *ItemFieldUpdateOne) SaveX(ctx context.Context) *ItemField
- func (ifuo *ItemFieldUpdateOne) Select(field string, fields ...string) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetBooleanValue(b bool) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetDescription(s string) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetItem(i *Item) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetItemID(id uuid.UUID) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetName(s string) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetNillableBooleanValue(b *bool) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetNillableDescription(s *string) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetNillableItemID(id *uuid.UUID) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetNillableName(s *string) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetNillableNumberValue(i *int) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetNillableTextValue(s *string) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetNillableTimeValue(t *time.Time) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetNillableType(i *itemfield.Type) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetNumberValue(i int) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetTextValue(s string) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetTimeValue(t time.Time) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetType(i itemfield.Type) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) SetUpdatedAt(t time.Time) *ItemFieldUpdateOne
- func (ifuo *ItemFieldUpdateOne) Where(ps ...predicate.ItemField) *ItemFieldUpdateOne
- type ItemFields
- type ItemGroupBy
- func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy
- func (s *ItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemGroupBy) BoolX(ctx context.Context) bool
- func (s *ItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemGroupBy) Float64X(ctx context.Context) float64
- func (s *ItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ItemGroupBy) IntX(ctx context.Context) int
- func (s *ItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ItemGroupBy) IntsX(ctx context.Context) []int
- func (igb *ItemGroupBy) Scan(ctx context.Context, v any) error
- func (s *ItemGroupBy) ScanX(ctx context.Context, v any)
- func (s *ItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ItemGroupBy) StringX(ctx context.Context) string
- func (s *ItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ItemGroupBy) StringsX(ctx context.Context) []string
- type ItemMutation
- func (m *ItemMutation) AddAssetID(i int)
- func (m *ItemMutation) AddAttachmentIDs(ids ...uuid.UUID)
- func (m *ItemMutation) AddChildIDs(ids ...uuid.UUID)
- func (m *ItemMutation) AddField(name string, value ent.Value) error
- func (m *ItemMutation) AddFieldIDs(ids ...uuid.UUID)
- func (m *ItemMutation) AddLabelIDs(ids ...uuid.UUID)
- func (m *ItemMutation) AddMaintenanceEntryIDs(ids ...uuid.UUID)
- func (m *ItemMutation) AddPurchasePrice(f float64)
- func (m *ItemMutation) AddQuantity(i int)
- func (m *ItemMutation) AddSoldPrice(f float64)
- func (m *ItemMutation) AddedAssetID() (r int, exists bool)
- func (m *ItemMutation) AddedEdges() []string
- func (m *ItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *ItemMutation) AddedFields() []string
- func (m *ItemMutation) AddedIDs(name string) []ent.Value
- func (m *ItemMutation) AddedPurchasePrice() (r float64, exists bool)
- func (m *ItemMutation) AddedQuantity() (r int, exists bool)
- func (m *ItemMutation) AddedSoldPrice() (r float64, exists bool)
- func (m *ItemMutation) Archived() (r bool, exists bool)
- func (m *ItemMutation) AssetID() (r int, exists bool)
- func (m *ItemMutation) AttachmentsCleared() bool
- func (m *ItemMutation) AttachmentsIDs() (ids []uuid.UUID)
- func (m *ItemMutation) ChildrenCleared() bool
- func (m *ItemMutation) ChildrenIDs() (ids []uuid.UUID)
- func (m *ItemMutation) ClearAttachments()
- func (m *ItemMutation) ClearChildren()
- func (m *ItemMutation) ClearDescription()
- func (m *ItemMutation) ClearEdge(name string) error
- func (m *ItemMutation) ClearField(name string) error
- func (m *ItemMutation) ClearFields()
- func (m *ItemMutation) ClearGroup()
- func (m *ItemMutation) ClearImportRef()
- func (m *ItemMutation) ClearLabel()
- func (m *ItemMutation) ClearLocation()
- func (m *ItemMutation) ClearMaintenanceEntries()
- func (m *ItemMutation) ClearManufacturer()
- func (m *ItemMutation) ClearModelNumber()
- func (m *ItemMutation) ClearNotes()
- func (m *ItemMutation) ClearParent()
- func (m *ItemMutation) ClearPurchaseFrom()
- func (m *ItemMutation) ClearPurchaseTime()
- func (m *ItemMutation) ClearSerialNumber()
- func (m *ItemMutation) ClearSoldNotes()
- func (m *ItemMutation) ClearSoldTime()
- func (m *ItemMutation) ClearSoldTo()
- func (m *ItemMutation) ClearWarrantyDetails()
- func (m *ItemMutation) ClearWarrantyExpires()
- func (m *ItemMutation) ClearedEdges() []string
- func (m *ItemMutation) ClearedFields() []string
- func (m ItemMutation) Client() *Client
- func (m *ItemMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ItemMutation) Description() (r string, exists bool)
- func (m *ItemMutation) DescriptionCleared() bool
- func (m *ItemMutation) EdgeCleared(name string) bool
- func (m *ItemMutation) Field(name string) (ent.Value, bool)
- func (m *ItemMutation) FieldCleared(name string) bool
- func (m *ItemMutation) Fields() []string
- func (m *ItemMutation) FieldsCleared() bool
- func (m *ItemMutation) FieldsIDs() (ids []uuid.UUID)
- func (m *ItemMutation) GroupCleared() bool
- func (m *ItemMutation) GroupID() (id uuid.UUID, exists bool)
- func (m *ItemMutation) GroupIDs() (ids []uuid.UUID)
- func (m *ItemMutation) ID() (id uuid.UUID, exists bool)
- func (m *ItemMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ItemMutation) ImportRef() (r string, exists bool)
- func (m *ItemMutation) ImportRefCleared() bool
- func (m *ItemMutation) Insured() (r bool, exists bool)
- func (m *ItemMutation) LabelCleared() bool
- func (m *ItemMutation) LabelIDs() (ids []uuid.UUID)
- func (m *ItemMutation) LifetimeWarranty() (r bool, exists bool)
- func (m *ItemMutation) LocationCleared() bool
- func (m *ItemMutation) LocationID() (id uuid.UUID, exists bool)
- func (m *ItemMutation) LocationIDs() (ids []uuid.UUID)
- func (m *ItemMutation) MaintenanceEntriesCleared() bool
- func (m *ItemMutation) MaintenanceEntriesIDs() (ids []uuid.UUID)
- func (m *ItemMutation) Manufacturer() (r string, exists bool)
- func (m *ItemMutation) ManufacturerCleared() bool
- func (m *ItemMutation) ModelNumber() (r string, exists bool)
- func (m *ItemMutation) ModelNumberCleared() bool
- func (m *ItemMutation) Name() (r string, exists bool)
- func (m *ItemMutation) Notes() (r string, exists bool)
- func (m *ItemMutation) NotesCleared() bool
- func (m *ItemMutation) OldArchived(ctx context.Context) (v bool, err error)
- func (m *ItemMutation) OldAssetID(ctx context.Context) (v int, err error)
- func (m *ItemMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ItemMutation) OldImportRef(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldInsured(ctx context.Context) (v bool, err error)
- func (m *ItemMutation) OldLifetimeWarranty(ctx context.Context) (v bool, err error)
- func (m *ItemMutation) OldManufacturer(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldModelNumber(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldNotes(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldPurchaseFrom(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldPurchasePrice(ctx context.Context) (v float64, err error)
- func (m *ItemMutation) OldPurchaseTime(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) OldQuantity(ctx context.Context) (v int, err error)
- func (m *ItemMutation) OldSerialNumber(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldSoldNotes(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldSoldPrice(ctx context.Context) (v float64, err error)
- func (m *ItemMutation) OldSoldTime(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) OldSoldTo(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) OldWarrantyDetails(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldWarrantyExpires(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) Op() Op
- func (m *ItemMutation) ParentCleared() bool
- func (m *ItemMutation) ParentID() (id uuid.UUID, exists bool)
- func (m *ItemMutation) ParentIDs() (ids []uuid.UUID)
- func (m *ItemMutation) PurchaseFrom() (r string, exists bool)
- func (m *ItemMutation) PurchaseFromCleared() bool
- func (m *ItemMutation) PurchasePrice() (r float64, exists bool)
- func (m *ItemMutation) PurchaseTime() (r time.Time, exists bool)
- func (m *ItemMutation) PurchaseTimeCleared() bool
- func (m *ItemMutation) Quantity() (r int, exists bool)
- func (m *ItemMutation) RemoveAttachmentIDs(ids ...uuid.UUID)
- func (m *ItemMutation) RemoveChildIDs(ids ...uuid.UUID)
- func (m *ItemMutation) RemoveFieldIDs(ids ...uuid.UUID)
- func (m *ItemMutation) RemoveLabelIDs(ids ...uuid.UUID)
- func (m *ItemMutation) RemoveMaintenanceEntryIDs(ids ...uuid.UUID)
- func (m *ItemMutation) RemovedAttachmentsIDs() (ids []uuid.UUID)
- func (m *ItemMutation) RemovedChildrenIDs() (ids []uuid.UUID)
- func (m *ItemMutation) RemovedEdges() []string
- func (m *ItemMutation) RemovedFieldsIDs() (ids []uuid.UUID)
- func (m *ItemMutation) RemovedIDs(name string) []ent.Value
- func (m *ItemMutation) RemovedLabelIDs() (ids []uuid.UUID)
- func (m *ItemMutation) RemovedMaintenanceEntriesIDs() (ids []uuid.UUID)
- func (m *ItemMutation) ResetArchived()
- func (m *ItemMutation) ResetAssetID()
- func (m *ItemMutation) ResetAttachments()
- func (m *ItemMutation) ResetChildren()
- func (m *ItemMutation) ResetCreatedAt()
- func (m *ItemMutation) ResetDescription()
- func (m *ItemMutation) ResetEdge(name string) error
- func (m *ItemMutation) ResetField(name string) error
- func (m *ItemMutation) ResetFields()
- func (m *ItemMutation) ResetGroup()
- func (m *ItemMutation) ResetImportRef()
- func (m *ItemMutation) ResetInsured()
- func (m *ItemMutation) ResetLabel()
- func (m *ItemMutation) ResetLifetimeWarranty()
- func (m *ItemMutation) ResetLocation()
- func (m *ItemMutation) ResetMaintenanceEntries()
- func (m *ItemMutation) ResetManufacturer()
- func (m *ItemMutation) ResetModelNumber()
- func (m *ItemMutation) ResetName()
- func (m *ItemMutation) ResetNotes()
- func (m *ItemMutation) ResetParent()
- func (m *ItemMutation) ResetPurchaseFrom()
- func (m *ItemMutation) ResetPurchasePrice()
- func (m *ItemMutation) ResetPurchaseTime()
- func (m *ItemMutation) ResetQuantity()
- func (m *ItemMutation) ResetSerialNumber()
- func (m *ItemMutation) ResetSoldNotes()
- func (m *ItemMutation) ResetSoldPrice()
- func (m *ItemMutation) ResetSoldTime()
- func (m *ItemMutation) ResetSoldTo()
- func (m *ItemMutation) ResetUpdatedAt()
- func (m *ItemMutation) ResetWarrantyDetails()
- func (m *ItemMutation) ResetWarrantyExpires()
- func (m *ItemMutation) SerialNumber() (r string, exists bool)
- func (m *ItemMutation) SerialNumberCleared() bool
- func (m *ItemMutation) SetArchived(b bool)
- func (m *ItemMutation) SetAssetID(i int)
- func (m *ItemMutation) SetCreatedAt(t time.Time)
- func (m *ItemMutation) SetDescription(s string)
- func (m *ItemMutation) SetField(name string, value ent.Value) error
- func (m *ItemMutation) SetGroupID(id uuid.UUID)
- func (m *ItemMutation) SetID(id uuid.UUID)
- func (m *ItemMutation) SetImportRef(s string)
- func (m *ItemMutation) SetInsured(b bool)
- func (m *ItemMutation) SetLifetimeWarranty(b bool)
- func (m *ItemMutation) SetLocationID(id uuid.UUID)
- func (m *ItemMutation) SetManufacturer(s string)
- func (m *ItemMutation) SetModelNumber(s string)
- func (m *ItemMutation) SetName(s string)
- func (m *ItemMutation) SetNotes(s string)
- func (m *ItemMutation) SetOp(op Op)
- func (m *ItemMutation) SetParentID(id uuid.UUID)
- func (m *ItemMutation) SetPurchaseFrom(s string)
- func (m *ItemMutation) SetPurchasePrice(f float64)
- func (m *ItemMutation) SetPurchaseTime(t time.Time)
- func (m *ItemMutation) SetQuantity(i int)
- func (m *ItemMutation) SetSerialNumber(s string)
- func (m *ItemMutation) SetSoldNotes(s string)
- func (m *ItemMutation) SetSoldPrice(f float64)
- func (m *ItemMutation) SetSoldTime(t time.Time)
- func (m *ItemMutation) SetSoldTo(s string)
- func (m *ItemMutation) SetUpdatedAt(t time.Time)
- func (m *ItemMutation) SetWarrantyDetails(s string)
- func (m *ItemMutation) SetWarrantyExpires(t time.Time)
- func (m *ItemMutation) SoldNotes() (r string, exists bool)
- func (m *ItemMutation) SoldNotesCleared() bool
- func (m *ItemMutation) SoldPrice() (r float64, exists bool)
- func (m *ItemMutation) SoldTime() (r time.Time, exists bool)
- func (m *ItemMutation) SoldTimeCleared() bool
- func (m *ItemMutation) SoldTo() (r string, exists bool)
- func (m *ItemMutation) SoldToCleared() bool
- func (m ItemMutation) Tx() (*Tx, error)
- func (m *ItemMutation) Type() string
- func (m *ItemMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ItemMutation) WarrantyDetails() (r string, exists bool)
- func (m *ItemMutation) WarrantyDetailsCleared() bool
- func (m *ItemMutation) WarrantyExpires() (r time.Time, exists bool)
- func (m *ItemMutation) WarrantyExpiresCleared() bool
- func (m *ItemMutation) Where(ps ...predicate.Item)
- func (m *ItemMutation) WhereP(ps ...func(*sql.Selector))
- type ItemQuery
- func (iq *ItemQuery) Aggregate(fns ...AggregateFunc) *ItemSelect
- func (iq *ItemQuery) All(ctx context.Context) ([]*Item, error)
- func (iq *ItemQuery) AllX(ctx context.Context) []*Item
- func (iq *ItemQuery) Clone() *ItemQuery
- func (iq *ItemQuery) Count(ctx context.Context) (int, error)
- func (iq *ItemQuery) CountX(ctx context.Context) int
- func (iq *ItemQuery) Exist(ctx context.Context) (bool, error)
- func (iq *ItemQuery) ExistX(ctx context.Context) bool
- func (iq *ItemQuery) First(ctx context.Context) (*Item, error)
- func (iq *ItemQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *ItemQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (iq *ItemQuery) FirstX(ctx context.Context) *Item
- func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy
- func (iq *ItemQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (iq *ItemQuery) IDsX(ctx context.Context) []uuid.UUID
- func (iq *ItemQuery) Limit(limit int) *ItemQuery
- func (iq *ItemQuery) Offset(offset int) *ItemQuery
- func (iq *ItemQuery) Only(ctx context.Context) (*Item, error)
- func (iq *ItemQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *ItemQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (iq *ItemQuery) OnlyX(ctx context.Context) *Item
- func (iq *ItemQuery) Order(o ...item.OrderOption) *ItemQuery
- func (iq *ItemQuery) QueryAttachments() *AttachmentQuery
- func (iq *ItemQuery) QueryChildren() *ItemQuery
- func (iq *ItemQuery) QueryFields() *ItemFieldQuery
- func (iq *ItemQuery) QueryGroup() *GroupQuery
- func (iq *ItemQuery) QueryLabel() *LabelQuery
- func (iq *ItemQuery) QueryLocation() *LocationQuery
- func (iq *ItemQuery) QueryMaintenanceEntries() *MaintenanceEntryQuery
- func (iq *ItemQuery) QueryParent() *ItemQuery
- func (iq *ItemQuery) Select(fields ...string) *ItemSelect
- func (iq *ItemQuery) Unique(unique bool) *ItemQuery
- func (iq *ItemQuery) Where(ps ...predicate.Item) *ItemQuery
- func (iq *ItemQuery) WithAttachments(opts ...func(*AttachmentQuery)) *ItemQuery
- func (iq *ItemQuery) WithChildren(opts ...func(*ItemQuery)) *ItemQuery
- func (iq *ItemQuery) WithFields(opts ...func(*ItemFieldQuery)) *ItemQuery
- func (iq *ItemQuery) WithGroup(opts ...func(*GroupQuery)) *ItemQuery
- func (iq *ItemQuery) WithLabel(opts ...func(*LabelQuery)) *ItemQuery
- func (iq *ItemQuery) WithLocation(opts ...func(*LocationQuery)) *ItemQuery
- func (iq *ItemQuery) WithMaintenanceEntries(opts ...func(*MaintenanceEntryQuery)) *ItemQuery
- func (iq *ItemQuery) WithParent(opts ...func(*ItemQuery)) *ItemQuery
- type ItemSelect
- func (is *ItemSelect) Aggregate(fns ...AggregateFunc) *ItemSelect
- func (s *ItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemSelect) BoolX(ctx context.Context) bool
- func (s *ItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemSelect) BoolsX(ctx context.Context) []bool
- func (s *ItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemSelect) Float64X(ctx context.Context) float64
- func (s *ItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemSelect) Float64sX(ctx context.Context) []float64
- func (s *ItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ItemSelect) IntX(ctx context.Context) int
- func (s *ItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ItemSelect) IntsX(ctx context.Context) []int
- func (is *ItemSelect) Scan(ctx context.Context, v any) error
- func (s *ItemSelect) ScanX(ctx context.Context, v any)
- func (s *ItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *ItemSelect) StringX(ctx context.Context) string
- func (s *ItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ItemSelect) StringsX(ctx context.Context) []string
- type ItemUpdate
- func (iu *ItemUpdate) AddAssetID(i int) *ItemUpdate
- func (iu *ItemUpdate) AddAttachmentIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) AddAttachments(a ...*Attachment) *ItemUpdate
- func (iu *ItemUpdate) AddChildIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) AddChildren(i ...*Item) *ItemUpdate
- func (iu *ItemUpdate) AddFieldIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) AddFields(i ...*ItemField) *ItemUpdate
- func (iu *ItemUpdate) AddLabel(l ...*Label) *ItemUpdate
- func (iu *ItemUpdate) AddLabelIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) AddMaintenanceEntries(m ...*MaintenanceEntry) *ItemUpdate
- func (iu *ItemUpdate) AddMaintenanceEntryIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) AddPurchasePrice(f float64) *ItemUpdate
- func (iu *ItemUpdate) AddQuantity(i int) *ItemUpdate
- func (iu *ItemUpdate) AddSoldPrice(f float64) *ItemUpdate
- func (iu *ItemUpdate) ClearAttachments() *ItemUpdate
- func (iu *ItemUpdate) ClearChildren() *ItemUpdate
- func (iu *ItemUpdate) ClearDescription() *ItemUpdate
- func (iu *ItemUpdate) ClearFields() *ItemUpdate
- func (iu *ItemUpdate) ClearGroup() *ItemUpdate
- func (iu *ItemUpdate) ClearImportRef() *ItemUpdate
- func (iu *ItemUpdate) ClearLabel() *ItemUpdate
- func (iu *ItemUpdate) ClearLocation() *ItemUpdate
- func (iu *ItemUpdate) ClearMaintenanceEntries() *ItemUpdate
- func (iu *ItemUpdate) ClearManufacturer() *ItemUpdate
- func (iu *ItemUpdate) ClearModelNumber() *ItemUpdate
- func (iu *ItemUpdate) ClearNotes() *ItemUpdate
- func (iu *ItemUpdate) ClearParent() *ItemUpdate
- func (iu *ItemUpdate) ClearPurchaseFrom() *ItemUpdate
- func (iu *ItemUpdate) ClearPurchaseTime() *ItemUpdate
- func (iu *ItemUpdate) ClearSerialNumber() *ItemUpdate
- func (iu *ItemUpdate) ClearSoldNotes() *ItemUpdate
- func (iu *ItemUpdate) ClearSoldTime() *ItemUpdate
- func (iu *ItemUpdate) ClearSoldTo() *ItemUpdate
- func (iu *ItemUpdate) ClearWarrantyDetails() *ItemUpdate
- func (iu *ItemUpdate) ClearWarrantyExpires() *ItemUpdate
- func (iu *ItemUpdate) Exec(ctx context.Context) error
- func (iu *ItemUpdate) ExecX(ctx context.Context)
- func (iu *ItemUpdate) Mutation() *ItemMutation
- func (iu *ItemUpdate) RemoveAttachmentIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) RemoveAttachments(a ...*Attachment) *ItemUpdate
- func (iu *ItemUpdate) RemoveChildIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) RemoveChildren(i ...*Item) *ItemUpdate
- func (iu *ItemUpdate) RemoveFieldIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) RemoveFields(i ...*ItemField) *ItemUpdate
- func (iu *ItemUpdate) RemoveLabel(l ...*Label) *ItemUpdate
- func (iu *ItemUpdate) RemoveLabelIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) RemoveMaintenanceEntries(m ...*MaintenanceEntry) *ItemUpdate
- func (iu *ItemUpdate) RemoveMaintenanceEntryIDs(ids ...uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) Save(ctx context.Context) (int, error)
- func (iu *ItemUpdate) SaveX(ctx context.Context) int
- func (iu *ItemUpdate) SetArchived(b bool) *ItemUpdate
- func (iu *ItemUpdate) SetAssetID(i int) *ItemUpdate
- func (iu *ItemUpdate) SetDescription(s string) *ItemUpdate
- func (iu *ItemUpdate) SetGroup(g *Group) *ItemUpdate
- func (iu *ItemUpdate) SetGroupID(id uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) SetImportRef(s string) *ItemUpdate
- func (iu *ItemUpdate) SetInsured(b bool) *ItemUpdate
- func (iu *ItemUpdate) SetLifetimeWarranty(b bool) *ItemUpdate
- func (iu *ItemUpdate) SetLocation(l *Location) *ItemUpdate
- func (iu *ItemUpdate) SetLocationID(id uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) SetManufacturer(s string) *ItemUpdate
- func (iu *ItemUpdate) SetModelNumber(s string) *ItemUpdate
- func (iu *ItemUpdate) SetName(s string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableArchived(b *bool) *ItemUpdate
- func (iu *ItemUpdate) SetNillableAssetID(i *int) *ItemUpdate
- func (iu *ItemUpdate) SetNillableDescription(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableImportRef(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableInsured(b *bool) *ItemUpdate
- func (iu *ItemUpdate) SetNillableLifetimeWarranty(b *bool) *ItemUpdate
- func (iu *ItemUpdate) SetNillableLocationID(id *uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) SetNillableManufacturer(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableModelNumber(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableName(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableNotes(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableParentID(id *uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) SetNillablePurchaseFrom(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillablePurchasePrice(f *float64) *ItemUpdate
- func (iu *ItemUpdate) SetNillablePurchaseTime(t *time.Time) *ItemUpdate
- func (iu *ItemUpdate) SetNillableQuantity(i *int) *ItemUpdate
- func (iu *ItemUpdate) SetNillableSerialNumber(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableSoldNotes(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableSoldPrice(f *float64) *ItemUpdate
- func (iu *ItemUpdate) SetNillableSoldTime(t *time.Time) *ItemUpdate
- func (iu *ItemUpdate) SetNillableSoldTo(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableWarrantyDetails(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableWarrantyExpires(t *time.Time) *ItemUpdate
- func (iu *ItemUpdate) SetNotes(s string) *ItemUpdate
- func (iu *ItemUpdate) SetParent(i *Item) *ItemUpdate
- func (iu *ItemUpdate) SetParentID(id uuid.UUID) *ItemUpdate
- func (iu *ItemUpdate) SetPurchaseFrom(s string) *ItemUpdate
- func (iu *ItemUpdate) SetPurchasePrice(f float64) *ItemUpdate
- func (iu *ItemUpdate) SetPurchaseTime(t time.Time) *ItemUpdate
- func (iu *ItemUpdate) SetQuantity(i int) *ItemUpdate
- func (iu *ItemUpdate) SetSerialNumber(s string) *ItemUpdate
- func (iu *ItemUpdate) SetSoldNotes(s string) *ItemUpdate
- func (iu *ItemUpdate) SetSoldPrice(f float64) *ItemUpdate
- func (iu *ItemUpdate) SetSoldTime(t time.Time) *ItemUpdate
- func (iu *ItemUpdate) SetSoldTo(s string) *ItemUpdate
- func (iu *ItemUpdate) SetUpdatedAt(t time.Time) *ItemUpdate
- func (iu *ItemUpdate) SetWarrantyDetails(s string) *ItemUpdate
- func (iu *ItemUpdate) SetWarrantyExpires(t time.Time) *ItemUpdate
- func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate
- type ItemUpdateOne
- func (iuo *ItemUpdateOne) AddAssetID(i int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddAttachmentIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddAttachments(a ...*Attachment) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddChildIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddChildren(i ...*Item) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddFieldIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddFields(i ...*ItemField) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddLabel(l ...*Label) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddLabelIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddMaintenanceEntries(m ...*MaintenanceEntry) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddMaintenanceEntryIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddPurchasePrice(f float64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddQuantity(i int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddSoldPrice(f float64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearAttachments() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearChildren() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearDescription() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearFields() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearGroup() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearImportRef() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearLabel() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearLocation() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearMaintenanceEntries() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearManufacturer() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearModelNumber() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearNotes() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearParent() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearPurchaseFrom() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearPurchaseTime() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearSerialNumber() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearSoldNotes() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearSoldTime() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearSoldTo() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearWarrantyDetails() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearWarrantyExpires() *ItemUpdateOne
- func (iuo *ItemUpdateOne) Exec(ctx context.Context) error
- func (iuo *ItemUpdateOne) ExecX(ctx context.Context)
- func (iuo *ItemUpdateOne) Mutation() *ItemMutation
- func (iuo *ItemUpdateOne) RemoveAttachmentIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveAttachments(a ...*Attachment) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveChildIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveChildren(i ...*Item) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveFieldIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveFields(i ...*ItemField) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveLabel(l ...*Label) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveLabelIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveMaintenanceEntries(m ...*MaintenanceEntry) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveMaintenanceEntryIDs(ids ...uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)
- func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item
- func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetArchived(b bool) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetAssetID(i int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetDescription(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetGroup(g *Group) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetGroupID(id uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetImportRef(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetInsured(b bool) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetLifetimeWarranty(b bool) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetLocation(l *Location) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetLocationID(id uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetManufacturer(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetModelNumber(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetName(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableArchived(b *bool) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableAssetID(i *int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableDescription(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableImportRef(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableInsured(b *bool) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableLifetimeWarranty(b *bool) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableLocationID(id *uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableManufacturer(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableModelNumber(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableName(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableNotes(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableParentID(id *uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillablePurchaseFrom(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillablePurchasePrice(f *float64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillablePurchaseTime(t *time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableQuantity(i *int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableSerialNumber(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableSoldNotes(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableSoldPrice(f *float64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableSoldTime(t *time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableSoldTo(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableWarrantyDetails(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableWarrantyExpires(t *time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNotes(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetParent(i *Item) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetParentID(id uuid.UUID) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetPurchaseFrom(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetPurchasePrice(f float64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetPurchaseTime(t time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetQuantity(i int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetSerialNumber(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetSoldNotes(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetSoldPrice(f float64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetSoldTime(t time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetSoldTo(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetUpdatedAt(t time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetWarrantyDetails(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetWarrantyExpires(t time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) Where(ps ...predicate.Item) *ItemUpdateOne
- type Items
- type Label
- type LabelClient
- func (c *LabelClient) Create() *LabelCreate
- func (c *LabelClient) CreateBulk(builders ...*LabelCreate) *LabelCreateBulk
- func (c *LabelClient) Delete() *LabelDelete
- func (c *LabelClient) DeleteOne(l *Label) *LabelDeleteOne
- func (c *LabelClient) DeleteOneID(id uuid.UUID) *LabelDeleteOne
- func (c *LabelClient) Get(ctx context.Context, id uuid.UUID) (*Label, error)
- func (c *LabelClient) GetX(ctx context.Context, id uuid.UUID) *Label
- func (c *LabelClient) Hooks() []Hook
- func (c *LabelClient) Intercept(interceptors ...Interceptor)
- func (c *LabelClient) Interceptors() []Interceptor
- func (c *LabelClient) MapCreateBulk(slice any, setFunc func(*LabelCreate, int)) *LabelCreateBulk
- func (c *LabelClient) Query() *LabelQuery
- func (c *LabelClient) QueryGroup(l *Label) *GroupQuery
- func (c *LabelClient) QueryItems(l *Label) *ItemQuery
- func (c *LabelClient) Update() *LabelUpdate
- func (c *LabelClient) UpdateOne(l *Label) *LabelUpdateOne
- func (c *LabelClient) UpdateOneID(id uuid.UUID) *LabelUpdateOne
- func (c *LabelClient) Use(hooks ...Hook)
- type LabelCreate
- func (lc *LabelCreate) AddItemIDs(ids ...uuid.UUID) *LabelCreate
- func (lc *LabelCreate) AddItems(i ...*Item) *LabelCreate
- func (lc *LabelCreate) Exec(ctx context.Context) error
- func (lc *LabelCreate) ExecX(ctx context.Context)
- func (lc *LabelCreate) Mutation() *LabelMutation
- func (lc *LabelCreate) Save(ctx context.Context) (*Label, error)
- func (lc *LabelCreate) SaveX(ctx context.Context) *Label
- func (lc *LabelCreate) SetColor(s string) *LabelCreate
- func (lc *LabelCreate) SetCreatedAt(t time.Time) *LabelCreate
- func (lc *LabelCreate) SetDescription(s string) *LabelCreate
- func (lc *LabelCreate) SetGroup(g *Group) *LabelCreate
- func (lc *LabelCreate) SetGroupID(id uuid.UUID) *LabelCreate
- func (lc *LabelCreate) SetID(u uuid.UUID) *LabelCreate
- func (lc *LabelCreate) SetName(s string) *LabelCreate
- func (lc *LabelCreate) SetNillableColor(s *string) *LabelCreate
- func (lc *LabelCreate) SetNillableCreatedAt(t *time.Time) *LabelCreate
- func (lc *LabelCreate) SetNillableDescription(s *string) *LabelCreate
- func (lc *LabelCreate) SetNillableID(u *uuid.UUID) *LabelCreate
- func (lc *LabelCreate) SetNillableUpdatedAt(t *time.Time) *LabelCreate
- func (lc *LabelCreate) SetUpdatedAt(t time.Time) *LabelCreate
- type LabelCreateBulk
- type LabelDelete
- type LabelDeleteOne
- type LabelEdges
- type LabelGroupBy
- func (lgb *LabelGroupBy) Aggregate(fns ...AggregateFunc) *LabelGroupBy
- func (s *LabelGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LabelGroupBy) BoolX(ctx context.Context) bool
- func (s *LabelGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LabelGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LabelGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LabelGroupBy) Float64X(ctx context.Context) float64
- func (s *LabelGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LabelGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LabelGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LabelGroupBy) IntX(ctx context.Context) int
- func (s *LabelGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LabelGroupBy) IntsX(ctx context.Context) []int
- func (lgb *LabelGroupBy) Scan(ctx context.Context, v any) error
- func (s *LabelGroupBy) ScanX(ctx context.Context, v any)
- func (s *LabelGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LabelGroupBy) StringX(ctx context.Context) string
- func (s *LabelGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LabelGroupBy) StringsX(ctx context.Context) []string
- type LabelMutation
- func (m *LabelMutation) AddField(name string, value ent.Value) error
- func (m *LabelMutation) AddItemIDs(ids ...uuid.UUID)
- func (m *LabelMutation) AddedEdges() []string
- func (m *LabelMutation) AddedField(name string) (ent.Value, bool)
- func (m *LabelMutation) AddedFields() []string
- func (m *LabelMutation) AddedIDs(name string) []ent.Value
- func (m *LabelMutation) ClearColor()
- func (m *LabelMutation) ClearDescription()
- func (m *LabelMutation) ClearEdge(name string) error
- func (m *LabelMutation) ClearField(name string) error
- func (m *LabelMutation) ClearGroup()
- func (m *LabelMutation) ClearItems()
- func (m *LabelMutation) ClearedEdges() []string
- func (m *LabelMutation) ClearedFields() []string
- func (m LabelMutation) Client() *Client
- func (m *LabelMutation) Color() (r string, exists bool)
- func (m *LabelMutation) ColorCleared() bool
- func (m *LabelMutation) CreatedAt() (r time.Time, exists bool)
- func (m *LabelMutation) Description() (r string, exists bool)
- func (m *LabelMutation) DescriptionCleared() bool
- func (m *LabelMutation) EdgeCleared(name string) bool
- func (m *LabelMutation) Field(name string) (ent.Value, bool)
- func (m *LabelMutation) FieldCleared(name string) bool
- func (m *LabelMutation) Fields() []string
- func (m *LabelMutation) GroupCleared() bool
- func (m *LabelMutation) GroupID() (id uuid.UUID, exists bool)
- func (m *LabelMutation) GroupIDs() (ids []uuid.UUID)
- func (m *LabelMutation) ID() (id uuid.UUID, exists bool)
- func (m *LabelMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *LabelMutation) ItemsCleared() bool
- func (m *LabelMutation) ItemsIDs() (ids []uuid.UUID)
- func (m *LabelMutation) Name() (r string, exists bool)
- func (m *LabelMutation) OldColor(ctx context.Context) (v string, err error)
- func (m *LabelMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LabelMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *LabelMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LabelMutation) OldName(ctx context.Context) (v string, err error)
- func (m *LabelMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LabelMutation) Op() Op
- func (m *LabelMutation) RemoveItemIDs(ids ...uuid.UUID)
- func (m *LabelMutation) RemovedEdges() []string
- func (m *LabelMutation) RemovedIDs(name string) []ent.Value
- func (m *LabelMutation) RemovedItemsIDs() (ids []uuid.UUID)
- func (m *LabelMutation) ResetColor()
- func (m *LabelMutation) ResetCreatedAt()
- func (m *LabelMutation) ResetDescription()
- func (m *LabelMutation) ResetEdge(name string) error
- func (m *LabelMutation) ResetField(name string) error
- func (m *LabelMutation) ResetGroup()
- func (m *LabelMutation) ResetItems()
- func (m *LabelMutation) ResetName()
- func (m *LabelMutation) ResetUpdatedAt()
- func (m *LabelMutation) SetColor(s string)
- func (m *LabelMutation) SetCreatedAt(t time.Time)
- func (m *LabelMutation) SetDescription(s string)
- func (m *LabelMutation) SetField(name string, value ent.Value) error
- func (m *LabelMutation) SetGroupID(id uuid.UUID)
- func (m *LabelMutation) SetID(id uuid.UUID)
- func (m *LabelMutation) SetName(s string)
- func (m *LabelMutation) SetOp(op Op)
- func (m *LabelMutation) SetUpdatedAt(t time.Time)
- func (m LabelMutation) Tx() (*Tx, error)
- func (m *LabelMutation) Type() string
- func (m *LabelMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *LabelMutation) Where(ps ...predicate.Label)
- func (m *LabelMutation) WhereP(ps ...func(*sql.Selector))
- type LabelQuery
- func (lq *LabelQuery) Aggregate(fns ...AggregateFunc) *LabelSelect
- func (lq *LabelQuery) All(ctx context.Context) ([]*Label, error)
- func (lq *LabelQuery) AllX(ctx context.Context) []*Label
- func (lq *LabelQuery) Clone() *LabelQuery
- func (lq *LabelQuery) Count(ctx context.Context) (int, error)
- func (lq *LabelQuery) CountX(ctx context.Context) int
- func (lq *LabelQuery) Exist(ctx context.Context) (bool, error)
- func (lq *LabelQuery) ExistX(ctx context.Context) bool
- func (lq *LabelQuery) First(ctx context.Context) (*Label, error)
- func (lq *LabelQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (lq *LabelQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (lq *LabelQuery) FirstX(ctx context.Context) *Label
- func (lq *LabelQuery) GroupBy(field string, fields ...string) *LabelGroupBy
- func (lq *LabelQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (lq *LabelQuery) IDsX(ctx context.Context) []uuid.UUID
- func (lq *LabelQuery) Limit(limit int) *LabelQuery
- func (lq *LabelQuery) Offset(offset int) *LabelQuery
- func (lq *LabelQuery) Only(ctx context.Context) (*Label, error)
- func (lq *LabelQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (lq *LabelQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (lq *LabelQuery) OnlyX(ctx context.Context) *Label
- func (lq *LabelQuery) Order(o ...label.OrderOption) *LabelQuery
- func (lq *LabelQuery) QueryGroup() *GroupQuery
- func (lq *LabelQuery) QueryItems() *ItemQuery
- func (lq *LabelQuery) Select(fields ...string) *LabelSelect
- func (lq *LabelQuery) Unique(unique bool) *LabelQuery
- func (lq *LabelQuery) Where(ps ...predicate.Label) *LabelQuery
- func (lq *LabelQuery) WithGroup(opts ...func(*GroupQuery)) *LabelQuery
- func (lq *LabelQuery) WithItems(opts ...func(*ItemQuery)) *LabelQuery
- type LabelSelect
- func (ls *LabelSelect) Aggregate(fns ...AggregateFunc) *LabelSelect
- func (s *LabelSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LabelSelect) BoolX(ctx context.Context) bool
- func (s *LabelSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LabelSelect) BoolsX(ctx context.Context) []bool
- func (s *LabelSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LabelSelect) Float64X(ctx context.Context) float64
- func (s *LabelSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LabelSelect) Float64sX(ctx context.Context) []float64
- func (s *LabelSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LabelSelect) IntX(ctx context.Context) int
- func (s *LabelSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LabelSelect) IntsX(ctx context.Context) []int
- func (ls *LabelSelect) Scan(ctx context.Context, v any) error
- func (s *LabelSelect) ScanX(ctx context.Context, v any)
- func (s *LabelSelect) String(ctx context.Context) (_ string, err error)
- func (s *LabelSelect) StringX(ctx context.Context) string
- func (s *LabelSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LabelSelect) StringsX(ctx context.Context) []string
- type LabelUpdate
- func (lu *LabelUpdate) AddItemIDs(ids ...uuid.UUID) *LabelUpdate
- func (lu *LabelUpdate) AddItems(i ...*Item) *LabelUpdate
- func (lu *LabelUpdate) ClearColor() *LabelUpdate
- func (lu *LabelUpdate) ClearDescription() *LabelUpdate
- func (lu *LabelUpdate) ClearGroup() *LabelUpdate
- func (lu *LabelUpdate) ClearItems() *LabelUpdate
- func (lu *LabelUpdate) Exec(ctx context.Context) error
- func (lu *LabelUpdate) ExecX(ctx context.Context)
- func (lu *LabelUpdate) Mutation() *LabelMutation
- func (lu *LabelUpdate) RemoveItemIDs(ids ...uuid.UUID) *LabelUpdate
- func (lu *LabelUpdate) RemoveItems(i ...*Item) *LabelUpdate
- func (lu *LabelUpdate) Save(ctx context.Context) (int, error)
- func (lu *LabelUpdate) SaveX(ctx context.Context) int
- func (lu *LabelUpdate) SetColor(s string) *LabelUpdate
- func (lu *LabelUpdate) SetDescription(s string) *LabelUpdate
- func (lu *LabelUpdate) SetGroup(g *Group) *LabelUpdate
- func (lu *LabelUpdate) SetGroupID(id uuid.UUID) *LabelUpdate
- func (lu *LabelUpdate) SetName(s string) *LabelUpdate
- func (lu *LabelUpdate) SetNillableColor(s *string) *LabelUpdate
- func (lu *LabelUpdate) SetNillableDescription(s *string) *LabelUpdate
- func (lu *LabelUpdate) SetNillableName(s *string) *LabelUpdate
- func (lu *LabelUpdate) SetUpdatedAt(t time.Time) *LabelUpdate
- func (lu *LabelUpdate) Where(ps ...predicate.Label) *LabelUpdate
- type LabelUpdateOne
- func (luo *LabelUpdateOne) AddItemIDs(ids ...uuid.UUID) *LabelUpdateOne
- func (luo *LabelUpdateOne) AddItems(i ...*Item) *LabelUpdateOne
- func (luo *LabelUpdateOne) ClearColor() *LabelUpdateOne
- func (luo *LabelUpdateOne) ClearDescription() *LabelUpdateOne
- func (luo *LabelUpdateOne) ClearGroup() *LabelUpdateOne
- func (luo *LabelUpdateOne) ClearItems() *LabelUpdateOne
- func (luo *LabelUpdateOne) Exec(ctx context.Context) error
- func (luo *LabelUpdateOne) ExecX(ctx context.Context)
- func (luo *LabelUpdateOne) Mutation() *LabelMutation
- func (luo *LabelUpdateOne) RemoveItemIDs(ids ...uuid.UUID) *LabelUpdateOne
- func (luo *LabelUpdateOne) RemoveItems(i ...*Item) *LabelUpdateOne
- func (luo *LabelUpdateOne) Save(ctx context.Context) (*Label, error)
- func (luo *LabelUpdateOne) SaveX(ctx context.Context) *Label
- func (luo *LabelUpdateOne) Select(field string, fields ...string) *LabelUpdateOne
- func (luo *LabelUpdateOne) SetColor(s string) *LabelUpdateOne
- func (luo *LabelUpdateOne) SetDescription(s string) *LabelUpdateOne
- func (luo *LabelUpdateOne) SetGroup(g *Group) *LabelUpdateOne
- func (luo *LabelUpdateOne) SetGroupID(id uuid.UUID) *LabelUpdateOne
- func (luo *LabelUpdateOne) SetName(s string) *LabelUpdateOne
- func (luo *LabelUpdateOne) SetNillableColor(s *string) *LabelUpdateOne
- func (luo *LabelUpdateOne) SetNillableDescription(s *string) *LabelUpdateOne
- func (luo *LabelUpdateOne) SetNillableName(s *string) *LabelUpdateOne
- func (luo *LabelUpdateOne) SetUpdatedAt(t time.Time) *LabelUpdateOne
- func (luo *LabelUpdateOne) Where(ps ...predicate.Label) *LabelUpdateOne
- type Labels
- type Location
- func (l *Location) GetID() uuid.UUID
- func (l *Location) QueryChildren() *LocationQuery
- func (l *Location) QueryGroup() *GroupQuery
- func (l *Location) QueryItems() *ItemQuery
- func (l *Location) QueryParent() *LocationQuery
- func (l *Location) String() string
- func (l *Location) Unwrap() *Location
- func (l *Location) Update() *LocationUpdateOne
- func (l *Location) Value(name string) (ent.Value, error)
- type LocationClient
- func (c *LocationClient) Create() *LocationCreate
- func (c *LocationClient) CreateBulk(builders ...*LocationCreate) *LocationCreateBulk
- func (c *LocationClient) Delete() *LocationDelete
- func (c *LocationClient) DeleteOne(l *Location) *LocationDeleteOne
- func (c *LocationClient) DeleteOneID(id uuid.UUID) *LocationDeleteOne
- func (c *LocationClient) Get(ctx context.Context, id uuid.UUID) (*Location, error)
- func (c *LocationClient) GetX(ctx context.Context, id uuid.UUID) *Location
- func (c *LocationClient) Hooks() []Hook
- func (c *LocationClient) Intercept(interceptors ...Interceptor)
- func (c *LocationClient) Interceptors() []Interceptor
- func (c *LocationClient) MapCreateBulk(slice any, setFunc func(*LocationCreate, int)) *LocationCreateBulk
- func (c *LocationClient) Query() *LocationQuery
- func (c *LocationClient) QueryChildren(l *Location) *LocationQuery
- func (c *LocationClient) QueryGroup(l *Location) *GroupQuery
- func (c *LocationClient) QueryItems(l *Location) *ItemQuery
- func (c *LocationClient) QueryParent(l *Location) *LocationQuery
- func (c *LocationClient) Update() *LocationUpdate
- func (c *LocationClient) UpdateOne(l *Location) *LocationUpdateOne
- func (c *LocationClient) UpdateOneID(id uuid.UUID) *LocationUpdateOne
- func (c *LocationClient) Use(hooks ...Hook)
- type LocationCreate
- func (lc *LocationCreate) AddChildIDs(ids ...uuid.UUID) *LocationCreate
- func (lc *LocationCreate) AddChildren(l ...*Location) *LocationCreate
- func (lc *LocationCreate) AddItemIDs(ids ...uuid.UUID) *LocationCreate
- func (lc *LocationCreate) AddItems(i ...*Item) *LocationCreate
- func (lc *LocationCreate) Exec(ctx context.Context) error
- func (lc *LocationCreate) ExecX(ctx context.Context)
- func (lc *LocationCreate) Mutation() *LocationMutation
- func (lc *LocationCreate) Save(ctx context.Context) (*Location, error)
- func (lc *LocationCreate) SaveX(ctx context.Context) *Location
- func (lc *LocationCreate) SetCreatedAt(t time.Time) *LocationCreate
- func (lc *LocationCreate) SetDescription(s string) *LocationCreate
- func (lc *LocationCreate) SetGroup(g *Group) *LocationCreate
- func (lc *LocationCreate) SetGroupID(id uuid.UUID) *LocationCreate
- func (lc *LocationCreate) SetID(u uuid.UUID) *LocationCreate
- func (lc *LocationCreate) SetName(s string) *LocationCreate
- func (lc *LocationCreate) SetNillableCreatedAt(t *time.Time) *LocationCreate
- func (lc *LocationCreate) SetNillableDescription(s *string) *LocationCreate
- func (lc *LocationCreate) SetNillableID(u *uuid.UUID) *LocationCreate
- func (lc *LocationCreate) SetNillableParentID(id *uuid.UUID) *LocationCreate
- func (lc *LocationCreate) SetNillableUpdatedAt(t *time.Time) *LocationCreate
- func (lc *LocationCreate) SetParent(l *Location) *LocationCreate
- func (lc *LocationCreate) SetParentID(id uuid.UUID) *LocationCreate
- func (lc *LocationCreate) SetUpdatedAt(t time.Time) *LocationCreate
- type LocationCreateBulk
- type LocationDelete
- type LocationDeleteOne
- type LocationEdges
- type LocationGroupBy
- func (lgb *LocationGroupBy) Aggregate(fns ...AggregateFunc) *LocationGroupBy
- func (s *LocationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LocationGroupBy) BoolX(ctx context.Context) bool
- func (s *LocationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LocationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LocationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LocationGroupBy) Float64X(ctx context.Context) float64
- func (s *LocationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LocationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LocationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LocationGroupBy) IntX(ctx context.Context) int
- func (s *LocationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LocationGroupBy) IntsX(ctx context.Context) []int
- func (lgb *LocationGroupBy) Scan(ctx context.Context, v any) error
- func (s *LocationGroupBy) ScanX(ctx context.Context, v any)
- func (s *LocationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LocationGroupBy) StringX(ctx context.Context) string
- func (s *LocationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LocationGroupBy) StringsX(ctx context.Context) []string
- type LocationMutation
- func (m *LocationMutation) AddChildIDs(ids ...uuid.UUID)
- func (m *LocationMutation) AddField(name string, value ent.Value) error
- func (m *LocationMutation) AddItemIDs(ids ...uuid.UUID)
- func (m *LocationMutation) AddedEdges() []string
- func (m *LocationMutation) AddedField(name string) (ent.Value, bool)
- func (m *LocationMutation) AddedFields() []string
- func (m *LocationMutation) AddedIDs(name string) []ent.Value
- func (m *LocationMutation) ChildrenCleared() bool
- func (m *LocationMutation) ChildrenIDs() (ids []uuid.UUID)
- func (m *LocationMutation) ClearChildren()
- func (m *LocationMutation) ClearDescription()
- func (m *LocationMutation) ClearEdge(name string) error
- func (m *LocationMutation) ClearField(name string) error
- func (m *LocationMutation) ClearGroup()
- func (m *LocationMutation) ClearItems()
- func (m *LocationMutation) ClearParent()
- func (m *LocationMutation) ClearedEdges() []string
- func (m *LocationMutation) ClearedFields() []string
- func (m LocationMutation) Client() *Client
- func (m *LocationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *LocationMutation) Description() (r string, exists bool)
- func (m *LocationMutation) DescriptionCleared() bool
- func (m *LocationMutation) EdgeCleared(name string) bool
- func (m *LocationMutation) Field(name string) (ent.Value, bool)
- func (m *LocationMutation) FieldCleared(name string) bool
- func (m *LocationMutation) Fields() []string
- func (m *LocationMutation) GroupCleared() bool
- func (m *LocationMutation) GroupID() (id uuid.UUID, exists bool)
- func (m *LocationMutation) GroupIDs() (ids []uuid.UUID)
- func (m *LocationMutation) ID() (id uuid.UUID, exists bool)
- func (m *LocationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *LocationMutation) ItemsCleared() bool
- func (m *LocationMutation) ItemsIDs() (ids []uuid.UUID)
- func (m *LocationMutation) Name() (r string, exists bool)
- func (m *LocationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LocationMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *LocationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LocationMutation) OldName(ctx context.Context) (v string, err error)
- func (m *LocationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LocationMutation) Op() Op
- func (m *LocationMutation) ParentCleared() bool
- func (m *LocationMutation) ParentID() (id uuid.UUID, exists bool)
- func (m *LocationMutation) ParentIDs() (ids []uuid.UUID)
- func (m *LocationMutation) RemoveChildIDs(ids ...uuid.UUID)
- func (m *LocationMutation) RemoveItemIDs(ids ...uuid.UUID)
- func (m *LocationMutation) RemovedChildrenIDs() (ids []uuid.UUID)
- func (m *LocationMutation) RemovedEdges() []string
- func (m *LocationMutation) RemovedIDs(name string) []ent.Value
- func (m *LocationMutation) RemovedItemsIDs() (ids []uuid.UUID)
- func (m *LocationMutation) ResetChildren()
- func (m *LocationMutation) ResetCreatedAt()
- func (m *LocationMutation) ResetDescription()
- func (m *LocationMutation) ResetEdge(name string) error
- func (m *LocationMutation) ResetField(name string) error
- func (m *LocationMutation) ResetGroup()
- func (m *LocationMutation) ResetItems()
- func (m *LocationMutation) ResetName()
- func (m *LocationMutation) ResetParent()
- func (m *LocationMutation) ResetUpdatedAt()
- func (m *LocationMutation) SetCreatedAt(t time.Time)
- func (m *LocationMutation) SetDescription(s string)
- func (m *LocationMutation) SetField(name string, value ent.Value) error
- func (m *LocationMutation) SetGroupID(id uuid.UUID)
- func (m *LocationMutation) SetID(id uuid.UUID)
- func (m *LocationMutation) SetName(s string)
- func (m *LocationMutation) SetOp(op Op)
- func (m *LocationMutation) SetParentID(id uuid.UUID)
- func (m *LocationMutation) SetUpdatedAt(t time.Time)
- func (m LocationMutation) Tx() (*Tx, error)
- func (m *LocationMutation) Type() string
- func (m *LocationMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *LocationMutation) Where(ps ...predicate.Location)
- func (m *LocationMutation) WhereP(ps ...func(*sql.Selector))
- type LocationQuery
- func (lq *LocationQuery) Aggregate(fns ...AggregateFunc) *LocationSelect
- func (lq *LocationQuery) All(ctx context.Context) ([]*Location, error)
- func (lq *LocationQuery) AllX(ctx context.Context) []*Location
- func (lq *LocationQuery) Clone() *LocationQuery
- func (lq *LocationQuery) Count(ctx context.Context) (int, error)
- func (lq *LocationQuery) CountX(ctx context.Context) int
- func (lq *LocationQuery) Exist(ctx context.Context) (bool, error)
- func (lq *LocationQuery) ExistX(ctx context.Context) bool
- func (lq *LocationQuery) First(ctx context.Context) (*Location, error)
- func (lq *LocationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (lq *LocationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (lq *LocationQuery) FirstX(ctx context.Context) *Location
- func (lq *LocationQuery) GroupBy(field string, fields ...string) *LocationGroupBy
- func (lq *LocationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (lq *LocationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (lq *LocationQuery) Limit(limit int) *LocationQuery
- func (lq *LocationQuery) Offset(offset int) *LocationQuery
- func (lq *LocationQuery) Only(ctx context.Context) (*Location, error)
- func (lq *LocationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (lq *LocationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (lq *LocationQuery) OnlyX(ctx context.Context) *Location
- func (lq *LocationQuery) Order(o ...location.OrderOption) *LocationQuery
- func (lq *LocationQuery) QueryChildren() *LocationQuery
- func (lq *LocationQuery) QueryGroup() *GroupQuery
- func (lq *LocationQuery) QueryItems() *ItemQuery
- func (lq *LocationQuery) QueryParent() *LocationQuery
- func (lq *LocationQuery) Select(fields ...string) *LocationSelect
- func (lq *LocationQuery) Unique(unique bool) *LocationQuery
- func (lq *LocationQuery) Where(ps ...predicate.Location) *LocationQuery
- func (lq *LocationQuery) WithChildren(opts ...func(*LocationQuery)) *LocationQuery
- func (lq *LocationQuery) WithGroup(opts ...func(*GroupQuery)) *LocationQuery
- func (lq *LocationQuery) WithItems(opts ...func(*ItemQuery)) *LocationQuery
- func (lq *LocationQuery) WithParent(opts ...func(*LocationQuery)) *LocationQuery
- type LocationSelect
- func (ls *LocationSelect) Aggregate(fns ...AggregateFunc) *LocationSelect
- func (s *LocationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LocationSelect) BoolX(ctx context.Context) bool
- func (s *LocationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LocationSelect) BoolsX(ctx context.Context) []bool
- func (s *LocationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LocationSelect) Float64X(ctx context.Context) float64
- func (s *LocationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LocationSelect) Float64sX(ctx context.Context) []float64
- func (s *LocationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LocationSelect) IntX(ctx context.Context) int
- func (s *LocationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LocationSelect) IntsX(ctx context.Context) []int
- func (ls *LocationSelect) Scan(ctx context.Context, v any) error
- func (s *LocationSelect) ScanX(ctx context.Context, v any)
- func (s *LocationSelect) String(ctx context.Context) (_ string, err error)
- func (s *LocationSelect) StringX(ctx context.Context) string
- func (s *LocationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LocationSelect) StringsX(ctx context.Context) []string
- type LocationUpdate
- func (lu *LocationUpdate) AddChildIDs(ids ...uuid.UUID) *LocationUpdate
- func (lu *LocationUpdate) AddChildren(l ...*Location) *LocationUpdate
- func (lu *LocationUpdate) AddItemIDs(ids ...uuid.UUID) *LocationUpdate
- func (lu *LocationUpdate) AddItems(i ...*Item) *LocationUpdate
- func (lu *LocationUpdate) ClearChildren() *LocationUpdate
- func (lu *LocationUpdate) ClearDescription() *LocationUpdate
- func (lu *LocationUpdate) ClearGroup() *LocationUpdate
- func (lu *LocationUpdate) ClearItems() *LocationUpdate
- func (lu *LocationUpdate) ClearParent() *LocationUpdate
- func (lu *LocationUpdate) Exec(ctx context.Context) error
- func (lu *LocationUpdate) ExecX(ctx context.Context)
- func (lu *LocationUpdate) Mutation() *LocationMutation
- func (lu *LocationUpdate) RemoveChildIDs(ids ...uuid.UUID) *LocationUpdate
- func (lu *LocationUpdate) RemoveChildren(l ...*Location) *LocationUpdate
- func (lu *LocationUpdate) RemoveItemIDs(ids ...uuid.UUID) *LocationUpdate
- func (lu *LocationUpdate) RemoveItems(i ...*Item) *LocationUpdate
- func (lu *LocationUpdate) Save(ctx context.Context) (int, error)
- func (lu *LocationUpdate) SaveX(ctx context.Context) int
- func (lu *LocationUpdate) SetDescription(s string) *LocationUpdate
- func (lu *LocationUpdate) SetGroup(g *Group) *LocationUpdate
- func (lu *LocationUpdate) SetGroupID(id uuid.UUID) *LocationUpdate
- func (lu *LocationUpdate) SetName(s string) *LocationUpdate
- func (lu *LocationUpdate) SetNillableDescription(s *string) *LocationUpdate
- func (lu *LocationUpdate) SetNillableName(s *string) *LocationUpdate
- func (lu *LocationUpdate) SetNillableParentID(id *uuid.UUID) *LocationUpdate
- func (lu *LocationUpdate) SetParent(l *Location) *LocationUpdate
- func (lu *LocationUpdate) SetParentID(id uuid.UUID) *LocationUpdate
- func (lu *LocationUpdate) SetUpdatedAt(t time.Time) *LocationUpdate
- func (lu *LocationUpdate) Where(ps ...predicate.Location) *LocationUpdate
- type LocationUpdateOne
- func (luo *LocationUpdateOne) AddChildIDs(ids ...uuid.UUID) *LocationUpdateOne
- func (luo *LocationUpdateOne) AddChildren(l ...*Location) *LocationUpdateOne
- func (luo *LocationUpdateOne) AddItemIDs(ids ...uuid.UUID) *LocationUpdateOne
- func (luo *LocationUpdateOne) AddItems(i ...*Item) *LocationUpdateOne
- func (luo *LocationUpdateOne) ClearChildren() *LocationUpdateOne
- func (luo *LocationUpdateOne) ClearDescription() *LocationUpdateOne
- func (luo *LocationUpdateOne) ClearGroup() *LocationUpdateOne
- func (luo *LocationUpdateOne) ClearItems() *LocationUpdateOne
- func (luo *LocationUpdateOne) ClearParent() *LocationUpdateOne
- func (luo *LocationUpdateOne) Exec(ctx context.Context) error
- func (luo *LocationUpdateOne) ExecX(ctx context.Context)
- func (luo *LocationUpdateOne) Mutation() *LocationMutation
- func (luo *LocationUpdateOne) RemoveChildIDs(ids ...uuid.UUID) *LocationUpdateOne
- func (luo *LocationUpdateOne) RemoveChildren(l ...*Location) *LocationUpdateOne
- func (luo *LocationUpdateOne) RemoveItemIDs(ids ...uuid.UUID) *LocationUpdateOne
- func (luo *LocationUpdateOne) RemoveItems(i ...*Item) *LocationUpdateOne
- func (luo *LocationUpdateOne) Save(ctx context.Context) (*Location, error)
- func (luo *LocationUpdateOne) SaveX(ctx context.Context) *Location
- func (luo *LocationUpdateOne) Select(field string, fields ...string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetDescription(s string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetGroup(g *Group) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetGroupID(id uuid.UUID) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetName(s string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetNillableDescription(s *string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetNillableName(s *string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetNillableParentID(id *uuid.UUID) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetParent(l *Location) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetParentID(id uuid.UUID) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetUpdatedAt(t time.Time) *LocationUpdateOne
- func (luo *LocationUpdateOne) Where(ps ...predicate.Location) *LocationUpdateOne
- type Locations
- type MaintenanceEntries
- type MaintenanceEntry
- func (me *MaintenanceEntry) GetID() uuid.UUID
- func (me *MaintenanceEntry) QueryItem() *ItemQuery
- func (me *MaintenanceEntry) String() string
- func (me *MaintenanceEntry) Unwrap() *MaintenanceEntry
- func (me *MaintenanceEntry) Update() *MaintenanceEntryUpdateOne
- func (me *MaintenanceEntry) Value(name string) (ent.Value, error)
- type MaintenanceEntryClient
- func (c *MaintenanceEntryClient) Create() *MaintenanceEntryCreate
- func (c *MaintenanceEntryClient) CreateBulk(builders ...*MaintenanceEntryCreate) *MaintenanceEntryCreateBulk
- func (c *MaintenanceEntryClient) Delete() *MaintenanceEntryDelete
- func (c *MaintenanceEntryClient) DeleteOne(me *MaintenanceEntry) *MaintenanceEntryDeleteOne
- func (c *MaintenanceEntryClient) DeleteOneID(id uuid.UUID) *MaintenanceEntryDeleteOne
- func (c *MaintenanceEntryClient) Get(ctx context.Context, id uuid.UUID) (*MaintenanceEntry, error)
- func (c *MaintenanceEntryClient) GetX(ctx context.Context, id uuid.UUID) *MaintenanceEntry
- func (c *MaintenanceEntryClient) Hooks() []Hook
- func (c *MaintenanceEntryClient) Intercept(interceptors ...Interceptor)
- func (c *MaintenanceEntryClient) Interceptors() []Interceptor
- func (c *MaintenanceEntryClient) MapCreateBulk(slice any, setFunc func(*MaintenanceEntryCreate, int)) *MaintenanceEntryCreateBulk
- func (c *MaintenanceEntryClient) Query() *MaintenanceEntryQuery
- func (c *MaintenanceEntryClient) QueryItem(me *MaintenanceEntry) *ItemQuery
- func (c *MaintenanceEntryClient) Update() *MaintenanceEntryUpdate
- func (c *MaintenanceEntryClient) UpdateOne(me *MaintenanceEntry) *MaintenanceEntryUpdateOne
- func (c *MaintenanceEntryClient) UpdateOneID(id uuid.UUID) *MaintenanceEntryUpdateOne
- func (c *MaintenanceEntryClient) Use(hooks ...Hook)
- type MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) Exec(ctx context.Context) error
- func (mec *MaintenanceEntryCreate) ExecX(ctx context.Context)
- func (mec *MaintenanceEntryCreate) Mutation() *MaintenanceEntryMutation
- func (mec *MaintenanceEntryCreate) Save(ctx context.Context) (*MaintenanceEntry, error)
- func (mec *MaintenanceEntryCreate) SaveX(ctx context.Context) *MaintenanceEntry
- func (mec *MaintenanceEntryCreate) SetCost(f float64) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetCreatedAt(t time.Time) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetDate(t time.Time) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetDescription(s string) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetID(u uuid.UUID) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetItem(i *Item) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetItemID(u uuid.UUID) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetName(s string) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetNillableCost(f *float64) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetNillableCreatedAt(t *time.Time) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetNillableDate(t *time.Time) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetNillableDescription(s *string) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetNillableID(u *uuid.UUID) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetNillableScheduledDate(t *time.Time) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetNillableUpdatedAt(t *time.Time) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetScheduledDate(t time.Time) *MaintenanceEntryCreate
- func (mec *MaintenanceEntryCreate) SetUpdatedAt(t time.Time) *MaintenanceEntryCreate
- type MaintenanceEntryCreateBulk
- func (mecb *MaintenanceEntryCreateBulk) Exec(ctx context.Context) error
- func (mecb *MaintenanceEntryCreateBulk) ExecX(ctx context.Context)
- func (mecb *MaintenanceEntryCreateBulk) Save(ctx context.Context) ([]*MaintenanceEntry, error)
- func (mecb *MaintenanceEntryCreateBulk) SaveX(ctx context.Context) []*MaintenanceEntry
- type MaintenanceEntryDelete
- type MaintenanceEntryDeleteOne
- type MaintenanceEntryEdges
- type MaintenanceEntryGroupBy
- func (megb *MaintenanceEntryGroupBy) Aggregate(fns ...AggregateFunc) *MaintenanceEntryGroupBy
- func (s *MaintenanceEntryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MaintenanceEntryGroupBy) BoolX(ctx context.Context) bool
- func (s *MaintenanceEntryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MaintenanceEntryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MaintenanceEntryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MaintenanceEntryGroupBy) Float64X(ctx context.Context) float64
- func (s *MaintenanceEntryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MaintenanceEntryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MaintenanceEntryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MaintenanceEntryGroupBy) IntX(ctx context.Context) int
- func (s *MaintenanceEntryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MaintenanceEntryGroupBy) IntsX(ctx context.Context) []int
- func (megb *MaintenanceEntryGroupBy) Scan(ctx context.Context, v any) error
- func (s *MaintenanceEntryGroupBy) ScanX(ctx context.Context, v any)
- func (s *MaintenanceEntryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MaintenanceEntryGroupBy) StringX(ctx context.Context) string
- func (s *MaintenanceEntryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MaintenanceEntryGroupBy) StringsX(ctx context.Context) []string
- type MaintenanceEntryMutation
- func (m *MaintenanceEntryMutation) AddCost(f float64)
- func (m *MaintenanceEntryMutation) AddField(name string, value ent.Value) error
- func (m *MaintenanceEntryMutation) AddedCost() (r float64, exists bool)
- func (m *MaintenanceEntryMutation) AddedEdges() []string
- func (m *MaintenanceEntryMutation) AddedField(name string) (ent.Value, bool)
- func (m *MaintenanceEntryMutation) AddedFields() []string
- func (m *MaintenanceEntryMutation) AddedIDs(name string) []ent.Value
- func (m *MaintenanceEntryMutation) ClearDate()
- func (m *MaintenanceEntryMutation) ClearDescription()
- func (m *MaintenanceEntryMutation) ClearEdge(name string) error
- func (m *MaintenanceEntryMutation) ClearField(name string) error
- func (m *MaintenanceEntryMutation) ClearItem()
- func (m *MaintenanceEntryMutation) ClearScheduledDate()
- func (m *MaintenanceEntryMutation) ClearedEdges() []string
- func (m *MaintenanceEntryMutation) ClearedFields() []string
- func (m MaintenanceEntryMutation) Client() *Client
- func (m *MaintenanceEntryMutation) Cost() (r float64, exists bool)
- func (m *MaintenanceEntryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MaintenanceEntryMutation) Date() (r time.Time, exists bool)
- func (m *MaintenanceEntryMutation) DateCleared() bool
- func (m *MaintenanceEntryMutation) Description() (r string, exists bool)
- func (m *MaintenanceEntryMutation) DescriptionCleared() bool
- func (m *MaintenanceEntryMutation) EdgeCleared(name string) bool
- func (m *MaintenanceEntryMutation) Field(name string) (ent.Value, bool)
- func (m *MaintenanceEntryMutation) FieldCleared(name string) bool
- func (m *MaintenanceEntryMutation) Fields() []string
- func (m *MaintenanceEntryMutation) ID() (id uuid.UUID, exists bool)
- func (m *MaintenanceEntryMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *MaintenanceEntryMutation) ItemCleared() bool
- func (m *MaintenanceEntryMutation) ItemID() (r uuid.UUID, exists bool)
- func (m *MaintenanceEntryMutation) ItemIDs() (ids []uuid.UUID)
- func (m *MaintenanceEntryMutation) Name() (r string, exists bool)
- func (m *MaintenanceEntryMutation) OldCost(ctx context.Context) (v float64, err error)
- func (m *MaintenanceEntryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MaintenanceEntryMutation) OldDate(ctx context.Context) (v time.Time, err error)
- func (m *MaintenanceEntryMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *MaintenanceEntryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MaintenanceEntryMutation) OldItemID(ctx context.Context) (v uuid.UUID, err error)
- func (m *MaintenanceEntryMutation) OldName(ctx context.Context) (v string, err error)
- func (m *MaintenanceEntryMutation) OldScheduledDate(ctx context.Context) (v time.Time, err error)
- func (m *MaintenanceEntryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MaintenanceEntryMutation) Op() Op
- func (m *MaintenanceEntryMutation) RemovedEdges() []string
- func (m *MaintenanceEntryMutation) RemovedIDs(name string) []ent.Value
- func (m *MaintenanceEntryMutation) ResetCost()
- func (m *MaintenanceEntryMutation) ResetCreatedAt()
- func (m *MaintenanceEntryMutation) ResetDate()
- func (m *MaintenanceEntryMutation) ResetDescription()
- func (m *MaintenanceEntryMutation) ResetEdge(name string) error
- func (m *MaintenanceEntryMutation) ResetField(name string) error
- func (m *MaintenanceEntryMutation) ResetItem()
- func (m *MaintenanceEntryMutation) ResetItemID()
- func (m *MaintenanceEntryMutation) ResetName()
- func (m *MaintenanceEntryMutation) ResetScheduledDate()
- func (m *MaintenanceEntryMutation) ResetUpdatedAt()
- func (m *MaintenanceEntryMutation) ScheduledDate() (r time.Time, exists bool)
- func (m *MaintenanceEntryMutation) ScheduledDateCleared() bool
- func (m *MaintenanceEntryMutation) SetCost(f float64)
- func (m *MaintenanceEntryMutation) SetCreatedAt(t time.Time)
- func (m *MaintenanceEntryMutation) SetDate(t time.Time)
- func (m *MaintenanceEntryMutation) SetDescription(s string)
- func (m *MaintenanceEntryMutation) SetField(name string, value ent.Value) error
- func (m *MaintenanceEntryMutation) SetID(id uuid.UUID)
- func (m *MaintenanceEntryMutation) SetItemID(u uuid.UUID)
- func (m *MaintenanceEntryMutation) SetName(s string)
- func (m *MaintenanceEntryMutation) SetOp(op Op)
- func (m *MaintenanceEntryMutation) SetScheduledDate(t time.Time)
- func (m *MaintenanceEntryMutation) SetUpdatedAt(t time.Time)
- func (m MaintenanceEntryMutation) Tx() (*Tx, error)
- func (m *MaintenanceEntryMutation) Type() string
- func (m *MaintenanceEntryMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MaintenanceEntryMutation) Where(ps ...predicate.MaintenanceEntry)
- func (m *MaintenanceEntryMutation) WhereP(ps ...func(*sql.Selector))
- type MaintenanceEntryQuery
- func (meq *MaintenanceEntryQuery) Aggregate(fns ...AggregateFunc) *MaintenanceEntrySelect
- func (meq *MaintenanceEntryQuery) All(ctx context.Context) ([]*MaintenanceEntry, error)
- func (meq *MaintenanceEntryQuery) AllX(ctx context.Context) []*MaintenanceEntry
- func (meq *MaintenanceEntryQuery) Clone() *MaintenanceEntryQuery
- func (meq *MaintenanceEntryQuery) Count(ctx context.Context) (int, error)
- func (meq *MaintenanceEntryQuery) CountX(ctx context.Context) int
- func (meq *MaintenanceEntryQuery) Exist(ctx context.Context) (bool, error)
- func (meq *MaintenanceEntryQuery) ExistX(ctx context.Context) bool
- func (meq *MaintenanceEntryQuery) First(ctx context.Context) (*MaintenanceEntry, error)
- func (meq *MaintenanceEntryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (meq *MaintenanceEntryQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (meq *MaintenanceEntryQuery) FirstX(ctx context.Context) *MaintenanceEntry
- func (meq *MaintenanceEntryQuery) GroupBy(field string, fields ...string) *MaintenanceEntryGroupBy
- func (meq *MaintenanceEntryQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (meq *MaintenanceEntryQuery) IDsX(ctx context.Context) []uuid.UUID
- func (meq *MaintenanceEntryQuery) Limit(limit int) *MaintenanceEntryQuery
- func (meq *MaintenanceEntryQuery) Offset(offset int) *MaintenanceEntryQuery
- func (meq *MaintenanceEntryQuery) Only(ctx context.Context) (*MaintenanceEntry, error)
- func (meq *MaintenanceEntryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (meq *MaintenanceEntryQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (meq *MaintenanceEntryQuery) OnlyX(ctx context.Context) *MaintenanceEntry
- func (meq *MaintenanceEntryQuery) Order(o ...maintenanceentry.OrderOption) *MaintenanceEntryQuery
- func (meq *MaintenanceEntryQuery) QueryItem() *ItemQuery
- func (meq *MaintenanceEntryQuery) Select(fields ...string) *MaintenanceEntrySelect
- func (meq *MaintenanceEntryQuery) Unique(unique bool) *MaintenanceEntryQuery
- func (meq *MaintenanceEntryQuery) Where(ps ...predicate.MaintenanceEntry) *MaintenanceEntryQuery
- func (meq *MaintenanceEntryQuery) WithItem(opts ...func(*ItemQuery)) *MaintenanceEntryQuery
- type MaintenanceEntrySelect
- func (mes *MaintenanceEntrySelect) Aggregate(fns ...AggregateFunc) *MaintenanceEntrySelect
- func (s *MaintenanceEntrySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MaintenanceEntrySelect) BoolX(ctx context.Context) bool
- func (s *MaintenanceEntrySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MaintenanceEntrySelect) BoolsX(ctx context.Context) []bool
- func (s *MaintenanceEntrySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MaintenanceEntrySelect) Float64X(ctx context.Context) float64
- func (s *MaintenanceEntrySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MaintenanceEntrySelect) Float64sX(ctx context.Context) []float64
- func (s *MaintenanceEntrySelect) Int(ctx context.Context) (_ int, err error)
- func (s *MaintenanceEntrySelect) IntX(ctx context.Context) int
- func (s *MaintenanceEntrySelect) Ints(ctx context.Context) ([]int, error)
- func (s *MaintenanceEntrySelect) IntsX(ctx context.Context) []int
- func (mes *MaintenanceEntrySelect) Scan(ctx context.Context, v any) error
- func (s *MaintenanceEntrySelect) ScanX(ctx context.Context, v any)
- func (s *MaintenanceEntrySelect) String(ctx context.Context) (_ string, err error)
- func (s *MaintenanceEntrySelect) StringX(ctx context.Context) string
- func (s *MaintenanceEntrySelect) Strings(ctx context.Context) ([]string, error)
- func (s *MaintenanceEntrySelect) StringsX(ctx context.Context) []string
- type MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) AddCost(f float64) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) ClearDate() *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) ClearDescription() *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) ClearItem() *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) ClearScheduledDate() *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) Exec(ctx context.Context) error
- func (meu *MaintenanceEntryUpdate) ExecX(ctx context.Context)
- func (meu *MaintenanceEntryUpdate) Mutation() *MaintenanceEntryMutation
- func (meu *MaintenanceEntryUpdate) Save(ctx context.Context) (int, error)
- func (meu *MaintenanceEntryUpdate) SaveX(ctx context.Context) int
- func (meu *MaintenanceEntryUpdate) SetCost(f float64) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetDate(t time.Time) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetDescription(s string) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetItem(i *Item) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetItemID(u uuid.UUID) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetName(s string) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetNillableCost(f *float64) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetNillableDate(t *time.Time) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetNillableDescription(s *string) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetNillableItemID(u *uuid.UUID) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetNillableName(s *string) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetNillableScheduledDate(t *time.Time) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetScheduledDate(t time.Time) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) SetUpdatedAt(t time.Time) *MaintenanceEntryUpdate
- func (meu *MaintenanceEntryUpdate) Where(ps ...predicate.MaintenanceEntry) *MaintenanceEntryUpdate
- type MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) AddCost(f float64) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) ClearDate() *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) ClearDescription() *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) ClearItem() *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) ClearScheduledDate() *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) Exec(ctx context.Context) error
- func (meuo *MaintenanceEntryUpdateOne) ExecX(ctx context.Context)
- func (meuo *MaintenanceEntryUpdateOne) Mutation() *MaintenanceEntryMutation
- func (meuo *MaintenanceEntryUpdateOne) Save(ctx context.Context) (*MaintenanceEntry, error)
- func (meuo *MaintenanceEntryUpdateOne) SaveX(ctx context.Context) *MaintenanceEntry
- func (meuo *MaintenanceEntryUpdateOne) Select(field string, fields ...string) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetCost(f float64) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetDate(t time.Time) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetDescription(s string) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetItem(i *Item) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetItemID(u uuid.UUID) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetName(s string) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetNillableCost(f *float64) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetNillableDate(t *time.Time) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetNillableDescription(s *string) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetNillableItemID(u *uuid.UUID) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetNillableName(s *string) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetNillableScheduledDate(t *time.Time) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetScheduledDate(t time.Time) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) SetUpdatedAt(t time.Time) *MaintenanceEntryUpdateOne
- func (meuo *MaintenanceEntryUpdateOne) Where(ps ...predicate.MaintenanceEntry) *MaintenanceEntryUpdateOne
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Notifier
- type NotifierClient
- func (c *NotifierClient) Create() *NotifierCreate
- func (c *NotifierClient) CreateBulk(builders ...*NotifierCreate) *NotifierCreateBulk
- func (c *NotifierClient) Delete() *NotifierDelete
- func (c *NotifierClient) DeleteOne(n *Notifier) *NotifierDeleteOne
- func (c *NotifierClient) DeleteOneID(id uuid.UUID) *NotifierDeleteOne
- func (c *NotifierClient) Get(ctx context.Context, id uuid.UUID) (*Notifier, error)
- func (c *NotifierClient) GetX(ctx context.Context, id uuid.UUID) *Notifier
- func (c *NotifierClient) Hooks() []Hook
- func (c *NotifierClient) Intercept(interceptors ...Interceptor)
- func (c *NotifierClient) Interceptors() []Interceptor
- func (c *NotifierClient) MapCreateBulk(slice any, setFunc func(*NotifierCreate, int)) *NotifierCreateBulk
- func (c *NotifierClient) Query() *NotifierQuery
- func (c *NotifierClient) QueryGroup(n *Notifier) *GroupQuery
- func (c *NotifierClient) QueryUser(n *Notifier) *UserQuery
- func (c *NotifierClient) Update() *NotifierUpdate
- func (c *NotifierClient) UpdateOne(n *Notifier) *NotifierUpdateOne
- func (c *NotifierClient) UpdateOneID(id uuid.UUID) *NotifierUpdateOne
- func (c *NotifierClient) Use(hooks ...Hook)
- type NotifierCreate
- func (nc *NotifierCreate) Exec(ctx context.Context) error
- func (nc *NotifierCreate) ExecX(ctx context.Context)
- func (nc *NotifierCreate) Mutation() *NotifierMutation
- func (nc *NotifierCreate) Save(ctx context.Context) (*Notifier, error)
- func (nc *NotifierCreate) SaveX(ctx context.Context) *Notifier
- func (nc *NotifierCreate) SetCreatedAt(t time.Time) *NotifierCreate
- func (nc *NotifierCreate) SetGroup(g *Group) *NotifierCreate
- func (nc *NotifierCreate) SetGroupID(u uuid.UUID) *NotifierCreate
- func (nc *NotifierCreate) SetID(u uuid.UUID) *NotifierCreate
- func (nc *NotifierCreate) SetIsActive(b bool) *NotifierCreate
- func (nc *NotifierCreate) SetName(s string) *NotifierCreate
- func (nc *NotifierCreate) SetNillableCreatedAt(t *time.Time) *NotifierCreate
- func (nc *NotifierCreate) SetNillableID(u *uuid.UUID) *NotifierCreate
- func (nc *NotifierCreate) SetNillableIsActive(b *bool) *NotifierCreate
- func (nc *NotifierCreate) SetNillableUpdatedAt(t *time.Time) *NotifierCreate
- func (nc *NotifierCreate) SetURL(s string) *NotifierCreate
- func (nc *NotifierCreate) SetUpdatedAt(t time.Time) *NotifierCreate
- func (nc *NotifierCreate) SetUser(u *User) *NotifierCreate
- func (nc *NotifierCreate) SetUserID(u uuid.UUID) *NotifierCreate
- type NotifierCreateBulk
- type NotifierDelete
- type NotifierDeleteOne
- type NotifierEdges
- type NotifierGroupBy
- func (ngb *NotifierGroupBy) Aggregate(fns ...AggregateFunc) *NotifierGroupBy
- func (s *NotifierGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NotifierGroupBy) BoolX(ctx context.Context) bool
- func (s *NotifierGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NotifierGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NotifierGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NotifierGroupBy) Float64X(ctx context.Context) float64
- func (s *NotifierGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NotifierGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NotifierGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NotifierGroupBy) IntX(ctx context.Context) int
- func (s *NotifierGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NotifierGroupBy) IntsX(ctx context.Context) []int
- func (ngb *NotifierGroupBy) Scan(ctx context.Context, v any) error
- func (s *NotifierGroupBy) ScanX(ctx context.Context, v any)
- func (s *NotifierGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NotifierGroupBy) StringX(ctx context.Context) string
- func (s *NotifierGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NotifierGroupBy) StringsX(ctx context.Context) []string
- type NotifierMutation
- func (m *NotifierMutation) AddField(name string, value ent.Value) error
- func (m *NotifierMutation) AddedEdges() []string
- func (m *NotifierMutation) AddedField(name string) (ent.Value, bool)
- func (m *NotifierMutation) AddedFields() []string
- func (m *NotifierMutation) AddedIDs(name string) []ent.Value
- func (m *NotifierMutation) ClearEdge(name string) error
- func (m *NotifierMutation) ClearField(name string) error
- func (m *NotifierMutation) ClearGroup()
- func (m *NotifierMutation) ClearUser()
- func (m *NotifierMutation) ClearedEdges() []string
- func (m *NotifierMutation) ClearedFields() []string
- func (m NotifierMutation) Client() *Client
- func (m *NotifierMutation) CreatedAt() (r time.Time, exists bool)
- func (m *NotifierMutation) EdgeCleared(name string) bool
- func (m *NotifierMutation) Field(name string) (ent.Value, bool)
- func (m *NotifierMutation) FieldCleared(name string) bool
- func (m *NotifierMutation) Fields() []string
- func (m *NotifierMutation) GroupCleared() bool
- func (m *NotifierMutation) GroupID() (r uuid.UUID, exists bool)
- func (m *NotifierMutation) GroupIDs() (ids []uuid.UUID)
- func (m *NotifierMutation) ID() (id uuid.UUID, exists bool)
- func (m *NotifierMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *NotifierMutation) IsActive() (r bool, exists bool)
- func (m *NotifierMutation) Name() (r string, exists bool)
- func (m *NotifierMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NotifierMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NotifierMutation) OldGroupID(ctx context.Context) (v uuid.UUID, err error)
- func (m *NotifierMutation) OldIsActive(ctx context.Context) (v bool, err error)
- func (m *NotifierMutation) OldName(ctx context.Context) (v string, err error)
- func (m *NotifierMutation) OldURL(ctx context.Context) (v string, err error)
- func (m *NotifierMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NotifierMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *NotifierMutation) Op() Op
- func (m *NotifierMutation) RemovedEdges() []string
- func (m *NotifierMutation) RemovedIDs(name string) []ent.Value
- func (m *NotifierMutation) ResetCreatedAt()
- func (m *NotifierMutation) ResetEdge(name string) error
- func (m *NotifierMutation) ResetField(name string) error
- func (m *NotifierMutation) ResetGroup()
- func (m *NotifierMutation) ResetGroupID()
- func (m *NotifierMutation) ResetIsActive()
- func (m *NotifierMutation) ResetName()
- func (m *NotifierMutation) ResetURL()
- func (m *NotifierMutation) ResetUpdatedAt()
- func (m *NotifierMutation) ResetUser()
- func (m *NotifierMutation) ResetUserID()
- func (m *NotifierMutation) SetCreatedAt(t time.Time)
- func (m *NotifierMutation) SetField(name string, value ent.Value) error
- func (m *NotifierMutation) SetGroupID(u uuid.UUID)
- func (m *NotifierMutation) SetID(id uuid.UUID)
- func (m *NotifierMutation) SetIsActive(b bool)
- func (m *NotifierMutation) SetName(s string)
- func (m *NotifierMutation) SetOp(op Op)
- func (m *NotifierMutation) SetURL(s string)
- func (m *NotifierMutation) SetUpdatedAt(t time.Time)
- func (m *NotifierMutation) SetUserID(u uuid.UUID)
- func (m NotifierMutation) Tx() (*Tx, error)
- func (m *NotifierMutation) Type() string
- func (m *NotifierMutation) URL() (r string, exists bool)
- func (m *NotifierMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *NotifierMutation) UserCleared() bool
- func (m *NotifierMutation) UserID() (r uuid.UUID, exists bool)
- func (m *NotifierMutation) UserIDs() (ids []uuid.UUID)
- func (m *NotifierMutation) Where(ps ...predicate.Notifier)
- func (m *NotifierMutation) WhereP(ps ...func(*sql.Selector))
- type NotifierQuery
- func (nq *NotifierQuery) Aggregate(fns ...AggregateFunc) *NotifierSelect
- func (nq *NotifierQuery) All(ctx context.Context) ([]*Notifier, error)
- func (nq *NotifierQuery) AllX(ctx context.Context) []*Notifier
- func (nq *NotifierQuery) Clone() *NotifierQuery
- func (nq *NotifierQuery) Count(ctx context.Context) (int, error)
- func (nq *NotifierQuery) CountX(ctx context.Context) int
- func (nq *NotifierQuery) Exist(ctx context.Context) (bool, error)
- func (nq *NotifierQuery) ExistX(ctx context.Context) bool
- func (nq *NotifierQuery) First(ctx context.Context) (*Notifier, error)
- func (nq *NotifierQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (nq *NotifierQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (nq *NotifierQuery) FirstX(ctx context.Context) *Notifier
- func (nq *NotifierQuery) GroupBy(field string, fields ...string) *NotifierGroupBy
- func (nq *NotifierQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (nq *NotifierQuery) IDsX(ctx context.Context) []uuid.UUID
- func (nq *NotifierQuery) Limit(limit int) *NotifierQuery
- func (nq *NotifierQuery) Offset(offset int) *NotifierQuery
- func (nq *NotifierQuery) Only(ctx context.Context) (*Notifier, error)
- func (nq *NotifierQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (nq *NotifierQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (nq *NotifierQuery) OnlyX(ctx context.Context) *Notifier
- func (nq *NotifierQuery) Order(o ...notifier.OrderOption) *NotifierQuery
- func (nq *NotifierQuery) QueryGroup() *GroupQuery
- func (nq *NotifierQuery) QueryUser() *UserQuery
- func (nq *NotifierQuery) Select(fields ...string) *NotifierSelect
- func (nq *NotifierQuery) Unique(unique bool) *NotifierQuery
- func (nq *NotifierQuery) Where(ps ...predicate.Notifier) *NotifierQuery
- func (nq *NotifierQuery) WithGroup(opts ...func(*GroupQuery)) *NotifierQuery
- func (nq *NotifierQuery) WithUser(opts ...func(*UserQuery)) *NotifierQuery
- type NotifierSelect
- func (ns *NotifierSelect) Aggregate(fns ...AggregateFunc) *NotifierSelect
- func (s *NotifierSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NotifierSelect) BoolX(ctx context.Context) bool
- func (s *NotifierSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NotifierSelect) BoolsX(ctx context.Context) []bool
- func (s *NotifierSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NotifierSelect) Float64X(ctx context.Context) float64
- func (s *NotifierSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NotifierSelect) Float64sX(ctx context.Context) []float64
- func (s *NotifierSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NotifierSelect) IntX(ctx context.Context) int
- func (s *NotifierSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NotifierSelect) IntsX(ctx context.Context) []int
- func (ns *NotifierSelect) Scan(ctx context.Context, v any) error
- func (s *NotifierSelect) ScanX(ctx context.Context, v any)
- func (s *NotifierSelect) String(ctx context.Context) (_ string, err error)
- func (s *NotifierSelect) StringX(ctx context.Context) string
- func (s *NotifierSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NotifierSelect) StringsX(ctx context.Context) []string
- type NotifierUpdate
- func (nu *NotifierUpdate) ClearGroup() *NotifierUpdate
- func (nu *NotifierUpdate) ClearUser() *NotifierUpdate
- func (nu *NotifierUpdate) Exec(ctx context.Context) error
- func (nu *NotifierUpdate) ExecX(ctx context.Context)
- func (nu *NotifierUpdate) Mutation() *NotifierMutation
- func (nu *NotifierUpdate) Save(ctx context.Context) (int, error)
- func (nu *NotifierUpdate) SaveX(ctx context.Context) int
- func (nu *NotifierUpdate) SetGroup(g *Group) *NotifierUpdate
- func (nu *NotifierUpdate) SetGroupID(u uuid.UUID) *NotifierUpdate
- func (nu *NotifierUpdate) SetIsActive(b bool) *NotifierUpdate
- func (nu *NotifierUpdate) SetName(s string) *NotifierUpdate
- func (nu *NotifierUpdate) SetNillableGroupID(u *uuid.UUID) *NotifierUpdate
- func (nu *NotifierUpdate) SetNillableIsActive(b *bool) *NotifierUpdate
- func (nu *NotifierUpdate) SetNillableName(s *string) *NotifierUpdate
- func (nu *NotifierUpdate) SetNillableURL(s *string) *NotifierUpdate
- func (nu *NotifierUpdate) SetNillableUserID(u *uuid.UUID) *NotifierUpdate
- func (nu *NotifierUpdate) SetURL(s string) *NotifierUpdate
- func (nu *NotifierUpdate) SetUpdatedAt(t time.Time) *NotifierUpdate
- func (nu *NotifierUpdate) SetUser(u *User) *NotifierUpdate
- func (nu *NotifierUpdate) SetUserID(u uuid.UUID) *NotifierUpdate
- func (nu *NotifierUpdate) Where(ps ...predicate.Notifier) *NotifierUpdate
- type NotifierUpdateOne
- func (nuo *NotifierUpdateOne) ClearGroup() *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) ClearUser() *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) Exec(ctx context.Context) error
- func (nuo *NotifierUpdateOne) ExecX(ctx context.Context)
- func (nuo *NotifierUpdateOne) Mutation() *NotifierMutation
- func (nuo *NotifierUpdateOne) Save(ctx context.Context) (*Notifier, error)
- func (nuo *NotifierUpdateOne) SaveX(ctx context.Context) *Notifier
- func (nuo *NotifierUpdateOne) Select(field string, fields ...string) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetGroup(g *Group) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetGroupID(u uuid.UUID) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetIsActive(b bool) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetName(s string) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetNillableGroupID(u *uuid.UUID) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetNillableIsActive(b *bool) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetNillableName(s *string) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetNillableURL(s *string) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetNillableUserID(u *uuid.UUID) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetURL(s string) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetUpdatedAt(t time.Time) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetUser(u *User) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) SetUserID(u uuid.UUID) *NotifierUpdateOne
- func (nuo *NotifierUpdateOne) Where(ps ...predicate.Notifier) *NotifierUpdateOne
- type Notifiers
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type User
- func (u *User) GetID() uuid.UUID
- func (u *User) QueryAuthTokens() *AuthTokensQuery
- func (u *User) QueryGroup() *GroupQuery
- func (u *User) QueryNotifiers() *NotifierQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- 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 uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *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) QueryAuthTokens(u *User) *AuthTokensQuery
- func (c *UserClient) QueryGroup(u *User) *GroupQuery
- func (c *UserClient) QueryNotifiers(u *User) *NotifierQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddAuthTokenIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddAuthTokens(a ...*AuthTokens) *UserCreate
- func (uc *UserCreate) AddNotifierIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddNotifiers(n ...*Notifier) *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) SetActivatedOn(t time.Time) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetGroup(g *Group) *UserCreate
- func (uc *UserCreate) SetGroupID(id uuid.UUID) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetIsSuperuser(b bool) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableActivatedOn(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableIsSuperuser(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableRole(u *user.Role) *UserCreate
- func (uc *UserCreate) SetNillableSuperuser(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetRole(u user.Role) *UserCreate
- func (uc *UserCreate) SetSuperuser(b bool) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) ActivatedOn() (r time.Time, exists bool)
- func (m *UserMutation) ActivatedOnCleared() bool
- func (m *UserMutation) AddAuthTokenIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddNotifierIDs(ids ...uuid.UUID)
- 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) AuthTokensCleared() bool
- func (m *UserMutation) AuthTokensIDs() (ids []uuid.UUID)
- func (m *UserMutation) ClearActivatedOn()
- func (m *UserMutation) ClearAuthTokens()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearGroup()
- func (m *UserMutation) ClearNotifiers()
- 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) Email() (r string, exists 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) GroupCleared() bool
- func (m *UserMutation) GroupID() (id uuid.UUID, exists bool)
- func (m *UserMutation) GroupIDs() (ids []uuid.UUID)
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) IsSuperuser() (r bool, exists bool)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) NotifiersCleared() bool
- func (m *UserMutation) NotifiersIDs() (ids []uuid.UUID)
- func (m *UserMutation) OldActivatedOn(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldIsSuperuser(ctx context.Context) (v bool, 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) OldRole(ctx context.Context) (v user.Role, err error)
- func (m *UserMutation) OldSuperuser(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) RemoveAuthTokenIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveNotifierIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovedAuthTokensIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedNotifiersIDs() (ids []uuid.UUID)
- func (m *UserMutation) ResetActivatedOn()
- func (m *UserMutation) ResetAuthTokens()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetGroup()
- func (m *UserMutation) ResetIsSuperuser()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetNotifiers()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetRole()
- func (m *UserMutation) ResetSuperuser()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) Role() (r user.Role, exists bool)
- func (m *UserMutation) SetActivatedOn(t time.Time)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetGroupID(id uuid.UUID)
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetIsSuperuser(b bool)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetRole(u user.Role)
- func (m *UserMutation) SetSuperuser(b bool)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) Superuser() (r bool, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, 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 uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- 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 []uuid.UUID, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- 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 uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryAuthTokens() *AuthTokensQuery
- func (uq *UserQuery) QueryGroup() *GroupQuery
- func (uq *UserQuery) QueryNotifiers() *NotifierQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithAuthTokens(opts ...func(*AuthTokensQuery)) *UserQuery
- func (uq *UserQuery) WithGroup(opts ...func(*GroupQuery)) *UserQuery
- func (uq *UserQuery) WithNotifiers(opts ...func(*NotifierQuery)) *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) AddAuthTokenIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddAuthTokens(a ...*AuthTokens) *UserUpdate
- func (uu *UserUpdate) AddNotifierIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddNotifiers(n ...*Notifier) *UserUpdate
- func (uu *UserUpdate) ClearActivatedOn() *UserUpdate
- func (uu *UserUpdate) ClearAuthTokens() *UserUpdate
- func (uu *UserUpdate) ClearGroup() *UserUpdate
- func (uu *UserUpdate) ClearNotifiers() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveAuthTokenIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveAuthTokens(a ...*AuthTokens) *UserUpdate
- func (uu *UserUpdate) RemoveNotifierIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveNotifiers(n ...*Notifier) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetActivatedOn(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetGroup(g *Group) *UserUpdate
- func (uu *UserUpdate) SetGroupID(id uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetIsSuperuser(b bool) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableActivatedOn(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableIsSuperuser(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableRole(u *user.Role) *UserUpdate
- func (uu *UserUpdate) SetNillableSuperuser(b *bool) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetRole(u user.Role) *UserUpdate
- func (uu *UserUpdate) SetSuperuser(b bool) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddAuthTokenIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddAuthTokens(a ...*AuthTokens) *UserUpdateOne
- func (uuo *UserUpdateOne) AddNotifierIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddNotifiers(n ...*Notifier) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearActivatedOn() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAuthTokens() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGroup() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearNotifiers() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveAuthTokenIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveAuthTokens(a ...*AuthTokens) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveNotifierIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveNotifiers(n ...*Notifier) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetActivatedOn(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGroup(g *Group) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGroupID(id uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsSuperuser(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableActivatedOn(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsSuperuser(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRole(u *user.Role) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableSuperuser(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRole(u user.Role) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSuperuser(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *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. TypeAttachment = "Attachment" TypeAuthRoles = "AuthRoles" TypeAuthTokens = "AuthTokens" TypeDocument = "Document" TypeGroup = "Group" TypeGroupInvitationToken = "GroupInvitationToken" TypeItem = "Item" TypeItemField = "ItemField" TypeLabel = "Label" TypeLocation = "Location" TypeMaintenanceEntry = "MaintenanceEntry" TypeNotifier = "Notifier" 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 Attachment ¶
type Attachment struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Type holds the value of the "type" field. Type attachment.Type `json:"type,omitempty"` // Primary holds the value of the "primary" field. Primary bool `json:"primary,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AttachmentQuery when eager-loading is set. Edges AttachmentEdges `json:"edges"` // contains filtered or unexported fields }
Attachment is the model entity for the Attachment schema.
func (*Attachment) GetID ¶
func (a *Attachment) GetID() uuid.UUID
func (*Attachment) QueryDocument ¶
func (a *Attachment) QueryDocument() *DocumentQuery
QueryDocument queries the "document" edge of the Attachment entity.
func (*Attachment) QueryItem ¶
func (a *Attachment) QueryItem() *ItemQuery
QueryItem queries the "item" edge of the Attachment entity.
func (*Attachment) String ¶
func (a *Attachment) String() string
String implements the fmt.Stringer.
func (*Attachment) Unwrap ¶
func (a *Attachment) Unwrap() *Attachment
Unwrap unwraps the Attachment 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 (*Attachment) Update ¶
func (a *Attachment) Update() *AttachmentUpdateOne
Update returns a builder for updating this Attachment. Note that you need to call Attachment.Unwrap() before calling this method if this Attachment was returned from a transaction, and the transaction was committed or rolled back.
type AttachmentClient ¶
type AttachmentClient struct {
// contains filtered or unexported fields
}
AttachmentClient is a client for the Attachment schema.
func NewAttachmentClient ¶
func NewAttachmentClient(c config) *AttachmentClient
NewAttachmentClient returns a client for the Attachment from the given config.
func (*AttachmentClient) Create ¶
func (c *AttachmentClient) Create() *AttachmentCreate
Create returns a builder for creating a Attachment entity.
func (*AttachmentClient) CreateBulk ¶
func (c *AttachmentClient) CreateBulk(builders ...*AttachmentCreate) *AttachmentCreateBulk
CreateBulk returns a builder for creating a bulk of Attachment entities.
func (*AttachmentClient) Delete ¶
func (c *AttachmentClient) Delete() *AttachmentDelete
Delete returns a delete builder for Attachment.
func (*AttachmentClient) DeleteOne ¶
func (c *AttachmentClient) DeleteOne(a *Attachment) *AttachmentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AttachmentClient) DeleteOneID ¶
func (c *AttachmentClient) DeleteOneID(id uuid.UUID) *AttachmentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AttachmentClient) Get ¶
func (c *AttachmentClient) Get(ctx context.Context, id uuid.UUID) (*Attachment, error)
Get returns a Attachment entity by its id.
func (*AttachmentClient) GetX ¶
func (c *AttachmentClient) GetX(ctx context.Context, id uuid.UUID) *Attachment
GetX is like Get, but panics if an error occurs.
func (*AttachmentClient) Hooks ¶
func (c *AttachmentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AttachmentClient) Intercept ¶
func (c *AttachmentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `attachment.Intercept(f(g(h())))`.
func (*AttachmentClient) Interceptors ¶
func (c *AttachmentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AttachmentClient) MapCreateBulk ¶
func (c *AttachmentClient) MapCreateBulk(slice any, setFunc func(*AttachmentCreate, int)) *AttachmentCreateBulk
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 (*AttachmentClient) Query ¶
func (c *AttachmentClient) Query() *AttachmentQuery
Query returns a query builder for Attachment.
func (*AttachmentClient) QueryDocument ¶
func (c *AttachmentClient) QueryDocument(a *Attachment) *DocumentQuery
QueryDocument queries the document edge of a Attachment.
func (*AttachmentClient) QueryItem ¶
func (c *AttachmentClient) QueryItem(a *Attachment) *ItemQuery
QueryItem queries the item edge of a Attachment.
func (*AttachmentClient) Update ¶
func (c *AttachmentClient) Update() *AttachmentUpdate
Update returns an update builder for Attachment.
func (*AttachmentClient) UpdateOne ¶
func (c *AttachmentClient) UpdateOne(a *Attachment) *AttachmentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AttachmentClient) UpdateOneID ¶
func (c *AttachmentClient) UpdateOneID(id uuid.UUID) *AttachmentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AttachmentClient) Use ¶
func (c *AttachmentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `attachment.Hooks(f(g(h())))`.
type AttachmentCreate ¶
type AttachmentCreate struct {
// contains filtered or unexported fields
}
AttachmentCreate is the builder for creating a Attachment entity.
func (*AttachmentCreate) Exec ¶
func (ac *AttachmentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachmentCreate) ExecX ¶
func (ac *AttachmentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentCreate) Mutation ¶
func (ac *AttachmentCreate) Mutation() *AttachmentMutation
Mutation returns the AttachmentMutation object of the builder.
func (*AttachmentCreate) Save ¶
func (ac *AttachmentCreate) Save(ctx context.Context) (*Attachment, error)
Save creates the Attachment in the database.
func (*AttachmentCreate) SaveX ¶
func (ac *AttachmentCreate) SaveX(ctx context.Context) *Attachment
SaveX calls Save and panics if Save returns an error.
func (*AttachmentCreate) SetCreatedAt ¶
func (ac *AttachmentCreate) SetCreatedAt(t time.Time) *AttachmentCreate
SetCreatedAt sets the "created_at" field.
func (*AttachmentCreate) SetDocument ¶
func (ac *AttachmentCreate) SetDocument(d *Document) *AttachmentCreate
SetDocument sets the "document" edge to the Document entity.
func (*AttachmentCreate) SetDocumentID ¶
func (ac *AttachmentCreate) SetDocumentID(id uuid.UUID) *AttachmentCreate
SetDocumentID sets the "document" edge to the Document entity by ID.
func (*AttachmentCreate) SetID ¶
func (ac *AttachmentCreate) SetID(u uuid.UUID) *AttachmentCreate
SetID sets the "id" field.
func (*AttachmentCreate) SetItem ¶
func (ac *AttachmentCreate) SetItem(i *Item) *AttachmentCreate
SetItem sets the "item" edge to the Item entity.
func (*AttachmentCreate) SetItemID ¶
func (ac *AttachmentCreate) SetItemID(id uuid.UUID) *AttachmentCreate
SetItemID sets the "item" edge to the Item entity by ID.
func (*AttachmentCreate) SetNillableCreatedAt ¶
func (ac *AttachmentCreate) SetNillableCreatedAt(t *time.Time) *AttachmentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AttachmentCreate) SetNillableID ¶
func (ac *AttachmentCreate) SetNillableID(u *uuid.UUID) *AttachmentCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AttachmentCreate) SetNillablePrimary ¶
func (ac *AttachmentCreate) SetNillablePrimary(b *bool) *AttachmentCreate
SetNillablePrimary sets the "primary" field if the given value is not nil.
func (*AttachmentCreate) SetNillableType ¶
func (ac *AttachmentCreate) SetNillableType(a *attachment.Type) *AttachmentCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*AttachmentCreate) SetNillableUpdatedAt ¶
func (ac *AttachmentCreate) SetNillableUpdatedAt(t *time.Time) *AttachmentCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*AttachmentCreate) SetPrimary ¶
func (ac *AttachmentCreate) SetPrimary(b bool) *AttachmentCreate
SetPrimary sets the "primary" field.
func (*AttachmentCreate) SetType ¶
func (ac *AttachmentCreate) SetType(a attachment.Type) *AttachmentCreate
SetType sets the "type" field.
func (*AttachmentCreate) SetUpdatedAt ¶
func (ac *AttachmentCreate) SetUpdatedAt(t time.Time) *AttachmentCreate
SetUpdatedAt sets the "updated_at" field.
type AttachmentCreateBulk ¶
type AttachmentCreateBulk struct {
// contains filtered or unexported fields
}
AttachmentCreateBulk is the builder for creating many Attachment entities in bulk.
func (*AttachmentCreateBulk) Exec ¶
func (acb *AttachmentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachmentCreateBulk) ExecX ¶
func (acb *AttachmentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentCreateBulk) Save ¶
func (acb *AttachmentCreateBulk) Save(ctx context.Context) ([]*Attachment, error)
Save creates the Attachment entities in the database.
func (*AttachmentCreateBulk) SaveX ¶
func (acb *AttachmentCreateBulk) SaveX(ctx context.Context) []*Attachment
SaveX is like Save, but panics if an error occurs.
type AttachmentDelete ¶
type AttachmentDelete struct {
// contains filtered or unexported fields
}
AttachmentDelete is the builder for deleting a Attachment entity.
func (*AttachmentDelete) Exec ¶
func (ad *AttachmentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AttachmentDelete) ExecX ¶
func (ad *AttachmentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentDelete) Where ¶
func (ad *AttachmentDelete) Where(ps ...predicate.Attachment) *AttachmentDelete
Where appends a list predicates to the AttachmentDelete builder.
type AttachmentDeleteOne ¶
type AttachmentDeleteOne struct {
// contains filtered or unexported fields
}
AttachmentDeleteOne is the builder for deleting a single Attachment entity.
func (*AttachmentDeleteOne) Exec ¶
func (ado *AttachmentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AttachmentDeleteOne) ExecX ¶
func (ado *AttachmentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentDeleteOne) Where ¶
func (ado *AttachmentDeleteOne) Where(ps ...predicate.Attachment) *AttachmentDeleteOne
Where appends a list predicates to the AttachmentDelete builder.
type AttachmentEdges ¶
type AttachmentEdges struct { // Item holds the value of the item edge. Item *Item `json:"item,omitempty"` // Document holds the value of the document edge. Document *Document `json:"document,omitempty"` // contains filtered or unexported fields }
AttachmentEdges holds the relations/edges for other nodes in the graph.
func (AttachmentEdges) DocumentOrErr ¶
func (e AttachmentEdges) DocumentOrErr() (*Document, error)
DocumentOrErr returns the Document value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (AttachmentEdges) ItemOrErr ¶
func (e AttachmentEdges) ItemOrErr() (*Item, error)
ItemOrErr returns the Item value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AttachmentGroupBy ¶
type AttachmentGroupBy struct {
// contains filtered or unexported fields
}
AttachmentGroupBy is the group-by builder for Attachment entities.
func (*AttachmentGroupBy) Aggregate ¶
func (agb *AttachmentGroupBy) Aggregate(fns ...AggregateFunc) *AttachmentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AttachmentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Scan ¶
func (agb *AttachmentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AttachmentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AttachmentMutation ¶
type AttachmentMutation struct {
// contains filtered or unexported fields
}
AttachmentMutation represents an operation that mutates the Attachment nodes in the graph.
func (*AttachmentMutation) AddField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) AddedEdges ¶
func (m *AttachmentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AttachmentMutation) AddedField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) AddedFields ¶
func (m *AttachmentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AttachmentMutation) AddedIDs ¶
func (m *AttachmentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AttachmentMutation) ClearDocument ¶
func (m *AttachmentMutation) ClearDocument()
ClearDocument clears the "document" edge to the Document entity.
func (*AttachmentMutation) ClearEdge ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ClearField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ClearItem ¶
func (m *AttachmentMutation) ClearItem()
ClearItem clears the "item" edge to the Item entity.
func (*AttachmentMutation) ClearedEdges ¶
func (m *AttachmentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AttachmentMutation) ClearedFields ¶
func (m *AttachmentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AttachmentMutation) Client ¶
func (m AttachmentMutation) 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 (*AttachmentMutation) CreatedAt ¶
func (m *AttachmentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AttachmentMutation) DocumentCleared ¶
func (m *AttachmentMutation) DocumentCleared() bool
DocumentCleared reports if the "document" edge to the Document entity was cleared.
func (*AttachmentMutation) DocumentID ¶
func (m *AttachmentMutation) DocumentID() (id uuid.UUID, exists bool)
DocumentID returns the "document" edge ID in the mutation.
func (*AttachmentMutation) DocumentIDs ¶
func (m *AttachmentMutation) DocumentIDs() (ids []uuid.UUID)
DocumentIDs returns the "document" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DocumentID instead. It exists only for internal usage by the builders.
func (*AttachmentMutation) EdgeCleared ¶
func (m *AttachmentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AttachmentMutation) Field ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) FieldCleared ¶
func (m *AttachmentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AttachmentMutation) Fields ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) GetType ¶
func (m *AttachmentMutation) GetType() (r attachment.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*AttachmentMutation) ID ¶
func (m *AttachmentMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AttachmentMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AttachmentMutation) ItemCleared ¶
func (m *AttachmentMutation) ItemCleared() bool
ItemCleared reports if the "item" edge to the Item entity was cleared.
func (*AttachmentMutation) ItemID ¶
func (m *AttachmentMutation) ItemID() (id uuid.UUID, exists bool)
ItemID returns the "item" edge ID in the mutation.
func (*AttachmentMutation) ItemIDs ¶
func (m *AttachmentMutation) ItemIDs() (ids []uuid.UUID)
ItemIDs returns the "item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ItemID instead. It exists only for internal usage by the builders.
func (*AttachmentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Attachment entity. If the Attachment 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 (*AttachmentMutation) 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 (*AttachmentMutation) OldPrimary ¶
func (m *AttachmentMutation) OldPrimary(ctx context.Context) (v bool, err error)
OldPrimary returns the old "primary" field's value of the Attachment entity. If the Attachment 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 (*AttachmentMutation) OldType ¶
func (m *AttachmentMutation) OldType(ctx context.Context) (v attachment.Type, err error)
OldType returns the old "type" field's value of the Attachment entity. If the Attachment 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 (*AttachmentMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Attachment entity. If the Attachment 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 (*AttachmentMutation) Primary ¶
func (m *AttachmentMutation) Primary() (r bool, exists bool)
Primary returns the value of the "primary" field in the mutation.
func (*AttachmentMutation) RemovedEdges ¶
func (m *AttachmentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AttachmentMutation) RemovedIDs ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ResetCreatedAt ¶
func (m *AttachmentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AttachmentMutation) ResetDocument ¶
func (m *AttachmentMutation) ResetDocument()
ResetDocument resets all changes to the "document" edge.
func (*AttachmentMutation) ResetEdge ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ResetField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ResetItem ¶
func (m *AttachmentMutation) ResetItem()
ResetItem resets all changes to the "item" edge.
func (*AttachmentMutation) ResetPrimary ¶
func (m *AttachmentMutation) ResetPrimary()
ResetPrimary resets all changes to the "primary" field.
func (*AttachmentMutation) ResetType ¶
func (m *AttachmentMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*AttachmentMutation) ResetUpdatedAt ¶
func (m *AttachmentMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AttachmentMutation) SetCreatedAt ¶
func (m *AttachmentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AttachmentMutation) SetDocumentID ¶
func (m *AttachmentMutation) SetDocumentID(id uuid.UUID)
SetDocumentID sets the "document" edge to the Document entity by id.
func (*AttachmentMutation) SetField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) SetID ¶
func (m *AttachmentMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Attachment entities.
func (*AttachmentMutation) SetItemID ¶
func (m *AttachmentMutation) SetItemID(id uuid.UUID)
SetItemID sets the "item" edge to the Item entity by id.
func (*AttachmentMutation) SetOp ¶
func (m *AttachmentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AttachmentMutation) SetPrimary ¶
func (m *AttachmentMutation) SetPrimary(b bool)
SetPrimary sets the "primary" field.
func (*AttachmentMutation) SetType ¶
func (m *AttachmentMutation) SetType(a attachment.Type)
SetType sets the "type" field.
func (*AttachmentMutation) SetUpdatedAt ¶
func (m *AttachmentMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (AttachmentMutation) Tx ¶
func (m AttachmentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AttachmentMutation) Type ¶
func (m *AttachmentMutation) Type() string
Type returns the node type of this mutation (Attachment).
func (*AttachmentMutation) UpdatedAt ¶
func (m *AttachmentMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AttachmentMutation) Where ¶
func (m *AttachmentMutation) Where(ps ...predicate.Attachment)
Where appends a list predicates to the AttachmentMutation builder.
func (*AttachmentMutation) WhereP ¶
func (m *AttachmentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AttachmentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AttachmentQuery ¶
type AttachmentQuery struct {
// contains filtered or unexported fields
}
AttachmentQuery is the builder for querying Attachment entities.
func (*AttachmentQuery) Aggregate ¶
func (aq *AttachmentQuery) Aggregate(fns ...AggregateFunc) *AttachmentSelect
Aggregate returns a AttachmentSelect configured with the given aggregations.
func (*AttachmentQuery) All ¶
func (aq *AttachmentQuery) All(ctx context.Context) ([]*Attachment, error)
All executes the query and returns a list of Attachments.
func (*AttachmentQuery) AllX ¶
func (aq *AttachmentQuery) AllX(ctx context.Context) []*Attachment
AllX is like All, but panics if an error occurs.
func (*AttachmentQuery) Clone ¶
func (aq *AttachmentQuery) Clone() *AttachmentQuery
Clone returns a duplicate of the AttachmentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AttachmentQuery) Count ¶
func (aq *AttachmentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AttachmentQuery) CountX ¶
func (aq *AttachmentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AttachmentQuery) Exist ¶
func (aq *AttachmentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AttachmentQuery) ExistX ¶
func (aq *AttachmentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AttachmentQuery) First ¶
func (aq *AttachmentQuery) First(ctx context.Context) (*Attachment, error)
First returns the first Attachment entity from the query. Returns a *NotFoundError when no Attachment was found.
func (*AttachmentQuery) FirstID ¶
FirstID returns the first Attachment ID from the query. Returns a *NotFoundError when no Attachment ID was found.
func (*AttachmentQuery) FirstIDX ¶
func (aq *AttachmentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AttachmentQuery) FirstX ¶
func (aq *AttachmentQuery) FirstX(ctx context.Context) *Attachment
FirstX is like First, but panics if an error occurs.
func (*AttachmentQuery) GroupBy ¶
func (aq *AttachmentQuery) GroupBy(field string, fields ...string) *AttachmentGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Attachment.Query(). GroupBy(attachment.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AttachmentQuery) IDsX ¶
func (aq *AttachmentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AttachmentQuery) Limit ¶
func (aq *AttachmentQuery) Limit(limit int) *AttachmentQuery
Limit the number of records to be returned by this query.
func (*AttachmentQuery) Offset ¶
func (aq *AttachmentQuery) Offset(offset int) *AttachmentQuery
Offset to start from.
func (*AttachmentQuery) Only ¶
func (aq *AttachmentQuery) Only(ctx context.Context) (*Attachment, error)
Only returns a single Attachment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Attachment entity is found. Returns a *NotFoundError when no Attachment entities are found.
func (*AttachmentQuery) OnlyID ¶
OnlyID is like Only, but returns the only Attachment ID in the query. Returns a *NotSingularError when more than one Attachment ID is found. Returns a *NotFoundError when no entities are found.
func (*AttachmentQuery) OnlyIDX ¶
func (aq *AttachmentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AttachmentQuery) OnlyX ¶
func (aq *AttachmentQuery) OnlyX(ctx context.Context) *Attachment
OnlyX is like Only, but panics if an error occurs.
func (*AttachmentQuery) Order ¶
func (aq *AttachmentQuery) Order(o ...attachment.OrderOption) *AttachmentQuery
Order specifies how the records should be ordered.
func (*AttachmentQuery) QueryDocument ¶
func (aq *AttachmentQuery) QueryDocument() *DocumentQuery
QueryDocument chains the current query on the "document" edge.
func (*AttachmentQuery) QueryItem ¶
func (aq *AttachmentQuery) QueryItem() *ItemQuery
QueryItem chains the current query on the "item" edge.
func (*AttachmentQuery) Select ¶
func (aq *AttachmentQuery) Select(fields ...string) *AttachmentSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Attachment.Query(). Select(attachment.FieldCreatedAt). Scan(ctx, &v)
func (*AttachmentQuery) Unique ¶
func (aq *AttachmentQuery) Unique(unique bool) *AttachmentQuery
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 (*AttachmentQuery) Where ¶
func (aq *AttachmentQuery) Where(ps ...predicate.Attachment) *AttachmentQuery
Where adds a new predicate for the AttachmentQuery builder.
func (*AttachmentQuery) WithDocument ¶
func (aq *AttachmentQuery) WithDocument(opts ...func(*DocumentQuery)) *AttachmentQuery
WithDocument tells the query-builder to eager-load the nodes that are connected to the "document" edge. The optional arguments are used to configure the query builder of the edge.
func (*AttachmentQuery) WithItem ¶
func (aq *AttachmentQuery) WithItem(opts ...func(*ItemQuery)) *AttachmentQuery
WithItem tells the query-builder to eager-load the nodes that are connected to the "item" edge. The optional arguments are used to configure the query builder of the edge.
type AttachmentSelect ¶
type AttachmentSelect struct { *AttachmentQuery // contains filtered or unexported fields }
AttachmentSelect is the builder for selecting fields of Attachment entities.
func (*AttachmentSelect) Aggregate ¶
func (as *AttachmentSelect) Aggregate(fns ...AggregateFunc) *AttachmentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AttachmentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Scan ¶
func (as *AttachmentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AttachmentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AttachmentUpdate ¶
type AttachmentUpdate struct {
// contains filtered or unexported fields
}
AttachmentUpdate is the builder for updating Attachment entities.
func (*AttachmentUpdate) ClearDocument ¶
func (au *AttachmentUpdate) ClearDocument() *AttachmentUpdate
ClearDocument clears the "document" edge to the Document entity.
func (*AttachmentUpdate) ClearItem ¶
func (au *AttachmentUpdate) ClearItem() *AttachmentUpdate
ClearItem clears the "item" edge to the Item entity.
func (*AttachmentUpdate) Exec ¶
func (au *AttachmentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachmentUpdate) ExecX ¶
func (au *AttachmentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentUpdate) Mutation ¶
func (au *AttachmentUpdate) Mutation() *AttachmentMutation
Mutation returns the AttachmentMutation object of the builder.
func (*AttachmentUpdate) Save ¶
func (au *AttachmentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AttachmentUpdate) SaveX ¶
func (au *AttachmentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AttachmentUpdate) SetDocument ¶
func (au *AttachmentUpdate) SetDocument(d *Document) *AttachmentUpdate
SetDocument sets the "document" edge to the Document entity.
func (*AttachmentUpdate) SetDocumentID ¶
func (au *AttachmentUpdate) SetDocumentID(id uuid.UUID) *AttachmentUpdate
SetDocumentID sets the "document" edge to the Document entity by ID.
func (*AttachmentUpdate) SetItem ¶
func (au *AttachmentUpdate) SetItem(i *Item) *AttachmentUpdate
SetItem sets the "item" edge to the Item entity.
func (*AttachmentUpdate) SetItemID ¶
func (au *AttachmentUpdate) SetItemID(id uuid.UUID) *AttachmentUpdate
SetItemID sets the "item" edge to the Item entity by ID.
func (*AttachmentUpdate) SetNillablePrimary ¶
func (au *AttachmentUpdate) SetNillablePrimary(b *bool) *AttachmentUpdate
SetNillablePrimary sets the "primary" field if the given value is not nil.
func (*AttachmentUpdate) SetNillableType ¶
func (au *AttachmentUpdate) SetNillableType(a *attachment.Type) *AttachmentUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*AttachmentUpdate) SetPrimary ¶
func (au *AttachmentUpdate) SetPrimary(b bool) *AttachmentUpdate
SetPrimary sets the "primary" field.
func (*AttachmentUpdate) SetType ¶
func (au *AttachmentUpdate) SetType(a attachment.Type) *AttachmentUpdate
SetType sets the "type" field.
func (*AttachmentUpdate) SetUpdatedAt ¶
func (au *AttachmentUpdate) SetUpdatedAt(t time.Time) *AttachmentUpdate
SetUpdatedAt sets the "updated_at" field.
func (*AttachmentUpdate) Where ¶
func (au *AttachmentUpdate) Where(ps ...predicate.Attachment) *AttachmentUpdate
Where appends a list predicates to the AttachmentUpdate builder.
type AttachmentUpdateOne ¶
type AttachmentUpdateOne struct {
// contains filtered or unexported fields
}
AttachmentUpdateOne is the builder for updating a single Attachment entity.
func (*AttachmentUpdateOne) ClearDocument ¶
func (auo *AttachmentUpdateOne) ClearDocument() *AttachmentUpdateOne
ClearDocument clears the "document" edge to the Document entity.
func (*AttachmentUpdateOne) ClearItem ¶
func (auo *AttachmentUpdateOne) ClearItem() *AttachmentUpdateOne
ClearItem clears the "item" edge to the Item entity.
func (*AttachmentUpdateOne) Exec ¶
func (auo *AttachmentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AttachmentUpdateOne) ExecX ¶
func (auo *AttachmentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentUpdateOne) Mutation ¶
func (auo *AttachmentUpdateOne) Mutation() *AttachmentMutation
Mutation returns the AttachmentMutation object of the builder.
func (*AttachmentUpdateOne) Save ¶
func (auo *AttachmentUpdateOne) Save(ctx context.Context) (*Attachment, error)
Save executes the query and returns the updated Attachment entity.
func (*AttachmentUpdateOne) SaveX ¶
func (auo *AttachmentUpdateOne) SaveX(ctx context.Context) *Attachment
SaveX is like Save, but panics if an error occurs.
func (*AttachmentUpdateOne) Select ¶
func (auo *AttachmentUpdateOne) Select(field string, fields ...string) *AttachmentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AttachmentUpdateOne) SetDocument ¶
func (auo *AttachmentUpdateOne) SetDocument(d *Document) *AttachmentUpdateOne
SetDocument sets the "document" edge to the Document entity.
func (*AttachmentUpdateOne) SetDocumentID ¶
func (auo *AttachmentUpdateOne) SetDocumentID(id uuid.UUID) *AttachmentUpdateOne
SetDocumentID sets the "document" edge to the Document entity by ID.
func (*AttachmentUpdateOne) SetItem ¶
func (auo *AttachmentUpdateOne) SetItem(i *Item) *AttachmentUpdateOne
SetItem sets the "item" edge to the Item entity.
func (*AttachmentUpdateOne) SetItemID ¶
func (auo *AttachmentUpdateOne) SetItemID(id uuid.UUID) *AttachmentUpdateOne
SetItemID sets the "item" edge to the Item entity by ID.
func (*AttachmentUpdateOne) SetNillablePrimary ¶
func (auo *AttachmentUpdateOne) SetNillablePrimary(b *bool) *AttachmentUpdateOne
SetNillablePrimary sets the "primary" field if the given value is not nil.
func (*AttachmentUpdateOne) SetNillableType ¶
func (auo *AttachmentUpdateOne) SetNillableType(a *attachment.Type) *AttachmentUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*AttachmentUpdateOne) SetPrimary ¶
func (auo *AttachmentUpdateOne) SetPrimary(b bool) *AttachmentUpdateOne
SetPrimary sets the "primary" field.
func (*AttachmentUpdateOne) SetType ¶
func (auo *AttachmentUpdateOne) SetType(a attachment.Type) *AttachmentUpdateOne
SetType sets the "type" field.
func (*AttachmentUpdateOne) SetUpdatedAt ¶
func (auo *AttachmentUpdateOne) SetUpdatedAt(t time.Time) *AttachmentUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*AttachmentUpdateOne) Where ¶
func (auo *AttachmentUpdateOne) Where(ps ...predicate.Attachment) *AttachmentUpdateOne
Where appends a list predicates to the AttachmentUpdate builder.
type AuthRoles ¶
type AuthRoles struct { // ID of the ent. ID int `json:"id,omitempty"` // Role holds the value of the "role" field. Role authroles.Role `json:"role,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AuthRolesQuery when eager-loading is set. Edges AuthRolesEdges `json:"edges"` // contains filtered or unexported fields }
AuthRoles is the model entity for the AuthRoles schema.
func (*AuthRoles) QueryToken ¶
func (ar *AuthRoles) QueryToken() *AuthTokensQuery
QueryToken queries the "token" edge of the AuthRoles entity.
func (*AuthRoles) Unwrap ¶
Unwrap unwraps the AuthRoles 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 (*AuthRoles) Update ¶
func (ar *AuthRoles) Update() *AuthRolesUpdateOne
Update returns a builder for updating this AuthRoles. Note that you need to call AuthRoles.Unwrap() before calling this method if this AuthRoles was returned from a transaction, and the transaction was committed or rolled back.
type AuthRolesClient ¶
type AuthRolesClient struct {
// contains filtered or unexported fields
}
AuthRolesClient is a client for the AuthRoles schema.
func NewAuthRolesClient ¶
func NewAuthRolesClient(c config) *AuthRolesClient
NewAuthRolesClient returns a client for the AuthRoles from the given config.
func (*AuthRolesClient) Create ¶
func (c *AuthRolesClient) Create() *AuthRolesCreate
Create returns a builder for creating a AuthRoles entity.
func (*AuthRolesClient) CreateBulk ¶
func (c *AuthRolesClient) CreateBulk(builders ...*AuthRolesCreate) *AuthRolesCreateBulk
CreateBulk returns a builder for creating a bulk of AuthRoles entities.
func (*AuthRolesClient) Delete ¶
func (c *AuthRolesClient) Delete() *AuthRolesDelete
Delete returns a delete builder for AuthRoles.
func (*AuthRolesClient) DeleteOne ¶
func (c *AuthRolesClient) DeleteOne(ar *AuthRoles) *AuthRolesDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AuthRolesClient) DeleteOneID ¶
func (c *AuthRolesClient) DeleteOneID(id int) *AuthRolesDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AuthRolesClient) GetX ¶
func (c *AuthRolesClient) GetX(ctx context.Context, id int) *AuthRoles
GetX is like Get, but panics if an error occurs.
func (*AuthRolesClient) Hooks ¶
func (c *AuthRolesClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AuthRolesClient) Intercept ¶
func (c *AuthRolesClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `authroles.Intercept(f(g(h())))`.
func (*AuthRolesClient) Interceptors ¶
func (c *AuthRolesClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AuthRolesClient) MapCreateBulk ¶
func (c *AuthRolesClient) MapCreateBulk(slice any, setFunc func(*AuthRolesCreate, int)) *AuthRolesCreateBulk
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 (*AuthRolesClient) Query ¶
func (c *AuthRolesClient) Query() *AuthRolesQuery
Query returns a query builder for AuthRoles.
func (*AuthRolesClient) QueryToken ¶
func (c *AuthRolesClient) QueryToken(ar *AuthRoles) *AuthTokensQuery
QueryToken queries the token edge of a AuthRoles.
func (*AuthRolesClient) Update ¶
func (c *AuthRolesClient) Update() *AuthRolesUpdate
Update returns an update builder for AuthRoles.
func (*AuthRolesClient) UpdateOne ¶
func (c *AuthRolesClient) UpdateOne(ar *AuthRoles) *AuthRolesUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AuthRolesClient) UpdateOneID ¶
func (c *AuthRolesClient) UpdateOneID(id int) *AuthRolesUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AuthRolesClient) Use ¶
func (c *AuthRolesClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `authroles.Hooks(f(g(h())))`.
type AuthRolesCreate ¶
type AuthRolesCreate struct {
// contains filtered or unexported fields
}
AuthRolesCreate is the builder for creating a AuthRoles entity.
func (*AuthRolesCreate) Exec ¶
func (arc *AuthRolesCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthRolesCreate) ExecX ¶
func (arc *AuthRolesCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthRolesCreate) Mutation ¶
func (arc *AuthRolesCreate) Mutation() *AuthRolesMutation
Mutation returns the AuthRolesMutation object of the builder.
func (*AuthRolesCreate) Save ¶
func (arc *AuthRolesCreate) Save(ctx context.Context) (*AuthRoles, error)
Save creates the AuthRoles in the database.
func (*AuthRolesCreate) SaveX ¶
func (arc *AuthRolesCreate) SaveX(ctx context.Context) *AuthRoles
SaveX calls Save and panics if Save returns an error.
func (*AuthRolesCreate) SetNillableRole ¶
func (arc *AuthRolesCreate) SetNillableRole(a *authroles.Role) *AuthRolesCreate
SetNillableRole sets the "role" field if the given value is not nil.
func (*AuthRolesCreate) SetNillableTokenID ¶
func (arc *AuthRolesCreate) SetNillableTokenID(id *uuid.UUID) *AuthRolesCreate
SetNillableTokenID sets the "token" edge to the AuthTokens entity by ID if the given value is not nil.
func (*AuthRolesCreate) SetRole ¶
func (arc *AuthRolesCreate) SetRole(a authroles.Role) *AuthRolesCreate
SetRole sets the "role" field.
func (*AuthRolesCreate) SetToken ¶
func (arc *AuthRolesCreate) SetToken(a *AuthTokens) *AuthRolesCreate
SetToken sets the "token" edge to the AuthTokens entity.
func (*AuthRolesCreate) SetTokenID ¶
func (arc *AuthRolesCreate) SetTokenID(id uuid.UUID) *AuthRolesCreate
SetTokenID sets the "token" edge to the AuthTokens entity by ID.
type AuthRolesCreateBulk ¶
type AuthRolesCreateBulk struct {
// contains filtered or unexported fields
}
AuthRolesCreateBulk is the builder for creating many AuthRoles entities in bulk.
func (*AuthRolesCreateBulk) Exec ¶
func (arcb *AuthRolesCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthRolesCreateBulk) ExecX ¶
func (arcb *AuthRolesCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AuthRolesDelete ¶
type AuthRolesDelete struct {
// contains filtered or unexported fields
}
AuthRolesDelete is the builder for deleting a AuthRoles entity.
func (*AuthRolesDelete) Exec ¶
func (ard *AuthRolesDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AuthRolesDelete) ExecX ¶
func (ard *AuthRolesDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AuthRolesDelete) Where ¶
func (ard *AuthRolesDelete) Where(ps ...predicate.AuthRoles) *AuthRolesDelete
Where appends a list predicates to the AuthRolesDelete builder.
type AuthRolesDeleteOne ¶
type AuthRolesDeleteOne struct {
// contains filtered or unexported fields
}
AuthRolesDeleteOne is the builder for deleting a single AuthRoles entity.
func (*AuthRolesDeleteOne) Exec ¶
func (ardo *AuthRolesDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AuthRolesDeleteOne) ExecX ¶
func (ardo *AuthRolesDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthRolesDeleteOne) Where ¶
func (ardo *AuthRolesDeleteOne) Where(ps ...predicate.AuthRoles) *AuthRolesDeleteOne
Where appends a list predicates to the AuthRolesDelete builder.
type AuthRolesEdges ¶
type AuthRolesEdges struct { // Token holds the value of the token edge. Token *AuthTokens `json:"token,omitempty"` // contains filtered or unexported fields }
AuthRolesEdges holds the relations/edges for other nodes in the graph.
func (AuthRolesEdges) TokenOrErr ¶
func (e AuthRolesEdges) TokenOrErr() (*AuthTokens, error)
TokenOrErr returns the Token value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AuthRolesGroupBy ¶
type AuthRolesGroupBy struct {
// contains filtered or unexported fields
}
AuthRolesGroupBy is the group-by builder for AuthRoles entities.
func (*AuthRolesGroupBy) Aggregate ¶
func (argb *AuthRolesGroupBy) Aggregate(fns ...AggregateFunc) *AuthRolesGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AuthRolesGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuthRolesGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuthRolesGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuthRolesGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuthRolesGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuthRolesGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuthRolesGroupBy) Scan ¶
func (argb *AuthRolesGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AuthRolesGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuthRolesMutation ¶
type AuthRolesMutation struct {
// contains filtered or unexported fields
}
AuthRolesMutation represents an operation that mutates the AuthRoles nodes in the graph.
func (*AuthRolesMutation) AddField ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) AddedEdges ¶
func (m *AuthRolesMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AuthRolesMutation) AddedField ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) AddedFields ¶
func (m *AuthRolesMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AuthRolesMutation) AddedIDs ¶
func (m *AuthRolesMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AuthRolesMutation) ClearEdge ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) ClearField ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) ClearToken ¶
func (m *AuthRolesMutation) ClearToken()
ClearToken clears the "token" edge to the AuthTokens entity.
func (*AuthRolesMutation) ClearedEdges ¶
func (m *AuthRolesMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AuthRolesMutation) ClearedFields ¶
func (m *AuthRolesMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AuthRolesMutation) Client ¶
func (m AuthRolesMutation) 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 (*AuthRolesMutation) EdgeCleared ¶
func (m *AuthRolesMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AuthRolesMutation) Field ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) FieldCleared ¶
func (m *AuthRolesMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AuthRolesMutation) Fields ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) ID ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) IDs ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) 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 (*AuthRolesMutation) OldRole ¶
OldRole returns the old "role" field's value of the AuthRoles entity. If the AuthRoles 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 (*AuthRolesMutation) RemovedEdges ¶
func (m *AuthRolesMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AuthRolesMutation) RemovedIDs ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) ResetEdge ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) ResetField ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) ResetRole ¶
func (m *AuthRolesMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*AuthRolesMutation) ResetToken ¶
func (m *AuthRolesMutation) ResetToken()
ResetToken resets all changes to the "token" edge.
func (*AuthRolesMutation) Role ¶
func (m *AuthRolesMutation) Role() (r authroles.Role, exists bool)
Role returns the value of the "role" field in the mutation.
func (*AuthRolesMutation) SetField ¶
func (m *AuthRolesMutation) 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 (*AuthRolesMutation) SetOp ¶
func (m *AuthRolesMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AuthRolesMutation) SetRole ¶
func (m *AuthRolesMutation) SetRole(a authroles.Role)
SetRole sets the "role" field.
func (*AuthRolesMutation) SetTokenID ¶
func (m *AuthRolesMutation) SetTokenID(id uuid.UUID)
SetTokenID sets the "token" edge to the AuthTokens entity by id.
func (*AuthRolesMutation) TokenCleared ¶
func (m *AuthRolesMutation) TokenCleared() bool
TokenCleared reports if the "token" edge to the AuthTokens entity was cleared.
func (*AuthRolesMutation) TokenID ¶
func (m *AuthRolesMutation) TokenID() (id uuid.UUID, exists bool)
TokenID returns the "token" edge ID in the mutation.
func (*AuthRolesMutation) TokenIDs ¶
func (m *AuthRolesMutation) TokenIDs() (ids []uuid.UUID)
TokenIDs returns the "token" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TokenID instead. It exists only for internal usage by the builders.
func (AuthRolesMutation) Tx ¶
func (m AuthRolesMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AuthRolesMutation) Type ¶
func (m *AuthRolesMutation) Type() string
Type returns the node type of this mutation (AuthRoles).
func (*AuthRolesMutation) Where ¶
func (m *AuthRolesMutation) Where(ps ...predicate.AuthRoles)
Where appends a list predicates to the AuthRolesMutation builder.
func (*AuthRolesMutation) WhereP ¶
func (m *AuthRolesMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AuthRolesMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AuthRolesQuery ¶
type AuthRolesQuery struct {
// contains filtered or unexported fields
}
AuthRolesQuery is the builder for querying AuthRoles entities.
func (*AuthRolesQuery) Aggregate ¶
func (arq *AuthRolesQuery) Aggregate(fns ...AggregateFunc) *AuthRolesSelect
Aggregate returns a AuthRolesSelect configured with the given aggregations.
func (*AuthRolesQuery) All ¶
func (arq *AuthRolesQuery) All(ctx context.Context) ([]*AuthRoles, error)
All executes the query and returns a list of AuthRolesSlice.
func (*AuthRolesQuery) AllX ¶
func (arq *AuthRolesQuery) AllX(ctx context.Context) []*AuthRoles
AllX is like All, but panics if an error occurs.
func (*AuthRolesQuery) Clone ¶
func (arq *AuthRolesQuery) Clone() *AuthRolesQuery
Clone returns a duplicate of the AuthRolesQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AuthRolesQuery) Count ¶
func (arq *AuthRolesQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AuthRolesQuery) CountX ¶
func (arq *AuthRolesQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AuthRolesQuery) Exist ¶
func (arq *AuthRolesQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AuthRolesQuery) ExistX ¶
func (arq *AuthRolesQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AuthRolesQuery) First ¶
func (arq *AuthRolesQuery) First(ctx context.Context) (*AuthRoles, error)
First returns the first AuthRoles entity from the query. Returns a *NotFoundError when no AuthRoles was found.
func (*AuthRolesQuery) FirstID ¶
func (arq *AuthRolesQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first AuthRoles ID from the query. Returns a *NotFoundError when no AuthRoles ID was found.
func (*AuthRolesQuery) FirstIDX ¶
func (arq *AuthRolesQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AuthRolesQuery) FirstX ¶
func (arq *AuthRolesQuery) FirstX(ctx context.Context) *AuthRoles
FirstX is like First, but panics if an error occurs.
func (*AuthRolesQuery) GroupBy ¶
func (arq *AuthRolesQuery) GroupBy(field string, fields ...string) *AuthRolesGroupBy
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 { Role authroles.Role `json:"role,omitempty"` Count int `json:"count,omitempty"` } client.AuthRoles.Query(). GroupBy(authroles.FieldRole). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AuthRolesQuery) IDs ¶
func (arq *AuthRolesQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of AuthRoles IDs.
func (*AuthRolesQuery) IDsX ¶
func (arq *AuthRolesQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AuthRolesQuery) Limit ¶
func (arq *AuthRolesQuery) Limit(limit int) *AuthRolesQuery
Limit the number of records to be returned by this query.
func (*AuthRolesQuery) Offset ¶
func (arq *AuthRolesQuery) Offset(offset int) *AuthRolesQuery
Offset to start from.
func (*AuthRolesQuery) Only ¶
func (arq *AuthRolesQuery) Only(ctx context.Context) (*AuthRoles, error)
Only returns a single AuthRoles entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AuthRoles entity is found. Returns a *NotFoundError when no AuthRoles entities are found.
func (*AuthRolesQuery) OnlyID ¶
func (arq *AuthRolesQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only AuthRoles ID in the query. Returns a *NotSingularError when more than one AuthRoles ID is found. Returns a *NotFoundError when no entities are found.
func (*AuthRolesQuery) OnlyIDX ¶
func (arq *AuthRolesQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AuthRolesQuery) OnlyX ¶
func (arq *AuthRolesQuery) OnlyX(ctx context.Context) *AuthRoles
OnlyX is like Only, but panics if an error occurs.
func (*AuthRolesQuery) Order ¶
func (arq *AuthRolesQuery) Order(o ...authroles.OrderOption) *AuthRolesQuery
Order specifies how the records should be ordered.
func (*AuthRolesQuery) QueryToken ¶
func (arq *AuthRolesQuery) QueryToken() *AuthTokensQuery
QueryToken chains the current query on the "token" edge.
func (*AuthRolesQuery) Select ¶
func (arq *AuthRolesQuery) Select(fields ...string) *AuthRolesSelect
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 { Role authroles.Role `json:"role,omitempty"` } client.AuthRoles.Query(). Select(authroles.FieldRole). Scan(ctx, &v)
func (*AuthRolesQuery) Unique ¶
func (arq *AuthRolesQuery) Unique(unique bool) *AuthRolesQuery
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 (*AuthRolesQuery) Where ¶
func (arq *AuthRolesQuery) Where(ps ...predicate.AuthRoles) *AuthRolesQuery
Where adds a new predicate for the AuthRolesQuery builder.
func (*AuthRolesQuery) WithToken ¶
func (arq *AuthRolesQuery) WithToken(opts ...func(*AuthTokensQuery)) *AuthRolesQuery
WithToken tells the query-builder to eager-load the nodes that are connected to the "token" edge. The optional arguments are used to configure the query builder of the edge.
type AuthRolesSelect ¶
type AuthRolesSelect struct { *AuthRolesQuery // contains filtered or unexported fields }
AuthRolesSelect is the builder for selecting fields of AuthRoles entities.
func (*AuthRolesSelect) Aggregate ¶
func (ars *AuthRolesSelect) Aggregate(fns ...AggregateFunc) *AuthRolesSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AuthRolesSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuthRolesSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuthRolesSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuthRolesSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuthRolesSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuthRolesSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuthRolesSelect) Scan ¶
func (ars *AuthRolesSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AuthRolesSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuthRolesSlice ¶
type AuthRolesSlice []*AuthRoles
AuthRolesSlice is a parsable slice of AuthRoles.
type AuthRolesUpdate ¶
type AuthRolesUpdate struct {
// contains filtered or unexported fields
}
AuthRolesUpdate is the builder for updating AuthRoles entities.
func (*AuthRolesUpdate) ClearToken ¶
func (aru *AuthRolesUpdate) ClearToken() *AuthRolesUpdate
ClearToken clears the "token" edge to the AuthTokens entity.
func (*AuthRolesUpdate) Exec ¶
func (aru *AuthRolesUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthRolesUpdate) ExecX ¶
func (aru *AuthRolesUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthRolesUpdate) Mutation ¶
func (aru *AuthRolesUpdate) Mutation() *AuthRolesMutation
Mutation returns the AuthRolesMutation object of the builder.
func (*AuthRolesUpdate) Save ¶
func (aru *AuthRolesUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AuthRolesUpdate) SaveX ¶
func (aru *AuthRolesUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AuthRolesUpdate) SetNillableRole ¶
func (aru *AuthRolesUpdate) SetNillableRole(a *authroles.Role) *AuthRolesUpdate
SetNillableRole sets the "role" field if the given value is not nil.
func (*AuthRolesUpdate) SetNillableTokenID ¶
func (aru *AuthRolesUpdate) SetNillableTokenID(id *uuid.UUID) *AuthRolesUpdate
SetNillableTokenID sets the "token" edge to the AuthTokens entity by ID if the given value is not nil.
func (*AuthRolesUpdate) SetRole ¶
func (aru *AuthRolesUpdate) SetRole(a authroles.Role) *AuthRolesUpdate
SetRole sets the "role" field.
func (*AuthRolesUpdate) SetToken ¶
func (aru *AuthRolesUpdate) SetToken(a *AuthTokens) *AuthRolesUpdate
SetToken sets the "token" edge to the AuthTokens entity.
func (*AuthRolesUpdate) SetTokenID ¶
func (aru *AuthRolesUpdate) SetTokenID(id uuid.UUID) *AuthRolesUpdate
SetTokenID sets the "token" edge to the AuthTokens entity by ID.
func (*AuthRolesUpdate) Where ¶
func (aru *AuthRolesUpdate) Where(ps ...predicate.AuthRoles) *AuthRolesUpdate
Where appends a list predicates to the AuthRolesUpdate builder.
type AuthRolesUpdateOne ¶
type AuthRolesUpdateOne struct {
// contains filtered or unexported fields
}
AuthRolesUpdateOne is the builder for updating a single AuthRoles entity.
func (*AuthRolesUpdateOne) ClearToken ¶
func (aruo *AuthRolesUpdateOne) ClearToken() *AuthRolesUpdateOne
ClearToken clears the "token" edge to the AuthTokens entity.
func (*AuthRolesUpdateOne) Exec ¶
func (aruo *AuthRolesUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AuthRolesUpdateOne) ExecX ¶
func (aruo *AuthRolesUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthRolesUpdateOne) Mutation ¶
func (aruo *AuthRolesUpdateOne) Mutation() *AuthRolesMutation
Mutation returns the AuthRolesMutation object of the builder.
func (*AuthRolesUpdateOne) Save ¶
func (aruo *AuthRolesUpdateOne) Save(ctx context.Context) (*AuthRoles, error)
Save executes the query and returns the updated AuthRoles entity.
func (*AuthRolesUpdateOne) SaveX ¶
func (aruo *AuthRolesUpdateOne) SaveX(ctx context.Context) *AuthRoles
SaveX is like Save, but panics if an error occurs.
func (*AuthRolesUpdateOne) Select ¶
func (aruo *AuthRolesUpdateOne) Select(field string, fields ...string) *AuthRolesUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AuthRolesUpdateOne) SetNillableRole ¶
func (aruo *AuthRolesUpdateOne) SetNillableRole(a *authroles.Role) *AuthRolesUpdateOne
SetNillableRole sets the "role" field if the given value is not nil.
func (*AuthRolesUpdateOne) SetNillableTokenID ¶
func (aruo *AuthRolesUpdateOne) SetNillableTokenID(id *uuid.UUID) *AuthRolesUpdateOne
SetNillableTokenID sets the "token" edge to the AuthTokens entity by ID if the given value is not nil.
func (*AuthRolesUpdateOne) SetRole ¶
func (aruo *AuthRolesUpdateOne) SetRole(a authroles.Role) *AuthRolesUpdateOne
SetRole sets the "role" field.
func (*AuthRolesUpdateOne) SetToken ¶
func (aruo *AuthRolesUpdateOne) SetToken(a *AuthTokens) *AuthRolesUpdateOne
SetToken sets the "token" edge to the AuthTokens entity.
func (*AuthRolesUpdateOne) SetTokenID ¶
func (aruo *AuthRolesUpdateOne) SetTokenID(id uuid.UUID) *AuthRolesUpdateOne
SetTokenID sets the "token" edge to the AuthTokens entity by ID.
func (*AuthRolesUpdateOne) Where ¶
func (aruo *AuthRolesUpdateOne) Where(ps ...predicate.AuthRoles) *AuthRolesUpdateOne
Where appends a list predicates to the AuthRolesUpdate builder.
type AuthTokens ¶
type AuthTokens struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Token holds the value of the "token" field. Token []byte `json:"token,omitempty"` // ExpiresAt holds the value of the "expires_at" field. ExpiresAt time.Time `json:"expires_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AuthTokensQuery when eager-loading is set. Edges AuthTokensEdges `json:"edges"` // contains filtered or unexported fields }
AuthTokens is the model entity for the AuthTokens schema.
func (*AuthTokens) GetID ¶
func (at *AuthTokens) GetID() uuid.UUID
func (*AuthTokens) QueryRoles ¶
func (at *AuthTokens) QueryRoles() *AuthRolesQuery
QueryRoles queries the "roles" edge of the AuthTokens entity.
func (*AuthTokens) QueryUser ¶
func (at *AuthTokens) QueryUser() *UserQuery
QueryUser queries the "user" edge of the AuthTokens entity.
func (*AuthTokens) String ¶
func (at *AuthTokens) String() string
String implements the fmt.Stringer.
func (*AuthTokens) Unwrap ¶
func (at *AuthTokens) Unwrap() *AuthTokens
Unwrap unwraps the AuthTokens 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 (*AuthTokens) Update ¶
func (at *AuthTokens) Update() *AuthTokensUpdateOne
Update returns a builder for updating this AuthTokens. Note that you need to call AuthTokens.Unwrap() before calling this method if this AuthTokens was returned from a transaction, and the transaction was committed or rolled back.
type AuthTokensClient ¶
type AuthTokensClient struct {
// contains filtered or unexported fields
}
AuthTokensClient is a client for the AuthTokens schema.
func NewAuthTokensClient ¶
func NewAuthTokensClient(c config) *AuthTokensClient
NewAuthTokensClient returns a client for the AuthTokens from the given config.
func (*AuthTokensClient) Create ¶
func (c *AuthTokensClient) Create() *AuthTokensCreate
Create returns a builder for creating a AuthTokens entity.
func (*AuthTokensClient) CreateBulk ¶
func (c *AuthTokensClient) CreateBulk(builders ...*AuthTokensCreate) *AuthTokensCreateBulk
CreateBulk returns a builder for creating a bulk of AuthTokens entities.
func (*AuthTokensClient) Delete ¶
func (c *AuthTokensClient) Delete() *AuthTokensDelete
Delete returns a delete builder for AuthTokens.
func (*AuthTokensClient) DeleteOne ¶
func (c *AuthTokensClient) DeleteOne(at *AuthTokens) *AuthTokensDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AuthTokensClient) DeleteOneID ¶
func (c *AuthTokensClient) DeleteOneID(id uuid.UUID) *AuthTokensDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AuthTokensClient) Get ¶
func (c *AuthTokensClient) Get(ctx context.Context, id uuid.UUID) (*AuthTokens, error)
Get returns a AuthTokens entity by its id.
func (*AuthTokensClient) GetX ¶
func (c *AuthTokensClient) GetX(ctx context.Context, id uuid.UUID) *AuthTokens
GetX is like Get, but panics if an error occurs.
func (*AuthTokensClient) Hooks ¶
func (c *AuthTokensClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AuthTokensClient) Intercept ¶
func (c *AuthTokensClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `authtokens.Intercept(f(g(h())))`.
func (*AuthTokensClient) Interceptors ¶
func (c *AuthTokensClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AuthTokensClient) MapCreateBulk ¶
func (c *AuthTokensClient) MapCreateBulk(slice any, setFunc func(*AuthTokensCreate, int)) *AuthTokensCreateBulk
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 (*AuthTokensClient) Query ¶
func (c *AuthTokensClient) Query() *AuthTokensQuery
Query returns a query builder for AuthTokens.
func (*AuthTokensClient) QueryRoles ¶
func (c *AuthTokensClient) QueryRoles(at *AuthTokens) *AuthRolesQuery
QueryRoles queries the roles edge of a AuthTokens.
func (*AuthTokensClient) QueryUser ¶
func (c *AuthTokensClient) QueryUser(at *AuthTokens) *UserQuery
QueryUser queries the user edge of a AuthTokens.
func (*AuthTokensClient) Update ¶
func (c *AuthTokensClient) Update() *AuthTokensUpdate
Update returns an update builder for AuthTokens.
func (*AuthTokensClient) UpdateOne ¶
func (c *AuthTokensClient) UpdateOne(at *AuthTokens) *AuthTokensUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AuthTokensClient) UpdateOneID ¶
func (c *AuthTokensClient) UpdateOneID(id uuid.UUID) *AuthTokensUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AuthTokensClient) Use ¶
func (c *AuthTokensClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `authtokens.Hooks(f(g(h())))`.
type AuthTokensCreate ¶
type AuthTokensCreate struct {
// contains filtered or unexported fields
}
AuthTokensCreate is the builder for creating a AuthTokens entity.
func (*AuthTokensCreate) Exec ¶
func (atc *AuthTokensCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthTokensCreate) ExecX ¶
func (atc *AuthTokensCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthTokensCreate) Mutation ¶
func (atc *AuthTokensCreate) Mutation() *AuthTokensMutation
Mutation returns the AuthTokensMutation object of the builder.
func (*AuthTokensCreate) Save ¶
func (atc *AuthTokensCreate) Save(ctx context.Context) (*AuthTokens, error)
Save creates the AuthTokens in the database.
func (*AuthTokensCreate) SaveX ¶
func (atc *AuthTokensCreate) SaveX(ctx context.Context) *AuthTokens
SaveX calls Save and panics if Save returns an error.
func (*AuthTokensCreate) SetCreatedAt ¶
func (atc *AuthTokensCreate) SetCreatedAt(t time.Time) *AuthTokensCreate
SetCreatedAt sets the "created_at" field.
func (*AuthTokensCreate) SetExpiresAt ¶
func (atc *AuthTokensCreate) SetExpiresAt(t time.Time) *AuthTokensCreate
SetExpiresAt sets the "expires_at" field.
func (*AuthTokensCreate) SetID ¶
func (atc *AuthTokensCreate) SetID(u uuid.UUID) *AuthTokensCreate
SetID sets the "id" field.
func (*AuthTokensCreate) SetNillableCreatedAt ¶
func (atc *AuthTokensCreate) SetNillableCreatedAt(t *time.Time) *AuthTokensCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AuthTokensCreate) SetNillableExpiresAt ¶
func (atc *AuthTokensCreate) SetNillableExpiresAt(t *time.Time) *AuthTokensCreate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*AuthTokensCreate) SetNillableID ¶
func (atc *AuthTokensCreate) SetNillableID(u *uuid.UUID) *AuthTokensCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AuthTokensCreate) SetNillableRolesID ¶
func (atc *AuthTokensCreate) SetNillableRolesID(id *int) *AuthTokensCreate
SetNillableRolesID sets the "roles" edge to the AuthRoles entity by ID if the given value is not nil.
func (*AuthTokensCreate) SetNillableUpdatedAt ¶
func (atc *AuthTokensCreate) SetNillableUpdatedAt(t *time.Time) *AuthTokensCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*AuthTokensCreate) SetNillableUserID ¶
func (atc *AuthTokensCreate) SetNillableUserID(id *uuid.UUID) *AuthTokensCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*AuthTokensCreate) SetRoles ¶
func (atc *AuthTokensCreate) SetRoles(a *AuthRoles) *AuthTokensCreate
SetRoles sets the "roles" edge to the AuthRoles entity.
func (*AuthTokensCreate) SetRolesID ¶
func (atc *AuthTokensCreate) SetRolesID(id int) *AuthTokensCreate
SetRolesID sets the "roles" edge to the AuthRoles entity by ID.
func (*AuthTokensCreate) SetToken ¶
func (atc *AuthTokensCreate) SetToken(b []byte) *AuthTokensCreate
SetToken sets the "token" field.
func (*AuthTokensCreate) SetUpdatedAt ¶
func (atc *AuthTokensCreate) SetUpdatedAt(t time.Time) *AuthTokensCreate
SetUpdatedAt sets the "updated_at" field.
func (*AuthTokensCreate) SetUser ¶
func (atc *AuthTokensCreate) SetUser(u *User) *AuthTokensCreate
SetUser sets the "user" edge to the User entity.
func (*AuthTokensCreate) SetUserID ¶
func (atc *AuthTokensCreate) SetUserID(id uuid.UUID) *AuthTokensCreate
SetUserID sets the "user" edge to the User entity by ID.
type AuthTokensCreateBulk ¶
type AuthTokensCreateBulk struct {
// contains filtered or unexported fields
}
AuthTokensCreateBulk is the builder for creating many AuthTokens entities in bulk.
func (*AuthTokensCreateBulk) Exec ¶
func (atcb *AuthTokensCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthTokensCreateBulk) ExecX ¶
func (atcb *AuthTokensCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthTokensCreateBulk) Save ¶
func (atcb *AuthTokensCreateBulk) Save(ctx context.Context) ([]*AuthTokens, error)
Save creates the AuthTokens entities in the database.
func (*AuthTokensCreateBulk) SaveX ¶
func (atcb *AuthTokensCreateBulk) SaveX(ctx context.Context) []*AuthTokens
SaveX is like Save, but panics if an error occurs.
type AuthTokensDelete ¶
type AuthTokensDelete struct {
// contains filtered or unexported fields
}
AuthTokensDelete is the builder for deleting a AuthTokens entity.
func (*AuthTokensDelete) Exec ¶
func (atd *AuthTokensDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AuthTokensDelete) ExecX ¶
func (atd *AuthTokensDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AuthTokensDelete) Where ¶
func (atd *AuthTokensDelete) Where(ps ...predicate.AuthTokens) *AuthTokensDelete
Where appends a list predicates to the AuthTokensDelete builder.
type AuthTokensDeleteOne ¶
type AuthTokensDeleteOne struct {
// contains filtered or unexported fields
}
AuthTokensDeleteOne is the builder for deleting a single AuthTokens entity.
func (*AuthTokensDeleteOne) Exec ¶
func (atdo *AuthTokensDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AuthTokensDeleteOne) ExecX ¶
func (atdo *AuthTokensDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthTokensDeleteOne) Where ¶
func (atdo *AuthTokensDeleteOne) Where(ps ...predicate.AuthTokens) *AuthTokensDeleteOne
Where appends a list predicates to the AuthTokensDelete builder.
type AuthTokensEdges ¶
type AuthTokensEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Roles holds the value of the roles edge. Roles *AuthRoles `json:"roles,omitempty"` // contains filtered or unexported fields }
AuthTokensEdges holds the relations/edges for other nodes in the graph.
func (AuthTokensEdges) RolesOrErr ¶
func (e AuthTokensEdges) RolesOrErr() (*AuthRoles, error)
RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (AuthTokensEdges) UserOrErr ¶
func (e AuthTokensEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AuthTokensGroupBy ¶
type AuthTokensGroupBy struct {
// contains filtered or unexported fields
}
AuthTokensGroupBy is the group-by builder for AuthTokens entities.
func (*AuthTokensGroupBy) Aggregate ¶
func (atgb *AuthTokensGroupBy) Aggregate(fns ...AggregateFunc) *AuthTokensGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AuthTokensGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuthTokensGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuthTokensGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuthTokensGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuthTokensGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuthTokensGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuthTokensGroupBy) Scan ¶
func (atgb *AuthTokensGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AuthTokensGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuthTokensMutation ¶
type AuthTokensMutation struct {
// contains filtered or unexported fields
}
AuthTokensMutation represents an operation that mutates the AuthTokens nodes in the graph.
func (*AuthTokensMutation) AddField ¶
func (m *AuthTokensMutation) 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 (*AuthTokensMutation) AddedEdges ¶
func (m *AuthTokensMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AuthTokensMutation) AddedField ¶
func (m *AuthTokensMutation) 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 (*AuthTokensMutation) AddedFields ¶
func (m *AuthTokensMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AuthTokensMutation) AddedIDs ¶
func (m *AuthTokensMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AuthTokensMutation) ClearEdge ¶
func (m *AuthTokensMutation) 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 (*AuthTokensMutation) ClearField ¶
func (m *AuthTokensMutation) 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 (*AuthTokensMutation) ClearRoles ¶
func (m *AuthTokensMutation) ClearRoles()
ClearRoles clears the "roles" edge to the AuthRoles entity.
func (*AuthTokensMutation) ClearUser ¶
func (m *AuthTokensMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*AuthTokensMutation) ClearedEdges ¶
func (m *AuthTokensMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AuthTokensMutation) ClearedFields ¶
func (m *AuthTokensMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AuthTokensMutation) Client ¶
func (m AuthTokensMutation) 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 (*AuthTokensMutation) CreatedAt ¶
func (m *AuthTokensMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AuthTokensMutation) EdgeCleared ¶
func (m *AuthTokensMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AuthTokensMutation) ExpiresAt ¶
func (m *AuthTokensMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the value of the "expires_at" field in the mutation.
func (*AuthTokensMutation) Field ¶
func (m *AuthTokensMutation) 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 (*AuthTokensMutation) FieldCleared ¶
func (m *AuthTokensMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AuthTokensMutation) Fields ¶
func (m *AuthTokensMutation) 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 (*AuthTokensMutation) ID ¶
func (m *AuthTokensMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AuthTokensMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AuthTokensMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the AuthTokens entity. If the AuthTokens 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 (*AuthTokensMutation) OldExpiresAt ¶
OldExpiresAt returns the old "expires_at" field's value of the AuthTokens entity. If the AuthTokens 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 (*AuthTokensMutation) 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 (*AuthTokensMutation) OldToken ¶
func (m *AuthTokensMutation) OldToken(ctx context.Context) (v []byte, err error)
OldToken returns the old "token" field's value of the AuthTokens entity. If the AuthTokens 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 (*AuthTokensMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the AuthTokens entity. If the AuthTokens 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 (*AuthTokensMutation) RemovedEdges ¶
func (m *AuthTokensMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AuthTokensMutation) RemovedIDs ¶
func (m *AuthTokensMutation) 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 (*AuthTokensMutation) ResetCreatedAt ¶
func (m *AuthTokensMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AuthTokensMutation) ResetEdge ¶
func (m *AuthTokensMutation) 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 (*AuthTokensMutation) ResetExpiresAt ¶
func (m *AuthTokensMutation) ResetExpiresAt()
ResetExpiresAt resets all changes to the "expires_at" field.
func (*AuthTokensMutation) ResetField ¶
func (m *AuthTokensMutation) 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 (*AuthTokensMutation) ResetRoles ¶
func (m *AuthTokensMutation) ResetRoles()
ResetRoles resets all changes to the "roles" edge.
func (*AuthTokensMutation) ResetToken ¶
func (m *AuthTokensMutation) ResetToken()
ResetToken resets all changes to the "token" field.
func (*AuthTokensMutation) ResetUpdatedAt ¶
func (m *AuthTokensMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AuthTokensMutation) ResetUser ¶
func (m *AuthTokensMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*AuthTokensMutation) RolesCleared ¶
func (m *AuthTokensMutation) RolesCleared() bool
RolesCleared reports if the "roles" edge to the AuthRoles entity was cleared.
func (*AuthTokensMutation) RolesID ¶
func (m *AuthTokensMutation) RolesID() (id int, exists bool)
RolesID returns the "roles" edge ID in the mutation.
func (*AuthTokensMutation) RolesIDs ¶
func (m *AuthTokensMutation) RolesIDs() (ids []int)
RolesIDs returns the "roles" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RolesID instead. It exists only for internal usage by the builders.
func (*AuthTokensMutation) SetCreatedAt ¶
func (m *AuthTokensMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AuthTokensMutation) SetExpiresAt ¶
func (m *AuthTokensMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the "expires_at" field.
func (*AuthTokensMutation) SetField ¶
func (m *AuthTokensMutation) 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 (*AuthTokensMutation) SetID ¶
func (m *AuthTokensMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of AuthTokens entities.
func (*AuthTokensMutation) SetOp ¶
func (m *AuthTokensMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AuthTokensMutation) SetRolesID ¶
func (m *AuthTokensMutation) SetRolesID(id int)
SetRolesID sets the "roles" edge to the AuthRoles entity by id.
func (*AuthTokensMutation) SetToken ¶
func (m *AuthTokensMutation) SetToken(b []byte)
SetToken sets the "token" field.
func (*AuthTokensMutation) SetUpdatedAt ¶
func (m *AuthTokensMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*AuthTokensMutation) SetUserID ¶
func (m *AuthTokensMutation) SetUserID(id uuid.UUID)
SetUserID sets the "user" edge to the User entity by id.
func (*AuthTokensMutation) Token ¶
func (m *AuthTokensMutation) Token() (r []byte, exists bool)
Token returns the value of the "token" field in the mutation.
func (AuthTokensMutation) Tx ¶
func (m AuthTokensMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AuthTokensMutation) Type ¶
func (m *AuthTokensMutation) Type() string
Type returns the node type of this mutation (AuthTokens).
func (*AuthTokensMutation) UpdatedAt ¶
func (m *AuthTokensMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AuthTokensMutation) UserCleared ¶
func (m *AuthTokensMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*AuthTokensMutation) UserID ¶
func (m *AuthTokensMutation) UserID() (id uuid.UUID, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*AuthTokensMutation) UserIDs ¶
func (m *AuthTokensMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*AuthTokensMutation) Where ¶
func (m *AuthTokensMutation) Where(ps ...predicate.AuthTokens)
Where appends a list predicates to the AuthTokensMutation builder.
func (*AuthTokensMutation) WhereP ¶
func (m *AuthTokensMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AuthTokensMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AuthTokensQuery ¶
type AuthTokensQuery struct {
// contains filtered or unexported fields
}
AuthTokensQuery is the builder for querying AuthTokens entities.
func (*AuthTokensQuery) Aggregate ¶
func (atq *AuthTokensQuery) Aggregate(fns ...AggregateFunc) *AuthTokensSelect
Aggregate returns a AuthTokensSelect configured with the given aggregations.
func (*AuthTokensQuery) All ¶
func (atq *AuthTokensQuery) All(ctx context.Context) ([]*AuthTokens, error)
All executes the query and returns a list of AuthTokensSlice.
func (*AuthTokensQuery) AllX ¶
func (atq *AuthTokensQuery) AllX(ctx context.Context) []*AuthTokens
AllX is like All, but panics if an error occurs.
func (*AuthTokensQuery) Clone ¶
func (atq *AuthTokensQuery) Clone() *AuthTokensQuery
Clone returns a duplicate of the AuthTokensQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AuthTokensQuery) Count ¶
func (atq *AuthTokensQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AuthTokensQuery) CountX ¶
func (atq *AuthTokensQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AuthTokensQuery) Exist ¶
func (atq *AuthTokensQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AuthTokensQuery) ExistX ¶
func (atq *AuthTokensQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AuthTokensQuery) First ¶
func (atq *AuthTokensQuery) First(ctx context.Context) (*AuthTokens, error)
First returns the first AuthTokens entity from the query. Returns a *NotFoundError when no AuthTokens was found.
func (*AuthTokensQuery) FirstID ¶
FirstID returns the first AuthTokens ID from the query. Returns a *NotFoundError when no AuthTokens ID was found.
func (*AuthTokensQuery) FirstIDX ¶
func (atq *AuthTokensQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AuthTokensQuery) FirstX ¶
func (atq *AuthTokensQuery) FirstX(ctx context.Context) *AuthTokens
FirstX is like First, but panics if an error occurs.
func (*AuthTokensQuery) GroupBy ¶
func (atq *AuthTokensQuery) GroupBy(field string, fields ...string) *AuthTokensGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.AuthTokens.Query(). GroupBy(authtokens.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AuthTokensQuery) IDsX ¶
func (atq *AuthTokensQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AuthTokensQuery) Limit ¶
func (atq *AuthTokensQuery) Limit(limit int) *AuthTokensQuery
Limit the number of records to be returned by this query.
func (*AuthTokensQuery) Offset ¶
func (atq *AuthTokensQuery) Offset(offset int) *AuthTokensQuery
Offset to start from.
func (*AuthTokensQuery) Only ¶
func (atq *AuthTokensQuery) Only(ctx context.Context) (*AuthTokens, error)
Only returns a single AuthTokens entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AuthTokens entity is found. Returns a *NotFoundError when no AuthTokens entities are found.
func (*AuthTokensQuery) OnlyID ¶
OnlyID is like Only, but returns the only AuthTokens ID in the query. Returns a *NotSingularError when more than one AuthTokens ID is found. Returns a *NotFoundError when no entities are found.
func (*AuthTokensQuery) OnlyIDX ¶
func (atq *AuthTokensQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AuthTokensQuery) OnlyX ¶
func (atq *AuthTokensQuery) OnlyX(ctx context.Context) *AuthTokens
OnlyX is like Only, but panics if an error occurs.
func (*AuthTokensQuery) Order ¶
func (atq *AuthTokensQuery) Order(o ...authtokens.OrderOption) *AuthTokensQuery
Order specifies how the records should be ordered.
func (*AuthTokensQuery) QueryRoles ¶
func (atq *AuthTokensQuery) QueryRoles() *AuthRolesQuery
QueryRoles chains the current query on the "roles" edge.
func (*AuthTokensQuery) QueryUser ¶
func (atq *AuthTokensQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*AuthTokensQuery) Select ¶
func (atq *AuthTokensQuery) Select(fields ...string) *AuthTokensSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.AuthTokens.Query(). Select(authtokens.FieldCreatedAt). Scan(ctx, &v)
func (*AuthTokensQuery) Unique ¶
func (atq *AuthTokensQuery) Unique(unique bool) *AuthTokensQuery
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 (*AuthTokensQuery) Where ¶
func (atq *AuthTokensQuery) Where(ps ...predicate.AuthTokens) *AuthTokensQuery
Where adds a new predicate for the AuthTokensQuery builder.
func (*AuthTokensQuery) WithRoles ¶
func (atq *AuthTokensQuery) WithRoles(opts ...func(*AuthRolesQuery)) *AuthTokensQuery
WithRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge. The optional arguments are used to configure the query builder of the edge.
func (*AuthTokensQuery) WithUser ¶
func (atq *AuthTokensQuery) WithUser(opts ...func(*UserQuery)) *AuthTokensQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type AuthTokensSelect ¶
type AuthTokensSelect struct { *AuthTokensQuery // contains filtered or unexported fields }
AuthTokensSelect is the builder for selecting fields of AuthTokens entities.
func (*AuthTokensSelect) Aggregate ¶
func (ats *AuthTokensSelect) Aggregate(fns ...AggregateFunc) *AuthTokensSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AuthTokensSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuthTokensSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuthTokensSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuthTokensSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuthTokensSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuthTokensSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuthTokensSelect) Scan ¶
func (ats *AuthTokensSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AuthTokensSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuthTokensSlice ¶
type AuthTokensSlice []*AuthTokens
AuthTokensSlice is a parsable slice of AuthTokens.
type AuthTokensUpdate ¶
type AuthTokensUpdate struct {
// contains filtered or unexported fields
}
AuthTokensUpdate is the builder for updating AuthTokens entities.
func (*AuthTokensUpdate) ClearRoles ¶
func (atu *AuthTokensUpdate) ClearRoles() *AuthTokensUpdate
ClearRoles clears the "roles" edge to the AuthRoles entity.
func (*AuthTokensUpdate) ClearUser ¶
func (atu *AuthTokensUpdate) ClearUser() *AuthTokensUpdate
ClearUser clears the "user" edge to the User entity.
func (*AuthTokensUpdate) Exec ¶
func (atu *AuthTokensUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthTokensUpdate) ExecX ¶
func (atu *AuthTokensUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthTokensUpdate) Mutation ¶
func (atu *AuthTokensUpdate) Mutation() *AuthTokensMutation
Mutation returns the AuthTokensMutation object of the builder.
func (*AuthTokensUpdate) Save ¶
func (atu *AuthTokensUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AuthTokensUpdate) SaveX ¶
func (atu *AuthTokensUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AuthTokensUpdate) SetExpiresAt ¶
func (atu *AuthTokensUpdate) SetExpiresAt(t time.Time) *AuthTokensUpdate
SetExpiresAt sets the "expires_at" field.
func (*AuthTokensUpdate) SetNillableExpiresAt ¶
func (atu *AuthTokensUpdate) SetNillableExpiresAt(t *time.Time) *AuthTokensUpdate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*AuthTokensUpdate) SetNillableRolesID ¶
func (atu *AuthTokensUpdate) SetNillableRolesID(id *int) *AuthTokensUpdate
SetNillableRolesID sets the "roles" edge to the AuthRoles entity by ID if the given value is not nil.
func (*AuthTokensUpdate) SetNillableUserID ¶
func (atu *AuthTokensUpdate) SetNillableUserID(id *uuid.UUID) *AuthTokensUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*AuthTokensUpdate) SetRoles ¶
func (atu *AuthTokensUpdate) SetRoles(a *AuthRoles) *AuthTokensUpdate
SetRoles sets the "roles" edge to the AuthRoles entity.
func (*AuthTokensUpdate) SetRolesID ¶
func (atu *AuthTokensUpdate) SetRolesID(id int) *AuthTokensUpdate
SetRolesID sets the "roles" edge to the AuthRoles entity by ID.
func (*AuthTokensUpdate) SetToken ¶
func (atu *AuthTokensUpdate) SetToken(b []byte) *AuthTokensUpdate
SetToken sets the "token" field.
func (*AuthTokensUpdate) SetUpdatedAt ¶
func (atu *AuthTokensUpdate) SetUpdatedAt(t time.Time) *AuthTokensUpdate
SetUpdatedAt sets the "updated_at" field.
func (*AuthTokensUpdate) SetUser ¶
func (atu *AuthTokensUpdate) SetUser(u *User) *AuthTokensUpdate
SetUser sets the "user" edge to the User entity.
func (*AuthTokensUpdate) SetUserID ¶
func (atu *AuthTokensUpdate) SetUserID(id uuid.UUID) *AuthTokensUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*AuthTokensUpdate) Where ¶
func (atu *AuthTokensUpdate) Where(ps ...predicate.AuthTokens) *AuthTokensUpdate
Where appends a list predicates to the AuthTokensUpdate builder.
type AuthTokensUpdateOne ¶
type AuthTokensUpdateOne struct {
// contains filtered or unexported fields
}
AuthTokensUpdateOne is the builder for updating a single AuthTokens entity.
func (*AuthTokensUpdateOne) ClearRoles ¶
func (atuo *AuthTokensUpdateOne) ClearRoles() *AuthTokensUpdateOne
ClearRoles clears the "roles" edge to the AuthRoles entity.
func (*AuthTokensUpdateOne) ClearUser ¶
func (atuo *AuthTokensUpdateOne) ClearUser() *AuthTokensUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*AuthTokensUpdateOne) Exec ¶
func (atuo *AuthTokensUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AuthTokensUpdateOne) ExecX ¶
func (atuo *AuthTokensUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthTokensUpdateOne) Mutation ¶
func (atuo *AuthTokensUpdateOne) Mutation() *AuthTokensMutation
Mutation returns the AuthTokensMutation object of the builder.
func (*AuthTokensUpdateOne) Save ¶
func (atuo *AuthTokensUpdateOne) Save(ctx context.Context) (*AuthTokens, error)
Save executes the query and returns the updated AuthTokens entity.
func (*AuthTokensUpdateOne) SaveX ¶
func (atuo *AuthTokensUpdateOne) SaveX(ctx context.Context) *AuthTokens
SaveX is like Save, but panics if an error occurs.
func (*AuthTokensUpdateOne) Select ¶
func (atuo *AuthTokensUpdateOne) Select(field string, fields ...string) *AuthTokensUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AuthTokensUpdateOne) SetExpiresAt ¶
func (atuo *AuthTokensUpdateOne) SetExpiresAt(t time.Time) *AuthTokensUpdateOne
SetExpiresAt sets the "expires_at" field.
func (*AuthTokensUpdateOne) SetNillableExpiresAt ¶
func (atuo *AuthTokensUpdateOne) SetNillableExpiresAt(t *time.Time) *AuthTokensUpdateOne
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*AuthTokensUpdateOne) SetNillableRolesID ¶
func (atuo *AuthTokensUpdateOne) SetNillableRolesID(id *int) *AuthTokensUpdateOne
SetNillableRolesID sets the "roles" edge to the AuthRoles entity by ID if the given value is not nil.
func (*AuthTokensUpdateOne) SetNillableUserID ¶
func (atuo *AuthTokensUpdateOne) SetNillableUserID(id *uuid.UUID) *AuthTokensUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*AuthTokensUpdateOne) SetRoles ¶
func (atuo *AuthTokensUpdateOne) SetRoles(a *AuthRoles) *AuthTokensUpdateOne
SetRoles sets the "roles" edge to the AuthRoles entity.
func (*AuthTokensUpdateOne) SetRolesID ¶
func (atuo *AuthTokensUpdateOne) SetRolesID(id int) *AuthTokensUpdateOne
SetRolesID sets the "roles" edge to the AuthRoles entity by ID.
func (*AuthTokensUpdateOne) SetToken ¶
func (atuo *AuthTokensUpdateOne) SetToken(b []byte) *AuthTokensUpdateOne
SetToken sets the "token" field.
func (*AuthTokensUpdateOne) SetUpdatedAt ¶
func (atuo *AuthTokensUpdateOne) SetUpdatedAt(t time.Time) *AuthTokensUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*AuthTokensUpdateOne) SetUser ¶
func (atuo *AuthTokensUpdateOne) SetUser(u *User) *AuthTokensUpdateOne
SetUser sets the "user" edge to the User entity.
func (*AuthTokensUpdateOne) SetUserID ¶
func (atuo *AuthTokensUpdateOne) SetUserID(id uuid.UUID) *AuthTokensUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*AuthTokensUpdateOne) Where ¶
func (atuo *AuthTokensUpdateOne) Where(ps ...predicate.AuthTokens) *AuthTokensUpdateOne
Where appends a list predicates to the AuthTokensUpdate builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Attachment is the client for interacting with the Attachment builders. Attachment *AttachmentClient // AuthRoles is the client for interacting with the AuthRoles builders. AuthRoles *AuthRolesClient // AuthTokens is the client for interacting with the AuthTokens builders. AuthTokens *AuthTokensClient // Document is the client for interacting with the Document builders. Document *DocumentClient // Group is the client for interacting with the Group builders. Group *GroupClient // GroupInvitationToken is the client for interacting with the GroupInvitationToken builders. GroupInvitationToken *GroupInvitationTokenClient // Item is the client for interacting with the Item builders. Item *ItemClient // ItemField is the client for interacting with the ItemField builders. ItemField *ItemFieldClient // Label is the client for interacting with the Label builders. Label *LabelClient // Location is the client for interacting with the Location builders. Location *LocationClient // MaintenanceEntry is the client for interacting with the MaintenanceEntry builders. MaintenanceEntry *MaintenanceEntryClient // Notifier is the client for interacting with the Notifier builders. Notifier *NotifierClient // 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(). Attachment. 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(...)`.
func (*Client) Sql ¶
Sql exposes the underlying database connection in the ent client so that we can use it to perform custom queries.
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 Document ¶
type Document struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Path holds the value of the "path" field. Path string `json:"path,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DocumentQuery when eager-loading is set. Edges DocumentEdges `json:"edges"` // contains filtered or unexported fields }
Document is the model entity for the Document schema.
func (*Document) QueryAttachments ¶
func (d *Document) QueryAttachments() *AttachmentQuery
QueryAttachments queries the "attachments" edge of the Document entity.
func (*Document) QueryGroup ¶
func (d *Document) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the Document entity.
func (*Document) Unwrap ¶
Unwrap unwraps the Document 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 (*Document) Update ¶
func (d *Document) Update() *DocumentUpdateOne
Update returns a builder for updating this Document. Note that you need to call Document.Unwrap() before calling this method if this Document was returned from a transaction, and the transaction was committed or rolled back.
type DocumentClient ¶
type DocumentClient struct {
// contains filtered or unexported fields
}
DocumentClient is a client for the Document schema.
func NewDocumentClient ¶
func NewDocumentClient(c config) *DocumentClient
NewDocumentClient returns a client for the Document from the given config.
func (*DocumentClient) Create ¶
func (c *DocumentClient) Create() *DocumentCreate
Create returns a builder for creating a Document entity.
func (*DocumentClient) CreateBulk ¶
func (c *DocumentClient) CreateBulk(builders ...*DocumentCreate) *DocumentCreateBulk
CreateBulk returns a builder for creating a bulk of Document entities.
func (*DocumentClient) Delete ¶
func (c *DocumentClient) Delete() *DocumentDelete
Delete returns a delete builder for Document.
func (*DocumentClient) DeleteOne ¶
func (c *DocumentClient) DeleteOne(d *Document) *DocumentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DocumentClient) DeleteOneID ¶
func (c *DocumentClient) DeleteOneID(id uuid.UUID) *DocumentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DocumentClient) Hooks ¶
func (c *DocumentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DocumentClient) Intercept ¶
func (c *DocumentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `document.Intercept(f(g(h())))`.
func (*DocumentClient) Interceptors ¶
func (c *DocumentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DocumentClient) MapCreateBulk ¶
func (c *DocumentClient) MapCreateBulk(slice any, setFunc func(*DocumentCreate, int)) *DocumentCreateBulk
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 (*DocumentClient) Query ¶
func (c *DocumentClient) Query() *DocumentQuery
Query returns a query builder for Document.
func (*DocumentClient) QueryAttachments ¶
func (c *DocumentClient) QueryAttachments(d *Document) *AttachmentQuery
QueryAttachments queries the attachments edge of a Document.
func (*DocumentClient) QueryGroup ¶
func (c *DocumentClient) QueryGroup(d *Document) *GroupQuery
QueryGroup queries the group edge of a Document.
func (*DocumentClient) Update ¶
func (c *DocumentClient) Update() *DocumentUpdate
Update returns an update builder for Document.
func (*DocumentClient) UpdateOne ¶
func (c *DocumentClient) UpdateOne(d *Document) *DocumentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DocumentClient) UpdateOneID ¶
func (c *DocumentClient) UpdateOneID(id uuid.UUID) *DocumentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DocumentClient) Use ¶
func (c *DocumentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `document.Hooks(f(g(h())))`.
type DocumentCreate ¶
type DocumentCreate struct {
// contains filtered or unexported fields
}
DocumentCreate is the builder for creating a Document entity.
func (*DocumentCreate) AddAttachmentIDs ¶
func (dc *DocumentCreate) AddAttachmentIDs(ids ...uuid.UUID) *DocumentCreate
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.
func (*DocumentCreate) AddAttachments ¶
func (dc *DocumentCreate) AddAttachments(a ...*Attachment) *DocumentCreate
AddAttachments adds the "attachments" edges to the Attachment entity.
func (*DocumentCreate) Exec ¶
func (dc *DocumentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentCreate) ExecX ¶
func (dc *DocumentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentCreate) Mutation ¶
func (dc *DocumentCreate) Mutation() *DocumentMutation
Mutation returns the DocumentMutation object of the builder.
func (*DocumentCreate) Save ¶
func (dc *DocumentCreate) Save(ctx context.Context) (*Document, error)
Save creates the Document in the database.
func (*DocumentCreate) SaveX ¶
func (dc *DocumentCreate) SaveX(ctx context.Context) *Document
SaveX calls Save and panics if Save returns an error.
func (*DocumentCreate) SetCreatedAt ¶
func (dc *DocumentCreate) SetCreatedAt(t time.Time) *DocumentCreate
SetCreatedAt sets the "created_at" field.
func (*DocumentCreate) SetGroup ¶
func (dc *DocumentCreate) SetGroup(g *Group) *DocumentCreate
SetGroup sets the "group" edge to the Group entity.
func (*DocumentCreate) SetGroupID ¶
func (dc *DocumentCreate) SetGroupID(id uuid.UUID) *DocumentCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*DocumentCreate) SetID ¶
func (dc *DocumentCreate) SetID(u uuid.UUID) *DocumentCreate
SetID sets the "id" field.
func (*DocumentCreate) SetNillableCreatedAt ¶
func (dc *DocumentCreate) SetNillableCreatedAt(t *time.Time) *DocumentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DocumentCreate) SetNillableID ¶
func (dc *DocumentCreate) SetNillableID(u *uuid.UUID) *DocumentCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*DocumentCreate) SetNillableUpdatedAt ¶
func (dc *DocumentCreate) SetNillableUpdatedAt(t *time.Time) *DocumentCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DocumentCreate) SetPath ¶
func (dc *DocumentCreate) SetPath(s string) *DocumentCreate
SetPath sets the "path" field.
func (*DocumentCreate) SetTitle ¶
func (dc *DocumentCreate) SetTitle(s string) *DocumentCreate
SetTitle sets the "title" field.
func (*DocumentCreate) SetUpdatedAt ¶
func (dc *DocumentCreate) SetUpdatedAt(t time.Time) *DocumentCreate
SetUpdatedAt sets the "updated_at" field.
type DocumentCreateBulk ¶
type DocumentCreateBulk struct {
// contains filtered or unexported fields
}
DocumentCreateBulk is the builder for creating many Document entities in bulk.
func (*DocumentCreateBulk) Exec ¶
func (dcb *DocumentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentCreateBulk) ExecX ¶
func (dcb *DocumentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DocumentDelete ¶
type DocumentDelete struct {
// contains filtered or unexported fields
}
DocumentDelete is the builder for deleting a Document entity.
func (*DocumentDelete) Exec ¶
func (dd *DocumentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DocumentDelete) ExecX ¶
func (dd *DocumentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DocumentDelete) Where ¶
func (dd *DocumentDelete) Where(ps ...predicate.Document) *DocumentDelete
Where appends a list predicates to the DocumentDelete builder.
type DocumentDeleteOne ¶
type DocumentDeleteOne struct {
// contains filtered or unexported fields
}
DocumentDeleteOne is the builder for deleting a single Document entity.
func (*DocumentDeleteOne) Exec ¶
func (ddo *DocumentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DocumentDeleteOne) ExecX ¶
func (ddo *DocumentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentDeleteOne) Where ¶
func (ddo *DocumentDeleteOne) Where(ps ...predicate.Document) *DocumentDeleteOne
Where appends a list predicates to the DocumentDelete builder.
type DocumentEdges ¶
type DocumentEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // Attachments holds the value of the attachments edge. Attachments []*Attachment `json:"attachments,omitempty"` // contains filtered or unexported fields }
DocumentEdges holds the relations/edges for other nodes in the graph.
func (DocumentEdges) AttachmentsOrErr ¶
func (e DocumentEdges) AttachmentsOrErr() ([]*Attachment, error)
AttachmentsOrErr returns the Attachments value or an error if the edge was not loaded in eager-loading.
func (DocumentEdges) GroupOrErr ¶
func (e DocumentEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DocumentGroupBy ¶
type DocumentGroupBy struct {
// contains filtered or unexported fields
}
DocumentGroupBy is the group-by builder for Document entities.
func (*DocumentGroupBy) Aggregate ¶
func (dgb *DocumentGroupBy) Aggregate(fns ...AggregateFunc) *DocumentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DocumentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DocumentGroupBy) Scan ¶
func (dgb *DocumentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DocumentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DocumentMutation ¶
type DocumentMutation struct {
// contains filtered or unexported fields
}
DocumentMutation represents an operation that mutates the Document nodes in the graph.
func (*DocumentMutation) AddAttachmentIDs ¶
func (m *DocumentMutation) AddAttachmentIDs(ids ...uuid.UUID)
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by ids.
func (*DocumentMutation) AddField ¶
func (m *DocumentMutation) 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 (*DocumentMutation) AddedEdges ¶
func (m *DocumentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DocumentMutation) AddedField ¶
func (m *DocumentMutation) 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 (*DocumentMutation) AddedFields ¶
func (m *DocumentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DocumentMutation) AddedIDs ¶
func (m *DocumentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DocumentMutation) AttachmentsCleared ¶
func (m *DocumentMutation) AttachmentsCleared() bool
AttachmentsCleared reports if the "attachments" edge to the Attachment entity was cleared.
func (*DocumentMutation) AttachmentsIDs ¶
func (m *DocumentMutation) AttachmentsIDs() (ids []uuid.UUID)
AttachmentsIDs returns the "attachments" edge IDs in the mutation.
func (*DocumentMutation) ClearAttachments ¶
func (m *DocumentMutation) ClearAttachments()
ClearAttachments clears the "attachments" edge to the Attachment entity.
func (*DocumentMutation) ClearEdge ¶
func (m *DocumentMutation) 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 (*DocumentMutation) ClearField ¶
func (m *DocumentMutation) 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 (*DocumentMutation) ClearGroup ¶
func (m *DocumentMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*DocumentMutation) ClearedEdges ¶
func (m *DocumentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DocumentMutation) ClearedFields ¶
func (m *DocumentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DocumentMutation) Client ¶
func (m DocumentMutation) 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 (*DocumentMutation) CreatedAt ¶
func (m *DocumentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DocumentMutation) EdgeCleared ¶
func (m *DocumentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DocumentMutation) Field ¶
func (m *DocumentMutation) 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 (*DocumentMutation) FieldCleared ¶
func (m *DocumentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DocumentMutation) Fields ¶
func (m *DocumentMutation) 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 (*DocumentMutation) GroupCleared ¶
func (m *DocumentMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*DocumentMutation) GroupID ¶
func (m *DocumentMutation) GroupID() (id uuid.UUID, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*DocumentMutation) GroupIDs ¶
func (m *DocumentMutation) GroupIDs() (ids []uuid.UUID)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*DocumentMutation) ID ¶
func (m *DocumentMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*DocumentMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DocumentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Document entity. If the Document 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 (*DocumentMutation) 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 (*DocumentMutation) OldPath ¶
func (m *DocumentMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the Document entity. If the Document 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 (*DocumentMutation) OldTitle ¶
func (m *DocumentMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Document entity. If the Document 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 (*DocumentMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Document entity. If the Document 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 (*DocumentMutation) Path ¶
func (m *DocumentMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*DocumentMutation) RemoveAttachmentIDs ¶
func (m *DocumentMutation) RemoveAttachmentIDs(ids ...uuid.UUID)
RemoveAttachmentIDs removes the "attachments" edge to the Attachment entity by IDs.
func (*DocumentMutation) RemovedAttachmentsIDs ¶
func (m *DocumentMutation) RemovedAttachmentsIDs() (ids []uuid.UUID)
RemovedAttachments returns the removed IDs of the "attachments" edge to the Attachment entity.
func (*DocumentMutation) RemovedEdges ¶
func (m *DocumentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DocumentMutation) RemovedIDs ¶
func (m *DocumentMutation) 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 (*DocumentMutation) ResetAttachments ¶
func (m *DocumentMutation) ResetAttachments()
ResetAttachments resets all changes to the "attachments" edge.
func (*DocumentMutation) ResetCreatedAt ¶
func (m *DocumentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DocumentMutation) ResetEdge ¶
func (m *DocumentMutation) 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 (*DocumentMutation) ResetField ¶
func (m *DocumentMutation) 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 (*DocumentMutation) ResetGroup ¶
func (m *DocumentMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*DocumentMutation) ResetPath ¶
func (m *DocumentMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*DocumentMutation) ResetTitle ¶
func (m *DocumentMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*DocumentMutation) ResetUpdatedAt ¶
func (m *DocumentMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DocumentMutation) SetCreatedAt ¶
func (m *DocumentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DocumentMutation) SetField ¶
func (m *DocumentMutation) 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 (*DocumentMutation) SetGroupID ¶
func (m *DocumentMutation) SetGroupID(id uuid.UUID)
SetGroupID sets the "group" edge to the Group entity by id.
func (*DocumentMutation) SetID ¶
func (m *DocumentMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Document entities.
func (*DocumentMutation) SetOp ¶
func (m *DocumentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DocumentMutation) SetPath ¶
func (m *DocumentMutation) SetPath(s string)
SetPath sets the "path" field.
func (*DocumentMutation) SetTitle ¶
func (m *DocumentMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*DocumentMutation) SetUpdatedAt ¶
func (m *DocumentMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DocumentMutation) Title ¶
func (m *DocumentMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (DocumentMutation) Tx ¶
func (m DocumentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DocumentMutation) Type ¶
func (m *DocumentMutation) Type() string
Type returns the node type of this mutation (Document).
func (*DocumentMutation) UpdatedAt ¶
func (m *DocumentMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DocumentMutation) Where ¶
func (m *DocumentMutation) Where(ps ...predicate.Document)
Where appends a list predicates to the DocumentMutation builder.
func (*DocumentMutation) WhereP ¶
func (m *DocumentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DocumentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DocumentQuery ¶
type DocumentQuery struct {
// contains filtered or unexported fields
}
DocumentQuery is the builder for querying Document entities.
func (*DocumentQuery) Aggregate ¶
func (dq *DocumentQuery) Aggregate(fns ...AggregateFunc) *DocumentSelect
Aggregate returns a DocumentSelect configured with the given aggregations.
func (*DocumentQuery) All ¶
func (dq *DocumentQuery) All(ctx context.Context) ([]*Document, error)
All executes the query and returns a list of Documents.
func (*DocumentQuery) AllX ¶
func (dq *DocumentQuery) AllX(ctx context.Context) []*Document
AllX is like All, but panics if an error occurs.
func (*DocumentQuery) Clone ¶
func (dq *DocumentQuery) Clone() *DocumentQuery
Clone returns a duplicate of the DocumentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DocumentQuery) Count ¶
func (dq *DocumentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DocumentQuery) CountX ¶
func (dq *DocumentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DocumentQuery) Exist ¶
func (dq *DocumentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DocumentQuery) ExistX ¶
func (dq *DocumentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DocumentQuery) First ¶
func (dq *DocumentQuery) First(ctx context.Context) (*Document, error)
First returns the first Document entity from the query. Returns a *NotFoundError when no Document was found.
func (*DocumentQuery) FirstID ¶
FirstID returns the first Document ID from the query. Returns a *NotFoundError when no Document ID was found.
func (*DocumentQuery) FirstIDX ¶
func (dq *DocumentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*DocumentQuery) FirstX ¶
func (dq *DocumentQuery) FirstX(ctx context.Context) *Document
FirstX is like First, but panics if an error occurs.
func (*DocumentQuery) GroupBy ¶
func (dq *DocumentQuery) GroupBy(field string, fields ...string) *DocumentGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Document.Query(). GroupBy(document.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DocumentQuery) IDsX ¶
func (dq *DocumentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*DocumentQuery) Limit ¶
func (dq *DocumentQuery) Limit(limit int) *DocumentQuery
Limit the number of records to be returned by this query.
func (*DocumentQuery) Offset ¶
func (dq *DocumentQuery) Offset(offset int) *DocumentQuery
Offset to start from.
func (*DocumentQuery) Only ¶
func (dq *DocumentQuery) Only(ctx context.Context) (*Document, error)
Only returns a single Document entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Document entity is found. Returns a *NotFoundError when no Document entities are found.
func (*DocumentQuery) OnlyID ¶
OnlyID is like Only, but returns the only Document ID in the query. Returns a *NotSingularError when more than one Document ID is found. Returns a *NotFoundError when no entities are found.
func (*DocumentQuery) OnlyIDX ¶
func (dq *DocumentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DocumentQuery) OnlyX ¶
func (dq *DocumentQuery) OnlyX(ctx context.Context) *Document
OnlyX is like Only, but panics if an error occurs.
func (*DocumentQuery) Order ¶
func (dq *DocumentQuery) Order(o ...document.OrderOption) *DocumentQuery
Order specifies how the records should be ordered.
func (*DocumentQuery) QueryAttachments ¶
func (dq *DocumentQuery) QueryAttachments() *AttachmentQuery
QueryAttachments chains the current query on the "attachments" edge.
func (*DocumentQuery) QueryGroup ¶
func (dq *DocumentQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*DocumentQuery) Select ¶
func (dq *DocumentQuery) Select(fields ...string) *DocumentSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Document.Query(). Select(document.FieldCreatedAt). Scan(ctx, &v)
func (*DocumentQuery) Unique ¶
func (dq *DocumentQuery) Unique(unique bool) *DocumentQuery
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 (*DocumentQuery) Where ¶
func (dq *DocumentQuery) Where(ps ...predicate.Document) *DocumentQuery
Where adds a new predicate for the DocumentQuery builder.
func (*DocumentQuery) WithAttachments ¶
func (dq *DocumentQuery) WithAttachments(opts ...func(*AttachmentQuery)) *DocumentQuery
WithAttachments tells the query-builder to eager-load the nodes that are connected to the "attachments" edge. The optional arguments are used to configure the query builder of the edge.
func (*DocumentQuery) WithGroup ¶
func (dq *DocumentQuery) WithGroup(opts ...func(*GroupQuery)) *DocumentQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
type DocumentSelect ¶
type DocumentSelect struct { *DocumentQuery // contains filtered or unexported fields }
DocumentSelect is the builder for selecting fields of Document entities.
func (*DocumentSelect) Aggregate ¶
func (ds *DocumentSelect) Aggregate(fns ...AggregateFunc) *DocumentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DocumentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DocumentSelect) Scan ¶
func (ds *DocumentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DocumentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DocumentUpdate ¶
type DocumentUpdate struct {
// contains filtered or unexported fields
}
DocumentUpdate is the builder for updating Document entities.
func (*DocumentUpdate) AddAttachmentIDs ¶
func (du *DocumentUpdate) AddAttachmentIDs(ids ...uuid.UUID) *DocumentUpdate
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.
func (*DocumentUpdate) AddAttachments ¶
func (du *DocumentUpdate) AddAttachments(a ...*Attachment) *DocumentUpdate
AddAttachments adds the "attachments" edges to the Attachment entity.
func (*DocumentUpdate) ClearAttachments ¶
func (du *DocumentUpdate) ClearAttachments() *DocumentUpdate
ClearAttachments clears all "attachments" edges to the Attachment entity.
func (*DocumentUpdate) ClearGroup ¶
func (du *DocumentUpdate) ClearGroup() *DocumentUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*DocumentUpdate) Exec ¶
func (du *DocumentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DocumentUpdate) ExecX ¶
func (du *DocumentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentUpdate) Mutation ¶
func (du *DocumentUpdate) Mutation() *DocumentMutation
Mutation returns the DocumentMutation object of the builder.
func (*DocumentUpdate) RemoveAttachmentIDs ¶
func (du *DocumentUpdate) RemoveAttachmentIDs(ids ...uuid.UUID) *DocumentUpdate
RemoveAttachmentIDs removes the "attachments" edge to Attachment entities by IDs.
func (*DocumentUpdate) RemoveAttachments ¶
func (du *DocumentUpdate) RemoveAttachments(a ...*Attachment) *DocumentUpdate
RemoveAttachments removes "attachments" edges to Attachment entities.
func (*DocumentUpdate) Save ¶
func (du *DocumentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DocumentUpdate) SaveX ¶
func (du *DocumentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DocumentUpdate) SetGroup ¶
func (du *DocumentUpdate) SetGroup(g *Group) *DocumentUpdate
SetGroup sets the "group" edge to the Group entity.
func (*DocumentUpdate) SetGroupID ¶
func (du *DocumentUpdate) SetGroupID(id uuid.UUID) *DocumentUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*DocumentUpdate) SetNillablePath ¶
func (du *DocumentUpdate) SetNillablePath(s *string) *DocumentUpdate
SetNillablePath sets the "path" field if the given value is not nil.
func (*DocumentUpdate) SetNillableTitle ¶
func (du *DocumentUpdate) SetNillableTitle(s *string) *DocumentUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*DocumentUpdate) SetPath ¶
func (du *DocumentUpdate) SetPath(s string) *DocumentUpdate
SetPath sets the "path" field.
func (*DocumentUpdate) SetTitle ¶
func (du *DocumentUpdate) SetTitle(s string) *DocumentUpdate
SetTitle sets the "title" field.
func (*DocumentUpdate) SetUpdatedAt ¶
func (du *DocumentUpdate) SetUpdatedAt(t time.Time) *DocumentUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DocumentUpdate) Where ¶
func (du *DocumentUpdate) Where(ps ...predicate.Document) *DocumentUpdate
Where appends a list predicates to the DocumentUpdate builder.
type DocumentUpdateOne ¶
type DocumentUpdateOne struct {
// contains filtered or unexported fields
}
DocumentUpdateOne is the builder for updating a single Document entity.
func (*DocumentUpdateOne) AddAttachmentIDs ¶
func (duo *DocumentUpdateOne) AddAttachmentIDs(ids ...uuid.UUID) *DocumentUpdateOne
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.
func (*DocumentUpdateOne) AddAttachments ¶
func (duo *DocumentUpdateOne) AddAttachments(a ...*Attachment) *DocumentUpdateOne
AddAttachments adds the "attachments" edges to the Attachment entity.
func (*DocumentUpdateOne) ClearAttachments ¶
func (duo *DocumentUpdateOne) ClearAttachments() *DocumentUpdateOne
ClearAttachments clears all "attachments" edges to the Attachment entity.
func (*DocumentUpdateOne) ClearGroup ¶
func (duo *DocumentUpdateOne) ClearGroup() *DocumentUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*DocumentUpdateOne) Exec ¶
func (duo *DocumentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DocumentUpdateOne) ExecX ¶
func (duo *DocumentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DocumentUpdateOne) Mutation ¶
func (duo *DocumentUpdateOne) Mutation() *DocumentMutation
Mutation returns the DocumentMutation object of the builder.
func (*DocumentUpdateOne) RemoveAttachmentIDs ¶
func (duo *DocumentUpdateOne) RemoveAttachmentIDs(ids ...uuid.UUID) *DocumentUpdateOne
RemoveAttachmentIDs removes the "attachments" edge to Attachment entities by IDs.
func (*DocumentUpdateOne) RemoveAttachments ¶
func (duo *DocumentUpdateOne) RemoveAttachments(a ...*Attachment) *DocumentUpdateOne
RemoveAttachments removes "attachments" edges to Attachment entities.
func (*DocumentUpdateOne) Save ¶
func (duo *DocumentUpdateOne) Save(ctx context.Context) (*Document, error)
Save executes the query and returns the updated Document entity.
func (*DocumentUpdateOne) SaveX ¶
func (duo *DocumentUpdateOne) SaveX(ctx context.Context) *Document
SaveX is like Save, but panics if an error occurs.
func (*DocumentUpdateOne) Select ¶
func (duo *DocumentUpdateOne) Select(field string, fields ...string) *DocumentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DocumentUpdateOne) SetGroup ¶
func (duo *DocumentUpdateOne) SetGroup(g *Group) *DocumentUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*DocumentUpdateOne) SetGroupID ¶
func (duo *DocumentUpdateOne) SetGroupID(id uuid.UUID) *DocumentUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*DocumentUpdateOne) SetNillablePath ¶
func (duo *DocumentUpdateOne) SetNillablePath(s *string) *DocumentUpdateOne
SetNillablePath sets the "path" field if the given value is not nil.
func (*DocumentUpdateOne) SetNillableTitle ¶
func (duo *DocumentUpdateOne) SetNillableTitle(s *string) *DocumentUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*DocumentUpdateOne) SetPath ¶
func (duo *DocumentUpdateOne) SetPath(s string) *DocumentUpdateOne
SetPath sets the "path" field.
func (*DocumentUpdateOne) SetTitle ¶
func (duo *DocumentUpdateOne) SetTitle(s string) *DocumentUpdateOne
SetTitle sets the "title" field.
func (*DocumentUpdateOne) SetUpdatedAt ¶
func (duo *DocumentUpdateOne) SetUpdatedAt(t time.Time) *DocumentUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DocumentUpdateOne) Where ¶
func (duo *DocumentUpdateOne) Where(ps ...predicate.Document) *DocumentUpdateOne
Where appends a list predicates to the DocumentUpdate builder.
type Group ¶
type Group struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Currency holds the value of the "currency" field. Currency string `json:"currency,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupQuery when eager-loading is set. Edges GroupEdges `json:"edges"` // contains filtered or unexported fields }
Group is the model entity for the Group schema.
func (*Group) QueryDocuments ¶
func (gr *Group) QueryDocuments() *DocumentQuery
QueryDocuments queries the "documents" edge of the Group entity.
func (*Group) QueryInvitationTokens ¶
func (gr *Group) QueryInvitationTokens() *GroupInvitationTokenQuery
QueryInvitationTokens queries the "invitation_tokens" edge of the Group entity.
func (*Group) QueryItems ¶
QueryItems queries the "items" edge of the Group entity.
func (*Group) QueryLabels ¶
func (gr *Group) QueryLabels() *LabelQuery
QueryLabels queries the "labels" edge of the Group entity.
func (*Group) QueryLocations ¶
func (gr *Group) QueryLocations() *LocationQuery
QueryLocations queries the "locations" edge of the Group entity.
func (*Group) QueryNotifiers ¶
func (gr *Group) QueryNotifiers() *NotifierQuery
QueryNotifiers queries the "notifiers" edge of the Group entity.
func (*Group) QueryUsers ¶
QueryUsers queries the "users" edge of the Group entity.
func (*Group) Unwrap ¶
Unwrap unwraps the Group 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 (*Group) Update ¶
func (gr *Group) Update() *GroupUpdateOne
Update returns a builder for updating this Group. Note that you need to call Group.Unwrap() before calling this method if this Group was returned from a transaction, and the transaction was committed or rolled back.
type GroupClient ¶
type GroupClient struct {
// contains filtered or unexported fields
}
GroupClient is a client for the Group schema.
func NewGroupClient ¶
func NewGroupClient(c config) *GroupClient
NewGroupClient returns a client for the Group from the given config.
func (*GroupClient) Create ¶
func (c *GroupClient) Create() *GroupCreate
Create returns a builder for creating a Group entity.
func (*GroupClient) CreateBulk ¶
func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
CreateBulk returns a builder for creating a bulk of Group entities.
func (*GroupClient) Delete ¶
func (c *GroupClient) Delete() *GroupDelete
Delete returns a delete builder for Group.
func (*GroupClient) DeleteOne ¶
func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroupClient) DeleteOneID ¶
func (c *GroupClient) DeleteOneID(id uuid.UUID) *GroupDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GroupClient) Intercept ¶
func (c *GroupClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `group.Intercept(f(g(h())))`.
func (*GroupClient) Interceptors ¶
func (c *GroupClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroupClient) MapCreateBulk ¶
func (c *GroupClient) MapCreateBulk(slice any, setFunc func(*GroupCreate, int)) *GroupCreateBulk
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 (*GroupClient) Query ¶
func (c *GroupClient) Query() *GroupQuery
Query returns a query builder for Group.
func (*GroupClient) QueryDocuments ¶
func (c *GroupClient) QueryDocuments(gr *Group) *DocumentQuery
QueryDocuments queries the documents edge of a Group.
func (*GroupClient) QueryInvitationTokens ¶
func (c *GroupClient) QueryInvitationTokens(gr *Group) *GroupInvitationTokenQuery
QueryInvitationTokens queries the invitation_tokens edge of a Group.
func (*GroupClient) QueryItems ¶
func (c *GroupClient) QueryItems(gr *Group) *ItemQuery
QueryItems queries the items edge of a Group.
func (*GroupClient) QueryLabels ¶
func (c *GroupClient) QueryLabels(gr *Group) *LabelQuery
QueryLabels queries the labels edge of a Group.
func (*GroupClient) QueryLocations ¶
func (c *GroupClient) QueryLocations(gr *Group) *LocationQuery
QueryLocations queries the locations edge of a Group.
func (*GroupClient) QueryNotifiers ¶
func (c *GroupClient) QueryNotifiers(gr *Group) *NotifierQuery
QueryNotifiers queries the notifiers edge of a Group.
func (*GroupClient) QueryUsers ¶
func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
QueryUsers queries the users edge of a Group.
func (*GroupClient) Update ¶
func (c *GroupClient) Update() *GroupUpdate
Update returns an update builder for Group.
func (*GroupClient) UpdateOne ¶
func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupClient) UpdateOneID ¶
func (c *GroupClient) UpdateOneID(id uuid.UUID) *GroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupClient) Use ¶
func (c *GroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `group.Hooks(f(g(h())))`.
type GroupCreate ¶
type GroupCreate struct {
// contains filtered or unexported fields
}
GroupCreate is the builder for creating a Group entity.
func (*GroupCreate) AddDocumentIDs ¶
func (gc *GroupCreate) AddDocumentIDs(ids ...uuid.UUID) *GroupCreate
AddDocumentIDs adds the "documents" edge to the Document entity by IDs.
func (*GroupCreate) AddDocuments ¶
func (gc *GroupCreate) AddDocuments(d ...*Document) *GroupCreate
AddDocuments adds the "documents" edges to the Document entity.
func (*GroupCreate) AddInvitationTokenIDs ¶
func (gc *GroupCreate) AddInvitationTokenIDs(ids ...uuid.UUID) *GroupCreate
AddInvitationTokenIDs adds the "invitation_tokens" edge to the GroupInvitationToken entity by IDs.
func (*GroupCreate) AddInvitationTokens ¶
func (gc *GroupCreate) AddInvitationTokens(g ...*GroupInvitationToken) *GroupCreate
AddInvitationTokens adds the "invitation_tokens" edges to the GroupInvitationToken entity.
func (*GroupCreate) AddItemIDs ¶
func (gc *GroupCreate) AddItemIDs(ids ...uuid.UUID) *GroupCreate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*GroupCreate) AddItems ¶
func (gc *GroupCreate) AddItems(i ...*Item) *GroupCreate
AddItems adds the "items" edges to the Item entity.
func (*GroupCreate) AddLabelIDs ¶
func (gc *GroupCreate) AddLabelIDs(ids ...uuid.UUID) *GroupCreate
AddLabelIDs adds the "labels" edge to the Label entity by IDs.
func (*GroupCreate) AddLabels ¶
func (gc *GroupCreate) AddLabels(l ...*Label) *GroupCreate
AddLabels adds the "labels" edges to the Label entity.
func (*GroupCreate) AddLocationIDs ¶
func (gc *GroupCreate) AddLocationIDs(ids ...uuid.UUID) *GroupCreate
AddLocationIDs adds the "locations" edge to the Location entity by IDs.
func (*GroupCreate) AddLocations ¶
func (gc *GroupCreate) AddLocations(l ...*Location) *GroupCreate
AddLocations adds the "locations" edges to the Location entity.
func (*GroupCreate) AddNotifierIDs ¶
func (gc *GroupCreate) AddNotifierIDs(ids ...uuid.UUID) *GroupCreate
AddNotifierIDs adds the "notifiers" edge to the Notifier entity by IDs.
func (*GroupCreate) AddNotifiers ¶
func (gc *GroupCreate) AddNotifiers(n ...*Notifier) *GroupCreate
AddNotifiers adds the "notifiers" edges to the Notifier entity.
func (*GroupCreate) AddUserIDs ¶
func (gc *GroupCreate) AddUserIDs(ids ...uuid.UUID) *GroupCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupCreate) AddUsers ¶
func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
AddUsers adds the "users" edges to the User entity.
func (*GroupCreate) Exec ¶
func (gc *GroupCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreate) ExecX ¶
func (gc *GroupCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupCreate) Mutation ¶
func (gc *GroupCreate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupCreate) Save ¶
func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
Save creates the Group in the database.
func (*GroupCreate) SaveX ¶
func (gc *GroupCreate) SaveX(ctx context.Context) *Group
SaveX calls Save and panics if Save returns an error.
func (*GroupCreate) SetCreatedAt ¶
func (gc *GroupCreate) SetCreatedAt(t time.Time) *GroupCreate
SetCreatedAt sets the "created_at" field.
func (*GroupCreate) SetCurrency ¶
func (gc *GroupCreate) SetCurrency(s string) *GroupCreate
SetCurrency sets the "currency" field.
func (*GroupCreate) SetID ¶
func (gc *GroupCreate) SetID(u uuid.UUID) *GroupCreate
SetID sets the "id" field.
func (*GroupCreate) SetName ¶
func (gc *GroupCreate) SetName(s string) *GroupCreate
SetName sets the "name" field.
func (*GroupCreate) SetNillableCreatedAt ¶
func (gc *GroupCreate) SetNillableCreatedAt(t *time.Time) *GroupCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroupCreate) SetNillableCurrency ¶
func (gc *GroupCreate) SetNillableCurrency(s *string) *GroupCreate
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*GroupCreate) SetNillableID ¶
func (gc *GroupCreate) SetNillableID(u *uuid.UUID) *GroupCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*GroupCreate) SetNillableUpdatedAt ¶
func (gc *GroupCreate) SetNillableUpdatedAt(t *time.Time) *GroupCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*GroupCreate) SetUpdatedAt ¶
func (gc *GroupCreate) SetUpdatedAt(t time.Time) *GroupCreate
SetUpdatedAt sets the "updated_at" field.
type GroupCreateBulk ¶
type GroupCreateBulk struct {
// contains filtered or unexported fields
}
GroupCreateBulk is the builder for creating many Group entities in bulk.
func (*GroupCreateBulk) Exec ¶
func (gcb *GroupCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreateBulk) ExecX ¶
func (gcb *GroupCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GroupDelete ¶
type GroupDelete struct {
// contains filtered or unexported fields
}
GroupDelete is the builder for deleting a Group entity.
func (*GroupDelete) Exec ¶
func (gd *GroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupDelete) ExecX ¶
func (gd *GroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupDelete) Where ¶
func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete
Where appends a list predicates to the GroupDelete builder.
type GroupDeleteOne ¶
type GroupDeleteOne struct {
// contains filtered or unexported fields
}
GroupDeleteOne is the builder for deleting a single Group entity.
func (*GroupDeleteOne) Exec ¶
func (gdo *GroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupDeleteOne) ExecX ¶
func (gdo *GroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupDeleteOne) Where ¶
func (gdo *GroupDeleteOne) Where(ps ...predicate.Group) *GroupDeleteOne
Where appends a list predicates to the GroupDelete builder.
type GroupEdges ¶
type GroupEdges struct { // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // Locations holds the value of the locations edge. Locations []*Location `json:"locations,omitempty"` // Items holds the value of the items edge. Items []*Item `json:"items,omitempty"` // Labels holds the value of the labels edge. Labels []*Label `json:"labels,omitempty"` // Documents holds the value of the documents edge. Documents []*Document `json:"documents,omitempty"` // InvitationTokens holds the value of the invitation_tokens edge. InvitationTokens []*GroupInvitationToken `json:"invitation_tokens,omitempty"` // Notifiers holds the value of the notifiers edge. Notifiers []*Notifier `json:"notifiers,omitempty"` // contains filtered or unexported fields }
GroupEdges holds the relations/edges for other nodes in the graph.
func (GroupEdges) DocumentsOrErr ¶
func (e GroupEdges) DocumentsOrErr() ([]*Document, error)
DocumentsOrErr returns the Documents value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) InvitationTokensOrErr ¶
func (e GroupEdges) InvitationTokensOrErr() ([]*GroupInvitationToken, error)
InvitationTokensOrErr returns the InvitationTokens value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) ItemsOrErr ¶
func (e GroupEdges) ItemsOrErr() ([]*Item, error)
ItemsOrErr returns the Items value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) LabelsOrErr ¶
func (e GroupEdges) LabelsOrErr() ([]*Label, error)
LabelsOrErr returns the Labels value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) LocationsOrErr ¶
func (e GroupEdges) LocationsOrErr() ([]*Location, error)
LocationsOrErr returns the Locations value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) NotifiersOrErr ¶
func (e GroupEdges) NotifiersOrErr() ([]*Notifier, error)
NotifiersOrErr returns the Notifiers value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) UsersOrErr ¶
func (e GroupEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type GroupGroupBy ¶
type GroupGroupBy struct {
// contains filtered or unexported fields
}
GroupGroupBy is the group-by builder for Group entities.
func (*GroupGroupBy) Aggregate ¶
func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Scan ¶
func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupInvitationToken ¶
type GroupInvitationToken struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Token holds the value of the "token" field. Token []byte `json:"token,omitempty"` // ExpiresAt holds the value of the "expires_at" field. ExpiresAt time.Time `json:"expires_at,omitempty"` // Uses holds the value of the "uses" field. Uses int `json:"uses,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupInvitationTokenQuery when eager-loading is set. Edges GroupInvitationTokenEdges `json:"edges"` // contains filtered or unexported fields }
GroupInvitationToken is the model entity for the GroupInvitationToken schema.
func (*GroupInvitationToken) GetID ¶
func (git *GroupInvitationToken) GetID() uuid.UUID
func (*GroupInvitationToken) QueryGroup ¶
func (git *GroupInvitationToken) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the GroupInvitationToken entity.
func (*GroupInvitationToken) String ¶
func (git *GroupInvitationToken) String() string
String implements the fmt.Stringer.
func (*GroupInvitationToken) Unwrap ¶
func (git *GroupInvitationToken) Unwrap() *GroupInvitationToken
Unwrap unwraps the GroupInvitationToken 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 (*GroupInvitationToken) Update ¶
func (git *GroupInvitationToken) Update() *GroupInvitationTokenUpdateOne
Update returns a builder for updating this GroupInvitationToken. Note that you need to call GroupInvitationToken.Unwrap() before calling this method if this GroupInvitationToken was returned from a transaction, and the transaction was committed or rolled back.
type GroupInvitationTokenClient ¶
type GroupInvitationTokenClient struct {
// contains filtered or unexported fields
}
GroupInvitationTokenClient is a client for the GroupInvitationToken schema.
func NewGroupInvitationTokenClient ¶
func NewGroupInvitationTokenClient(c config) *GroupInvitationTokenClient
NewGroupInvitationTokenClient returns a client for the GroupInvitationToken from the given config.
func (*GroupInvitationTokenClient) Create ¶
func (c *GroupInvitationTokenClient) Create() *GroupInvitationTokenCreate
Create returns a builder for creating a GroupInvitationToken entity.
func (*GroupInvitationTokenClient) CreateBulk ¶
func (c *GroupInvitationTokenClient) CreateBulk(builders ...*GroupInvitationTokenCreate) *GroupInvitationTokenCreateBulk
CreateBulk returns a builder for creating a bulk of GroupInvitationToken entities.
func (*GroupInvitationTokenClient) Delete ¶
func (c *GroupInvitationTokenClient) Delete() *GroupInvitationTokenDelete
Delete returns a delete builder for GroupInvitationToken.
func (*GroupInvitationTokenClient) DeleteOne ¶
func (c *GroupInvitationTokenClient) DeleteOne(git *GroupInvitationToken) *GroupInvitationTokenDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroupInvitationTokenClient) DeleteOneID ¶
func (c *GroupInvitationTokenClient) DeleteOneID(id uuid.UUID) *GroupInvitationTokenDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GroupInvitationTokenClient) Get ¶
func (c *GroupInvitationTokenClient) Get(ctx context.Context, id uuid.UUID) (*GroupInvitationToken, error)
Get returns a GroupInvitationToken entity by its id.
func (*GroupInvitationTokenClient) GetX ¶
func (c *GroupInvitationTokenClient) GetX(ctx context.Context, id uuid.UUID) *GroupInvitationToken
GetX is like Get, but panics if an error occurs.
func (*GroupInvitationTokenClient) Hooks ¶
func (c *GroupInvitationTokenClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroupInvitationTokenClient) Intercept ¶
func (c *GroupInvitationTokenClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `groupinvitationtoken.Intercept(f(g(h())))`.
func (*GroupInvitationTokenClient) Interceptors ¶
func (c *GroupInvitationTokenClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroupInvitationTokenClient) MapCreateBulk ¶
func (c *GroupInvitationTokenClient) MapCreateBulk(slice any, setFunc func(*GroupInvitationTokenCreate, int)) *GroupInvitationTokenCreateBulk
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 (*GroupInvitationTokenClient) Query ¶
func (c *GroupInvitationTokenClient) Query() *GroupInvitationTokenQuery
Query returns a query builder for GroupInvitationToken.
func (*GroupInvitationTokenClient) QueryGroup ¶
func (c *GroupInvitationTokenClient) QueryGroup(git *GroupInvitationToken) *GroupQuery
QueryGroup queries the group edge of a GroupInvitationToken.
func (*GroupInvitationTokenClient) Update ¶
func (c *GroupInvitationTokenClient) Update() *GroupInvitationTokenUpdate
Update returns an update builder for GroupInvitationToken.
func (*GroupInvitationTokenClient) UpdateOne ¶
func (c *GroupInvitationTokenClient) UpdateOne(git *GroupInvitationToken) *GroupInvitationTokenUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupInvitationTokenClient) UpdateOneID ¶
func (c *GroupInvitationTokenClient) UpdateOneID(id uuid.UUID) *GroupInvitationTokenUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupInvitationTokenClient) Use ¶
func (c *GroupInvitationTokenClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `groupinvitationtoken.Hooks(f(g(h())))`.
type GroupInvitationTokenCreate ¶
type GroupInvitationTokenCreate struct {
// contains filtered or unexported fields
}
GroupInvitationTokenCreate is the builder for creating a GroupInvitationToken entity.
func (*GroupInvitationTokenCreate) Exec ¶
func (gitc *GroupInvitationTokenCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupInvitationTokenCreate) ExecX ¶
func (gitc *GroupInvitationTokenCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInvitationTokenCreate) Mutation ¶
func (gitc *GroupInvitationTokenCreate) Mutation() *GroupInvitationTokenMutation
Mutation returns the GroupInvitationTokenMutation object of the builder.
func (*GroupInvitationTokenCreate) Save ¶
func (gitc *GroupInvitationTokenCreate) Save(ctx context.Context) (*GroupInvitationToken, error)
Save creates the GroupInvitationToken in the database.
func (*GroupInvitationTokenCreate) SaveX ¶
func (gitc *GroupInvitationTokenCreate) SaveX(ctx context.Context) *GroupInvitationToken
SaveX calls Save and panics if Save returns an error.
func (*GroupInvitationTokenCreate) SetCreatedAt ¶
func (gitc *GroupInvitationTokenCreate) SetCreatedAt(t time.Time) *GroupInvitationTokenCreate
SetCreatedAt sets the "created_at" field.
func (*GroupInvitationTokenCreate) SetExpiresAt ¶
func (gitc *GroupInvitationTokenCreate) SetExpiresAt(t time.Time) *GroupInvitationTokenCreate
SetExpiresAt sets the "expires_at" field.
func (*GroupInvitationTokenCreate) SetGroup ¶
func (gitc *GroupInvitationTokenCreate) SetGroup(g *Group) *GroupInvitationTokenCreate
SetGroup sets the "group" edge to the Group entity.
func (*GroupInvitationTokenCreate) SetGroupID ¶
func (gitc *GroupInvitationTokenCreate) SetGroupID(id uuid.UUID) *GroupInvitationTokenCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*GroupInvitationTokenCreate) SetID ¶
func (gitc *GroupInvitationTokenCreate) SetID(u uuid.UUID) *GroupInvitationTokenCreate
SetID sets the "id" field.
func (*GroupInvitationTokenCreate) SetNillableCreatedAt ¶
func (gitc *GroupInvitationTokenCreate) SetNillableCreatedAt(t *time.Time) *GroupInvitationTokenCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroupInvitationTokenCreate) SetNillableExpiresAt ¶
func (gitc *GroupInvitationTokenCreate) SetNillableExpiresAt(t *time.Time) *GroupInvitationTokenCreate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*GroupInvitationTokenCreate) SetNillableGroupID ¶
func (gitc *GroupInvitationTokenCreate) SetNillableGroupID(id *uuid.UUID) *GroupInvitationTokenCreate
SetNillableGroupID sets the "group" edge to the Group entity by ID if the given value is not nil.
func (*GroupInvitationTokenCreate) SetNillableID ¶
func (gitc *GroupInvitationTokenCreate) SetNillableID(u *uuid.UUID) *GroupInvitationTokenCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*GroupInvitationTokenCreate) SetNillableUpdatedAt ¶
func (gitc *GroupInvitationTokenCreate) SetNillableUpdatedAt(t *time.Time) *GroupInvitationTokenCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*GroupInvitationTokenCreate) SetNillableUses ¶
func (gitc *GroupInvitationTokenCreate) SetNillableUses(i *int) *GroupInvitationTokenCreate
SetNillableUses sets the "uses" field if the given value is not nil.
func (*GroupInvitationTokenCreate) SetToken ¶
func (gitc *GroupInvitationTokenCreate) SetToken(b []byte) *GroupInvitationTokenCreate
SetToken sets the "token" field.
func (*GroupInvitationTokenCreate) SetUpdatedAt ¶
func (gitc *GroupInvitationTokenCreate) SetUpdatedAt(t time.Time) *GroupInvitationTokenCreate
SetUpdatedAt sets the "updated_at" field.
func (*GroupInvitationTokenCreate) SetUses ¶
func (gitc *GroupInvitationTokenCreate) SetUses(i int) *GroupInvitationTokenCreate
SetUses sets the "uses" field.
type GroupInvitationTokenCreateBulk ¶
type GroupInvitationTokenCreateBulk struct {
// contains filtered or unexported fields
}
GroupInvitationTokenCreateBulk is the builder for creating many GroupInvitationToken entities in bulk.
func (*GroupInvitationTokenCreateBulk) Exec ¶
func (gitcb *GroupInvitationTokenCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupInvitationTokenCreateBulk) ExecX ¶
func (gitcb *GroupInvitationTokenCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInvitationTokenCreateBulk) Save ¶
func (gitcb *GroupInvitationTokenCreateBulk) Save(ctx context.Context) ([]*GroupInvitationToken, error)
Save creates the GroupInvitationToken entities in the database.
func (*GroupInvitationTokenCreateBulk) SaveX ¶
func (gitcb *GroupInvitationTokenCreateBulk) SaveX(ctx context.Context) []*GroupInvitationToken
SaveX is like Save, but panics if an error occurs.
type GroupInvitationTokenDelete ¶
type GroupInvitationTokenDelete struct {
// contains filtered or unexported fields
}
GroupInvitationTokenDelete is the builder for deleting a GroupInvitationToken entity.
func (*GroupInvitationTokenDelete) Exec ¶
func (gitd *GroupInvitationTokenDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupInvitationTokenDelete) ExecX ¶
func (gitd *GroupInvitationTokenDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupInvitationTokenDelete) Where ¶
func (gitd *GroupInvitationTokenDelete) Where(ps ...predicate.GroupInvitationToken) *GroupInvitationTokenDelete
Where appends a list predicates to the GroupInvitationTokenDelete builder.
type GroupInvitationTokenDeleteOne ¶
type GroupInvitationTokenDeleteOne struct {
// contains filtered or unexported fields
}
GroupInvitationTokenDeleteOne is the builder for deleting a single GroupInvitationToken entity.
func (*GroupInvitationTokenDeleteOne) Exec ¶
func (gitdo *GroupInvitationTokenDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupInvitationTokenDeleteOne) ExecX ¶
func (gitdo *GroupInvitationTokenDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInvitationTokenDeleteOne) Where ¶
func (gitdo *GroupInvitationTokenDeleteOne) Where(ps ...predicate.GroupInvitationToken) *GroupInvitationTokenDeleteOne
Where appends a list predicates to the GroupInvitationTokenDelete builder.
type GroupInvitationTokenEdges ¶
type GroupInvitationTokenEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // contains filtered or unexported fields }
GroupInvitationTokenEdges holds the relations/edges for other nodes in the graph.
func (GroupInvitationTokenEdges) GroupOrErr ¶
func (e GroupInvitationTokenEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GroupInvitationTokenGroupBy ¶
type GroupInvitationTokenGroupBy struct {
// contains filtered or unexported fields
}
GroupInvitationTokenGroupBy is the group-by builder for GroupInvitationToken entities.
func (*GroupInvitationTokenGroupBy) Aggregate ¶
func (gitgb *GroupInvitationTokenGroupBy) Aggregate(fns ...AggregateFunc) *GroupInvitationTokenGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupInvitationTokenGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*GroupInvitationTokenGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupInvitationTokenGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenGroupBy) Scan ¶
func (gitgb *GroupInvitationTokenGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupInvitationTokenGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenGroupBy) StringX ¶
StringX is like String, but panics if an error occurs.
type GroupInvitationTokenMutation ¶
type GroupInvitationTokenMutation struct {
// contains filtered or unexported fields
}
GroupInvitationTokenMutation represents an operation that mutates the GroupInvitationToken nodes in the graph.
func (*GroupInvitationTokenMutation) AddField ¶
func (m *GroupInvitationTokenMutation) 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 (*GroupInvitationTokenMutation) AddUses ¶
func (m *GroupInvitationTokenMutation) AddUses(i int)
AddUses adds i to the "uses" field.
func (*GroupInvitationTokenMutation) AddedEdges ¶
func (m *GroupInvitationTokenMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupInvitationTokenMutation) AddedField ¶
func (m *GroupInvitationTokenMutation) 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 (*GroupInvitationTokenMutation) AddedFields ¶
func (m *GroupInvitationTokenMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupInvitationTokenMutation) AddedIDs ¶
func (m *GroupInvitationTokenMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupInvitationTokenMutation) AddedUses ¶
func (m *GroupInvitationTokenMutation) AddedUses() (r int, exists bool)
AddedUses returns the value that was added to the "uses" field in this mutation.
func (*GroupInvitationTokenMutation) ClearEdge ¶
func (m *GroupInvitationTokenMutation) 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 (*GroupInvitationTokenMutation) ClearField ¶
func (m *GroupInvitationTokenMutation) 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 (*GroupInvitationTokenMutation) ClearGroup ¶
func (m *GroupInvitationTokenMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*GroupInvitationTokenMutation) ClearedEdges ¶
func (m *GroupInvitationTokenMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupInvitationTokenMutation) ClearedFields ¶
func (m *GroupInvitationTokenMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupInvitationTokenMutation) Client ¶
func (m GroupInvitationTokenMutation) 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 (*GroupInvitationTokenMutation) CreatedAt ¶
func (m *GroupInvitationTokenMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GroupInvitationTokenMutation) EdgeCleared ¶
func (m *GroupInvitationTokenMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupInvitationTokenMutation) ExpiresAt ¶
func (m *GroupInvitationTokenMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the value of the "expires_at" field in the mutation.
func (*GroupInvitationTokenMutation) Field ¶
func (m *GroupInvitationTokenMutation) 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 (*GroupInvitationTokenMutation) FieldCleared ¶
func (m *GroupInvitationTokenMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupInvitationTokenMutation) Fields ¶
func (m *GroupInvitationTokenMutation) 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 (*GroupInvitationTokenMutation) GroupCleared ¶
func (m *GroupInvitationTokenMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*GroupInvitationTokenMutation) GroupID ¶
func (m *GroupInvitationTokenMutation) GroupID() (id uuid.UUID, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*GroupInvitationTokenMutation) GroupIDs ¶
func (m *GroupInvitationTokenMutation) GroupIDs() (ids []uuid.UUID)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*GroupInvitationTokenMutation) ID ¶
func (m *GroupInvitationTokenMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*GroupInvitationTokenMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*GroupInvitationTokenMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the GroupInvitationToken entity. If the GroupInvitationToken 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 (*GroupInvitationTokenMutation) OldExpiresAt ¶
OldExpiresAt returns the old "expires_at" field's value of the GroupInvitationToken entity. If the GroupInvitationToken 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 (*GroupInvitationTokenMutation) OldField ¶
func (m *GroupInvitationTokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)
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 (*GroupInvitationTokenMutation) OldToken ¶
func (m *GroupInvitationTokenMutation) OldToken(ctx context.Context) (v []byte, err error)
OldToken returns the old "token" field's value of the GroupInvitationToken entity. If the GroupInvitationToken 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 (*GroupInvitationTokenMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the GroupInvitationToken entity. If the GroupInvitationToken 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 (*GroupInvitationTokenMutation) OldUses ¶
func (m *GroupInvitationTokenMutation) OldUses(ctx context.Context) (v int, err error)
OldUses returns the old "uses" field's value of the GroupInvitationToken entity. If the GroupInvitationToken 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 (*GroupInvitationTokenMutation) Op ¶
func (m *GroupInvitationTokenMutation) Op() Op
Op returns the operation name.
func (*GroupInvitationTokenMutation) RemovedEdges ¶
func (m *GroupInvitationTokenMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupInvitationTokenMutation) RemovedIDs ¶
func (m *GroupInvitationTokenMutation) 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 (*GroupInvitationTokenMutation) ResetCreatedAt ¶
func (m *GroupInvitationTokenMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GroupInvitationTokenMutation) ResetEdge ¶
func (m *GroupInvitationTokenMutation) 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 (*GroupInvitationTokenMutation) ResetExpiresAt ¶
func (m *GroupInvitationTokenMutation) ResetExpiresAt()
ResetExpiresAt resets all changes to the "expires_at" field.
func (*GroupInvitationTokenMutation) ResetField ¶
func (m *GroupInvitationTokenMutation) 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 (*GroupInvitationTokenMutation) ResetGroup ¶
func (m *GroupInvitationTokenMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*GroupInvitationTokenMutation) ResetToken ¶
func (m *GroupInvitationTokenMutation) ResetToken()
ResetToken resets all changes to the "token" field.
func (*GroupInvitationTokenMutation) ResetUpdatedAt ¶
func (m *GroupInvitationTokenMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*GroupInvitationTokenMutation) ResetUses ¶
func (m *GroupInvitationTokenMutation) ResetUses()
ResetUses resets all changes to the "uses" field.
func (*GroupInvitationTokenMutation) SetCreatedAt ¶
func (m *GroupInvitationTokenMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GroupInvitationTokenMutation) SetExpiresAt ¶
func (m *GroupInvitationTokenMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the "expires_at" field.
func (*GroupInvitationTokenMutation) SetField ¶
func (m *GroupInvitationTokenMutation) 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 (*GroupInvitationTokenMutation) SetGroupID ¶
func (m *GroupInvitationTokenMutation) SetGroupID(id uuid.UUID)
SetGroupID sets the "group" edge to the Group entity by id.
func (*GroupInvitationTokenMutation) SetID ¶
func (m *GroupInvitationTokenMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GroupInvitationToken entities.
func (*GroupInvitationTokenMutation) SetOp ¶
func (m *GroupInvitationTokenMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GroupInvitationTokenMutation) SetToken ¶
func (m *GroupInvitationTokenMutation) SetToken(b []byte)
SetToken sets the "token" field.
func (*GroupInvitationTokenMutation) SetUpdatedAt ¶
func (m *GroupInvitationTokenMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*GroupInvitationTokenMutation) SetUses ¶
func (m *GroupInvitationTokenMutation) SetUses(i int)
SetUses sets the "uses" field.
func (*GroupInvitationTokenMutation) Token ¶
func (m *GroupInvitationTokenMutation) Token() (r []byte, exists bool)
Token returns the value of the "token" field in the mutation.
func (GroupInvitationTokenMutation) Tx ¶
func (m GroupInvitationTokenMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupInvitationTokenMutation) Type ¶
func (m *GroupInvitationTokenMutation) Type() string
Type returns the node type of this mutation (GroupInvitationToken).
func (*GroupInvitationTokenMutation) UpdatedAt ¶
func (m *GroupInvitationTokenMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*GroupInvitationTokenMutation) Uses ¶
func (m *GroupInvitationTokenMutation) Uses() (r int, exists bool)
Uses returns the value of the "uses" field in the mutation.
func (*GroupInvitationTokenMutation) Where ¶
func (m *GroupInvitationTokenMutation) Where(ps ...predicate.GroupInvitationToken)
Where appends a list predicates to the GroupInvitationTokenMutation builder.
func (*GroupInvitationTokenMutation) WhereP ¶
func (m *GroupInvitationTokenMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroupInvitationTokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroupInvitationTokenQuery ¶
type GroupInvitationTokenQuery struct {
// contains filtered or unexported fields
}
GroupInvitationTokenQuery is the builder for querying GroupInvitationToken entities.
func (*GroupInvitationTokenQuery) Aggregate ¶
func (gitq *GroupInvitationTokenQuery) Aggregate(fns ...AggregateFunc) *GroupInvitationTokenSelect
Aggregate returns a GroupInvitationTokenSelect configured with the given aggregations.
func (*GroupInvitationTokenQuery) All ¶
func (gitq *GroupInvitationTokenQuery) All(ctx context.Context) ([]*GroupInvitationToken, error)
All executes the query and returns a list of GroupInvitationTokens.
func (*GroupInvitationTokenQuery) AllX ¶
func (gitq *GroupInvitationTokenQuery) AllX(ctx context.Context) []*GroupInvitationToken
AllX is like All, but panics if an error occurs.
func (*GroupInvitationTokenQuery) Clone ¶
func (gitq *GroupInvitationTokenQuery) Clone() *GroupInvitationTokenQuery
Clone returns a duplicate of the GroupInvitationTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupInvitationTokenQuery) Count ¶
func (gitq *GroupInvitationTokenQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupInvitationTokenQuery) CountX ¶
func (gitq *GroupInvitationTokenQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupInvitationTokenQuery) Exist ¶
func (gitq *GroupInvitationTokenQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupInvitationTokenQuery) ExistX ¶
func (gitq *GroupInvitationTokenQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupInvitationTokenQuery) First ¶
func (gitq *GroupInvitationTokenQuery) First(ctx context.Context) (*GroupInvitationToken, error)
First returns the first GroupInvitationToken entity from the query. Returns a *NotFoundError when no GroupInvitationToken was found.
func (*GroupInvitationTokenQuery) FirstID ¶
FirstID returns the first GroupInvitationToken ID from the query. Returns a *NotFoundError when no GroupInvitationToken ID was found.
func (*GroupInvitationTokenQuery) FirstIDX ¶
func (gitq *GroupInvitationTokenQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupInvitationTokenQuery) FirstX ¶
func (gitq *GroupInvitationTokenQuery) FirstX(ctx context.Context) *GroupInvitationToken
FirstX is like First, but panics if an error occurs.
func (*GroupInvitationTokenQuery) GroupBy ¶
func (gitq *GroupInvitationTokenQuery) GroupBy(field string, fields ...string) *GroupInvitationTokenGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.GroupInvitationToken.Query(). GroupBy(groupinvitationtoken.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroupInvitationTokenQuery) IDs ¶
IDs executes the query and returns a list of GroupInvitationToken IDs.
func (*GroupInvitationTokenQuery) IDsX ¶
func (gitq *GroupInvitationTokenQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*GroupInvitationTokenQuery) Limit ¶
func (gitq *GroupInvitationTokenQuery) Limit(limit int) *GroupInvitationTokenQuery
Limit the number of records to be returned by this query.
func (*GroupInvitationTokenQuery) Offset ¶
func (gitq *GroupInvitationTokenQuery) Offset(offset int) *GroupInvitationTokenQuery
Offset to start from.
func (*GroupInvitationTokenQuery) Only ¶
func (gitq *GroupInvitationTokenQuery) Only(ctx context.Context) (*GroupInvitationToken, error)
Only returns a single GroupInvitationToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GroupInvitationToken entity is found. Returns a *NotFoundError when no GroupInvitationToken entities are found.
func (*GroupInvitationTokenQuery) OnlyID ¶
OnlyID is like Only, but returns the only GroupInvitationToken ID in the query. Returns a *NotSingularError when more than one GroupInvitationToken ID is found. Returns a *NotFoundError when no entities are found.
func (*GroupInvitationTokenQuery) OnlyIDX ¶
func (gitq *GroupInvitationTokenQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupInvitationTokenQuery) OnlyX ¶
func (gitq *GroupInvitationTokenQuery) OnlyX(ctx context.Context) *GroupInvitationToken
OnlyX is like Only, but panics if an error occurs.
func (*GroupInvitationTokenQuery) Order ¶
func (gitq *GroupInvitationTokenQuery) Order(o ...groupinvitationtoken.OrderOption) *GroupInvitationTokenQuery
Order specifies how the records should be ordered.
func (*GroupInvitationTokenQuery) QueryGroup ¶
func (gitq *GroupInvitationTokenQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*GroupInvitationTokenQuery) Select ¶
func (gitq *GroupInvitationTokenQuery) Select(fields ...string) *GroupInvitationTokenSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.GroupInvitationToken.Query(). Select(groupinvitationtoken.FieldCreatedAt). Scan(ctx, &v)
func (*GroupInvitationTokenQuery) Unique ¶
func (gitq *GroupInvitationTokenQuery) Unique(unique bool) *GroupInvitationTokenQuery
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 (*GroupInvitationTokenQuery) Where ¶
func (gitq *GroupInvitationTokenQuery) Where(ps ...predicate.GroupInvitationToken) *GroupInvitationTokenQuery
Where adds a new predicate for the GroupInvitationTokenQuery builder.
func (*GroupInvitationTokenQuery) WithGroup ¶
func (gitq *GroupInvitationTokenQuery) WithGroup(opts ...func(*GroupQuery)) *GroupInvitationTokenQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
type GroupInvitationTokenSelect ¶
type GroupInvitationTokenSelect struct { *GroupInvitationTokenQuery // contains filtered or unexported fields }
GroupInvitationTokenSelect is the builder for selecting fields of GroupInvitationToken entities.
func (*GroupInvitationTokenSelect) Aggregate ¶
func (gits *GroupInvitationTokenSelect) Aggregate(fns ...AggregateFunc) *GroupInvitationTokenSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroupInvitationTokenSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*GroupInvitationTokenSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupInvitationTokenSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupInvitationTokenSelect) Scan ¶
func (gits *GroupInvitationTokenSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupInvitationTokenSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupInvitationTokenUpdate ¶
type GroupInvitationTokenUpdate struct {
// contains filtered or unexported fields
}
GroupInvitationTokenUpdate is the builder for updating GroupInvitationToken entities.
func (*GroupInvitationTokenUpdate) AddUses ¶
func (gitu *GroupInvitationTokenUpdate) AddUses(i int) *GroupInvitationTokenUpdate
AddUses adds i to the "uses" field.
func (*GroupInvitationTokenUpdate) ClearGroup ¶
func (gitu *GroupInvitationTokenUpdate) ClearGroup() *GroupInvitationTokenUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*GroupInvitationTokenUpdate) Exec ¶
func (gitu *GroupInvitationTokenUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupInvitationTokenUpdate) ExecX ¶
func (gitu *GroupInvitationTokenUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInvitationTokenUpdate) Mutation ¶
func (gitu *GroupInvitationTokenUpdate) Mutation() *GroupInvitationTokenMutation
Mutation returns the GroupInvitationTokenMutation object of the builder.
func (*GroupInvitationTokenUpdate) Save ¶
func (gitu *GroupInvitationTokenUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupInvitationTokenUpdate) SaveX ¶
func (gitu *GroupInvitationTokenUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupInvitationTokenUpdate) SetExpiresAt ¶
func (gitu *GroupInvitationTokenUpdate) SetExpiresAt(t time.Time) *GroupInvitationTokenUpdate
SetExpiresAt sets the "expires_at" field.
func (*GroupInvitationTokenUpdate) SetGroup ¶
func (gitu *GroupInvitationTokenUpdate) SetGroup(g *Group) *GroupInvitationTokenUpdate
SetGroup sets the "group" edge to the Group entity.
func (*GroupInvitationTokenUpdate) SetGroupID ¶
func (gitu *GroupInvitationTokenUpdate) SetGroupID(id uuid.UUID) *GroupInvitationTokenUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*GroupInvitationTokenUpdate) SetNillableExpiresAt ¶
func (gitu *GroupInvitationTokenUpdate) SetNillableExpiresAt(t *time.Time) *GroupInvitationTokenUpdate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*GroupInvitationTokenUpdate) SetNillableGroupID ¶
func (gitu *GroupInvitationTokenUpdate) SetNillableGroupID(id *uuid.UUID) *GroupInvitationTokenUpdate
SetNillableGroupID sets the "group" edge to the Group entity by ID if the given value is not nil.
func (*GroupInvitationTokenUpdate) SetNillableUses ¶
func (gitu *GroupInvitationTokenUpdate) SetNillableUses(i *int) *GroupInvitationTokenUpdate
SetNillableUses sets the "uses" field if the given value is not nil.
func (*GroupInvitationTokenUpdate) SetToken ¶
func (gitu *GroupInvitationTokenUpdate) SetToken(b []byte) *GroupInvitationTokenUpdate
SetToken sets the "token" field.
func (*GroupInvitationTokenUpdate) SetUpdatedAt ¶
func (gitu *GroupInvitationTokenUpdate) SetUpdatedAt(t time.Time) *GroupInvitationTokenUpdate
SetUpdatedAt sets the "updated_at" field.
func (*GroupInvitationTokenUpdate) SetUses ¶
func (gitu *GroupInvitationTokenUpdate) SetUses(i int) *GroupInvitationTokenUpdate
SetUses sets the "uses" field.
func (*GroupInvitationTokenUpdate) Where ¶
func (gitu *GroupInvitationTokenUpdate) Where(ps ...predicate.GroupInvitationToken) *GroupInvitationTokenUpdate
Where appends a list predicates to the GroupInvitationTokenUpdate builder.
type GroupInvitationTokenUpdateOne ¶
type GroupInvitationTokenUpdateOne struct {
// contains filtered or unexported fields
}
GroupInvitationTokenUpdateOne is the builder for updating a single GroupInvitationToken entity.
func (*GroupInvitationTokenUpdateOne) AddUses ¶
func (gituo *GroupInvitationTokenUpdateOne) AddUses(i int) *GroupInvitationTokenUpdateOne
AddUses adds i to the "uses" field.
func (*GroupInvitationTokenUpdateOne) ClearGroup ¶
func (gituo *GroupInvitationTokenUpdateOne) ClearGroup() *GroupInvitationTokenUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*GroupInvitationTokenUpdateOne) Exec ¶
func (gituo *GroupInvitationTokenUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupInvitationTokenUpdateOne) ExecX ¶
func (gituo *GroupInvitationTokenUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInvitationTokenUpdateOne) Mutation ¶
func (gituo *GroupInvitationTokenUpdateOne) Mutation() *GroupInvitationTokenMutation
Mutation returns the GroupInvitationTokenMutation object of the builder.
func (*GroupInvitationTokenUpdateOne) Save ¶
func (gituo *GroupInvitationTokenUpdateOne) Save(ctx context.Context) (*GroupInvitationToken, error)
Save executes the query and returns the updated GroupInvitationToken entity.
func (*GroupInvitationTokenUpdateOne) SaveX ¶
func (gituo *GroupInvitationTokenUpdateOne) SaveX(ctx context.Context) *GroupInvitationToken
SaveX is like Save, but panics if an error occurs.
func (*GroupInvitationTokenUpdateOne) Select ¶
func (gituo *GroupInvitationTokenUpdateOne) Select(field string, fields ...string) *GroupInvitationTokenUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupInvitationTokenUpdateOne) SetExpiresAt ¶
func (gituo *GroupInvitationTokenUpdateOne) SetExpiresAt(t time.Time) *GroupInvitationTokenUpdateOne
SetExpiresAt sets the "expires_at" field.
func (*GroupInvitationTokenUpdateOne) SetGroup ¶
func (gituo *GroupInvitationTokenUpdateOne) SetGroup(g *Group) *GroupInvitationTokenUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*GroupInvitationTokenUpdateOne) SetGroupID ¶
func (gituo *GroupInvitationTokenUpdateOne) SetGroupID(id uuid.UUID) *GroupInvitationTokenUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*GroupInvitationTokenUpdateOne) SetNillableExpiresAt ¶
func (gituo *GroupInvitationTokenUpdateOne) SetNillableExpiresAt(t *time.Time) *GroupInvitationTokenUpdateOne
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*GroupInvitationTokenUpdateOne) SetNillableGroupID ¶
func (gituo *GroupInvitationTokenUpdateOne) SetNillableGroupID(id *uuid.UUID) *GroupInvitationTokenUpdateOne
SetNillableGroupID sets the "group" edge to the Group entity by ID if the given value is not nil.
func (*GroupInvitationTokenUpdateOne) SetNillableUses ¶
func (gituo *GroupInvitationTokenUpdateOne) SetNillableUses(i *int) *GroupInvitationTokenUpdateOne
SetNillableUses sets the "uses" field if the given value is not nil.
func (*GroupInvitationTokenUpdateOne) SetToken ¶
func (gituo *GroupInvitationTokenUpdateOne) SetToken(b []byte) *GroupInvitationTokenUpdateOne
SetToken sets the "token" field.
func (*GroupInvitationTokenUpdateOne) SetUpdatedAt ¶
func (gituo *GroupInvitationTokenUpdateOne) SetUpdatedAt(t time.Time) *GroupInvitationTokenUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*GroupInvitationTokenUpdateOne) SetUses ¶
func (gituo *GroupInvitationTokenUpdateOne) SetUses(i int) *GroupInvitationTokenUpdateOne
SetUses sets the "uses" field.
func (*GroupInvitationTokenUpdateOne) Where ¶
func (gituo *GroupInvitationTokenUpdateOne) Where(ps ...predicate.GroupInvitationToken) *GroupInvitationTokenUpdateOne
Where appends a list predicates to the GroupInvitationTokenUpdate builder.
type GroupInvitationTokens ¶
type GroupInvitationTokens []*GroupInvitationToken
GroupInvitationTokens is a parsable slice of GroupInvitationToken.
type GroupMutation ¶
type GroupMutation struct {
// contains filtered or unexported fields
}
GroupMutation represents an operation that mutates the Group nodes in the graph.
func (*GroupMutation) AddDocumentIDs ¶
func (m *GroupMutation) AddDocumentIDs(ids ...uuid.UUID)
AddDocumentIDs adds the "documents" edge to the Document entity by ids.
func (*GroupMutation) AddField ¶
func (m *GroupMutation) 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 (*GroupMutation) AddInvitationTokenIDs ¶
func (m *GroupMutation) AddInvitationTokenIDs(ids ...uuid.UUID)
AddInvitationTokenIDs adds the "invitation_tokens" edge to the GroupInvitationToken entity by ids.
func (*GroupMutation) AddItemIDs ¶
func (m *GroupMutation) AddItemIDs(ids ...uuid.UUID)
AddItemIDs adds the "items" edge to the Item entity by ids.
func (*GroupMutation) AddLabelIDs ¶
func (m *GroupMutation) AddLabelIDs(ids ...uuid.UUID)
AddLabelIDs adds the "labels" edge to the Label entity by ids.
func (*GroupMutation) AddLocationIDs ¶
func (m *GroupMutation) AddLocationIDs(ids ...uuid.UUID)
AddLocationIDs adds the "locations" edge to the Location entity by ids.
func (*GroupMutation) AddNotifierIDs ¶
func (m *GroupMutation) AddNotifierIDs(ids ...uuid.UUID)
AddNotifierIDs adds the "notifiers" edge to the Notifier entity by ids.
func (*GroupMutation) AddUserIDs ¶
func (m *GroupMutation) AddUserIDs(ids ...uuid.UUID)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*GroupMutation) AddedEdges ¶
func (m *GroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupMutation) AddedField ¶
func (m *GroupMutation) 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 (*GroupMutation) AddedFields ¶
func (m *GroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupMutation) AddedIDs ¶
func (m *GroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupMutation) ClearDocuments ¶
func (m *GroupMutation) ClearDocuments()
ClearDocuments clears the "documents" edge to the Document entity.
func (*GroupMutation) ClearEdge ¶
func (m *GroupMutation) 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 (*GroupMutation) ClearField ¶
func (m *GroupMutation) 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 (*GroupMutation) ClearInvitationTokens ¶
func (m *GroupMutation) ClearInvitationTokens()
ClearInvitationTokens clears the "invitation_tokens" edge to the GroupInvitationToken entity.
func (*GroupMutation) ClearItems ¶
func (m *GroupMutation) ClearItems()
ClearItems clears the "items" edge to the Item entity.
func (*GroupMutation) ClearLabels ¶
func (m *GroupMutation) ClearLabels()
ClearLabels clears the "labels" edge to the Label entity.
func (*GroupMutation) ClearLocations ¶
func (m *GroupMutation) ClearLocations()
ClearLocations clears the "locations" edge to the Location entity.
func (*GroupMutation) ClearNotifiers ¶
func (m *GroupMutation) ClearNotifiers()
ClearNotifiers clears the "notifiers" edge to the Notifier entity.
func (*GroupMutation) ClearUsers ¶
func (m *GroupMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*GroupMutation) ClearedEdges ¶
func (m *GroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupMutation) ClearedFields ¶
func (m *GroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupMutation) Client ¶
func (m GroupMutation) 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 (*GroupMutation) CreatedAt ¶
func (m *GroupMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GroupMutation) Currency ¶
func (m *GroupMutation) Currency() (r string, exists bool)
Currency returns the value of the "currency" field in the mutation.
func (*GroupMutation) DocumentsCleared ¶
func (m *GroupMutation) DocumentsCleared() bool
DocumentsCleared reports if the "documents" edge to the Document entity was cleared.
func (*GroupMutation) DocumentsIDs ¶
func (m *GroupMutation) DocumentsIDs() (ids []uuid.UUID)
DocumentsIDs returns the "documents" edge IDs in the mutation.
func (*GroupMutation) EdgeCleared ¶
func (m *GroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupMutation) Field ¶
func (m *GroupMutation) 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 (*GroupMutation) FieldCleared ¶
func (m *GroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupMutation) Fields ¶
func (m *GroupMutation) 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 (*GroupMutation) ID ¶
func (m *GroupMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*GroupMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*GroupMutation) InvitationTokensCleared ¶
func (m *GroupMutation) InvitationTokensCleared() bool
InvitationTokensCleared reports if the "invitation_tokens" edge to the GroupInvitationToken entity was cleared.
func (*GroupMutation) InvitationTokensIDs ¶
func (m *GroupMutation) InvitationTokensIDs() (ids []uuid.UUID)
InvitationTokensIDs returns the "invitation_tokens" edge IDs in the mutation.
func (*GroupMutation) ItemsCleared ¶
func (m *GroupMutation) ItemsCleared() bool
ItemsCleared reports if the "items" edge to the Item entity was cleared.
func (*GroupMutation) ItemsIDs ¶
func (m *GroupMutation) ItemsIDs() (ids []uuid.UUID)
ItemsIDs returns the "items" edge IDs in the mutation.
func (*GroupMutation) LabelsCleared ¶
func (m *GroupMutation) LabelsCleared() bool
LabelsCleared reports if the "labels" edge to the Label entity was cleared.
func (*GroupMutation) LabelsIDs ¶
func (m *GroupMutation) LabelsIDs() (ids []uuid.UUID)
LabelsIDs returns the "labels" edge IDs in the mutation.
func (*GroupMutation) LocationsCleared ¶
func (m *GroupMutation) LocationsCleared() bool
LocationsCleared reports if the "locations" edge to the Location entity was cleared.
func (*GroupMutation) LocationsIDs ¶
func (m *GroupMutation) LocationsIDs() (ids []uuid.UUID)
LocationsIDs returns the "locations" edge IDs in the mutation.
func (*GroupMutation) Name ¶
func (m *GroupMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GroupMutation) NotifiersCleared ¶
func (m *GroupMutation) NotifiersCleared() bool
NotifiersCleared reports if the "notifiers" edge to the Notifier entity was cleared.
func (*GroupMutation) NotifiersIDs ¶
func (m *GroupMutation) NotifiersIDs() (ids []uuid.UUID)
NotifiersIDs returns the "notifiers" edge IDs in the mutation.
func (*GroupMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Group entity. If the Group 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 (*GroupMutation) OldCurrency ¶
func (m *GroupMutation) OldCurrency(ctx context.Context) (v string, err error)
OldCurrency returns the old "currency" field's value of the Group entity. If the Group 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 (*GroupMutation) 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 (*GroupMutation) OldName ¶
func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Group entity. If the Group 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 (*GroupMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Group entity. If the Group 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 (*GroupMutation) RemoveDocumentIDs ¶
func (m *GroupMutation) RemoveDocumentIDs(ids ...uuid.UUID)
RemoveDocumentIDs removes the "documents" edge to the Document entity by IDs.
func (*GroupMutation) RemoveInvitationTokenIDs ¶
func (m *GroupMutation) RemoveInvitationTokenIDs(ids ...uuid.UUID)
RemoveInvitationTokenIDs removes the "invitation_tokens" edge to the GroupInvitationToken entity by IDs.
func (*GroupMutation) RemoveItemIDs ¶
func (m *GroupMutation) RemoveItemIDs(ids ...uuid.UUID)
RemoveItemIDs removes the "items" edge to the Item entity by IDs.
func (*GroupMutation) RemoveLabelIDs ¶
func (m *GroupMutation) RemoveLabelIDs(ids ...uuid.UUID)
RemoveLabelIDs removes the "labels" edge to the Label entity by IDs.
func (*GroupMutation) RemoveLocationIDs ¶
func (m *GroupMutation) RemoveLocationIDs(ids ...uuid.UUID)
RemoveLocationIDs removes the "locations" edge to the Location entity by IDs.
func (*GroupMutation) RemoveNotifierIDs ¶
func (m *GroupMutation) RemoveNotifierIDs(ids ...uuid.UUID)
RemoveNotifierIDs removes the "notifiers" edge to the Notifier entity by IDs.
func (*GroupMutation) RemoveUserIDs ¶
func (m *GroupMutation) RemoveUserIDs(ids ...uuid.UUID)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*GroupMutation) RemovedDocumentsIDs ¶
func (m *GroupMutation) RemovedDocumentsIDs() (ids []uuid.UUID)
RemovedDocuments returns the removed IDs of the "documents" edge to the Document entity.
func (*GroupMutation) RemovedEdges ¶
func (m *GroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupMutation) RemovedIDs ¶
func (m *GroupMutation) 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 (*GroupMutation) RemovedInvitationTokensIDs ¶
func (m *GroupMutation) RemovedInvitationTokensIDs() (ids []uuid.UUID)
RemovedInvitationTokens returns the removed IDs of the "invitation_tokens" edge to the GroupInvitationToken entity.
func (*GroupMutation) RemovedItemsIDs ¶
func (m *GroupMutation) RemovedItemsIDs() (ids []uuid.UUID)
RemovedItems returns the removed IDs of the "items" edge to the Item entity.
func (*GroupMutation) RemovedLabelsIDs ¶
func (m *GroupMutation) RemovedLabelsIDs() (ids []uuid.UUID)
RemovedLabels returns the removed IDs of the "labels" edge to the Label entity.
func (*GroupMutation) RemovedLocationsIDs ¶
func (m *GroupMutation) RemovedLocationsIDs() (ids []uuid.UUID)
RemovedLocations returns the removed IDs of the "locations" edge to the Location entity.
func (*GroupMutation) RemovedNotifiersIDs ¶
func (m *GroupMutation) RemovedNotifiersIDs() (ids []uuid.UUID)
RemovedNotifiers returns the removed IDs of the "notifiers" edge to the Notifier entity.
func (*GroupMutation) RemovedUsersIDs ¶
func (m *GroupMutation) RemovedUsersIDs() (ids []uuid.UUID)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*GroupMutation) ResetCreatedAt ¶
func (m *GroupMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GroupMutation) ResetCurrency ¶
func (m *GroupMutation) ResetCurrency()
ResetCurrency resets all changes to the "currency" field.
func (*GroupMutation) ResetDocuments ¶
func (m *GroupMutation) ResetDocuments()
ResetDocuments resets all changes to the "documents" edge.
func (*GroupMutation) ResetEdge ¶
func (m *GroupMutation) 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 (*GroupMutation) ResetField ¶
func (m *GroupMutation) 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 (*GroupMutation) ResetInvitationTokens ¶
func (m *GroupMutation) ResetInvitationTokens()
ResetInvitationTokens resets all changes to the "invitation_tokens" edge.
func (*GroupMutation) ResetItems ¶
func (m *GroupMutation) ResetItems()
ResetItems resets all changes to the "items" edge.
func (*GroupMutation) ResetLabels ¶
func (m *GroupMutation) ResetLabels()
ResetLabels resets all changes to the "labels" edge.
func (*GroupMutation) ResetLocations ¶
func (m *GroupMutation) ResetLocations()
ResetLocations resets all changes to the "locations" edge.
func (*GroupMutation) ResetName ¶
func (m *GroupMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GroupMutation) ResetNotifiers ¶
func (m *GroupMutation) ResetNotifiers()
ResetNotifiers resets all changes to the "notifiers" edge.
func (*GroupMutation) ResetUpdatedAt ¶
func (m *GroupMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*GroupMutation) ResetUsers ¶
func (m *GroupMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*GroupMutation) SetCreatedAt ¶
func (m *GroupMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GroupMutation) SetCurrency ¶
func (m *GroupMutation) SetCurrency(s string)
SetCurrency sets the "currency" field.
func (*GroupMutation) SetField ¶
func (m *GroupMutation) 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 (*GroupMutation) SetID ¶
func (m *GroupMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Group entities.
func (*GroupMutation) SetName ¶
func (m *GroupMutation) SetName(s string)
SetName sets the "name" field.
func (*GroupMutation) SetOp ¶
func (m *GroupMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GroupMutation) SetUpdatedAt ¶
func (m *GroupMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (GroupMutation) Tx ¶
func (m GroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupMutation) Type ¶
func (m *GroupMutation) Type() string
Type returns the node type of this mutation (Group).
func (*GroupMutation) UpdatedAt ¶
func (m *GroupMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*GroupMutation) UsersCleared ¶
func (m *GroupMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*GroupMutation) UsersIDs ¶
func (m *GroupMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the "users" edge IDs in the mutation.
func (*GroupMutation) Where ¶
func (m *GroupMutation) Where(ps ...predicate.Group)
Where appends a list predicates to the GroupMutation builder.
func (*GroupMutation) WhereP ¶
func (m *GroupMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroupMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroupQuery ¶
type GroupQuery struct {
// contains filtered or unexported fields
}
GroupQuery is the builder for querying Group entities.
func (*GroupQuery) Aggregate ¶
func (gq *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect
Aggregate returns a GroupSelect configured with the given aggregations.
func (*GroupQuery) All ¶
func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
All executes the query and returns a list of Groups.
func (*GroupQuery) AllX ¶
func (gq *GroupQuery) AllX(ctx context.Context) []*Group
AllX is like All, but panics if an error occurs.
func (*GroupQuery) Clone ¶
func (gq *GroupQuery) Clone() *GroupQuery
Clone returns a duplicate of the GroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupQuery) Count ¶
func (gq *GroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupQuery) CountX ¶
func (gq *GroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupQuery) Exist ¶
func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupQuery) ExistX ¶
func (gq *GroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupQuery) First ¶
func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
First returns the first Group entity from the query. Returns a *NotFoundError when no Group was found.
func (*GroupQuery) FirstID ¶
FirstID returns the first Group ID from the query. Returns a *NotFoundError when no Group ID was found.
func (*GroupQuery) FirstIDX ¶
func (gq *GroupQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupQuery) FirstX ¶
func (gq *GroupQuery) FirstX(ctx context.Context) *Group
FirstX is like First, but panics if an error occurs.
func (*GroupQuery) GroupBy ¶
func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Group.Query(). GroupBy(group.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroupQuery) IDsX ¶
func (gq *GroupQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*GroupQuery) Limit ¶
func (gq *GroupQuery) Limit(limit int) *GroupQuery
Limit the number of records to be returned by this query.
func (*GroupQuery) Offset ¶
func (gq *GroupQuery) Offset(offset int) *GroupQuery
Offset to start from.
func (*GroupQuery) Only ¶
func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
Only returns a single Group entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Group entity is found. Returns a *NotFoundError when no Group entities are found.
func (*GroupQuery) OnlyID ¶
OnlyID is like Only, but returns the only Group ID in the query. Returns a *NotSingularError when more than one Group ID is found. Returns a *NotFoundError when no entities are found.
func (*GroupQuery) OnlyIDX ¶
func (gq *GroupQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupQuery) OnlyX ¶
func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
OnlyX is like Only, but panics if an error occurs.
func (*GroupQuery) Order ¶
func (gq *GroupQuery) Order(o ...group.OrderOption) *GroupQuery
Order specifies how the records should be ordered.
func (*GroupQuery) QueryDocuments ¶
func (gq *GroupQuery) QueryDocuments() *DocumentQuery
QueryDocuments chains the current query on the "documents" edge.
func (*GroupQuery) QueryInvitationTokens ¶
func (gq *GroupQuery) QueryInvitationTokens() *GroupInvitationTokenQuery
QueryInvitationTokens chains the current query on the "invitation_tokens" edge.
func (*GroupQuery) QueryItems ¶
func (gq *GroupQuery) QueryItems() *ItemQuery
QueryItems chains the current query on the "items" edge.
func (*GroupQuery) QueryLabels ¶
func (gq *GroupQuery) QueryLabels() *LabelQuery
QueryLabels chains the current query on the "labels" edge.
func (*GroupQuery) QueryLocations ¶
func (gq *GroupQuery) QueryLocations() *LocationQuery
QueryLocations chains the current query on the "locations" edge.
func (*GroupQuery) QueryNotifiers ¶
func (gq *GroupQuery) QueryNotifiers() *NotifierQuery
QueryNotifiers chains the current query on the "notifiers" edge.
func (*GroupQuery) QueryUsers ¶
func (gq *GroupQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*GroupQuery) Select ¶
func (gq *GroupQuery) Select(fields ...string) *GroupSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Group.Query(). Select(group.FieldCreatedAt). Scan(ctx, &v)
func (*GroupQuery) Unique ¶
func (gq *GroupQuery) Unique(unique bool) *GroupQuery
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 (*GroupQuery) Where ¶
func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
Where adds a new predicate for the GroupQuery builder.
func (*GroupQuery) WithDocuments ¶
func (gq *GroupQuery) WithDocuments(opts ...func(*DocumentQuery)) *GroupQuery
WithDocuments tells the query-builder to eager-load the nodes that are connected to the "documents" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithInvitationTokens ¶
func (gq *GroupQuery) WithInvitationTokens(opts ...func(*GroupInvitationTokenQuery)) *GroupQuery
WithInvitationTokens tells the query-builder to eager-load the nodes that are connected to the "invitation_tokens" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithItems ¶
func (gq *GroupQuery) WithItems(opts ...func(*ItemQuery)) *GroupQuery
WithItems tells the query-builder to eager-load the nodes that are connected to the "items" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithLabels ¶
func (gq *GroupQuery) WithLabels(opts ...func(*LabelQuery)) *GroupQuery
WithLabels tells the query-builder to eager-load the nodes that are connected to the "labels" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithLocations ¶
func (gq *GroupQuery) WithLocations(opts ...func(*LocationQuery)) *GroupQuery
WithLocations tells the query-builder to eager-load the nodes that are connected to the "locations" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithNotifiers ¶
func (gq *GroupQuery) WithNotifiers(opts ...func(*NotifierQuery)) *GroupQuery
WithNotifiers tells the query-builder to eager-load the nodes that are connected to the "notifiers" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithUsers ¶
func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type GroupSelect ¶
type GroupSelect struct { *GroupQuery // contains filtered or unexported fields }
GroupSelect is the builder for selecting fields of Group entities.
func (*GroupSelect) Aggregate ¶
func (gs *GroupSelect) Aggregate(fns ...AggregateFunc) *GroupSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroupSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Scan ¶
func (gs *GroupSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupUpdate ¶
type GroupUpdate struct {
// contains filtered or unexported fields
}
GroupUpdate is the builder for updating Group entities.
func (*GroupUpdate) AddDocumentIDs ¶
func (gu *GroupUpdate) AddDocumentIDs(ids ...uuid.UUID) *GroupUpdate
AddDocumentIDs adds the "documents" edge to the Document entity by IDs.
func (*GroupUpdate) AddDocuments ¶
func (gu *GroupUpdate) AddDocuments(d ...*Document) *GroupUpdate
AddDocuments adds the "documents" edges to the Document entity.
func (*GroupUpdate) AddInvitationTokenIDs ¶
func (gu *GroupUpdate) AddInvitationTokenIDs(ids ...uuid.UUID) *GroupUpdate
AddInvitationTokenIDs adds the "invitation_tokens" edge to the GroupInvitationToken entity by IDs.
func (*GroupUpdate) AddInvitationTokens ¶
func (gu *GroupUpdate) AddInvitationTokens(g ...*GroupInvitationToken) *GroupUpdate
AddInvitationTokens adds the "invitation_tokens" edges to the GroupInvitationToken entity.
func (*GroupUpdate) AddItemIDs ¶
func (gu *GroupUpdate) AddItemIDs(ids ...uuid.UUID) *GroupUpdate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*GroupUpdate) AddItems ¶
func (gu *GroupUpdate) AddItems(i ...*Item) *GroupUpdate
AddItems adds the "items" edges to the Item entity.
func (*GroupUpdate) AddLabelIDs ¶
func (gu *GroupUpdate) AddLabelIDs(ids ...uuid.UUID) *GroupUpdate
AddLabelIDs adds the "labels" edge to the Label entity by IDs.
func (*GroupUpdate) AddLabels ¶
func (gu *GroupUpdate) AddLabels(l ...*Label) *GroupUpdate
AddLabels adds the "labels" edges to the Label entity.
func (*GroupUpdate) AddLocationIDs ¶
func (gu *GroupUpdate) AddLocationIDs(ids ...uuid.UUID) *GroupUpdate
AddLocationIDs adds the "locations" edge to the Location entity by IDs.
func (*GroupUpdate) AddLocations ¶
func (gu *GroupUpdate) AddLocations(l ...*Location) *GroupUpdate
AddLocations adds the "locations" edges to the Location entity.
func (*GroupUpdate) AddNotifierIDs ¶
func (gu *GroupUpdate) AddNotifierIDs(ids ...uuid.UUID) *GroupUpdate
AddNotifierIDs adds the "notifiers" edge to the Notifier entity by IDs.
func (*GroupUpdate) AddNotifiers ¶
func (gu *GroupUpdate) AddNotifiers(n ...*Notifier) *GroupUpdate
AddNotifiers adds the "notifiers" edges to the Notifier entity.
func (*GroupUpdate) AddUserIDs ¶
func (gu *GroupUpdate) AddUserIDs(ids ...uuid.UUID) *GroupUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdate) AddUsers ¶
func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdate) ClearDocuments ¶
func (gu *GroupUpdate) ClearDocuments() *GroupUpdate
ClearDocuments clears all "documents" edges to the Document entity.
func (*GroupUpdate) ClearInvitationTokens ¶
func (gu *GroupUpdate) ClearInvitationTokens() *GroupUpdate
ClearInvitationTokens clears all "invitation_tokens" edges to the GroupInvitationToken entity.
func (*GroupUpdate) ClearItems ¶
func (gu *GroupUpdate) ClearItems() *GroupUpdate
ClearItems clears all "items" edges to the Item entity.
func (*GroupUpdate) ClearLabels ¶
func (gu *GroupUpdate) ClearLabels() *GroupUpdate
ClearLabels clears all "labels" edges to the Label entity.
func (*GroupUpdate) ClearLocations ¶
func (gu *GroupUpdate) ClearLocations() *GroupUpdate
ClearLocations clears all "locations" edges to the Location entity.
func (*GroupUpdate) ClearNotifiers ¶
func (gu *GroupUpdate) ClearNotifiers() *GroupUpdate
ClearNotifiers clears all "notifiers" edges to the Notifier entity.
func (*GroupUpdate) ClearUsers ¶
func (gu *GroupUpdate) ClearUsers() *GroupUpdate
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdate) Exec ¶
func (gu *GroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpdate) ExecX ¶
func (gu *GroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdate) Mutation ¶
func (gu *GroupUpdate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdate) RemoveDocumentIDs ¶
func (gu *GroupUpdate) RemoveDocumentIDs(ids ...uuid.UUID) *GroupUpdate
RemoveDocumentIDs removes the "documents" edge to Document entities by IDs.
func (*GroupUpdate) RemoveDocuments ¶
func (gu *GroupUpdate) RemoveDocuments(d ...*Document) *GroupUpdate
RemoveDocuments removes "documents" edges to Document entities.
func (*GroupUpdate) RemoveInvitationTokenIDs ¶
func (gu *GroupUpdate) RemoveInvitationTokenIDs(ids ...uuid.UUID) *GroupUpdate
RemoveInvitationTokenIDs removes the "invitation_tokens" edge to GroupInvitationToken entities by IDs.
func (*GroupUpdate) RemoveInvitationTokens ¶
func (gu *GroupUpdate) RemoveInvitationTokens(g ...*GroupInvitationToken) *GroupUpdate
RemoveInvitationTokens removes "invitation_tokens" edges to GroupInvitationToken entities.
func (*GroupUpdate) RemoveItemIDs ¶
func (gu *GroupUpdate) RemoveItemIDs(ids ...uuid.UUID) *GroupUpdate
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*GroupUpdate) RemoveItems ¶
func (gu *GroupUpdate) RemoveItems(i ...*Item) *GroupUpdate
RemoveItems removes "items" edges to Item entities.
func (*GroupUpdate) RemoveLabelIDs ¶
func (gu *GroupUpdate) RemoveLabelIDs(ids ...uuid.UUID) *GroupUpdate
RemoveLabelIDs removes the "labels" edge to Label entities by IDs.
func (*GroupUpdate) RemoveLabels ¶
func (gu *GroupUpdate) RemoveLabels(l ...*Label) *GroupUpdate
RemoveLabels removes "labels" edges to Label entities.
func (*GroupUpdate) RemoveLocationIDs ¶
func (gu *GroupUpdate) RemoveLocationIDs(ids ...uuid.UUID) *GroupUpdate
RemoveLocationIDs removes the "locations" edge to Location entities by IDs.
func (*GroupUpdate) RemoveLocations ¶
func (gu *GroupUpdate) RemoveLocations(l ...*Location) *GroupUpdate
RemoveLocations removes "locations" edges to Location entities.
func (*GroupUpdate) RemoveNotifierIDs ¶
func (gu *GroupUpdate) RemoveNotifierIDs(ids ...uuid.UUID) *GroupUpdate
RemoveNotifierIDs removes the "notifiers" edge to Notifier entities by IDs.
func (*GroupUpdate) RemoveNotifiers ¶
func (gu *GroupUpdate) RemoveNotifiers(n ...*Notifier) *GroupUpdate
RemoveNotifiers removes "notifiers" edges to Notifier entities.
func (*GroupUpdate) RemoveUserIDs ¶
func (gu *GroupUpdate) RemoveUserIDs(ids ...uuid.UUID) *GroupUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdate) RemoveUsers ¶
func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdate) Save ¶
func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupUpdate) SaveX ¶
func (gu *GroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdate) SetCurrency ¶
func (gu *GroupUpdate) SetCurrency(s string) *GroupUpdate
SetCurrency sets the "currency" field.
func (*GroupUpdate) SetName ¶
func (gu *GroupUpdate) SetName(s string) *GroupUpdate
SetName sets the "name" field.
func (*GroupUpdate) SetNillableCurrency ¶
func (gu *GroupUpdate) SetNillableCurrency(s *string) *GroupUpdate
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*GroupUpdate) SetNillableName ¶
func (gu *GroupUpdate) SetNillableName(s *string) *GroupUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*GroupUpdate) SetUpdatedAt ¶
func (gu *GroupUpdate) SetUpdatedAt(t time.Time) *GroupUpdate
SetUpdatedAt sets the "updated_at" field.
func (*GroupUpdate) Where ¶
func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
Where appends a list predicates to the GroupUpdate builder.
type GroupUpdateOne ¶
type GroupUpdateOne struct {
// contains filtered or unexported fields
}
GroupUpdateOne is the builder for updating a single Group entity.
func (*GroupUpdateOne) AddDocumentIDs ¶
func (guo *GroupUpdateOne) AddDocumentIDs(ids ...uuid.UUID) *GroupUpdateOne
AddDocumentIDs adds the "documents" edge to the Document entity by IDs.
func (*GroupUpdateOne) AddDocuments ¶
func (guo *GroupUpdateOne) AddDocuments(d ...*Document) *GroupUpdateOne
AddDocuments adds the "documents" edges to the Document entity.
func (*GroupUpdateOne) AddInvitationTokenIDs ¶
func (guo *GroupUpdateOne) AddInvitationTokenIDs(ids ...uuid.UUID) *GroupUpdateOne
AddInvitationTokenIDs adds the "invitation_tokens" edge to the GroupInvitationToken entity by IDs.
func (*GroupUpdateOne) AddInvitationTokens ¶
func (guo *GroupUpdateOne) AddInvitationTokens(g ...*GroupInvitationToken) *GroupUpdateOne
AddInvitationTokens adds the "invitation_tokens" edges to the GroupInvitationToken entity.
func (*GroupUpdateOne) AddItemIDs ¶
func (guo *GroupUpdateOne) AddItemIDs(ids ...uuid.UUID) *GroupUpdateOne
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*GroupUpdateOne) AddItems ¶
func (guo *GroupUpdateOne) AddItems(i ...*Item) *GroupUpdateOne
AddItems adds the "items" edges to the Item entity.
func (*GroupUpdateOne) AddLabelIDs ¶
func (guo *GroupUpdateOne) AddLabelIDs(ids ...uuid.UUID) *GroupUpdateOne
AddLabelIDs adds the "labels" edge to the Label entity by IDs.
func (*GroupUpdateOne) AddLabels ¶
func (guo *GroupUpdateOne) AddLabels(l ...*Label) *GroupUpdateOne
AddLabels adds the "labels" edges to the Label entity.
func (*GroupUpdateOne) AddLocationIDs ¶
func (guo *GroupUpdateOne) AddLocationIDs(ids ...uuid.UUID) *GroupUpdateOne
AddLocationIDs adds the "locations" edge to the Location entity by IDs.
func (*GroupUpdateOne) AddLocations ¶
func (guo *GroupUpdateOne) AddLocations(l ...*Location) *GroupUpdateOne
AddLocations adds the "locations" edges to the Location entity.
func (*GroupUpdateOne) AddNotifierIDs ¶
func (guo *GroupUpdateOne) AddNotifierIDs(ids ...uuid.UUID) *GroupUpdateOne
AddNotifierIDs adds the "notifiers" edge to the Notifier entity by IDs.
func (*GroupUpdateOne) AddNotifiers ¶
func (guo *GroupUpdateOne) AddNotifiers(n ...*Notifier) *GroupUpdateOne
AddNotifiers adds the "notifiers" edges to the Notifier entity.
func (*GroupUpdateOne) AddUserIDs ¶
func (guo *GroupUpdateOne) AddUserIDs(ids ...uuid.UUID) *GroupUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdateOne) AddUsers ¶
func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdateOne) ClearDocuments ¶
func (guo *GroupUpdateOne) ClearDocuments() *GroupUpdateOne
ClearDocuments clears all "documents" edges to the Document entity.
func (*GroupUpdateOne) ClearInvitationTokens ¶
func (guo *GroupUpdateOne) ClearInvitationTokens() *GroupUpdateOne
ClearInvitationTokens clears all "invitation_tokens" edges to the GroupInvitationToken entity.
func (*GroupUpdateOne) ClearItems ¶
func (guo *GroupUpdateOne) ClearItems() *GroupUpdateOne
ClearItems clears all "items" edges to the Item entity.
func (*GroupUpdateOne) ClearLabels ¶
func (guo *GroupUpdateOne) ClearLabels() *GroupUpdateOne
ClearLabels clears all "labels" edges to the Label entity.
func (*GroupUpdateOne) ClearLocations ¶
func (guo *GroupUpdateOne) ClearLocations() *GroupUpdateOne
ClearLocations clears all "locations" edges to the Location entity.
func (*GroupUpdateOne) ClearNotifiers ¶
func (guo *GroupUpdateOne) ClearNotifiers() *GroupUpdateOne
ClearNotifiers clears all "notifiers" edges to the Notifier entity.
func (*GroupUpdateOne) ClearUsers ¶
func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdateOne) Exec ¶
func (guo *GroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupUpdateOne) ExecX ¶
func (guo *GroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdateOne) Mutation ¶
func (guo *GroupUpdateOne) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdateOne) RemoveDocumentIDs ¶
func (guo *GroupUpdateOne) RemoveDocumentIDs(ids ...uuid.UUID) *GroupUpdateOne
RemoveDocumentIDs removes the "documents" edge to Document entities by IDs.
func (*GroupUpdateOne) RemoveDocuments ¶
func (guo *GroupUpdateOne) RemoveDocuments(d ...*Document) *GroupUpdateOne
RemoveDocuments removes "documents" edges to Document entities.
func (*GroupUpdateOne) RemoveInvitationTokenIDs ¶
func (guo *GroupUpdateOne) RemoveInvitationTokenIDs(ids ...uuid.UUID) *GroupUpdateOne
RemoveInvitationTokenIDs removes the "invitation_tokens" edge to GroupInvitationToken entities by IDs.
func (*GroupUpdateOne) RemoveInvitationTokens ¶
func (guo *GroupUpdateOne) RemoveInvitationTokens(g ...*GroupInvitationToken) *GroupUpdateOne
RemoveInvitationTokens removes "invitation_tokens" edges to GroupInvitationToken entities.
func (*GroupUpdateOne) RemoveItemIDs ¶
func (guo *GroupUpdateOne) RemoveItemIDs(ids ...uuid.UUID) *GroupUpdateOne
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*GroupUpdateOne) RemoveItems ¶
func (guo *GroupUpdateOne) RemoveItems(i ...*Item) *GroupUpdateOne
RemoveItems removes "items" edges to Item entities.
func (*GroupUpdateOne) RemoveLabelIDs ¶
func (guo *GroupUpdateOne) RemoveLabelIDs(ids ...uuid.UUID) *GroupUpdateOne
RemoveLabelIDs removes the "labels" edge to Label entities by IDs.
func (*GroupUpdateOne) RemoveLabels ¶
func (guo *GroupUpdateOne) RemoveLabels(l ...*Label) *GroupUpdateOne
RemoveLabels removes "labels" edges to Label entities.
func (*GroupUpdateOne) RemoveLocationIDs ¶
func (guo *GroupUpdateOne) RemoveLocationIDs(ids ...uuid.UUID) *GroupUpdateOne
RemoveLocationIDs removes the "locations" edge to Location entities by IDs.
func (*GroupUpdateOne) RemoveLocations ¶
func (guo *GroupUpdateOne) RemoveLocations(l ...*Location) *GroupUpdateOne
RemoveLocations removes "locations" edges to Location entities.
func (*GroupUpdateOne) RemoveNotifierIDs ¶
func (guo *GroupUpdateOne) RemoveNotifierIDs(ids ...uuid.UUID) *GroupUpdateOne
RemoveNotifierIDs removes the "notifiers" edge to Notifier entities by IDs.
func (*GroupUpdateOne) RemoveNotifiers ¶
func (guo *GroupUpdateOne) RemoveNotifiers(n ...*Notifier) *GroupUpdateOne
RemoveNotifiers removes "notifiers" edges to Notifier entities.
func (*GroupUpdateOne) RemoveUserIDs ¶
func (guo *GroupUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *GroupUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdateOne) RemoveUsers ¶
func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdateOne) Save ¶
func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
Save executes the query and returns the updated Group entity.
func (*GroupUpdateOne) SaveX ¶
func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdateOne) Select ¶
func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupUpdateOne) SetCurrency ¶
func (guo *GroupUpdateOne) SetCurrency(s string) *GroupUpdateOne
SetCurrency sets the "currency" field.
func (*GroupUpdateOne) SetName ¶
func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
SetName sets the "name" field.
func (*GroupUpdateOne) SetNillableCurrency ¶
func (guo *GroupUpdateOne) SetNillableCurrency(s *string) *GroupUpdateOne
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*GroupUpdateOne) SetNillableName ¶
func (guo *GroupUpdateOne) SetNillableName(s *string) *GroupUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*GroupUpdateOne) SetUpdatedAt ¶
func (guo *GroupUpdateOne) SetUpdatedAt(t time.Time) *GroupUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*GroupUpdateOne) Where ¶
func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne
Where appends a list predicates to the GroupUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type Item ¶
type Item struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // ImportRef holds the value of the "import_ref" field. ImportRef string `json:"import_ref,omitempty"` // Notes holds the value of the "notes" field. Notes string `json:"notes,omitempty"` // Quantity holds the value of the "quantity" field. Quantity int `json:"quantity,omitempty"` // Insured holds the value of the "insured" field. Insured bool `json:"insured,omitempty"` // Archived holds the value of the "archived" field. Archived bool `json:"archived,omitempty"` // AssetID holds the value of the "asset_id" field. AssetID int `json:"asset_id,omitempty"` // SerialNumber holds the value of the "serial_number" field. SerialNumber string `json:"serial_number,omitempty"` // ModelNumber holds the value of the "model_number" field. ModelNumber string `json:"model_number,omitempty"` // Manufacturer holds the value of the "manufacturer" field. Manufacturer string `json:"manufacturer,omitempty"` // LifetimeWarranty holds the value of the "lifetime_warranty" field. LifetimeWarranty bool `json:"lifetime_warranty,omitempty"` // WarrantyExpires holds the value of the "warranty_expires" field. WarrantyExpires time.Time `json:"warranty_expires,omitempty"` // WarrantyDetails holds the value of the "warranty_details" field. WarrantyDetails string `json:"warranty_details,omitempty"` // PurchaseTime holds the value of the "purchase_time" field. PurchaseTime time.Time `json:"purchase_time,omitempty"` // PurchaseFrom holds the value of the "purchase_from" field. PurchaseFrom string `json:"purchase_from,omitempty"` // PurchasePrice holds the value of the "purchase_price" field. PurchasePrice float64 `json:"purchase_price,omitempty"` // SoldTime holds the value of the "sold_time" field. SoldTime time.Time `json:"sold_time,omitempty"` // SoldTo holds the value of the "sold_to" field. SoldTo string `json:"sold_to,omitempty"` // SoldPrice holds the value of the "sold_price" field. SoldPrice float64 `json:"sold_price,omitempty"` // SoldNotes holds the value of the "sold_notes" field. SoldNotes string `json:"sold_notes,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ItemQuery when eager-loading is set. Edges ItemEdges `json:"edges"` // contains filtered or unexported fields }
Item is the model entity for the Item schema.
func (*Item) QueryAttachments ¶
func (i *Item) QueryAttachments() *AttachmentQuery
QueryAttachments queries the "attachments" edge of the Item entity.
func (*Item) QueryChildren ¶
QueryChildren queries the "children" edge of the Item entity.
func (*Item) QueryFields ¶
func (i *Item) QueryFields() *ItemFieldQuery
QueryFields queries the "fields" edge of the Item entity.
func (*Item) QueryGroup ¶
func (i *Item) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the Item entity.
func (*Item) QueryLabel ¶
func (i *Item) QueryLabel() *LabelQuery
QueryLabel queries the "label" edge of the Item entity.
func (*Item) QueryLocation ¶
func (i *Item) QueryLocation() *LocationQuery
QueryLocation queries the "location" edge of the Item entity.
func (*Item) QueryMaintenanceEntries ¶
func (i *Item) QueryMaintenanceEntries() *MaintenanceEntryQuery
QueryMaintenanceEntries queries the "maintenance_entries" edge of the Item entity.
func (*Item) QueryParent ¶
QueryParent queries the "parent" edge of the Item entity.
func (*Item) Unwrap ¶
Unwrap unwraps the Item 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 (*Item) Update ¶
func (i *Item) Update() *ItemUpdateOne
Update returns a builder for updating this Item. Note that you need to call Item.Unwrap() before calling this method if this Item was returned from a transaction, and the transaction was committed or rolled back.
type ItemClient ¶
type ItemClient struct {
// contains filtered or unexported fields
}
ItemClient is a client for the Item schema.
func NewItemClient ¶
func NewItemClient(c config) *ItemClient
NewItemClient returns a client for the Item from the given config.
func (*ItemClient) Create ¶
func (c *ItemClient) Create() *ItemCreate
Create returns a builder for creating a Item entity.
func (*ItemClient) CreateBulk ¶
func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk
CreateBulk returns a builder for creating a bulk of Item entities.
func (*ItemClient) Delete ¶
func (c *ItemClient) Delete() *ItemDelete
Delete returns a delete builder for Item.
func (*ItemClient) DeleteOne ¶
func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ItemClient) DeleteOneID ¶
func (c *ItemClient) DeleteOneID(id uuid.UUID) *ItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ItemClient) Intercept ¶
func (c *ItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `item.Intercept(f(g(h())))`.
func (*ItemClient) Interceptors ¶
func (c *ItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ItemClient) MapCreateBulk ¶
func (c *ItemClient) MapCreateBulk(slice any, setFunc func(*ItemCreate, int)) *ItemCreateBulk
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 (*ItemClient) Query ¶
func (c *ItemClient) Query() *ItemQuery
Query returns a query builder for Item.
func (*ItemClient) QueryAttachments ¶
func (c *ItemClient) QueryAttachments(i *Item) *AttachmentQuery
QueryAttachments queries the attachments edge of a Item.
func (*ItemClient) QueryChildren ¶
func (c *ItemClient) QueryChildren(i *Item) *ItemQuery
QueryChildren queries the children edge of a Item.
func (*ItemClient) QueryFields ¶
func (c *ItemClient) QueryFields(i *Item) *ItemFieldQuery
QueryFields queries the fields edge of a Item.
func (*ItemClient) QueryGroup ¶
func (c *ItemClient) QueryGroup(i *Item) *GroupQuery
QueryGroup queries the group edge of a Item.
func (*ItemClient) QueryLabel ¶
func (c *ItemClient) QueryLabel(i *Item) *LabelQuery
QueryLabel queries the label edge of a Item.
func (*ItemClient) QueryLocation ¶
func (c *ItemClient) QueryLocation(i *Item) *LocationQuery
QueryLocation queries the location edge of a Item.
func (*ItemClient) QueryMaintenanceEntries ¶
func (c *ItemClient) QueryMaintenanceEntries(i *Item) *MaintenanceEntryQuery
QueryMaintenanceEntries queries the maintenance_entries edge of a Item.
func (*ItemClient) QueryParent ¶
func (c *ItemClient) QueryParent(i *Item) *ItemQuery
QueryParent queries the parent edge of a Item.
func (*ItemClient) Update ¶
func (c *ItemClient) Update() *ItemUpdate
Update returns an update builder for Item.
func (*ItemClient) UpdateOne ¶
func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ItemClient) UpdateOneID ¶
func (c *ItemClient) UpdateOneID(id uuid.UUID) *ItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ItemClient) Use ¶
func (c *ItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `item.Hooks(f(g(h())))`.
type ItemCreate ¶
type ItemCreate struct {
// contains filtered or unexported fields
}
ItemCreate is the builder for creating a Item entity.
func (*ItemCreate) AddAttachmentIDs ¶
func (ic *ItemCreate) AddAttachmentIDs(ids ...uuid.UUID) *ItemCreate
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.
func (*ItemCreate) AddAttachments ¶
func (ic *ItemCreate) AddAttachments(a ...*Attachment) *ItemCreate
AddAttachments adds the "attachments" edges to the Attachment entity.
func (*ItemCreate) AddChildIDs ¶
func (ic *ItemCreate) AddChildIDs(ids ...uuid.UUID) *ItemCreate
AddChildIDs adds the "children" edge to the Item entity by IDs.
func (*ItemCreate) AddChildren ¶
func (ic *ItemCreate) AddChildren(i ...*Item) *ItemCreate
AddChildren adds the "children" edges to the Item entity.
func (*ItemCreate) AddFieldIDs ¶
func (ic *ItemCreate) AddFieldIDs(ids ...uuid.UUID) *ItemCreate
AddFieldIDs adds the "fields" edge to the ItemField entity by IDs.
func (*ItemCreate) AddFields ¶
func (ic *ItemCreate) AddFields(i ...*ItemField) *ItemCreate
AddFields adds the "fields" edges to the ItemField entity.
func (*ItemCreate) AddLabel ¶
func (ic *ItemCreate) AddLabel(l ...*Label) *ItemCreate
AddLabel adds the "label" edges to the Label entity.
func (*ItemCreate) AddLabelIDs ¶
func (ic *ItemCreate) AddLabelIDs(ids ...uuid.UUID) *ItemCreate
AddLabelIDs adds the "label" edge to the Label entity by IDs.
func (*ItemCreate) AddMaintenanceEntries ¶
func (ic *ItemCreate) AddMaintenanceEntries(m ...*MaintenanceEntry) *ItemCreate
AddMaintenanceEntries adds the "maintenance_entries" edges to the MaintenanceEntry entity.
func (*ItemCreate) AddMaintenanceEntryIDs ¶
func (ic *ItemCreate) AddMaintenanceEntryIDs(ids ...uuid.UUID) *ItemCreate
AddMaintenanceEntryIDs adds the "maintenance_entries" edge to the MaintenanceEntry entity by IDs.
func (*ItemCreate) Exec ¶
func (ic *ItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemCreate) ExecX ¶
func (ic *ItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemCreate) Mutation ¶
func (ic *ItemCreate) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemCreate) Save ¶
func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)
Save creates the Item in the database.
func (*ItemCreate) SaveX ¶
func (ic *ItemCreate) SaveX(ctx context.Context) *Item
SaveX calls Save and panics if Save returns an error.
func (*ItemCreate) SetArchived ¶
func (ic *ItemCreate) SetArchived(b bool) *ItemCreate
SetArchived sets the "archived" field.
func (*ItemCreate) SetAssetID ¶
func (ic *ItemCreate) SetAssetID(i int) *ItemCreate
SetAssetID sets the "asset_id" field.
func (*ItemCreate) SetCreatedAt ¶
func (ic *ItemCreate) SetCreatedAt(t time.Time) *ItemCreate
SetCreatedAt sets the "created_at" field.
func (*ItemCreate) SetDescription ¶
func (ic *ItemCreate) SetDescription(s string) *ItemCreate
SetDescription sets the "description" field.
func (*ItemCreate) SetGroup ¶
func (ic *ItemCreate) SetGroup(g *Group) *ItemCreate
SetGroup sets the "group" edge to the Group entity.
func (*ItemCreate) SetGroupID ¶
func (ic *ItemCreate) SetGroupID(id uuid.UUID) *ItemCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*ItemCreate) SetID ¶
func (ic *ItemCreate) SetID(u uuid.UUID) *ItemCreate
SetID sets the "id" field.
func (*ItemCreate) SetImportRef ¶
func (ic *ItemCreate) SetImportRef(s string) *ItemCreate
SetImportRef sets the "import_ref" field.
func (*ItemCreate) SetInsured ¶
func (ic *ItemCreate) SetInsured(b bool) *ItemCreate
SetInsured sets the "insured" field.
func (*ItemCreate) SetLifetimeWarranty ¶
func (ic *ItemCreate) SetLifetimeWarranty(b bool) *ItemCreate
SetLifetimeWarranty sets the "lifetime_warranty" field.
func (*ItemCreate) SetLocation ¶
func (ic *ItemCreate) SetLocation(l *Location) *ItemCreate
SetLocation sets the "location" edge to the Location entity.
func (*ItemCreate) SetLocationID ¶
func (ic *ItemCreate) SetLocationID(id uuid.UUID) *ItemCreate
SetLocationID sets the "location" edge to the Location entity by ID.
func (*ItemCreate) SetManufacturer ¶
func (ic *ItemCreate) SetManufacturer(s string) *ItemCreate
SetManufacturer sets the "manufacturer" field.
func (*ItemCreate) SetModelNumber ¶
func (ic *ItemCreate) SetModelNumber(s string) *ItemCreate
SetModelNumber sets the "model_number" field.
func (*ItemCreate) SetName ¶
func (ic *ItemCreate) SetName(s string) *ItemCreate
SetName sets the "name" field.
func (*ItemCreate) SetNillableArchived ¶
func (ic *ItemCreate) SetNillableArchived(b *bool) *ItemCreate
SetNillableArchived sets the "archived" field if the given value is not nil.
func (*ItemCreate) SetNillableAssetID ¶
func (ic *ItemCreate) SetNillableAssetID(i *int) *ItemCreate
SetNillableAssetID sets the "asset_id" field if the given value is not nil.
func (*ItemCreate) SetNillableCreatedAt ¶
func (ic *ItemCreate) SetNillableCreatedAt(t *time.Time) *ItemCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ItemCreate) SetNillableDescription ¶
func (ic *ItemCreate) SetNillableDescription(s *string) *ItemCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ItemCreate) SetNillableID ¶
func (ic *ItemCreate) SetNillableID(u *uuid.UUID) *ItemCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ItemCreate) SetNillableImportRef ¶
func (ic *ItemCreate) SetNillableImportRef(s *string) *ItemCreate
SetNillableImportRef sets the "import_ref" field if the given value is not nil.
func (*ItemCreate) SetNillableInsured ¶
func (ic *ItemCreate) SetNillableInsured(b *bool) *ItemCreate
SetNillableInsured sets the "insured" field if the given value is not nil.
func (*ItemCreate) SetNillableLifetimeWarranty ¶
func (ic *ItemCreate) SetNillableLifetimeWarranty(b *bool) *ItemCreate
SetNillableLifetimeWarranty sets the "lifetime_warranty" field if the given value is not nil.
func (*ItemCreate) SetNillableLocationID ¶
func (ic *ItemCreate) SetNillableLocationID(id *uuid.UUID) *ItemCreate
SetNillableLocationID sets the "location" edge to the Location entity by ID if the given value is not nil.
func (*ItemCreate) SetNillableManufacturer ¶
func (ic *ItemCreate) SetNillableManufacturer(s *string) *ItemCreate
SetNillableManufacturer sets the "manufacturer" field if the given value is not nil.
func (*ItemCreate) SetNillableModelNumber ¶
func (ic *ItemCreate) SetNillableModelNumber(s *string) *ItemCreate
SetNillableModelNumber sets the "model_number" field if the given value is not nil.
func (*ItemCreate) SetNillableNotes ¶
func (ic *ItemCreate) SetNillableNotes(s *string) *ItemCreate
SetNillableNotes sets the "notes" field if the given value is not nil.
func (*ItemCreate) SetNillableParentID ¶
func (ic *ItemCreate) SetNillableParentID(id *uuid.UUID) *ItemCreate
SetNillableParentID sets the "parent" edge to the Item entity by ID if the given value is not nil.
func (*ItemCreate) SetNillablePurchaseFrom ¶
func (ic *ItemCreate) SetNillablePurchaseFrom(s *string) *ItemCreate
SetNillablePurchaseFrom sets the "purchase_from" field if the given value is not nil.
func (*ItemCreate) SetNillablePurchasePrice ¶
func (ic *ItemCreate) SetNillablePurchasePrice(f *float64) *ItemCreate
SetNillablePurchasePrice sets the "purchase_price" field if the given value is not nil.
func (*ItemCreate) SetNillablePurchaseTime ¶
func (ic *ItemCreate) SetNillablePurchaseTime(t *time.Time) *ItemCreate
SetNillablePurchaseTime sets the "purchase_time" field if the given value is not nil.
func (*ItemCreate) SetNillableQuantity ¶
func (ic *ItemCreate) SetNillableQuantity(i *int) *ItemCreate
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*ItemCreate) SetNillableSerialNumber ¶
func (ic *ItemCreate) SetNillableSerialNumber(s *string) *ItemCreate
SetNillableSerialNumber sets the "serial_number" field if the given value is not nil.
func (*ItemCreate) SetNillableSoldNotes ¶
func (ic *ItemCreate) SetNillableSoldNotes(s *string) *ItemCreate
SetNillableSoldNotes sets the "sold_notes" field if the given value is not nil.
func (*ItemCreate) SetNillableSoldPrice ¶
func (ic *ItemCreate) SetNillableSoldPrice(f *float64) *ItemCreate
SetNillableSoldPrice sets the "sold_price" field if the given value is not nil.
func (*ItemCreate) SetNillableSoldTime ¶
func (ic *ItemCreate) SetNillableSoldTime(t *time.Time) *ItemCreate
SetNillableSoldTime sets the "sold_time" field if the given value is not nil.
func (*ItemCreate) SetNillableSoldTo ¶
func (ic *ItemCreate) SetNillableSoldTo(s *string) *ItemCreate
SetNillableSoldTo sets the "sold_to" field if the given value is not nil.
func (*ItemCreate) SetNillableUpdatedAt ¶
func (ic *ItemCreate) SetNillableUpdatedAt(t *time.Time) *ItemCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ItemCreate) SetNillableWarrantyDetails ¶
func (ic *ItemCreate) SetNillableWarrantyDetails(s *string) *ItemCreate
SetNillableWarrantyDetails sets the "warranty_details" field if the given value is not nil.
func (*ItemCreate) SetNillableWarrantyExpires ¶
func (ic *ItemCreate) SetNillableWarrantyExpires(t *time.Time) *ItemCreate
SetNillableWarrantyExpires sets the "warranty_expires" field if the given value is not nil.
func (*ItemCreate) SetNotes ¶
func (ic *ItemCreate) SetNotes(s string) *ItemCreate
SetNotes sets the "notes" field.
func (*ItemCreate) SetParent ¶
func (ic *ItemCreate) SetParent(i *Item) *ItemCreate
SetParent sets the "parent" edge to the Item entity.
func (*ItemCreate) SetParentID ¶
func (ic *ItemCreate) SetParentID(id uuid.UUID) *ItemCreate
SetParentID sets the "parent" edge to the Item entity by ID.
func (*ItemCreate) SetPurchaseFrom ¶
func (ic *ItemCreate) SetPurchaseFrom(s string) *ItemCreate
SetPurchaseFrom sets the "purchase_from" field.
func (*ItemCreate) SetPurchasePrice ¶
func (ic *ItemCreate) SetPurchasePrice(f float64) *ItemCreate
SetPurchasePrice sets the "purchase_price" field.
func (*ItemCreate) SetPurchaseTime ¶
func (ic *ItemCreate) SetPurchaseTime(t time.Time) *ItemCreate
SetPurchaseTime sets the "purchase_time" field.
func (*ItemCreate) SetQuantity ¶
func (ic *ItemCreate) SetQuantity(i int) *ItemCreate
SetQuantity sets the "quantity" field.
func (*ItemCreate) SetSerialNumber ¶
func (ic *ItemCreate) SetSerialNumber(s string) *ItemCreate
SetSerialNumber sets the "serial_number" field.
func (*ItemCreate) SetSoldNotes ¶
func (ic *ItemCreate) SetSoldNotes(s string) *ItemCreate
SetSoldNotes sets the "sold_notes" field.
func (*ItemCreate) SetSoldPrice ¶
func (ic *ItemCreate) SetSoldPrice(f float64) *ItemCreate
SetSoldPrice sets the "sold_price" field.
func (*ItemCreate) SetSoldTime ¶
func (ic *ItemCreate) SetSoldTime(t time.Time) *ItemCreate
SetSoldTime sets the "sold_time" field.
func (*ItemCreate) SetSoldTo ¶
func (ic *ItemCreate) SetSoldTo(s string) *ItemCreate
SetSoldTo sets the "sold_to" field.
func (*ItemCreate) SetUpdatedAt ¶
func (ic *ItemCreate) SetUpdatedAt(t time.Time) *ItemCreate
SetUpdatedAt sets the "updated_at" field.
func (*ItemCreate) SetWarrantyDetails ¶
func (ic *ItemCreate) SetWarrantyDetails(s string) *ItemCreate
SetWarrantyDetails sets the "warranty_details" field.
func (*ItemCreate) SetWarrantyExpires ¶
func (ic *ItemCreate) SetWarrantyExpires(t time.Time) *ItemCreate
SetWarrantyExpires sets the "warranty_expires" field.
type ItemCreateBulk ¶
type ItemCreateBulk struct {
// contains filtered or unexported fields
}
ItemCreateBulk is the builder for creating many Item entities in bulk.
func (*ItemCreateBulk) Exec ¶
func (icb *ItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemCreateBulk) ExecX ¶
func (icb *ItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ItemDelete ¶
type ItemDelete struct {
// contains filtered or unexported fields
}
ItemDelete is the builder for deleting a Item entity.
func (*ItemDelete) Exec ¶
func (id *ItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ItemDelete) ExecX ¶
func (id *ItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ItemDelete) Where ¶
func (id *ItemDelete) Where(ps ...predicate.Item) *ItemDelete
Where appends a list predicates to the ItemDelete builder.
type ItemDeleteOne ¶
type ItemDeleteOne struct {
// contains filtered or unexported fields
}
ItemDeleteOne is the builder for deleting a single Item entity.
func (*ItemDeleteOne) Exec ¶
func (ido *ItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ItemDeleteOne) ExecX ¶
func (ido *ItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemDeleteOne) Where ¶
func (ido *ItemDeleteOne) Where(ps ...predicate.Item) *ItemDeleteOne
Where appends a list predicates to the ItemDelete builder.
type ItemEdges ¶
type ItemEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // Parent holds the value of the parent edge. Parent *Item `json:"parent,omitempty"` // Children holds the value of the children edge. Children []*Item `json:"children,omitempty"` // Label holds the value of the label edge. Label []*Label `json:"label,omitempty"` // Location holds the value of the location edge. Location *Location `json:"location,omitempty"` // Fields holds the value of the fields edge. Fields []*ItemField `json:"fields,omitempty"` // MaintenanceEntries holds the value of the maintenance_entries edge. MaintenanceEntries []*MaintenanceEntry `json:"maintenance_entries,omitempty"` // Attachments holds the value of the attachments edge. Attachments []*Attachment `json:"attachments,omitempty"` // contains filtered or unexported fields }
ItemEdges holds the relations/edges for other nodes in the graph.
func (ItemEdges) AttachmentsOrErr ¶
func (e ItemEdges) AttachmentsOrErr() ([]*Attachment, error)
AttachmentsOrErr returns the Attachments value or an error if the edge was not loaded in eager-loading.
func (ItemEdges) ChildrenOrErr ¶
ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.
func (ItemEdges) FieldsOrErr ¶
FieldsOrErr returns the Fields value or an error if the edge was not loaded in eager-loading.
func (ItemEdges) GroupOrErr ¶
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ItemEdges) LabelOrErr ¶
LabelOrErr returns the Label value or an error if the edge was not loaded in eager-loading.
func (ItemEdges) LocationOrErr ¶
LocationOrErr returns the Location value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ItemEdges) MaintenanceEntriesOrErr ¶
func (e ItemEdges) MaintenanceEntriesOrErr() ([]*MaintenanceEntry, error)
MaintenanceEntriesOrErr returns the MaintenanceEntries value or an error if the edge was not loaded in eager-loading.
func (ItemEdges) ParentOrErr ¶
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ItemField ¶
type ItemField struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Type holds the value of the "type" field. Type itemfield.Type `json:"type,omitempty"` // TextValue holds the value of the "text_value" field. TextValue string `json:"text_value,omitempty"` // NumberValue holds the value of the "number_value" field. NumberValue int `json:"number_value,omitempty"` // BooleanValue holds the value of the "boolean_value" field. BooleanValue bool `json:"boolean_value,omitempty"` // TimeValue holds the value of the "time_value" field. TimeValue time.Time `json:"time_value,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ItemFieldQuery when eager-loading is set. Edges ItemFieldEdges `json:"edges"` // contains filtered or unexported fields }
ItemField is the model entity for the ItemField schema.
func (*ItemField) Unwrap ¶
Unwrap unwraps the ItemField 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 (*ItemField) Update ¶
func (_if *ItemField) Update() *ItemFieldUpdateOne
Update returns a builder for updating this ItemField. Note that you need to call ItemField.Unwrap() before calling this method if this ItemField was returned from a transaction, and the transaction was committed or rolled back.
type ItemFieldClient ¶
type ItemFieldClient struct {
// contains filtered or unexported fields
}
ItemFieldClient is a client for the ItemField schema.
func NewItemFieldClient ¶
func NewItemFieldClient(c config) *ItemFieldClient
NewItemFieldClient returns a client for the ItemField from the given config.
func (*ItemFieldClient) Create ¶
func (c *ItemFieldClient) Create() *ItemFieldCreate
Create returns a builder for creating a ItemField entity.
func (*ItemFieldClient) CreateBulk ¶
func (c *ItemFieldClient) CreateBulk(builders ...*ItemFieldCreate) *ItemFieldCreateBulk
CreateBulk returns a builder for creating a bulk of ItemField entities.
func (*ItemFieldClient) Delete ¶
func (c *ItemFieldClient) Delete() *ItemFieldDelete
Delete returns a delete builder for ItemField.
func (*ItemFieldClient) DeleteOne ¶
func (c *ItemFieldClient) DeleteOne(_if *ItemField) *ItemFieldDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ItemFieldClient) DeleteOneID ¶
func (c *ItemFieldClient) DeleteOneID(id uuid.UUID) *ItemFieldDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ItemFieldClient) Hooks ¶
func (c *ItemFieldClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ItemFieldClient) Intercept ¶
func (c *ItemFieldClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `itemfield.Intercept(f(g(h())))`.
func (*ItemFieldClient) Interceptors ¶
func (c *ItemFieldClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ItemFieldClient) MapCreateBulk ¶
func (c *ItemFieldClient) MapCreateBulk(slice any, setFunc func(*ItemFieldCreate, int)) *ItemFieldCreateBulk
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 (*ItemFieldClient) Query ¶
func (c *ItemFieldClient) Query() *ItemFieldQuery
Query returns a query builder for ItemField.
func (*ItemFieldClient) QueryItem ¶
func (c *ItemFieldClient) QueryItem(_if *ItemField) *ItemQuery
QueryItem queries the item edge of a ItemField.
func (*ItemFieldClient) Update ¶
func (c *ItemFieldClient) Update() *ItemFieldUpdate
Update returns an update builder for ItemField.
func (*ItemFieldClient) UpdateOne ¶
func (c *ItemFieldClient) UpdateOne(_if *ItemField) *ItemFieldUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ItemFieldClient) UpdateOneID ¶
func (c *ItemFieldClient) UpdateOneID(id uuid.UUID) *ItemFieldUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ItemFieldClient) Use ¶
func (c *ItemFieldClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `itemfield.Hooks(f(g(h())))`.
type ItemFieldCreate ¶
type ItemFieldCreate struct {
// contains filtered or unexported fields
}
ItemFieldCreate is the builder for creating a ItemField entity.
func (*ItemFieldCreate) Exec ¶
func (ifc *ItemFieldCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemFieldCreate) ExecX ¶
func (ifc *ItemFieldCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemFieldCreate) Mutation ¶
func (ifc *ItemFieldCreate) Mutation() *ItemFieldMutation
Mutation returns the ItemFieldMutation object of the builder.
func (*ItemFieldCreate) Save ¶
func (ifc *ItemFieldCreate) Save(ctx context.Context) (*ItemField, error)
Save creates the ItemField in the database.
func (*ItemFieldCreate) SaveX ¶
func (ifc *ItemFieldCreate) SaveX(ctx context.Context) *ItemField
SaveX calls Save and panics if Save returns an error.
func (*ItemFieldCreate) SetBooleanValue ¶
func (ifc *ItemFieldCreate) SetBooleanValue(b bool) *ItemFieldCreate
SetBooleanValue sets the "boolean_value" field.
func (*ItemFieldCreate) SetCreatedAt ¶
func (ifc *ItemFieldCreate) SetCreatedAt(t time.Time) *ItemFieldCreate
SetCreatedAt sets the "created_at" field.
func (*ItemFieldCreate) SetDescription ¶
func (ifc *ItemFieldCreate) SetDescription(s string) *ItemFieldCreate
SetDescription sets the "description" field.
func (*ItemFieldCreate) SetID ¶
func (ifc *ItemFieldCreate) SetID(u uuid.UUID) *ItemFieldCreate
SetID sets the "id" field.
func (*ItemFieldCreate) SetItem ¶
func (ifc *ItemFieldCreate) SetItem(i *Item) *ItemFieldCreate
SetItem sets the "item" edge to the Item entity.
func (*ItemFieldCreate) SetItemID ¶
func (ifc *ItemFieldCreate) SetItemID(id uuid.UUID) *ItemFieldCreate
SetItemID sets the "item" edge to the Item entity by ID.
func (*ItemFieldCreate) SetName ¶
func (ifc *ItemFieldCreate) SetName(s string) *ItemFieldCreate
SetName sets the "name" field.
func (*ItemFieldCreate) SetNillableBooleanValue ¶
func (ifc *ItemFieldCreate) SetNillableBooleanValue(b *bool) *ItemFieldCreate
SetNillableBooleanValue sets the "boolean_value" field if the given value is not nil.
func (*ItemFieldCreate) SetNillableCreatedAt ¶
func (ifc *ItemFieldCreate) SetNillableCreatedAt(t *time.Time) *ItemFieldCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ItemFieldCreate) SetNillableDescription ¶
func (ifc *ItemFieldCreate) SetNillableDescription(s *string) *ItemFieldCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ItemFieldCreate) SetNillableID ¶
func (ifc *ItemFieldCreate) SetNillableID(u *uuid.UUID) *ItemFieldCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ItemFieldCreate) SetNillableItemID ¶
func (ifc *ItemFieldCreate) SetNillableItemID(id *uuid.UUID) *ItemFieldCreate
SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.
func (*ItemFieldCreate) SetNillableNumberValue ¶
func (ifc *ItemFieldCreate) SetNillableNumberValue(i *int) *ItemFieldCreate
SetNillableNumberValue sets the "number_value" field if the given value is not nil.
func (*ItemFieldCreate) SetNillableTextValue ¶
func (ifc *ItemFieldCreate) SetNillableTextValue(s *string) *ItemFieldCreate
SetNillableTextValue sets the "text_value" field if the given value is not nil.
func (*ItemFieldCreate) SetNillableTimeValue ¶
func (ifc *ItemFieldCreate) SetNillableTimeValue(t *time.Time) *ItemFieldCreate
SetNillableTimeValue sets the "time_value" field if the given value is not nil.
func (*ItemFieldCreate) SetNillableUpdatedAt ¶
func (ifc *ItemFieldCreate) SetNillableUpdatedAt(t *time.Time) *ItemFieldCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ItemFieldCreate) SetNumberValue ¶
func (ifc *ItemFieldCreate) SetNumberValue(i int) *ItemFieldCreate
SetNumberValue sets the "number_value" field.
func (*ItemFieldCreate) SetTextValue ¶
func (ifc *ItemFieldCreate) SetTextValue(s string) *ItemFieldCreate
SetTextValue sets the "text_value" field.
func (*ItemFieldCreate) SetTimeValue ¶
func (ifc *ItemFieldCreate) SetTimeValue(t time.Time) *ItemFieldCreate
SetTimeValue sets the "time_value" field.
func (*ItemFieldCreate) SetType ¶
func (ifc *ItemFieldCreate) SetType(i itemfield.Type) *ItemFieldCreate
SetType sets the "type" field.
func (*ItemFieldCreate) SetUpdatedAt ¶
func (ifc *ItemFieldCreate) SetUpdatedAt(t time.Time) *ItemFieldCreate
SetUpdatedAt sets the "updated_at" field.
type ItemFieldCreateBulk ¶
type ItemFieldCreateBulk struct {
// contains filtered or unexported fields
}
ItemFieldCreateBulk is the builder for creating many ItemField entities in bulk.
func (*ItemFieldCreateBulk) Exec ¶
func (ifcb *ItemFieldCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemFieldCreateBulk) ExecX ¶
func (ifcb *ItemFieldCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ItemFieldDelete ¶
type ItemFieldDelete struct {
// contains filtered or unexported fields
}
ItemFieldDelete is the builder for deleting a ItemField entity.
func (*ItemFieldDelete) Exec ¶
func (ifd *ItemFieldDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ItemFieldDelete) ExecX ¶
func (ifd *ItemFieldDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ItemFieldDelete) Where ¶
func (ifd *ItemFieldDelete) Where(ps ...predicate.ItemField) *ItemFieldDelete
Where appends a list predicates to the ItemFieldDelete builder.
type ItemFieldDeleteOne ¶
type ItemFieldDeleteOne struct {
// contains filtered or unexported fields
}
ItemFieldDeleteOne is the builder for deleting a single ItemField entity.
func (*ItemFieldDeleteOne) Exec ¶
func (ifdo *ItemFieldDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ItemFieldDeleteOne) ExecX ¶
func (ifdo *ItemFieldDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemFieldDeleteOne) Where ¶
func (ifdo *ItemFieldDeleteOne) Where(ps ...predicate.ItemField) *ItemFieldDeleteOne
Where appends a list predicates to the ItemFieldDelete builder.
type ItemFieldEdges ¶
type ItemFieldEdges struct { // Item holds the value of the item edge. Item *Item `json:"item,omitempty"` // contains filtered or unexported fields }
ItemFieldEdges holds the relations/edges for other nodes in the graph.
func (ItemFieldEdges) ItemOrErr ¶
func (e ItemFieldEdges) ItemOrErr() (*Item, error)
ItemOrErr returns the Item value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ItemFieldGroupBy ¶
type ItemFieldGroupBy struct {
// contains filtered or unexported fields
}
ItemFieldGroupBy is the group-by builder for ItemField entities.
func (*ItemFieldGroupBy) Aggregate ¶
func (ifgb *ItemFieldGroupBy) Aggregate(fns ...AggregateFunc) *ItemFieldGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ItemFieldGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemFieldGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemFieldGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemFieldGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemFieldGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemFieldGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemFieldGroupBy) Scan ¶
func (ifgb *ItemFieldGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ItemFieldGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemFieldMutation ¶
type ItemFieldMutation struct {
// contains filtered or unexported fields
}
ItemFieldMutation represents an operation that mutates the ItemField nodes in the graph.
func (*ItemFieldMutation) AddField ¶
func (m *ItemFieldMutation) 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 (*ItemFieldMutation) AddNumberValue ¶
func (m *ItemFieldMutation) AddNumberValue(i int)
AddNumberValue adds i to the "number_value" field.
func (*ItemFieldMutation) AddedEdges ¶
func (m *ItemFieldMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ItemFieldMutation) AddedField ¶
func (m *ItemFieldMutation) 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 (*ItemFieldMutation) AddedFields ¶
func (m *ItemFieldMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ItemFieldMutation) AddedIDs ¶
func (m *ItemFieldMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ItemFieldMutation) AddedNumberValue ¶
func (m *ItemFieldMutation) AddedNumberValue() (r int, exists bool)
AddedNumberValue returns the value that was added to the "number_value" field in this mutation.
func (*ItemFieldMutation) BooleanValue ¶
func (m *ItemFieldMutation) BooleanValue() (r bool, exists bool)
BooleanValue returns the value of the "boolean_value" field in the mutation.
func (*ItemFieldMutation) ClearDescription ¶
func (m *ItemFieldMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*ItemFieldMutation) ClearEdge ¶
func (m *ItemFieldMutation) 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 (*ItemFieldMutation) ClearField ¶
func (m *ItemFieldMutation) 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 (*ItemFieldMutation) ClearItem ¶
func (m *ItemFieldMutation) ClearItem()
ClearItem clears the "item" edge to the Item entity.
func (*ItemFieldMutation) ClearNumberValue ¶
func (m *ItemFieldMutation) ClearNumberValue()
ClearNumberValue clears the value of the "number_value" field.
func (*ItemFieldMutation) ClearTextValue ¶
func (m *ItemFieldMutation) ClearTextValue()
ClearTextValue clears the value of the "text_value" field.
func (*ItemFieldMutation) ClearedEdges ¶
func (m *ItemFieldMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ItemFieldMutation) ClearedFields ¶
func (m *ItemFieldMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ItemFieldMutation) Client ¶
func (m ItemFieldMutation) 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 (*ItemFieldMutation) CreatedAt ¶
func (m *ItemFieldMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ItemFieldMutation) Description ¶
func (m *ItemFieldMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ItemFieldMutation) DescriptionCleared ¶
func (m *ItemFieldMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*ItemFieldMutation) EdgeCleared ¶
func (m *ItemFieldMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ItemFieldMutation) Field ¶
func (m *ItemFieldMutation) 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 (*ItemFieldMutation) FieldCleared ¶
func (m *ItemFieldMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ItemFieldMutation) Fields ¶
func (m *ItemFieldMutation) 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 (*ItemFieldMutation) GetType ¶
func (m *ItemFieldMutation) GetType() (r itemfield.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*ItemFieldMutation) ID ¶
func (m *ItemFieldMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ItemFieldMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ItemFieldMutation) ItemCleared ¶
func (m *ItemFieldMutation) ItemCleared() bool
ItemCleared reports if the "item" edge to the Item entity was cleared.
func (*ItemFieldMutation) ItemID ¶
func (m *ItemFieldMutation) ItemID() (id uuid.UUID, exists bool)
ItemID returns the "item" edge ID in the mutation.
func (*ItemFieldMutation) ItemIDs ¶
func (m *ItemFieldMutation) ItemIDs() (ids []uuid.UUID)
ItemIDs returns the "item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ItemID instead. It exists only for internal usage by the builders.
func (*ItemFieldMutation) Name ¶
func (m *ItemFieldMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ItemFieldMutation) NumberValue ¶
func (m *ItemFieldMutation) NumberValue() (r int, exists bool)
NumberValue returns the value of the "number_value" field in the mutation.
func (*ItemFieldMutation) NumberValueCleared ¶
func (m *ItemFieldMutation) NumberValueCleared() bool
NumberValueCleared returns if the "number_value" field was cleared in this mutation.
func (*ItemFieldMutation) OldBooleanValue ¶
func (m *ItemFieldMutation) OldBooleanValue(ctx context.Context) (v bool, err error)
OldBooleanValue returns the old "boolean_value" field's value of the ItemField entity. If the ItemField 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 (*ItemFieldMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ItemField entity. If the ItemField 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 (*ItemFieldMutation) OldDescription ¶
func (m *ItemFieldMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the ItemField entity. If the ItemField 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 (*ItemFieldMutation) 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 (*ItemFieldMutation) OldName ¶
func (m *ItemFieldMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ItemField entity. If the ItemField 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 (*ItemFieldMutation) OldNumberValue ¶
func (m *ItemFieldMutation) OldNumberValue(ctx context.Context) (v int, err error)
OldNumberValue returns the old "number_value" field's value of the ItemField entity. If the ItemField 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 (*ItemFieldMutation) OldTextValue ¶
func (m *ItemFieldMutation) OldTextValue(ctx context.Context) (v string, err error)
OldTextValue returns the old "text_value" field's value of the ItemField entity. If the ItemField 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 (*ItemFieldMutation) OldTimeValue ¶
OldTimeValue returns the old "time_value" field's value of the ItemField entity. If the ItemField 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 (*ItemFieldMutation) OldType ¶
OldType returns the old "type" field's value of the ItemField entity. If the ItemField 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 (*ItemFieldMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ItemField entity. If the ItemField 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 (*ItemFieldMutation) RemovedEdges ¶
func (m *ItemFieldMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ItemFieldMutation) RemovedIDs ¶
func (m *ItemFieldMutation) 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 (*ItemFieldMutation) ResetBooleanValue ¶
func (m *ItemFieldMutation) ResetBooleanValue()
ResetBooleanValue resets all changes to the "boolean_value" field.
func (*ItemFieldMutation) ResetCreatedAt ¶
func (m *ItemFieldMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ItemFieldMutation) ResetDescription ¶
func (m *ItemFieldMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ItemFieldMutation) ResetEdge ¶
func (m *ItemFieldMutation) 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 (*ItemFieldMutation) ResetField ¶
func (m *ItemFieldMutation) 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 (*ItemFieldMutation) ResetItem ¶
func (m *ItemFieldMutation) ResetItem()
ResetItem resets all changes to the "item" edge.
func (*ItemFieldMutation) ResetName ¶
func (m *ItemFieldMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ItemFieldMutation) ResetNumberValue ¶
func (m *ItemFieldMutation) ResetNumberValue()
ResetNumberValue resets all changes to the "number_value" field.
func (*ItemFieldMutation) ResetTextValue ¶
func (m *ItemFieldMutation) ResetTextValue()
ResetTextValue resets all changes to the "text_value" field.
func (*ItemFieldMutation) ResetTimeValue ¶
func (m *ItemFieldMutation) ResetTimeValue()
ResetTimeValue resets all changes to the "time_value" field.
func (*ItemFieldMutation) ResetType ¶
func (m *ItemFieldMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*ItemFieldMutation) ResetUpdatedAt ¶
func (m *ItemFieldMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ItemFieldMutation) SetBooleanValue ¶
func (m *ItemFieldMutation) SetBooleanValue(b bool)
SetBooleanValue sets the "boolean_value" field.
func (*ItemFieldMutation) SetCreatedAt ¶
func (m *ItemFieldMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ItemFieldMutation) SetDescription ¶
func (m *ItemFieldMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ItemFieldMutation) SetField ¶
func (m *ItemFieldMutation) 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 (*ItemFieldMutation) SetID ¶
func (m *ItemFieldMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ItemField entities.
func (*ItemFieldMutation) SetItemID ¶
func (m *ItemFieldMutation) SetItemID(id uuid.UUID)
SetItemID sets the "item" edge to the Item entity by id.
func (*ItemFieldMutation) SetName ¶
func (m *ItemFieldMutation) SetName(s string)
SetName sets the "name" field.
func (*ItemFieldMutation) SetNumberValue ¶
func (m *ItemFieldMutation) SetNumberValue(i int)
SetNumberValue sets the "number_value" field.
func (*ItemFieldMutation) SetOp ¶
func (m *ItemFieldMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ItemFieldMutation) SetTextValue ¶
func (m *ItemFieldMutation) SetTextValue(s string)
SetTextValue sets the "text_value" field.
func (*ItemFieldMutation) SetTimeValue ¶
func (m *ItemFieldMutation) SetTimeValue(t time.Time)
SetTimeValue sets the "time_value" field.
func (*ItemFieldMutation) SetType ¶
func (m *ItemFieldMutation) SetType(i itemfield.Type)
SetType sets the "type" field.
func (*ItemFieldMutation) SetUpdatedAt ¶
func (m *ItemFieldMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ItemFieldMutation) TextValue ¶
func (m *ItemFieldMutation) TextValue() (r string, exists bool)
TextValue returns the value of the "text_value" field in the mutation.
func (*ItemFieldMutation) TextValueCleared ¶
func (m *ItemFieldMutation) TextValueCleared() bool
TextValueCleared returns if the "text_value" field was cleared in this mutation.
func (*ItemFieldMutation) TimeValue ¶
func (m *ItemFieldMutation) TimeValue() (r time.Time, exists bool)
TimeValue returns the value of the "time_value" field in the mutation.
func (ItemFieldMutation) Tx ¶
func (m ItemFieldMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ItemFieldMutation) Type ¶
func (m *ItemFieldMutation) Type() string
Type returns the node type of this mutation (ItemField).
func (*ItemFieldMutation) UpdatedAt ¶
func (m *ItemFieldMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ItemFieldMutation) Where ¶
func (m *ItemFieldMutation) Where(ps ...predicate.ItemField)
Where appends a list predicates to the ItemFieldMutation builder.
func (*ItemFieldMutation) WhereP ¶
func (m *ItemFieldMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ItemFieldMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ItemFieldQuery ¶
type ItemFieldQuery struct {
// contains filtered or unexported fields
}
ItemFieldQuery is the builder for querying ItemField entities.
func (*ItemFieldQuery) Aggregate ¶
func (ifq *ItemFieldQuery) Aggregate(fns ...AggregateFunc) *ItemFieldSelect
Aggregate returns a ItemFieldSelect configured with the given aggregations.
func (*ItemFieldQuery) All ¶
func (ifq *ItemFieldQuery) All(ctx context.Context) ([]*ItemField, error)
All executes the query and returns a list of ItemFields.
func (*ItemFieldQuery) AllX ¶
func (ifq *ItemFieldQuery) AllX(ctx context.Context) []*ItemField
AllX is like All, but panics if an error occurs.
func (*ItemFieldQuery) Clone ¶
func (ifq *ItemFieldQuery) Clone() *ItemFieldQuery
Clone returns a duplicate of the ItemFieldQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ItemFieldQuery) Count ¶
func (ifq *ItemFieldQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ItemFieldQuery) CountX ¶
func (ifq *ItemFieldQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ItemFieldQuery) Exist ¶
func (ifq *ItemFieldQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ItemFieldQuery) ExistX ¶
func (ifq *ItemFieldQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ItemFieldQuery) First ¶
func (ifq *ItemFieldQuery) First(ctx context.Context) (*ItemField, error)
First returns the first ItemField entity from the query. Returns a *NotFoundError when no ItemField was found.
func (*ItemFieldQuery) FirstID ¶
FirstID returns the first ItemField ID from the query. Returns a *NotFoundError when no ItemField ID was found.
func (*ItemFieldQuery) FirstIDX ¶
func (ifq *ItemFieldQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ItemFieldQuery) FirstX ¶
func (ifq *ItemFieldQuery) FirstX(ctx context.Context) *ItemField
FirstX is like First, but panics if an error occurs.
func (*ItemFieldQuery) GroupBy ¶
func (ifq *ItemFieldQuery) GroupBy(field string, fields ...string) *ItemFieldGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.ItemField.Query(). GroupBy(itemfield.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ItemFieldQuery) IDsX ¶
func (ifq *ItemFieldQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ItemFieldQuery) Limit ¶
func (ifq *ItemFieldQuery) Limit(limit int) *ItemFieldQuery
Limit the number of records to be returned by this query.
func (*ItemFieldQuery) Offset ¶
func (ifq *ItemFieldQuery) Offset(offset int) *ItemFieldQuery
Offset to start from.
func (*ItemFieldQuery) Only ¶
func (ifq *ItemFieldQuery) Only(ctx context.Context) (*ItemField, error)
Only returns a single ItemField entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ItemField entity is found. Returns a *NotFoundError when no ItemField entities are found.
func (*ItemFieldQuery) OnlyID ¶
OnlyID is like Only, but returns the only ItemField ID in the query. Returns a *NotSingularError when more than one ItemField ID is found. Returns a *NotFoundError when no entities are found.
func (*ItemFieldQuery) OnlyIDX ¶
func (ifq *ItemFieldQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ItemFieldQuery) OnlyX ¶
func (ifq *ItemFieldQuery) OnlyX(ctx context.Context) *ItemField
OnlyX is like Only, but panics if an error occurs.
func (*ItemFieldQuery) Order ¶
func (ifq *ItemFieldQuery) Order(o ...itemfield.OrderOption) *ItemFieldQuery
Order specifies how the records should be ordered.
func (*ItemFieldQuery) QueryItem ¶
func (ifq *ItemFieldQuery) QueryItem() *ItemQuery
QueryItem chains the current query on the "item" edge.
func (*ItemFieldQuery) Select ¶
func (ifq *ItemFieldQuery) Select(fields ...string) *ItemFieldSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.ItemField.Query(). Select(itemfield.FieldCreatedAt). Scan(ctx, &v)
func (*ItemFieldQuery) Unique ¶
func (ifq *ItemFieldQuery) Unique(unique bool) *ItemFieldQuery
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 (*ItemFieldQuery) Where ¶
func (ifq *ItemFieldQuery) Where(ps ...predicate.ItemField) *ItemFieldQuery
Where adds a new predicate for the ItemFieldQuery builder.
func (*ItemFieldQuery) WithItem ¶
func (ifq *ItemFieldQuery) WithItem(opts ...func(*ItemQuery)) *ItemFieldQuery
WithItem tells the query-builder to eager-load the nodes that are connected to the "item" edge. The optional arguments are used to configure the query builder of the edge.
type ItemFieldSelect ¶
type ItemFieldSelect struct { *ItemFieldQuery // contains filtered or unexported fields }
ItemFieldSelect is the builder for selecting fields of ItemField entities.
func (*ItemFieldSelect) Aggregate ¶
func (ifs *ItemFieldSelect) Aggregate(fns ...AggregateFunc) *ItemFieldSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ItemFieldSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemFieldSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemFieldSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemFieldSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemFieldSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemFieldSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemFieldSelect) Scan ¶
func (ifs *ItemFieldSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ItemFieldSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemFieldUpdate ¶
type ItemFieldUpdate struct {
// contains filtered or unexported fields
}
ItemFieldUpdate is the builder for updating ItemField entities.
func (*ItemFieldUpdate) AddNumberValue ¶
func (ifu *ItemFieldUpdate) AddNumberValue(i int) *ItemFieldUpdate
AddNumberValue adds i to the "number_value" field.
func (*ItemFieldUpdate) ClearDescription ¶
func (ifu *ItemFieldUpdate) ClearDescription() *ItemFieldUpdate
ClearDescription clears the value of the "description" field.
func (*ItemFieldUpdate) ClearItem ¶
func (ifu *ItemFieldUpdate) ClearItem() *ItemFieldUpdate
ClearItem clears the "item" edge to the Item entity.
func (*ItemFieldUpdate) ClearNumberValue ¶
func (ifu *ItemFieldUpdate) ClearNumberValue() *ItemFieldUpdate
ClearNumberValue clears the value of the "number_value" field.
func (*ItemFieldUpdate) ClearTextValue ¶
func (ifu *ItemFieldUpdate) ClearTextValue() *ItemFieldUpdate
ClearTextValue clears the value of the "text_value" field.
func (*ItemFieldUpdate) Exec ¶
func (ifu *ItemFieldUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemFieldUpdate) ExecX ¶
func (ifu *ItemFieldUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemFieldUpdate) Mutation ¶
func (ifu *ItemFieldUpdate) Mutation() *ItemFieldMutation
Mutation returns the ItemFieldMutation object of the builder.
func (*ItemFieldUpdate) Save ¶
func (ifu *ItemFieldUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ItemFieldUpdate) SaveX ¶
func (ifu *ItemFieldUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ItemFieldUpdate) SetBooleanValue ¶
func (ifu *ItemFieldUpdate) SetBooleanValue(b bool) *ItemFieldUpdate
SetBooleanValue sets the "boolean_value" field.
func (*ItemFieldUpdate) SetDescription ¶
func (ifu *ItemFieldUpdate) SetDescription(s string) *ItemFieldUpdate
SetDescription sets the "description" field.
func (*ItemFieldUpdate) SetItem ¶
func (ifu *ItemFieldUpdate) SetItem(i *Item) *ItemFieldUpdate
SetItem sets the "item" edge to the Item entity.
func (*ItemFieldUpdate) SetItemID ¶
func (ifu *ItemFieldUpdate) SetItemID(id uuid.UUID) *ItemFieldUpdate
SetItemID sets the "item" edge to the Item entity by ID.
func (*ItemFieldUpdate) SetName ¶
func (ifu *ItemFieldUpdate) SetName(s string) *ItemFieldUpdate
SetName sets the "name" field.
func (*ItemFieldUpdate) SetNillableBooleanValue ¶
func (ifu *ItemFieldUpdate) SetNillableBooleanValue(b *bool) *ItemFieldUpdate
SetNillableBooleanValue sets the "boolean_value" field if the given value is not nil.
func (*ItemFieldUpdate) SetNillableDescription ¶
func (ifu *ItemFieldUpdate) SetNillableDescription(s *string) *ItemFieldUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ItemFieldUpdate) SetNillableItemID ¶
func (ifu *ItemFieldUpdate) SetNillableItemID(id *uuid.UUID) *ItemFieldUpdate
SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.
func (*ItemFieldUpdate) SetNillableName ¶
func (ifu *ItemFieldUpdate) SetNillableName(s *string) *ItemFieldUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ItemFieldUpdate) SetNillableNumberValue ¶
func (ifu *ItemFieldUpdate) SetNillableNumberValue(i *int) *ItemFieldUpdate
SetNillableNumberValue sets the "number_value" field if the given value is not nil.
func (*ItemFieldUpdate) SetNillableTextValue ¶
func (ifu *ItemFieldUpdate) SetNillableTextValue(s *string) *ItemFieldUpdate
SetNillableTextValue sets the "text_value" field if the given value is not nil.
func (*ItemFieldUpdate) SetNillableTimeValue ¶
func (ifu *ItemFieldUpdate) SetNillableTimeValue(t *time.Time) *ItemFieldUpdate
SetNillableTimeValue sets the "time_value" field if the given value is not nil.
func (*ItemFieldUpdate) SetNillableType ¶
func (ifu *ItemFieldUpdate) SetNillableType(i *itemfield.Type) *ItemFieldUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*ItemFieldUpdate) SetNumberValue ¶
func (ifu *ItemFieldUpdate) SetNumberValue(i int) *ItemFieldUpdate
SetNumberValue sets the "number_value" field.
func (*ItemFieldUpdate) SetTextValue ¶
func (ifu *ItemFieldUpdate) SetTextValue(s string) *ItemFieldUpdate
SetTextValue sets the "text_value" field.
func (*ItemFieldUpdate) SetTimeValue ¶
func (ifu *ItemFieldUpdate) SetTimeValue(t time.Time) *ItemFieldUpdate
SetTimeValue sets the "time_value" field.
func (*ItemFieldUpdate) SetType ¶
func (ifu *ItemFieldUpdate) SetType(i itemfield.Type) *ItemFieldUpdate
SetType sets the "type" field.
func (*ItemFieldUpdate) SetUpdatedAt ¶
func (ifu *ItemFieldUpdate) SetUpdatedAt(t time.Time) *ItemFieldUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ItemFieldUpdate) Where ¶
func (ifu *ItemFieldUpdate) Where(ps ...predicate.ItemField) *ItemFieldUpdate
Where appends a list predicates to the ItemFieldUpdate builder.
type ItemFieldUpdateOne ¶
type ItemFieldUpdateOne struct {
// contains filtered or unexported fields
}
ItemFieldUpdateOne is the builder for updating a single ItemField entity.
func (*ItemFieldUpdateOne) AddNumberValue ¶
func (ifuo *ItemFieldUpdateOne) AddNumberValue(i int) *ItemFieldUpdateOne
AddNumberValue adds i to the "number_value" field.
func (*ItemFieldUpdateOne) ClearDescription ¶
func (ifuo *ItemFieldUpdateOne) ClearDescription() *ItemFieldUpdateOne
ClearDescription clears the value of the "description" field.
func (*ItemFieldUpdateOne) ClearItem ¶
func (ifuo *ItemFieldUpdateOne) ClearItem() *ItemFieldUpdateOne
ClearItem clears the "item" edge to the Item entity.
func (*ItemFieldUpdateOne) ClearNumberValue ¶
func (ifuo *ItemFieldUpdateOne) ClearNumberValue() *ItemFieldUpdateOne
ClearNumberValue clears the value of the "number_value" field.
func (*ItemFieldUpdateOne) ClearTextValue ¶
func (ifuo *ItemFieldUpdateOne) ClearTextValue() *ItemFieldUpdateOne
ClearTextValue clears the value of the "text_value" field.
func (*ItemFieldUpdateOne) Exec ¶
func (ifuo *ItemFieldUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ItemFieldUpdateOne) ExecX ¶
func (ifuo *ItemFieldUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemFieldUpdateOne) Mutation ¶
func (ifuo *ItemFieldUpdateOne) Mutation() *ItemFieldMutation
Mutation returns the ItemFieldMutation object of the builder.
func (*ItemFieldUpdateOne) Save ¶
func (ifuo *ItemFieldUpdateOne) Save(ctx context.Context) (*ItemField, error)
Save executes the query and returns the updated ItemField entity.
func (*ItemFieldUpdateOne) SaveX ¶
func (ifuo *ItemFieldUpdateOne) SaveX(ctx context.Context) *ItemField
SaveX is like Save, but panics if an error occurs.
func (*ItemFieldUpdateOne) Select ¶
func (ifuo *ItemFieldUpdateOne) Select(field string, fields ...string) *ItemFieldUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ItemFieldUpdateOne) SetBooleanValue ¶
func (ifuo *ItemFieldUpdateOne) SetBooleanValue(b bool) *ItemFieldUpdateOne
SetBooleanValue sets the "boolean_value" field.
func (*ItemFieldUpdateOne) SetDescription ¶
func (ifuo *ItemFieldUpdateOne) SetDescription(s string) *ItemFieldUpdateOne
SetDescription sets the "description" field.
func (*ItemFieldUpdateOne) SetItem ¶
func (ifuo *ItemFieldUpdateOne) SetItem(i *Item) *ItemFieldUpdateOne
SetItem sets the "item" edge to the Item entity.
func (*ItemFieldUpdateOne) SetItemID ¶
func (ifuo *ItemFieldUpdateOne) SetItemID(id uuid.UUID) *ItemFieldUpdateOne
SetItemID sets the "item" edge to the Item entity by ID.
func (*ItemFieldUpdateOne) SetName ¶
func (ifuo *ItemFieldUpdateOne) SetName(s string) *ItemFieldUpdateOne
SetName sets the "name" field.
func (*ItemFieldUpdateOne) SetNillableBooleanValue ¶
func (ifuo *ItemFieldUpdateOne) SetNillableBooleanValue(b *bool) *ItemFieldUpdateOne
SetNillableBooleanValue sets the "boolean_value" field if the given value is not nil.
func (*ItemFieldUpdateOne) SetNillableDescription ¶
func (ifuo *ItemFieldUpdateOne) SetNillableDescription(s *string) *ItemFieldUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ItemFieldUpdateOne) SetNillableItemID ¶
func (ifuo *ItemFieldUpdateOne) SetNillableItemID(id *uuid.UUID) *ItemFieldUpdateOne
SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.
func (*ItemFieldUpdateOne) SetNillableName ¶
func (ifuo *ItemFieldUpdateOne) SetNillableName(s *string) *ItemFieldUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ItemFieldUpdateOne) SetNillableNumberValue ¶
func (ifuo *ItemFieldUpdateOne) SetNillableNumberValue(i *int) *ItemFieldUpdateOne
SetNillableNumberValue sets the "number_value" field if the given value is not nil.
func (*ItemFieldUpdateOne) SetNillableTextValue ¶
func (ifuo *ItemFieldUpdateOne) SetNillableTextValue(s *string) *ItemFieldUpdateOne
SetNillableTextValue sets the "text_value" field if the given value is not nil.
func (*ItemFieldUpdateOne) SetNillableTimeValue ¶
func (ifuo *ItemFieldUpdateOne) SetNillableTimeValue(t *time.Time) *ItemFieldUpdateOne
SetNillableTimeValue sets the "time_value" field if the given value is not nil.
func (*ItemFieldUpdateOne) SetNillableType ¶
func (ifuo *ItemFieldUpdateOne) SetNillableType(i *itemfield.Type) *ItemFieldUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*ItemFieldUpdateOne) SetNumberValue ¶
func (ifuo *ItemFieldUpdateOne) SetNumberValue(i int) *ItemFieldUpdateOne
SetNumberValue sets the "number_value" field.
func (*ItemFieldUpdateOne) SetTextValue ¶
func (ifuo *ItemFieldUpdateOne) SetTextValue(s string) *ItemFieldUpdateOne
SetTextValue sets the "text_value" field.
func (*ItemFieldUpdateOne) SetTimeValue ¶
func (ifuo *ItemFieldUpdateOne) SetTimeValue(t time.Time) *ItemFieldUpdateOne
SetTimeValue sets the "time_value" field.
func (*ItemFieldUpdateOne) SetType ¶
func (ifuo *ItemFieldUpdateOne) SetType(i itemfield.Type) *ItemFieldUpdateOne
SetType sets the "type" field.
func (*ItemFieldUpdateOne) SetUpdatedAt ¶
func (ifuo *ItemFieldUpdateOne) SetUpdatedAt(t time.Time) *ItemFieldUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ItemFieldUpdateOne) Where ¶
func (ifuo *ItemFieldUpdateOne) Where(ps ...predicate.ItemField) *ItemFieldUpdateOne
Where appends a list predicates to the ItemFieldUpdate builder.
type ItemGroupBy ¶
type ItemGroupBy struct {
// contains filtered or unexported fields
}
ItemGroupBy is the group-by builder for Item entities.
func (*ItemGroupBy) Aggregate ¶
func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Scan ¶
func (igb *ItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemMutation ¶
type ItemMutation struct {
// contains filtered or unexported fields
}
ItemMutation represents an operation that mutates the Item nodes in the graph.
func (*ItemMutation) AddAssetID ¶
func (m *ItemMutation) AddAssetID(i int)
AddAssetID adds i to the "asset_id" field.
func (*ItemMutation) AddAttachmentIDs ¶
func (m *ItemMutation) AddAttachmentIDs(ids ...uuid.UUID)
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by ids.
func (*ItemMutation) AddChildIDs ¶
func (m *ItemMutation) AddChildIDs(ids ...uuid.UUID)
AddChildIDs adds the "children" edge to the Item entity by ids.
func (*ItemMutation) AddField ¶
func (m *ItemMutation) 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 (*ItemMutation) AddFieldIDs ¶
func (m *ItemMutation) AddFieldIDs(ids ...uuid.UUID)
AddFieldIDs adds the "fields" edge to the ItemField entity by ids.
func (*ItemMutation) AddLabelIDs ¶
func (m *ItemMutation) AddLabelIDs(ids ...uuid.UUID)
AddLabelIDs adds the "label" edge to the Label entity by ids.
func (*ItemMutation) AddMaintenanceEntryIDs ¶
func (m *ItemMutation) AddMaintenanceEntryIDs(ids ...uuid.UUID)
AddMaintenanceEntryIDs adds the "maintenance_entries" edge to the MaintenanceEntry entity by ids.
func (*ItemMutation) AddPurchasePrice ¶
func (m *ItemMutation) AddPurchasePrice(f float64)
AddPurchasePrice adds f to the "purchase_price" field.
func (*ItemMutation) AddQuantity ¶
func (m *ItemMutation) AddQuantity(i int)
AddQuantity adds i to the "quantity" field.
func (*ItemMutation) AddSoldPrice ¶
func (m *ItemMutation) AddSoldPrice(f float64)
AddSoldPrice adds f to the "sold_price" field.
func (*ItemMutation) AddedAssetID ¶
func (m *ItemMutation) AddedAssetID() (r int, exists bool)
AddedAssetID returns the value that was added to the "asset_id" field in this mutation.
func (*ItemMutation) AddedEdges ¶
func (m *ItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ItemMutation) AddedField ¶
func (m *ItemMutation) 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 (*ItemMutation) AddedFields ¶
func (m *ItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ItemMutation) AddedIDs ¶
func (m *ItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ItemMutation) AddedPurchasePrice ¶
func (m *ItemMutation) AddedPurchasePrice() (r float64, exists bool)
AddedPurchasePrice returns the value that was added to the "purchase_price" field in this mutation.
func (*ItemMutation) AddedQuantity ¶
func (m *ItemMutation) AddedQuantity() (r int, exists bool)
AddedQuantity returns the value that was added to the "quantity" field in this mutation.
func (*ItemMutation) AddedSoldPrice ¶
func (m *ItemMutation) AddedSoldPrice() (r float64, exists bool)
AddedSoldPrice returns the value that was added to the "sold_price" field in this mutation.
func (*ItemMutation) Archived ¶
func (m *ItemMutation) Archived() (r bool, exists bool)
Archived returns the value of the "archived" field in the mutation.
func (*ItemMutation) AssetID ¶
func (m *ItemMutation) AssetID() (r int, exists bool)
AssetID returns the value of the "asset_id" field in the mutation.
func (*ItemMutation) AttachmentsCleared ¶
func (m *ItemMutation) AttachmentsCleared() bool
AttachmentsCleared reports if the "attachments" edge to the Attachment entity was cleared.
func (*ItemMutation) AttachmentsIDs ¶
func (m *ItemMutation) AttachmentsIDs() (ids []uuid.UUID)
AttachmentsIDs returns the "attachments" edge IDs in the mutation.
func (*ItemMutation) ChildrenCleared ¶
func (m *ItemMutation) ChildrenCleared() bool
ChildrenCleared reports if the "children" edge to the Item entity was cleared.
func (*ItemMutation) ChildrenIDs ¶
func (m *ItemMutation) ChildrenIDs() (ids []uuid.UUID)
ChildrenIDs returns the "children" edge IDs in the mutation.
func (*ItemMutation) ClearAttachments ¶
func (m *ItemMutation) ClearAttachments()
ClearAttachments clears the "attachments" edge to the Attachment entity.
func (*ItemMutation) ClearChildren ¶
func (m *ItemMutation) ClearChildren()
ClearChildren clears the "children" edge to the Item entity.
func (*ItemMutation) ClearDescription ¶
func (m *ItemMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*ItemMutation) ClearEdge ¶
func (m *ItemMutation) 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 (*ItemMutation) ClearField ¶
func (m *ItemMutation) 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 (*ItemMutation) ClearFields ¶
func (m *ItemMutation) ClearFields()
ClearFields clears the "fields" edge to the ItemField entity.
func (*ItemMutation) ClearGroup ¶
func (m *ItemMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*ItemMutation) ClearImportRef ¶
func (m *ItemMutation) ClearImportRef()
ClearImportRef clears the value of the "import_ref" field.
func (*ItemMutation) ClearLabel ¶
func (m *ItemMutation) ClearLabel()
ClearLabel clears the "label" edge to the Label entity.
func (*ItemMutation) ClearLocation ¶
func (m *ItemMutation) ClearLocation()
ClearLocation clears the "location" edge to the Location entity.
func (*ItemMutation) ClearMaintenanceEntries ¶
func (m *ItemMutation) ClearMaintenanceEntries()
ClearMaintenanceEntries clears the "maintenance_entries" edge to the MaintenanceEntry entity.
func (*ItemMutation) ClearManufacturer ¶
func (m *ItemMutation) ClearManufacturer()
ClearManufacturer clears the value of the "manufacturer" field.
func (*ItemMutation) ClearModelNumber ¶
func (m *ItemMutation) ClearModelNumber()
ClearModelNumber clears the value of the "model_number" field.
func (*ItemMutation) ClearNotes ¶
func (m *ItemMutation) ClearNotes()
ClearNotes clears the value of the "notes" field.
func (*ItemMutation) ClearParent ¶
func (m *ItemMutation) ClearParent()
ClearParent clears the "parent" edge to the Item entity.
func (*ItemMutation) ClearPurchaseFrom ¶
func (m *ItemMutation) ClearPurchaseFrom()
ClearPurchaseFrom clears the value of the "purchase_from" field.
func (*ItemMutation) ClearPurchaseTime ¶
func (m *ItemMutation) ClearPurchaseTime()
ClearPurchaseTime clears the value of the "purchase_time" field.
func (*ItemMutation) ClearSerialNumber ¶
func (m *ItemMutation) ClearSerialNumber()
ClearSerialNumber clears the value of the "serial_number" field.
func (*ItemMutation) ClearSoldNotes ¶
func (m *ItemMutation) ClearSoldNotes()
ClearSoldNotes clears the value of the "sold_notes" field.
func (*ItemMutation) ClearSoldTime ¶
func (m *ItemMutation) ClearSoldTime()
ClearSoldTime clears the value of the "sold_time" field.
func (*ItemMutation) ClearSoldTo ¶
func (m *ItemMutation) ClearSoldTo()
ClearSoldTo clears the value of the "sold_to" field.
func (*ItemMutation) ClearWarrantyDetails ¶
func (m *ItemMutation) ClearWarrantyDetails()
ClearWarrantyDetails clears the value of the "warranty_details" field.
func (*ItemMutation) ClearWarrantyExpires ¶
func (m *ItemMutation) ClearWarrantyExpires()
ClearWarrantyExpires clears the value of the "warranty_expires" field.
func (*ItemMutation) ClearedEdges ¶
func (m *ItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ItemMutation) ClearedFields ¶
func (m *ItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ItemMutation) Client ¶
func (m ItemMutation) 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 (*ItemMutation) CreatedAt ¶
func (m *ItemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ItemMutation) Description ¶
func (m *ItemMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ItemMutation) DescriptionCleared ¶
func (m *ItemMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*ItemMutation) EdgeCleared ¶
func (m *ItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ItemMutation) Field ¶
func (m *ItemMutation) 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 (*ItemMutation) FieldCleared ¶
func (m *ItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ItemMutation) Fields ¶
func (m *ItemMutation) 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 (*ItemMutation) FieldsCleared ¶
func (m *ItemMutation) FieldsCleared() bool
FieldsCleared reports if the "fields" edge to the ItemField entity was cleared.
func (*ItemMutation) FieldsIDs ¶
func (m *ItemMutation) FieldsIDs() (ids []uuid.UUID)
FieldsIDs returns the "fields" edge IDs in the mutation.
func (*ItemMutation) GroupCleared ¶
func (m *ItemMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*ItemMutation) GroupID ¶
func (m *ItemMutation) GroupID() (id uuid.UUID, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*ItemMutation) GroupIDs ¶
func (m *ItemMutation) GroupIDs() (ids []uuid.UUID)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*ItemMutation) ID ¶
func (m *ItemMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ItemMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ItemMutation) ImportRef ¶
func (m *ItemMutation) ImportRef() (r string, exists bool)
ImportRef returns the value of the "import_ref" field in the mutation.
func (*ItemMutation) ImportRefCleared ¶
func (m *ItemMutation) ImportRefCleared() bool
ImportRefCleared returns if the "import_ref" field was cleared in this mutation.
func (*ItemMutation) Insured ¶
func (m *ItemMutation) Insured() (r bool, exists bool)
Insured returns the value of the "insured" field in the mutation.
func (*ItemMutation) LabelCleared ¶
func (m *ItemMutation) LabelCleared() bool
LabelCleared reports if the "label" edge to the Label entity was cleared.
func (*ItemMutation) LabelIDs ¶
func (m *ItemMutation) LabelIDs() (ids []uuid.UUID)
LabelIDs returns the "label" edge IDs in the mutation.
func (*ItemMutation) LifetimeWarranty ¶
func (m *ItemMutation) LifetimeWarranty() (r bool, exists bool)
LifetimeWarranty returns the value of the "lifetime_warranty" field in the mutation.
func (*ItemMutation) LocationCleared ¶
func (m *ItemMutation) LocationCleared() bool
LocationCleared reports if the "location" edge to the Location entity was cleared.
func (*ItemMutation) LocationID ¶
func (m *ItemMutation) LocationID() (id uuid.UUID, exists bool)
LocationID returns the "location" edge ID in the mutation.
func (*ItemMutation) LocationIDs ¶
func (m *ItemMutation) LocationIDs() (ids []uuid.UUID)
LocationIDs returns the "location" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use LocationID instead. It exists only for internal usage by the builders.
func (*ItemMutation) MaintenanceEntriesCleared ¶
func (m *ItemMutation) MaintenanceEntriesCleared() bool
MaintenanceEntriesCleared reports if the "maintenance_entries" edge to the MaintenanceEntry entity was cleared.
func (*ItemMutation) MaintenanceEntriesIDs ¶
func (m *ItemMutation) MaintenanceEntriesIDs() (ids []uuid.UUID)
MaintenanceEntriesIDs returns the "maintenance_entries" edge IDs in the mutation.
func (*ItemMutation) Manufacturer ¶
func (m *ItemMutation) Manufacturer() (r string, exists bool)
Manufacturer returns the value of the "manufacturer" field in the mutation.
func (*ItemMutation) ManufacturerCleared ¶
func (m *ItemMutation) ManufacturerCleared() bool
ManufacturerCleared returns if the "manufacturer" field was cleared in this mutation.
func (*ItemMutation) ModelNumber ¶
func (m *ItemMutation) ModelNumber() (r string, exists bool)
ModelNumber returns the value of the "model_number" field in the mutation.
func (*ItemMutation) ModelNumberCleared ¶
func (m *ItemMutation) ModelNumberCleared() bool
ModelNumberCleared returns if the "model_number" field was cleared in this mutation.
func (*ItemMutation) Name ¶
func (m *ItemMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ItemMutation) Notes ¶
func (m *ItemMutation) Notes() (r string, exists bool)
Notes returns the value of the "notes" field in the mutation.
func (*ItemMutation) NotesCleared ¶
func (m *ItemMutation) NotesCleared() bool
NotesCleared returns if the "notes" field was cleared in this mutation.
func (*ItemMutation) OldArchived ¶
func (m *ItemMutation) OldArchived(ctx context.Context) (v bool, err error)
OldArchived returns the old "archived" field's value of the Item entity. If the Item 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 (*ItemMutation) OldAssetID ¶
func (m *ItemMutation) OldAssetID(ctx context.Context) (v int, err error)
OldAssetID returns the old "asset_id" field's value of the Item entity. If the Item 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 (*ItemMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Item entity. If the Item 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 (*ItemMutation) OldDescription ¶
func (m *ItemMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Item entity. If the Item 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 (*ItemMutation) 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 (*ItemMutation) OldImportRef ¶
func (m *ItemMutation) OldImportRef(ctx context.Context) (v string, err error)
OldImportRef returns the old "import_ref" field's value of the Item entity. If the Item 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 (*ItemMutation) OldInsured ¶
func (m *ItemMutation) OldInsured(ctx context.Context) (v bool, err error)
OldInsured returns the old "insured" field's value of the Item entity. If the Item 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 (*ItemMutation) OldLifetimeWarranty ¶
func (m *ItemMutation) OldLifetimeWarranty(ctx context.Context) (v bool, err error)
OldLifetimeWarranty returns the old "lifetime_warranty" field's value of the Item entity. If the Item 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 (*ItemMutation) OldManufacturer ¶
func (m *ItemMutation) OldManufacturer(ctx context.Context) (v string, err error)
OldManufacturer returns the old "manufacturer" field's value of the Item entity. If the Item 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 (*ItemMutation) OldModelNumber ¶
func (m *ItemMutation) OldModelNumber(ctx context.Context) (v string, err error)
OldModelNumber returns the old "model_number" field's value of the Item entity. If the Item 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 (*ItemMutation) OldName ¶
func (m *ItemMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Item entity. If the Item 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 (*ItemMutation) OldNotes ¶
func (m *ItemMutation) OldNotes(ctx context.Context) (v string, err error)
OldNotes returns the old "notes" field's value of the Item entity. If the Item 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 (*ItemMutation) OldPurchaseFrom ¶
func (m *ItemMutation) OldPurchaseFrom(ctx context.Context) (v string, err error)
OldPurchaseFrom returns the old "purchase_from" field's value of the Item entity. If the Item 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 (*ItemMutation) OldPurchasePrice ¶
func (m *ItemMutation) OldPurchasePrice(ctx context.Context) (v float64, err error)
OldPurchasePrice returns the old "purchase_price" field's value of the Item entity. If the Item 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 (*ItemMutation) OldPurchaseTime ¶
OldPurchaseTime returns the old "purchase_time" field's value of the Item entity. If the Item 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 (*ItemMutation) OldQuantity ¶
func (m *ItemMutation) OldQuantity(ctx context.Context) (v int, err error)
OldQuantity returns the old "quantity" field's value of the Item entity. If the Item 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 (*ItemMutation) OldSerialNumber ¶
func (m *ItemMutation) OldSerialNumber(ctx context.Context) (v string, err error)
OldSerialNumber returns the old "serial_number" field's value of the Item entity. If the Item 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 (*ItemMutation) OldSoldNotes ¶
func (m *ItemMutation) OldSoldNotes(ctx context.Context) (v string, err error)
OldSoldNotes returns the old "sold_notes" field's value of the Item entity. If the Item 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 (*ItemMutation) OldSoldPrice ¶
func (m *ItemMutation) OldSoldPrice(ctx context.Context) (v float64, err error)
OldSoldPrice returns the old "sold_price" field's value of the Item entity. If the Item 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 (*ItemMutation) OldSoldTime ¶
OldSoldTime returns the old "sold_time" field's value of the Item entity. If the Item 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 (*ItemMutation) OldSoldTo ¶
func (m *ItemMutation) OldSoldTo(ctx context.Context) (v string, err error)
OldSoldTo returns the old "sold_to" field's value of the Item entity. If the Item 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 (*ItemMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Item entity. If the Item 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 (*ItemMutation) OldWarrantyDetails ¶
func (m *ItemMutation) OldWarrantyDetails(ctx context.Context) (v string, err error)
OldWarrantyDetails returns the old "warranty_details" field's value of the Item entity. If the Item 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 (*ItemMutation) OldWarrantyExpires ¶
OldWarrantyExpires returns the old "warranty_expires" field's value of the Item entity. If the Item 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 (*ItemMutation) ParentCleared ¶
func (m *ItemMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the Item entity was cleared.
func (*ItemMutation) ParentID ¶
func (m *ItemMutation) ParentID() (id uuid.UUID, exists bool)
ParentID returns the "parent" edge ID in the mutation.
func (*ItemMutation) ParentIDs ¶
func (m *ItemMutation) ParentIDs() (ids []uuid.UUID)
ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.
func (*ItemMutation) PurchaseFrom ¶
func (m *ItemMutation) PurchaseFrom() (r string, exists bool)
PurchaseFrom returns the value of the "purchase_from" field in the mutation.
func (*ItemMutation) PurchaseFromCleared ¶
func (m *ItemMutation) PurchaseFromCleared() bool
PurchaseFromCleared returns if the "purchase_from" field was cleared in this mutation.
func (*ItemMutation) PurchasePrice ¶
func (m *ItemMutation) PurchasePrice() (r float64, exists bool)
PurchasePrice returns the value of the "purchase_price" field in the mutation.
func (*ItemMutation) PurchaseTime ¶
func (m *ItemMutation) PurchaseTime() (r time.Time, exists bool)
PurchaseTime returns the value of the "purchase_time" field in the mutation.
func (*ItemMutation) PurchaseTimeCleared ¶
func (m *ItemMutation) PurchaseTimeCleared() bool
PurchaseTimeCleared returns if the "purchase_time" field was cleared in this mutation.
func (*ItemMutation) Quantity ¶
func (m *ItemMutation) Quantity() (r int, exists bool)
Quantity returns the value of the "quantity" field in the mutation.
func (*ItemMutation) RemoveAttachmentIDs ¶
func (m *ItemMutation) RemoveAttachmentIDs(ids ...uuid.UUID)
RemoveAttachmentIDs removes the "attachments" edge to the Attachment entity by IDs.
func (*ItemMutation) RemoveChildIDs ¶
func (m *ItemMutation) RemoveChildIDs(ids ...uuid.UUID)
RemoveChildIDs removes the "children" edge to the Item entity by IDs.
func (*ItemMutation) RemoveFieldIDs ¶
func (m *ItemMutation) RemoveFieldIDs(ids ...uuid.UUID)
RemoveFieldIDs removes the "fields" edge to the ItemField entity by IDs.
func (*ItemMutation) RemoveLabelIDs ¶
func (m *ItemMutation) RemoveLabelIDs(ids ...uuid.UUID)
RemoveLabelIDs removes the "label" edge to the Label entity by IDs.
func (*ItemMutation) RemoveMaintenanceEntryIDs ¶
func (m *ItemMutation) RemoveMaintenanceEntryIDs(ids ...uuid.UUID)
RemoveMaintenanceEntryIDs removes the "maintenance_entries" edge to the MaintenanceEntry entity by IDs.
func (*ItemMutation) RemovedAttachmentsIDs ¶
func (m *ItemMutation) RemovedAttachmentsIDs() (ids []uuid.UUID)
RemovedAttachments returns the removed IDs of the "attachments" edge to the Attachment entity.
func (*ItemMutation) RemovedChildrenIDs ¶
func (m *ItemMutation) RemovedChildrenIDs() (ids []uuid.UUID)
RemovedChildren returns the removed IDs of the "children" edge to the Item entity.
func (*ItemMutation) RemovedEdges ¶
func (m *ItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ItemMutation) RemovedFieldsIDs ¶
func (m *ItemMutation) RemovedFieldsIDs() (ids []uuid.UUID)
RemovedFields returns the removed IDs of the "fields" edge to the ItemField entity.
func (*ItemMutation) RemovedIDs ¶
func (m *ItemMutation) 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 (*ItemMutation) RemovedLabelIDs ¶
func (m *ItemMutation) RemovedLabelIDs() (ids []uuid.UUID)
RemovedLabel returns the removed IDs of the "label" edge to the Label entity.
func (*ItemMutation) RemovedMaintenanceEntriesIDs ¶
func (m *ItemMutation) RemovedMaintenanceEntriesIDs() (ids []uuid.UUID)
RemovedMaintenanceEntries returns the removed IDs of the "maintenance_entries" edge to the MaintenanceEntry entity.
func (*ItemMutation) ResetArchived ¶
func (m *ItemMutation) ResetArchived()
ResetArchived resets all changes to the "archived" field.
func (*ItemMutation) ResetAssetID ¶
func (m *ItemMutation) ResetAssetID()
ResetAssetID resets all changes to the "asset_id" field.
func (*ItemMutation) ResetAttachments ¶
func (m *ItemMutation) ResetAttachments()
ResetAttachments resets all changes to the "attachments" edge.
func (*ItemMutation) ResetChildren ¶
func (m *ItemMutation) ResetChildren()
ResetChildren resets all changes to the "children" edge.
func (*ItemMutation) ResetCreatedAt ¶
func (m *ItemMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ItemMutation) ResetDescription ¶
func (m *ItemMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ItemMutation) ResetEdge ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetField ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetFields ¶
func (m *ItemMutation) ResetFields()
ResetFields resets all changes to the "fields" edge.
func (*ItemMutation) ResetGroup ¶
func (m *ItemMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*ItemMutation) ResetImportRef ¶
func (m *ItemMutation) ResetImportRef()
ResetImportRef resets all changes to the "import_ref" field.
func (*ItemMutation) ResetInsured ¶
func (m *ItemMutation) ResetInsured()
ResetInsured resets all changes to the "insured" field.
func (*ItemMutation) ResetLabel ¶
func (m *ItemMutation) ResetLabel()
ResetLabel resets all changes to the "label" edge.
func (*ItemMutation) ResetLifetimeWarranty ¶
func (m *ItemMutation) ResetLifetimeWarranty()
ResetLifetimeWarranty resets all changes to the "lifetime_warranty" field.
func (*ItemMutation) ResetLocation ¶
func (m *ItemMutation) ResetLocation()
ResetLocation resets all changes to the "location" edge.
func (*ItemMutation) ResetMaintenanceEntries ¶
func (m *ItemMutation) ResetMaintenanceEntries()
ResetMaintenanceEntries resets all changes to the "maintenance_entries" edge.
func (*ItemMutation) ResetManufacturer ¶
func (m *ItemMutation) ResetManufacturer()
ResetManufacturer resets all changes to the "manufacturer" field.
func (*ItemMutation) ResetModelNumber ¶
func (m *ItemMutation) ResetModelNumber()
ResetModelNumber resets all changes to the "model_number" field.
func (*ItemMutation) ResetName ¶
func (m *ItemMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ItemMutation) ResetNotes ¶
func (m *ItemMutation) ResetNotes()
ResetNotes resets all changes to the "notes" field.
func (*ItemMutation) ResetParent ¶
func (m *ItemMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*ItemMutation) ResetPurchaseFrom ¶
func (m *ItemMutation) ResetPurchaseFrom()
ResetPurchaseFrom resets all changes to the "purchase_from" field.
func (*ItemMutation) ResetPurchasePrice ¶
func (m *ItemMutation) ResetPurchasePrice()
ResetPurchasePrice resets all changes to the "purchase_price" field.
func (*ItemMutation) ResetPurchaseTime ¶
func (m *ItemMutation) ResetPurchaseTime()
ResetPurchaseTime resets all changes to the "purchase_time" field.
func (*ItemMutation) ResetQuantity ¶
func (m *ItemMutation) ResetQuantity()
ResetQuantity resets all changes to the "quantity" field.
func (*ItemMutation) ResetSerialNumber ¶
func (m *ItemMutation) ResetSerialNumber()
ResetSerialNumber resets all changes to the "serial_number" field.
func (*ItemMutation) ResetSoldNotes ¶
func (m *ItemMutation) ResetSoldNotes()
ResetSoldNotes resets all changes to the "sold_notes" field.
func (*ItemMutation) ResetSoldPrice ¶
func (m *ItemMutation) ResetSoldPrice()
ResetSoldPrice resets all changes to the "sold_price" field.
func (*ItemMutation) ResetSoldTime ¶
func (m *ItemMutation) ResetSoldTime()
ResetSoldTime resets all changes to the "sold_time" field.
func (*ItemMutation) ResetSoldTo ¶
func (m *ItemMutation) ResetSoldTo()
ResetSoldTo resets all changes to the "sold_to" field.
func (*ItemMutation) ResetUpdatedAt ¶
func (m *ItemMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ItemMutation) ResetWarrantyDetails ¶
func (m *ItemMutation) ResetWarrantyDetails()
ResetWarrantyDetails resets all changes to the "warranty_details" field.
func (*ItemMutation) ResetWarrantyExpires ¶
func (m *ItemMutation) ResetWarrantyExpires()
ResetWarrantyExpires resets all changes to the "warranty_expires" field.
func (*ItemMutation) SerialNumber ¶
func (m *ItemMutation) SerialNumber() (r string, exists bool)
SerialNumber returns the value of the "serial_number" field in the mutation.
func (*ItemMutation) SerialNumberCleared ¶
func (m *ItemMutation) SerialNumberCleared() bool
SerialNumberCleared returns if the "serial_number" field was cleared in this mutation.
func (*ItemMutation) SetArchived ¶
func (m *ItemMutation) SetArchived(b bool)
SetArchived sets the "archived" field.
func (*ItemMutation) SetAssetID ¶
func (m *ItemMutation) SetAssetID(i int)
SetAssetID sets the "asset_id" field.
func (*ItemMutation) SetCreatedAt ¶
func (m *ItemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ItemMutation) SetDescription ¶
func (m *ItemMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ItemMutation) SetField ¶
func (m *ItemMutation) 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 (*ItemMutation) SetGroupID ¶
func (m *ItemMutation) SetGroupID(id uuid.UUID)
SetGroupID sets the "group" edge to the Group entity by id.
func (*ItemMutation) SetID ¶
func (m *ItemMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Item entities.
func (*ItemMutation) SetImportRef ¶
func (m *ItemMutation) SetImportRef(s string)
SetImportRef sets the "import_ref" field.
func (*ItemMutation) SetInsured ¶
func (m *ItemMutation) SetInsured(b bool)
SetInsured sets the "insured" field.
func (*ItemMutation) SetLifetimeWarranty ¶
func (m *ItemMutation) SetLifetimeWarranty(b bool)
SetLifetimeWarranty sets the "lifetime_warranty" field.
func (*ItemMutation) SetLocationID ¶
func (m *ItemMutation) SetLocationID(id uuid.UUID)
SetLocationID sets the "location" edge to the Location entity by id.
func (*ItemMutation) SetManufacturer ¶
func (m *ItemMutation) SetManufacturer(s string)
SetManufacturer sets the "manufacturer" field.
func (*ItemMutation) SetModelNumber ¶
func (m *ItemMutation) SetModelNumber(s string)
SetModelNumber sets the "model_number" field.
func (*ItemMutation) SetName ¶
func (m *ItemMutation) SetName(s string)
SetName sets the "name" field.
func (*ItemMutation) SetNotes ¶
func (m *ItemMutation) SetNotes(s string)
SetNotes sets the "notes" field.
func (*ItemMutation) SetOp ¶
func (m *ItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ItemMutation) SetParentID ¶
func (m *ItemMutation) SetParentID(id uuid.UUID)
SetParentID sets the "parent" edge to the Item entity by id.
func (*ItemMutation) SetPurchaseFrom ¶
func (m *ItemMutation) SetPurchaseFrom(s string)
SetPurchaseFrom sets the "purchase_from" field.
func (*ItemMutation) SetPurchasePrice ¶
func (m *ItemMutation) SetPurchasePrice(f float64)
SetPurchasePrice sets the "purchase_price" field.
func (*ItemMutation) SetPurchaseTime ¶
func (m *ItemMutation) SetPurchaseTime(t time.Time)
SetPurchaseTime sets the "purchase_time" field.
func (*ItemMutation) SetQuantity ¶
func (m *ItemMutation) SetQuantity(i int)
SetQuantity sets the "quantity" field.
func (*ItemMutation) SetSerialNumber ¶
func (m *ItemMutation) SetSerialNumber(s string)
SetSerialNumber sets the "serial_number" field.
func (*ItemMutation) SetSoldNotes ¶
func (m *ItemMutation) SetSoldNotes(s string)
SetSoldNotes sets the "sold_notes" field.
func (*ItemMutation) SetSoldPrice ¶
func (m *ItemMutation) SetSoldPrice(f float64)
SetSoldPrice sets the "sold_price" field.
func (*ItemMutation) SetSoldTime ¶
func (m *ItemMutation) SetSoldTime(t time.Time)
SetSoldTime sets the "sold_time" field.
func (*ItemMutation) SetSoldTo ¶
func (m *ItemMutation) SetSoldTo(s string)
SetSoldTo sets the "sold_to" field.
func (*ItemMutation) SetUpdatedAt ¶
func (m *ItemMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ItemMutation) SetWarrantyDetails ¶
func (m *ItemMutation) SetWarrantyDetails(s string)
SetWarrantyDetails sets the "warranty_details" field.
func (*ItemMutation) SetWarrantyExpires ¶
func (m *ItemMutation) SetWarrantyExpires(t time.Time)
SetWarrantyExpires sets the "warranty_expires" field.
func (*ItemMutation) SoldNotes ¶
func (m *ItemMutation) SoldNotes() (r string, exists bool)
SoldNotes returns the value of the "sold_notes" field in the mutation.
func (*ItemMutation) SoldNotesCleared ¶
func (m *ItemMutation) SoldNotesCleared() bool
SoldNotesCleared returns if the "sold_notes" field was cleared in this mutation.
func (*ItemMutation) SoldPrice ¶
func (m *ItemMutation) SoldPrice() (r float64, exists bool)
SoldPrice returns the value of the "sold_price" field in the mutation.
func (*ItemMutation) SoldTime ¶
func (m *ItemMutation) SoldTime() (r time.Time, exists bool)
SoldTime returns the value of the "sold_time" field in the mutation.
func (*ItemMutation) SoldTimeCleared ¶
func (m *ItemMutation) SoldTimeCleared() bool
SoldTimeCleared returns if the "sold_time" field was cleared in this mutation.
func (*ItemMutation) SoldTo ¶
func (m *ItemMutation) SoldTo() (r string, exists bool)
SoldTo returns the value of the "sold_to" field in the mutation.
func (*ItemMutation) SoldToCleared ¶
func (m *ItemMutation) SoldToCleared() bool
SoldToCleared returns if the "sold_to" field was cleared in this mutation.
func (ItemMutation) Tx ¶
func (m ItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ItemMutation) Type ¶
func (m *ItemMutation) Type() string
Type returns the node type of this mutation (Item).
func (*ItemMutation) UpdatedAt ¶
func (m *ItemMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ItemMutation) WarrantyDetails ¶
func (m *ItemMutation) WarrantyDetails() (r string, exists bool)
WarrantyDetails returns the value of the "warranty_details" field in the mutation.
func (*ItemMutation) WarrantyDetailsCleared ¶
func (m *ItemMutation) WarrantyDetailsCleared() bool
WarrantyDetailsCleared returns if the "warranty_details" field was cleared in this mutation.
func (*ItemMutation) WarrantyExpires ¶
func (m *ItemMutation) WarrantyExpires() (r time.Time, exists bool)
WarrantyExpires returns the value of the "warranty_expires" field in the mutation.
func (*ItemMutation) WarrantyExpiresCleared ¶
func (m *ItemMutation) WarrantyExpiresCleared() bool
WarrantyExpiresCleared returns if the "warranty_expires" field was cleared in this mutation.
func (*ItemMutation) Where ¶
func (m *ItemMutation) Where(ps ...predicate.Item)
Where appends a list predicates to the ItemMutation builder.
func (*ItemMutation) WhereP ¶
func (m *ItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ItemQuery ¶
type ItemQuery struct {
// contains filtered or unexported fields
}
ItemQuery is the builder for querying Item entities.
func (*ItemQuery) Aggregate ¶
func (iq *ItemQuery) Aggregate(fns ...AggregateFunc) *ItemSelect
Aggregate returns a ItemSelect configured with the given aggregations.
func (*ItemQuery) Clone ¶
Clone returns a duplicate of the ItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ItemQuery) First ¶
First returns the first Item entity from the query. Returns a *NotFoundError when no Item was found.
func (*ItemQuery) FirstID ¶
FirstID returns the first Item ID from the query. Returns a *NotFoundError when no Item ID was found.
func (*ItemQuery) GroupBy ¶
func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Item.Query(). GroupBy(item.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ItemQuery) Only ¶
Only returns a single Item entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Item entity is found. Returns a *NotFoundError when no Item entities are found.
func (*ItemQuery) OnlyID ¶
OnlyID is like Only, but returns the only Item ID in the query. Returns a *NotSingularError when more than one Item ID is found. Returns a *NotFoundError when no entities are found.
func (*ItemQuery) Order ¶
func (iq *ItemQuery) Order(o ...item.OrderOption) *ItemQuery
Order specifies how the records should be ordered.
func (*ItemQuery) QueryAttachments ¶
func (iq *ItemQuery) QueryAttachments() *AttachmentQuery
QueryAttachments chains the current query on the "attachments" edge.
func (*ItemQuery) QueryChildren ¶
QueryChildren chains the current query on the "children" edge.
func (*ItemQuery) QueryFields ¶
func (iq *ItemQuery) QueryFields() *ItemFieldQuery
QueryFields chains the current query on the "fields" edge.
func (*ItemQuery) QueryGroup ¶
func (iq *ItemQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*ItemQuery) QueryLabel ¶
func (iq *ItemQuery) QueryLabel() *LabelQuery
QueryLabel chains the current query on the "label" edge.
func (*ItemQuery) QueryLocation ¶
func (iq *ItemQuery) QueryLocation() *LocationQuery
QueryLocation chains the current query on the "location" edge.
func (*ItemQuery) QueryMaintenanceEntries ¶
func (iq *ItemQuery) QueryMaintenanceEntries() *MaintenanceEntryQuery
QueryMaintenanceEntries chains the current query on the "maintenance_entries" edge.
func (*ItemQuery) QueryParent ¶
QueryParent chains the current query on the "parent" edge.
func (*ItemQuery) Select ¶
func (iq *ItemQuery) Select(fields ...string) *ItemSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Item.Query(). Select(item.FieldCreatedAt). Scan(ctx, &v)
func (*ItemQuery) 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 (*ItemQuery) WithAttachments ¶
func (iq *ItemQuery) WithAttachments(opts ...func(*AttachmentQuery)) *ItemQuery
WithAttachments tells the query-builder to eager-load the nodes that are connected to the "attachments" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithChildren ¶
WithChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithFields ¶
func (iq *ItemQuery) WithFields(opts ...func(*ItemFieldQuery)) *ItemQuery
WithFields tells the query-builder to eager-load the nodes that are connected to the "fields" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithGroup ¶
func (iq *ItemQuery) WithGroup(opts ...func(*GroupQuery)) *ItemQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithLabel ¶
func (iq *ItemQuery) WithLabel(opts ...func(*LabelQuery)) *ItemQuery
WithLabel tells the query-builder to eager-load the nodes that are connected to the "label" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithLocation ¶
func (iq *ItemQuery) WithLocation(opts ...func(*LocationQuery)) *ItemQuery
WithLocation tells the query-builder to eager-load the nodes that are connected to the "location" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithMaintenanceEntries ¶
func (iq *ItemQuery) WithMaintenanceEntries(opts ...func(*MaintenanceEntryQuery)) *ItemQuery
WithMaintenanceEntries tells the query-builder to eager-load the nodes that are connected to the "maintenance_entries" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithParent ¶
WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.
type ItemSelect ¶
type ItemSelect struct { *ItemQuery // contains filtered or unexported fields }
ItemSelect is the builder for selecting fields of Item entities.
func (*ItemSelect) Aggregate ¶
func (is *ItemSelect) Aggregate(fns ...AggregateFunc) *ItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Scan ¶
func (is *ItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemUpdate ¶
type ItemUpdate struct {
// contains filtered or unexported fields
}
ItemUpdate is the builder for updating Item entities.
func (*ItemUpdate) AddAssetID ¶
func (iu *ItemUpdate) AddAssetID(i int) *ItemUpdate
AddAssetID adds i to the "asset_id" field.
func (*ItemUpdate) AddAttachmentIDs ¶
func (iu *ItemUpdate) AddAttachmentIDs(ids ...uuid.UUID) *ItemUpdate
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.
func (*ItemUpdate) AddAttachments ¶
func (iu *ItemUpdate) AddAttachments(a ...*Attachment) *ItemUpdate
AddAttachments adds the "attachments" edges to the Attachment entity.
func (*ItemUpdate) AddChildIDs ¶
func (iu *ItemUpdate) AddChildIDs(ids ...uuid.UUID) *ItemUpdate
AddChildIDs adds the "children" edge to the Item entity by IDs.
func (*ItemUpdate) AddChildren ¶
func (iu *ItemUpdate) AddChildren(i ...*Item) *ItemUpdate
AddChildren adds the "children" edges to the Item entity.
func (*ItemUpdate) AddFieldIDs ¶
func (iu *ItemUpdate) AddFieldIDs(ids ...uuid.UUID) *ItemUpdate
AddFieldIDs adds the "fields" edge to the ItemField entity by IDs.
func (*ItemUpdate) AddFields ¶
func (iu *ItemUpdate) AddFields(i ...*ItemField) *ItemUpdate
AddFields adds the "fields" edges to the ItemField entity.
func (*ItemUpdate) AddLabel ¶
func (iu *ItemUpdate) AddLabel(l ...*Label) *ItemUpdate
AddLabel adds the "label" edges to the Label entity.
func (*ItemUpdate) AddLabelIDs ¶
func (iu *ItemUpdate) AddLabelIDs(ids ...uuid.UUID) *ItemUpdate
AddLabelIDs adds the "label" edge to the Label entity by IDs.
func (*ItemUpdate) AddMaintenanceEntries ¶
func (iu *ItemUpdate) AddMaintenanceEntries(m ...*MaintenanceEntry) *ItemUpdate
AddMaintenanceEntries adds the "maintenance_entries" edges to the MaintenanceEntry entity.
func (*ItemUpdate) AddMaintenanceEntryIDs ¶
func (iu *ItemUpdate) AddMaintenanceEntryIDs(ids ...uuid.UUID) *ItemUpdate
AddMaintenanceEntryIDs adds the "maintenance_entries" edge to the MaintenanceEntry entity by IDs.
func (*ItemUpdate) AddPurchasePrice ¶
func (iu *ItemUpdate) AddPurchasePrice(f float64) *ItemUpdate
AddPurchasePrice adds f to the "purchase_price" field.
func (*ItemUpdate) AddQuantity ¶
func (iu *ItemUpdate) AddQuantity(i int) *ItemUpdate
AddQuantity adds i to the "quantity" field.
func (*ItemUpdate) AddSoldPrice ¶
func (iu *ItemUpdate) AddSoldPrice(f float64) *ItemUpdate
AddSoldPrice adds f to the "sold_price" field.
func (*ItemUpdate) ClearAttachments ¶
func (iu *ItemUpdate) ClearAttachments() *ItemUpdate
ClearAttachments clears all "attachments" edges to the Attachment entity.
func (*ItemUpdate) ClearChildren ¶
func (iu *ItemUpdate) ClearChildren() *ItemUpdate
ClearChildren clears all "children" edges to the Item entity.
func (*ItemUpdate) ClearDescription ¶
func (iu *ItemUpdate) ClearDescription() *ItemUpdate
ClearDescription clears the value of the "description" field.
func (*ItemUpdate) ClearFields ¶
func (iu *ItemUpdate) ClearFields() *ItemUpdate
ClearFields clears all "fields" edges to the ItemField entity.
func (*ItemUpdate) ClearGroup ¶
func (iu *ItemUpdate) ClearGroup() *ItemUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*ItemUpdate) ClearImportRef ¶
func (iu *ItemUpdate) ClearImportRef() *ItemUpdate
ClearImportRef clears the value of the "import_ref" field.
func (*ItemUpdate) ClearLabel ¶
func (iu *ItemUpdate) ClearLabel() *ItemUpdate
ClearLabel clears all "label" edges to the Label entity.
func (*ItemUpdate) ClearLocation ¶
func (iu *ItemUpdate) ClearLocation() *ItemUpdate
ClearLocation clears the "location" edge to the Location entity.
func (*ItemUpdate) ClearMaintenanceEntries ¶
func (iu *ItemUpdate) ClearMaintenanceEntries() *ItemUpdate
ClearMaintenanceEntries clears all "maintenance_entries" edges to the MaintenanceEntry entity.
func (*ItemUpdate) ClearManufacturer ¶
func (iu *ItemUpdate) ClearManufacturer() *ItemUpdate
ClearManufacturer clears the value of the "manufacturer" field.
func (*ItemUpdate) ClearModelNumber ¶
func (iu *ItemUpdate) ClearModelNumber() *ItemUpdate
ClearModelNumber clears the value of the "model_number" field.
func (*ItemUpdate) ClearNotes ¶
func (iu *ItemUpdate) ClearNotes() *ItemUpdate
ClearNotes clears the value of the "notes" field.
func (*ItemUpdate) ClearParent ¶
func (iu *ItemUpdate) ClearParent() *ItemUpdate
ClearParent clears the "parent" edge to the Item entity.
func (*ItemUpdate) ClearPurchaseFrom ¶
func (iu *ItemUpdate) ClearPurchaseFrom() *ItemUpdate
ClearPurchaseFrom clears the value of the "purchase_from" field.
func (*ItemUpdate) ClearPurchaseTime ¶
func (iu *ItemUpdate) ClearPurchaseTime() *ItemUpdate
ClearPurchaseTime clears the value of the "purchase_time" field.
func (*ItemUpdate) ClearSerialNumber ¶
func (iu *ItemUpdate) ClearSerialNumber() *ItemUpdate
ClearSerialNumber clears the value of the "serial_number" field.
func (*ItemUpdate) ClearSoldNotes ¶
func (iu *ItemUpdate) ClearSoldNotes() *ItemUpdate
ClearSoldNotes clears the value of the "sold_notes" field.
func (*ItemUpdate) ClearSoldTime ¶
func (iu *ItemUpdate) ClearSoldTime() *ItemUpdate
ClearSoldTime clears the value of the "sold_time" field.
func (*ItemUpdate) ClearSoldTo ¶
func (iu *ItemUpdate) ClearSoldTo() *ItemUpdate
ClearSoldTo clears the value of the "sold_to" field.
func (*ItemUpdate) ClearWarrantyDetails ¶
func (iu *ItemUpdate) ClearWarrantyDetails() *ItemUpdate
ClearWarrantyDetails clears the value of the "warranty_details" field.
func (*ItemUpdate) ClearWarrantyExpires ¶
func (iu *ItemUpdate) ClearWarrantyExpires() *ItemUpdate
ClearWarrantyExpires clears the value of the "warranty_expires" field.
func (*ItemUpdate) Exec ¶
func (iu *ItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemUpdate) ExecX ¶
func (iu *ItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpdate) Mutation ¶
func (iu *ItemUpdate) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemUpdate) RemoveAttachmentIDs ¶
func (iu *ItemUpdate) RemoveAttachmentIDs(ids ...uuid.UUID) *ItemUpdate
RemoveAttachmentIDs removes the "attachments" edge to Attachment entities by IDs.
func (*ItemUpdate) RemoveAttachments ¶
func (iu *ItemUpdate) RemoveAttachments(a ...*Attachment) *ItemUpdate
RemoveAttachments removes "attachments" edges to Attachment entities.
func (*ItemUpdate) RemoveChildIDs ¶
func (iu *ItemUpdate) RemoveChildIDs(ids ...uuid.UUID) *ItemUpdate
RemoveChildIDs removes the "children" edge to Item entities by IDs.
func (*ItemUpdate) RemoveChildren ¶
func (iu *ItemUpdate) RemoveChildren(i ...*Item) *ItemUpdate
RemoveChildren removes "children" edges to Item entities.
func (*ItemUpdate) RemoveFieldIDs ¶
func (iu *ItemUpdate) RemoveFieldIDs(ids ...uuid.UUID) *ItemUpdate
RemoveFieldIDs removes the "fields" edge to ItemField entities by IDs.
func (*ItemUpdate) RemoveFields ¶
func (iu *ItemUpdate) RemoveFields(i ...*ItemField) *ItemUpdate
RemoveFields removes "fields" edges to ItemField entities.
func (*ItemUpdate) RemoveLabel ¶
func (iu *ItemUpdate) RemoveLabel(l ...*Label) *ItemUpdate
RemoveLabel removes "label" edges to Label entities.
func (*ItemUpdate) RemoveLabelIDs ¶
func (iu *ItemUpdate) RemoveLabelIDs(ids ...uuid.UUID) *ItemUpdate
RemoveLabelIDs removes the "label" edge to Label entities by IDs.
func (*ItemUpdate) RemoveMaintenanceEntries ¶
func (iu *ItemUpdate) RemoveMaintenanceEntries(m ...*MaintenanceEntry) *ItemUpdate
RemoveMaintenanceEntries removes "maintenance_entries" edges to MaintenanceEntry entities.
func (*ItemUpdate) RemoveMaintenanceEntryIDs ¶
func (iu *ItemUpdate) RemoveMaintenanceEntryIDs(ids ...uuid.UUID) *ItemUpdate
RemoveMaintenanceEntryIDs removes the "maintenance_entries" edge to MaintenanceEntry entities by IDs.
func (*ItemUpdate) Save ¶
func (iu *ItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ItemUpdate) SaveX ¶
func (iu *ItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ItemUpdate) SetArchived ¶
func (iu *ItemUpdate) SetArchived(b bool) *ItemUpdate
SetArchived sets the "archived" field.
func (*ItemUpdate) SetAssetID ¶
func (iu *ItemUpdate) SetAssetID(i int) *ItemUpdate
SetAssetID sets the "asset_id" field.
func (*ItemUpdate) SetDescription ¶
func (iu *ItemUpdate) SetDescription(s string) *ItemUpdate
SetDescription sets the "description" field.
func (*ItemUpdate) SetGroup ¶
func (iu *ItemUpdate) SetGroup(g *Group) *ItemUpdate
SetGroup sets the "group" edge to the Group entity.
func (*ItemUpdate) SetGroupID ¶
func (iu *ItemUpdate) SetGroupID(id uuid.UUID) *ItemUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*ItemUpdate) SetImportRef ¶
func (iu *ItemUpdate) SetImportRef(s string) *ItemUpdate
SetImportRef sets the "import_ref" field.
func (*ItemUpdate) SetInsured ¶
func (iu *ItemUpdate) SetInsured(b bool) *ItemUpdate
SetInsured sets the "insured" field.
func (*ItemUpdate) SetLifetimeWarranty ¶
func (iu *ItemUpdate) SetLifetimeWarranty(b bool) *ItemUpdate
SetLifetimeWarranty sets the "lifetime_warranty" field.
func (*ItemUpdate) SetLocation ¶
func (iu *ItemUpdate) SetLocation(l *Location) *ItemUpdate
SetLocation sets the "location" edge to the Location entity.
func (*ItemUpdate) SetLocationID ¶
func (iu *ItemUpdate) SetLocationID(id uuid.UUID) *ItemUpdate
SetLocationID sets the "location" edge to the Location entity by ID.
func (*ItemUpdate) SetManufacturer ¶
func (iu *ItemUpdate) SetManufacturer(s string) *ItemUpdate
SetManufacturer sets the "manufacturer" field.
func (*ItemUpdate) SetModelNumber ¶
func (iu *ItemUpdate) SetModelNumber(s string) *ItemUpdate
SetModelNumber sets the "model_number" field.
func (*ItemUpdate) SetName ¶
func (iu *ItemUpdate) SetName(s string) *ItemUpdate
SetName sets the "name" field.
func (*ItemUpdate) SetNillableArchived ¶
func (iu *ItemUpdate) SetNillableArchived(b *bool) *ItemUpdate
SetNillableArchived sets the "archived" field if the given value is not nil.
func (*ItemUpdate) SetNillableAssetID ¶
func (iu *ItemUpdate) SetNillableAssetID(i *int) *ItemUpdate
SetNillableAssetID sets the "asset_id" field if the given value is not nil.
func (*ItemUpdate) SetNillableDescription ¶
func (iu *ItemUpdate) SetNillableDescription(s *string) *ItemUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ItemUpdate) SetNillableImportRef ¶
func (iu *ItemUpdate) SetNillableImportRef(s *string) *ItemUpdate
SetNillableImportRef sets the "import_ref" field if the given value is not nil.
func (*ItemUpdate) SetNillableInsured ¶
func (iu *ItemUpdate) SetNillableInsured(b *bool) *ItemUpdate
SetNillableInsured sets the "insured" field if the given value is not nil.
func (*ItemUpdate) SetNillableLifetimeWarranty ¶
func (iu *ItemUpdate) SetNillableLifetimeWarranty(b *bool) *ItemUpdate
SetNillableLifetimeWarranty sets the "lifetime_warranty" field if the given value is not nil.
func (*ItemUpdate) SetNillableLocationID ¶
func (iu *ItemUpdate) SetNillableLocationID(id *uuid.UUID) *ItemUpdate
SetNillableLocationID sets the "location" edge to the Location entity by ID if the given value is not nil.
func (*ItemUpdate) SetNillableManufacturer ¶
func (iu *ItemUpdate) SetNillableManufacturer(s *string) *ItemUpdate
SetNillableManufacturer sets the "manufacturer" field if the given value is not nil.
func (*ItemUpdate) SetNillableModelNumber ¶
func (iu *ItemUpdate) SetNillableModelNumber(s *string) *ItemUpdate
SetNillableModelNumber sets the "model_number" field if the given value is not nil.
func (*ItemUpdate) SetNillableName ¶
func (iu *ItemUpdate) SetNillableName(s *string) *ItemUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ItemUpdate) SetNillableNotes ¶
func (iu *ItemUpdate) SetNillableNotes(s *string) *ItemUpdate
SetNillableNotes sets the "notes" field if the given value is not nil.
func (*ItemUpdate) SetNillableParentID ¶
func (iu *ItemUpdate) SetNillableParentID(id *uuid.UUID) *ItemUpdate
SetNillableParentID sets the "parent" edge to the Item entity by ID if the given value is not nil.
func (*ItemUpdate) SetNillablePurchaseFrom ¶
func (iu *ItemUpdate) SetNillablePurchaseFrom(s *string) *ItemUpdate
SetNillablePurchaseFrom sets the "purchase_from" field if the given value is not nil.
func (*ItemUpdate) SetNillablePurchasePrice ¶
func (iu *ItemUpdate) SetNillablePurchasePrice(f *float64) *ItemUpdate
SetNillablePurchasePrice sets the "purchase_price" field if the given value is not nil.
func (*ItemUpdate) SetNillablePurchaseTime ¶
func (iu *ItemUpdate) SetNillablePurchaseTime(t *time.Time) *ItemUpdate
SetNillablePurchaseTime sets the "purchase_time" field if the given value is not nil.
func (*ItemUpdate) SetNillableQuantity ¶
func (iu *ItemUpdate) SetNillableQuantity(i *int) *ItemUpdate
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*ItemUpdate) SetNillableSerialNumber ¶
func (iu *ItemUpdate) SetNillableSerialNumber(s *string) *ItemUpdate
SetNillableSerialNumber sets the "serial_number" field if the given value is not nil.
func (*ItemUpdate) SetNillableSoldNotes ¶
func (iu *ItemUpdate) SetNillableSoldNotes(s *string) *ItemUpdate
SetNillableSoldNotes sets the "sold_notes" field if the given value is not nil.
func (*ItemUpdate) SetNillableSoldPrice ¶
func (iu *ItemUpdate) SetNillableSoldPrice(f *float64) *ItemUpdate
SetNillableSoldPrice sets the "sold_price" field if the given value is not nil.
func (*ItemUpdate) SetNillableSoldTime ¶
func (iu *ItemUpdate) SetNillableSoldTime(t *time.Time) *ItemUpdate
SetNillableSoldTime sets the "sold_time" field if the given value is not nil.
func (*ItemUpdate) SetNillableSoldTo ¶
func (iu *ItemUpdate) SetNillableSoldTo(s *string) *ItemUpdate
SetNillableSoldTo sets the "sold_to" field if the given value is not nil.
func (*ItemUpdate) SetNillableWarrantyDetails ¶
func (iu *ItemUpdate) SetNillableWarrantyDetails(s *string) *ItemUpdate
SetNillableWarrantyDetails sets the "warranty_details" field if the given value is not nil.
func (*ItemUpdate) SetNillableWarrantyExpires ¶
func (iu *ItemUpdate) SetNillableWarrantyExpires(t *time.Time) *ItemUpdate
SetNillableWarrantyExpires sets the "warranty_expires" field if the given value is not nil.
func (*ItemUpdate) SetNotes ¶
func (iu *ItemUpdate) SetNotes(s string) *ItemUpdate
SetNotes sets the "notes" field.
func (*ItemUpdate) SetParent ¶
func (iu *ItemUpdate) SetParent(i *Item) *ItemUpdate
SetParent sets the "parent" edge to the Item entity.
func (*ItemUpdate) SetParentID ¶
func (iu *ItemUpdate) SetParentID(id uuid.UUID) *ItemUpdate
SetParentID sets the "parent" edge to the Item entity by ID.
func (*ItemUpdate) SetPurchaseFrom ¶
func (iu *ItemUpdate) SetPurchaseFrom(s string) *ItemUpdate
SetPurchaseFrom sets the "purchase_from" field.
func (*ItemUpdate) SetPurchasePrice ¶
func (iu *ItemUpdate) SetPurchasePrice(f float64) *ItemUpdate
SetPurchasePrice sets the "purchase_price" field.
func (*ItemUpdate) SetPurchaseTime ¶
func (iu *ItemUpdate) SetPurchaseTime(t time.Time) *ItemUpdate
SetPurchaseTime sets the "purchase_time" field.
func (*ItemUpdate) SetQuantity ¶
func (iu *ItemUpdate) SetQuantity(i int) *ItemUpdate
SetQuantity sets the "quantity" field.
func (*ItemUpdate) SetSerialNumber ¶
func (iu *ItemUpdate) SetSerialNumber(s string) *ItemUpdate
SetSerialNumber sets the "serial_number" field.
func (*ItemUpdate) SetSoldNotes ¶
func (iu *ItemUpdate) SetSoldNotes(s string) *ItemUpdate
SetSoldNotes sets the "sold_notes" field.
func (*ItemUpdate) SetSoldPrice ¶
func (iu *ItemUpdate) SetSoldPrice(f float64) *ItemUpdate
SetSoldPrice sets the "sold_price" field.
func (*ItemUpdate) SetSoldTime ¶
func (iu *ItemUpdate) SetSoldTime(t time.Time) *ItemUpdate
SetSoldTime sets the "sold_time" field.
func (*ItemUpdate) SetSoldTo ¶
func (iu *ItemUpdate) SetSoldTo(s string) *ItemUpdate
SetSoldTo sets the "sold_to" field.
func (*ItemUpdate) SetUpdatedAt ¶
func (iu *ItemUpdate) SetUpdatedAt(t time.Time) *ItemUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ItemUpdate) SetWarrantyDetails ¶
func (iu *ItemUpdate) SetWarrantyDetails(s string) *ItemUpdate
SetWarrantyDetails sets the "warranty_details" field.
func (*ItemUpdate) SetWarrantyExpires ¶
func (iu *ItemUpdate) SetWarrantyExpires(t time.Time) *ItemUpdate
SetWarrantyExpires sets the "warranty_expires" field.
func (*ItemUpdate) Where ¶
func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate
Where appends a list predicates to the ItemUpdate builder.
type ItemUpdateOne ¶
type ItemUpdateOne struct {
// contains filtered or unexported fields
}
ItemUpdateOne is the builder for updating a single Item entity.
func (*ItemUpdateOne) AddAssetID ¶
func (iuo *ItemUpdateOne) AddAssetID(i int) *ItemUpdateOne
AddAssetID adds i to the "asset_id" field.
func (*ItemUpdateOne) AddAttachmentIDs ¶
func (iuo *ItemUpdateOne) AddAttachmentIDs(ids ...uuid.UUID) *ItemUpdateOne
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.
func (*ItemUpdateOne) AddAttachments ¶
func (iuo *ItemUpdateOne) AddAttachments(a ...*Attachment) *ItemUpdateOne
AddAttachments adds the "attachments" edges to the Attachment entity.
func (*ItemUpdateOne) AddChildIDs ¶
func (iuo *ItemUpdateOne) AddChildIDs(ids ...uuid.UUID) *ItemUpdateOne
AddChildIDs adds the "children" edge to the Item entity by IDs.
func (*ItemUpdateOne) AddChildren ¶
func (iuo *ItemUpdateOne) AddChildren(i ...*Item) *ItemUpdateOne
AddChildren adds the "children" edges to the Item entity.
func (*ItemUpdateOne) AddFieldIDs ¶
func (iuo *ItemUpdateOne) AddFieldIDs(ids ...uuid.UUID) *ItemUpdateOne
AddFieldIDs adds the "fields" edge to the ItemField entity by IDs.
func (*ItemUpdateOne) AddFields ¶
func (iuo *ItemUpdateOne) AddFields(i ...*ItemField) *ItemUpdateOne
AddFields adds the "fields" edges to the ItemField entity.
func (*ItemUpdateOne) AddLabel ¶
func (iuo *ItemUpdateOne) AddLabel(l ...*Label) *ItemUpdateOne
AddLabel adds the "label" edges to the Label entity.
func (*ItemUpdateOne) AddLabelIDs ¶
func (iuo *ItemUpdateOne) AddLabelIDs(ids ...uuid.UUID) *ItemUpdateOne
AddLabelIDs adds the "label" edge to the Label entity by IDs.
func (*ItemUpdateOne) AddMaintenanceEntries ¶
func (iuo *ItemUpdateOne) AddMaintenanceEntries(m ...*MaintenanceEntry) *ItemUpdateOne
AddMaintenanceEntries adds the "maintenance_entries" edges to the MaintenanceEntry entity.
func (*ItemUpdateOne) AddMaintenanceEntryIDs ¶
func (iuo *ItemUpdateOne) AddMaintenanceEntryIDs(ids ...uuid.UUID) *ItemUpdateOne
AddMaintenanceEntryIDs adds the "maintenance_entries" edge to the MaintenanceEntry entity by IDs.
func (*ItemUpdateOne) AddPurchasePrice ¶
func (iuo *ItemUpdateOne) AddPurchasePrice(f float64) *ItemUpdateOne
AddPurchasePrice adds f to the "purchase_price" field.
func (*ItemUpdateOne) AddQuantity ¶
func (iuo *ItemUpdateOne) AddQuantity(i int) *ItemUpdateOne
AddQuantity adds i to the "quantity" field.
func (*ItemUpdateOne) AddSoldPrice ¶
func (iuo *ItemUpdateOne) AddSoldPrice(f float64) *ItemUpdateOne
AddSoldPrice adds f to the "sold_price" field.
func (*ItemUpdateOne) ClearAttachments ¶
func (iuo *ItemUpdateOne) ClearAttachments() *ItemUpdateOne
ClearAttachments clears all "attachments" edges to the Attachment entity.
func (*ItemUpdateOne) ClearChildren ¶
func (iuo *ItemUpdateOne) ClearChildren() *ItemUpdateOne
ClearChildren clears all "children" edges to the Item entity.
func (*ItemUpdateOne) ClearDescription ¶
func (iuo *ItemUpdateOne) ClearDescription() *ItemUpdateOne
ClearDescription clears the value of the "description" field.
func (*ItemUpdateOne) ClearFields ¶
func (iuo *ItemUpdateOne) ClearFields() *ItemUpdateOne
ClearFields clears all "fields" edges to the ItemField entity.
func (*ItemUpdateOne) ClearGroup ¶
func (iuo *ItemUpdateOne) ClearGroup() *ItemUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*ItemUpdateOne) ClearImportRef ¶
func (iuo *ItemUpdateOne) ClearImportRef() *ItemUpdateOne
ClearImportRef clears the value of the "import_ref" field.
func (*ItemUpdateOne) ClearLabel ¶
func (iuo *ItemUpdateOne) ClearLabel() *ItemUpdateOne
ClearLabel clears all "label" edges to the Label entity.
func (*ItemUpdateOne) ClearLocation ¶
func (iuo *ItemUpdateOne) ClearLocation() *ItemUpdateOne
ClearLocation clears the "location" edge to the Location entity.
func (*ItemUpdateOne) ClearMaintenanceEntries ¶
func (iuo *ItemUpdateOne) ClearMaintenanceEntries() *ItemUpdateOne
ClearMaintenanceEntries clears all "maintenance_entries" edges to the MaintenanceEntry entity.
func (*ItemUpdateOne) ClearManufacturer ¶
func (iuo *ItemUpdateOne) ClearManufacturer() *ItemUpdateOne
ClearManufacturer clears the value of the "manufacturer" field.
func (*ItemUpdateOne) ClearModelNumber ¶
func (iuo *ItemUpdateOne) ClearModelNumber() *ItemUpdateOne
ClearModelNumber clears the value of the "model_number" field.
func (*ItemUpdateOne) ClearNotes ¶
func (iuo *ItemUpdateOne) ClearNotes() *ItemUpdateOne
ClearNotes clears the value of the "notes" field.
func (*ItemUpdateOne) ClearParent ¶
func (iuo *ItemUpdateOne) ClearParent() *ItemUpdateOne
ClearParent clears the "parent" edge to the Item entity.
func (*ItemUpdateOne) ClearPurchaseFrom ¶
func (iuo *ItemUpdateOne) ClearPurchaseFrom() *ItemUpdateOne
ClearPurchaseFrom clears the value of the "purchase_from" field.
func (*ItemUpdateOne) ClearPurchaseTime ¶
func (iuo *ItemUpdateOne) ClearPurchaseTime() *ItemUpdateOne
ClearPurchaseTime clears the value of the "purchase_time" field.
func (*ItemUpdateOne) ClearSerialNumber ¶
func (iuo *ItemUpdateOne) ClearSerialNumber() *ItemUpdateOne
ClearSerialNumber clears the value of the "serial_number" field.
func (*ItemUpdateOne) ClearSoldNotes ¶
func (iuo *ItemUpdateOne) ClearSoldNotes() *ItemUpdateOne
ClearSoldNotes clears the value of the "sold_notes" field.
func (*ItemUpdateOne) ClearSoldTime ¶
func (iuo *ItemUpdateOne) ClearSoldTime() *ItemUpdateOne
ClearSoldTime clears the value of the "sold_time" field.
func (*ItemUpdateOne) ClearSoldTo ¶
func (iuo *ItemUpdateOne) ClearSoldTo() *ItemUpdateOne
ClearSoldTo clears the value of the "sold_to" field.
func (*ItemUpdateOne) ClearWarrantyDetails ¶
func (iuo *ItemUpdateOne) ClearWarrantyDetails() *ItemUpdateOne
ClearWarrantyDetails clears the value of the "warranty_details" field.
func (*ItemUpdateOne) ClearWarrantyExpires ¶
func (iuo *ItemUpdateOne) ClearWarrantyExpires() *ItemUpdateOne
ClearWarrantyExpires clears the value of the "warranty_expires" field.
func (*ItemUpdateOne) Exec ¶
func (iuo *ItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ItemUpdateOne) ExecX ¶
func (iuo *ItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpdateOne) Mutation ¶
func (iuo *ItemUpdateOne) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemUpdateOne) RemoveAttachmentIDs ¶
func (iuo *ItemUpdateOne) RemoveAttachmentIDs(ids ...uuid.UUID) *ItemUpdateOne
RemoveAttachmentIDs removes the "attachments" edge to Attachment entities by IDs.
func (*ItemUpdateOne) RemoveAttachments ¶
func (iuo *ItemUpdateOne) RemoveAttachments(a ...*Attachment) *ItemUpdateOne
RemoveAttachments removes "attachments" edges to Attachment entities.
func (*ItemUpdateOne) RemoveChildIDs ¶
func (iuo *ItemUpdateOne) RemoveChildIDs(ids ...uuid.UUID) *ItemUpdateOne
RemoveChildIDs removes the "children" edge to Item entities by IDs.
func (*ItemUpdateOne) RemoveChildren ¶
func (iuo *ItemUpdateOne) RemoveChildren(i ...*Item) *ItemUpdateOne
RemoveChildren removes "children" edges to Item entities.
func (*ItemUpdateOne) RemoveFieldIDs ¶
func (iuo *ItemUpdateOne) RemoveFieldIDs(ids ...uuid.UUID) *ItemUpdateOne
RemoveFieldIDs removes the "fields" edge to ItemField entities by IDs.
func (*ItemUpdateOne) RemoveFields ¶
func (iuo *ItemUpdateOne) RemoveFields(i ...*ItemField) *ItemUpdateOne
RemoveFields removes "fields" edges to ItemField entities.
func (*ItemUpdateOne) RemoveLabel ¶
func (iuo *ItemUpdateOne) RemoveLabel(l ...*Label) *ItemUpdateOne
RemoveLabel removes "label" edges to Label entities.
func (*ItemUpdateOne) RemoveLabelIDs ¶
func (iuo *ItemUpdateOne) RemoveLabelIDs(ids ...uuid.UUID) *ItemUpdateOne
RemoveLabelIDs removes the "label" edge to Label entities by IDs.
func (*ItemUpdateOne) RemoveMaintenanceEntries ¶
func (iuo *ItemUpdateOne) RemoveMaintenanceEntries(m ...*MaintenanceEntry) *ItemUpdateOne
RemoveMaintenanceEntries removes "maintenance_entries" edges to MaintenanceEntry entities.
func (*ItemUpdateOne) RemoveMaintenanceEntryIDs ¶
func (iuo *ItemUpdateOne) RemoveMaintenanceEntryIDs(ids ...uuid.UUID) *ItemUpdateOne
RemoveMaintenanceEntryIDs removes the "maintenance_entries" edge to MaintenanceEntry entities by IDs.
func (*ItemUpdateOne) Save ¶
func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)
Save executes the query and returns the updated Item entity.
func (*ItemUpdateOne) SaveX ¶
func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item
SaveX is like Save, but panics if an error occurs.
func (*ItemUpdateOne) Select ¶
func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ItemUpdateOne) SetArchived ¶
func (iuo *ItemUpdateOne) SetArchived(b bool) *ItemUpdateOne
SetArchived sets the "archived" field.
func (*ItemUpdateOne) SetAssetID ¶
func (iuo *ItemUpdateOne) SetAssetID(i int) *ItemUpdateOne
SetAssetID sets the "asset_id" field.
func (*ItemUpdateOne) SetDescription ¶
func (iuo *ItemUpdateOne) SetDescription(s string) *ItemUpdateOne
SetDescription sets the "description" field.
func (*ItemUpdateOne) SetGroup ¶
func (iuo *ItemUpdateOne) SetGroup(g *Group) *ItemUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*ItemUpdateOne) SetGroupID ¶
func (iuo *ItemUpdateOne) SetGroupID(id uuid.UUID) *ItemUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*ItemUpdateOne) SetImportRef ¶
func (iuo *ItemUpdateOne) SetImportRef(s string) *ItemUpdateOne
SetImportRef sets the "import_ref" field.
func (*ItemUpdateOne) SetInsured ¶
func (iuo *ItemUpdateOne) SetInsured(b bool) *ItemUpdateOne
SetInsured sets the "insured" field.
func (*ItemUpdateOne) SetLifetimeWarranty ¶
func (iuo *ItemUpdateOne) SetLifetimeWarranty(b bool) *ItemUpdateOne
SetLifetimeWarranty sets the "lifetime_warranty" field.
func (*ItemUpdateOne) SetLocation ¶
func (iuo *ItemUpdateOne) SetLocation(l *Location) *ItemUpdateOne
SetLocation sets the "location" edge to the Location entity.
func (*ItemUpdateOne) SetLocationID ¶
func (iuo *ItemUpdateOne) SetLocationID(id uuid.UUID) *ItemUpdateOne
SetLocationID sets the "location" edge to the Location entity by ID.
func (*ItemUpdateOne) SetManufacturer ¶
func (iuo *ItemUpdateOne) SetManufacturer(s string) *ItemUpdateOne
SetManufacturer sets the "manufacturer" field.
func (*ItemUpdateOne) SetModelNumber ¶
func (iuo *ItemUpdateOne) SetModelNumber(s string) *ItemUpdateOne
SetModelNumber sets the "model_number" field.
func (*ItemUpdateOne) SetName ¶
func (iuo *ItemUpdateOne) SetName(s string) *ItemUpdateOne
SetName sets the "name" field.
func (*ItemUpdateOne) SetNillableArchived ¶
func (iuo *ItemUpdateOne) SetNillableArchived(b *bool) *ItemUpdateOne
SetNillableArchived sets the "archived" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableAssetID ¶
func (iuo *ItemUpdateOne) SetNillableAssetID(i *int) *ItemUpdateOne
SetNillableAssetID sets the "asset_id" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableDescription ¶
func (iuo *ItemUpdateOne) SetNillableDescription(s *string) *ItemUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableImportRef ¶
func (iuo *ItemUpdateOne) SetNillableImportRef(s *string) *ItemUpdateOne
SetNillableImportRef sets the "import_ref" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableInsured ¶
func (iuo *ItemUpdateOne) SetNillableInsured(b *bool) *ItemUpdateOne
SetNillableInsured sets the "insured" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableLifetimeWarranty ¶
func (iuo *ItemUpdateOne) SetNillableLifetimeWarranty(b *bool) *ItemUpdateOne
SetNillableLifetimeWarranty sets the "lifetime_warranty" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableLocationID ¶
func (iuo *ItemUpdateOne) SetNillableLocationID(id *uuid.UUID) *ItemUpdateOne
SetNillableLocationID sets the "location" edge to the Location entity by ID if the given value is not nil.
func (*ItemUpdateOne) SetNillableManufacturer ¶
func (iuo *ItemUpdateOne) SetNillableManufacturer(s *string) *ItemUpdateOne
SetNillableManufacturer sets the "manufacturer" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableModelNumber ¶
func (iuo *ItemUpdateOne) SetNillableModelNumber(s *string) *ItemUpdateOne
SetNillableModelNumber sets the "model_number" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableName ¶
func (iuo *ItemUpdateOne) SetNillableName(s *string) *ItemUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableNotes ¶
func (iuo *ItemUpdateOne) SetNillableNotes(s *string) *ItemUpdateOne
SetNillableNotes sets the "notes" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableParentID ¶
func (iuo *ItemUpdateOne) SetNillableParentID(id *uuid.UUID) *ItemUpdateOne
SetNillableParentID sets the "parent" edge to the Item entity by ID if the given value is not nil.
func (*ItemUpdateOne) SetNillablePurchaseFrom ¶
func (iuo *ItemUpdateOne) SetNillablePurchaseFrom(s *string) *ItemUpdateOne
SetNillablePurchaseFrom sets the "purchase_from" field if the given value is not nil.
func (*ItemUpdateOne) SetNillablePurchasePrice ¶
func (iuo *ItemUpdateOne) SetNillablePurchasePrice(f *float64) *ItemUpdateOne
SetNillablePurchasePrice sets the "purchase_price" field if the given value is not nil.
func (*ItemUpdateOne) SetNillablePurchaseTime ¶
func (iuo *ItemUpdateOne) SetNillablePurchaseTime(t *time.Time) *ItemUpdateOne
SetNillablePurchaseTime sets the "purchase_time" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableQuantity ¶
func (iuo *ItemUpdateOne) SetNillableQuantity(i *int) *ItemUpdateOne
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableSerialNumber ¶
func (iuo *ItemUpdateOne) SetNillableSerialNumber(s *string) *ItemUpdateOne
SetNillableSerialNumber sets the "serial_number" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableSoldNotes ¶
func (iuo *ItemUpdateOne) SetNillableSoldNotes(s *string) *ItemUpdateOne
SetNillableSoldNotes sets the "sold_notes" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableSoldPrice ¶
func (iuo *ItemUpdateOne) SetNillableSoldPrice(f *float64) *ItemUpdateOne
SetNillableSoldPrice sets the "sold_price" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableSoldTime ¶
func (iuo *ItemUpdateOne) SetNillableSoldTime(t *time.Time) *ItemUpdateOne
SetNillableSoldTime sets the "sold_time" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableSoldTo ¶
func (iuo *ItemUpdateOne) SetNillableSoldTo(s *string) *ItemUpdateOne
SetNillableSoldTo sets the "sold_to" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableWarrantyDetails ¶
func (iuo *ItemUpdateOne) SetNillableWarrantyDetails(s *string) *ItemUpdateOne
SetNillableWarrantyDetails sets the "warranty_details" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableWarrantyExpires ¶
func (iuo *ItemUpdateOne) SetNillableWarrantyExpires(t *time.Time) *ItemUpdateOne
SetNillableWarrantyExpires sets the "warranty_expires" field if the given value is not nil.
func (*ItemUpdateOne) SetNotes ¶
func (iuo *ItemUpdateOne) SetNotes(s string) *ItemUpdateOne
SetNotes sets the "notes" field.
func (*ItemUpdateOne) SetParent ¶
func (iuo *ItemUpdateOne) SetParent(i *Item) *ItemUpdateOne
SetParent sets the "parent" edge to the Item entity.
func (*ItemUpdateOne) SetParentID ¶
func (iuo *ItemUpdateOne) SetParentID(id uuid.UUID) *ItemUpdateOne
SetParentID sets the "parent" edge to the Item entity by ID.
func (*ItemUpdateOne) SetPurchaseFrom ¶
func (iuo *ItemUpdateOne) SetPurchaseFrom(s string) *ItemUpdateOne
SetPurchaseFrom sets the "purchase_from" field.
func (*ItemUpdateOne) SetPurchasePrice ¶
func (iuo *ItemUpdateOne) SetPurchasePrice(f float64) *ItemUpdateOne
SetPurchasePrice sets the "purchase_price" field.
func (*ItemUpdateOne) SetPurchaseTime ¶
func (iuo *ItemUpdateOne) SetPurchaseTime(t time.Time) *ItemUpdateOne
SetPurchaseTime sets the "purchase_time" field.
func (*ItemUpdateOne) SetQuantity ¶
func (iuo *ItemUpdateOne) SetQuantity(i int) *ItemUpdateOne
SetQuantity sets the "quantity" field.
func (*ItemUpdateOne) SetSerialNumber ¶
func (iuo *ItemUpdateOne) SetSerialNumber(s string) *ItemUpdateOne
SetSerialNumber sets the "serial_number" field.
func (*ItemUpdateOne) SetSoldNotes ¶
func (iuo *ItemUpdateOne) SetSoldNotes(s string) *ItemUpdateOne
SetSoldNotes sets the "sold_notes" field.
func (*ItemUpdateOne) SetSoldPrice ¶
func (iuo *ItemUpdateOne) SetSoldPrice(f float64) *ItemUpdateOne
SetSoldPrice sets the "sold_price" field.
func (*ItemUpdateOne) SetSoldTime ¶
func (iuo *ItemUpdateOne) SetSoldTime(t time.Time) *ItemUpdateOne
SetSoldTime sets the "sold_time" field.
func (*ItemUpdateOne) SetSoldTo ¶
func (iuo *ItemUpdateOne) SetSoldTo(s string) *ItemUpdateOne
SetSoldTo sets the "sold_to" field.
func (*ItemUpdateOne) SetUpdatedAt ¶
func (iuo *ItemUpdateOne) SetUpdatedAt(t time.Time) *ItemUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ItemUpdateOne) SetWarrantyDetails ¶
func (iuo *ItemUpdateOne) SetWarrantyDetails(s string) *ItemUpdateOne
SetWarrantyDetails sets the "warranty_details" field.
func (*ItemUpdateOne) SetWarrantyExpires ¶
func (iuo *ItemUpdateOne) SetWarrantyExpires(t time.Time) *ItemUpdateOne
SetWarrantyExpires sets the "warranty_expires" field.
func (*ItemUpdateOne) Where ¶
func (iuo *ItemUpdateOne) Where(ps ...predicate.Item) *ItemUpdateOne
Where appends a list predicates to the ItemUpdate builder.
type Label ¶
type Label struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Color holds the value of the "color" field. Color string `json:"color,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the LabelQuery when eager-loading is set. Edges LabelEdges `json:"edges"` // contains filtered or unexported fields }
Label is the model entity for the Label schema.
func (*Label) QueryGroup ¶
func (l *Label) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the Label entity.
func (*Label) QueryItems ¶
QueryItems queries the "items" edge of the Label entity.
func (*Label) Unwrap ¶
Unwrap unwraps the Label 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 (*Label) Update ¶
func (l *Label) Update() *LabelUpdateOne
Update returns a builder for updating this Label. Note that you need to call Label.Unwrap() before calling this method if this Label was returned from a transaction, and the transaction was committed or rolled back.
type LabelClient ¶
type LabelClient struct {
// contains filtered or unexported fields
}
LabelClient is a client for the Label schema.
func NewLabelClient ¶
func NewLabelClient(c config) *LabelClient
NewLabelClient returns a client for the Label from the given config.
func (*LabelClient) Create ¶
func (c *LabelClient) Create() *LabelCreate
Create returns a builder for creating a Label entity.
func (*LabelClient) CreateBulk ¶
func (c *LabelClient) CreateBulk(builders ...*LabelCreate) *LabelCreateBulk
CreateBulk returns a builder for creating a bulk of Label entities.
func (*LabelClient) Delete ¶
func (c *LabelClient) Delete() *LabelDelete
Delete returns a delete builder for Label.
func (*LabelClient) DeleteOne ¶
func (c *LabelClient) DeleteOne(l *Label) *LabelDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LabelClient) DeleteOneID ¶
func (c *LabelClient) DeleteOneID(id uuid.UUID) *LabelDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LabelClient) Intercept ¶
func (c *LabelClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `label.Intercept(f(g(h())))`.
func (*LabelClient) Interceptors ¶
func (c *LabelClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LabelClient) MapCreateBulk ¶
func (c *LabelClient) MapCreateBulk(slice any, setFunc func(*LabelCreate, int)) *LabelCreateBulk
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 (*LabelClient) Query ¶
func (c *LabelClient) Query() *LabelQuery
Query returns a query builder for Label.
func (*LabelClient) QueryGroup ¶
func (c *LabelClient) QueryGroup(l *Label) *GroupQuery
QueryGroup queries the group edge of a Label.
func (*LabelClient) QueryItems ¶
func (c *LabelClient) QueryItems(l *Label) *ItemQuery
QueryItems queries the items edge of a Label.
func (*LabelClient) Update ¶
func (c *LabelClient) Update() *LabelUpdate
Update returns an update builder for Label.
func (*LabelClient) UpdateOne ¶
func (c *LabelClient) UpdateOne(l *Label) *LabelUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LabelClient) UpdateOneID ¶
func (c *LabelClient) UpdateOneID(id uuid.UUID) *LabelUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LabelClient) Use ¶
func (c *LabelClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `label.Hooks(f(g(h())))`.
type LabelCreate ¶
type LabelCreate struct {
// contains filtered or unexported fields
}
LabelCreate is the builder for creating a Label entity.
func (*LabelCreate) AddItemIDs ¶
func (lc *LabelCreate) AddItemIDs(ids ...uuid.UUID) *LabelCreate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*LabelCreate) AddItems ¶
func (lc *LabelCreate) AddItems(i ...*Item) *LabelCreate
AddItems adds the "items" edges to the Item entity.
func (*LabelCreate) Exec ¶
func (lc *LabelCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LabelCreate) ExecX ¶
func (lc *LabelCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LabelCreate) Mutation ¶
func (lc *LabelCreate) Mutation() *LabelMutation
Mutation returns the LabelMutation object of the builder.
func (*LabelCreate) Save ¶
func (lc *LabelCreate) Save(ctx context.Context) (*Label, error)
Save creates the Label in the database.
func (*LabelCreate) SaveX ¶
func (lc *LabelCreate) SaveX(ctx context.Context) *Label
SaveX calls Save and panics if Save returns an error.
func (*LabelCreate) SetColor ¶
func (lc *LabelCreate) SetColor(s string) *LabelCreate
SetColor sets the "color" field.
func (*LabelCreate) SetCreatedAt ¶
func (lc *LabelCreate) SetCreatedAt(t time.Time) *LabelCreate
SetCreatedAt sets the "created_at" field.
func (*LabelCreate) SetDescription ¶
func (lc *LabelCreate) SetDescription(s string) *LabelCreate
SetDescription sets the "description" field.
func (*LabelCreate) SetGroup ¶
func (lc *LabelCreate) SetGroup(g *Group) *LabelCreate
SetGroup sets the "group" edge to the Group entity.
func (*LabelCreate) SetGroupID ¶
func (lc *LabelCreate) SetGroupID(id uuid.UUID) *LabelCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*LabelCreate) SetID ¶
func (lc *LabelCreate) SetID(u uuid.UUID) *LabelCreate
SetID sets the "id" field.
func (*LabelCreate) SetName ¶
func (lc *LabelCreate) SetName(s string) *LabelCreate
SetName sets the "name" field.
func (*LabelCreate) SetNillableColor ¶
func (lc *LabelCreate) SetNillableColor(s *string) *LabelCreate
SetNillableColor sets the "color" field if the given value is not nil.
func (*LabelCreate) SetNillableCreatedAt ¶
func (lc *LabelCreate) SetNillableCreatedAt(t *time.Time) *LabelCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LabelCreate) SetNillableDescription ¶
func (lc *LabelCreate) SetNillableDescription(s *string) *LabelCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LabelCreate) SetNillableID ¶
func (lc *LabelCreate) SetNillableID(u *uuid.UUID) *LabelCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*LabelCreate) SetNillableUpdatedAt ¶
func (lc *LabelCreate) SetNillableUpdatedAt(t *time.Time) *LabelCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*LabelCreate) SetUpdatedAt ¶
func (lc *LabelCreate) SetUpdatedAt(t time.Time) *LabelCreate
SetUpdatedAt sets the "updated_at" field.
type LabelCreateBulk ¶
type LabelCreateBulk struct {
// contains filtered or unexported fields
}
LabelCreateBulk is the builder for creating many Label entities in bulk.
func (*LabelCreateBulk) Exec ¶
func (lcb *LabelCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LabelCreateBulk) ExecX ¶
func (lcb *LabelCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LabelDelete ¶
type LabelDelete struct {
// contains filtered or unexported fields
}
LabelDelete is the builder for deleting a Label entity.
func (*LabelDelete) Exec ¶
func (ld *LabelDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LabelDelete) ExecX ¶
func (ld *LabelDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LabelDelete) Where ¶
func (ld *LabelDelete) Where(ps ...predicate.Label) *LabelDelete
Where appends a list predicates to the LabelDelete builder.
type LabelDeleteOne ¶
type LabelDeleteOne struct {
// contains filtered or unexported fields
}
LabelDeleteOne is the builder for deleting a single Label entity.
func (*LabelDeleteOne) Exec ¶
func (ldo *LabelDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LabelDeleteOne) ExecX ¶
func (ldo *LabelDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LabelDeleteOne) Where ¶
func (ldo *LabelDeleteOne) Where(ps ...predicate.Label) *LabelDeleteOne
Where appends a list predicates to the LabelDelete builder.
type LabelEdges ¶
type LabelEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // Items holds the value of the items edge. Items []*Item `json:"items,omitempty"` // contains filtered or unexported fields }
LabelEdges holds the relations/edges for other nodes in the graph.
func (LabelEdges) GroupOrErr ¶
func (e LabelEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (LabelEdges) ItemsOrErr ¶
func (e LabelEdges) ItemsOrErr() ([]*Item, error)
ItemsOrErr returns the Items value or an error if the edge was not loaded in eager-loading.
type LabelGroupBy ¶
type LabelGroupBy struct {
// contains filtered or unexported fields
}
LabelGroupBy is the group-by builder for Label entities.
func (*LabelGroupBy) Aggregate ¶
func (lgb *LabelGroupBy) Aggregate(fns ...AggregateFunc) *LabelGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LabelGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LabelGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LabelGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LabelGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LabelGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LabelGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LabelGroupBy) Scan ¶
func (lgb *LabelGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LabelGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LabelMutation ¶
type LabelMutation struct {
// contains filtered or unexported fields
}
LabelMutation represents an operation that mutates the Label nodes in the graph.
func (*LabelMutation) AddField ¶
func (m *LabelMutation) 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 (*LabelMutation) AddItemIDs ¶
func (m *LabelMutation) AddItemIDs(ids ...uuid.UUID)
AddItemIDs adds the "items" edge to the Item entity by ids.
func (*LabelMutation) AddedEdges ¶
func (m *LabelMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LabelMutation) AddedField ¶
func (m *LabelMutation) 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 (*LabelMutation) AddedFields ¶
func (m *LabelMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LabelMutation) AddedIDs ¶
func (m *LabelMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LabelMutation) ClearColor ¶
func (m *LabelMutation) ClearColor()
ClearColor clears the value of the "color" field.
func (*LabelMutation) ClearDescription ¶
func (m *LabelMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*LabelMutation) ClearEdge ¶
func (m *LabelMutation) 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 (*LabelMutation) ClearField ¶
func (m *LabelMutation) 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 (*LabelMutation) ClearGroup ¶
func (m *LabelMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*LabelMutation) ClearItems ¶
func (m *LabelMutation) ClearItems()
ClearItems clears the "items" edge to the Item entity.
func (*LabelMutation) ClearedEdges ¶
func (m *LabelMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LabelMutation) ClearedFields ¶
func (m *LabelMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LabelMutation) Client ¶
func (m LabelMutation) 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 (*LabelMutation) Color ¶
func (m *LabelMutation) Color() (r string, exists bool)
Color returns the value of the "color" field in the mutation.
func (*LabelMutation) ColorCleared ¶
func (m *LabelMutation) ColorCleared() bool
ColorCleared returns if the "color" field was cleared in this mutation.
func (*LabelMutation) CreatedAt ¶
func (m *LabelMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*LabelMutation) Description ¶
func (m *LabelMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*LabelMutation) DescriptionCleared ¶
func (m *LabelMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*LabelMutation) EdgeCleared ¶
func (m *LabelMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LabelMutation) Field ¶
func (m *LabelMutation) 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 (*LabelMutation) FieldCleared ¶
func (m *LabelMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LabelMutation) Fields ¶
func (m *LabelMutation) 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 (*LabelMutation) GroupCleared ¶
func (m *LabelMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*LabelMutation) GroupID ¶
func (m *LabelMutation) GroupID() (id uuid.UUID, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*LabelMutation) GroupIDs ¶
func (m *LabelMutation) GroupIDs() (ids []uuid.UUID)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*LabelMutation) ID ¶
func (m *LabelMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*LabelMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*LabelMutation) ItemsCleared ¶
func (m *LabelMutation) ItemsCleared() bool
ItemsCleared reports if the "items" edge to the Item entity was cleared.
func (*LabelMutation) ItemsIDs ¶
func (m *LabelMutation) ItemsIDs() (ids []uuid.UUID)
ItemsIDs returns the "items" edge IDs in the mutation.
func (*LabelMutation) Name ¶
func (m *LabelMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*LabelMutation) OldColor ¶
func (m *LabelMutation) OldColor(ctx context.Context) (v string, err error)
OldColor returns the old "color" field's value of the Label entity. If the Label 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 (*LabelMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Label entity. If the Label 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 (*LabelMutation) OldDescription ¶
func (m *LabelMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Label entity. If the Label 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 (*LabelMutation) 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 (*LabelMutation) OldName ¶
func (m *LabelMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Label entity. If the Label 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 (*LabelMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Label entity. If the Label 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 (*LabelMutation) RemoveItemIDs ¶
func (m *LabelMutation) RemoveItemIDs(ids ...uuid.UUID)
RemoveItemIDs removes the "items" edge to the Item entity by IDs.
func (*LabelMutation) RemovedEdges ¶
func (m *LabelMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LabelMutation) RemovedIDs ¶
func (m *LabelMutation) 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 (*LabelMutation) RemovedItemsIDs ¶
func (m *LabelMutation) RemovedItemsIDs() (ids []uuid.UUID)
RemovedItems returns the removed IDs of the "items" edge to the Item entity.
func (*LabelMutation) ResetColor ¶
func (m *LabelMutation) ResetColor()
ResetColor resets all changes to the "color" field.
func (*LabelMutation) ResetCreatedAt ¶
func (m *LabelMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*LabelMutation) ResetDescription ¶
func (m *LabelMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*LabelMutation) ResetEdge ¶
func (m *LabelMutation) 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 (*LabelMutation) ResetField ¶
func (m *LabelMutation) 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 (*LabelMutation) ResetGroup ¶
func (m *LabelMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*LabelMutation) ResetItems ¶
func (m *LabelMutation) ResetItems()
ResetItems resets all changes to the "items" edge.
func (*LabelMutation) ResetName ¶
func (m *LabelMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*LabelMutation) ResetUpdatedAt ¶
func (m *LabelMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*LabelMutation) SetColor ¶
func (m *LabelMutation) SetColor(s string)
SetColor sets the "color" field.
func (*LabelMutation) SetCreatedAt ¶
func (m *LabelMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*LabelMutation) SetDescription ¶
func (m *LabelMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*LabelMutation) SetField ¶
func (m *LabelMutation) 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 (*LabelMutation) SetGroupID ¶
func (m *LabelMutation) SetGroupID(id uuid.UUID)
SetGroupID sets the "group" edge to the Group entity by id.
func (*LabelMutation) SetID ¶
func (m *LabelMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Label entities.
func (*LabelMutation) SetName ¶
func (m *LabelMutation) SetName(s string)
SetName sets the "name" field.
func (*LabelMutation) SetOp ¶
func (m *LabelMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LabelMutation) SetUpdatedAt ¶
func (m *LabelMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (LabelMutation) Tx ¶
func (m LabelMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LabelMutation) Type ¶
func (m *LabelMutation) Type() string
Type returns the node type of this mutation (Label).
func (*LabelMutation) UpdatedAt ¶
func (m *LabelMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*LabelMutation) Where ¶
func (m *LabelMutation) Where(ps ...predicate.Label)
Where appends a list predicates to the LabelMutation builder.
func (*LabelMutation) WhereP ¶
func (m *LabelMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LabelMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LabelQuery ¶
type LabelQuery struct {
// contains filtered or unexported fields
}
LabelQuery is the builder for querying Label entities.
func (*LabelQuery) Aggregate ¶
func (lq *LabelQuery) Aggregate(fns ...AggregateFunc) *LabelSelect
Aggregate returns a LabelSelect configured with the given aggregations.
func (*LabelQuery) All ¶
func (lq *LabelQuery) All(ctx context.Context) ([]*Label, error)
All executes the query and returns a list of Labels.
func (*LabelQuery) AllX ¶
func (lq *LabelQuery) AllX(ctx context.Context) []*Label
AllX is like All, but panics if an error occurs.
func (*LabelQuery) Clone ¶
func (lq *LabelQuery) Clone() *LabelQuery
Clone returns a duplicate of the LabelQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LabelQuery) Count ¶
func (lq *LabelQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LabelQuery) CountX ¶
func (lq *LabelQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LabelQuery) Exist ¶
func (lq *LabelQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LabelQuery) ExistX ¶
func (lq *LabelQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LabelQuery) First ¶
func (lq *LabelQuery) First(ctx context.Context) (*Label, error)
First returns the first Label entity from the query. Returns a *NotFoundError when no Label was found.
func (*LabelQuery) FirstID ¶
FirstID returns the first Label ID from the query. Returns a *NotFoundError when no Label ID was found.
func (*LabelQuery) FirstIDX ¶
func (lq *LabelQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*LabelQuery) FirstX ¶
func (lq *LabelQuery) FirstX(ctx context.Context) *Label
FirstX is like First, but panics if an error occurs.
func (*LabelQuery) GroupBy ¶
func (lq *LabelQuery) GroupBy(field string, fields ...string) *LabelGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Label.Query(). GroupBy(label.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LabelQuery) IDsX ¶
func (lq *LabelQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*LabelQuery) Limit ¶
func (lq *LabelQuery) Limit(limit int) *LabelQuery
Limit the number of records to be returned by this query.
func (*LabelQuery) Offset ¶
func (lq *LabelQuery) Offset(offset int) *LabelQuery
Offset to start from.
func (*LabelQuery) Only ¶
func (lq *LabelQuery) Only(ctx context.Context) (*Label, error)
Only returns a single Label entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Label entity is found. Returns a *NotFoundError when no Label entities are found.
func (*LabelQuery) OnlyID ¶
OnlyID is like Only, but returns the only Label ID in the query. Returns a *NotSingularError when more than one Label ID is found. Returns a *NotFoundError when no entities are found.
func (*LabelQuery) OnlyIDX ¶
func (lq *LabelQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LabelQuery) OnlyX ¶
func (lq *LabelQuery) OnlyX(ctx context.Context) *Label
OnlyX is like Only, but panics if an error occurs.
func (*LabelQuery) Order ¶
func (lq *LabelQuery) Order(o ...label.OrderOption) *LabelQuery
Order specifies how the records should be ordered.
func (*LabelQuery) QueryGroup ¶
func (lq *LabelQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*LabelQuery) QueryItems ¶
func (lq *LabelQuery) QueryItems() *ItemQuery
QueryItems chains the current query on the "items" edge.
func (*LabelQuery) Select ¶
func (lq *LabelQuery) Select(fields ...string) *LabelSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Label.Query(). Select(label.FieldCreatedAt). Scan(ctx, &v)
func (*LabelQuery) Unique ¶
func (lq *LabelQuery) Unique(unique bool) *LabelQuery
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 (*LabelQuery) Where ¶
func (lq *LabelQuery) Where(ps ...predicate.Label) *LabelQuery
Where adds a new predicate for the LabelQuery builder.
func (*LabelQuery) WithGroup ¶
func (lq *LabelQuery) WithGroup(opts ...func(*GroupQuery)) *LabelQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*LabelQuery) WithItems ¶
func (lq *LabelQuery) WithItems(opts ...func(*ItemQuery)) *LabelQuery
WithItems tells the query-builder to eager-load the nodes that are connected to the "items" edge. The optional arguments are used to configure the query builder of the edge.
type LabelSelect ¶
type LabelSelect struct { *LabelQuery // contains filtered or unexported fields }
LabelSelect is the builder for selecting fields of Label entities.
func (*LabelSelect) Aggregate ¶
func (ls *LabelSelect) Aggregate(fns ...AggregateFunc) *LabelSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LabelSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LabelSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LabelSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LabelSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LabelSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LabelSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LabelSelect) Scan ¶
func (ls *LabelSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LabelSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LabelUpdate ¶
type LabelUpdate struct {
// contains filtered or unexported fields
}
LabelUpdate is the builder for updating Label entities.
func (*LabelUpdate) AddItemIDs ¶
func (lu *LabelUpdate) AddItemIDs(ids ...uuid.UUID) *LabelUpdate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*LabelUpdate) AddItems ¶
func (lu *LabelUpdate) AddItems(i ...*Item) *LabelUpdate
AddItems adds the "items" edges to the Item entity.
func (*LabelUpdate) ClearColor ¶
func (lu *LabelUpdate) ClearColor() *LabelUpdate
ClearColor clears the value of the "color" field.
func (*LabelUpdate) ClearDescription ¶
func (lu *LabelUpdate) ClearDescription() *LabelUpdate
ClearDescription clears the value of the "description" field.
func (*LabelUpdate) ClearGroup ¶
func (lu *LabelUpdate) ClearGroup() *LabelUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*LabelUpdate) ClearItems ¶
func (lu *LabelUpdate) ClearItems() *LabelUpdate
ClearItems clears all "items" edges to the Item entity.
func (*LabelUpdate) Exec ¶
func (lu *LabelUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LabelUpdate) ExecX ¶
func (lu *LabelUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LabelUpdate) Mutation ¶
func (lu *LabelUpdate) Mutation() *LabelMutation
Mutation returns the LabelMutation object of the builder.
func (*LabelUpdate) RemoveItemIDs ¶
func (lu *LabelUpdate) RemoveItemIDs(ids ...uuid.UUID) *LabelUpdate
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*LabelUpdate) RemoveItems ¶
func (lu *LabelUpdate) RemoveItems(i ...*Item) *LabelUpdate
RemoveItems removes "items" edges to Item entities.
func (*LabelUpdate) Save ¶
func (lu *LabelUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LabelUpdate) SaveX ¶
func (lu *LabelUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LabelUpdate) SetColor ¶
func (lu *LabelUpdate) SetColor(s string) *LabelUpdate
SetColor sets the "color" field.
func (*LabelUpdate) SetDescription ¶
func (lu *LabelUpdate) SetDescription(s string) *LabelUpdate
SetDescription sets the "description" field.
func (*LabelUpdate) SetGroup ¶
func (lu *LabelUpdate) SetGroup(g *Group) *LabelUpdate
SetGroup sets the "group" edge to the Group entity.
func (*LabelUpdate) SetGroupID ¶
func (lu *LabelUpdate) SetGroupID(id uuid.UUID) *LabelUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*LabelUpdate) SetName ¶
func (lu *LabelUpdate) SetName(s string) *LabelUpdate
SetName sets the "name" field.
func (*LabelUpdate) SetNillableColor ¶
func (lu *LabelUpdate) SetNillableColor(s *string) *LabelUpdate
SetNillableColor sets the "color" field if the given value is not nil.
func (*LabelUpdate) SetNillableDescription ¶
func (lu *LabelUpdate) SetNillableDescription(s *string) *LabelUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LabelUpdate) SetNillableName ¶
func (lu *LabelUpdate) SetNillableName(s *string) *LabelUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*LabelUpdate) SetUpdatedAt ¶
func (lu *LabelUpdate) SetUpdatedAt(t time.Time) *LabelUpdate
SetUpdatedAt sets the "updated_at" field.
func (*LabelUpdate) Where ¶
func (lu *LabelUpdate) Where(ps ...predicate.Label) *LabelUpdate
Where appends a list predicates to the LabelUpdate builder.
type LabelUpdateOne ¶
type LabelUpdateOne struct {
// contains filtered or unexported fields
}
LabelUpdateOne is the builder for updating a single Label entity.
func (*LabelUpdateOne) AddItemIDs ¶
func (luo *LabelUpdateOne) AddItemIDs(ids ...uuid.UUID) *LabelUpdateOne
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*LabelUpdateOne) AddItems ¶
func (luo *LabelUpdateOne) AddItems(i ...*Item) *LabelUpdateOne
AddItems adds the "items" edges to the Item entity.
func (*LabelUpdateOne) ClearColor ¶
func (luo *LabelUpdateOne) ClearColor() *LabelUpdateOne
ClearColor clears the value of the "color" field.
func (*LabelUpdateOne) ClearDescription ¶
func (luo *LabelUpdateOne) ClearDescription() *LabelUpdateOne
ClearDescription clears the value of the "description" field.
func (*LabelUpdateOne) ClearGroup ¶
func (luo *LabelUpdateOne) ClearGroup() *LabelUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*LabelUpdateOne) ClearItems ¶
func (luo *LabelUpdateOne) ClearItems() *LabelUpdateOne
ClearItems clears all "items" edges to the Item entity.
func (*LabelUpdateOne) Exec ¶
func (luo *LabelUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LabelUpdateOne) ExecX ¶
func (luo *LabelUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LabelUpdateOne) Mutation ¶
func (luo *LabelUpdateOne) Mutation() *LabelMutation
Mutation returns the LabelMutation object of the builder.
func (*LabelUpdateOne) RemoveItemIDs ¶
func (luo *LabelUpdateOne) RemoveItemIDs(ids ...uuid.UUID) *LabelUpdateOne
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*LabelUpdateOne) RemoveItems ¶
func (luo *LabelUpdateOne) RemoveItems(i ...*Item) *LabelUpdateOne
RemoveItems removes "items" edges to Item entities.
func (*LabelUpdateOne) Save ¶
func (luo *LabelUpdateOne) Save(ctx context.Context) (*Label, error)
Save executes the query and returns the updated Label entity.
func (*LabelUpdateOne) SaveX ¶
func (luo *LabelUpdateOne) SaveX(ctx context.Context) *Label
SaveX is like Save, but panics if an error occurs.
func (*LabelUpdateOne) Select ¶
func (luo *LabelUpdateOne) Select(field string, fields ...string) *LabelUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LabelUpdateOne) SetColor ¶
func (luo *LabelUpdateOne) SetColor(s string) *LabelUpdateOne
SetColor sets the "color" field.
func (*LabelUpdateOne) SetDescription ¶
func (luo *LabelUpdateOne) SetDescription(s string) *LabelUpdateOne
SetDescription sets the "description" field.
func (*LabelUpdateOne) SetGroup ¶
func (luo *LabelUpdateOne) SetGroup(g *Group) *LabelUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*LabelUpdateOne) SetGroupID ¶
func (luo *LabelUpdateOne) SetGroupID(id uuid.UUID) *LabelUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*LabelUpdateOne) SetName ¶
func (luo *LabelUpdateOne) SetName(s string) *LabelUpdateOne
SetName sets the "name" field.
func (*LabelUpdateOne) SetNillableColor ¶
func (luo *LabelUpdateOne) SetNillableColor(s *string) *LabelUpdateOne
SetNillableColor sets the "color" field if the given value is not nil.
func (*LabelUpdateOne) SetNillableDescription ¶
func (luo *LabelUpdateOne) SetNillableDescription(s *string) *LabelUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LabelUpdateOne) SetNillableName ¶
func (luo *LabelUpdateOne) SetNillableName(s *string) *LabelUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*LabelUpdateOne) SetUpdatedAt ¶
func (luo *LabelUpdateOne) SetUpdatedAt(t time.Time) *LabelUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*LabelUpdateOne) Where ¶
func (luo *LabelUpdateOne) Where(ps ...predicate.Label) *LabelUpdateOne
Where appends a list predicates to the LabelUpdate builder.
type Location ¶
type Location struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the LocationQuery when eager-loading is set. Edges LocationEdges `json:"edges"` // contains filtered or unexported fields }
Location is the model entity for the Location schema.
func (*Location) QueryChildren ¶
func (l *Location) QueryChildren() *LocationQuery
QueryChildren queries the "children" edge of the Location entity.
func (*Location) QueryGroup ¶
func (l *Location) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the Location entity.
func (*Location) QueryItems ¶
QueryItems queries the "items" edge of the Location entity.
func (*Location) QueryParent ¶
func (l *Location) QueryParent() *LocationQuery
QueryParent queries the "parent" edge of the Location entity.
func (*Location) Unwrap ¶
Unwrap unwraps the Location 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 (*Location) Update ¶
func (l *Location) Update() *LocationUpdateOne
Update returns a builder for updating this Location. Note that you need to call Location.Unwrap() before calling this method if this Location was returned from a transaction, and the transaction was committed or rolled back.
type LocationClient ¶
type LocationClient struct {
// contains filtered or unexported fields
}
LocationClient is a client for the Location schema.
func NewLocationClient ¶
func NewLocationClient(c config) *LocationClient
NewLocationClient returns a client for the Location from the given config.
func (*LocationClient) Create ¶
func (c *LocationClient) Create() *LocationCreate
Create returns a builder for creating a Location entity.
func (*LocationClient) CreateBulk ¶
func (c *LocationClient) CreateBulk(builders ...*LocationCreate) *LocationCreateBulk
CreateBulk returns a builder for creating a bulk of Location entities.
func (*LocationClient) Delete ¶
func (c *LocationClient) Delete() *LocationDelete
Delete returns a delete builder for Location.
func (*LocationClient) DeleteOne ¶
func (c *LocationClient) DeleteOne(l *Location) *LocationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LocationClient) DeleteOneID ¶
func (c *LocationClient) DeleteOneID(id uuid.UUID) *LocationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LocationClient) Hooks ¶
func (c *LocationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*LocationClient) Intercept ¶
func (c *LocationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `location.Intercept(f(g(h())))`.
func (*LocationClient) Interceptors ¶
func (c *LocationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LocationClient) MapCreateBulk ¶
func (c *LocationClient) MapCreateBulk(slice any, setFunc func(*LocationCreate, int)) *LocationCreateBulk
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 (*LocationClient) Query ¶
func (c *LocationClient) Query() *LocationQuery
Query returns a query builder for Location.
func (*LocationClient) QueryChildren ¶
func (c *LocationClient) QueryChildren(l *Location) *LocationQuery
QueryChildren queries the children edge of a Location.
func (*LocationClient) QueryGroup ¶
func (c *LocationClient) QueryGroup(l *Location) *GroupQuery
QueryGroup queries the group edge of a Location.
func (*LocationClient) QueryItems ¶
func (c *LocationClient) QueryItems(l *Location) *ItemQuery
QueryItems queries the items edge of a Location.
func (*LocationClient) QueryParent ¶
func (c *LocationClient) QueryParent(l *Location) *LocationQuery
QueryParent queries the parent edge of a Location.
func (*LocationClient) Update ¶
func (c *LocationClient) Update() *LocationUpdate
Update returns an update builder for Location.
func (*LocationClient) UpdateOne ¶
func (c *LocationClient) UpdateOne(l *Location) *LocationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LocationClient) UpdateOneID ¶
func (c *LocationClient) UpdateOneID(id uuid.UUID) *LocationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LocationClient) Use ¶
func (c *LocationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `location.Hooks(f(g(h())))`.
type LocationCreate ¶
type LocationCreate struct {
// contains filtered or unexported fields
}
LocationCreate is the builder for creating a Location entity.
func (*LocationCreate) AddChildIDs ¶
func (lc *LocationCreate) AddChildIDs(ids ...uuid.UUID) *LocationCreate
AddChildIDs adds the "children" edge to the Location entity by IDs.
func (*LocationCreate) AddChildren ¶
func (lc *LocationCreate) AddChildren(l ...*Location) *LocationCreate
AddChildren adds the "children" edges to the Location entity.
func (*LocationCreate) AddItemIDs ¶
func (lc *LocationCreate) AddItemIDs(ids ...uuid.UUID) *LocationCreate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*LocationCreate) AddItems ¶
func (lc *LocationCreate) AddItems(i ...*Item) *LocationCreate
AddItems adds the "items" edges to the Item entity.
func (*LocationCreate) Exec ¶
func (lc *LocationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LocationCreate) ExecX ¶
func (lc *LocationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationCreate) Mutation ¶
func (lc *LocationCreate) Mutation() *LocationMutation
Mutation returns the LocationMutation object of the builder.
func (*LocationCreate) Save ¶
func (lc *LocationCreate) Save(ctx context.Context) (*Location, error)
Save creates the Location in the database.
func (*LocationCreate) SaveX ¶
func (lc *LocationCreate) SaveX(ctx context.Context) *Location
SaveX calls Save and panics if Save returns an error.
func (*LocationCreate) SetCreatedAt ¶
func (lc *LocationCreate) SetCreatedAt(t time.Time) *LocationCreate
SetCreatedAt sets the "created_at" field.
func (*LocationCreate) SetDescription ¶
func (lc *LocationCreate) SetDescription(s string) *LocationCreate
SetDescription sets the "description" field.
func (*LocationCreate) SetGroup ¶
func (lc *LocationCreate) SetGroup(g *Group) *LocationCreate
SetGroup sets the "group" edge to the Group entity.
func (*LocationCreate) SetGroupID ¶
func (lc *LocationCreate) SetGroupID(id uuid.UUID) *LocationCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*LocationCreate) SetID ¶
func (lc *LocationCreate) SetID(u uuid.UUID) *LocationCreate
SetID sets the "id" field.
func (*LocationCreate) SetName ¶
func (lc *LocationCreate) SetName(s string) *LocationCreate
SetName sets the "name" field.
func (*LocationCreate) SetNillableCreatedAt ¶
func (lc *LocationCreate) SetNillableCreatedAt(t *time.Time) *LocationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LocationCreate) SetNillableDescription ¶
func (lc *LocationCreate) SetNillableDescription(s *string) *LocationCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LocationCreate) SetNillableID ¶
func (lc *LocationCreate) SetNillableID(u *uuid.UUID) *LocationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*LocationCreate) SetNillableParentID ¶
func (lc *LocationCreate) SetNillableParentID(id *uuid.UUID) *LocationCreate
SetNillableParentID sets the "parent" edge to the Location entity by ID if the given value is not nil.
func (*LocationCreate) SetNillableUpdatedAt ¶
func (lc *LocationCreate) SetNillableUpdatedAt(t *time.Time) *LocationCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*LocationCreate) SetParent ¶
func (lc *LocationCreate) SetParent(l *Location) *LocationCreate
SetParent sets the "parent" edge to the Location entity.
func (*LocationCreate) SetParentID ¶
func (lc *LocationCreate) SetParentID(id uuid.UUID) *LocationCreate
SetParentID sets the "parent" edge to the Location entity by ID.
func (*LocationCreate) SetUpdatedAt ¶
func (lc *LocationCreate) SetUpdatedAt(t time.Time) *LocationCreate
SetUpdatedAt sets the "updated_at" field.
type LocationCreateBulk ¶
type LocationCreateBulk struct {
// contains filtered or unexported fields
}
LocationCreateBulk is the builder for creating many Location entities in bulk.
func (*LocationCreateBulk) Exec ¶
func (lcb *LocationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LocationCreateBulk) ExecX ¶
func (lcb *LocationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LocationDelete ¶
type LocationDelete struct {
// contains filtered or unexported fields
}
LocationDelete is the builder for deleting a Location entity.
func (*LocationDelete) Exec ¶
func (ld *LocationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LocationDelete) ExecX ¶
func (ld *LocationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LocationDelete) Where ¶
func (ld *LocationDelete) Where(ps ...predicate.Location) *LocationDelete
Where appends a list predicates to the LocationDelete builder.
type LocationDeleteOne ¶
type LocationDeleteOne struct {
// contains filtered or unexported fields
}
LocationDeleteOne is the builder for deleting a single Location entity.
func (*LocationDeleteOne) Exec ¶
func (ldo *LocationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LocationDeleteOne) ExecX ¶
func (ldo *LocationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationDeleteOne) Where ¶
func (ldo *LocationDeleteOne) Where(ps ...predicate.Location) *LocationDeleteOne
Where appends a list predicates to the LocationDelete builder.
type LocationEdges ¶
type LocationEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // Parent holds the value of the parent edge. Parent *Location `json:"parent,omitempty"` // Children holds the value of the children edge. Children []*Location `json:"children,omitempty"` // Items holds the value of the items edge. Items []*Item `json:"items,omitempty"` // contains filtered or unexported fields }
LocationEdges holds the relations/edges for other nodes in the graph.
func (LocationEdges) ChildrenOrErr ¶
func (e LocationEdges) ChildrenOrErr() ([]*Location, error)
ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.
func (LocationEdges) GroupOrErr ¶
func (e LocationEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (LocationEdges) ItemsOrErr ¶
func (e LocationEdges) ItemsOrErr() ([]*Item, error)
ItemsOrErr returns the Items value or an error if the edge was not loaded in eager-loading.
func (LocationEdges) ParentOrErr ¶
func (e LocationEdges) ParentOrErr() (*Location, error)
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type LocationGroupBy ¶
type LocationGroupBy struct {
// contains filtered or unexported fields
}
LocationGroupBy is the group-by builder for Location entities.
func (*LocationGroupBy) Aggregate ¶
func (lgb *LocationGroupBy) Aggregate(fns ...AggregateFunc) *LocationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LocationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Scan ¶
func (lgb *LocationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LocationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LocationMutation ¶
type LocationMutation struct {
// contains filtered or unexported fields
}
LocationMutation represents an operation that mutates the Location nodes in the graph.
func (*LocationMutation) AddChildIDs ¶
func (m *LocationMutation) AddChildIDs(ids ...uuid.UUID)
AddChildIDs adds the "children" edge to the Location entity by ids.
func (*LocationMutation) AddField ¶
func (m *LocationMutation) 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 (*LocationMutation) AddItemIDs ¶
func (m *LocationMutation) AddItemIDs(ids ...uuid.UUID)
AddItemIDs adds the "items" edge to the Item entity by ids.
func (*LocationMutation) AddedEdges ¶
func (m *LocationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LocationMutation) AddedField ¶
func (m *LocationMutation) 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 (*LocationMutation) AddedFields ¶
func (m *LocationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LocationMutation) AddedIDs ¶
func (m *LocationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LocationMutation) ChildrenCleared ¶
func (m *LocationMutation) ChildrenCleared() bool
ChildrenCleared reports if the "children" edge to the Location entity was cleared.
func (*LocationMutation) ChildrenIDs ¶
func (m *LocationMutation) ChildrenIDs() (ids []uuid.UUID)
ChildrenIDs returns the "children" edge IDs in the mutation.
func (*LocationMutation) ClearChildren ¶
func (m *LocationMutation) ClearChildren()
ClearChildren clears the "children" edge to the Location entity.
func (*LocationMutation) ClearDescription ¶
func (m *LocationMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*LocationMutation) ClearEdge ¶
func (m *LocationMutation) 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 (*LocationMutation) ClearField ¶
func (m *LocationMutation) 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 (*LocationMutation) ClearGroup ¶
func (m *LocationMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*LocationMutation) ClearItems ¶
func (m *LocationMutation) ClearItems()
ClearItems clears the "items" edge to the Item entity.
func (*LocationMutation) ClearParent ¶
func (m *LocationMutation) ClearParent()
ClearParent clears the "parent" edge to the Location entity.
func (*LocationMutation) ClearedEdges ¶
func (m *LocationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LocationMutation) ClearedFields ¶
func (m *LocationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LocationMutation) Client ¶
func (m LocationMutation) 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 (*LocationMutation) CreatedAt ¶
func (m *LocationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*LocationMutation) Description ¶
func (m *LocationMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*LocationMutation) DescriptionCleared ¶
func (m *LocationMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*LocationMutation) EdgeCleared ¶
func (m *LocationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LocationMutation) Field ¶
func (m *LocationMutation) 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 (*LocationMutation) FieldCleared ¶
func (m *LocationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LocationMutation) Fields ¶
func (m *LocationMutation) 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 (*LocationMutation) GroupCleared ¶
func (m *LocationMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*LocationMutation) GroupID ¶
func (m *LocationMutation) GroupID() (id uuid.UUID, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*LocationMutation) GroupIDs ¶
func (m *LocationMutation) GroupIDs() (ids []uuid.UUID)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*LocationMutation) ID ¶
func (m *LocationMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*LocationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*LocationMutation) ItemsCleared ¶
func (m *LocationMutation) ItemsCleared() bool
ItemsCleared reports if the "items" edge to the Item entity was cleared.
func (*LocationMutation) ItemsIDs ¶
func (m *LocationMutation) ItemsIDs() (ids []uuid.UUID)
ItemsIDs returns the "items" edge IDs in the mutation.
func (*LocationMutation) Name ¶
func (m *LocationMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*LocationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Location entity. If the Location 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 (*LocationMutation) OldDescription ¶
func (m *LocationMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Location entity. If the Location 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 (*LocationMutation) 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 (*LocationMutation) OldName ¶
func (m *LocationMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Location entity. If the Location 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 (*LocationMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Location entity. If the Location 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 (*LocationMutation) ParentCleared ¶
func (m *LocationMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the Location entity was cleared.
func (*LocationMutation) ParentID ¶
func (m *LocationMutation) ParentID() (id uuid.UUID, exists bool)
ParentID returns the "parent" edge ID in the mutation.
func (*LocationMutation) ParentIDs ¶
func (m *LocationMutation) ParentIDs() (ids []uuid.UUID)
ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.
func (*LocationMutation) RemoveChildIDs ¶
func (m *LocationMutation) RemoveChildIDs(ids ...uuid.UUID)
RemoveChildIDs removes the "children" edge to the Location entity by IDs.
func (*LocationMutation) RemoveItemIDs ¶
func (m *LocationMutation) RemoveItemIDs(ids ...uuid.UUID)
RemoveItemIDs removes the "items" edge to the Item entity by IDs.
func (*LocationMutation) RemovedChildrenIDs ¶
func (m *LocationMutation) RemovedChildrenIDs() (ids []uuid.UUID)
RemovedChildren returns the removed IDs of the "children" edge to the Location entity.
func (*LocationMutation) RemovedEdges ¶
func (m *LocationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LocationMutation) RemovedIDs ¶
func (m *LocationMutation) 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 (*LocationMutation) RemovedItemsIDs ¶
func (m *LocationMutation) RemovedItemsIDs() (ids []uuid.UUID)
RemovedItems returns the removed IDs of the "items" edge to the Item entity.
func (*LocationMutation) ResetChildren ¶
func (m *LocationMutation) ResetChildren()
ResetChildren resets all changes to the "children" edge.
func (*LocationMutation) ResetCreatedAt ¶
func (m *LocationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*LocationMutation) ResetDescription ¶
func (m *LocationMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*LocationMutation) ResetEdge ¶
func (m *LocationMutation) 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 (*LocationMutation) ResetField ¶
func (m *LocationMutation) 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 (*LocationMutation) ResetGroup ¶
func (m *LocationMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*LocationMutation) ResetItems ¶
func (m *LocationMutation) ResetItems()
ResetItems resets all changes to the "items" edge.
func (*LocationMutation) ResetName ¶
func (m *LocationMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*LocationMutation) ResetParent ¶
func (m *LocationMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*LocationMutation) ResetUpdatedAt ¶
func (m *LocationMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*LocationMutation) SetCreatedAt ¶
func (m *LocationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*LocationMutation) SetDescription ¶
func (m *LocationMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*LocationMutation) SetField ¶
func (m *LocationMutation) 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 (*LocationMutation) SetGroupID ¶
func (m *LocationMutation) SetGroupID(id uuid.UUID)
SetGroupID sets the "group" edge to the Group entity by id.
func (*LocationMutation) SetID ¶
func (m *LocationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Location entities.
func (*LocationMutation) SetName ¶
func (m *LocationMutation) SetName(s string)
SetName sets the "name" field.
func (*LocationMutation) SetOp ¶
func (m *LocationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LocationMutation) SetParentID ¶
func (m *LocationMutation) SetParentID(id uuid.UUID)
SetParentID sets the "parent" edge to the Location entity by id.
func (*LocationMutation) SetUpdatedAt ¶
func (m *LocationMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (LocationMutation) Tx ¶
func (m LocationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LocationMutation) Type ¶
func (m *LocationMutation) Type() string
Type returns the node type of this mutation (Location).
func (*LocationMutation) UpdatedAt ¶
func (m *LocationMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*LocationMutation) Where ¶
func (m *LocationMutation) Where(ps ...predicate.Location)
Where appends a list predicates to the LocationMutation builder.
func (*LocationMutation) WhereP ¶
func (m *LocationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LocationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LocationQuery ¶
type LocationQuery struct {
// contains filtered or unexported fields
}
LocationQuery is the builder for querying Location entities.
func (*LocationQuery) Aggregate ¶
func (lq *LocationQuery) Aggregate(fns ...AggregateFunc) *LocationSelect
Aggregate returns a LocationSelect configured with the given aggregations.
func (*LocationQuery) All ¶
func (lq *LocationQuery) All(ctx context.Context) ([]*Location, error)
All executes the query and returns a list of Locations.
func (*LocationQuery) AllX ¶
func (lq *LocationQuery) AllX(ctx context.Context) []*Location
AllX is like All, but panics if an error occurs.
func (*LocationQuery) Clone ¶
func (lq *LocationQuery) Clone() *LocationQuery
Clone returns a duplicate of the LocationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LocationQuery) Count ¶
func (lq *LocationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LocationQuery) CountX ¶
func (lq *LocationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LocationQuery) Exist ¶
func (lq *LocationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LocationQuery) ExistX ¶
func (lq *LocationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LocationQuery) First ¶
func (lq *LocationQuery) First(ctx context.Context) (*Location, error)
First returns the first Location entity from the query. Returns a *NotFoundError when no Location was found.
func (*LocationQuery) FirstID ¶
FirstID returns the first Location ID from the query. Returns a *NotFoundError when no Location ID was found.
func (*LocationQuery) FirstIDX ¶
func (lq *LocationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*LocationQuery) FirstX ¶
func (lq *LocationQuery) FirstX(ctx context.Context) *Location
FirstX is like First, but panics if an error occurs.
func (*LocationQuery) GroupBy ¶
func (lq *LocationQuery) GroupBy(field string, fields ...string) *LocationGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Location.Query(). GroupBy(location.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LocationQuery) IDsX ¶
func (lq *LocationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*LocationQuery) Limit ¶
func (lq *LocationQuery) Limit(limit int) *LocationQuery
Limit the number of records to be returned by this query.
func (*LocationQuery) Offset ¶
func (lq *LocationQuery) Offset(offset int) *LocationQuery
Offset to start from.
func (*LocationQuery) Only ¶
func (lq *LocationQuery) Only(ctx context.Context) (*Location, error)
Only returns a single Location entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Location entity is found. Returns a *NotFoundError when no Location entities are found.
func (*LocationQuery) OnlyID ¶
OnlyID is like Only, but returns the only Location ID in the query. Returns a *NotSingularError when more than one Location ID is found. Returns a *NotFoundError when no entities are found.
func (*LocationQuery) OnlyIDX ¶
func (lq *LocationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LocationQuery) OnlyX ¶
func (lq *LocationQuery) OnlyX(ctx context.Context) *Location
OnlyX is like Only, but panics if an error occurs.
func (*LocationQuery) Order ¶
func (lq *LocationQuery) Order(o ...location.OrderOption) *LocationQuery
Order specifies how the records should be ordered.
func (*LocationQuery) QueryChildren ¶
func (lq *LocationQuery) QueryChildren() *LocationQuery
QueryChildren chains the current query on the "children" edge.
func (*LocationQuery) QueryGroup ¶
func (lq *LocationQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*LocationQuery) QueryItems ¶
func (lq *LocationQuery) QueryItems() *ItemQuery
QueryItems chains the current query on the "items" edge.
func (*LocationQuery) QueryParent ¶
func (lq *LocationQuery) QueryParent() *LocationQuery
QueryParent chains the current query on the "parent" edge.
func (*LocationQuery) Select ¶
func (lq *LocationQuery) Select(fields ...string) *LocationSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Location.Query(). Select(location.FieldCreatedAt). Scan(ctx, &v)
func (*LocationQuery) Unique ¶
func (lq *LocationQuery) Unique(unique bool) *LocationQuery
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 (*LocationQuery) Where ¶
func (lq *LocationQuery) Where(ps ...predicate.Location) *LocationQuery
Where adds a new predicate for the LocationQuery builder.
func (*LocationQuery) WithChildren ¶
func (lq *LocationQuery) WithChildren(opts ...func(*LocationQuery)) *LocationQuery
WithChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge. The optional arguments are used to configure the query builder of the edge.
func (*LocationQuery) WithGroup ¶
func (lq *LocationQuery) WithGroup(opts ...func(*GroupQuery)) *LocationQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*LocationQuery) WithItems ¶
func (lq *LocationQuery) WithItems(opts ...func(*ItemQuery)) *LocationQuery
WithItems tells the query-builder to eager-load the nodes that are connected to the "items" edge. The optional arguments are used to configure the query builder of the edge.
func (*LocationQuery) WithParent ¶
func (lq *LocationQuery) WithParent(opts ...func(*LocationQuery)) *LocationQuery
WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.
type LocationSelect ¶
type LocationSelect struct { *LocationQuery // contains filtered or unexported fields }
LocationSelect is the builder for selecting fields of Location entities.
func (*LocationSelect) Aggregate ¶
func (ls *LocationSelect) Aggregate(fns ...AggregateFunc) *LocationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LocationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Scan ¶
func (ls *LocationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LocationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LocationUpdate ¶
type LocationUpdate struct {
// contains filtered or unexported fields
}
LocationUpdate is the builder for updating Location entities.
func (*LocationUpdate) AddChildIDs ¶
func (lu *LocationUpdate) AddChildIDs(ids ...uuid.UUID) *LocationUpdate
AddChildIDs adds the "children" edge to the Location entity by IDs.
func (*LocationUpdate) AddChildren ¶
func (lu *LocationUpdate) AddChildren(l ...*Location) *LocationUpdate
AddChildren adds the "children" edges to the Location entity.
func (*LocationUpdate) AddItemIDs ¶
func (lu *LocationUpdate) AddItemIDs(ids ...uuid.UUID) *LocationUpdate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*LocationUpdate) AddItems ¶
func (lu *LocationUpdate) AddItems(i ...*Item) *LocationUpdate
AddItems adds the "items" edges to the Item entity.
func (*LocationUpdate) ClearChildren ¶
func (lu *LocationUpdate) ClearChildren() *LocationUpdate
ClearChildren clears all "children" edges to the Location entity.
func (*LocationUpdate) ClearDescription ¶
func (lu *LocationUpdate) ClearDescription() *LocationUpdate
ClearDescription clears the value of the "description" field.
func (*LocationUpdate) ClearGroup ¶
func (lu *LocationUpdate) ClearGroup() *LocationUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*LocationUpdate) ClearItems ¶
func (lu *LocationUpdate) ClearItems() *LocationUpdate
ClearItems clears all "items" edges to the Item entity.
func (*LocationUpdate) ClearParent ¶
func (lu *LocationUpdate) ClearParent() *LocationUpdate
ClearParent clears the "parent" edge to the Location entity.
func (*LocationUpdate) Exec ¶
func (lu *LocationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LocationUpdate) ExecX ¶
func (lu *LocationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationUpdate) Mutation ¶
func (lu *LocationUpdate) Mutation() *LocationMutation
Mutation returns the LocationMutation object of the builder.
func (*LocationUpdate) RemoveChildIDs ¶
func (lu *LocationUpdate) RemoveChildIDs(ids ...uuid.UUID) *LocationUpdate
RemoveChildIDs removes the "children" edge to Location entities by IDs.
func (*LocationUpdate) RemoveChildren ¶
func (lu *LocationUpdate) RemoveChildren(l ...*Location) *LocationUpdate
RemoveChildren removes "children" edges to Location entities.
func (*LocationUpdate) RemoveItemIDs ¶
func (lu *LocationUpdate) RemoveItemIDs(ids ...uuid.UUID) *LocationUpdate
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*LocationUpdate) RemoveItems ¶
func (lu *LocationUpdate) RemoveItems(i ...*Item) *LocationUpdate
RemoveItems removes "items" edges to Item entities.
func (*LocationUpdate) Save ¶
func (lu *LocationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LocationUpdate) SaveX ¶
func (lu *LocationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LocationUpdate) SetDescription ¶
func (lu *LocationUpdate) SetDescription(s string) *LocationUpdate
SetDescription sets the "description" field.
func (*LocationUpdate) SetGroup ¶
func (lu *LocationUpdate) SetGroup(g *Group) *LocationUpdate
SetGroup sets the "group" edge to the Group entity.
func (*LocationUpdate) SetGroupID ¶
func (lu *LocationUpdate) SetGroupID(id uuid.UUID) *LocationUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*LocationUpdate) SetName ¶
func (lu *LocationUpdate) SetName(s string) *LocationUpdate
SetName sets the "name" field.
func (*LocationUpdate) SetNillableDescription ¶
func (lu *LocationUpdate) SetNillableDescription(s *string) *LocationUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LocationUpdate) SetNillableName ¶
func (lu *LocationUpdate) SetNillableName(s *string) *LocationUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*LocationUpdate) SetNillableParentID ¶
func (lu *LocationUpdate) SetNillableParentID(id *uuid.UUID) *LocationUpdate
SetNillableParentID sets the "parent" edge to the Location entity by ID if the given value is not nil.
func (*LocationUpdate) SetParent ¶
func (lu *LocationUpdate) SetParent(l *Location) *LocationUpdate
SetParent sets the "parent" edge to the Location entity.
func (*LocationUpdate) SetParentID ¶
func (lu *LocationUpdate) SetParentID(id uuid.UUID) *LocationUpdate
SetParentID sets the "parent" edge to the Location entity by ID.
func (*LocationUpdate) SetUpdatedAt ¶
func (lu *LocationUpdate) SetUpdatedAt(t time.Time) *LocationUpdate
SetUpdatedAt sets the "updated_at" field.
func (*LocationUpdate) Where ¶
func (lu *LocationUpdate) Where(ps ...predicate.Location) *LocationUpdate
Where appends a list predicates to the LocationUpdate builder.
type LocationUpdateOne ¶
type LocationUpdateOne struct {
// contains filtered or unexported fields
}
LocationUpdateOne is the builder for updating a single Location entity.
func (*LocationUpdateOne) AddChildIDs ¶
func (luo *LocationUpdateOne) AddChildIDs(ids ...uuid.UUID) *LocationUpdateOne
AddChildIDs adds the "children" edge to the Location entity by IDs.
func (*LocationUpdateOne) AddChildren ¶
func (luo *LocationUpdateOne) AddChildren(l ...*Location) *LocationUpdateOne
AddChildren adds the "children" edges to the Location entity.
func (*LocationUpdateOne) AddItemIDs ¶
func (luo *LocationUpdateOne) AddItemIDs(ids ...uuid.UUID) *LocationUpdateOne
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*LocationUpdateOne) AddItems ¶
func (luo *LocationUpdateOne) AddItems(i ...*Item) *LocationUpdateOne
AddItems adds the "items" edges to the Item entity.
func (*LocationUpdateOne) ClearChildren ¶
func (luo *LocationUpdateOne) ClearChildren() *LocationUpdateOne
ClearChildren clears all "children" edges to the Location entity.
func (*LocationUpdateOne) ClearDescription ¶
func (luo *LocationUpdateOne) ClearDescription() *LocationUpdateOne
ClearDescription clears the value of the "description" field.
func (*LocationUpdateOne) ClearGroup ¶
func (luo *LocationUpdateOne) ClearGroup() *LocationUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*LocationUpdateOne) ClearItems ¶
func (luo *LocationUpdateOne) ClearItems() *LocationUpdateOne
ClearItems clears all "items" edges to the Item entity.
func (*LocationUpdateOne) ClearParent ¶
func (luo *LocationUpdateOne) ClearParent() *LocationUpdateOne
ClearParent clears the "parent" edge to the Location entity.
func (*LocationUpdateOne) Exec ¶
func (luo *LocationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LocationUpdateOne) ExecX ¶
func (luo *LocationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationUpdateOne) Mutation ¶
func (luo *LocationUpdateOne) Mutation() *LocationMutation
Mutation returns the LocationMutation object of the builder.
func (*LocationUpdateOne) RemoveChildIDs ¶
func (luo *LocationUpdateOne) RemoveChildIDs(ids ...uuid.UUID) *LocationUpdateOne
RemoveChildIDs removes the "children" edge to Location entities by IDs.
func (*LocationUpdateOne) RemoveChildren ¶
func (luo *LocationUpdateOne) RemoveChildren(l ...*Location) *LocationUpdateOne
RemoveChildren removes "children" edges to Location entities.
func (*LocationUpdateOne) RemoveItemIDs ¶
func (luo *LocationUpdateOne) RemoveItemIDs(ids ...uuid.UUID) *LocationUpdateOne
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*LocationUpdateOne) RemoveItems ¶
func (luo *LocationUpdateOne) RemoveItems(i ...*Item) *LocationUpdateOne
RemoveItems removes "items" edges to Item entities.
func (*LocationUpdateOne) Save ¶
func (luo *LocationUpdateOne) Save(ctx context.Context) (*Location, error)
Save executes the query and returns the updated Location entity.
func (*LocationUpdateOne) SaveX ¶
func (luo *LocationUpdateOne) SaveX(ctx context.Context) *Location
SaveX is like Save, but panics if an error occurs.
func (*LocationUpdateOne) Select ¶
func (luo *LocationUpdateOne) Select(field string, fields ...string) *LocationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LocationUpdateOne) SetDescription ¶
func (luo *LocationUpdateOne) SetDescription(s string) *LocationUpdateOne
SetDescription sets the "description" field.
func (*LocationUpdateOne) SetGroup ¶
func (luo *LocationUpdateOne) SetGroup(g *Group) *LocationUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*LocationUpdateOne) SetGroupID ¶
func (luo *LocationUpdateOne) SetGroupID(id uuid.UUID) *LocationUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*LocationUpdateOne) SetName ¶
func (luo *LocationUpdateOne) SetName(s string) *LocationUpdateOne
SetName sets the "name" field.
func (*LocationUpdateOne) SetNillableDescription ¶
func (luo *LocationUpdateOne) SetNillableDescription(s *string) *LocationUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LocationUpdateOne) SetNillableName ¶
func (luo *LocationUpdateOne) SetNillableName(s *string) *LocationUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*LocationUpdateOne) SetNillableParentID ¶
func (luo *LocationUpdateOne) SetNillableParentID(id *uuid.UUID) *LocationUpdateOne
SetNillableParentID sets the "parent" edge to the Location entity by ID if the given value is not nil.
func (*LocationUpdateOne) SetParent ¶
func (luo *LocationUpdateOne) SetParent(l *Location) *LocationUpdateOne
SetParent sets the "parent" edge to the Location entity.
func (*LocationUpdateOne) SetParentID ¶
func (luo *LocationUpdateOne) SetParentID(id uuid.UUID) *LocationUpdateOne
SetParentID sets the "parent" edge to the Location entity by ID.
func (*LocationUpdateOne) SetUpdatedAt ¶
func (luo *LocationUpdateOne) SetUpdatedAt(t time.Time) *LocationUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*LocationUpdateOne) Where ¶
func (luo *LocationUpdateOne) Where(ps ...predicate.Location) *LocationUpdateOne
Where appends a list predicates to the LocationUpdate builder.
type MaintenanceEntries ¶
type MaintenanceEntries []*MaintenanceEntry
MaintenanceEntries is a parsable slice of MaintenanceEntry.
type MaintenanceEntry ¶
type MaintenanceEntry struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // ItemID holds the value of the "item_id" field. ItemID uuid.UUID `json:"item_id,omitempty"` // Date holds the value of the "date" field. Date time.Time `json:"date,omitempty"` // ScheduledDate holds the value of the "scheduled_date" field. ScheduledDate time.Time `json:"scheduled_date,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Cost holds the value of the "cost" field. Cost float64 `json:"cost,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MaintenanceEntryQuery when eager-loading is set. Edges MaintenanceEntryEdges `json:"edges"` // contains filtered or unexported fields }
MaintenanceEntry is the model entity for the MaintenanceEntry schema.
func (*MaintenanceEntry) GetID ¶
func (me *MaintenanceEntry) GetID() uuid.UUID
func (*MaintenanceEntry) QueryItem ¶
func (me *MaintenanceEntry) QueryItem() *ItemQuery
QueryItem queries the "item" edge of the MaintenanceEntry entity.
func (*MaintenanceEntry) String ¶
func (me *MaintenanceEntry) String() string
String implements the fmt.Stringer.
func (*MaintenanceEntry) Unwrap ¶
func (me *MaintenanceEntry) Unwrap() *MaintenanceEntry
Unwrap unwraps the MaintenanceEntry 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 (*MaintenanceEntry) Update ¶
func (me *MaintenanceEntry) Update() *MaintenanceEntryUpdateOne
Update returns a builder for updating this MaintenanceEntry. Note that you need to call MaintenanceEntry.Unwrap() before calling this method if this MaintenanceEntry was returned from a transaction, and the transaction was committed or rolled back.
type MaintenanceEntryClient ¶
type MaintenanceEntryClient struct {
// contains filtered or unexported fields
}
MaintenanceEntryClient is a client for the MaintenanceEntry schema.
func NewMaintenanceEntryClient ¶
func NewMaintenanceEntryClient(c config) *MaintenanceEntryClient
NewMaintenanceEntryClient returns a client for the MaintenanceEntry from the given config.
func (*MaintenanceEntryClient) Create ¶
func (c *MaintenanceEntryClient) Create() *MaintenanceEntryCreate
Create returns a builder for creating a MaintenanceEntry entity.
func (*MaintenanceEntryClient) CreateBulk ¶
func (c *MaintenanceEntryClient) CreateBulk(builders ...*MaintenanceEntryCreate) *MaintenanceEntryCreateBulk
CreateBulk returns a builder for creating a bulk of MaintenanceEntry entities.
func (*MaintenanceEntryClient) Delete ¶
func (c *MaintenanceEntryClient) Delete() *MaintenanceEntryDelete
Delete returns a delete builder for MaintenanceEntry.
func (*MaintenanceEntryClient) DeleteOne ¶
func (c *MaintenanceEntryClient) DeleteOne(me *MaintenanceEntry) *MaintenanceEntryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MaintenanceEntryClient) DeleteOneID ¶
func (c *MaintenanceEntryClient) DeleteOneID(id uuid.UUID) *MaintenanceEntryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MaintenanceEntryClient) Get ¶
func (c *MaintenanceEntryClient) Get(ctx context.Context, id uuid.UUID) (*MaintenanceEntry, error)
Get returns a MaintenanceEntry entity by its id.
func (*MaintenanceEntryClient) GetX ¶
func (c *MaintenanceEntryClient) GetX(ctx context.Context, id uuid.UUID) *MaintenanceEntry
GetX is like Get, but panics if an error occurs.
func (*MaintenanceEntryClient) Hooks ¶
func (c *MaintenanceEntryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MaintenanceEntryClient) Intercept ¶
func (c *MaintenanceEntryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `maintenanceentry.Intercept(f(g(h())))`.
func (*MaintenanceEntryClient) Interceptors ¶
func (c *MaintenanceEntryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MaintenanceEntryClient) MapCreateBulk ¶
func (c *MaintenanceEntryClient) MapCreateBulk(slice any, setFunc func(*MaintenanceEntryCreate, int)) *MaintenanceEntryCreateBulk
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 (*MaintenanceEntryClient) Query ¶
func (c *MaintenanceEntryClient) Query() *MaintenanceEntryQuery
Query returns a query builder for MaintenanceEntry.
func (*MaintenanceEntryClient) QueryItem ¶
func (c *MaintenanceEntryClient) QueryItem(me *MaintenanceEntry) *ItemQuery
QueryItem queries the item edge of a MaintenanceEntry.
func (*MaintenanceEntryClient) Update ¶
func (c *MaintenanceEntryClient) Update() *MaintenanceEntryUpdate
Update returns an update builder for MaintenanceEntry.
func (*MaintenanceEntryClient) UpdateOne ¶
func (c *MaintenanceEntryClient) UpdateOne(me *MaintenanceEntry) *MaintenanceEntryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MaintenanceEntryClient) UpdateOneID ¶
func (c *MaintenanceEntryClient) UpdateOneID(id uuid.UUID) *MaintenanceEntryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MaintenanceEntryClient) Use ¶
func (c *MaintenanceEntryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `maintenanceentry.Hooks(f(g(h())))`.
type MaintenanceEntryCreate ¶
type MaintenanceEntryCreate struct {
// contains filtered or unexported fields
}
MaintenanceEntryCreate is the builder for creating a MaintenanceEntry entity.
func (*MaintenanceEntryCreate) Exec ¶
func (mec *MaintenanceEntryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MaintenanceEntryCreate) ExecX ¶
func (mec *MaintenanceEntryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MaintenanceEntryCreate) Mutation ¶
func (mec *MaintenanceEntryCreate) Mutation() *MaintenanceEntryMutation
Mutation returns the MaintenanceEntryMutation object of the builder.
func (*MaintenanceEntryCreate) Save ¶
func (mec *MaintenanceEntryCreate) Save(ctx context.Context) (*MaintenanceEntry, error)
Save creates the MaintenanceEntry in the database.
func (*MaintenanceEntryCreate) SaveX ¶
func (mec *MaintenanceEntryCreate) SaveX(ctx context.Context) *MaintenanceEntry
SaveX calls Save and panics if Save returns an error.
func (*MaintenanceEntryCreate) SetCost ¶
func (mec *MaintenanceEntryCreate) SetCost(f float64) *MaintenanceEntryCreate
SetCost sets the "cost" field.
func (*MaintenanceEntryCreate) SetCreatedAt ¶
func (mec *MaintenanceEntryCreate) SetCreatedAt(t time.Time) *MaintenanceEntryCreate
SetCreatedAt sets the "created_at" field.
func (*MaintenanceEntryCreate) SetDate ¶
func (mec *MaintenanceEntryCreate) SetDate(t time.Time) *MaintenanceEntryCreate
SetDate sets the "date" field.
func (*MaintenanceEntryCreate) SetDescription ¶
func (mec *MaintenanceEntryCreate) SetDescription(s string) *MaintenanceEntryCreate
SetDescription sets the "description" field.
func (*MaintenanceEntryCreate) SetID ¶
func (mec *MaintenanceEntryCreate) SetID(u uuid.UUID) *MaintenanceEntryCreate
SetID sets the "id" field.
func (*MaintenanceEntryCreate) SetItem ¶
func (mec *MaintenanceEntryCreate) SetItem(i *Item) *MaintenanceEntryCreate
SetItem sets the "item" edge to the Item entity.
func (*MaintenanceEntryCreate) SetItemID ¶
func (mec *MaintenanceEntryCreate) SetItemID(u uuid.UUID) *MaintenanceEntryCreate
SetItemID sets the "item_id" field.
func (*MaintenanceEntryCreate) SetName ¶
func (mec *MaintenanceEntryCreate) SetName(s string) *MaintenanceEntryCreate
SetName sets the "name" field.
func (*MaintenanceEntryCreate) SetNillableCost ¶
func (mec *MaintenanceEntryCreate) SetNillableCost(f *float64) *MaintenanceEntryCreate
SetNillableCost sets the "cost" field if the given value is not nil.
func (*MaintenanceEntryCreate) SetNillableCreatedAt ¶
func (mec *MaintenanceEntryCreate) SetNillableCreatedAt(t *time.Time) *MaintenanceEntryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MaintenanceEntryCreate) SetNillableDate ¶
func (mec *MaintenanceEntryCreate) SetNillableDate(t *time.Time) *MaintenanceEntryCreate
SetNillableDate sets the "date" field if the given value is not nil.
func (*MaintenanceEntryCreate) SetNillableDescription ¶
func (mec *MaintenanceEntryCreate) SetNillableDescription(s *string) *MaintenanceEntryCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MaintenanceEntryCreate) SetNillableID ¶
func (mec *MaintenanceEntryCreate) SetNillableID(u *uuid.UUID) *MaintenanceEntryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*MaintenanceEntryCreate) SetNillableScheduledDate ¶
func (mec *MaintenanceEntryCreate) SetNillableScheduledDate(t *time.Time) *MaintenanceEntryCreate
SetNillableScheduledDate sets the "scheduled_date" field if the given value is not nil.
func (*MaintenanceEntryCreate) SetNillableUpdatedAt ¶
func (mec *MaintenanceEntryCreate) SetNillableUpdatedAt(t *time.Time) *MaintenanceEntryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MaintenanceEntryCreate) SetScheduledDate ¶
func (mec *MaintenanceEntryCreate) SetScheduledDate(t time.Time) *MaintenanceEntryCreate
SetScheduledDate sets the "scheduled_date" field.
func (*MaintenanceEntryCreate) SetUpdatedAt ¶
func (mec *MaintenanceEntryCreate) SetUpdatedAt(t time.Time) *MaintenanceEntryCreate
SetUpdatedAt sets the "updated_at" field.
type MaintenanceEntryCreateBulk ¶
type MaintenanceEntryCreateBulk struct {
// contains filtered or unexported fields
}
MaintenanceEntryCreateBulk is the builder for creating many MaintenanceEntry entities in bulk.
func (*MaintenanceEntryCreateBulk) Exec ¶
func (mecb *MaintenanceEntryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MaintenanceEntryCreateBulk) ExecX ¶
func (mecb *MaintenanceEntryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MaintenanceEntryCreateBulk) Save ¶
func (mecb *MaintenanceEntryCreateBulk) Save(ctx context.Context) ([]*MaintenanceEntry, error)
Save creates the MaintenanceEntry entities in the database.
func (*MaintenanceEntryCreateBulk) SaveX ¶
func (mecb *MaintenanceEntryCreateBulk) SaveX(ctx context.Context) []*MaintenanceEntry
SaveX is like Save, but panics if an error occurs.
type MaintenanceEntryDelete ¶
type MaintenanceEntryDelete struct {
// contains filtered or unexported fields
}
MaintenanceEntryDelete is the builder for deleting a MaintenanceEntry entity.
func (*MaintenanceEntryDelete) Exec ¶
func (med *MaintenanceEntryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MaintenanceEntryDelete) ExecX ¶
func (med *MaintenanceEntryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MaintenanceEntryDelete) Where ¶
func (med *MaintenanceEntryDelete) Where(ps ...predicate.MaintenanceEntry) *MaintenanceEntryDelete
Where appends a list predicates to the MaintenanceEntryDelete builder.
type MaintenanceEntryDeleteOne ¶
type MaintenanceEntryDeleteOne struct {
// contains filtered or unexported fields
}
MaintenanceEntryDeleteOne is the builder for deleting a single MaintenanceEntry entity.
func (*MaintenanceEntryDeleteOne) Exec ¶
func (medo *MaintenanceEntryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MaintenanceEntryDeleteOne) ExecX ¶
func (medo *MaintenanceEntryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MaintenanceEntryDeleteOne) Where ¶
func (medo *MaintenanceEntryDeleteOne) Where(ps ...predicate.MaintenanceEntry) *MaintenanceEntryDeleteOne
Where appends a list predicates to the MaintenanceEntryDelete builder.
type MaintenanceEntryEdges ¶
type MaintenanceEntryEdges struct { // Item holds the value of the item edge. Item *Item `json:"item,omitempty"` // contains filtered or unexported fields }
MaintenanceEntryEdges holds the relations/edges for other nodes in the graph.
func (MaintenanceEntryEdges) ItemOrErr ¶
func (e MaintenanceEntryEdges) ItemOrErr() (*Item, error)
ItemOrErr returns the Item value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MaintenanceEntryGroupBy ¶
type MaintenanceEntryGroupBy struct {
// contains filtered or unexported fields
}
MaintenanceEntryGroupBy is the group-by builder for MaintenanceEntry entities.
func (*MaintenanceEntryGroupBy) Aggregate ¶
func (megb *MaintenanceEntryGroupBy) Aggregate(fns ...AggregateFunc) *MaintenanceEntryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MaintenanceEntryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntryGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*MaintenanceEntryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntryGroupBy) Scan ¶
func (megb *MaintenanceEntryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MaintenanceEntryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MaintenanceEntryMutation ¶
type MaintenanceEntryMutation struct {
// contains filtered or unexported fields
}
MaintenanceEntryMutation represents an operation that mutates the MaintenanceEntry nodes in the graph.
func (*MaintenanceEntryMutation) AddCost ¶
func (m *MaintenanceEntryMutation) AddCost(f float64)
AddCost adds f to the "cost" field.
func (*MaintenanceEntryMutation) AddField ¶
func (m *MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) AddedCost ¶
func (m *MaintenanceEntryMutation) AddedCost() (r float64, exists bool)
AddedCost returns the value that was added to the "cost" field in this mutation.
func (*MaintenanceEntryMutation) AddedEdges ¶
func (m *MaintenanceEntryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MaintenanceEntryMutation) AddedField ¶
func (m *MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) AddedFields ¶
func (m *MaintenanceEntryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MaintenanceEntryMutation) AddedIDs ¶
func (m *MaintenanceEntryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MaintenanceEntryMutation) ClearDate ¶
func (m *MaintenanceEntryMutation) ClearDate()
ClearDate clears the value of the "date" field.
func (*MaintenanceEntryMutation) ClearDescription ¶
func (m *MaintenanceEntryMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*MaintenanceEntryMutation) ClearEdge ¶
func (m *MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) ClearField ¶
func (m *MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) ClearItem ¶
func (m *MaintenanceEntryMutation) ClearItem()
ClearItem clears the "item" edge to the Item entity.
func (*MaintenanceEntryMutation) ClearScheduledDate ¶
func (m *MaintenanceEntryMutation) ClearScheduledDate()
ClearScheduledDate clears the value of the "scheduled_date" field.
func (*MaintenanceEntryMutation) ClearedEdges ¶
func (m *MaintenanceEntryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MaintenanceEntryMutation) ClearedFields ¶
func (m *MaintenanceEntryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MaintenanceEntryMutation) Client ¶
func (m MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) Cost ¶
func (m *MaintenanceEntryMutation) Cost() (r float64, exists bool)
Cost returns the value of the "cost" field in the mutation.
func (*MaintenanceEntryMutation) CreatedAt ¶
func (m *MaintenanceEntryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MaintenanceEntryMutation) Date ¶
func (m *MaintenanceEntryMutation) Date() (r time.Time, exists bool)
Date returns the value of the "date" field in the mutation.
func (*MaintenanceEntryMutation) DateCleared ¶
func (m *MaintenanceEntryMutation) DateCleared() bool
DateCleared returns if the "date" field was cleared in this mutation.
func (*MaintenanceEntryMutation) Description ¶
func (m *MaintenanceEntryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*MaintenanceEntryMutation) DescriptionCleared ¶
func (m *MaintenanceEntryMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*MaintenanceEntryMutation) EdgeCleared ¶
func (m *MaintenanceEntryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MaintenanceEntryMutation) Field ¶
func (m *MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) FieldCleared ¶
func (m *MaintenanceEntryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MaintenanceEntryMutation) Fields ¶
func (m *MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) ID ¶
func (m *MaintenanceEntryMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MaintenanceEntryMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MaintenanceEntryMutation) ItemCleared ¶
func (m *MaintenanceEntryMutation) ItemCleared() bool
ItemCleared reports if the "item" edge to the Item entity was cleared.
func (*MaintenanceEntryMutation) ItemID ¶
func (m *MaintenanceEntryMutation) ItemID() (r uuid.UUID, exists bool)
ItemID returns the value of the "item_id" field in the mutation.
func (*MaintenanceEntryMutation) ItemIDs ¶
func (m *MaintenanceEntryMutation) ItemIDs() (ids []uuid.UUID)
ItemIDs returns the "item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ItemID instead. It exists only for internal usage by the builders.
func (*MaintenanceEntryMutation) Name ¶
func (m *MaintenanceEntryMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*MaintenanceEntryMutation) OldCost ¶
func (m *MaintenanceEntryMutation) OldCost(ctx context.Context) (v float64, err error)
OldCost returns the old "cost" field's value of the MaintenanceEntry entity. If the MaintenanceEntry 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 (*MaintenanceEntryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the MaintenanceEntry entity. If the MaintenanceEntry 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 (*MaintenanceEntryMutation) OldDate ¶
OldDate returns the old "date" field's value of the MaintenanceEntry entity. If the MaintenanceEntry 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 (*MaintenanceEntryMutation) OldDescription ¶
func (m *MaintenanceEntryMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the MaintenanceEntry entity. If the MaintenanceEntry 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 (*MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) OldItemID ¶
OldItemID returns the old "item_id" field's value of the MaintenanceEntry entity. If the MaintenanceEntry 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 (*MaintenanceEntryMutation) OldName ¶
func (m *MaintenanceEntryMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the MaintenanceEntry entity. If the MaintenanceEntry 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 (*MaintenanceEntryMutation) OldScheduledDate ¶
OldScheduledDate returns the old "scheduled_date" field's value of the MaintenanceEntry entity. If the MaintenanceEntry 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 (*MaintenanceEntryMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the MaintenanceEntry entity. If the MaintenanceEntry 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 (*MaintenanceEntryMutation) Op ¶
func (m *MaintenanceEntryMutation) Op() Op
Op returns the operation name.
func (*MaintenanceEntryMutation) RemovedEdges ¶
func (m *MaintenanceEntryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MaintenanceEntryMutation) RemovedIDs ¶
func (m *MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) ResetCost ¶
func (m *MaintenanceEntryMutation) ResetCost()
ResetCost resets all changes to the "cost" field.
func (*MaintenanceEntryMutation) ResetCreatedAt ¶
func (m *MaintenanceEntryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MaintenanceEntryMutation) ResetDate ¶
func (m *MaintenanceEntryMutation) ResetDate()
ResetDate resets all changes to the "date" field.
func (*MaintenanceEntryMutation) ResetDescription ¶
func (m *MaintenanceEntryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*MaintenanceEntryMutation) ResetEdge ¶
func (m *MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) ResetField ¶
func (m *MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) ResetItem ¶
func (m *MaintenanceEntryMutation) ResetItem()
ResetItem resets all changes to the "item" edge.
func (*MaintenanceEntryMutation) ResetItemID ¶
func (m *MaintenanceEntryMutation) ResetItemID()
ResetItemID resets all changes to the "item_id" field.
func (*MaintenanceEntryMutation) ResetName ¶
func (m *MaintenanceEntryMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*MaintenanceEntryMutation) ResetScheduledDate ¶
func (m *MaintenanceEntryMutation) ResetScheduledDate()
ResetScheduledDate resets all changes to the "scheduled_date" field.
func (*MaintenanceEntryMutation) ResetUpdatedAt ¶
func (m *MaintenanceEntryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MaintenanceEntryMutation) ScheduledDate ¶
func (m *MaintenanceEntryMutation) ScheduledDate() (r time.Time, exists bool)
ScheduledDate returns the value of the "scheduled_date" field in the mutation.
func (*MaintenanceEntryMutation) ScheduledDateCleared ¶
func (m *MaintenanceEntryMutation) ScheduledDateCleared() bool
ScheduledDateCleared returns if the "scheduled_date" field was cleared in this mutation.
func (*MaintenanceEntryMutation) SetCost ¶
func (m *MaintenanceEntryMutation) SetCost(f float64)
SetCost sets the "cost" field.
func (*MaintenanceEntryMutation) SetCreatedAt ¶
func (m *MaintenanceEntryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MaintenanceEntryMutation) SetDate ¶
func (m *MaintenanceEntryMutation) SetDate(t time.Time)
SetDate sets the "date" field.
func (*MaintenanceEntryMutation) SetDescription ¶
func (m *MaintenanceEntryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*MaintenanceEntryMutation) SetField ¶
func (m *MaintenanceEntryMutation) 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 (*MaintenanceEntryMutation) SetID ¶
func (m *MaintenanceEntryMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of MaintenanceEntry entities.
func (*MaintenanceEntryMutation) SetItemID ¶
func (m *MaintenanceEntryMutation) SetItemID(u uuid.UUID)
SetItemID sets the "item_id" field.
func (*MaintenanceEntryMutation) SetName ¶
func (m *MaintenanceEntryMutation) SetName(s string)
SetName sets the "name" field.
func (*MaintenanceEntryMutation) SetOp ¶
func (m *MaintenanceEntryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MaintenanceEntryMutation) SetScheduledDate ¶
func (m *MaintenanceEntryMutation) SetScheduledDate(t time.Time)
SetScheduledDate sets the "scheduled_date" field.
func (*MaintenanceEntryMutation) SetUpdatedAt ¶
func (m *MaintenanceEntryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (MaintenanceEntryMutation) Tx ¶
func (m MaintenanceEntryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MaintenanceEntryMutation) Type ¶
func (m *MaintenanceEntryMutation) Type() string
Type returns the node type of this mutation (MaintenanceEntry).
func (*MaintenanceEntryMutation) UpdatedAt ¶
func (m *MaintenanceEntryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MaintenanceEntryMutation) Where ¶
func (m *MaintenanceEntryMutation) Where(ps ...predicate.MaintenanceEntry)
Where appends a list predicates to the MaintenanceEntryMutation builder.
func (*MaintenanceEntryMutation) WhereP ¶
func (m *MaintenanceEntryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MaintenanceEntryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MaintenanceEntryQuery ¶
type MaintenanceEntryQuery struct {
// contains filtered or unexported fields
}
MaintenanceEntryQuery is the builder for querying MaintenanceEntry entities.
func (*MaintenanceEntryQuery) Aggregate ¶
func (meq *MaintenanceEntryQuery) Aggregate(fns ...AggregateFunc) *MaintenanceEntrySelect
Aggregate returns a MaintenanceEntrySelect configured with the given aggregations.
func (*MaintenanceEntryQuery) All ¶
func (meq *MaintenanceEntryQuery) All(ctx context.Context) ([]*MaintenanceEntry, error)
All executes the query and returns a list of MaintenanceEntries.
func (*MaintenanceEntryQuery) AllX ¶
func (meq *MaintenanceEntryQuery) AllX(ctx context.Context) []*MaintenanceEntry
AllX is like All, but panics if an error occurs.
func (*MaintenanceEntryQuery) Clone ¶
func (meq *MaintenanceEntryQuery) Clone() *MaintenanceEntryQuery
Clone returns a duplicate of the MaintenanceEntryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MaintenanceEntryQuery) Count ¶
func (meq *MaintenanceEntryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MaintenanceEntryQuery) CountX ¶
func (meq *MaintenanceEntryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MaintenanceEntryQuery) Exist ¶
func (meq *MaintenanceEntryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MaintenanceEntryQuery) ExistX ¶
func (meq *MaintenanceEntryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MaintenanceEntryQuery) First ¶
func (meq *MaintenanceEntryQuery) First(ctx context.Context) (*MaintenanceEntry, error)
First returns the first MaintenanceEntry entity from the query. Returns a *NotFoundError when no MaintenanceEntry was found.
func (*MaintenanceEntryQuery) FirstID ¶
FirstID returns the first MaintenanceEntry ID from the query. Returns a *NotFoundError when no MaintenanceEntry ID was found.
func (*MaintenanceEntryQuery) FirstIDX ¶
func (meq *MaintenanceEntryQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*MaintenanceEntryQuery) FirstX ¶
func (meq *MaintenanceEntryQuery) FirstX(ctx context.Context) *MaintenanceEntry
FirstX is like First, but panics if an error occurs.
func (*MaintenanceEntryQuery) GroupBy ¶
func (meq *MaintenanceEntryQuery) GroupBy(field string, fields ...string) *MaintenanceEntryGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.MaintenanceEntry.Query(). GroupBy(maintenanceentry.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MaintenanceEntryQuery) IDs ¶
IDs executes the query and returns a list of MaintenanceEntry IDs.
func (*MaintenanceEntryQuery) IDsX ¶
func (meq *MaintenanceEntryQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*MaintenanceEntryQuery) Limit ¶
func (meq *MaintenanceEntryQuery) Limit(limit int) *MaintenanceEntryQuery
Limit the number of records to be returned by this query.
func (*MaintenanceEntryQuery) Offset ¶
func (meq *MaintenanceEntryQuery) Offset(offset int) *MaintenanceEntryQuery
Offset to start from.
func (*MaintenanceEntryQuery) Only ¶
func (meq *MaintenanceEntryQuery) Only(ctx context.Context) (*MaintenanceEntry, error)
Only returns a single MaintenanceEntry entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MaintenanceEntry entity is found. Returns a *NotFoundError when no MaintenanceEntry entities are found.
func (*MaintenanceEntryQuery) OnlyID ¶
OnlyID is like Only, but returns the only MaintenanceEntry ID in the query. Returns a *NotSingularError when more than one MaintenanceEntry ID is found. Returns a *NotFoundError when no entities are found.
func (*MaintenanceEntryQuery) OnlyIDX ¶
func (meq *MaintenanceEntryQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MaintenanceEntryQuery) OnlyX ¶
func (meq *MaintenanceEntryQuery) OnlyX(ctx context.Context) *MaintenanceEntry
OnlyX is like Only, but panics if an error occurs.
func (*MaintenanceEntryQuery) Order ¶
func (meq *MaintenanceEntryQuery) Order(o ...maintenanceentry.OrderOption) *MaintenanceEntryQuery
Order specifies how the records should be ordered.
func (*MaintenanceEntryQuery) QueryItem ¶
func (meq *MaintenanceEntryQuery) QueryItem() *ItemQuery
QueryItem chains the current query on the "item" edge.
func (*MaintenanceEntryQuery) Select ¶
func (meq *MaintenanceEntryQuery) Select(fields ...string) *MaintenanceEntrySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.MaintenanceEntry.Query(). Select(maintenanceentry.FieldCreatedAt). Scan(ctx, &v)
func (*MaintenanceEntryQuery) Unique ¶
func (meq *MaintenanceEntryQuery) Unique(unique bool) *MaintenanceEntryQuery
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 (*MaintenanceEntryQuery) Where ¶
func (meq *MaintenanceEntryQuery) Where(ps ...predicate.MaintenanceEntry) *MaintenanceEntryQuery
Where adds a new predicate for the MaintenanceEntryQuery builder.
func (*MaintenanceEntryQuery) WithItem ¶
func (meq *MaintenanceEntryQuery) WithItem(opts ...func(*ItemQuery)) *MaintenanceEntryQuery
WithItem tells the query-builder to eager-load the nodes that are connected to the "item" edge. The optional arguments are used to configure the query builder of the edge.
type MaintenanceEntrySelect ¶
type MaintenanceEntrySelect struct { *MaintenanceEntryQuery // contains filtered or unexported fields }
MaintenanceEntrySelect is the builder for selecting fields of MaintenanceEntry entities.
func (*MaintenanceEntrySelect) Aggregate ¶
func (mes *MaintenanceEntrySelect) Aggregate(fns ...AggregateFunc) *MaintenanceEntrySelect
Aggregate adds the given aggregation functions to the selector query.
func (*MaintenanceEntrySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntrySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntrySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntrySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntrySelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*MaintenanceEntrySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntrySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MaintenanceEntrySelect) Scan ¶
func (mes *MaintenanceEntrySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MaintenanceEntrySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MaintenanceEntryUpdate ¶
type MaintenanceEntryUpdate struct {
// contains filtered or unexported fields
}
MaintenanceEntryUpdate is the builder for updating MaintenanceEntry entities.
func (*MaintenanceEntryUpdate) AddCost ¶
func (meu *MaintenanceEntryUpdate) AddCost(f float64) *MaintenanceEntryUpdate
AddCost adds f to the "cost" field.
func (*MaintenanceEntryUpdate) ClearDate ¶
func (meu *MaintenanceEntryUpdate) ClearDate() *MaintenanceEntryUpdate
ClearDate clears the value of the "date" field.
func (*MaintenanceEntryUpdate) ClearDescription ¶
func (meu *MaintenanceEntryUpdate) ClearDescription() *MaintenanceEntryUpdate
ClearDescription clears the value of the "description" field.
func (*MaintenanceEntryUpdate) ClearItem ¶
func (meu *MaintenanceEntryUpdate) ClearItem() *MaintenanceEntryUpdate
ClearItem clears the "item" edge to the Item entity.
func (*MaintenanceEntryUpdate) ClearScheduledDate ¶
func (meu *MaintenanceEntryUpdate) ClearScheduledDate() *MaintenanceEntryUpdate
ClearScheduledDate clears the value of the "scheduled_date" field.
func (*MaintenanceEntryUpdate) Exec ¶
func (meu *MaintenanceEntryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MaintenanceEntryUpdate) ExecX ¶
func (meu *MaintenanceEntryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MaintenanceEntryUpdate) Mutation ¶
func (meu *MaintenanceEntryUpdate) Mutation() *MaintenanceEntryMutation
Mutation returns the MaintenanceEntryMutation object of the builder.
func (*MaintenanceEntryUpdate) Save ¶
func (meu *MaintenanceEntryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MaintenanceEntryUpdate) SaveX ¶
func (meu *MaintenanceEntryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MaintenanceEntryUpdate) SetCost ¶
func (meu *MaintenanceEntryUpdate) SetCost(f float64) *MaintenanceEntryUpdate
SetCost sets the "cost" field.
func (*MaintenanceEntryUpdate) SetDate ¶
func (meu *MaintenanceEntryUpdate) SetDate(t time.Time) *MaintenanceEntryUpdate
SetDate sets the "date" field.
func (*MaintenanceEntryUpdate) SetDescription ¶
func (meu *MaintenanceEntryUpdate) SetDescription(s string) *MaintenanceEntryUpdate
SetDescription sets the "description" field.
func (*MaintenanceEntryUpdate) SetItem ¶
func (meu *MaintenanceEntryUpdate) SetItem(i *Item) *MaintenanceEntryUpdate
SetItem sets the "item" edge to the Item entity.
func (*MaintenanceEntryUpdate) SetItemID ¶
func (meu *MaintenanceEntryUpdate) SetItemID(u uuid.UUID) *MaintenanceEntryUpdate
SetItemID sets the "item_id" field.
func (*MaintenanceEntryUpdate) SetName ¶
func (meu *MaintenanceEntryUpdate) SetName(s string) *MaintenanceEntryUpdate
SetName sets the "name" field.
func (*MaintenanceEntryUpdate) SetNillableCost ¶
func (meu *MaintenanceEntryUpdate) SetNillableCost(f *float64) *MaintenanceEntryUpdate
SetNillableCost sets the "cost" field if the given value is not nil.
func (*MaintenanceEntryUpdate) SetNillableDate ¶
func (meu *MaintenanceEntryUpdate) SetNillableDate(t *time.Time) *MaintenanceEntryUpdate
SetNillableDate sets the "date" field if the given value is not nil.
func (*MaintenanceEntryUpdate) SetNillableDescription ¶
func (meu *MaintenanceEntryUpdate) SetNillableDescription(s *string) *MaintenanceEntryUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MaintenanceEntryUpdate) SetNillableItemID ¶
func (meu *MaintenanceEntryUpdate) SetNillableItemID(u *uuid.UUID) *MaintenanceEntryUpdate
SetNillableItemID sets the "item_id" field if the given value is not nil.
func (*MaintenanceEntryUpdate) SetNillableName ¶
func (meu *MaintenanceEntryUpdate) SetNillableName(s *string) *MaintenanceEntryUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*MaintenanceEntryUpdate) SetNillableScheduledDate ¶
func (meu *MaintenanceEntryUpdate) SetNillableScheduledDate(t *time.Time) *MaintenanceEntryUpdate
SetNillableScheduledDate sets the "scheduled_date" field if the given value is not nil.
func (*MaintenanceEntryUpdate) SetScheduledDate ¶
func (meu *MaintenanceEntryUpdate) SetScheduledDate(t time.Time) *MaintenanceEntryUpdate
SetScheduledDate sets the "scheduled_date" field.
func (*MaintenanceEntryUpdate) SetUpdatedAt ¶
func (meu *MaintenanceEntryUpdate) SetUpdatedAt(t time.Time) *MaintenanceEntryUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MaintenanceEntryUpdate) Where ¶
func (meu *MaintenanceEntryUpdate) Where(ps ...predicate.MaintenanceEntry) *MaintenanceEntryUpdate
Where appends a list predicates to the MaintenanceEntryUpdate builder.
type MaintenanceEntryUpdateOne ¶
type MaintenanceEntryUpdateOne struct {
// contains filtered or unexported fields
}
MaintenanceEntryUpdateOne is the builder for updating a single MaintenanceEntry entity.
func (*MaintenanceEntryUpdateOne) AddCost ¶
func (meuo *MaintenanceEntryUpdateOne) AddCost(f float64) *MaintenanceEntryUpdateOne
AddCost adds f to the "cost" field.
func (*MaintenanceEntryUpdateOne) ClearDate ¶
func (meuo *MaintenanceEntryUpdateOne) ClearDate() *MaintenanceEntryUpdateOne
ClearDate clears the value of the "date" field.
func (*MaintenanceEntryUpdateOne) ClearDescription ¶
func (meuo *MaintenanceEntryUpdateOne) ClearDescription() *MaintenanceEntryUpdateOne
ClearDescription clears the value of the "description" field.
func (*MaintenanceEntryUpdateOne) ClearItem ¶
func (meuo *MaintenanceEntryUpdateOne) ClearItem() *MaintenanceEntryUpdateOne
ClearItem clears the "item" edge to the Item entity.
func (*MaintenanceEntryUpdateOne) ClearScheduledDate ¶
func (meuo *MaintenanceEntryUpdateOne) ClearScheduledDate() *MaintenanceEntryUpdateOne
ClearScheduledDate clears the value of the "scheduled_date" field.
func (*MaintenanceEntryUpdateOne) Exec ¶
func (meuo *MaintenanceEntryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MaintenanceEntryUpdateOne) ExecX ¶
func (meuo *MaintenanceEntryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MaintenanceEntryUpdateOne) Mutation ¶
func (meuo *MaintenanceEntryUpdateOne) Mutation() *MaintenanceEntryMutation
Mutation returns the MaintenanceEntryMutation object of the builder.
func (*MaintenanceEntryUpdateOne) Save ¶
func (meuo *MaintenanceEntryUpdateOne) Save(ctx context.Context) (*MaintenanceEntry, error)
Save executes the query and returns the updated MaintenanceEntry entity.
func (*MaintenanceEntryUpdateOne) SaveX ¶
func (meuo *MaintenanceEntryUpdateOne) SaveX(ctx context.Context) *MaintenanceEntry
SaveX is like Save, but panics if an error occurs.
func (*MaintenanceEntryUpdateOne) Select ¶
func (meuo *MaintenanceEntryUpdateOne) Select(field string, fields ...string) *MaintenanceEntryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MaintenanceEntryUpdateOne) SetCost ¶
func (meuo *MaintenanceEntryUpdateOne) SetCost(f float64) *MaintenanceEntryUpdateOne
SetCost sets the "cost" field.
func (*MaintenanceEntryUpdateOne) SetDate ¶
func (meuo *MaintenanceEntryUpdateOne) SetDate(t time.Time) *MaintenanceEntryUpdateOne
SetDate sets the "date" field.
func (*MaintenanceEntryUpdateOne) SetDescription ¶
func (meuo *MaintenanceEntryUpdateOne) SetDescription(s string) *MaintenanceEntryUpdateOne
SetDescription sets the "description" field.
func (*MaintenanceEntryUpdateOne) SetItem ¶
func (meuo *MaintenanceEntryUpdateOne) SetItem(i *Item) *MaintenanceEntryUpdateOne
SetItem sets the "item" edge to the Item entity.
func (*MaintenanceEntryUpdateOne) SetItemID ¶
func (meuo *MaintenanceEntryUpdateOne) SetItemID(u uuid.UUID) *MaintenanceEntryUpdateOne
SetItemID sets the "item_id" field.
func (*MaintenanceEntryUpdateOne) SetName ¶
func (meuo *MaintenanceEntryUpdateOne) SetName(s string) *MaintenanceEntryUpdateOne
SetName sets the "name" field.
func (*MaintenanceEntryUpdateOne) SetNillableCost ¶
func (meuo *MaintenanceEntryUpdateOne) SetNillableCost(f *float64) *MaintenanceEntryUpdateOne
SetNillableCost sets the "cost" field if the given value is not nil.
func (*MaintenanceEntryUpdateOne) SetNillableDate ¶
func (meuo *MaintenanceEntryUpdateOne) SetNillableDate(t *time.Time) *MaintenanceEntryUpdateOne
SetNillableDate sets the "date" field if the given value is not nil.
func (*MaintenanceEntryUpdateOne) SetNillableDescription ¶
func (meuo *MaintenanceEntryUpdateOne) SetNillableDescription(s *string) *MaintenanceEntryUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MaintenanceEntryUpdateOne) SetNillableItemID ¶
func (meuo *MaintenanceEntryUpdateOne) SetNillableItemID(u *uuid.UUID) *MaintenanceEntryUpdateOne
SetNillableItemID sets the "item_id" field if the given value is not nil.
func (*MaintenanceEntryUpdateOne) SetNillableName ¶
func (meuo *MaintenanceEntryUpdateOne) SetNillableName(s *string) *MaintenanceEntryUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*MaintenanceEntryUpdateOne) SetNillableScheduledDate ¶
func (meuo *MaintenanceEntryUpdateOne) SetNillableScheduledDate(t *time.Time) *MaintenanceEntryUpdateOne
SetNillableScheduledDate sets the "scheduled_date" field if the given value is not nil.
func (*MaintenanceEntryUpdateOne) SetScheduledDate ¶
func (meuo *MaintenanceEntryUpdateOne) SetScheduledDate(t time.Time) *MaintenanceEntryUpdateOne
SetScheduledDate sets the "scheduled_date" field.
func (*MaintenanceEntryUpdateOne) SetUpdatedAt ¶
func (meuo *MaintenanceEntryUpdateOne) SetUpdatedAt(t time.Time) *MaintenanceEntryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MaintenanceEntryUpdateOne) Where ¶
func (meuo *MaintenanceEntryUpdateOne) Where(ps ...predicate.MaintenanceEntry) *MaintenanceEntryUpdateOne
Where appends a list predicates to the MaintenanceEntryUpdate 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 Notifier ¶
type Notifier struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // GroupID holds the value of the "group_id" field. GroupID uuid.UUID `json:"group_id,omitempty"` // UserID holds the value of the "user_id" field. UserID uuid.UUID `json:"user_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // URL holds the value of the "url" field. URL string `json:"-"` // IsActive holds the value of the "is_active" field. IsActive bool `json:"is_active,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NotifierQuery when eager-loading is set. Edges NotifierEdges `json:"edges"` // contains filtered or unexported fields }
Notifier is the model entity for the Notifier schema.
func (*Notifier) QueryGroup ¶
func (n *Notifier) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the Notifier entity.
func (*Notifier) Unwrap ¶
Unwrap unwraps the Notifier 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 (*Notifier) Update ¶
func (n *Notifier) Update() *NotifierUpdateOne
Update returns a builder for updating this Notifier. Note that you need to call Notifier.Unwrap() before calling this method if this Notifier was returned from a transaction, and the transaction was committed or rolled back.
type NotifierClient ¶
type NotifierClient struct {
// contains filtered or unexported fields
}
NotifierClient is a client for the Notifier schema.
func NewNotifierClient ¶
func NewNotifierClient(c config) *NotifierClient
NewNotifierClient returns a client for the Notifier from the given config.
func (*NotifierClient) Create ¶
func (c *NotifierClient) Create() *NotifierCreate
Create returns a builder for creating a Notifier entity.
func (*NotifierClient) CreateBulk ¶
func (c *NotifierClient) CreateBulk(builders ...*NotifierCreate) *NotifierCreateBulk
CreateBulk returns a builder for creating a bulk of Notifier entities.
func (*NotifierClient) Delete ¶
func (c *NotifierClient) Delete() *NotifierDelete
Delete returns a delete builder for Notifier.
func (*NotifierClient) DeleteOne ¶
func (c *NotifierClient) DeleteOne(n *Notifier) *NotifierDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NotifierClient) DeleteOneID ¶
func (c *NotifierClient) DeleteOneID(id uuid.UUID) *NotifierDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NotifierClient) Hooks ¶
func (c *NotifierClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NotifierClient) Intercept ¶
func (c *NotifierClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `notifier.Intercept(f(g(h())))`.
func (*NotifierClient) Interceptors ¶
func (c *NotifierClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NotifierClient) MapCreateBulk ¶
func (c *NotifierClient) MapCreateBulk(slice any, setFunc func(*NotifierCreate, int)) *NotifierCreateBulk
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 (*NotifierClient) Query ¶
func (c *NotifierClient) Query() *NotifierQuery
Query returns a query builder for Notifier.
func (*NotifierClient) QueryGroup ¶
func (c *NotifierClient) QueryGroup(n *Notifier) *GroupQuery
QueryGroup queries the group edge of a Notifier.
func (*NotifierClient) QueryUser ¶
func (c *NotifierClient) QueryUser(n *Notifier) *UserQuery
QueryUser queries the user edge of a Notifier.
func (*NotifierClient) Update ¶
func (c *NotifierClient) Update() *NotifierUpdate
Update returns an update builder for Notifier.
func (*NotifierClient) UpdateOne ¶
func (c *NotifierClient) UpdateOne(n *Notifier) *NotifierUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NotifierClient) UpdateOneID ¶
func (c *NotifierClient) UpdateOneID(id uuid.UUID) *NotifierUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NotifierClient) Use ¶
func (c *NotifierClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `notifier.Hooks(f(g(h())))`.
type NotifierCreate ¶
type NotifierCreate struct {
// contains filtered or unexported fields
}
NotifierCreate is the builder for creating a Notifier entity.
func (*NotifierCreate) Exec ¶
func (nc *NotifierCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NotifierCreate) ExecX ¶
func (nc *NotifierCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotifierCreate) Mutation ¶
func (nc *NotifierCreate) Mutation() *NotifierMutation
Mutation returns the NotifierMutation object of the builder.
func (*NotifierCreate) Save ¶
func (nc *NotifierCreate) Save(ctx context.Context) (*Notifier, error)
Save creates the Notifier in the database.
func (*NotifierCreate) SaveX ¶
func (nc *NotifierCreate) SaveX(ctx context.Context) *Notifier
SaveX calls Save and panics if Save returns an error.
func (*NotifierCreate) SetCreatedAt ¶
func (nc *NotifierCreate) SetCreatedAt(t time.Time) *NotifierCreate
SetCreatedAt sets the "created_at" field.
func (*NotifierCreate) SetGroup ¶
func (nc *NotifierCreate) SetGroup(g *Group) *NotifierCreate
SetGroup sets the "group" edge to the Group entity.
func (*NotifierCreate) SetGroupID ¶
func (nc *NotifierCreate) SetGroupID(u uuid.UUID) *NotifierCreate
SetGroupID sets the "group_id" field.
func (*NotifierCreate) SetID ¶
func (nc *NotifierCreate) SetID(u uuid.UUID) *NotifierCreate
SetID sets the "id" field.
func (*NotifierCreate) SetIsActive ¶
func (nc *NotifierCreate) SetIsActive(b bool) *NotifierCreate
SetIsActive sets the "is_active" field.
func (*NotifierCreate) SetName ¶
func (nc *NotifierCreate) SetName(s string) *NotifierCreate
SetName sets the "name" field.
func (*NotifierCreate) SetNillableCreatedAt ¶
func (nc *NotifierCreate) SetNillableCreatedAt(t *time.Time) *NotifierCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*NotifierCreate) SetNillableID ¶
func (nc *NotifierCreate) SetNillableID(u *uuid.UUID) *NotifierCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*NotifierCreate) SetNillableIsActive ¶
func (nc *NotifierCreate) SetNillableIsActive(b *bool) *NotifierCreate
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*NotifierCreate) SetNillableUpdatedAt ¶
func (nc *NotifierCreate) SetNillableUpdatedAt(t *time.Time) *NotifierCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*NotifierCreate) SetURL ¶
func (nc *NotifierCreate) SetURL(s string) *NotifierCreate
SetURL sets the "url" field.
func (*NotifierCreate) SetUpdatedAt ¶
func (nc *NotifierCreate) SetUpdatedAt(t time.Time) *NotifierCreate
SetUpdatedAt sets the "updated_at" field.
func (*NotifierCreate) SetUser ¶
func (nc *NotifierCreate) SetUser(u *User) *NotifierCreate
SetUser sets the "user" edge to the User entity.
func (*NotifierCreate) SetUserID ¶
func (nc *NotifierCreate) SetUserID(u uuid.UUID) *NotifierCreate
SetUserID sets the "user_id" field.
type NotifierCreateBulk ¶
type NotifierCreateBulk struct {
// contains filtered or unexported fields
}
NotifierCreateBulk is the builder for creating many Notifier entities in bulk.
func (*NotifierCreateBulk) Exec ¶
func (ncb *NotifierCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NotifierCreateBulk) ExecX ¶
func (ncb *NotifierCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NotifierDelete ¶
type NotifierDelete struct {
// contains filtered or unexported fields
}
NotifierDelete is the builder for deleting a Notifier entity.
func (*NotifierDelete) Exec ¶
func (nd *NotifierDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NotifierDelete) ExecX ¶
func (nd *NotifierDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NotifierDelete) Where ¶
func (nd *NotifierDelete) Where(ps ...predicate.Notifier) *NotifierDelete
Where appends a list predicates to the NotifierDelete builder.
type NotifierDeleteOne ¶
type NotifierDeleteOne struct {
// contains filtered or unexported fields
}
NotifierDeleteOne is the builder for deleting a single Notifier entity.
func (*NotifierDeleteOne) Exec ¶
func (ndo *NotifierDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NotifierDeleteOne) ExecX ¶
func (ndo *NotifierDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotifierDeleteOne) Where ¶
func (ndo *NotifierDeleteOne) Where(ps ...predicate.Notifier) *NotifierDeleteOne
Where appends a list predicates to the NotifierDelete builder.
type NotifierEdges ¶
type NotifierEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
NotifierEdges holds the relations/edges for other nodes in the graph.
func (NotifierEdges) GroupOrErr ¶
func (e NotifierEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NotifierEdges) UserOrErr ¶
func (e NotifierEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NotifierGroupBy ¶
type NotifierGroupBy struct {
// contains filtered or unexported fields
}
NotifierGroupBy is the group-by builder for Notifier entities.
func (*NotifierGroupBy) Aggregate ¶
func (ngb *NotifierGroupBy) Aggregate(fns ...AggregateFunc) *NotifierGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NotifierGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NotifierGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NotifierGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NotifierGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NotifierGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NotifierGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NotifierGroupBy) Scan ¶
func (ngb *NotifierGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NotifierGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NotifierMutation ¶
type NotifierMutation struct {
// contains filtered or unexported fields
}
NotifierMutation represents an operation that mutates the Notifier nodes in the graph.
func (*NotifierMutation) AddField ¶
func (m *NotifierMutation) 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 (*NotifierMutation) AddedEdges ¶
func (m *NotifierMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NotifierMutation) AddedField ¶
func (m *NotifierMutation) 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 (*NotifierMutation) AddedFields ¶
func (m *NotifierMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NotifierMutation) AddedIDs ¶
func (m *NotifierMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NotifierMutation) ClearEdge ¶
func (m *NotifierMutation) 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 (*NotifierMutation) ClearField ¶
func (m *NotifierMutation) 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 (*NotifierMutation) ClearGroup ¶
func (m *NotifierMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*NotifierMutation) ClearUser ¶
func (m *NotifierMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*NotifierMutation) ClearedEdges ¶
func (m *NotifierMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NotifierMutation) ClearedFields ¶
func (m *NotifierMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NotifierMutation) Client ¶
func (m NotifierMutation) 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 (*NotifierMutation) CreatedAt ¶
func (m *NotifierMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*NotifierMutation) EdgeCleared ¶
func (m *NotifierMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NotifierMutation) Field ¶
func (m *NotifierMutation) 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 (*NotifierMutation) FieldCleared ¶
func (m *NotifierMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NotifierMutation) Fields ¶
func (m *NotifierMutation) 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 (*NotifierMutation) GroupCleared ¶
func (m *NotifierMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*NotifierMutation) GroupID ¶
func (m *NotifierMutation) GroupID() (r uuid.UUID, exists bool)
GroupID returns the value of the "group_id" field in the mutation.
func (*NotifierMutation) GroupIDs ¶
func (m *NotifierMutation) GroupIDs() (ids []uuid.UUID)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*NotifierMutation) ID ¶
func (m *NotifierMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*NotifierMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*NotifierMutation) IsActive ¶
func (m *NotifierMutation) IsActive() (r bool, exists bool)
IsActive returns the value of the "is_active" field in the mutation.
func (*NotifierMutation) Name ¶
func (m *NotifierMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*NotifierMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Notifier entity. If the Notifier 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 (*NotifierMutation) 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 (*NotifierMutation) OldGroupID ¶
OldGroupID returns the old "group_id" field's value of the Notifier entity. If the Notifier 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 (*NotifierMutation) OldIsActive ¶
func (m *NotifierMutation) OldIsActive(ctx context.Context) (v bool, err error)
OldIsActive returns the old "is_active" field's value of the Notifier entity. If the Notifier 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 (*NotifierMutation) OldName ¶
func (m *NotifierMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Notifier entity. If the Notifier 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 (*NotifierMutation) OldURL ¶
func (m *NotifierMutation) OldURL(ctx context.Context) (v string, err error)
OldURL returns the old "url" field's value of the Notifier entity. If the Notifier 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 (*NotifierMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Notifier entity. If the Notifier 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 (*NotifierMutation) OldUserID ¶
OldUserID returns the old "user_id" field's value of the Notifier entity. If the Notifier 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 (*NotifierMutation) RemovedEdges ¶
func (m *NotifierMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NotifierMutation) RemovedIDs ¶
func (m *NotifierMutation) 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 (*NotifierMutation) ResetCreatedAt ¶
func (m *NotifierMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*NotifierMutation) ResetEdge ¶
func (m *NotifierMutation) 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 (*NotifierMutation) ResetField ¶
func (m *NotifierMutation) 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 (*NotifierMutation) ResetGroup ¶
func (m *NotifierMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*NotifierMutation) ResetGroupID ¶
func (m *NotifierMutation) ResetGroupID()
ResetGroupID resets all changes to the "group_id" field.
func (*NotifierMutation) ResetIsActive ¶
func (m *NotifierMutation) ResetIsActive()
ResetIsActive resets all changes to the "is_active" field.
func (*NotifierMutation) ResetName ¶
func (m *NotifierMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*NotifierMutation) ResetURL ¶
func (m *NotifierMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*NotifierMutation) ResetUpdatedAt ¶
func (m *NotifierMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*NotifierMutation) ResetUser ¶
func (m *NotifierMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*NotifierMutation) ResetUserID ¶
func (m *NotifierMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*NotifierMutation) SetCreatedAt ¶
func (m *NotifierMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*NotifierMutation) SetField ¶
func (m *NotifierMutation) 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 (*NotifierMutation) SetGroupID ¶
func (m *NotifierMutation) SetGroupID(u uuid.UUID)
SetGroupID sets the "group_id" field.
func (*NotifierMutation) SetID ¶
func (m *NotifierMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Notifier entities.
func (*NotifierMutation) SetIsActive ¶
func (m *NotifierMutation) SetIsActive(b bool)
SetIsActive sets the "is_active" field.
func (*NotifierMutation) SetName ¶
func (m *NotifierMutation) SetName(s string)
SetName sets the "name" field.
func (*NotifierMutation) SetOp ¶
func (m *NotifierMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NotifierMutation) SetURL ¶
func (m *NotifierMutation) SetURL(s string)
SetURL sets the "url" field.
func (*NotifierMutation) SetUpdatedAt ¶
func (m *NotifierMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*NotifierMutation) SetUserID ¶
func (m *NotifierMutation) SetUserID(u uuid.UUID)
SetUserID sets the "user_id" field.
func (NotifierMutation) Tx ¶
func (m NotifierMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NotifierMutation) Type ¶
func (m *NotifierMutation) Type() string
Type returns the node type of this mutation (Notifier).
func (*NotifierMutation) URL ¶
func (m *NotifierMutation) URL() (r string, exists bool)
URL returns the value of the "url" field in the mutation.
func (*NotifierMutation) UpdatedAt ¶
func (m *NotifierMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*NotifierMutation) UserCleared ¶
func (m *NotifierMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*NotifierMutation) UserID ¶
func (m *NotifierMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*NotifierMutation) UserIDs ¶
func (m *NotifierMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*NotifierMutation) Where ¶
func (m *NotifierMutation) Where(ps ...predicate.Notifier)
Where appends a list predicates to the NotifierMutation builder.
func (*NotifierMutation) WhereP ¶
func (m *NotifierMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NotifierMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NotifierQuery ¶
type NotifierQuery struct {
// contains filtered or unexported fields
}
NotifierQuery is the builder for querying Notifier entities.
func (*NotifierQuery) Aggregate ¶
func (nq *NotifierQuery) Aggregate(fns ...AggregateFunc) *NotifierSelect
Aggregate returns a NotifierSelect configured with the given aggregations.
func (*NotifierQuery) All ¶
func (nq *NotifierQuery) All(ctx context.Context) ([]*Notifier, error)
All executes the query and returns a list of Notifiers.
func (*NotifierQuery) AllX ¶
func (nq *NotifierQuery) AllX(ctx context.Context) []*Notifier
AllX is like All, but panics if an error occurs.
func (*NotifierQuery) Clone ¶
func (nq *NotifierQuery) Clone() *NotifierQuery
Clone returns a duplicate of the NotifierQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NotifierQuery) Count ¶
func (nq *NotifierQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NotifierQuery) CountX ¶
func (nq *NotifierQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NotifierQuery) Exist ¶
func (nq *NotifierQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NotifierQuery) ExistX ¶
func (nq *NotifierQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NotifierQuery) First ¶
func (nq *NotifierQuery) First(ctx context.Context) (*Notifier, error)
First returns the first Notifier entity from the query. Returns a *NotFoundError when no Notifier was found.
func (*NotifierQuery) FirstID ¶
FirstID returns the first Notifier ID from the query. Returns a *NotFoundError when no Notifier ID was found.
func (*NotifierQuery) FirstIDX ¶
func (nq *NotifierQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*NotifierQuery) FirstX ¶
func (nq *NotifierQuery) FirstX(ctx context.Context) *Notifier
FirstX is like First, but panics if an error occurs.
func (*NotifierQuery) GroupBy ¶
func (nq *NotifierQuery) GroupBy(field string, fields ...string) *NotifierGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Notifier.Query(). GroupBy(notifier.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NotifierQuery) IDsX ¶
func (nq *NotifierQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*NotifierQuery) Limit ¶
func (nq *NotifierQuery) Limit(limit int) *NotifierQuery
Limit the number of records to be returned by this query.
func (*NotifierQuery) Offset ¶
func (nq *NotifierQuery) Offset(offset int) *NotifierQuery
Offset to start from.
func (*NotifierQuery) Only ¶
func (nq *NotifierQuery) Only(ctx context.Context) (*Notifier, error)
Only returns a single Notifier entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Notifier entity is found. Returns a *NotFoundError when no Notifier entities are found.
func (*NotifierQuery) OnlyID ¶
OnlyID is like Only, but returns the only Notifier ID in the query. Returns a *NotSingularError when more than one Notifier ID is found. Returns a *NotFoundError when no entities are found.
func (*NotifierQuery) OnlyIDX ¶
func (nq *NotifierQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NotifierQuery) OnlyX ¶
func (nq *NotifierQuery) OnlyX(ctx context.Context) *Notifier
OnlyX is like Only, but panics if an error occurs.
func (*NotifierQuery) Order ¶
func (nq *NotifierQuery) Order(o ...notifier.OrderOption) *NotifierQuery
Order specifies how the records should be ordered.
func (*NotifierQuery) QueryGroup ¶
func (nq *NotifierQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*NotifierQuery) QueryUser ¶
func (nq *NotifierQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*NotifierQuery) Select ¶
func (nq *NotifierQuery) Select(fields ...string) *NotifierSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Notifier.Query(). Select(notifier.FieldCreatedAt). Scan(ctx, &v)
func (*NotifierQuery) Unique ¶
func (nq *NotifierQuery) Unique(unique bool) *NotifierQuery
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 (*NotifierQuery) Where ¶
func (nq *NotifierQuery) Where(ps ...predicate.Notifier) *NotifierQuery
Where adds a new predicate for the NotifierQuery builder.
func (*NotifierQuery) WithGroup ¶
func (nq *NotifierQuery) WithGroup(opts ...func(*GroupQuery)) *NotifierQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*NotifierQuery) WithUser ¶
func (nq *NotifierQuery) WithUser(opts ...func(*UserQuery)) *NotifierQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type NotifierSelect ¶
type NotifierSelect struct { *NotifierQuery // contains filtered or unexported fields }
NotifierSelect is the builder for selecting fields of Notifier entities.
func (*NotifierSelect) Aggregate ¶
func (ns *NotifierSelect) Aggregate(fns ...AggregateFunc) *NotifierSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NotifierSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NotifierSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NotifierSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NotifierSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NotifierSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NotifierSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NotifierSelect) Scan ¶
func (ns *NotifierSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NotifierSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NotifierUpdate ¶
type NotifierUpdate struct {
// contains filtered or unexported fields
}
NotifierUpdate is the builder for updating Notifier entities.
func (*NotifierUpdate) ClearGroup ¶
func (nu *NotifierUpdate) ClearGroup() *NotifierUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*NotifierUpdate) ClearUser ¶
func (nu *NotifierUpdate) ClearUser() *NotifierUpdate
ClearUser clears the "user" edge to the User entity.
func (*NotifierUpdate) Exec ¶
func (nu *NotifierUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NotifierUpdate) ExecX ¶
func (nu *NotifierUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotifierUpdate) Mutation ¶
func (nu *NotifierUpdate) Mutation() *NotifierMutation
Mutation returns the NotifierMutation object of the builder.
func (*NotifierUpdate) Save ¶
func (nu *NotifierUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NotifierUpdate) SaveX ¶
func (nu *NotifierUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NotifierUpdate) SetGroup ¶
func (nu *NotifierUpdate) SetGroup(g *Group) *NotifierUpdate
SetGroup sets the "group" edge to the Group entity.
func (*NotifierUpdate) SetGroupID ¶
func (nu *NotifierUpdate) SetGroupID(u uuid.UUID) *NotifierUpdate
SetGroupID sets the "group_id" field.
func (*NotifierUpdate) SetIsActive ¶
func (nu *NotifierUpdate) SetIsActive(b bool) *NotifierUpdate
SetIsActive sets the "is_active" field.
func (*NotifierUpdate) SetName ¶
func (nu *NotifierUpdate) SetName(s string) *NotifierUpdate
SetName sets the "name" field.
func (*NotifierUpdate) SetNillableGroupID ¶
func (nu *NotifierUpdate) SetNillableGroupID(u *uuid.UUID) *NotifierUpdate
SetNillableGroupID sets the "group_id" field if the given value is not nil.
func (*NotifierUpdate) SetNillableIsActive ¶
func (nu *NotifierUpdate) SetNillableIsActive(b *bool) *NotifierUpdate
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*NotifierUpdate) SetNillableName ¶
func (nu *NotifierUpdate) SetNillableName(s *string) *NotifierUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*NotifierUpdate) SetNillableURL ¶
func (nu *NotifierUpdate) SetNillableURL(s *string) *NotifierUpdate
SetNillableURL sets the "url" field if the given value is not nil.
func (*NotifierUpdate) SetNillableUserID ¶
func (nu *NotifierUpdate) SetNillableUserID(u *uuid.UUID) *NotifierUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*NotifierUpdate) SetURL ¶
func (nu *NotifierUpdate) SetURL(s string) *NotifierUpdate
SetURL sets the "url" field.
func (*NotifierUpdate) SetUpdatedAt ¶
func (nu *NotifierUpdate) SetUpdatedAt(t time.Time) *NotifierUpdate
SetUpdatedAt sets the "updated_at" field.
func (*NotifierUpdate) SetUser ¶
func (nu *NotifierUpdate) SetUser(u *User) *NotifierUpdate
SetUser sets the "user" edge to the User entity.
func (*NotifierUpdate) SetUserID ¶
func (nu *NotifierUpdate) SetUserID(u uuid.UUID) *NotifierUpdate
SetUserID sets the "user_id" field.
func (*NotifierUpdate) Where ¶
func (nu *NotifierUpdate) Where(ps ...predicate.Notifier) *NotifierUpdate
Where appends a list predicates to the NotifierUpdate builder.
type NotifierUpdateOne ¶
type NotifierUpdateOne struct {
// contains filtered or unexported fields
}
NotifierUpdateOne is the builder for updating a single Notifier entity.
func (*NotifierUpdateOne) ClearGroup ¶
func (nuo *NotifierUpdateOne) ClearGroup() *NotifierUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*NotifierUpdateOne) ClearUser ¶
func (nuo *NotifierUpdateOne) ClearUser() *NotifierUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*NotifierUpdateOne) Exec ¶
func (nuo *NotifierUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NotifierUpdateOne) ExecX ¶
func (nuo *NotifierUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotifierUpdateOne) Mutation ¶
func (nuo *NotifierUpdateOne) Mutation() *NotifierMutation
Mutation returns the NotifierMutation object of the builder.
func (*NotifierUpdateOne) Save ¶
func (nuo *NotifierUpdateOne) Save(ctx context.Context) (*Notifier, error)
Save executes the query and returns the updated Notifier entity.
func (*NotifierUpdateOne) SaveX ¶
func (nuo *NotifierUpdateOne) SaveX(ctx context.Context) *Notifier
SaveX is like Save, but panics if an error occurs.
func (*NotifierUpdateOne) Select ¶
func (nuo *NotifierUpdateOne) Select(field string, fields ...string) *NotifierUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NotifierUpdateOne) SetGroup ¶
func (nuo *NotifierUpdateOne) SetGroup(g *Group) *NotifierUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*NotifierUpdateOne) SetGroupID ¶
func (nuo *NotifierUpdateOne) SetGroupID(u uuid.UUID) *NotifierUpdateOne
SetGroupID sets the "group_id" field.
func (*NotifierUpdateOne) SetIsActive ¶
func (nuo *NotifierUpdateOne) SetIsActive(b bool) *NotifierUpdateOne
SetIsActive sets the "is_active" field.
func (*NotifierUpdateOne) SetName ¶
func (nuo *NotifierUpdateOne) SetName(s string) *NotifierUpdateOne
SetName sets the "name" field.
func (*NotifierUpdateOne) SetNillableGroupID ¶
func (nuo *NotifierUpdateOne) SetNillableGroupID(u *uuid.UUID) *NotifierUpdateOne
SetNillableGroupID sets the "group_id" field if the given value is not nil.
func (*NotifierUpdateOne) SetNillableIsActive ¶
func (nuo *NotifierUpdateOne) SetNillableIsActive(b *bool) *NotifierUpdateOne
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*NotifierUpdateOne) SetNillableName ¶
func (nuo *NotifierUpdateOne) SetNillableName(s *string) *NotifierUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*NotifierUpdateOne) SetNillableURL ¶
func (nuo *NotifierUpdateOne) SetNillableURL(s *string) *NotifierUpdateOne
SetNillableURL sets the "url" field if the given value is not nil.
func (*NotifierUpdateOne) SetNillableUserID ¶
func (nuo *NotifierUpdateOne) SetNillableUserID(u *uuid.UUID) *NotifierUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*NotifierUpdateOne) SetURL ¶
func (nuo *NotifierUpdateOne) SetURL(s string) *NotifierUpdateOne
SetURL sets the "url" field.
func (*NotifierUpdateOne) SetUpdatedAt ¶
func (nuo *NotifierUpdateOne) SetUpdatedAt(t time.Time) *NotifierUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*NotifierUpdateOne) SetUser ¶
func (nuo *NotifierUpdateOne) SetUser(u *User) *NotifierUpdateOne
SetUser sets the "user" edge to the User entity.
func (*NotifierUpdateOne) SetUserID ¶
func (nuo *NotifierUpdateOne) SetUserID(u uuid.UUID) *NotifierUpdateOne
SetUserID sets the "user_id" field.
func (*NotifierUpdateOne) Where ¶
func (nuo *NotifierUpdateOne) Where(ps ...predicate.Notifier) *NotifierUpdateOne
Where appends a list predicates to the NotifierUpdate builder.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Attachment is the client for interacting with the Attachment builders. Attachment *AttachmentClient // AuthRoles is the client for interacting with the AuthRoles builders. AuthRoles *AuthRolesClient // AuthTokens is the client for interacting with the AuthTokens builders. AuthTokens *AuthTokensClient // Document is the client for interacting with the Document builders. Document *DocumentClient // Group is the client for interacting with the Group builders. Group *GroupClient // GroupInvitationToken is the client for interacting with the GroupInvitationToken builders. GroupInvitationToken *GroupInvitationTokenClient // Item is the client for interacting with the Item builders. Item *ItemClient // ItemField is the client for interacting with the ItemField builders. ItemField *ItemFieldClient // Label is the client for interacting with the Label builders. Label *LabelClient // Location is the client for interacting with the Location builders. Location *LocationClient // MaintenanceEntry is the client for interacting with the MaintenanceEntry builders. MaintenanceEntry *MaintenanceEntryClient // Notifier is the client for interacting with the Notifier builders. Notifier *NotifierClient // 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 uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // 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:"-"` // IsSuperuser holds the value of the "is_superuser" field. IsSuperuser bool `json:"is_superuser,omitempty"` // Superuser holds the value of the "superuser" field. Superuser bool `json:"superuser,omitempty"` // Role holds the value of the "role" field. Role user.Role `json:"role,omitempty"` // ActivatedOn holds the value of the "activated_on" field. ActivatedOn time.Time `json:"activated_on,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryAuthTokens ¶
func (u *User) QueryAuthTokens() *AuthTokensQuery
QueryAuthTokens queries the "auth_tokens" edge of the User entity.
func (*User) QueryGroup ¶
func (u *User) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the User entity.
func (*User) QueryNotifiers ¶
func (u *User) QueryNotifiers() *NotifierQuery
QueryNotifiers queries the "notifiers" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
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) QueryAuthTokens ¶
func (c *UserClient) QueryAuthTokens(u *User) *AuthTokensQuery
QueryAuthTokens queries the auth_tokens edge of a User.
func (*UserClient) QueryGroup ¶
func (c *UserClient) QueryGroup(u *User) *GroupQuery
QueryGroup queries the group edge of a User.
func (*UserClient) QueryNotifiers ¶
func (c *UserClient) QueryNotifiers(u *User) *NotifierQuery
QueryNotifiers queries the notifiers edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uuid.UUID) *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) AddAuthTokenIDs ¶
func (uc *UserCreate) AddAuthTokenIDs(ids ...uuid.UUID) *UserCreate
AddAuthTokenIDs adds the "auth_tokens" edge to the AuthTokens entity by IDs.
func (*UserCreate) AddAuthTokens ¶
func (uc *UserCreate) AddAuthTokens(a ...*AuthTokens) *UserCreate
AddAuthTokens adds the "auth_tokens" edges to the AuthTokens entity.
func (*UserCreate) AddNotifierIDs ¶
func (uc *UserCreate) AddNotifierIDs(ids ...uuid.UUID) *UserCreate
AddNotifierIDs adds the "notifiers" edge to the Notifier entity by IDs.
func (*UserCreate) AddNotifiers ¶
func (uc *UserCreate) AddNotifiers(n ...*Notifier) *UserCreate
AddNotifiers adds the "notifiers" edges to the Notifier 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) SetActivatedOn ¶
func (uc *UserCreate) SetActivatedOn(t time.Time) *UserCreate
SetActivatedOn sets the "activated_on" field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetGroup ¶
func (uc *UserCreate) SetGroup(g *Group) *UserCreate
SetGroup sets the "group" edge to the Group entity.
func (*UserCreate) SetGroupID ¶
func (uc *UserCreate) SetGroupID(id uuid.UUID) *UserCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIsSuperuser ¶
func (uc *UserCreate) SetIsSuperuser(b bool) *UserCreate
SetIsSuperuser sets the "is_superuser" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableActivatedOn ¶
func (uc *UserCreate) SetNillableActivatedOn(t *time.Time) *UserCreate
SetNillableActivatedOn sets the "activated_on" field if the given value is not nil.
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) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableIsSuperuser ¶
func (uc *UserCreate) SetNillableIsSuperuser(b *bool) *UserCreate
SetNillableIsSuperuser sets the "is_superuser" field if the given value is not nil.
func (*UserCreate) SetNillableRole ¶
func (uc *UserCreate) SetNillableRole(u *user.Role) *UserCreate
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserCreate) SetNillableSuperuser ¶
func (uc *UserCreate) SetNillableSuperuser(b *bool) *UserCreate
SetNillableSuperuser sets the "superuser" 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) SetRole ¶
func (uc *UserCreate) SetRole(u user.Role) *UserCreate
SetRole sets the "role" field.
func (*UserCreate) SetSuperuser ¶
func (uc *UserCreate) SetSuperuser(b bool) *UserCreate
SetSuperuser sets the "superuser" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" 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 UserEdges ¶
type UserEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // AuthTokens holds the value of the auth_tokens edge. AuthTokens []*AuthTokens `json:"auth_tokens,omitempty"` // Notifiers holds the value of the notifiers edge. Notifiers []*Notifier `json:"notifiers,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) AuthTokensOrErr ¶
func (e UserEdges) AuthTokensOrErr() ([]*AuthTokens, error)
AuthTokensOrErr returns the AuthTokens value or an error if the edge was not loaded in eager-loading.
func (UserEdges) GroupOrErr ¶
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) NotifiersOrErr ¶
NotifiersOrErr returns the Notifiers value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) ActivatedOn ¶
func (m *UserMutation) ActivatedOn() (r time.Time, exists bool)
ActivatedOn returns the value of the "activated_on" field in the mutation.
func (*UserMutation) ActivatedOnCleared ¶
func (m *UserMutation) ActivatedOnCleared() bool
ActivatedOnCleared returns if the "activated_on" field was cleared in this mutation.
func (*UserMutation) AddAuthTokenIDs ¶
func (m *UserMutation) AddAuthTokenIDs(ids ...uuid.UUID)
AddAuthTokenIDs adds the "auth_tokens" edge to the AuthTokens entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddNotifierIDs ¶
func (m *UserMutation) AddNotifierIDs(ids ...uuid.UUID)
AddNotifierIDs adds the "notifiers" edge to the Notifier entity by ids.
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) AuthTokensCleared ¶
func (m *UserMutation) AuthTokensCleared() bool
AuthTokensCleared reports if the "auth_tokens" edge to the AuthTokens entity was cleared.
func (*UserMutation) AuthTokensIDs ¶
func (m *UserMutation) AuthTokensIDs() (ids []uuid.UUID)
AuthTokensIDs returns the "auth_tokens" edge IDs in the mutation.
func (*UserMutation) ClearActivatedOn ¶
func (m *UserMutation) ClearActivatedOn()
ClearActivatedOn clears the value of the "activated_on" field.
func (*UserMutation) ClearAuthTokens ¶
func (m *UserMutation) ClearAuthTokens()
ClearAuthTokens clears the "auth_tokens" edge to the AuthTokens entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearGroup ¶
func (m *UserMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*UserMutation) ClearNotifiers ¶
func (m *UserMutation) ClearNotifiers()
ClearNotifiers clears the "notifiers" edge to the Notifier entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) 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) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the 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) GroupCleared ¶
func (m *UserMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*UserMutation) GroupID ¶
func (m *UserMutation) GroupID() (id uuid.UUID, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*UserMutation) GroupIDs ¶
func (m *UserMutation) GroupIDs() (ids []uuid.UUID)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) IsSuperuser ¶
func (m *UserMutation) IsSuperuser() (r bool, exists bool)
IsSuperuser returns the value of the "is_superuser" 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) NotifiersCleared ¶
func (m *UserMutation) NotifiersCleared() bool
NotifiersCleared reports if the "notifiers" edge to the Notifier entity was cleared.
func (*UserMutation) NotifiersIDs ¶
func (m *UserMutation) NotifiersIDs() (ids []uuid.UUID)
NotifiersIDs returns the "notifiers" edge IDs in the mutation.
func (*UserMutation) OldActivatedOn ¶
OldActivatedOn returns the old "activated_on" 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) 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) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" 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) OldIsSuperuser ¶
func (m *UserMutation) OldIsSuperuser(ctx context.Context) (v bool, err error)
OldIsSuperuser returns the old "is_superuser" 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) OldRole ¶
OldRole returns the old "role" 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) OldSuperuser ¶
func (m *UserMutation) OldSuperuser(ctx context.Context) (v bool, err error)
OldSuperuser returns the old "superuser" 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) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) RemoveAuthTokenIDs ¶
func (m *UserMutation) RemoveAuthTokenIDs(ids ...uuid.UUID)
RemoveAuthTokenIDs removes the "auth_tokens" edge to the AuthTokens entity by IDs.
func (*UserMutation) RemoveNotifierIDs ¶
func (m *UserMutation) RemoveNotifierIDs(ids ...uuid.UUID)
RemoveNotifierIDs removes the "notifiers" edge to the Notifier entity by IDs.
func (*UserMutation) RemovedAuthTokensIDs ¶
func (m *UserMutation) RemovedAuthTokensIDs() (ids []uuid.UUID)
RemovedAuthTokens returns the removed IDs of the "auth_tokens" edge to the AuthTokens entity.
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) RemovedNotifiersIDs ¶
func (m *UserMutation) RemovedNotifiersIDs() (ids []uuid.UUID)
RemovedNotifiers returns the removed IDs of the "notifiers" edge to the Notifier entity.
func (*UserMutation) ResetActivatedOn ¶
func (m *UserMutation) ResetActivatedOn()
ResetActivatedOn resets all changes to the "activated_on" field.
func (*UserMutation) ResetAuthTokens ¶
func (m *UserMutation) ResetAuthTokens()
ResetAuthTokens resets all changes to the "auth_tokens" edge.
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) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
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) ResetGroup ¶
func (m *UserMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*UserMutation) ResetIsSuperuser ¶
func (m *UserMutation) ResetIsSuperuser()
ResetIsSuperuser resets all changes to the "is_superuser" field.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetNotifiers ¶
func (m *UserMutation) ResetNotifiers()
ResetNotifiers resets all changes to the "notifiers" edge.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetRole ¶
func (m *UserMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*UserMutation) ResetSuperuser ¶
func (m *UserMutation) ResetSuperuser()
ResetSuperuser resets all changes to the "superuser" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) Role ¶
func (m *UserMutation) Role() (r user.Role, exists bool)
Role returns the value of the "role" field in the mutation.
func (*UserMutation) SetActivatedOn ¶
func (m *UserMutation) SetActivatedOn(t time.Time)
SetActivatedOn sets the "activated_on" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" 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) SetGroupID ¶
func (m *UserMutation) SetGroupID(id uuid.UUID)
SetGroupID sets the "group" edge to the Group entity by id.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetIsSuperuser ¶
func (m *UserMutation) SetIsSuperuser(b bool)
SetIsSuperuser sets the "is_superuser" 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) SetRole ¶
func (m *UserMutation) SetRole(u user.Role)
SetRole sets the "role" field.
func (*UserMutation) SetSuperuser ¶
func (m *UserMutation) SetSuperuser(b bool)
SetSuperuser sets the "superuser" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) Superuser ¶
func (m *UserMutation) Superuser() (r bool, exists bool)
Superuser returns the value of the "superuser" field in the mutation.
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) 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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCreatedAt). 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) QueryAuthTokens ¶
func (uq *UserQuery) QueryAuthTokens() *AuthTokensQuery
QueryAuthTokens chains the current query on the "auth_tokens" edge.
func (*UserQuery) QueryGroup ¶
func (uq *UserQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*UserQuery) QueryNotifiers ¶
func (uq *UserQuery) QueryNotifiers() *NotifierQuery
QueryNotifiers chains the current query on the "notifiers" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.User.Query(). Select(user.FieldCreatedAt). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithAuthTokens ¶
func (uq *UserQuery) WithAuthTokens(opts ...func(*AuthTokensQuery)) *UserQuery
WithAuthTokens tells the query-builder to eager-load the nodes that are connected to the "auth_tokens" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithGroup ¶
func (uq *UserQuery) WithGroup(opts ...func(*GroupQuery)) *UserQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNotifiers ¶
func (uq *UserQuery) WithNotifiers(opts ...func(*NotifierQuery)) *UserQuery
WithNotifiers tells the query-builder to eager-load the nodes that are connected to the "notifiers" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddAuthTokenIDs ¶
func (uu *UserUpdate) AddAuthTokenIDs(ids ...uuid.UUID) *UserUpdate
AddAuthTokenIDs adds the "auth_tokens" edge to the AuthTokens entity by IDs.
func (*UserUpdate) AddAuthTokens ¶
func (uu *UserUpdate) AddAuthTokens(a ...*AuthTokens) *UserUpdate
AddAuthTokens adds the "auth_tokens" edges to the AuthTokens entity.
func (*UserUpdate) AddNotifierIDs ¶
func (uu *UserUpdate) AddNotifierIDs(ids ...uuid.UUID) *UserUpdate
AddNotifierIDs adds the "notifiers" edge to the Notifier entity by IDs.
func (*UserUpdate) AddNotifiers ¶
func (uu *UserUpdate) AddNotifiers(n ...*Notifier) *UserUpdate
AddNotifiers adds the "notifiers" edges to the Notifier entity.
func (*UserUpdate) ClearActivatedOn ¶
func (uu *UserUpdate) ClearActivatedOn() *UserUpdate
ClearActivatedOn clears the value of the "activated_on" field.
func (*UserUpdate) ClearAuthTokens ¶
func (uu *UserUpdate) ClearAuthTokens() *UserUpdate
ClearAuthTokens clears all "auth_tokens" edges to the AuthTokens entity.
func (*UserUpdate) ClearGroup ¶
func (uu *UserUpdate) ClearGroup() *UserUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*UserUpdate) ClearNotifiers ¶
func (uu *UserUpdate) ClearNotifiers() *UserUpdate
ClearNotifiers clears all "notifiers" edges to the Notifier entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveAuthTokenIDs ¶
func (uu *UserUpdate) RemoveAuthTokenIDs(ids ...uuid.UUID) *UserUpdate
RemoveAuthTokenIDs removes the "auth_tokens" edge to AuthTokens entities by IDs.
func (*UserUpdate) RemoveAuthTokens ¶
func (uu *UserUpdate) RemoveAuthTokens(a ...*AuthTokens) *UserUpdate
RemoveAuthTokens removes "auth_tokens" edges to AuthTokens entities.
func (*UserUpdate) RemoveNotifierIDs ¶
func (uu *UserUpdate) RemoveNotifierIDs(ids ...uuid.UUID) *UserUpdate
RemoveNotifierIDs removes the "notifiers" edge to Notifier entities by IDs.
func (*UserUpdate) RemoveNotifiers ¶
func (uu *UserUpdate) RemoveNotifiers(n ...*Notifier) *UserUpdate
RemoveNotifiers removes "notifiers" edges to Notifier entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetActivatedOn ¶
func (uu *UserUpdate) SetActivatedOn(t time.Time) *UserUpdate
SetActivatedOn sets the "activated_on" field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetGroup ¶
func (uu *UserUpdate) SetGroup(g *Group) *UserUpdate
SetGroup sets the "group" edge to the Group entity.
func (*UserUpdate) SetGroupID ¶
func (uu *UserUpdate) SetGroupID(id uuid.UUID) *UserUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*UserUpdate) SetIsSuperuser ¶
func (uu *UserUpdate) SetIsSuperuser(b bool) *UserUpdate
SetIsSuperuser sets the "is_superuser" field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableActivatedOn ¶
func (uu *UserUpdate) SetNillableActivatedOn(t *time.Time) *UserUpdate
SetNillableActivatedOn sets the "activated_on" field if the given value is not nil.
func (*UserUpdate) SetNillableEmail ¶
func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdate) SetNillableIsSuperuser ¶
func (uu *UserUpdate) SetNillableIsSuperuser(b *bool) *UserUpdate
SetNillableIsSuperuser sets the "is_superuser" 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) SetNillableRole ¶
func (uu *UserUpdate) SetNillableRole(u *user.Role) *UserUpdate
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserUpdate) SetNillableSuperuser ¶
func (uu *UserUpdate) SetNillableSuperuser(b *bool) *UserUpdate
SetNillableSuperuser sets the "superuser" 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) SetRole ¶
func (uu *UserUpdate) SetRole(u user.Role) *UserUpdate
SetRole sets the "role" field.
func (*UserUpdate) SetSuperuser ¶
func (uu *UserUpdate) SetSuperuser(b bool) *UserUpdate
SetSuperuser sets the "superuser" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" 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) AddAuthTokenIDs ¶
func (uuo *UserUpdateOne) AddAuthTokenIDs(ids ...uuid.UUID) *UserUpdateOne
AddAuthTokenIDs adds the "auth_tokens" edge to the AuthTokens entity by IDs.
func (*UserUpdateOne) AddAuthTokens ¶
func (uuo *UserUpdateOne) AddAuthTokens(a ...*AuthTokens) *UserUpdateOne
AddAuthTokens adds the "auth_tokens" edges to the AuthTokens entity.
func (*UserUpdateOne) AddNotifierIDs ¶
func (uuo *UserUpdateOne) AddNotifierIDs(ids ...uuid.UUID) *UserUpdateOne
AddNotifierIDs adds the "notifiers" edge to the Notifier entity by IDs.
func (*UserUpdateOne) AddNotifiers ¶
func (uuo *UserUpdateOne) AddNotifiers(n ...*Notifier) *UserUpdateOne
AddNotifiers adds the "notifiers" edges to the Notifier entity.
func (*UserUpdateOne) ClearActivatedOn ¶
func (uuo *UserUpdateOne) ClearActivatedOn() *UserUpdateOne
ClearActivatedOn clears the value of the "activated_on" field.
func (*UserUpdateOne) ClearAuthTokens ¶
func (uuo *UserUpdateOne) ClearAuthTokens() *UserUpdateOne
ClearAuthTokens clears all "auth_tokens" edges to the AuthTokens entity.
func (*UserUpdateOne) ClearGroup ¶
func (uuo *UserUpdateOne) ClearGroup() *UserUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*UserUpdateOne) ClearNotifiers ¶
func (uuo *UserUpdateOne) ClearNotifiers() *UserUpdateOne
ClearNotifiers clears all "notifiers" edges to the Notifier 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) RemoveAuthTokenIDs ¶
func (uuo *UserUpdateOne) RemoveAuthTokenIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveAuthTokenIDs removes the "auth_tokens" edge to AuthTokens entities by IDs.
func (*UserUpdateOne) RemoveAuthTokens ¶
func (uuo *UserUpdateOne) RemoveAuthTokens(a ...*AuthTokens) *UserUpdateOne
RemoveAuthTokens removes "auth_tokens" edges to AuthTokens entities.
func (*UserUpdateOne) RemoveNotifierIDs ¶
func (uuo *UserUpdateOne) RemoveNotifierIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveNotifierIDs removes the "notifiers" edge to Notifier entities by IDs.
func (*UserUpdateOne) RemoveNotifiers ¶
func (uuo *UserUpdateOne) RemoveNotifiers(n ...*Notifier) *UserUpdateOne
RemoveNotifiers removes "notifiers" edges to Notifier entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetActivatedOn ¶
func (uuo *UserUpdateOne) SetActivatedOn(t time.Time) *UserUpdateOne
SetActivatedOn sets the "activated_on" field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetGroup ¶
func (uuo *UserUpdateOne) SetGroup(g *Group) *UserUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*UserUpdateOne) SetGroupID ¶
func (uuo *UserUpdateOne) SetGroupID(id uuid.UUID) *UserUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*UserUpdateOne) SetIsSuperuser ¶
func (uuo *UserUpdateOne) SetIsSuperuser(b bool) *UserUpdateOne
SetIsSuperuser sets the "is_superuser" field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableActivatedOn ¶
func (uuo *UserUpdateOne) SetNillableActivatedOn(t *time.Time) *UserUpdateOne
SetNillableActivatedOn sets the "activated_on" field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmail ¶
func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIsSuperuser ¶
func (uuo *UserUpdateOne) SetNillableIsSuperuser(b *bool) *UserUpdateOne
SetNillableIsSuperuser sets the "is_superuser" 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) SetNillableRole ¶
func (uuo *UserUpdateOne) SetNillableRole(u *user.Role) *UserUpdateOne
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserUpdateOne) SetNillableSuperuser ¶
func (uuo *UserUpdateOne) SetNillableSuperuser(b *bool) *UserUpdateOne
SetNillableSuperuser sets the "superuser" 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) SetRole ¶
func (uuo *UserUpdateOne) SetRole(u user.Role) *UserUpdateOne
SetRole sets the "role" field.
func (*UserUpdateOne) SetSuperuser ¶
func (uuo *UserUpdateOne) SetSuperuser(b bool) *UserUpdateOne
SetSuperuser sets the "superuser" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" 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 ¶
- attachment.go
- attachment_create.go
- attachment_delete.go
- attachment_query.go
- attachment_update.go
- authroles.go
- authroles_create.go
- authroles_delete.go
- authroles_query.go
- authroles_update.go
- authtokens.go
- authtokens_create.go
- authtokens_delete.go
- authtokens_query.go
- authtokens_update.go
- client.go
- document.go
- document_create.go
- document_delete.go
- document_query.go
- document_update.go
- ent.go
- external.go
- generate.go
- group.go
- group_create.go
- group_delete.go
- group_query.go
- group_update.go
- groupinvitationtoken.go
- groupinvitationtoken_create.go
- groupinvitationtoken_delete.go
- groupinvitationtoken_query.go
- groupinvitationtoken_update.go
- has_id.go
- item.go
- item_create.go
- item_delete.go
- item_query.go
- item_update.go
- itemfield.go
- itemfield_create.go
- itemfield_delete.go
- itemfield_query.go
- itemfield_update.go
- label.go
- label_create.go
- label_delete.go
- label_query.go
- label_update.go
- location.go
- location_create.go
- location_delete.go
- location_query.go
- location_update.go
- maintenanceentry.go
- maintenanceentry_create.go
- maintenanceentry_delete.go
- maintenanceentry_query.go
- maintenanceentry_update.go
- mutation.go
- notifier.go
- notifier_create.go
- notifier_delete.go
- notifier_query.go
- notifier_update.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go