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
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- type AggregateFunc
- type Annotation
- func (a Annotation) IsEntity()
- func (n *Annotation) IsNode()
- func (a *Annotation) Metadata(ctx context.Context) (*Metadata, error)
- func (a *Annotation) Namespace(ctx context.Context) (*AnnotationNamespace, error)
- func (a *Annotation) QueryMetadata() *MetadataQuery
- func (a *Annotation) QueryNamespace() *AnnotationNamespaceQuery
- func (a *Annotation) String() string
- func (a *Annotation) ToEdge(order *AnnotationOrder) *AnnotationEdge
- func (a *Annotation) Unwrap() *Annotation
- func (a *Annotation) Update() *AnnotationUpdateOne
- func (a *Annotation) Value(name string) (ent.Value, error)
- type AnnotationClient
- func (c *AnnotationClient) Create() *AnnotationCreate
- func (c *AnnotationClient) CreateBulk(builders ...*AnnotationCreate) *AnnotationCreateBulk
- func (c *AnnotationClient) Delete() *AnnotationDelete
- func (c *AnnotationClient) DeleteOne(a *Annotation) *AnnotationDeleteOne
- func (c *AnnotationClient) DeleteOneID(id gidx.PrefixedID) *AnnotationDeleteOne
- func (c *AnnotationClient) Get(ctx context.Context, id gidx.PrefixedID) (*Annotation, error)
- func (c *AnnotationClient) GetX(ctx context.Context, id gidx.PrefixedID) *Annotation
- func (c *AnnotationClient) Hooks() []Hook
- func (c *AnnotationClient) Intercept(interceptors ...Interceptor)
- func (c *AnnotationClient) Interceptors() []Interceptor
- func (c *AnnotationClient) MapCreateBulk(slice any, setFunc func(*AnnotationCreate, int)) *AnnotationCreateBulk
- func (c *AnnotationClient) Query() *AnnotationQuery
- func (c *AnnotationClient) QueryMetadata(a *Annotation) *MetadataQuery
- func (c *AnnotationClient) QueryNamespace(a *Annotation) *AnnotationNamespaceQuery
- func (c *AnnotationClient) Update() *AnnotationUpdate
- func (c *AnnotationClient) UpdateOne(a *Annotation) *AnnotationUpdateOne
- func (c *AnnotationClient) UpdateOneID(id gidx.PrefixedID) *AnnotationUpdateOne
- func (c *AnnotationClient) Use(hooks ...Hook)
- type AnnotationConnection
- type AnnotationCreate
- func (ac *AnnotationCreate) Exec(ctx context.Context) error
- func (ac *AnnotationCreate) ExecX(ctx context.Context)
- func (ac *AnnotationCreate) Mutation() *AnnotationMutation
- func (ac *AnnotationCreate) Save(ctx context.Context) (*Annotation, error)
- func (ac *AnnotationCreate) SaveX(ctx context.Context) *Annotation
- func (ac *AnnotationCreate) SetAnnotationNamespaceID(gi gidx.PrefixedID) *AnnotationCreate
- func (ac *AnnotationCreate) SetCreatedAt(t time.Time) *AnnotationCreate
- func (ac *AnnotationCreate) SetData(jm json.RawMessage) *AnnotationCreate
- func (ac *AnnotationCreate) SetID(gi gidx.PrefixedID) *AnnotationCreate
- func (ac *AnnotationCreate) SetMetadata(m *Metadata) *AnnotationCreate
- func (ac *AnnotationCreate) SetMetadataID(gi gidx.PrefixedID) *AnnotationCreate
- func (ac *AnnotationCreate) SetNamespace(a *AnnotationNamespace) *AnnotationCreate
- func (ac *AnnotationCreate) SetNamespaceID(id gidx.PrefixedID) *AnnotationCreate
- func (ac *AnnotationCreate) SetNillableCreatedAt(t *time.Time) *AnnotationCreate
- func (ac *AnnotationCreate) SetNillableID(gi *gidx.PrefixedID) *AnnotationCreate
- func (ac *AnnotationCreate) SetNillableUpdatedAt(t *time.Time) *AnnotationCreate
- func (ac *AnnotationCreate) SetUpdatedAt(t time.Time) *AnnotationCreate
- type AnnotationCreateBulk
- type AnnotationDelete
- type AnnotationDeleteOne
- type AnnotationEdge
- type AnnotationEdges
- type AnnotationGroupBy
- func (agb *AnnotationGroupBy) Aggregate(fns ...AggregateFunc) *AnnotationGroupBy
- func (s *AnnotationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AnnotationGroupBy) BoolX(ctx context.Context) bool
- func (s *AnnotationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AnnotationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AnnotationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AnnotationGroupBy) Float64X(ctx context.Context) float64
- func (s *AnnotationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AnnotationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AnnotationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AnnotationGroupBy) IntX(ctx context.Context) int
- func (s *AnnotationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AnnotationGroupBy) IntsX(ctx context.Context) []int
- func (agb *AnnotationGroupBy) Scan(ctx context.Context, v any) error
- func (s *AnnotationGroupBy) ScanX(ctx context.Context, v any)
- func (s *AnnotationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AnnotationGroupBy) StringX(ctx context.Context) string
- func (s *AnnotationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AnnotationGroupBy) StringsX(ctx context.Context) []string
- type AnnotationMutation
- func (m *AnnotationMutation) AddField(name string, value ent.Value) error
- func (m *AnnotationMutation) AddedEdges() []string
- func (m *AnnotationMutation) AddedField(name string) (ent.Value, bool)
- func (m *AnnotationMutation) AddedFields() []string
- func (m *AnnotationMutation) AddedIDs(name string) []ent.Value
- func (m *AnnotationMutation) AnnotationNamespaceID() (r gidx.PrefixedID, exists bool)
- func (m *AnnotationMutation) AppendData(jm json.RawMessage)
- func (m *AnnotationMutation) AppendedData() (json.RawMessage, bool)
- func (m *AnnotationMutation) ClearEdge(name string) error
- func (m *AnnotationMutation) ClearField(name string) error
- func (m *AnnotationMutation) ClearMetadata()
- func (m *AnnotationMutation) ClearNamespace()
- func (m *AnnotationMutation) ClearedEdges() []string
- func (m *AnnotationMutation) ClearedFields() []string
- func (m AnnotationMutation) Client() *Client
- func (m *AnnotationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AnnotationMutation) Data() (r json.RawMessage, exists bool)
- func (m *AnnotationMutation) EdgeCleared(name string) bool
- func (m *AnnotationMutation) Field(name string) (ent.Value, bool)
- func (m *AnnotationMutation) FieldCleared(name string) bool
- func (m *AnnotationMutation) Fields() []string
- func (m *AnnotationMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *AnnotationMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *AnnotationMutation) MetadataCleared() bool
- func (m *AnnotationMutation) MetadataID() (r gidx.PrefixedID, exists bool)
- func (m *AnnotationMutation) MetadataIDs() (ids []gidx.PrefixedID)
- func (m *AnnotationMutation) NamespaceCleared() bool
- func (m *AnnotationMutation) NamespaceID() (id gidx.PrefixedID, exists bool)
- func (m *AnnotationMutation) NamespaceIDs() (ids []gidx.PrefixedID)
- func (m *AnnotationMutation) OldAnnotationNamespaceID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *AnnotationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AnnotationMutation) OldData(ctx context.Context) (v json.RawMessage, err error)
- func (m *AnnotationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AnnotationMutation) OldMetadataID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *AnnotationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AnnotationMutation) Op() Op
- func (m *AnnotationMutation) RemovedEdges() []string
- func (m *AnnotationMutation) RemovedIDs(name string) []ent.Value
- func (m *AnnotationMutation) ResetAnnotationNamespaceID()
- func (m *AnnotationMutation) ResetCreatedAt()
- func (m *AnnotationMutation) ResetData()
- func (m *AnnotationMutation) ResetEdge(name string) error
- func (m *AnnotationMutation) ResetField(name string) error
- func (m *AnnotationMutation) ResetMetadata()
- func (m *AnnotationMutation) ResetMetadataID()
- func (m *AnnotationMutation) ResetNamespace()
- func (m *AnnotationMutation) ResetUpdatedAt()
- func (m *AnnotationMutation) SetAnnotationNamespaceID(gi gidx.PrefixedID)
- func (m *AnnotationMutation) SetCreatedAt(t time.Time)
- func (m *AnnotationMutation) SetData(jm json.RawMessage)
- func (m *AnnotationMutation) SetField(name string, value ent.Value) error
- func (m *AnnotationMutation) SetID(id gidx.PrefixedID)
- func (m *AnnotationMutation) SetMetadataID(gi gidx.PrefixedID)
- func (m *AnnotationMutation) SetNamespaceID(id gidx.PrefixedID)
- func (m *AnnotationMutation) SetOp(op Op)
- func (m *AnnotationMutation) SetUpdatedAt(t time.Time)
- func (m AnnotationMutation) Tx() (*Tx, error)
- func (m *AnnotationMutation) Type() string
- func (m *AnnotationMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AnnotationMutation) Where(ps ...predicate.Annotation)
- func (m *AnnotationMutation) WhereP(ps ...func(*sql.Selector))
- type AnnotationNamespace
- func (an *AnnotationNamespace) Annotations(ctx context.Context) (result []*Annotation, err error)
- func (an AnnotationNamespace) IsEntity()
- func (n *AnnotationNamespace) IsNode()
- func (an *AnnotationNamespace) NamedAnnotations(name string) ([]*Annotation, error)
- func (an *AnnotationNamespace) QueryAnnotations() *AnnotationQuery
- func (an *AnnotationNamespace) String() string
- func (an *AnnotationNamespace) ToEdge(order *AnnotationNamespaceOrder) *AnnotationNamespaceEdge
- func (an *AnnotationNamespace) Unwrap() *AnnotationNamespace
- func (an *AnnotationNamespace) Update() *AnnotationNamespaceUpdateOne
- func (an *AnnotationNamespace) Value(name string) (ent.Value, error)
- type AnnotationNamespaceClient
- func (c *AnnotationNamespaceClient) Create() *AnnotationNamespaceCreate
- func (c *AnnotationNamespaceClient) CreateBulk(builders ...*AnnotationNamespaceCreate) *AnnotationNamespaceCreateBulk
- func (c *AnnotationNamespaceClient) Delete() *AnnotationNamespaceDelete
- func (c *AnnotationNamespaceClient) DeleteOne(an *AnnotationNamespace) *AnnotationNamespaceDeleteOne
- func (c *AnnotationNamespaceClient) DeleteOneID(id gidx.PrefixedID) *AnnotationNamespaceDeleteOne
- func (c *AnnotationNamespaceClient) Get(ctx context.Context, id gidx.PrefixedID) (*AnnotationNamespace, error)
- func (c *AnnotationNamespaceClient) GetX(ctx context.Context, id gidx.PrefixedID) *AnnotationNamespace
- func (c *AnnotationNamespaceClient) Hooks() []Hook
- func (c *AnnotationNamespaceClient) Intercept(interceptors ...Interceptor)
- func (c *AnnotationNamespaceClient) Interceptors() []Interceptor
- func (c *AnnotationNamespaceClient) MapCreateBulk(slice any, setFunc func(*AnnotationNamespaceCreate, int)) *AnnotationNamespaceCreateBulk
- func (c *AnnotationNamespaceClient) Query() *AnnotationNamespaceQuery
- func (c *AnnotationNamespaceClient) QueryAnnotations(an *AnnotationNamespace) *AnnotationQuery
- func (c *AnnotationNamespaceClient) Update() *AnnotationNamespaceUpdate
- func (c *AnnotationNamespaceClient) UpdateOne(an *AnnotationNamespace) *AnnotationNamespaceUpdateOne
- func (c *AnnotationNamespaceClient) UpdateOneID(id gidx.PrefixedID) *AnnotationNamespaceUpdateOne
- func (c *AnnotationNamespaceClient) Use(hooks ...Hook)
- type AnnotationNamespaceConnection
- type AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) AddAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) AddAnnotations(a ...*Annotation) *AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) Exec(ctx context.Context) error
- func (anc *AnnotationNamespaceCreate) ExecX(ctx context.Context)
- func (anc *AnnotationNamespaceCreate) Mutation() *AnnotationNamespaceMutation
- func (anc *AnnotationNamespaceCreate) Save(ctx context.Context) (*AnnotationNamespace, error)
- func (anc *AnnotationNamespaceCreate) SaveX(ctx context.Context) *AnnotationNamespace
- func (anc *AnnotationNamespaceCreate) SetCreatedAt(t time.Time) *AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) SetID(gi gidx.PrefixedID) *AnnotationNamespaceCreate
- func (c *AnnotationNamespaceCreate) SetInput(i CreateAnnotationNamespaceInput) *AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) SetName(s string) *AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) SetNillableCreatedAt(t *time.Time) *AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) SetNillableID(gi *gidx.PrefixedID) *AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) SetNillablePrivate(b *bool) *AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) SetNillableUpdatedAt(t *time.Time) *AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) SetOwnerID(gi gidx.PrefixedID) *AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) SetPrivate(b bool) *AnnotationNamespaceCreate
- func (anc *AnnotationNamespaceCreate) SetUpdatedAt(t time.Time) *AnnotationNamespaceCreate
- type AnnotationNamespaceCreateBulk
- func (ancb *AnnotationNamespaceCreateBulk) Exec(ctx context.Context) error
- func (ancb *AnnotationNamespaceCreateBulk) ExecX(ctx context.Context)
- func (ancb *AnnotationNamespaceCreateBulk) Save(ctx context.Context) ([]*AnnotationNamespace, error)
- func (ancb *AnnotationNamespaceCreateBulk) SaveX(ctx context.Context) []*AnnotationNamespace
- type AnnotationNamespaceDelete
- type AnnotationNamespaceDeleteOne
- type AnnotationNamespaceEdge
- type AnnotationNamespaceEdges
- type AnnotationNamespaceGroupBy
- func (angb *AnnotationNamespaceGroupBy) Aggregate(fns ...AggregateFunc) *AnnotationNamespaceGroupBy
- func (s *AnnotationNamespaceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AnnotationNamespaceGroupBy) BoolX(ctx context.Context) bool
- func (s *AnnotationNamespaceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AnnotationNamespaceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AnnotationNamespaceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AnnotationNamespaceGroupBy) Float64X(ctx context.Context) float64
- func (s *AnnotationNamespaceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AnnotationNamespaceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AnnotationNamespaceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AnnotationNamespaceGroupBy) IntX(ctx context.Context) int
- func (s *AnnotationNamespaceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AnnotationNamespaceGroupBy) IntsX(ctx context.Context) []int
- func (angb *AnnotationNamespaceGroupBy) Scan(ctx context.Context, v any) error
- func (s *AnnotationNamespaceGroupBy) ScanX(ctx context.Context, v any)
- func (s *AnnotationNamespaceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AnnotationNamespaceGroupBy) StringX(ctx context.Context) string
- func (s *AnnotationNamespaceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AnnotationNamespaceGroupBy) StringsX(ctx context.Context) []string
- type AnnotationNamespaceMutation
- func (m *AnnotationNamespaceMutation) AddAnnotationIDs(ids ...gidx.PrefixedID)
- func (m *AnnotationNamespaceMutation) AddField(name string, value ent.Value) error
- func (m *AnnotationNamespaceMutation) AddedEdges() []string
- func (m *AnnotationNamespaceMutation) AddedField(name string) (ent.Value, bool)
- func (m *AnnotationNamespaceMutation) AddedFields() []string
- func (m *AnnotationNamespaceMutation) AddedIDs(name string) []ent.Value
- func (m *AnnotationNamespaceMutation) AnnotationsCleared() bool
- func (m *AnnotationNamespaceMutation) AnnotationsIDs() (ids []gidx.PrefixedID)
- func (m *AnnotationNamespaceMutation) ClearAnnotations()
- func (m *AnnotationNamespaceMutation) ClearEdge(name string) error
- func (m *AnnotationNamespaceMutation) ClearField(name string) error
- func (m *AnnotationNamespaceMutation) ClearedEdges() []string
- func (m *AnnotationNamespaceMutation) ClearedFields() []string
- func (m AnnotationNamespaceMutation) Client() *Client
- func (m *AnnotationNamespaceMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AnnotationNamespaceMutation) EdgeCleared(name string) bool
- func (m *AnnotationNamespaceMutation) Field(name string) (ent.Value, bool)
- func (m *AnnotationNamespaceMutation) FieldCleared(name string) bool
- func (m *AnnotationNamespaceMutation) Fields() []string
- func (m *AnnotationNamespaceMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *AnnotationNamespaceMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *AnnotationNamespaceMutation) Name() (r string, exists bool)
- func (m *AnnotationNamespaceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AnnotationNamespaceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AnnotationNamespaceMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AnnotationNamespaceMutation) OldOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *AnnotationNamespaceMutation) OldPrivate(ctx context.Context) (v bool, err error)
- func (m *AnnotationNamespaceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AnnotationNamespaceMutation) Op() Op
- func (m *AnnotationNamespaceMutation) OwnerID() (r gidx.PrefixedID, exists bool)
- func (m *AnnotationNamespaceMutation) Private() (r bool, exists bool)
- func (m *AnnotationNamespaceMutation) RemoveAnnotationIDs(ids ...gidx.PrefixedID)
- func (m *AnnotationNamespaceMutation) RemovedAnnotationsIDs() (ids []gidx.PrefixedID)
- func (m *AnnotationNamespaceMutation) RemovedEdges() []string
- func (m *AnnotationNamespaceMutation) RemovedIDs(name string) []ent.Value
- func (m *AnnotationNamespaceMutation) ResetAnnotations()
- func (m *AnnotationNamespaceMutation) ResetCreatedAt()
- func (m *AnnotationNamespaceMutation) ResetEdge(name string) error
- func (m *AnnotationNamespaceMutation) ResetField(name string) error
- func (m *AnnotationNamespaceMutation) ResetName()
- func (m *AnnotationNamespaceMutation) ResetOwnerID()
- func (m *AnnotationNamespaceMutation) ResetPrivate()
- func (m *AnnotationNamespaceMutation) ResetUpdatedAt()
- func (m *AnnotationNamespaceMutation) SetCreatedAt(t time.Time)
- func (m *AnnotationNamespaceMutation) SetField(name string, value ent.Value) error
- func (m *AnnotationNamespaceMutation) SetID(id gidx.PrefixedID)
- func (m *AnnotationNamespaceMutation) SetName(s string)
- func (m *AnnotationNamespaceMutation) SetOp(op Op)
- func (m *AnnotationNamespaceMutation) SetOwnerID(gi gidx.PrefixedID)
- func (m *AnnotationNamespaceMutation) SetPrivate(b bool)
- func (m *AnnotationNamespaceMutation) SetUpdatedAt(t time.Time)
- func (m AnnotationNamespaceMutation) Tx() (*Tx, error)
- func (m *AnnotationNamespaceMutation) Type() string
- func (m *AnnotationNamespaceMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AnnotationNamespaceMutation) Where(ps ...predicate.AnnotationNamespace)
- func (m *AnnotationNamespaceMutation) WhereP(ps ...func(*sql.Selector))
- type AnnotationNamespaceOrder
- type AnnotationNamespaceOrderField
- type AnnotationNamespacePaginateOption
- type AnnotationNamespaceQuery
- func (anq *AnnotationNamespaceQuery) Aggregate(fns ...AggregateFunc) *AnnotationNamespaceSelect
- func (anq *AnnotationNamespaceQuery) All(ctx context.Context) ([]*AnnotationNamespace, error)
- func (anq *AnnotationNamespaceQuery) AllX(ctx context.Context) []*AnnotationNamespace
- func (anq *AnnotationNamespaceQuery) Clone() *AnnotationNamespaceQuery
- func (an *AnnotationNamespaceQuery) CollectFields(ctx context.Context, satisfies ...string) (*AnnotationNamespaceQuery, error)
- func (anq *AnnotationNamespaceQuery) Count(ctx context.Context) (int, error)
- func (anq *AnnotationNamespaceQuery) CountX(ctx context.Context) int
- func (anq *AnnotationNamespaceQuery) Exist(ctx context.Context) (bool, error)
- func (anq *AnnotationNamespaceQuery) ExistX(ctx context.Context) bool
- func (anq *AnnotationNamespaceQuery) First(ctx context.Context) (*AnnotationNamespace, error)
- func (anq *AnnotationNamespaceQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (anq *AnnotationNamespaceQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (anq *AnnotationNamespaceQuery) FirstX(ctx context.Context) *AnnotationNamespace
- func (anq *AnnotationNamespaceQuery) GroupBy(field string, fields ...string) *AnnotationNamespaceGroupBy
- func (anq *AnnotationNamespaceQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (anq *AnnotationNamespaceQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (anq *AnnotationNamespaceQuery) Limit(limit int) *AnnotationNamespaceQuery
- func (anq *AnnotationNamespaceQuery) Offset(offset int) *AnnotationNamespaceQuery
- func (anq *AnnotationNamespaceQuery) Only(ctx context.Context) (*AnnotationNamespace, error)
- func (anq *AnnotationNamespaceQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (anq *AnnotationNamespaceQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (anq *AnnotationNamespaceQuery) OnlyX(ctx context.Context) *AnnotationNamespace
- func (anq *AnnotationNamespaceQuery) Order(o ...annotationnamespace.OrderOption) *AnnotationNamespaceQuery
- func (an *AnnotationNamespaceQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*AnnotationNamespaceConnection, error)
- func (anq *AnnotationNamespaceQuery) QueryAnnotations() *AnnotationQuery
- func (anq *AnnotationNamespaceQuery) Select(fields ...string) *AnnotationNamespaceSelect
- func (anq *AnnotationNamespaceQuery) Unique(unique bool) *AnnotationNamespaceQuery
- func (anq *AnnotationNamespaceQuery) Where(ps ...predicate.AnnotationNamespace) *AnnotationNamespaceQuery
- func (anq *AnnotationNamespaceQuery) WithAnnotations(opts ...func(*AnnotationQuery)) *AnnotationNamespaceQuery
- func (anq *AnnotationNamespaceQuery) WithNamedAnnotations(name string, opts ...func(*AnnotationQuery)) *AnnotationNamespaceQuery
- type AnnotationNamespaceSelect
- func (ans *AnnotationNamespaceSelect) Aggregate(fns ...AggregateFunc) *AnnotationNamespaceSelect
- func (s *AnnotationNamespaceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AnnotationNamespaceSelect) BoolX(ctx context.Context) bool
- func (s *AnnotationNamespaceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AnnotationNamespaceSelect) BoolsX(ctx context.Context) []bool
- func (s *AnnotationNamespaceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AnnotationNamespaceSelect) Float64X(ctx context.Context) float64
- func (s *AnnotationNamespaceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AnnotationNamespaceSelect) Float64sX(ctx context.Context) []float64
- func (s *AnnotationNamespaceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AnnotationNamespaceSelect) IntX(ctx context.Context) int
- func (s *AnnotationNamespaceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AnnotationNamespaceSelect) IntsX(ctx context.Context) []int
- func (ans *AnnotationNamespaceSelect) Scan(ctx context.Context, v any) error
- func (s *AnnotationNamespaceSelect) ScanX(ctx context.Context, v any)
- func (s *AnnotationNamespaceSelect) String(ctx context.Context) (_ string, err error)
- func (s *AnnotationNamespaceSelect) StringX(ctx context.Context) string
- func (s *AnnotationNamespaceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AnnotationNamespaceSelect) StringsX(ctx context.Context) []string
- type AnnotationNamespaceUpdate
- func (anu *AnnotationNamespaceUpdate) AddAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceUpdate
- func (anu *AnnotationNamespaceUpdate) AddAnnotations(a ...*Annotation) *AnnotationNamespaceUpdate
- func (anu *AnnotationNamespaceUpdate) ClearAnnotations() *AnnotationNamespaceUpdate
- func (anu *AnnotationNamespaceUpdate) Exec(ctx context.Context) error
- func (anu *AnnotationNamespaceUpdate) ExecX(ctx context.Context)
- func (anu *AnnotationNamespaceUpdate) Mutation() *AnnotationNamespaceMutation
- func (anu *AnnotationNamespaceUpdate) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceUpdate
- func (anu *AnnotationNamespaceUpdate) RemoveAnnotations(a ...*Annotation) *AnnotationNamespaceUpdate
- func (anu *AnnotationNamespaceUpdate) Save(ctx context.Context) (int, error)
- func (anu *AnnotationNamespaceUpdate) SaveX(ctx context.Context) int
- func (c *AnnotationNamespaceUpdate) SetInput(i UpdateAnnotationNamespaceInput) *AnnotationNamespaceUpdate
- func (anu *AnnotationNamespaceUpdate) SetName(s string) *AnnotationNamespaceUpdate
- func (anu *AnnotationNamespaceUpdate) SetNillablePrivate(b *bool) *AnnotationNamespaceUpdate
- func (anu *AnnotationNamespaceUpdate) SetPrivate(b bool) *AnnotationNamespaceUpdate
- func (anu *AnnotationNamespaceUpdate) Where(ps ...predicate.AnnotationNamespace) *AnnotationNamespaceUpdate
- type AnnotationNamespaceUpdateOne
- func (anuo *AnnotationNamespaceUpdateOne) AddAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceUpdateOne
- func (anuo *AnnotationNamespaceUpdateOne) AddAnnotations(a ...*Annotation) *AnnotationNamespaceUpdateOne
- func (anuo *AnnotationNamespaceUpdateOne) ClearAnnotations() *AnnotationNamespaceUpdateOne
- func (anuo *AnnotationNamespaceUpdateOne) Exec(ctx context.Context) error
- func (anuo *AnnotationNamespaceUpdateOne) ExecX(ctx context.Context)
- func (anuo *AnnotationNamespaceUpdateOne) Mutation() *AnnotationNamespaceMutation
- func (anuo *AnnotationNamespaceUpdateOne) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceUpdateOne
- func (anuo *AnnotationNamespaceUpdateOne) RemoveAnnotations(a ...*Annotation) *AnnotationNamespaceUpdateOne
- func (anuo *AnnotationNamespaceUpdateOne) Save(ctx context.Context) (*AnnotationNamespace, error)
- func (anuo *AnnotationNamespaceUpdateOne) SaveX(ctx context.Context) *AnnotationNamespace
- func (anuo *AnnotationNamespaceUpdateOne) Select(field string, fields ...string) *AnnotationNamespaceUpdateOne
- func (c *AnnotationNamespaceUpdateOne) SetInput(i UpdateAnnotationNamespaceInput) *AnnotationNamespaceUpdateOne
- func (anuo *AnnotationNamespaceUpdateOne) SetName(s string) *AnnotationNamespaceUpdateOne
- func (anuo *AnnotationNamespaceUpdateOne) SetNillablePrivate(b *bool) *AnnotationNamespaceUpdateOne
- func (anuo *AnnotationNamespaceUpdateOne) SetPrivate(b bool) *AnnotationNamespaceUpdateOne
- func (anuo *AnnotationNamespaceUpdateOne) Where(ps ...predicate.AnnotationNamespace) *AnnotationNamespaceUpdateOne
- type AnnotationNamespaceWhereInput
- type AnnotationNamespaces
- type AnnotationOrder
- type AnnotationOrderField
- type AnnotationPaginateOption
- type AnnotationQuery
- func (aq *AnnotationQuery) Aggregate(fns ...AggregateFunc) *AnnotationSelect
- func (aq *AnnotationQuery) All(ctx context.Context) ([]*Annotation, error)
- func (aq *AnnotationQuery) AllX(ctx context.Context) []*Annotation
- func (aq *AnnotationQuery) Clone() *AnnotationQuery
- func (a *AnnotationQuery) CollectFields(ctx context.Context, satisfies ...string) (*AnnotationQuery, error)
- func (aq *AnnotationQuery) Count(ctx context.Context) (int, error)
- func (aq *AnnotationQuery) CountX(ctx context.Context) int
- func (aq *AnnotationQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AnnotationQuery) ExistX(ctx context.Context) bool
- func (aq *AnnotationQuery) First(ctx context.Context) (*Annotation, error)
- func (aq *AnnotationQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (aq *AnnotationQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (aq *AnnotationQuery) FirstX(ctx context.Context) *Annotation
- func (aq *AnnotationQuery) GroupBy(field string, fields ...string) *AnnotationGroupBy
- func (aq *AnnotationQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (aq *AnnotationQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (aq *AnnotationQuery) Limit(limit int) *AnnotationQuery
- func (aq *AnnotationQuery) Offset(offset int) *AnnotationQuery
- func (aq *AnnotationQuery) Only(ctx context.Context) (*Annotation, error)
- func (aq *AnnotationQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (aq *AnnotationQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (aq *AnnotationQuery) OnlyX(ctx context.Context) *Annotation
- func (aq *AnnotationQuery) Order(o ...annotation.OrderOption) *AnnotationQuery
- func (a *AnnotationQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*AnnotationConnection, error)
- func (aq *AnnotationQuery) QueryMetadata() *MetadataQuery
- func (aq *AnnotationQuery) QueryNamespace() *AnnotationNamespaceQuery
- func (aq *AnnotationQuery) Select(fields ...string) *AnnotationSelect
- func (aq *AnnotationQuery) Unique(unique bool) *AnnotationQuery
- func (aq *AnnotationQuery) Where(ps ...predicate.Annotation) *AnnotationQuery
- func (aq *AnnotationQuery) WithMetadata(opts ...func(*MetadataQuery)) *AnnotationQuery
- func (aq *AnnotationQuery) WithNamespace(opts ...func(*AnnotationNamespaceQuery)) *AnnotationQuery
- type AnnotationSelect
- func (as *AnnotationSelect) Aggregate(fns ...AggregateFunc) *AnnotationSelect
- func (s *AnnotationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AnnotationSelect) BoolX(ctx context.Context) bool
- func (s *AnnotationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AnnotationSelect) BoolsX(ctx context.Context) []bool
- func (s *AnnotationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AnnotationSelect) Float64X(ctx context.Context) float64
- func (s *AnnotationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AnnotationSelect) Float64sX(ctx context.Context) []float64
- func (s *AnnotationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AnnotationSelect) IntX(ctx context.Context) int
- func (s *AnnotationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AnnotationSelect) IntsX(ctx context.Context) []int
- func (as *AnnotationSelect) Scan(ctx context.Context, v any) error
- func (s *AnnotationSelect) ScanX(ctx context.Context, v any)
- func (s *AnnotationSelect) String(ctx context.Context) (_ string, err error)
- func (s *AnnotationSelect) StringX(ctx context.Context) string
- func (s *AnnotationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AnnotationSelect) StringsX(ctx context.Context) []string
- type AnnotationUpdate
- func (au *AnnotationUpdate) AppendData(jm json.RawMessage) *AnnotationUpdate
- func (au *AnnotationUpdate) Exec(ctx context.Context) error
- func (au *AnnotationUpdate) ExecX(ctx context.Context)
- func (au *AnnotationUpdate) Mutation() *AnnotationMutation
- func (au *AnnotationUpdate) Save(ctx context.Context) (int, error)
- func (au *AnnotationUpdate) SaveX(ctx context.Context) int
- func (au *AnnotationUpdate) SetData(jm json.RawMessage) *AnnotationUpdate
- func (au *AnnotationUpdate) Where(ps ...predicate.Annotation) *AnnotationUpdate
- type AnnotationUpdateOne
- func (auo *AnnotationUpdateOne) AppendData(jm json.RawMessage) *AnnotationUpdateOne
- func (auo *AnnotationUpdateOne) Exec(ctx context.Context) error
- func (auo *AnnotationUpdateOne) ExecX(ctx context.Context)
- func (auo *AnnotationUpdateOne) Mutation() *AnnotationMutation
- func (auo *AnnotationUpdateOne) Save(ctx context.Context) (*Annotation, error)
- func (auo *AnnotationUpdateOne) SaveX(ctx context.Context) *Annotation
- func (auo *AnnotationUpdateOne) Select(field string, fields ...string) *AnnotationUpdateOne
- func (auo *AnnotationUpdateOne) SetData(jm json.RawMessage) *AnnotationUpdateOne
- func (auo *AnnotationUpdateOne) Where(ps ...predicate.Annotation) *AnnotationUpdateOne
- type AnnotationWhereInput
- type Annotations
- 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) Noder(ctx context.Context, id gidx.PrefixedID, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []gidx.PrefixedID, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type CreateAnnotationNamespaceInput
- type CreateStatusInput
- type CreateStatusNamespaceInput
- type Cursor
- type Hook
- type InterceptFunc
- type Interceptor
- type Metadata
- func (m *Metadata) Annotations(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*AnnotationConnection, error)
- func (m Metadata) IsEntity()
- func (n *Metadata) IsNode()
- func (m *Metadata) NamedAnnotations(name string) ([]*Annotation, error)
- func (m *Metadata) NamedStatuses(name string) ([]*Status, error)
- func (m *Metadata) QueryAnnotations() *AnnotationQuery
- func (m *Metadata) QueryStatuses() *StatusQuery
- func (m *Metadata) Statuses(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*StatusConnection, error)
- func (m *Metadata) String() string
- func (m *Metadata) ToEdge(order *MetadataOrder) *MetadataEdge
- func (m *Metadata) Unwrap() *Metadata
- func (m *Metadata) Update() *MetadataUpdateOne
- func (m *Metadata) Value(name string) (ent.Value, error)
- type MetadataClient
- func (c *MetadataClient) Create() *MetadataCreate
- func (c *MetadataClient) CreateBulk(builders ...*MetadataCreate) *MetadataCreateBulk
- func (c *MetadataClient) Delete() *MetadataDelete
- func (c *MetadataClient) DeleteOne(m *Metadata) *MetadataDeleteOne
- func (c *MetadataClient) DeleteOneID(id gidx.PrefixedID) *MetadataDeleteOne
- func (c *MetadataClient) Get(ctx context.Context, id gidx.PrefixedID) (*Metadata, error)
- func (c *MetadataClient) GetX(ctx context.Context, id gidx.PrefixedID) *Metadata
- func (c *MetadataClient) Hooks() []Hook
- func (c *MetadataClient) Intercept(interceptors ...Interceptor)
- func (c *MetadataClient) Interceptors() []Interceptor
- func (c *MetadataClient) MapCreateBulk(slice any, setFunc func(*MetadataCreate, int)) *MetadataCreateBulk
- func (c *MetadataClient) Query() *MetadataQuery
- func (c *MetadataClient) QueryAnnotations(m *Metadata) *AnnotationQuery
- func (c *MetadataClient) QueryStatuses(m *Metadata) *StatusQuery
- func (c *MetadataClient) Update() *MetadataUpdate
- func (c *MetadataClient) UpdateOne(m *Metadata) *MetadataUpdateOne
- func (c *MetadataClient) UpdateOneID(id gidx.PrefixedID) *MetadataUpdateOne
- func (c *MetadataClient) Use(hooks ...Hook)
- type MetadataConnection
- type MetadataCreate
- func (mc *MetadataCreate) AddAnnotationIDs(ids ...gidx.PrefixedID) *MetadataCreate
- func (mc *MetadataCreate) AddAnnotations(a ...*Annotation) *MetadataCreate
- func (mc *MetadataCreate) AddStatusIDs(ids ...gidx.PrefixedID) *MetadataCreate
- func (mc *MetadataCreate) AddStatuses(s ...*Status) *MetadataCreate
- func (mc *MetadataCreate) Exec(ctx context.Context) error
- func (mc *MetadataCreate) ExecX(ctx context.Context)
- func (mc *MetadataCreate) Mutation() *MetadataMutation
- func (mc *MetadataCreate) Save(ctx context.Context) (*Metadata, error)
- func (mc *MetadataCreate) SaveX(ctx context.Context) *Metadata
- func (mc *MetadataCreate) SetCreatedAt(t time.Time) *MetadataCreate
- func (mc *MetadataCreate) SetID(gi gidx.PrefixedID) *MetadataCreate
- func (mc *MetadataCreate) SetNillableCreatedAt(t *time.Time) *MetadataCreate
- func (mc *MetadataCreate) SetNillableID(gi *gidx.PrefixedID) *MetadataCreate
- func (mc *MetadataCreate) SetNillableUpdatedAt(t *time.Time) *MetadataCreate
- func (mc *MetadataCreate) SetNodeID(gi gidx.PrefixedID) *MetadataCreate
- func (mc *MetadataCreate) SetUpdatedAt(t time.Time) *MetadataCreate
- type MetadataCreateBulk
- type MetadataDelete
- type MetadataDeleteOne
- type MetadataEdge
- type MetadataEdges
- type MetadataGroupBy
- func (mgb *MetadataGroupBy) Aggregate(fns ...AggregateFunc) *MetadataGroupBy
- func (s *MetadataGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MetadataGroupBy) BoolX(ctx context.Context) bool
- func (s *MetadataGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MetadataGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MetadataGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MetadataGroupBy) Float64X(ctx context.Context) float64
- func (s *MetadataGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MetadataGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MetadataGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MetadataGroupBy) IntX(ctx context.Context) int
- func (s *MetadataGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MetadataGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MetadataGroupBy) Scan(ctx context.Context, v any) error
- func (s *MetadataGroupBy) ScanX(ctx context.Context, v any)
- func (s *MetadataGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MetadataGroupBy) StringX(ctx context.Context) string
- func (s *MetadataGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MetadataGroupBy) StringsX(ctx context.Context) []string
- type MetadataMutation
- func (m *MetadataMutation) AddAnnotationIDs(ids ...gidx.PrefixedID)
- func (m *MetadataMutation) AddField(name string, value ent.Value) error
- func (m *MetadataMutation) AddStatusIDs(ids ...gidx.PrefixedID)
- func (m *MetadataMutation) AddedEdges() []string
- func (m *MetadataMutation) AddedField(name string) (ent.Value, bool)
- func (m *MetadataMutation) AddedFields() []string
- func (m *MetadataMutation) AddedIDs(name string) []ent.Value
- func (m *MetadataMutation) AnnotationsCleared() bool
- func (m *MetadataMutation) AnnotationsIDs() (ids []gidx.PrefixedID)
- func (m *MetadataMutation) ClearAnnotations()
- func (m *MetadataMutation) ClearEdge(name string) error
- func (m *MetadataMutation) ClearField(name string) error
- func (m *MetadataMutation) ClearStatuses()
- func (m *MetadataMutation) ClearedEdges() []string
- func (m *MetadataMutation) ClearedFields() []string
- func (m MetadataMutation) Client() *Client
- func (m *MetadataMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MetadataMutation) EdgeCleared(name string) bool
- func (m *MetadataMutation) Field(name string) (ent.Value, bool)
- func (m *MetadataMutation) FieldCleared(name string) bool
- func (m *MetadataMutation) Fields() []string
- func (m *MetadataMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *MetadataMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *MetadataMutation) NodeID() (r gidx.PrefixedID, exists bool)
- func (m *MetadataMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MetadataMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MetadataMutation) OldNodeID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *MetadataMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MetadataMutation) Op() Op
- func (m *MetadataMutation) RemoveAnnotationIDs(ids ...gidx.PrefixedID)
- func (m *MetadataMutation) RemoveStatusIDs(ids ...gidx.PrefixedID)
- func (m *MetadataMutation) RemovedAnnotationsIDs() (ids []gidx.PrefixedID)
- func (m *MetadataMutation) RemovedEdges() []string
- func (m *MetadataMutation) RemovedIDs(name string) []ent.Value
- func (m *MetadataMutation) RemovedStatusesIDs() (ids []gidx.PrefixedID)
- func (m *MetadataMutation) ResetAnnotations()
- func (m *MetadataMutation) ResetCreatedAt()
- func (m *MetadataMutation) ResetEdge(name string) error
- func (m *MetadataMutation) ResetField(name string) error
- func (m *MetadataMutation) ResetNodeID()
- func (m *MetadataMutation) ResetStatuses()
- func (m *MetadataMutation) ResetUpdatedAt()
- func (m *MetadataMutation) SetCreatedAt(t time.Time)
- func (m *MetadataMutation) SetField(name string, value ent.Value) error
- func (m *MetadataMutation) SetID(id gidx.PrefixedID)
- func (m *MetadataMutation) SetNodeID(gi gidx.PrefixedID)
- func (m *MetadataMutation) SetOp(op Op)
- func (m *MetadataMutation) SetUpdatedAt(t time.Time)
- func (m *MetadataMutation) StatusesCleared() bool
- func (m *MetadataMutation) StatusesIDs() (ids []gidx.PrefixedID)
- func (m MetadataMutation) Tx() (*Tx, error)
- func (m *MetadataMutation) Type() string
- func (m *MetadataMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MetadataMutation) Where(ps ...predicate.Metadata)
- func (m *MetadataMutation) WhereP(ps ...func(*sql.Selector))
- type MetadataOrder
- type MetadataOrderField
- type MetadataPaginateOption
- type MetadataQuery
- func (mq *MetadataQuery) Aggregate(fns ...AggregateFunc) *MetadataSelect
- func (mq *MetadataQuery) All(ctx context.Context) ([]*Metadata, error)
- func (mq *MetadataQuery) AllX(ctx context.Context) []*Metadata
- func (mq *MetadataQuery) Clone() *MetadataQuery
- func (m *MetadataQuery) CollectFields(ctx context.Context, satisfies ...string) (*MetadataQuery, error)
- func (mq *MetadataQuery) Count(ctx context.Context) (int, error)
- func (mq *MetadataQuery) CountX(ctx context.Context) int
- func (mq *MetadataQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MetadataQuery) ExistX(ctx context.Context) bool
- func (mq *MetadataQuery) First(ctx context.Context) (*Metadata, error)
- func (mq *MetadataQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (mq *MetadataQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (mq *MetadataQuery) FirstX(ctx context.Context) *Metadata
- func (mq *MetadataQuery) GroupBy(field string, fields ...string) *MetadataGroupBy
- func (mq *MetadataQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (mq *MetadataQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (mq *MetadataQuery) Limit(limit int) *MetadataQuery
- func (mq *MetadataQuery) Offset(offset int) *MetadataQuery
- func (mq *MetadataQuery) Only(ctx context.Context) (*Metadata, error)
- func (mq *MetadataQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (mq *MetadataQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (mq *MetadataQuery) OnlyX(ctx context.Context) *Metadata
- func (mq *MetadataQuery) Order(o ...metadata.OrderOption) *MetadataQuery
- func (m *MetadataQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*MetadataConnection, error)
- func (mq *MetadataQuery) QueryAnnotations() *AnnotationQuery
- func (mq *MetadataQuery) QueryStatuses() *StatusQuery
- func (mq *MetadataQuery) Select(fields ...string) *MetadataSelect
- func (mq *MetadataQuery) Unique(unique bool) *MetadataQuery
- func (mq *MetadataQuery) Where(ps ...predicate.Metadata) *MetadataQuery
- func (mq *MetadataQuery) WithAnnotations(opts ...func(*AnnotationQuery)) *MetadataQuery
- func (mq *MetadataQuery) WithNamedAnnotations(name string, opts ...func(*AnnotationQuery)) *MetadataQuery
- func (mq *MetadataQuery) WithNamedStatuses(name string, opts ...func(*StatusQuery)) *MetadataQuery
- func (mq *MetadataQuery) WithStatuses(opts ...func(*StatusQuery)) *MetadataQuery
- type MetadataSelect
- func (ms *MetadataSelect) Aggregate(fns ...AggregateFunc) *MetadataSelect
- func (s *MetadataSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MetadataSelect) BoolX(ctx context.Context) bool
- func (s *MetadataSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MetadataSelect) BoolsX(ctx context.Context) []bool
- func (s *MetadataSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MetadataSelect) Float64X(ctx context.Context) float64
- func (s *MetadataSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MetadataSelect) Float64sX(ctx context.Context) []float64
- func (s *MetadataSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MetadataSelect) IntX(ctx context.Context) int
- func (s *MetadataSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MetadataSelect) IntsX(ctx context.Context) []int
- func (ms *MetadataSelect) Scan(ctx context.Context, v any) error
- func (s *MetadataSelect) ScanX(ctx context.Context, v any)
- func (s *MetadataSelect) String(ctx context.Context) (_ string, err error)
- func (s *MetadataSelect) StringX(ctx context.Context) string
- func (s *MetadataSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MetadataSelect) StringsX(ctx context.Context) []string
- type MetadataSlice
- type MetadataUpdate
- func (mu *MetadataUpdate) AddAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdate
- func (mu *MetadataUpdate) AddAnnotations(a ...*Annotation) *MetadataUpdate
- func (mu *MetadataUpdate) AddStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdate
- func (mu *MetadataUpdate) AddStatuses(s ...*Status) *MetadataUpdate
- func (mu *MetadataUpdate) ClearAnnotations() *MetadataUpdate
- func (mu *MetadataUpdate) ClearStatuses() *MetadataUpdate
- func (mu *MetadataUpdate) Exec(ctx context.Context) error
- func (mu *MetadataUpdate) ExecX(ctx context.Context)
- func (mu *MetadataUpdate) Mutation() *MetadataMutation
- func (mu *MetadataUpdate) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdate
- func (mu *MetadataUpdate) RemoveAnnotations(a ...*Annotation) *MetadataUpdate
- func (mu *MetadataUpdate) RemoveStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdate
- func (mu *MetadataUpdate) RemoveStatuses(s ...*Status) *MetadataUpdate
- func (mu *MetadataUpdate) Save(ctx context.Context) (int, error)
- func (mu *MetadataUpdate) SaveX(ctx context.Context) int
- func (mu *MetadataUpdate) Where(ps ...predicate.Metadata) *MetadataUpdate
- type MetadataUpdateOne
- func (muo *MetadataUpdateOne) AddAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) AddAnnotations(a ...*Annotation) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) AddStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) AddStatuses(s ...*Status) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) ClearAnnotations() *MetadataUpdateOne
- func (muo *MetadataUpdateOne) ClearStatuses() *MetadataUpdateOne
- func (muo *MetadataUpdateOne) Exec(ctx context.Context) error
- func (muo *MetadataUpdateOne) ExecX(ctx context.Context)
- func (muo *MetadataUpdateOne) Mutation() *MetadataMutation
- func (muo *MetadataUpdateOne) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) RemoveAnnotations(a ...*Annotation) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) RemoveStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) RemoveStatuses(s ...*Status) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) Save(ctx context.Context) (*Metadata, error)
- func (muo *MetadataUpdateOne) SaveX(ctx context.Context) *Metadata
- func (muo *MetadataUpdateOne) Select(field string, fields ...string) *MetadataUpdateOne
- func (muo *MetadataUpdateOne) Where(ps ...predicate.Metadata) *MetadataUpdateOne
- type MetadataWhereInput
- type MutateFunc
- type Mutation
- type Mutator
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Status
- func (s Status) IsEntity()
- func (n *Status) IsNode()
- func (s *Status) Metadata(ctx context.Context) (*Metadata, error)
- func (s *Status) Namespace(ctx context.Context) (*StatusNamespace, error)
- func (s *Status) QueryMetadata() *MetadataQuery
- func (s *Status) QueryNamespace() *StatusNamespaceQuery
- func (s *Status) String() string
- func (s *Status) ToEdge(order *StatusOrder) *StatusEdge
- func (s *Status) Unwrap() *Status
- func (s *Status) Update() *StatusUpdateOne
- func (s *Status) Value(name string) (ent.Value, error)
- type StatusClient
- func (c *StatusClient) Create() *StatusCreate
- func (c *StatusClient) CreateBulk(builders ...*StatusCreate) *StatusCreateBulk
- func (c *StatusClient) Delete() *StatusDelete
- func (c *StatusClient) DeleteOne(s *Status) *StatusDeleteOne
- func (c *StatusClient) DeleteOneID(id gidx.PrefixedID) *StatusDeleteOne
- func (c *StatusClient) Get(ctx context.Context, id gidx.PrefixedID) (*Status, error)
- func (c *StatusClient) GetX(ctx context.Context, id gidx.PrefixedID) *Status
- func (c *StatusClient) Hooks() []Hook
- func (c *StatusClient) Intercept(interceptors ...Interceptor)
- func (c *StatusClient) Interceptors() []Interceptor
- func (c *StatusClient) MapCreateBulk(slice any, setFunc func(*StatusCreate, int)) *StatusCreateBulk
- func (c *StatusClient) Query() *StatusQuery
- func (c *StatusClient) QueryMetadata(s *Status) *MetadataQuery
- func (c *StatusClient) QueryNamespace(s *Status) *StatusNamespaceQuery
- func (c *StatusClient) Update() *StatusUpdate
- func (c *StatusClient) UpdateOne(s *Status) *StatusUpdateOne
- func (c *StatusClient) UpdateOneID(id gidx.PrefixedID) *StatusUpdateOne
- func (c *StatusClient) Use(hooks ...Hook)
- type StatusConnection
- type StatusCreate
- func (sc *StatusCreate) Exec(ctx context.Context) error
- func (sc *StatusCreate) ExecX(ctx context.Context)
- func (sc *StatusCreate) Mutation() *StatusMutation
- func (sc *StatusCreate) Save(ctx context.Context) (*Status, error)
- func (sc *StatusCreate) SaveX(ctx context.Context) *Status
- func (sc *StatusCreate) SetCreatedAt(t time.Time) *StatusCreate
- func (sc *StatusCreate) SetData(jm json.RawMessage) *StatusCreate
- func (sc *StatusCreate) SetID(gi gidx.PrefixedID) *StatusCreate
- func (c *StatusCreate) SetInput(i CreateStatusInput) *StatusCreate
- func (sc *StatusCreate) SetMetadata(m *Metadata) *StatusCreate
- func (sc *StatusCreate) SetMetadataID(gi gidx.PrefixedID) *StatusCreate
- func (sc *StatusCreate) SetNamespace(s *StatusNamespace) *StatusCreate
- func (sc *StatusCreate) SetNamespaceID(id gidx.PrefixedID) *StatusCreate
- func (sc *StatusCreate) SetNillableCreatedAt(t *time.Time) *StatusCreate
- func (sc *StatusCreate) SetNillableID(gi *gidx.PrefixedID) *StatusCreate
- func (sc *StatusCreate) SetNillableUpdatedAt(t *time.Time) *StatusCreate
- func (sc *StatusCreate) SetSource(s string) *StatusCreate
- func (sc *StatusCreate) SetStatusNamespaceID(gi gidx.PrefixedID) *StatusCreate
- func (sc *StatusCreate) SetUpdatedAt(t time.Time) *StatusCreate
- type StatusCreateBulk
- type StatusDelete
- type StatusDeleteOne
- type StatusEdge
- type StatusEdges
- type StatusGroupBy
- func (sgb *StatusGroupBy) Aggregate(fns ...AggregateFunc) *StatusGroupBy
- func (s *StatusGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *StatusGroupBy) BoolX(ctx context.Context) bool
- func (s *StatusGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *StatusGroupBy) BoolsX(ctx context.Context) []bool
- func (s *StatusGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *StatusGroupBy) Float64X(ctx context.Context) float64
- func (s *StatusGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *StatusGroupBy) Float64sX(ctx context.Context) []float64
- func (s *StatusGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *StatusGroupBy) IntX(ctx context.Context) int
- func (s *StatusGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *StatusGroupBy) IntsX(ctx context.Context) []int
- func (sgb *StatusGroupBy) Scan(ctx context.Context, v any) error
- func (s *StatusGroupBy) ScanX(ctx context.Context, v any)
- func (s *StatusGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *StatusGroupBy) StringX(ctx context.Context) string
- func (s *StatusGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *StatusGroupBy) StringsX(ctx context.Context) []string
- type StatusMutation
- func (m *StatusMutation) AddField(name string, value ent.Value) error
- func (m *StatusMutation) AddedEdges() []string
- func (m *StatusMutation) AddedField(name string) (ent.Value, bool)
- func (m *StatusMutation) AddedFields() []string
- func (m *StatusMutation) AddedIDs(name string) []ent.Value
- func (m *StatusMutation) AppendData(jm json.RawMessage)
- func (m *StatusMutation) AppendedData() (json.RawMessage, bool)
- func (m *StatusMutation) ClearEdge(name string) error
- func (m *StatusMutation) ClearField(name string) error
- func (m *StatusMutation) ClearMetadata()
- func (m *StatusMutation) ClearNamespace()
- func (m *StatusMutation) ClearedEdges() []string
- func (m *StatusMutation) ClearedFields() []string
- func (m StatusMutation) Client() *Client
- func (m *StatusMutation) CreatedAt() (r time.Time, exists bool)
- func (m *StatusMutation) Data() (r json.RawMessage, exists bool)
- func (m *StatusMutation) EdgeCleared(name string) bool
- func (m *StatusMutation) Field(name string) (ent.Value, bool)
- func (m *StatusMutation) FieldCleared(name string) bool
- func (m *StatusMutation) Fields() []string
- func (m *StatusMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *StatusMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *StatusMutation) MetadataCleared() bool
- func (m *StatusMutation) MetadataID() (r gidx.PrefixedID, exists bool)
- func (m *StatusMutation) MetadataIDs() (ids []gidx.PrefixedID)
- func (m *StatusMutation) NamespaceCleared() bool
- func (m *StatusMutation) NamespaceID() (id gidx.PrefixedID, exists bool)
- func (m *StatusMutation) NamespaceIDs() (ids []gidx.PrefixedID)
- func (m *StatusMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *StatusMutation) OldData(ctx context.Context) (v json.RawMessage, err error)
- func (m *StatusMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *StatusMutation) OldMetadataID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *StatusMutation) OldSource(ctx context.Context) (v string, err error)
- func (m *StatusMutation) OldStatusNamespaceID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *StatusMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *StatusMutation) Op() Op
- func (m *StatusMutation) RemovedEdges() []string
- func (m *StatusMutation) RemovedIDs(name string) []ent.Value
- func (m *StatusMutation) ResetCreatedAt()
- func (m *StatusMutation) ResetData()
- func (m *StatusMutation) ResetEdge(name string) error
- func (m *StatusMutation) ResetField(name string) error
- func (m *StatusMutation) ResetMetadata()
- func (m *StatusMutation) ResetMetadataID()
- func (m *StatusMutation) ResetNamespace()
- func (m *StatusMutation) ResetSource()
- func (m *StatusMutation) ResetStatusNamespaceID()
- func (m *StatusMutation) ResetUpdatedAt()
- func (m *StatusMutation) SetCreatedAt(t time.Time)
- func (m *StatusMutation) SetData(jm json.RawMessage)
- func (m *StatusMutation) SetField(name string, value ent.Value) error
- func (m *StatusMutation) SetID(id gidx.PrefixedID)
- func (m *StatusMutation) SetMetadataID(gi gidx.PrefixedID)
- func (m *StatusMutation) SetNamespaceID(id gidx.PrefixedID)
- func (m *StatusMutation) SetOp(op Op)
- func (m *StatusMutation) SetSource(s string)
- func (m *StatusMutation) SetStatusNamespaceID(gi gidx.PrefixedID)
- func (m *StatusMutation) SetUpdatedAt(t time.Time)
- func (m *StatusMutation) Source() (r string, exists bool)
- func (m *StatusMutation) StatusNamespaceID() (r gidx.PrefixedID, exists bool)
- func (m StatusMutation) Tx() (*Tx, error)
- func (m *StatusMutation) Type() string
- func (m *StatusMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *StatusMutation) Where(ps ...predicate.Status)
- func (m *StatusMutation) WhereP(ps ...func(*sql.Selector))
- type StatusNamespace
- func (sn StatusNamespace) IsEntity()
- func (n *StatusNamespace) IsNode()
- func (sn *StatusNamespace) NamedStatuses(name string) ([]*Status, error)
- func (sn *StatusNamespace) QueryStatuses() *StatusQuery
- func (sn *StatusNamespace) String() string
- func (sn *StatusNamespace) ToEdge(order *StatusNamespaceOrder) *StatusNamespaceEdge
- func (sn *StatusNamespace) Unwrap() *StatusNamespace
- func (sn *StatusNamespace) Update() *StatusNamespaceUpdateOne
- func (sn *StatusNamespace) Value(name string) (ent.Value, error)
- type StatusNamespaceClient
- func (c *StatusNamespaceClient) Create() *StatusNamespaceCreate
- func (c *StatusNamespaceClient) CreateBulk(builders ...*StatusNamespaceCreate) *StatusNamespaceCreateBulk
- func (c *StatusNamespaceClient) Delete() *StatusNamespaceDelete
- func (c *StatusNamespaceClient) DeleteOne(sn *StatusNamespace) *StatusNamespaceDeleteOne
- func (c *StatusNamespaceClient) DeleteOneID(id gidx.PrefixedID) *StatusNamespaceDeleteOne
- func (c *StatusNamespaceClient) Get(ctx context.Context, id gidx.PrefixedID) (*StatusNamespace, error)
- func (c *StatusNamespaceClient) GetX(ctx context.Context, id gidx.PrefixedID) *StatusNamespace
- func (c *StatusNamespaceClient) Hooks() []Hook
- func (c *StatusNamespaceClient) Intercept(interceptors ...Interceptor)
- func (c *StatusNamespaceClient) Interceptors() []Interceptor
- func (c *StatusNamespaceClient) MapCreateBulk(slice any, setFunc func(*StatusNamespaceCreate, int)) *StatusNamespaceCreateBulk
- func (c *StatusNamespaceClient) Query() *StatusNamespaceQuery
- func (c *StatusNamespaceClient) QueryStatuses(sn *StatusNamespace) *StatusQuery
- func (c *StatusNamespaceClient) Update() *StatusNamespaceUpdate
- func (c *StatusNamespaceClient) UpdateOne(sn *StatusNamespace) *StatusNamespaceUpdateOne
- func (c *StatusNamespaceClient) UpdateOneID(id gidx.PrefixedID) *StatusNamespaceUpdateOne
- func (c *StatusNamespaceClient) Use(hooks ...Hook)
- type StatusNamespaceConnection
- type StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) AddStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) AddStatuses(s ...*Status) *StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) Exec(ctx context.Context) error
- func (snc *StatusNamespaceCreate) ExecX(ctx context.Context)
- func (snc *StatusNamespaceCreate) Mutation() *StatusNamespaceMutation
- func (snc *StatusNamespaceCreate) Save(ctx context.Context) (*StatusNamespace, error)
- func (snc *StatusNamespaceCreate) SaveX(ctx context.Context) *StatusNamespace
- func (snc *StatusNamespaceCreate) SetCreatedAt(t time.Time) *StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) SetID(gi gidx.PrefixedID) *StatusNamespaceCreate
- func (c *StatusNamespaceCreate) SetInput(i CreateStatusNamespaceInput) *StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) SetName(s string) *StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) SetNillableCreatedAt(t *time.Time) *StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) SetNillableID(gi *gidx.PrefixedID) *StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) SetNillablePrivate(b *bool) *StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) SetNillableUpdatedAt(t *time.Time) *StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) SetPrivate(b bool) *StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) SetResourceProviderID(gi gidx.PrefixedID) *StatusNamespaceCreate
- func (snc *StatusNamespaceCreate) SetUpdatedAt(t time.Time) *StatusNamespaceCreate
- type StatusNamespaceCreateBulk
- func (sncb *StatusNamespaceCreateBulk) Exec(ctx context.Context) error
- func (sncb *StatusNamespaceCreateBulk) ExecX(ctx context.Context)
- func (sncb *StatusNamespaceCreateBulk) Save(ctx context.Context) ([]*StatusNamespace, error)
- func (sncb *StatusNamespaceCreateBulk) SaveX(ctx context.Context) []*StatusNamespace
- type StatusNamespaceDelete
- type StatusNamespaceDeleteOne
- type StatusNamespaceEdge
- type StatusNamespaceEdges
- type StatusNamespaceGroupBy
- func (sngb *StatusNamespaceGroupBy) Aggregate(fns ...AggregateFunc) *StatusNamespaceGroupBy
- func (s *StatusNamespaceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *StatusNamespaceGroupBy) BoolX(ctx context.Context) bool
- func (s *StatusNamespaceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *StatusNamespaceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *StatusNamespaceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *StatusNamespaceGroupBy) Float64X(ctx context.Context) float64
- func (s *StatusNamespaceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *StatusNamespaceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *StatusNamespaceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *StatusNamespaceGroupBy) IntX(ctx context.Context) int
- func (s *StatusNamespaceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *StatusNamespaceGroupBy) IntsX(ctx context.Context) []int
- func (sngb *StatusNamespaceGroupBy) Scan(ctx context.Context, v any) error
- func (s *StatusNamespaceGroupBy) ScanX(ctx context.Context, v any)
- func (s *StatusNamespaceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *StatusNamespaceGroupBy) StringX(ctx context.Context) string
- func (s *StatusNamespaceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *StatusNamespaceGroupBy) StringsX(ctx context.Context) []string
- type StatusNamespaceMutation
- func (m *StatusNamespaceMutation) AddField(name string, value ent.Value) error
- func (m *StatusNamespaceMutation) AddStatusIDs(ids ...gidx.PrefixedID)
- func (m *StatusNamespaceMutation) AddedEdges() []string
- func (m *StatusNamespaceMutation) AddedField(name string) (ent.Value, bool)
- func (m *StatusNamespaceMutation) AddedFields() []string
- func (m *StatusNamespaceMutation) AddedIDs(name string) []ent.Value
- func (m *StatusNamespaceMutation) ClearEdge(name string) error
- func (m *StatusNamespaceMutation) ClearField(name string) error
- func (m *StatusNamespaceMutation) ClearStatuses()
- func (m *StatusNamespaceMutation) ClearedEdges() []string
- func (m *StatusNamespaceMutation) ClearedFields() []string
- func (m StatusNamespaceMutation) Client() *Client
- func (m *StatusNamespaceMutation) CreatedAt() (r time.Time, exists bool)
- func (m *StatusNamespaceMutation) EdgeCleared(name string) bool
- func (m *StatusNamespaceMutation) Field(name string) (ent.Value, bool)
- func (m *StatusNamespaceMutation) FieldCleared(name string) bool
- func (m *StatusNamespaceMutation) Fields() []string
- func (m *StatusNamespaceMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *StatusNamespaceMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *StatusNamespaceMutation) Name() (r string, exists bool)
- func (m *StatusNamespaceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *StatusNamespaceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *StatusNamespaceMutation) OldName(ctx context.Context) (v string, err error)
- func (m *StatusNamespaceMutation) OldPrivate(ctx context.Context) (v bool, err error)
- func (m *StatusNamespaceMutation) OldResourceProviderID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *StatusNamespaceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *StatusNamespaceMutation) Op() Op
- func (m *StatusNamespaceMutation) Private() (r bool, exists bool)
- func (m *StatusNamespaceMutation) RemoveStatusIDs(ids ...gidx.PrefixedID)
- func (m *StatusNamespaceMutation) RemovedEdges() []string
- func (m *StatusNamespaceMutation) RemovedIDs(name string) []ent.Value
- func (m *StatusNamespaceMutation) RemovedStatusesIDs() (ids []gidx.PrefixedID)
- func (m *StatusNamespaceMutation) ResetCreatedAt()
- func (m *StatusNamespaceMutation) ResetEdge(name string) error
- func (m *StatusNamespaceMutation) ResetField(name string) error
- func (m *StatusNamespaceMutation) ResetName()
- func (m *StatusNamespaceMutation) ResetPrivate()
- func (m *StatusNamespaceMutation) ResetResourceProviderID()
- func (m *StatusNamespaceMutation) ResetStatuses()
- func (m *StatusNamespaceMutation) ResetUpdatedAt()
- func (m *StatusNamespaceMutation) ResourceProviderID() (r gidx.PrefixedID, exists bool)
- func (m *StatusNamespaceMutation) SetCreatedAt(t time.Time)
- func (m *StatusNamespaceMutation) SetField(name string, value ent.Value) error
- func (m *StatusNamespaceMutation) SetID(id gidx.PrefixedID)
- func (m *StatusNamespaceMutation) SetName(s string)
- func (m *StatusNamespaceMutation) SetOp(op Op)
- func (m *StatusNamespaceMutation) SetPrivate(b bool)
- func (m *StatusNamespaceMutation) SetResourceProviderID(gi gidx.PrefixedID)
- func (m *StatusNamespaceMutation) SetUpdatedAt(t time.Time)
- func (m *StatusNamespaceMutation) StatusesCleared() bool
- func (m *StatusNamespaceMutation) StatusesIDs() (ids []gidx.PrefixedID)
- func (m StatusNamespaceMutation) Tx() (*Tx, error)
- func (m *StatusNamespaceMutation) Type() string
- func (m *StatusNamespaceMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *StatusNamespaceMutation) Where(ps ...predicate.StatusNamespace)
- func (m *StatusNamespaceMutation) WhereP(ps ...func(*sql.Selector))
- type StatusNamespaceOrder
- type StatusNamespaceOrderField
- type StatusNamespacePaginateOption
- type StatusNamespaceQuery
- func (snq *StatusNamespaceQuery) Aggregate(fns ...AggregateFunc) *StatusNamespaceSelect
- func (snq *StatusNamespaceQuery) All(ctx context.Context) ([]*StatusNamespace, error)
- func (snq *StatusNamespaceQuery) AllX(ctx context.Context) []*StatusNamespace
- func (snq *StatusNamespaceQuery) Clone() *StatusNamespaceQuery
- func (sn *StatusNamespaceQuery) CollectFields(ctx context.Context, satisfies ...string) (*StatusNamespaceQuery, error)
- func (snq *StatusNamespaceQuery) Count(ctx context.Context) (int, error)
- func (snq *StatusNamespaceQuery) CountX(ctx context.Context) int
- func (snq *StatusNamespaceQuery) Exist(ctx context.Context) (bool, error)
- func (snq *StatusNamespaceQuery) ExistX(ctx context.Context) bool
- func (snq *StatusNamespaceQuery) First(ctx context.Context) (*StatusNamespace, error)
- func (snq *StatusNamespaceQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (snq *StatusNamespaceQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (snq *StatusNamespaceQuery) FirstX(ctx context.Context) *StatusNamespace
- func (snq *StatusNamespaceQuery) GroupBy(field string, fields ...string) *StatusNamespaceGroupBy
- func (snq *StatusNamespaceQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (snq *StatusNamespaceQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (snq *StatusNamespaceQuery) Limit(limit int) *StatusNamespaceQuery
- func (snq *StatusNamespaceQuery) Offset(offset int) *StatusNamespaceQuery
- func (snq *StatusNamespaceQuery) Only(ctx context.Context) (*StatusNamespace, error)
- func (snq *StatusNamespaceQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (snq *StatusNamespaceQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (snq *StatusNamespaceQuery) OnlyX(ctx context.Context) *StatusNamespace
- func (snq *StatusNamespaceQuery) Order(o ...statusnamespace.OrderOption) *StatusNamespaceQuery
- func (sn *StatusNamespaceQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*StatusNamespaceConnection, error)
- func (snq *StatusNamespaceQuery) QueryStatuses() *StatusQuery
- func (snq *StatusNamespaceQuery) Select(fields ...string) *StatusNamespaceSelect
- func (snq *StatusNamespaceQuery) Unique(unique bool) *StatusNamespaceQuery
- func (snq *StatusNamespaceQuery) Where(ps ...predicate.StatusNamespace) *StatusNamespaceQuery
- func (snq *StatusNamespaceQuery) WithNamedStatuses(name string, opts ...func(*StatusQuery)) *StatusNamespaceQuery
- func (snq *StatusNamespaceQuery) WithStatuses(opts ...func(*StatusQuery)) *StatusNamespaceQuery
- type StatusNamespaceSelect
- func (sns *StatusNamespaceSelect) Aggregate(fns ...AggregateFunc) *StatusNamespaceSelect
- func (s *StatusNamespaceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *StatusNamespaceSelect) BoolX(ctx context.Context) bool
- func (s *StatusNamespaceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *StatusNamespaceSelect) BoolsX(ctx context.Context) []bool
- func (s *StatusNamespaceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *StatusNamespaceSelect) Float64X(ctx context.Context) float64
- func (s *StatusNamespaceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *StatusNamespaceSelect) Float64sX(ctx context.Context) []float64
- func (s *StatusNamespaceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *StatusNamespaceSelect) IntX(ctx context.Context) int
- func (s *StatusNamespaceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *StatusNamespaceSelect) IntsX(ctx context.Context) []int
- func (sns *StatusNamespaceSelect) Scan(ctx context.Context, v any) error
- func (s *StatusNamespaceSelect) ScanX(ctx context.Context, v any)
- func (s *StatusNamespaceSelect) String(ctx context.Context) (_ string, err error)
- func (s *StatusNamespaceSelect) StringX(ctx context.Context) string
- func (s *StatusNamespaceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *StatusNamespaceSelect) StringsX(ctx context.Context) []string
- type StatusNamespaceUpdate
- func (snu *StatusNamespaceUpdate) AddStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceUpdate
- func (snu *StatusNamespaceUpdate) AddStatuses(s ...*Status) *StatusNamespaceUpdate
- func (snu *StatusNamespaceUpdate) ClearStatuses() *StatusNamespaceUpdate
- func (snu *StatusNamespaceUpdate) Exec(ctx context.Context) error
- func (snu *StatusNamespaceUpdate) ExecX(ctx context.Context)
- func (snu *StatusNamespaceUpdate) Mutation() *StatusNamespaceMutation
- func (snu *StatusNamespaceUpdate) RemoveStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceUpdate
- func (snu *StatusNamespaceUpdate) RemoveStatuses(s ...*Status) *StatusNamespaceUpdate
- func (snu *StatusNamespaceUpdate) Save(ctx context.Context) (int, error)
- func (snu *StatusNamespaceUpdate) SaveX(ctx context.Context) int
- func (c *StatusNamespaceUpdate) SetInput(i UpdateStatusNamespaceInput) *StatusNamespaceUpdate
- func (snu *StatusNamespaceUpdate) SetName(s string) *StatusNamespaceUpdate
- func (snu *StatusNamespaceUpdate) SetNillablePrivate(b *bool) *StatusNamespaceUpdate
- func (snu *StatusNamespaceUpdate) SetPrivate(b bool) *StatusNamespaceUpdate
- func (snu *StatusNamespaceUpdate) Where(ps ...predicate.StatusNamespace) *StatusNamespaceUpdate
- type StatusNamespaceUpdateOne
- func (snuo *StatusNamespaceUpdateOne) AddStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceUpdateOne
- func (snuo *StatusNamespaceUpdateOne) AddStatuses(s ...*Status) *StatusNamespaceUpdateOne
- func (snuo *StatusNamespaceUpdateOne) ClearStatuses() *StatusNamespaceUpdateOne
- func (snuo *StatusNamespaceUpdateOne) Exec(ctx context.Context) error
- func (snuo *StatusNamespaceUpdateOne) ExecX(ctx context.Context)
- func (snuo *StatusNamespaceUpdateOne) Mutation() *StatusNamespaceMutation
- func (snuo *StatusNamespaceUpdateOne) RemoveStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceUpdateOne
- func (snuo *StatusNamespaceUpdateOne) RemoveStatuses(s ...*Status) *StatusNamespaceUpdateOne
- func (snuo *StatusNamespaceUpdateOne) Save(ctx context.Context) (*StatusNamespace, error)
- func (snuo *StatusNamespaceUpdateOne) SaveX(ctx context.Context) *StatusNamespace
- func (snuo *StatusNamespaceUpdateOne) Select(field string, fields ...string) *StatusNamespaceUpdateOne
- func (c *StatusNamespaceUpdateOne) SetInput(i UpdateStatusNamespaceInput) *StatusNamespaceUpdateOne
- func (snuo *StatusNamespaceUpdateOne) SetName(s string) *StatusNamespaceUpdateOne
- func (snuo *StatusNamespaceUpdateOne) SetNillablePrivate(b *bool) *StatusNamespaceUpdateOne
- func (snuo *StatusNamespaceUpdateOne) SetPrivate(b bool) *StatusNamespaceUpdateOne
- func (snuo *StatusNamespaceUpdateOne) Where(ps ...predicate.StatusNamespace) *StatusNamespaceUpdateOne
- type StatusNamespaceWhereInput
- type StatusNamespaces
- type StatusOrder
- type StatusOrderField
- type StatusPaginateOption
- type StatusQuery
- func (sq *StatusQuery) Aggregate(fns ...AggregateFunc) *StatusSelect
- func (sq *StatusQuery) All(ctx context.Context) ([]*Status, error)
- func (sq *StatusQuery) AllX(ctx context.Context) []*Status
- func (sq *StatusQuery) Clone() *StatusQuery
- func (s *StatusQuery) CollectFields(ctx context.Context, satisfies ...string) (*StatusQuery, error)
- func (sq *StatusQuery) Count(ctx context.Context) (int, error)
- func (sq *StatusQuery) CountX(ctx context.Context) int
- func (sq *StatusQuery) Exist(ctx context.Context) (bool, error)
- func (sq *StatusQuery) ExistX(ctx context.Context) bool
- func (sq *StatusQuery) First(ctx context.Context) (*Status, error)
- func (sq *StatusQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (sq *StatusQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (sq *StatusQuery) FirstX(ctx context.Context) *Status
- func (sq *StatusQuery) GroupBy(field string, fields ...string) *StatusGroupBy
- func (sq *StatusQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (sq *StatusQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (sq *StatusQuery) Limit(limit int) *StatusQuery
- func (sq *StatusQuery) Offset(offset int) *StatusQuery
- func (sq *StatusQuery) Only(ctx context.Context) (*Status, error)
- func (sq *StatusQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (sq *StatusQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (sq *StatusQuery) OnlyX(ctx context.Context) *Status
- func (sq *StatusQuery) Order(o ...status.OrderOption) *StatusQuery
- func (s *StatusQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*StatusConnection, error)
- func (sq *StatusQuery) QueryMetadata() *MetadataQuery
- func (sq *StatusQuery) QueryNamespace() *StatusNamespaceQuery
- func (sq *StatusQuery) Select(fields ...string) *StatusSelect
- func (sq *StatusQuery) Unique(unique bool) *StatusQuery
- func (sq *StatusQuery) Where(ps ...predicate.Status) *StatusQuery
- func (sq *StatusQuery) WithMetadata(opts ...func(*MetadataQuery)) *StatusQuery
- func (sq *StatusQuery) WithNamespace(opts ...func(*StatusNamespaceQuery)) *StatusQuery
- type StatusSelect
- func (ss *StatusSelect) Aggregate(fns ...AggregateFunc) *StatusSelect
- func (s *StatusSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *StatusSelect) BoolX(ctx context.Context) bool
- func (s *StatusSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *StatusSelect) BoolsX(ctx context.Context) []bool
- func (s *StatusSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *StatusSelect) Float64X(ctx context.Context) float64
- func (s *StatusSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *StatusSelect) Float64sX(ctx context.Context) []float64
- func (s *StatusSelect) Int(ctx context.Context) (_ int, err error)
- func (s *StatusSelect) IntX(ctx context.Context) int
- func (s *StatusSelect) Ints(ctx context.Context) ([]int, error)
- func (s *StatusSelect) IntsX(ctx context.Context) []int
- func (ss *StatusSelect) Scan(ctx context.Context, v any) error
- func (s *StatusSelect) ScanX(ctx context.Context, v any)
- func (s *StatusSelect) String(ctx context.Context) (_ string, err error)
- func (s *StatusSelect) StringX(ctx context.Context) string
- func (s *StatusSelect) Strings(ctx context.Context) ([]string, error)
- func (s *StatusSelect) StringsX(ctx context.Context) []string
- type StatusSlice
- type StatusUpdate
- func (su *StatusUpdate) AppendData(jm json.RawMessage) *StatusUpdate
- func (su *StatusUpdate) Exec(ctx context.Context) error
- func (su *StatusUpdate) ExecX(ctx context.Context)
- func (su *StatusUpdate) Mutation() *StatusMutation
- func (su *StatusUpdate) Save(ctx context.Context) (int, error)
- func (su *StatusUpdate) SaveX(ctx context.Context) int
- func (su *StatusUpdate) SetData(jm json.RawMessage) *StatusUpdate
- func (c *StatusUpdate) SetInput(i UpdateStatusInput) *StatusUpdate
- func (su *StatusUpdate) Where(ps ...predicate.Status) *StatusUpdate
- type StatusUpdateOne
- func (suo *StatusUpdateOne) AppendData(jm json.RawMessage) *StatusUpdateOne
- func (suo *StatusUpdateOne) Exec(ctx context.Context) error
- func (suo *StatusUpdateOne) ExecX(ctx context.Context)
- func (suo *StatusUpdateOne) Mutation() *StatusMutation
- func (suo *StatusUpdateOne) Save(ctx context.Context) (*Status, error)
- func (suo *StatusUpdateOne) SaveX(ctx context.Context) *Status
- func (suo *StatusUpdateOne) Select(field string, fields ...string) *StatusUpdateOne
- func (suo *StatusUpdateOne) SetData(jm json.RawMessage) *StatusUpdateOne
- func (c *StatusUpdateOne) SetInput(i UpdateStatusInput) *StatusUpdateOne
- func (suo *StatusUpdateOne) Where(ps ...predicate.Status) *StatusUpdateOne
- type StatusWhereInput
- type TraverseFunc
- type Traverser
- type Tx
- type UpdateAnnotationNamespaceInput
- type UpdateStatusInput
- type UpdateStatusNamespaceInput
- 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. TypeAnnotation = "Annotation" TypeAnnotationNamespace = "AnnotationNamespace" TypeMetadata = "Metadata" TypeStatus = "Status" TypeStatusNamespace = "StatusNamespace" )
Variables ¶
var ( // AnnotationOrderFieldCreatedAt orders Annotation by created_at. AnnotationOrderFieldCreatedAt = &AnnotationOrderField{ Value: func(a *Annotation) (ent.Value, error) { return a.CreatedAt, nil }, column: annotation.FieldCreatedAt, toTerm: annotation.ByCreatedAt, toCursor: func(a *Annotation) Cursor { return Cursor{ ID: a.ID, Value: a.CreatedAt, } }, } // AnnotationOrderFieldUpdatedAt orders Annotation by updated_at. AnnotationOrderFieldUpdatedAt = &AnnotationOrderField{ Value: func(a *Annotation) (ent.Value, error) { return a.UpdatedAt, nil }, column: annotation.FieldUpdatedAt, toTerm: annotation.ByUpdatedAt, toCursor: func(a *Annotation) Cursor { return Cursor{ ID: a.ID, Value: a.UpdatedAt, } }, } )
var ( // AnnotationNamespaceOrderFieldID orders AnnotationNamespace by id. AnnotationNamespaceOrderFieldID = &AnnotationNamespaceOrderField{ Value: func(an *AnnotationNamespace) (ent.Value, error) { return an.ID, nil }, column: annotationnamespace.FieldID, toTerm: annotationnamespace.ByID, toCursor: func(an *AnnotationNamespace) Cursor { return Cursor{ ID: an.ID, Value: an.ID, } }, } // AnnotationNamespaceOrderFieldCreatedAt orders AnnotationNamespace by created_at. AnnotationNamespaceOrderFieldCreatedAt = &AnnotationNamespaceOrderField{ Value: func(an *AnnotationNamespace) (ent.Value, error) { return an.CreatedAt, nil }, column: annotationnamespace.FieldCreatedAt, toTerm: annotationnamespace.ByCreatedAt, toCursor: func(an *AnnotationNamespace) Cursor { return Cursor{ ID: an.ID, Value: an.CreatedAt, } }, } // AnnotationNamespaceOrderFieldUpdatedAt orders AnnotationNamespace by updated_at. AnnotationNamespaceOrderFieldUpdatedAt = &AnnotationNamespaceOrderField{ Value: func(an *AnnotationNamespace) (ent.Value, error) { return an.UpdatedAt, nil }, column: annotationnamespace.FieldUpdatedAt, toTerm: annotationnamespace.ByUpdatedAt, toCursor: func(an *AnnotationNamespace) Cursor { return Cursor{ ID: an.ID, Value: an.UpdatedAt, } }, } // AnnotationNamespaceOrderFieldName orders AnnotationNamespace by name. AnnotationNamespaceOrderFieldName = &AnnotationNamespaceOrderField{ Value: func(an *AnnotationNamespace) (ent.Value, error) { return an.Name, nil }, column: annotationnamespace.FieldName, toTerm: annotationnamespace.ByName, toCursor: func(an *AnnotationNamespace) Cursor { return Cursor{ ID: an.ID, Value: an.Name, } }, } // AnnotationNamespaceOrderFieldOwnerID orders AnnotationNamespace by owner_id. AnnotationNamespaceOrderFieldOwnerID = &AnnotationNamespaceOrderField{ Value: func(an *AnnotationNamespace) (ent.Value, error) { return an.OwnerID, nil }, column: annotationnamespace.FieldOwnerID, toTerm: annotationnamespace.ByOwnerID, toCursor: func(an *AnnotationNamespace) Cursor { return Cursor{ ID: an.ID, Value: an.OwnerID, } }, } // AnnotationNamespaceOrderFieldPrivate orders AnnotationNamespace by private. AnnotationNamespaceOrderFieldPrivate = &AnnotationNamespaceOrderField{ Value: func(an *AnnotationNamespace) (ent.Value, error) { return an.Private, nil }, column: annotationnamespace.FieldPrivate, toTerm: annotationnamespace.ByPrivate, toCursor: func(an *AnnotationNamespace) Cursor { return Cursor{ ID: an.ID, Value: an.Private, } }, } )
var ( // MetadataOrderFieldCreatedAt orders Metadata by created_at. MetadataOrderFieldCreatedAt = &MetadataOrderField{ Value: func(m *Metadata) (ent.Value, error) { return m.CreatedAt, nil }, column: metadata.FieldCreatedAt, toTerm: metadata.ByCreatedAt, toCursor: func(m *Metadata) Cursor { return Cursor{ ID: m.ID, Value: m.CreatedAt, } }, } // MetadataOrderFieldUpdatedAt orders Metadata by updated_at. MetadataOrderFieldUpdatedAt = &MetadataOrderField{ Value: func(m *Metadata) (ent.Value, error) { return m.UpdatedAt, nil }, column: metadata.FieldUpdatedAt, toTerm: metadata.ByUpdatedAt, toCursor: func(m *Metadata) Cursor { return Cursor{ ID: m.ID, Value: m.UpdatedAt, } }, } )
var ( // StatusOrderFieldCreatedAt orders Status by created_at. StatusOrderFieldCreatedAt = &StatusOrderField{ Value: func(s *Status) (ent.Value, error) { return s.CreatedAt, nil }, column: status.FieldCreatedAt, toTerm: status.ByCreatedAt, toCursor: func(s *Status) Cursor { return Cursor{ ID: s.ID, Value: s.CreatedAt, } }, } // StatusOrderFieldUpdatedAt orders Status by updated_at. StatusOrderFieldUpdatedAt = &StatusOrderField{ Value: func(s *Status) (ent.Value, error) { return s.UpdatedAt, nil }, column: status.FieldUpdatedAt, toTerm: status.ByUpdatedAt, toCursor: func(s *Status) Cursor { return Cursor{ ID: s.ID, Value: s.UpdatedAt, } }, } )
var ( // StatusNamespaceOrderFieldID orders StatusNamespace by id. StatusNamespaceOrderFieldID = &StatusNamespaceOrderField{ Value: func(sn *StatusNamespace) (ent.Value, error) { return sn.ID, nil }, column: statusnamespace.FieldID, toTerm: statusnamespace.ByID, toCursor: func(sn *StatusNamespace) Cursor { return Cursor{ ID: sn.ID, Value: sn.ID, } }, } // StatusNamespaceOrderFieldCreatedAt orders StatusNamespace by created_at. StatusNamespaceOrderFieldCreatedAt = &StatusNamespaceOrderField{ Value: func(sn *StatusNamespace) (ent.Value, error) { return sn.CreatedAt, nil }, column: statusnamespace.FieldCreatedAt, toTerm: statusnamespace.ByCreatedAt, toCursor: func(sn *StatusNamespace) Cursor { return Cursor{ ID: sn.ID, Value: sn.CreatedAt, } }, } // StatusNamespaceOrderFieldUpdatedAt orders StatusNamespace by updated_at. StatusNamespaceOrderFieldUpdatedAt = &StatusNamespaceOrderField{ Value: func(sn *StatusNamespace) (ent.Value, error) { return sn.UpdatedAt, nil }, column: statusnamespace.FieldUpdatedAt, toTerm: statusnamespace.ByUpdatedAt, toCursor: func(sn *StatusNamespace) Cursor { return Cursor{ ID: sn.ID, Value: sn.UpdatedAt, } }, } // StatusNamespaceOrderFieldName orders StatusNamespace by name. StatusNamespaceOrderFieldName = &StatusNamespaceOrderField{ Value: func(sn *StatusNamespace) (ent.Value, error) { return sn.Name, nil }, column: statusnamespace.FieldName, toTerm: statusnamespace.ByName, toCursor: func(sn *StatusNamespace) Cursor { return Cursor{ ID: sn.ID, Value: sn.Name, } }, } // StatusNamespaceOrderFieldResourceProviderID orders StatusNamespace by resource_provider_id. StatusNamespaceOrderFieldResourceProviderID = &StatusNamespaceOrderField{ Value: func(sn *StatusNamespace) (ent.Value, error) { return sn.ResourceProviderID, nil }, column: statusnamespace.FieldResourceProviderID, toTerm: statusnamespace.ByResourceProviderID, toCursor: func(sn *StatusNamespace) Cursor { return Cursor{ ID: sn.ID, Value: sn.ResourceProviderID, } }, } // StatusNamespaceOrderFieldPrivate orders StatusNamespace by private. StatusNamespaceOrderFieldPrivate = &StatusNamespaceOrderField{ Value: func(sn *StatusNamespace) (ent.Value, error) { return sn.Private, nil }, column: statusnamespace.FieldPrivate, toTerm: statusnamespace.ByPrivate, toCursor: func(sn *StatusNamespace) Cursor { return Cursor{ ID: sn.ID, Value: sn.Private, } }, } )
var DefaultAnnotationNamespaceOrder = &AnnotationNamespaceOrder{ Direction: entgql.OrderDirectionAsc, Field: &AnnotationNamespaceOrderField{ Value: func(an *AnnotationNamespace) (ent.Value, error) { return an.ID, nil }, column: annotationnamespace.FieldID, toTerm: annotationnamespace.ByID, toCursor: func(an *AnnotationNamespace) Cursor { return Cursor{ID: an.ID} }, }, }
DefaultAnnotationNamespaceOrder is the default ordering of AnnotationNamespace.
var DefaultAnnotationOrder = &AnnotationOrder{ Direction: entgql.OrderDirectionAsc, Field: &AnnotationOrderField{ Value: func(a *Annotation) (ent.Value, error) { return a.ID, nil }, column: annotation.FieldID, toTerm: annotation.ByID, toCursor: func(a *Annotation) Cursor { return Cursor{ID: a.ID} }, }, }
DefaultAnnotationOrder is the default ordering of Annotation.
var DefaultMetadataOrder = &MetadataOrder{ Direction: entgql.OrderDirectionAsc, Field: &MetadataOrderField{ Value: func(m *Metadata) (ent.Value, error) { return m.ID, nil }, column: metadata.FieldID, toTerm: metadata.ByID, toCursor: func(m *Metadata) Cursor { return Cursor{ID: m.ID} }, }, }
DefaultMetadataOrder is the default ordering of Metadata.
var DefaultStatusNamespaceOrder = &StatusNamespaceOrder{ Direction: entgql.OrderDirectionAsc, Field: &StatusNamespaceOrderField{ Value: func(sn *StatusNamespace) (ent.Value, error) { return sn.ID, nil }, column: statusnamespace.FieldID, toTerm: statusnamespace.ByID, toCursor: func(sn *StatusNamespace) Cursor { return Cursor{ID: sn.ID} }, }, }
DefaultStatusNamespaceOrder is the default ordering of StatusNamespace.
var DefaultStatusOrder = &StatusOrder{ Direction: entgql.OrderDirectionAsc, Field: &StatusOrderField{ Value: func(s *Status) (ent.Value, error) { return s.ID, nil }, column: status.FieldID, toTerm: status.ByID, toCursor: func(s *Status) Cursor { return Cursor{ID: s.ID} }, }, }
DefaultStatusOrder is the default ordering of Status.
var ErrEmptyAnnotationNamespaceWhereInput = errors.New("generated: empty predicate AnnotationNamespaceWhereInput")
ErrEmptyAnnotationNamespaceWhereInput is returned in case the AnnotationNamespaceWhereInput is empty.
var ErrEmptyAnnotationWhereInput = errors.New("generated: empty predicate AnnotationWhereInput")
ErrEmptyAnnotationWhereInput is returned in case the AnnotationWhereInput is empty.
var ErrEmptyMetadataWhereInput = errors.New("generated: empty predicate MetadataWhereInput")
ErrEmptyMetadataWhereInput is returned in case the MetadataWhereInput is empty.
var ErrEmptyStatusNamespaceWhereInput = errors.New("generated: empty predicate StatusNamespaceWhereInput")
ErrEmptyStatusNamespaceWhereInput is returned in case the StatusNamespaceWhereInput is empty.
var ErrEmptyStatusWhereInput = errors.New("generated: empty predicate StatusWhereInput")
ErrEmptyStatusWhereInput is returned in case the StatusWhereInput is empty.
var ErrTxStarted = errors.New("generated: 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.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx 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(generated.As(generated.Sum(field1), "sum_field1"), (generated.As(generated.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 Annotation ¶
type Annotation struct { // ID of the ent. // ID for the annotation. ID gidx.PrefixedID `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"` // ID of the metadata of this annotation MetadataID gidx.PrefixedID `json:"metadata_id,omitempty"` // ID of the AnnotationNamespace of this annotation. AnnotationNamespaceID gidx.PrefixedID `json:"annotation_namespace_id,omitempty"` // JSON formatted data of this annotation. Data json.RawMessage `json:"data,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AnnotationQuery when eager-loading is set. Edges AnnotationEdges `json:"edges"` // contains filtered or unexported fields }
Annotation is the model entity for the Annotation schema.
func (*Annotation) IsNode ¶
func (n *Annotation) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Annotation) Namespace ¶
func (a *Annotation) Namespace(ctx context.Context) (*AnnotationNamespace, error)
func (*Annotation) QueryMetadata ¶
func (a *Annotation) QueryMetadata() *MetadataQuery
QueryMetadata queries the "metadata" edge of the Annotation entity.
func (*Annotation) QueryNamespace ¶
func (a *Annotation) QueryNamespace() *AnnotationNamespaceQuery
QueryNamespace queries the "namespace" edge of the Annotation entity.
func (*Annotation) String ¶
func (a *Annotation) String() string
String implements the fmt.Stringer.
func (*Annotation) ToEdge ¶
func (a *Annotation) ToEdge(order *AnnotationOrder) *AnnotationEdge
ToEdge converts Annotation into AnnotationEdge.
func (*Annotation) Unwrap ¶
func (a *Annotation) Unwrap() *Annotation
Unwrap unwraps the Annotation 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 (*Annotation) Update ¶
func (a *Annotation) Update() *AnnotationUpdateOne
Update returns a builder for updating this Annotation. Note that you need to call Annotation.Unwrap() before calling this method if this Annotation was returned from a transaction, and the transaction was committed or rolled back.
type AnnotationClient ¶
type AnnotationClient struct {
// contains filtered or unexported fields
}
AnnotationClient is a client for the Annotation schema.
func NewAnnotationClient ¶
func NewAnnotationClient(c config) *AnnotationClient
NewAnnotationClient returns a client for the Annotation from the given config.
func (*AnnotationClient) Create ¶
func (c *AnnotationClient) Create() *AnnotationCreate
Create returns a builder for creating a Annotation entity.
func (*AnnotationClient) CreateBulk ¶
func (c *AnnotationClient) CreateBulk(builders ...*AnnotationCreate) *AnnotationCreateBulk
CreateBulk returns a builder for creating a bulk of Annotation entities.
func (*AnnotationClient) Delete ¶
func (c *AnnotationClient) Delete() *AnnotationDelete
Delete returns a delete builder for Annotation.
func (*AnnotationClient) DeleteOne ¶
func (c *AnnotationClient) DeleteOne(a *Annotation) *AnnotationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AnnotationClient) DeleteOneID ¶
func (c *AnnotationClient) DeleteOneID(id gidx.PrefixedID) *AnnotationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AnnotationClient) Get ¶
func (c *AnnotationClient) Get(ctx context.Context, id gidx.PrefixedID) (*Annotation, error)
Get returns a Annotation entity by its id.
func (*AnnotationClient) GetX ¶
func (c *AnnotationClient) GetX(ctx context.Context, id gidx.PrefixedID) *Annotation
GetX is like Get, but panics if an error occurs.
func (*AnnotationClient) Hooks ¶
func (c *AnnotationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AnnotationClient) Intercept ¶
func (c *AnnotationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `annotation.Intercept(f(g(h())))`.
func (*AnnotationClient) Interceptors ¶
func (c *AnnotationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AnnotationClient) MapCreateBulk ¶ added in v0.0.2
func (c *AnnotationClient) MapCreateBulk(slice any, setFunc func(*AnnotationCreate, int)) *AnnotationCreateBulk
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 (*AnnotationClient) Query ¶
func (c *AnnotationClient) Query() *AnnotationQuery
Query returns a query builder for Annotation.
func (*AnnotationClient) QueryMetadata ¶
func (c *AnnotationClient) QueryMetadata(a *Annotation) *MetadataQuery
QueryMetadata queries the metadata edge of a Annotation.
func (*AnnotationClient) QueryNamespace ¶
func (c *AnnotationClient) QueryNamespace(a *Annotation) *AnnotationNamespaceQuery
QueryNamespace queries the namespace edge of a Annotation.
func (*AnnotationClient) Update ¶
func (c *AnnotationClient) Update() *AnnotationUpdate
Update returns an update builder for Annotation.
func (*AnnotationClient) UpdateOne ¶
func (c *AnnotationClient) UpdateOne(a *Annotation) *AnnotationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AnnotationClient) UpdateOneID ¶
func (c *AnnotationClient) UpdateOneID(id gidx.PrefixedID) *AnnotationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AnnotationClient) Use ¶
func (c *AnnotationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `annotation.Hooks(f(g(h())))`.
type AnnotationConnection ¶
type AnnotationConnection struct { Edges []*AnnotationEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
AnnotationConnection is the connection containing edges to Annotation.
type AnnotationCreate ¶
type AnnotationCreate struct {
// contains filtered or unexported fields
}
AnnotationCreate is the builder for creating a Annotation entity.
func (*AnnotationCreate) Exec ¶
func (ac *AnnotationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AnnotationCreate) ExecX ¶
func (ac *AnnotationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationCreate) Mutation ¶
func (ac *AnnotationCreate) Mutation() *AnnotationMutation
Mutation returns the AnnotationMutation object of the builder.
func (*AnnotationCreate) Save ¶
func (ac *AnnotationCreate) Save(ctx context.Context) (*Annotation, error)
Save creates the Annotation in the database.
func (*AnnotationCreate) SaveX ¶
func (ac *AnnotationCreate) SaveX(ctx context.Context) *Annotation
SaveX calls Save and panics if Save returns an error.
func (*AnnotationCreate) SetAnnotationNamespaceID ¶
func (ac *AnnotationCreate) SetAnnotationNamespaceID(gi gidx.PrefixedID) *AnnotationCreate
SetAnnotationNamespaceID sets the "annotation_namespace_id" field.
func (*AnnotationCreate) SetCreatedAt ¶
func (ac *AnnotationCreate) SetCreatedAt(t time.Time) *AnnotationCreate
SetCreatedAt sets the "created_at" field.
func (*AnnotationCreate) SetData ¶
func (ac *AnnotationCreate) SetData(jm json.RawMessage) *AnnotationCreate
SetData sets the "data" field.
func (*AnnotationCreate) SetID ¶
func (ac *AnnotationCreate) SetID(gi gidx.PrefixedID) *AnnotationCreate
SetID sets the "id" field.
func (*AnnotationCreate) SetMetadata ¶
func (ac *AnnotationCreate) SetMetadata(m *Metadata) *AnnotationCreate
SetMetadata sets the "metadata" edge to the Metadata entity.
func (*AnnotationCreate) SetMetadataID ¶
func (ac *AnnotationCreate) SetMetadataID(gi gidx.PrefixedID) *AnnotationCreate
SetMetadataID sets the "metadata_id" field.
func (*AnnotationCreate) SetNamespace ¶
func (ac *AnnotationCreate) SetNamespace(a *AnnotationNamespace) *AnnotationCreate
SetNamespace sets the "namespace" edge to the AnnotationNamespace entity.
func (*AnnotationCreate) SetNamespaceID ¶
func (ac *AnnotationCreate) SetNamespaceID(id gidx.PrefixedID) *AnnotationCreate
SetNamespaceID sets the "namespace" edge to the AnnotationNamespace entity by ID.
func (*AnnotationCreate) SetNillableCreatedAt ¶
func (ac *AnnotationCreate) SetNillableCreatedAt(t *time.Time) *AnnotationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AnnotationCreate) SetNillableID ¶
func (ac *AnnotationCreate) SetNillableID(gi *gidx.PrefixedID) *AnnotationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AnnotationCreate) SetNillableUpdatedAt ¶
func (ac *AnnotationCreate) SetNillableUpdatedAt(t *time.Time) *AnnotationCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*AnnotationCreate) SetUpdatedAt ¶
func (ac *AnnotationCreate) SetUpdatedAt(t time.Time) *AnnotationCreate
SetUpdatedAt sets the "updated_at" field.
type AnnotationCreateBulk ¶
type AnnotationCreateBulk struct {
// contains filtered or unexported fields
}
AnnotationCreateBulk is the builder for creating many Annotation entities in bulk.
func (*AnnotationCreateBulk) Exec ¶
func (acb *AnnotationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AnnotationCreateBulk) ExecX ¶
func (acb *AnnotationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationCreateBulk) Save ¶
func (acb *AnnotationCreateBulk) Save(ctx context.Context) ([]*Annotation, error)
Save creates the Annotation entities in the database.
func (*AnnotationCreateBulk) SaveX ¶
func (acb *AnnotationCreateBulk) SaveX(ctx context.Context) []*Annotation
SaveX is like Save, but panics if an error occurs.
type AnnotationDelete ¶
type AnnotationDelete struct {
// contains filtered or unexported fields
}
AnnotationDelete is the builder for deleting a Annotation entity.
func (*AnnotationDelete) Exec ¶
func (ad *AnnotationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AnnotationDelete) ExecX ¶
func (ad *AnnotationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationDelete) Where ¶
func (ad *AnnotationDelete) Where(ps ...predicate.Annotation) *AnnotationDelete
Where appends a list predicates to the AnnotationDelete builder.
type AnnotationDeleteOne ¶
type AnnotationDeleteOne struct {
// contains filtered or unexported fields
}
AnnotationDeleteOne is the builder for deleting a single Annotation entity.
func (*AnnotationDeleteOne) Exec ¶
func (ado *AnnotationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AnnotationDeleteOne) ExecX ¶
func (ado *AnnotationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationDeleteOne) Where ¶
func (ado *AnnotationDeleteOne) Where(ps ...predicate.Annotation) *AnnotationDeleteOne
Where appends a list predicates to the AnnotationDelete builder.
type AnnotationEdge ¶
type AnnotationEdge struct { Node *Annotation `json:"node"` Cursor Cursor `json:"cursor"` }
AnnotationEdge is the edge representation of Annotation.
type AnnotationEdges ¶
type AnnotationEdges struct { // Namespace holds the value of the namespace edge. Namespace *AnnotationNamespace `json:"namespace,omitempty"` // Metadata holds the value of the metadata edge. Metadata *Metadata `json:"metadata,omitempty"` // contains filtered or unexported fields }
AnnotationEdges holds the relations/edges for other nodes in the graph.
func (AnnotationEdges) MetadataOrErr ¶
func (e AnnotationEdges) MetadataOrErr() (*Metadata, error)
MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (AnnotationEdges) NamespaceOrErr ¶
func (e AnnotationEdges) NamespaceOrErr() (*AnnotationNamespace, error)
NamespaceOrErr returns the Namespace value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AnnotationGroupBy ¶
type AnnotationGroupBy struct {
// contains filtered or unexported fields
}
AnnotationGroupBy is the group-by builder for Annotation entities.
func (*AnnotationGroupBy) Aggregate ¶
func (agb *AnnotationGroupBy) Aggregate(fns ...AggregateFunc) *AnnotationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AnnotationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AnnotationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AnnotationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AnnotationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AnnotationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AnnotationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AnnotationGroupBy) Scan ¶
func (agb *AnnotationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AnnotationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AnnotationMutation ¶
type AnnotationMutation struct {
// contains filtered or unexported fields
}
AnnotationMutation represents an operation that mutates the Annotation nodes in the graph.
func (*AnnotationMutation) AddField ¶
func (m *AnnotationMutation) 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 (*AnnotationMutation) AddedEdges ¶
func (m *AnnotationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AnnotationMutation) AddedField ¶
func (m *AnnotationMutation) 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 (*AnnotationMutation) AddedFields ¶
func (m *AnnotationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AnnotationMutation) AddedIDs ¶
func (m *AnnotationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AnnotationMutation) AnnotationNamespaceID ¶
func (m *AnnotationMutation) AnnotationNamespaceID() (r gidx.PrefixedID, exists bool)
AnnotationNamespaceID returns the value of the "annotation_namespace_id" field in the mutation.
func (*AnnotationMutation) AppendData ¶
func (m *AnnotationMutation) AppendData(jm json.RawMessage)
AppendData adds jm to the "data" field.
func (*AnnotationMutation) AppendedData ¶
func (m *AnnotationMutation) AppendedData() (json.RawMessage, bool)
AppendedData returns the list of values that were appended to the "data" field in this mutation.
func (*AnnotationMutation) ClearEdge ¶
func (m *AnnotationMutation) 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 (*AnnotationMutation) ClearField ¶
func (m *AnnotationMutation) 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 (*AnnotationMutation) ClearMetadata ¶
func (m *AnnotationMutation) ClearMetadata()
ClearMetadata clears the "metadata" edge to the Metadata entity.
func (*AnnotationMutation) ClearNamespace ¶
func (m *AnnotationMutation) ClearNamespace()
ClearNamespace clears the "namespace" edge to the AnnotationNamespace entity.
func (*AnnotationMutation) ClearedEdges ¶
func (m *AnnotationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AnnotationMutation) ClearedFields ¶
func (m *AnnotationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AnnotationMutation) Client ¶
func (m AnnotationMutation) 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 (*AnnotationMutation) CreatedAt ¶
func (m *AnnotationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AnnotationMutation) Data ¶
func (m *AnnotationMutation) Data() (r json.RawMessage, exists bool)
Data returns the value of the "data" field in the mutation.
func (*AnnotationMutation) EdgeCleared ¶
func (m *AnnotationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AnnotationMutation) Field ¶
func (m *AnnotationMutation) 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 (*AnnotationMutation) FieldCleared ¶
func (m *AnnotationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AnnotationMutation) Fields ¶
func (m *AnnotationMutation) 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 (*AnnotationMutation) ID ¶
func (m *AnnotationMutation) ID() (id gidx.PrefixedID, 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 (*AnnotationMutation) IDs ¶
func (m *AnnotationMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, 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 (*AnnotationMutation) MetadataCleared ¶
func (m *AnnotationMutation) MetadataCleared() bool
MetadataCleared reports if the "metadata" edge to the Metadata entity was cleared.
func (*AnnotationMutation) MetadataID ¶
func (m *AnnotationMutation) MetadataID() (r gidx.PrefixedID, exists bool)
MetadataID returns the value of the "metadata_id" field in the mutation.
func (*AnnotationMutation) MetadataIDs ¶
func (m *AnnotationMutation) MetadataIDs() (ids []gidx.PrefixedID)
MetadataIDs returns the "metadata" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MetadataID instead. It exists only for internal usage by the builders.
func (*AnnotationMutation) NamespaceCleared ¶
func (m *AnnotationMutation) NamespaceCleared() bool
NamespaceCleared reports if the "namespace" edge to the AnnotationNamespace entity was cleared.
func (*AnnotationMutation) NamespaceID ¶
func (m *AnnotationMutation) NamespaceID() (id gidx.PrefixedID, exists bool)
NamespaceID returns the "namespace" edge ID in the mutation.
func (*AnnotationMutation) NamespaceIDs ¶
func (m *AnnotationMutation) NamespaceIDs() (ids []gidx.PrefixedID)
NamespaceIDs returns the "namespace" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NamespaceID instead. It exists only for internal usage by the builders.
func (*AnnotationMutation) OldAnnotationNamespaceID ¶
func (m *AnnotationMutation) OldAnnotationNamespaceID(ctx context.Context) (v gidx.PrefixedID, err error)
OldAnnotationNamespaceID returns the old "annotation_namespace_id" field's value of the Annotation entity. If the Annotation 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 (*AnnotationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Annotation entity. If the Annotation 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 (*AnnotationMutation) OldData ¶
func (m *AnnotationMutation) OldData(ctx context.Context) (v json.RawMessage, err error)
OldData returns the old "data" field's value of the Annotation entity. If the Annotation 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 (*AnnotationMutation) 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 (*AnnotationMutation) OldMetadataID ¶
func (m *AnnotationMutation) OldMetadataID(ctx context.Context) (v gidx.PrefixedID, err error)
OldMetadataID returns the old "metadata_id" field's value of the Annotation entity. If the Annotation 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 (*AnnotationMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Annotation entity. If the Annotation 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 (*AnnotationMutation) RemovedEdges ¶
func (m *AnnotationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AnnotationMutation) RemovedIDs ¶
func (m *AnnotationMutation) 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 (*AnnotationMutation) ResetAnnotationNamespaceID ¶
func (m *AnnotationMutation) ResetAnnotationNamespaceID()
ResetAnnotationNamespaceID resets all changes to the "annotation_namespace_id" field.
func (*AnnotationMutation) ResetCreatedAt ¶
func (m *AnnotationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AnnotationMutation) ResetData ¶
func (m *AnnotationMutation) ResetData()
ResetData resets all changes to the "data" field.
func (*AnnotationMutation) ResetEdge ¶
func (m *AnnotationMutation) 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 (*AnnotationMutation) ResetField ¶
func (m *AnnotationMutation) 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 (*AnnotationMutation) ResetMetadata ¶
func (m *AnnotationMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" edge.
func (*AnnotationMutation) ResetMetadataID ¶
func (m *AnnotationMutation) ResetMetadataID()
ResetMetadataID resets all changes to the "metadata_id" field.
func (*AnnotationMutation) ResetNamespace ¶
func (m *AnnotationMutation) ResetNamespace()
ResetNamespace resets all changes to the "namespace" edge.
func (*AnnotationMutation) ResetUpdatedAt ¶
func (m *AnnotationMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AnnotationMutation) SetAnnotationNamespaceID ¶
func (m *AnnotationMutation) SetAnnotationNamespaceID(gi gidx.PrefixedID)
SetAnnotationNamespaceID sets the "annotation_namespace_id" field.
func (*AnnotationMutation) SetCreatedAt ¶
func (m *AnnotationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AnnotationMutation) SetData ¶
func (m *AnnotationMutation) SetData(jm json.RawMessage)
SetData sets the "data" field.
func (*AnnotationMutation) SetField ¶
func (m *AnnotationMutation) 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 (*AnnotationMutation) SetID ¶
func (m *AnnotationMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Annotation entities.
func (*AnnotationMutation) SetMetadataID ¶
func (m *AnnotationMutation) SetMetadataID(gi gidx.PrefixedID)
SetMetadataID sets the "metadata_id" field.
func (*AnnotationMutation) SetNamespaceID ¶
func (m *AnnotationMutation) SetNamespaceID(id gidx.PrefixedID)
SetNamespaceID sets the "namespace" edge to the AnnotationNamespace entity by id.
func (*AnnotationMutation) SetOp ¶
func (m *AnnotationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AnnotationMutation) SetUpdatedAt ¶
func (m *AnnotationMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (AnnotationMutation) Tx ¶
func (m AnnotationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AnnotationMutation) Type ¶
func (m *AnnotationMutation) Type() string
Type returns the node type of this mutation (Annotation).
func (*AnnotationMutation) UpdatedAt ¶
func (m *AnnotationMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AnnotationMutation) Where ¶
func (m *AnnotationMutation) Where(ps ...predicate.Annotation)
Where appends a list predicates to the AnnotationMutation builder.
func (*AnnotationMutation) WhereP ¶
func (m *AnnotationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AnnotationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AnnotationNamespace ¶
type AnnotationNamespace struct { // ID of the ent. // The ID for the annotation namespace. ID gidx.PrefixedID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // The name of the annotation namespace. Name string `json:"name,omitempty"` // The ID for the owner for this annotation namespace. OwnerID gidx.PrefixedID `json:"owner_id,omitempty"` // Flag for if this namespace is private. Private bool `json:"private,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AnnotationNamespaceQuery when eager-loading is set. Edges AnnotationNamespaceEdges `json:"edges"` // contains filtered or unexported fields }
Representation of an annotation namespace. Annotation namespaces are used group annotation data that is provided by the same source and uses the same schema.
func (*AnnotationNamespace) Annotations ¶
func (an *AnnotationNamespace) Annotations(ctx context.Context) (result []*Annotation, err error)
func (AnnotationNamespace) IsEntity ¶
func (an AnnotationNamespace) IsEntity()
IsEntity implement fedruntime.Entity
func (*AnnotationNamespace) IsNode ¶
func (n *AnnotationNamespace) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*AnnotationNamespace) NamedAnnotations ¶
func (an *AnnotationNamespace) NamedAnnotations(name string) ([]*Annotation, error)
NamedAnnotations returns the Annotations named value or an error if the edge was not loaded in eager-loading with this name.
func (*AnnotationNamespace) QueryAnnotations ¶
func (an *AnnotationNamespace) QueryAnnotations() *AnnotationQuery
QueryAnnotations queries the "annotations" edge of the AnnotationNamespace entity.
func (*AnnotationNamespace) String ¶
func (an *AnnotationNamespace) String() string
String implements the fmt.Stringer.
func (*AnnotationNamespace) ToEdge ¶
func (an *AnnotationNamespace) ToEdge(order *AnnotationNamespaceOrder) *AnnotationNamespaceEdge
ToEdge converts AnnotationNamespace into AnnotationNamespaceEdge.
func (*AnnotationNamespace) Unwrap ¶
func (an *AnnotationNamespace) Unwrap() *AnnotationNamespace
Unwrap unwraps the AnnotationNamespace 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 (*AnnotationNamespace) Update ¶
func (an *AnnotationNamespace) Update() *AnnotationNamespaceUpdateOne
Update returns a builder for updating this AnnotationNamespace. Note that you need to call AnnotationNamespace.Unwrap() before calling this method if this AnnotationNamespace was returned from a transaction, and the transaction was committed or rolled back.
type AnnotationNamespaceClient ¶
type AnnotationNamespaceClient struct {
// contains filtered or unexported fields
}
AnnotationNamespaceClient is a client for the AnnotationNamespace schema.
func NewAnnotationNamespaceClient ¶
func NewAnnotationNamespaceClient(c config) *AnnotationNamespaceClient
NewAnnotationNamespaceClient returns a client for the AnnotationNamespace from the given config.
func (*AnnotationNamespaceClient) Create ¶
func (c *AnnotationNamespaceClient) Create() *AnnotationNamespaceCreate
Create returns a builder for creating a AnnotationNamespace entity.
func (*AnnotationNamespaceClient) CreateBulk ¶
func (c *AnnotationNamespaceClient) CreateBulk(builders ...*AnnotationNamespaceCreate) *AnnotationNamespaceCreateBulk
CreateBulk returns a builder for creating a bulk of AnnotationNamespace entities.
func (*AnnotationNamespaceClient) Delete ¶
func (c *AnnotationNamespaceClient) Delete() *AnnotationNamespaceDelete
Delete returns a delete builder for AnnotationNamespace.
func (*AnnotationNamespaceClient) DeleteOne ¶
func (c *AnnotationNamespaceClient) DeleteOne(an *AnnotationNamespace) *AnnotationNamespaceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AnnotationNamespaceClient) DeleteOneID ¶
func (c *AnnotationNamespaceClient) DeleteOneID(id gidx.PrefixedID) *AnnotationNamespaceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AnnotationNamespaceClient) Get ¶
func (c *AnnotationNamespaceClient) Get(ctx context.Context, id gidx.PrefixedID) (*AnnotationNamespace, error)
Get returns a AnnotationNamespace entity by its id.
func (*AnnotationNamespaceClient) GetX ¶
func (c *AnnotationNamespaceClient) GetX(ctx context.Context, id gidx.PrefixedID) *AnnotationNamespace
GetX is like Get, but panics if an error occurs.
func (*AnnotationNamespaceClient) Hooks ¶
func (c *AnnotationNamespaceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AnnotationNamespaceClient) Intercept ¶
func (c *AnnotationNamespaceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `annotationnamespace.Intercept(f(g(h())))`.
func (*AnnotationNamespaceClient) Interceptors ¶
func (c *AnnotationNamespaceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AnnotationNamespaceClient) MapCreateBulk ¶ added in v0.0.2
func (c *AnnotationNamespaceClient) MapCreateBulk(slice any, setFunc func(*AnnotationNamespaceCreate, int)) *AnnotationNamespaceCreateBulk
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 (*AnnotationNamespaceClient) Query ¶
func (c *AnnotationNamespaceClient) Query() *AnnotationNamespaceQuery
Query returns a query builder for AnnotationNamespace.
func (*AnnotationNamespaceClient) QueryAnnotations ¶
func (c *AnnotationNamespaceClient) QueryAnnotations(an *AnnotationNamespace) *AnnotationQuery
QueryAnnotations queries the annotations edge of a AnnotationNamespace.
func (*AnnotationNamespaceClient) Update ¶
func (c *AnnotationNamespaceClient) Update() *AnnotationNamespaceUpdate
Update returns an update builder for AnnotationNamespace.
func (*AnnotationNamespaceClient) UpdateOne ¶
func (c *AnnotationNamespaceClient) UpdateOne(an *AnnotationNamespace) *AnnotationNamespaceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AnnotationNamespaceClient) UpdateOneID ¶
func (c *AnnotationNamespaceClient) UpdateOneID(id gidx.PrefixedID) *AnnotationNamespaceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AnnotationNamespaceClient) Use ¶
func (c *AnnotationNamespaceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `annotationnamespace.Hooks(f(g(h())))`.
type AnnotationNamespaceConnection ¶
type AnnotationNamespaceConnection struct { Edges []*AnnotationNamespaceEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
AnnotationNamespaceConnection is the connection containing edges to AnnotationNamespace.
type AnnotationNamespaceCreate ¶
type AnnotationNamespaceCreate struct {
// contains filtered or unexported fields
}
AnnotationNamespaceCreate is the builder for creating a AnnotationNamespace entity.
func (*AnnotationNamespaceCreate) AddAnnotationIDs ¶
func (anc *AnnotationNamespaceCreate) AddAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceCreate
AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.
func (*AnnotationNamespaceCreate) AddAnnotations ¶
func (anc *AnnotationNamespaceCreate) AddAnnotations(a ...*Annotation) *AnnotationNamespaceCreate
AddAnnotations adds the "annotations" edges to the Annotation entity.
func (*AnnotationNamespaceCreate) Exec ¶
func (anc *AnnotationNamespaceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AnnotationNamespaceCreate) ExecX ¶
func (anc *AnnotationNamespaceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationNamespaceCreate) Mutation ¶
func (anc *AnnotationNamespaceCreate) Mutation() *AnnotationNamespaceMutation
Mutation returns the AnnotationNamespaceMutation object of the builder.
func (*AnnotationNamespaceCreate) Save ¶
func (anc *AnnotationNamespaceCreate) Save(ctx context.Context) (*AnnotationNamespace, error)
Save creates the AnnotationNamespace in the database.
func (*AnnotationNamespaceCreate) SaveX ¶
func (anc *AnnotationNamespaceCreate) SaveX(ctx context.Context) *AnnotationNamespace
SaveX calls Save and panics if Save returns an error.
func (*AnnotationNamespaceCreate) SetCreatedAt ¶
func (anc *AnnotationNamespaceCreate) SetCreatedAt(t time.Time) *AnnotationNamespaceCreate
SetCreatedAt sets the "created_at" field.
func (*AnnotationNamespaceCreate) SetID ¶
func (anc *AnnotationNamespaceCreate) SetID(gi gidx.PrefixedID) *AnnotationNamespaceCreate
SetID sets the "id" field.
func (*AnnotationNamespaceCreate) SetInput ¶
func (c *AnnotationNamespaceCreate) SetInput(i CreateAnnotationNamespaceInput) *AnnotationNamespaceCreate
SetInput applies the change-set in the CreateAnnotationNamespaceInput on the AnnotationNamespaceCreate builder.
func (*AnnotationNamespaceCreate) SetName ¶
func (anc *AnnotationNamespaceCreate) SetName(s string) *AnnotationNamespaceCreate
SetName sets the "name" field.
func (*AnnotationNamespaceCreate) SetNillableCreatedAt ¶
func (anc *AnnotationNamespaceCreate) SetNillableCreatedAt(t *time.Time) *AnnotationNamespaceCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AnnotationNamespaceCreate) SetNillableID ¶
func (anc *AnnotationNamespaceCreate) SetNillableID(gi *gidx.PrefixedID) *AnnotationNamespaceCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AnnotationNamespaceCreate) SetNillablePrivate ¶
func (anc *AnnotationNamespaceCreate) SetNillablePrivate(b *bool) *AnnotationNamespaceCreate
SetNillablePrivate sets the "private" field if the given value is not nil.
func (*AnnotationNamespaceCreate) SetNillableUpdatedAt ¶
func (anc *AnnotationNamespaceCreate) SetNillableUpdatedAt(t *time.Time) *AnnotationNamespaceCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*AnnotationNamespaceCreate) SetOwnerID ¶
func (anc *AnnotationNamespaceCreate) SetOwnerID(gi gidx.PrefixedID) *AnnotationNamespaceCreate
SetOwnerID sets the "owner_id" field.
func (*AnnotationNamespaceCreate) SetPrivate ¶
func (anc *AnnotationNamespaceCreate) SetPrivate(b bool) *AnnotationNamespaceCreate
SetPrivate sets the "private" field.
func (*AnnotationNamespaceCreate) SetUpdatedAt ¶
func (anc *AnnotationNamespaceCreate) SetUpdatedAt(t time.Time) *AnnotationNamespaceCreate
SetUpdatedAt sets the "updated_at" field.
type AnnotationNamespaceCreateBulk ¶
type AnnotationNamespaceCreateBulk struct {
// contains filtered or unexported fields
}
AnnotationNamespaceCreateBulk is the builder for creating many AnnotationNamespace entities in bulk.
func (*AnnotationNamespaceCreateBulk) Exec ¶
func (ancb *AnnotationNamespaceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AnnotationNamespaceCreateBulk) ExecX ¶
func (ancb *AnnotationNamespaceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationNamespaceCreateBulk) Save ¶
func (ancb *AnnotationNamespaceCreateBulk) Save(ctx context.Context) ([]*AnnotationNamespace, error)
Save creates the AnnotationNamespace entities in the database.
func (*AnnotationNamespaceCreateBulk) SaveX ¶
func (ancb *AnnotationNamespaceCreateBulk) SaveX(ctx context.Context) []*AnnotationNamespace
SaveX is like Save, but panics if an error occurs.
type AnnotationNamespaceDelete ¶
type AnnotationNamespaceDelete struct {
// contains filtered or unexported fields
}
AnnotationNamespaceDelete is the builder for deleting a AnnotationNamespace entity.
func (*AnnotationNamespaceDelete) Exec ¶
func (and *AnnotationNamespaceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AnnotationNamespaceDelete) ExecX ¶
func (and *AnnotationNamespaceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationNamespaceDelete) Where ¶
func (and *AnnotationNamespaceDelete) Where(ps ...predicate.AnnotationNamespace) *AnnotationNamespaceDelete
Where appends a list predicates to the AnnotationNamespaceDelete builder.
type AnnotationNamespaceDeleteOne ¶
type AnnotationNamespaceDeleteOne struct {
// contains filtered or unexported fields
}
AnnotationNamespaceDeleteOne is the builder for deleting a single AnnotationNamespace entity.
func (*AnnotationNamespaceDeleteOne) Exec ¶
func (ando *AnnotationNamespaceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AnnotationNamespaceDeleteOne) ExecX ¶
func (ando *AnnotationNamespaceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationNamespaceDeleteOne) Where ¶
func (ando *AnnotationNamespaceDeleteOne) Where(ps ...predicate.AnnotationNamespace) *AnnotationNamespaceDeleteOne
Where appends a list predicates to the AnnotationNamespaceDelete builder.
type AnnotationNamespaceEdge ¶
type AnnotationNamespaceEdge struct { Node *AnnotationNamespace `json:"node"` Cursor Cursor `json:"cursor"` }
AnnotationNamespaceEdge is the edge representation of AnnotationNamespace.
type AnnotationNamespaceEdges ¶
type AnnotationNamespaceEdges struct { // Annotations holds the value of the annotations edge. Annotations []*Annotation `json:"annotations,omitempty"` // contains filtered or unexported fields }
AnnotationNamespaceEdges holds the relations/edges for other nodes in the graph.
func (AnnotationNamespaceEdges) AnnotationsOrErr ¶
func (e AnnotationNamespaceEdges) AnnotationsOrErr() ([]*Annotation, error)
AnnotationsOrErr returns the Annotations value or an error if the edge was not loaded in eager-loading.
type AnnotationNamespaceGroupBy ¶
type AnnotationNamespaceGroupBy struct {
// contains filtered or unexported fields
}
AnnotationNamespaceGroupBy is the group-by builder for AnnotationNamespace entities.
func (*AnnotationNamespaceGroupBy) Aggregate ¶
func (angb *AnnotationNamespaceGroupBy) Aggregate(fns ...AggregateFunc) *AnnotationNamespaceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AnnotationNamespaceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*AnnotationNamespaceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*AnnotationNamespaceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceGroupBy) Scan ¶
func (angb *AnnotationNamespaceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AnnotationNamespaceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AnnotationNamespaceMutation ¶
type AnnotationNamespaceMutation struct {
// contains filtered or unexported fields
}
AnnotationNamespaceMutation represents an operation that mutates the AnnotationNamespace nodes in the graph.
func (*AnnotationNamespaceMutation) AddAnnotationIDs ¶
func (m *AnnotationNamespaceMutation) AddAnnotationIDs(ids ...gidx.PrefixedID)
AddAnnotationIDs adds the "annotations" edge to the Annotation entity by ids.
func (*AnnotationNamespaceMutation) AddField ¶
func (m *AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) AddedEdges ¶
func (m *AnnotationNamespaceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AnnotationNamespaceMutation) AddedField ¶
func (m *AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) AddedFields ¶
func (m *AnnotationNamespaceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AnnotationNamespaceMutation) AddedIDs ¶
func (m *AnnotationNamespaceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AnnotationNamespaceMutation) AnnotationsCleared ¶
func (m *AnnotationNamespaceMutation) AnnotationsCleared() bool
AnnotationsCleared reports if the "annotations" edge to the Annotation entity was cleared.
func (*AnnotationNamespaceMutation) AnnotationsIDs ¶
func (m *AnnotationNamespaceMutation) AnnotationsIDs() (ids []gidx.PrefixedID)
AnnotationsIDs returns the "annotations" edge IDs in the mutation.
func (*AnnotationNamespaceMutation) ClearAnnotations ¶
func (m *AnnotationNamespaceMutation) ClearAnnotations()
ClearAnnotations clears the "annotations" edge to the Annotation entity.
func (*AnnotationNamespaceMutation) ClearEdge ¶
func (m *AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) ClearField ¶
func (m *AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) ClearedEdges ¶
func (m *AnnotationNamespaceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AnnotationNamespaceMutation) ClearedFields ¶
func (m *AnnotationNamespaceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AnnotationNamespaceMutation) Client ¶
func (m AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) CreatedAt ¶
func (m *AnnotationNamespaceMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AnnotationNamespaceMutation) EdgeCleared ¶
func (m *AnnotationNamespaceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AnnotationNamespaceMutation) Field ¶
func (m *AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) FieldCleared ¶
func (m *AnnotationNamespaceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AnnotationNamespaceMutation) Fields ¶
func (m *AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) ID ¶
func (m *AnnotationNamespaceMutation) ID() (id gidx.PrefixedID, 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 (*AnnotationNamespaceMutation) IDs ¶
func (m *AnnotationNamespaceMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, 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 (*AnnotationNamespaceMutation) Name ¶
func (m *AnnotationNamespaceMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*AnnotationNamespaceMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the AnnotationNamespace entity. If the AnnotationNamespace 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 (*AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) OldName ¶
func (m *AnnotationNamespaceMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the AnnotationNamespace entity. If the AnnotationNamespace 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 (*AnnotationNamespaceMutation) OldOwnerID ¶
func (m *AnnotationNamespaceMutation) OldOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
OldOwnerID returns the old "owner_id" field's value of the AnnotationNamespace entity. If the AnnotationNamespace 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 (*AnnotationNamespaceMutation) OldPrivate ¶
func (m *AnnotationNamespaceMutation) OldPrivate(ctx context.Context) (v bool, err error)
OldPrivate returns the old "private" field's value of the AnnotationNamespace entity. If the AnnotationNamespace 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 (*AnnotationNamespaceMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the AnnotationNamespace entity. If the AnnotationNamespace 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 (*AnnotationNamespaceMutation) Op ¶
func (m *AnnotationNamespaceMutation) Op() Op
Op returns the operation name.
func (*AnnotationNamespaceMutation) OwnerID ¶
func (m *AnnotationNamespaceMutation) OwnerID() (r gidx.PrefixedID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*AnnotationNamespaceMutation) Private ¶
func (m *AnnotationNamespaceMutation) Private() (r bool, exists bool)
Private returns the value of the "private" field in the mutation.
func (*AnnotationNamespaceMutation) RemoveAnnotationIDs ¶
func (m *AnnotationNamespaceMutation) RemoveAnnotationIDs(ids ...gidx.PrefixedID)
RemoveAnnotationIDs removes the "annotations" edge to the Annotation entity by IDs.
func (*AnnotationNamespaceMutation) RemovedAnnotationsIDs ¶
func (m *AnnotationNamespaceMutation) RemovedAnnotationsIDs() (ids []gidx.PrefixedID)
RemovedAnnotations returns the removed IDs of the "annotations" edge to the Annotation entity.
func (*AnnotationNamespaceMutation) RemovedEdges ¶
func (m *AnnotationNamespaceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AnnotationNamespaceMutation) RemovedIDs ¶
func (m *AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) ResetAnnotations ¶
func (m *AnnotationNamespaceMutation) ResetAnnotations()
ResetAnnotations resets all changes to the "annotations" edge.
func (*AnnotationNamespaceMutation) ResetCreatedAt ¶
func (m *AnnotationNamespaceMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AnnotationNamespaceMutation) ResetEdge ¶
func (m *AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) ResetField ¶
func (m *AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) ResetName ¶
func (m *AnnotationNamespaceMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*AnnotationNamespaceMutation) ResetOwnerID ¶
func (m *AnnotationNamespaceMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*AnnotationNamespaceMutation) ResetPrivate ¶
func (m *AnnotationNamespaceMutation) ResetPrivate()
ResetPrivate resets all changes to the "private" field.
func (*AnnotationNamespaceMutation) ResetUpdatedAt ¶
func (m *AnnotationNamespaceMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AnnotationNamespaceMutation) SetCreatedAt ¶
func (m *AnnotationNamespaceMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AnnotationNamespaceMutation) SetField ¶
func (m *AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) SetID ¶
func (m *AnnotationNamespaceMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of AnnotationNamespace entities.
func (*AnnotationNamespaceMutation) SetName ¶
func (m *AnnotationNamespaceMutation) SetName(s string)
SetName sets the "name" field.
func (*AnnotationNamespaceMutation) SetOp ¶
func (m *AnnotationNamespaceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AnnotationNamespaceMutation) SetOwnerID ¶
func (m *AnnotationNamespaceMutation) SetOwnerID(gi gidx.PrefixedID)
SetOwnerID sets the "owner_id" field.
func (*AnnotationNamespaceMutation) SetPrivate ¶
func (m *AnnotationNamespaceMutation) SetPrivate(b bool)
SetPrivate sets the "private" field.
func (*AnnotationNamespaceMutation) SetUpdatedAt ¶
func (m *AnnotationNamespaceMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (AnnotationNamespaceMutation) Tx ¶
func (m AnnotationNamespaceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AnnotationNamespaceMutation) Type ¶
func (m *AnnotationNamespaceMutation) Type() string
Type returns the node type of this mutation (AnnotationNamespace).
func (*AnnotationNamespaceMutation) UpdatedAt ¶
func (m *AnnotationNamespaceMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AnnotationNamespaceMutation) Where ¶
func (m *AnnotationNamespaceMutation) Where(ps ...predicate.AnnotationNamespace)
Where appends a list predicates to the AnnotationNamespaceMutation builder.
func (*AnnotationNamespaceMutation) WhereP ¶
func (m *AnnotationNamespaceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AnnotationNamespaceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AnnotationNamespaceOrder ¶
type AnnotationNamespaceOrder struct { Direction OrderDirection `json:"direction"` Field *AnnotationNamespaceOrderField `json:"field"` }
AnnotationNamespaceOrder defines the ordering of AnnotationNamespace.
type AnnotationNamespaceOrderField ¶
type AnnotationNamespaceOrderField struct { // Value extracts the ordering value from the given AnnotationNamespace. Value func(*AnnotationNamespace) (ent.Value, error) // contains filtered or unexported fields }
AnnotationNamespaceOrderField defines the ordering field of AnnotationNamespace.
func (AnnotationNamespaceOrderField) MarshalGQL ¶
func (f AnnotationNamespaceOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (AnnotationNamespaceOrderField) String ¶
func (f AnnotationNamespaceOrderField) String() string
String implement fmt.Stringer interface.
func (*AnnotationNamespaceOrderField) UnmarshalGQL ¶
func (f *AnnotationNamespaceOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type AnnotationNamespacePaginateOption ¶
type AnnotationNamespacePaginateOption func(*annotationnamespacePager) error
AnnotationNamespacePaginateOption enables pagination customization.
func WithAnnotationNamespaceFilter ¶
func WithAnnotationNamespaceFilter(filter func(*AnnotationNamespaceQuery) (*AnnotationNamespaceQuery, error)) AnnotationNamespacePaginateOption
WithAnnotationNamespaceFilter configures pagination filter.
func WithAnnotationNamespaceOrder ¶
func WithAnnotationNamespaceOrder(order *AnnotationNamespaceOrder) AnnotationNamespacePaginateOption
WithAnnotationNamespaceOrder configures pagination ordering.
type AnnotationNamespaceQuery ¶
type AnnotationNamespaceQuery struct {
// contains filtered or unexported fields
}
AnnotationNamespaceQuery is the builder for querying AnnotationNamespace entities.
func (*AnnotationNamespaceQuery) Aggregate ¶
func (anq *AnnotationNamespaceQuery) Aggregate(fns ...AggregateFunc) *AnnotationNamespaceSelect
Aggregate returns a AnnotationNamespaceSelect configured with the given aggregations.
func (*AnnotationNamespaceQuery) All ¶
func (anq *AnnotationNamespaceQuery) All(ctx context.Context) ([]*AnnotationNamespace, error)
All executes the query and returns a list of AnnotationNamespaces.
func (*AnnotationNamespaceQuery) AllX ¶
func (anq *AnnotationNamespaceQuery) AllX(ctx context.Context) []*AnnotationNamespace
AllX is like All, but panics if an error occurs.
func (*AnnotationNamespaceQuery) Clone ¶
func (anq *AnnotationNamespaceQuery) Clone() *AnnotationNamespaceQuery
Clone returns a duplicate of the AnnotationNamespaceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AnnotationNamespaceQuery) CollectFields ¶
func (an *AnnotationNamespaceQuery) CollectFields(ctx context.Context, satisfies ...string) (*AnnotationNamespaceQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*AnnotationNamespaceQuery) Count ¶
func (anq *AnnotationNamespaceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AnnotationNamespaceQuery) CountX ¶
func (anq *AnnotationNamespaceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AnnotationNamespaceQuery) Exist ¶
func (anq *AnnotationNamespaceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AnnotationNamespaceQuery) ExistX ¶
func (anq *AnnotationNamespaceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AnnotationNamespaceQuery) First ¶
func (anq *AnnotationNamespaceQuery) First(ctx context.Context) (*AnnotationNamespace, error)
First returns the first AnnotationNamespace entity from the query. Returns a *NotFoundError when no AnnotationNamespace was found.
func (*AnnotationNamespaceQuery) FirstID ¶
func (anq *AnnotationNamespaceQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
FirstID returns the first AnnotationNamespace ID from the query. Returns a *NotFoundError when no AnnotationNamespace ID was found.
func (*AnnotationNamespaceQuery) FirstIDX ¶
func (anq *AnnotationNamespaceQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AnnotationNamespaceQuery) FirstX ¶
func (anq *AnnotationNamespaceQuery) FirstX(ctx context.Context) *AnnotationNamespace
FirstX is like First, but panics if an error occurs.
func (*AnnotationNamespaceQuery) GroupBy ¶
func (anq *AnnotationNamespaceQuery) GroupBy(field string, fields ...string) *AnnotationNamespaceGroupBy
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.AnnotationNamespace.Query(). GroupBy(annotationnamespace.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*AnnotationNamespaceQuery) IDs ¶
func (anq *AnnotationNamespaceQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
IDs executes the query and returns a list of AnnotationNamespace IDs.
func (*AnnotationNamespaceQuery) IDsX ¶
func (anq *AnnotationNamespaceQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*AnnotationNamespaceQuery) Limit ¶
func (anq *AnnotationNamespaceQuery) Limit(limit int) *AnnotationNamespaceQuery
Limit the number of records to be returned by this query.
func (*AnnotationNamespaceQuery) Offset ¶
func (anq *AnnotationNamespaceQuery) Offset(offset int) *AnnotationNamespaceQuery
Offset to start from.
func (*AnnotationNamespaceQuery) Only ¶
func (anq *AnnotationNamespaceQuery) Only(ctx context.Context) (*AnnotationNamespace, error)
Only returns a single AnnotationNamespace entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AnnotationNamespace entity is found. Returns a *NotFoundError when no AnnotationNamespace entities are found.
func (*AnnotationNamespaceQuery) OnlyID ¶
func (anq *AnnotationNamespaceQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
OnlyID is like Only, but returns the only AnnotationNamespace ID in the query. Returns a *NotSingularError when more than one AnnotationNamespace ID is found. Returns a *NotFoundError when no entities are found.
func (*AnnotationNamespaceQuery) OnlyIDX ¶
func (anq *AnnotationNamespaceQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AnnotationNamespaceQuery) OnlyX ¶
func (anq *AnnotationNamespaceQuery) OnlyX(ctx context.Context) *AnnotationNamespace
OnlyX is like Only, but panics if an error occurs.
func (*AnnotationNamespaceQuery) Order ¶
func (anq *AnnotationNamespaceQuery) Order(o ...annotationnamespace.OrderOption) *AnnotationNamespaceQuery
Order specifies how the records should be ordered.
func (*AnnotationNamespaceQuery) Paginate ¶
func (an *AnnotationNamespaceQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...AnnotationNamespacePaginateOption, ) (*AnnotationNamespaceConnection, error)
Paginate executes the query and returns a relay based cursor connection to AnnotationNamespace.
func (*AnnotationNamespaceQuery) QueryAnnotations ¶
func (anq *AnnotationNamespaceQuery) QueryAnnotations() *AnnotationQuery
QueryAnnotations chains the current query on the "annotations" edge.
func (*AnnotationNamespaceQuery) Select ¶
func (anq *AnnotationNamespaceQuery) Select(fields ...string) *AnnotationNamespaceSelect
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.AnnotationNamespace.Query(). Select(annotationnamespace.FieldCreatedAt). Scan(ctx, &v)
func (*AnnotationNamespaceQuery) Unique ¶
func (anq *AnnotationNamespaceQuery) Unique(unique bool) *AnnotationNamespaceQuery
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 (*AnnotationNamespaceQuery) Where ¶
func (anq *AnnotationNamespaceQuery) Where(ps ...predicate.AnnotationNamespace) *AnnotationNamespaceQuery
Where adds a new predicate for the AnnotationNamespaceQuery builder.
func (*AnnotationNamespaceQuery) WithAnnotations ¶
func (anq *AnnotationNamespaceQuery) WithAnnotations(opts ...func(*AnnotationQuery)) *AnnotationNamespaceQuery
WithAnnotations tells the query-builder to eager-load the nodes that are connected to the "annotations" edge. The optional arguments are used to configure the query builder of the edge.
func (*AnnotationNamespaceQuery) WithNamedAnnotations ¶
func (anq *AnnotationNamespaceQuery) WithNamedAnnotations(name string, opts ...func(*AnnotationQuery)) *AnnotationNamespaceQuery
WithNamedAnnotations tells the query-builder to eager-load the nodes that are connected to the "annotations" edge with the given name. The optional arguments are used to configure the query builder of the edge.
type AnnotationNamespaceSelect ¶
type AnnotationNamespaceSelect struct { *AnnotationNamespaceQuery // contains filtered or unexported fields }
AnnotationNamespaceSelect is the builder for selecting fields of AnnotationNamespace entities.
func (*AnnotationNamespaceSelect) Aggregate ¶
func (ans *AnnotationNamespaceSelect) Aggregate(fns ...AggregateFunc) *AnnotationNamespaceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AnnotationNamespaceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*AnnotationNamespaceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*AnnotationNamespaceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AnnotationNamespaceSelect) Scan ¶
func (ans *AnnotationNamespaceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AnnotationNamespaceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AnnotationNamespaceUpdate ¶
type AnnotationNamespaceUpdate struct {
// contains filtered or unexported fields
}
AnnotationNamespaceUpdate is the builder for updating AnnotationNamespace entities.
func (*AnnotationNamespaceUpdate) AddAnnotationIDs ¶
func (anu *AnnotationNamespaceUpdate) AddAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceUpdate
AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.
func (*AnnotationNamespaceUpdate) AddAnnotations ¶
func (anu *AnnotationNamespaceUpdate) AddAnnotations(a ...*Annotation) *AnnotationNamespaceUpdate
AddAnnotations adds the "annotations" edges to the Annotation entity.
func (*AnnotationNamespaceUpdate) ClearAnnotations ¶
func (anu *AnnotationNamespaceUpdate) ClearAnnotations() *AnnotationNamespaceUpdate
ClearAnnotations clears all "annotations" edges to the Annotation entity.
func (*AnnotationNamespaceUpdate) Exec ¶
func (anu *AnnotationNamespaceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AnnotationNamespaceUpdate) ExecX ¶
func (anu *AnnotationNamespaceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationNamespaceUpdate) Mutation ¶
func (anu *AnnotationNamespaceUpdate) Mutation() *AnnotationNamespaceMutation
Mutation returns the AnnotationNamespaceMutation object of the builder.
func (*AnnotationNamespaceUpdate) RemoveAnnotationIDs ¶
func (anu *AnnotationNamespaceUpdate) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceUpdate
RemoveAnnotationIDs removes the "annotations" edge to Annotation entities by IDs.
func (*AnnotationNamespaceUpdate) RemoveAnnotations ¶
func (anu *AnnotationNamespaceUpdate) RemoveAnnotations(a ...*Annotation) *AnnotationNamespaceUpdate
RemoveAnnotations removes "annotations" edges to Annotation entities.
func (*AnnotationNamespaceUpdate) Save ¶
func (anu *AnnotationNamespaceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AnnotationNamespaceUpdate) SaveX ¶
func (anu *AnnotationNamespaceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AnnotationNamespaceUpdate) SetInput ¶
func (c *AnnotationNamespaceUpdate) SetInput(i UpdateAnnotationNamespaceInput) *AnnotationNamespaceUpdate
SetInput applies the change-set in the UpdateAnnotationNamespaceInput on the AnnotationNamespaceUpdate builder.
func (*AnnotationNamespaceUpdate) SetName ¶
func (anu *AnnotationNamespaceUpdate) SetName(s string) *AnnotationNamespaceUpdate
SetName sets the "name" field.
func (*AnnotationNamespaceUpdate) SetNillablePrivate ¶
func (anu *AnnotationNamespaceUpdate) SetNillablePrivate(b *bool) *AnnotationNamespaceUpdate
SetNillablePrivate sets the "private" field if the given value is not nil.
func (*AnnotationNamespaceUpdate) SetPrivate ¶
func (anu *AnnotationNamespaceUpdate) SetPrivate(b bool) *AnnotationNamespaceUpdate
SetPrivate sets the "private" field.
func (*AnnotationNamespaceUpdate) Where ¶
func (anu *AnnotationNamespaceUpdate) Where(ps ...predicate.AnnotationNamespace) *AnnotationNamespaceUpdate
Where appends a list predicates to the AnnotationNamespaceUpdate builder.
type AnnotationNamespaceUpdateOne ¶
type AnnotationNamespaceUpdateOne struct {
// contains filtered or unexported fields
}
AnnotationNamespaceUpdateOne is the builder for updating a single AnnotationNamespace entity.
func (*AnnotationNamespaceUpdateOne) AddAnnotationIDs ¶
func (anuo *AnnotationNamespaceUpdateOne) AddAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceUpdateOne
AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.
func (*AnnotationNamespaceUpdateOne) AddAnnotations ¶
func (anuo *AnnotationNamespaceUpdateOne) AddAnnotations(a ...*Annotation) *AnnotationNamespaceUpdateOne
AddAnnotations adds the "annotations" edges to the Annotation entity.
func (*AnnotationNamespaceUpdateOne) ClearAnnotations ¶
func (anuo *AnnotationNamespaceUpdateOne) ClearAnnotations() *AnnotationNamespaceUpdateOne
ClearAnnotations clears all "annotations" edges to the Annotation entity.
func (*AnnotationNamespaceUpdateOne) Exec ¶
func (anuo *AnnotationNamespaceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AnnotationNamespaceUpdateOne) ExecX ¶
func (anuo *AnnotationNamespaceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationNamespaceUpdateOne) Mutation ¶
func (anuo *AnnotationNamespaceUpdateOne) Mutation() *AnnotationNamespaceMutation
Mutation returns the AnnotationNamespaceMutation object of the builder.
func (*AnnotationNamespaceUpdateOne) RemoveAnnotationIDs ¶
func (anuo *AnnotationNamespaceUpdateOne) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceUpdateOne
RemoveAnnotationIDs removes the "annotations" edge to Annotation entities by IDs.
func (*AnnotationNamespaceUpdateOne) RemoveAnnotations ¶
func (anuo *AnnotationNamespaceUpdateOne) RemoveAnnotations(a ...*Annotation) *AnnotationNamespaceUpdateOne
RemoveAnnotations removes "annotations" edges to Annotation entities.
func (*AnnotationNamespaceUpdateOne) Save ¶
func (anuo *AnnotationNamespaceUpdateOne) Save(ctx context.Context) (*AnnotationNamespace, error)
Save executes the query and returns the updated AnnotationNamespace entity.
func (*AnnotationNamespaceUpdateOne) SaveX ¶
func (anuo *AnnotationNamespaceUpdateOne) SaveX(ctx context.Context) *AnnotationNamespace
SaveX is like Save, but panics if an error occurs.
func (*AnnotationNamespaceUpdateOne) Select ¶
func (anuo *AnnotationNamespaceUpdateOne) Select(field string, fields ...string) *AnnotationNamespaceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AnnotationNamespaceUpdateOne) SetInput ¶
func (c *AnnotationNamespaceUpdateOne) SetInput(i UpdateAnnotationNamespaceInput) *AnnotationNamespaceUpdateOne
SetInput applies the change-set in the UpdateAnnotationNamespaceInput on the AnnotationNamespaceUpdateOne builder.
func (*AnnotationNamespaceUpdateOne) SetName ¶
func (anuo *AnnotationNamespaceUpdateOne) SetName(s string) *AnnotationNamespaceUpdateOne
SetName sets the "name" field.
func (*AnnotationNamespaceUpdateOne) SetNillablePrivate ¶
func (anuo *AnnotationNamespaceUpdateOne) SetNillablePrivate(b *bool) *AnnotationNamespaceUpdateOne
SetNillablePrivate sets the "private" field if the given value is not nil.
func (*AnnotationNamespaceUpdateOne) SetPrivate ¶
func (anuo *AnnotationNamespaceUpdateOne) SetPrivate(b bool) *AnnotationNamespaceUpdateOne
SetPrivate sets the "private" field.
func (*AnnotationNamespaceUpdateOne) Where ¶
func (anuo *AnnotationNamespaceUpdateOne) Where(ps ...predicate.AnnotationNamespace) *AnnotationNamespaceUpdateOne
Where appends a list predicates to the AnnotationNamespaceUpdate builder.
type AnnotationNamespaceWhereInput ¶
type AnnotationNamespaceWhereInput struct { Predicates []predicate.AnnotationNamespace `json:"-"` Not *AnnotationNamespaceWhereInput `json:"not,omitempty"` Or []*AnnotationNamespaceWhereInput `json:"or,omitempty"` And []*AnnotationNamespaceWhereInput `json:"and,omitempty"` // "id" field predicates. ID *gidx.PrefixedID `json:"id,omitempty"` IDNEQ *gidx.PrefixedID `json:"idNEQ,omitempty"` IDIn []gidx.PrefixedID `json:"idIn,omitempty"` IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"` IDGT *gidx.PrefixedID `json:"idGT,omitempty"` IDGTE *gidx.PrefixedID `json:"idGTE,omitempty"` IDLT *gidx.PrefixedID `json:"idLT,omitempty"` IDLTE *gidx.PrefixedID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "annotations" edge predicates. HasAnnotations *bool `json:"hasAnnotations,omitempty"` HasAnnotationsWith []*AnnotationWhereInput `json:"hasAnnotationsWith,omitempty"` }
AnnotationNamespaceWhereInput represents a where input for filtering AnnotationNamespace queries.
func (*AnnotationNamespaceWhereInput) AddPredicates ¶
func (i *AnnotationNamespaceWhereInput) AddPredicates(predicates ...predicate.AnnotationNamespace)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*AnnotationNamespaceWhereInput) Filter ¶
func (i *AnnotationNamespaceWhereInput) Filter(q *AnnotationNamespaceQuery) (*AnnotationNamespaceQuery, error)
Filter applies the AnnotationNamespaceWhereInput filter on the AnnotationNamespaceQuery builder.
func (*AnnotationNamespaceWhereInput) P ¶
func (i *AnnotationNamespaceWhereInput) P() (predicate.AnnotationNamespace, error)
P returns a predicate for filtering annotationnamespaces. An error is returned if the input is empty or invalid.
type AnnotationNamespaces ¶
type AnnotationNamespaces []*AnnotationNamespace
AnnotationNamespaces is a parsable slice of AnnotationNamespace.
type AnnotationOrder ¶
type AnnotationOrder struct { Direction OrderDirection `json:"direction"` Field *AnnotationOrderField `json:"field"` }
AnnotationOrder defines the ordering of Annotation.
type AnnotationOrderField ¶
type AnnotationOrderField struct { // Value extracts the ordering value from the given Annotation. Value func(*Annotation) (ent.Value, error) // contains filtered or unexported fields }
AnnotationOrderField defines the ordering field of Annotation.
func (AnnotationOrderField) MarshalGQL ¶
func (f AnnotationOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (AnnotationOrderField) String ¶
func (f AnnotationOrderField) String() string
String implement fmt.Stringer interface.
func (*AnnotationOrderField) UnmarshalGQL ¶
func (f *AnnotationOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type AnnotationPaginateOption ¶
type AnnotationPaginateOption func(*annotationPager) error
AnnotationPaginateOption enables pagination customization.
func WithAnnotationFilter ¶
func WithAnnotationFilter(filter func(*AnnotationQuery) (*AnnotationQuery, error)) AnnotationPaginateOption
WithAnnotationFilter configures pagination filter.
func WithAnnotationOrder ¶
func WithAnnotationOrder(order *AnnotationOrder) AnnotationPaginateOption
WithAnnotationOrder configures pagination ordering.
type AnnotationQuery ¶
type AnnotationQuery struct {
// contains filtered or unexported fields
}
AnnotationQuery is the builder for querying Annotation entities.
func (*AnnotationQuery) Aggregate ¶
func (aq *AnnotationQuery) Aggregate(fns ...AggregateFunc) *AnnotationSelect
Aggregate returns a AnnotationSelect configured with the given aggregations.
func (*AnnotationQuery) All ¶
func (aq *AnnotationQuery) All(ctx context.Context) ([]*Annotation, error)
All executes the query and returns a list of Annotations.
func (*AnnotationQuery) AllX ¶
func (aq *AnnotationQuery) AllX(ctx context.Context) []*Annotation
AllX is like All, but panics if an error occurs.
func (*AnnotationQuery) Clone ¶
func (aq *AnnotationQuery) Clone() *AnnotationQuery
Clone returns a duplicate of the AnnotationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AnnotationQuery) CollectFields ¶
func (a *AnnotationQuery) CollectFields(ctx context.Context, satisfies ...string) (*AnnotationQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*AnnotationQuery) Count ¶
func (aq *AnnotationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AnnotationQuery) CountX ¶
func (aq *AnnotationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AnnotationQuery) Exist ¶
func (aq *AnnotationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AnnotationQuery) ExistX ¶
func (aq *AnnotationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AnnotationQuery) First ¶
func (aq *AnnotationQuery) First(ctx context.Context) (*Annotation, error)
First returns the first Annotation entity from the query. Returns a *NotFoundError when no Annotation was found.
func (*AnnotationQuery) FirstID ¶
func (aq *AnnotationQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
FirstID returns the first Annotation ID from the query. Returns a *NotFoundError when no Annotation ID was found.
func (*AnnotationQuery) FirstIDX ¶
func (aq *AnnotationQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AnnotationQuery) FirstX ¶
func (aq *AnnotationQuery) FirstX(ctx context.Context) *Annotation
FirstX is like First, but panics if an error occurs.
func (*AnnotationQuery) GroupBy ¶
func (aq *AnnotationQuery) GroupBy(field string, fields ...string) *AnnotationGroupBy
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.Annotation.Query(). GroupBy(annotation.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*AnnotationQuery) IDs ¶
func (aq *AnnotationQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
IDs executes the query and returns a list of Annotation IDs.
func (*AnnotationQuery) IDsX ¶
func (aq *AnnotationQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*AnnotationQuery) Limit ¶
func (aq *AnnotationQuery) Limit(limit int) *AnnotationQuery
Limit the number of records to be returned by this query.
func (*AnnotationQuery) Offset ¶
func (aq *AnnotationQuery) Offset(offset int) *AnnotationQuery
Offset to start from.
func (*AnnotationQuery) Only ¶
func (aq *AnnotationQuery) Only(ctx context.Context) (*Annotation, error)
Only returns a single Annotation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Annotation entity is found. Returns a *NotFoundError when no Annotation entities are found.
func (*AnnotationQuery) OnlyID ¶
func (aq *AnnotationQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
OnlyID is like Only, but returns the only Annotation ID in the query. Returns a *NotSingularError when more than one Annotation ID is found. Returns a *NotFoundError when no entities are found.
func (*AnnotationQuery) OnlyIDX ¶
func (aq *AnnotationQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AnnotationQuery) OnlyX ¶
func (aq *AnnotationQuery) OnlyX(ctx context.Context) *Annotation
OnlyX is like Only, but panics if an error occurs.
func (*AnnotationQuery) Order ¶
func (aq *AnnotationQuery) Order(o ...annotation.OrderOption) *AnnotationQuery
Order specifies how the records should be ordered.
func (*AnnotationQuery) Paginate ¶
func (a *AnnotationQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...AnnotationPaginateOption, ) (*AnnotationConnection, error)
Paginate executes the query and returns a relay based cursor connection to Annotation.
func (*AnnotationQuery) QueryMetadata ¶
func (aq *AnnotationQuery) QueryMetadata() *MetadataQuery
QueryMetadata chains the current query on the "metadata" edge.
func (*AnnotationQuery) QueryNamespace ¶
func (aq *AnnotationQuery) QueryNamespace() *AnnotationNamespaceQuery
QueryNamespace chains the current query on the "namespace" edge.
func (*AnnotationQuery) Select ¶
func (aq *AnnotationQuery) Select(fields ...string) *AnnotationSelect
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.Annotation.Query(). Select(annotation.FieldCreatedAt). Scan(ctx, &v)
func (*AnnotationQuery) Unique ¶
func (aq *AnnotationQuery) Unique(unique bool) *AnnotationQuery
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 (*AnnotationQuery) Where ¶
func (aq *AnnotationQuery) Where(ps ...predicate.Annotation) *AnnotationQuery
Where adds a new predicate for the AnnotationQuery builder.
func (*AnnotationQuery) WithMetadata ¶
func (aq *AnnotationQuery) WithMetadata(opts ...func(*MetadataQuery)) *AnnotationQuery
WithMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge. The optional arguments are used to configure the query builder of the edge.
func (*AnnotationQuery) WithNamespace ¶
func (aq *AnnotationQuery) WithNamespace(opts ...func(*AnnotationNamespaceQuery)) *AnnotationQuery
WithNamespace tells the query-builder to eager-load the nodes that are connected to the "namespace" edge. The optional arguments are used to configure the query builder of the edge.
type AnnotationSelect ¶
type AnnotationSelect struct { *AnnotationQuery // contains filtered or unexported fields }
AnnotationSelect is the builder for selecting fields of Annotation entities.
func (*AnnotationSelect) Aggregate ¶
func (as *AnnotationSelect) Aggregate(fns ...AggregateFunc) *AnnotationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AnnotationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AnnotationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AnnotationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AnnotationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AnnotationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AnnotationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AnnotationSelect) Scan ¶
func (as *AnnotationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AnnotationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AnnotationUpdate ¶
type AnnotationUpdate struct {
// contains filtered or unexported fields
}
AnnotationUpdate is the builder for updating Annotation entities.
func (*AnnotationUpdate) AppendData ¶
func (au *AnnotationUpdate) AppendData(jm json.RawMessage) *AnnotationUpdate
AppendData appends jm to the "data" field.
func (*AnnotationUpdate) Exec ¶
func (au *AnnotationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AnnotationUpdate) ExecX ¶
func (au *AnnotationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationUpdate) Mutation ¶
func (au *AnnotationUpdate) Mutation() *AnnotationMutation
Mutation returns the AnnotationMutation object of the builder.
func (*AnnotationUpdate) Save ¶
func (au *AnnotationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AnnotationUpdate) SaveX ¶
func (au *AnnotationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AnnotationUpdate) SetData ¶
func (au *AnnotationUpdate) SetData(jm json.RawMessage) *AnnotationUpdate
SetData sets the "data" field.
func (*AnnotationUpdate) Where ¶
func (au *AnnotationUpdate) Where(ps ...predicate.Annotation) *AnnotationUpdate
Where appends a list predicates to the AnnotationUpdate builder.
type AnnotationUpdateOne ¶
type AnnotationUpdateOne struct {
// contains filtered or unexported fields
}
AnnotationUpdateOne is the builder for updating a single Annotation entity.
func (*AnnotationUpdateOne) AppendData ¶
func (auo *AnnotationUpdateOne) AppendData(jm json.RawMessage) *AnnotationUpdateOne
AppendData appends jm to the "data" field.
func (*AnnotationUpdateOne) Exec ¶
func (auo *AnnotationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AnnotationUpdateOne) ExecX ¶
func (auo *AnnotationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnnotationUpdateOne) Mutation ¶
func (auo *AnnotationUpdateOne) Mutation() *AnnotationMutation
Mutation returns the AnnotationMutation object of the builder.
func (*AnnotationUpdateOne) Save ¶
func (auo *AnnotationUpdateOne) Save(ctx context.Context) (*Annotation, error)
Save executes the query and returns the updated Annotation entity.
func (*AnnotationUpdateOne) SaveX ¶
func (auo *AnnotationUpdateOne) SaveX(ctx context.Context) *Annotation
SaveX is like Save, but panics if an error occurs.
func (*AnnotationUpdateOne) Select ¶
func (auo *AnnotationUpdateOne) Select(field string, fields ...string) *AnnotationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AnnotationUpdateOne) SetData ¶
func (auo *AnnotationUpdateOne) SetData(jm json.RawMessage) *AnnotationUpdateOne
SetData sets the "data" field.
func (*AnnotationUpdateOne) Where ¶
func (auo *AnnotationUpdateOne) Where(ps ...predicate.Annotation) *AnnotationUpdateOne
Where appends a list predicates to the AnnotationUpdate builder.
type AnnotationWhereInput ¶
type AnnotationWhereInput struct { Predicates []predicate.Annotation `json:"-"` Not *AnnotationWhereInput `json:"not,omitempty"` Or []*AnnotationWhereInput `json:"or,omitempty"` And []*AnnotationWhereInput `json:"and,omitempty"` // "id" field predicates. ID *gidx.PrefixedID `json:"id,omitempty"` IDNEQ *gidx.PrefixedID `json:"idNEQ,omitempty"` IDIn []gidx.PrefixedID `json:"idIn,omitempty"` IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"` IDGT *gidx.PrefixedID `json:"idGT,omitempty"` IDGTE *gidx.PrefixedID `json:"idGTE,omitempty"` IDLT *gidx.PrefixedID `json:"idLT,omitempty"` IDLTE *gidx.PrefixedID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "namespace" edge predicates. HasNamespace *bool `json:"hasNamespace,omitempty"` HasNamespaceWith []*AnnotationNamespaceWhereInput `json:"hasNamespaceWith,omitempty"` // "metadata" edge predicates. HasMetadata *bool `json:"hasMetadata,omitempty"` HasMetadataWith []*MetadataWhereInput `json:"hasMetadataWith,omitempty"` }
AnnotationWhereInput represents a where input for filtering Annotation queries.
func (*AnnotationWhereInput) AddPredicates ¶
func (i *AnnotationWhereInput) AddPredicates(predicates ...predicate.Annotation)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*AnnotationWhereInput) Filter ¶
func (i *AnnotationWhereInput) Filter(q *AnnotationQuery) (*AnnotationQuery, error)
Filter applies the AnnotationWhereInput filter on the AnnotationQuery builder.
func (*AnnotationWhereInput) P ¶
func (i *AnnotationWhereInput) P() (predicate.Annotation, error)
P returns a predicate for filtering annotations. An error is returned if the input is empty or invalid.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Annotation is the client for interacting with the Annotation builders. Annotation *AnnotationClient // AnnotationNamespace is the client for interacting with the AnnotationNamespace builders. AnnotationNamespace *AnnotationNamespaceClient // Metadata is the client for interacting with the Metadata builders. Metadata *MetadataClient // Status is the client for interacting with the Status builders. Status *StatusClient // StatusNamespace is the client for interacting with the StatusNamespace builders. StatusNamespace *StatusNamespaceClient // 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(). Annotation. 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) Noder ¶
func (c *Client) Noder(ctx context.Context, id gidx.PrefixedID, opts ...NodeOption) (_ Noder, err error)
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (*Client) Noders ¶
func (c *Client) Noders(ctx context.Context, ids []gidx.PrefixedID, opts ...NodeOption) ([]Noder, error)
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
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 CreateAnnotationNamespaceInput ¶
type CreateAnnotationNamespaceInput struct { Name string OwnerID gidx.PrefixedID Private *bool }
CreateAnnotationNamespaceInput represents a mutation input for creating annotationnamespaces.
func (*CreateAnnotationNamespaceInput) Mutate ¶
func (i *CreateAnnotationNamespaceInput) Mutate(m *AnnotationNamespaceMutation)
Mutate applies the CreateAnnotationNamespaceInput on the AnnotationNamespaceMutation builder.
type CreateStatusInput ¶
type CreateStatusInput struct { Source string Data json.RawMessage NamespaceID gidx.PrefixedID MetadataID gidx.PrefixedID }
CreateStatusInput represents a mutation input for creating statusslice.
func (*CreateStatusInput) Mutate ¶
func (i *CreateStatusInput) Mutate(m *StatusMutation)
Mutate applies the CreateStatusInput on the StatusMutation builder.
type CreateStatusNamespaceInput ¶
type CreateStatusNamespaceInput struct { Name string ResourceProviderID gidx.PrefixedID Private *bool }
CreateStatusNamespaceInput represents a mutation input for creating statusnamespaces.
func (*CreateStatusNamespaceInput) Mutate ¶
func (i *CreateStatusNamespaceInput) Mutate(m *StatusNamespaceMutation)
Mutate applies the CreateStatusNamespaceInput on the StatusNamespaceMutation 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 Metadata ¶
type Metadata struct { // ID of the ent. // ID for the metadata. ID gidx.PrefixedID `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"` // ID of the node for this metadata NodeID gidx.PrefixedID `json:"node_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MetadataQuery when eager-loading is set. Edges MetadataEdges `json:"edges"` // contains filtered or unexported fields }
Metadata is the model entity for the Metadata schema.
func (*Metadata) Annotations ¶
func (m *Metadata) Annotations( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *AnnotationOrder, where *AnnotationWhereInput, ) (*AnnotationConnection, error)
func (*Metadata) IsNode ¶
func (n *Metadata) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Metadata) NamedAnnotations ¶
func (m *Metadata) NamedAnnotations(name string) ([]*Annotation, error)
NamedAnnotations returns the Annotations named value or an error if the edge was not loaded in eager-loading with this name.
func (*Metadata) NamedStatuses ¶
NamedStatuses returns the Statuses named value or an error if the edge was not loaded in eager-loading with this name.
func (*Metadata) QueryAnnotations ¶
func (m *Metadata) QueryAnnotations() *AnnotationQuery
QueryAnnotations queries the "annotations" edge of the Metadata entity.
func (*Metadata) QueryStatuses ¶
func (m *Metadata) QueryStatuses() *StatusQuery
QueryStatuses queries the "statuses" edge of the Metadata entity.
func (*Metadata) Statuses ¶
func (m *Metadata) Statuses( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *StatusOrder, where *StatusWhereInput, ) (*StatusConnection, error)
func (*Metadata) ToEdge ¶
func (m *Metadata) ToEdge(order *MetadataOrder) *MetadataEdge
ToEdge converts Metadata into MetadataEdge.
func (*Metadata) Unwrap ¶
Unwrap unwraps the Metadata 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 (*Metadata) Update ¶
func (m *Metadata) Update() *MetadataUpdateOne
Update returns a builder for updating this Metadata. Note that you need to call Metadata.Unwrap() before calling this method if this Metadata was returned from a transaction, and the transaction was committed or rolled back.
type MetadataClient ¶
type MetadataClient struct {
// contains filtered or unexported fields
}
MetadataClient is a client for the Metadata schema.
func NewMetadataClient ¶
func NewMetadataClient(c config) *MetadataClient
NewMetadataClient returns a client for the Metadata from the given config.
func (*MetadataClient) Create ¶
func (c *MetadataClient) Create() *MetadataCreate
Create returns a builder for creating a Metadata entity.
func (*MetadataClient) CreateBulk ¶
func (c *MetadataClient) CreateBulk(builders ...*MetadataCreate) *MetadataCreateBulk
CreateBulk returns a builder for creating a bulk of Metadata entities.
func (*MetadataClient) Delete ¶
func (c *MetadataClient) Delete() *MetadataDelete
Delete returns a delete builder for Metadata.
func (*MetadataClient) DeleteOne ¶
func (c *MetadataClient) DeleteOne(m *Metadata) *MetadataDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MetadataClient) DeleteOneID ¶
func (c *MetadataClient) DeleteOneID(id gidx.PrefixedID) *MetadataDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MetadataClient) Get ¶
func (c *MetadataClient) Get(ctx context.Context, id gidx.PrefixedID) (*Metadata, error)
Get returns a Metadata entity by its id.
func (*MetadataClient) GetX ¶
func (c *MetadataClient) GetX(ctx context.Context, id gidx.PrefixedID) *Metadata
GetX is like Get, but panics if an error occurs.
func (*MetadataClient) Hooks ¶
func (c *MetadataClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MetadataClient) Intercept ¶
func (c *MetadataClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `metadata.Intercept(f(g(h())))`.
func (*MetadataClient) Interceptors ¶
func (c *MetadataClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MetadataClient) MapCreateBulk ¶ added in v0.0.2
func (c *MetadataClient) MapCreateBulk(slice any, setFunc func(*MetadataCreate, int)) *MetadataCreateBulk
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 (*MetadataClient) Query ¶
func (c *MetadataClient) Query() *MetadataQuery
Query returns a query builder for Metadata.
func (*MetadataClient) QueryAnnotations ¶
func (c *MetadataClient) QueryAnnotations(m *Metadata) *AnnotationQuery
QueryAnnotations queries the annotations edge of a Metadata.
func (*MetadataClient) QueryStatuses ¶
func (c *MetadataClient) QueryStatuses(m *Metadata) *StatusQuery
QueryStatuses queries the statuses edge of a Metadata.
func (*MetadataClient) Update ¶
func (c *MetadataClient) Update() *MetadataUpdate
Update returns an update builder for Metadata.
func (*MetadataClient) UpdateOne ¶
func (c *MetadataClient) UpdateOne(m *Metadata) *MetadataUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MetadataClient) UpdateOneID ¶
func (c *MetadataClient) UpdateOneID(id gidx.PrefixedID) *MetadataUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MetadataClient) Use ¶
func (c *MetadataClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `metadata.Hooks(f(g(h())))`.
type MetadataConnection ¶
type MetadataConnection struct { Edges []*MetadataEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
MetadataConnection is the connection containing edges to Metadata.
type MetadataCreate ¶
type MetadataCreate struct {
// contains filtered or unexported fields
}
MetadataCreate is the builder for creating a Metadata entity.
func (*MetadataCreate) AddAnnotationIDs ¶
func (mc *MetadataCreate) AddAnnotationIDs(ids ...gidx.PrefixedID) *MetadataCreate
AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.
func (*MetadataCreate) AddAnnotations ¶
func (mc *MetadataCreate) AddAnnotations(a ...*Annotation) *MetadataCreate
AddAnnotations adds the "annotations" edges to the Annotation entity.
func (*MetadataCreate) AddStatusIDs ¶
func (mc *MetadataCreate) AddStatusIDs(ids ...gidx.PrefixedID) *MetadataCreate
AddStatusIDs adds the "statuses" edge to the Status entity by IDs.
func (*MetadataCreate) AddStatuses ¶
func (mc *MetadataCreate) AddStatuses(s ...*Status) *MetadataCreate
AddStatuses adds the "statuses" edges to the Status entity.
func (*MetadataCreate) Exec ¶
func (mc *MetadataCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataCreate) ExecX ¶
func (mc *MetadataCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataCreate) Mutation ¶
func (mc *MetadataCreate) Mutation() *MetadataMutation
Mutation returns the MetadataMutation object of the builder.
func (*MetadataCreate) Save ¶
func (mc *MetadataCreate) Save(ctx context.Context) (*Metadata, error)
Save creates the Metadata in the database.
func (*MetadataCreate) SaveX ¶
func (mc *MetadataCreate) SaveX(ctx context.Context) *Metadata
SaveX calls Save and panics if Save returns an error.
func (*MetadataCreate) SetCreatedAt ¶
func (mc *MetadataCreate) SetCreatedAt(t time.Time) *MetadataCreate
SetCreatedAt sets the "created_at" field.
func (*MetadataCreate) SetID ¶
func (mc *MetadataCreate) SetID(gi gidx.PrefixedID) *MetadataCreate
SetID sets the "id" field.
func (*MetadataCreate) SetNillableCreatedAt ¶
func (mc *MetadataCreate) SetNillableCreatedAt(t *time.Time) *MetadataCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MetadataCreate) SetNillableID ¶
func (mc *MetadataCreate) SetNillableID(gi *gidx.PrefixedID) *MetadataCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*MetadataCreate) SetNillableUpdatedAt ¶
func (mc *MetadataCreate) SetNillableUpdatedAt(t *time.Time) *MetadataCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MetadataCreate) SetNodeID ¶
func (mc *MetadataCreate) SetNodeID(gi gidx.PrefixedID) *MetadataCreate
SetNodeID sets the "node_id" field.
func (*MetadataCreate) SetUpdatedAt ¶
func (mc *MetadataCreate) SetUpdatedAt(t time.Time) *MetadataCreate
SetUpdatedAt sets the "updated_at" field.
type MetadataCreateBulk ¶
type MetadataCreateBulk struct {
// contains filtered or unexported fields
}
MetadataCreateBulk is the builder for creating many Metadata entities in bulk.
func (*MetadataCreateBulk) Exec ¶
func (mcb *MetadataCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataCreateBulk) ExecX ¶
func (mcb *MetadataCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MetadataDelete ¶
type MetadataDelete struct {
// contains filtered or unexported fields
}
MetadataDelete is the builder for deleting a Metadata entity.
func (*MetadataDelete) Exec ¶
func (md *MetadataDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MetadataDelete) ExecX ¶
func (md *MetadataDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MetadataDelete) Where ¶
func (md *MetadataDelete) Where(ps ...predicate.Metadata) *MetadataDelete
Where appends a list predicates to the MetadataDelete builder.
type MetadataDeleteOne ¶
type MetadataDeleteOne struct {
// contains filtered or unexported fields
}
MetadataDeleteOne is the builder for deleting a single Metadata entity.
func (*MetadataDeleteOne) Exec ¶
func (mdo *MetadataDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MetadataDeleteOne) ExecX ¶
func (mdo *MetadataDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataDeleteOne) Where ¶
func (mdo *MetadataDeleteOne) Where(ps ...predicate.Metadata) *MetadataDeleteOne
Where appends a list predicates to the MetadataDelete builder.
type MetadataEdge ¶
MetadataEdge is the edge representation of Metadata.
type MetadataEdges ¶
type MetadataEdges struct { // Annotations holds the value of the annotations edge. Annotations []*Annotation `json:"annotations,omitempty"` // Statuses holds the value of the statuses edge. Statuses []*Status `json:"statuses,omitempty"` // contains filtered or unexported fields }
MetadataEdges holds the relations/edges for other nodes in the graph.
func (MetadataEdges) AnnotationsOrErr ¶
func (e MetadataEdges) AnnotationsOrErr() ([]*Annotation, error)
AnnotationsOrErr returns the Annotations value or an error if the edge was not loaded in eager-loading.
func (MetadataEdges) StatusesOrErr ¶
func (e MetadataEdges) StatusesOrErr() ([]*Status, error)
StatusesOrErr returns the Statuses value or an error if the edge was not loaded in eager-loading.
type MetadataGroupBy ¶
type MetadataGroupBy struct {
// contains filtered or unexported fields
}
MetadataGroupBy is the group-by builder for Metadata entities.
func (*MetadataGroupBy) Aggregate ¶
func (mgb *MetadataGroupBy) Aggregate(fns ...AggregateFunc) *MetadataGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MetadataGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MetadataGroupBy) Scan ¶
func (mgb *MetadataGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MetadataGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MetadataMutation ¶
type MetadataMutation struct {
// contains filtered or unexported fields
}
MetadataMutation represents an operation that mutates the Metadata nodes in the graph.
func (*MetadataMutation) AddAnnotationIDs ¶
func (m *MetadataMutation) AddAnnotationIDs(ids ...gidx.PrefixedID)
AddAnnotationIDs adds the "annotations" edge to the Annotation entity by ids.
func (*MetadataMutation) AddField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) AddStatusIDs ¶
func (m *MetadataMutation) AddStatusIDs(ids ...gidx.PrefixedID)
AddStatusIDs adds the "statuses" edge to the Status entity by ids.
func (*MetadataMutation) AddedEdges ¶
func (m *MetadataMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MetadataMutation) AddedField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) AddedFields ¶
func (m *MetadataMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MetadataMutation) AddedIDs ¶
func (m *MetadataMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MetadataMutation) AnnotationsCleared ¶
func (m *MetadataMutation) AnnotationsCleared() bool
AnnotationsCleared reports if the "annotations" edge to the Annotation entity was cleared.
func (*MetadataMutation) AnnotationsIDs ¶
func (m *MetadataMutation) AnnotationsIDs() (ids []gidx.PrefixedID)
AnnotationsIDs returns the "annotations" edge IDs in the mutation.
func (*MetadataMutation) ClearAnnotations ¶
func (m *MetadataMutation) ClearAnnotations()
ClearAnnotations clears the "annotations" edge to the Annotation entity.
func (*MetadataMutation) ClearEdge ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ClearField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ClearStatuses ¶
func (m *MetadataMutation) ClearStatuses()
ClearStatuses clears the "statuses" edge to the Status entity.
func (*MetadataMutation) ClearedEdges ¶
func (m *MetadataMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MetadataMutation) ClearedFields ¶
func (m *MetadataMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MetadataMutation) Client ¶
func (m MetadataMutation) 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 (*MetadataMutation) CreatedAt ¶
func (m *MetadataMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MetadataMutation) EdgeCleared ¶
func (m *MetadataMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MetadataMutation) Field ¶
func (m *MetadataMutation) 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 (*MetadataMutation) FieldCleared ¶
func (m *MetadataMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MetadataMutation) Fields ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ID ¶
func (m *MetadataMutation) ID() (id gidx.PrefixedID, 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 (*MetadataMutation) IDs ¶
func (m *MetadataMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, 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 (*MetadataMutation) NodeID ¶
func (m *MetadataMutation) NodeID() (r gidx.PrefixedID, exists bool)
NodeID returns the value of the "node_id" field in the mutation.
func (*MetadataMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Metadata entity. If the Metadata 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 (*MetadataMutation) 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 (*MetadataMutation) OldNodeID ¶
func (m *MetadataMutation) OldNodeID(ctx context.Context) (v gidx.PrefixedID, err error)
OldNodeID returns the old "node_id" field's value of the Metadata entity. If the Metadata 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 (*MetadataMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Metadata entity. If the Metadata 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 (*MetadataMutation) RemoveAnnotationIDs ¶
func (m *MetadataMutation) RemoveAnnotationIDs(ids ...gidx.PrefixedID)
RemoveAnnotationIDs removes the "annotations" edge to the Annotation entity by IDs.
func (*MetadataMutation) RemoveStatusIDs ¶
func (m *MetadataMutation) RemoveStatusIDs(ids ...gidx.PrefixedID)
RemoveStatusIDs removes the "statuses" edge to the Status entity by IDs.
func (*MetadataMutation) RemovedAnnotationsIDs ¶
func (m *MetadataMutation) RemovedAnnotationsIDs() (ids []gidx.PrefixedID)
RemovedAnnotations returns the removed IDs of the "annotations" edge to the Annotation entity.
func (*MetadataMutation) RemovedEdges ¶
func (m *MetadataMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MetadataMutation) RemovedIDs ¶
func (m *MetadataMutation) 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 (*MetadataMutation) RemovedStatusesIDs ¶
func (m *MetadataMutation) RemovedStatusesIDs() (ids []gidx.PrefixedID)
RemovedStatuses returns the removed IDs of the "statuses" edge to the Status entity.
func (*MetadataMutation) ResetAnnotations ¶
func (m *MetadataMutation) ResetAnnotations()
ResetAnnotations resets all changes to the "annotations" edge.
func (*MetadataMutation) ResetCreatedAt ¶
func (m *MetadataMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MetadataMutation) ResetEdge ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ResetField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) ResetNodeID ¶
func (m *MetadataMutation) ResetNodeID()
ResetNodeID resets all changes to the "node_id" field.
func (*MetadataMutation) ResetStatuses ¶
func (m *MetadataMutation) ResetStatuses()
ResetStatuses resets all changes to the "statuses" edge.
func (*MetadataMutation) ResetUpdatedAt ¶
func (m *MetadataMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MetadataMutation) SetCreatedAt ¶
func (m *MetadataMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MetadataMutation) SetField ¶
func (m *MetadataMutation) 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 (*MetadataMutation) SetID ¶
func (m *MetadataMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Metadata entities.
func (*MetadataMutation) SetNodeID ¶
func (m *MetadataMutation) SetNodeID(gi gidx.PrefixedID)
SetNodeID sets the "node_id" field.
func (*MetadataMutation) SetOp ¶
func (m *MetadataMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MetadataMutation) SetUpdatedAt ¶
func (m *MetadataMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MetadataMutation) StatusesCleared ¶
func (m *MetadataMutation) StatusesCleared() bool
StatusesCleared reports if the "statuses" edge to the Status entity was cleared.
func (*MetadataMutation) StatusesIDs ¶
func (m *MetadataMutation) StatusesIDs() (ids []gidx.PrefixedID)
StatusesIDs returns the "statuses" edge IDs in the mutation.
func (MetadataMutation) Tx ¶
func (m MetadataMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MetadataMutation) Type ¶
func (m *MetadataMutation) Type() string
Type returns the node type of this mutation (Metadata).
func (*MetadataMutation) UpdatedAt ¶
func (m *MetadataMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MetadataMutation) Where ¶
func (m *MetadataMutation) Where(ps ...predicate.Metadata)
Where appends a list predicates to the MetadataMutation builder.
func (*MetadataMutation) WhereP ¶
func (m *MetadataMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MetadataMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MetadataOrder ¶
type MetadataOrder struct { Direction OrderDirection `json:"direction"` Field *MetadataOrderField `json:"field"` }
MetadataOrder defines the ordering of Metadata.
type MetadataOrderField ¶
type MetadataOrderField struct { // Value extracts the ordering value from the given Metadata. Value func(*Metadata) (ent.Value, error) // contains filtered or unexported fields }
MetadataOrderField defines the ordering field of Metadata.
func (MetadataOrderField) MarshalGQL ¶
func (f MetadataOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (MetadataOrderField) String ¶
func (f MetadataOrderField) String() string
String implement fmt.Stringer interface.
func (*MetadataOrderField) UnmarshalGQL ¶
func (f *MetadataOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type MetadataPaginateOption ¶
type MetadataPaginateOption func(*metadataPager) error
MetadataPaginateOption enables pagination customization.
func WithMetadataFilter ¶
func WithMetadataFilter(filter func(*MetadataQuery) (*MetadataQuery, error)) MetadataPaginateOption
WithMetadataFilter configures pagination filter.
func WithMetadataOrder ¶
func WithMetadataOrder(order *MetadataOrder) MetadataPaginateOption
WithMetadataOrder configures pagination ordering.
type MetadataQuery ¶
type MetadataQuery struct {
// contains filtered or unexported fields
}
MetadataQuery is the builder for querying Metadata entities.
func (*MetadataQuery) Aggregate ¶
func (mq *MetadataQuery) Aggregate(fns ...AggregateFunc) *MetadataSelect
Aggregate returns a MetadataSelect configured with the given aggregations.
func (*MetadataQuery) All ¶
func (mq *MetadataQuery) All(ctx context.Context) ([]*Metadata, error)
All executes the query and returns a list of MetadataSlice.
func (*MetadataQuery) AllX ¶
func (mq *MetadataQuery) AllX(ctx context.Context) []*Metadata
AllX is like All, but panics if an error occurs.
func (*MetadataQuery) Clone ¶
func (mq *MetadataQuery) Clone() *MetadataQuery
Clone returns a duplicate of the MetadataQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MetadataQuery) CollectFields ¶
func (m *MetadataQuery) CollectFields(ctx context.Context, satisfies ...string) (*MetadataQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*MetadataQuery) Count ¶
func (mq *MetadataQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MetadataQuery) CountX ¶
func (mq *MetadataQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MetadataQuery) Exist ¶
func (mq *MetadataQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MetadataQuery) ExistX ¶
func (mq *MetadataQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MetadataQuery) First ¶
func (mq *MetadataQuery) First(ctx context.Context) (*Metadata, error)
First returns the first Metadata entity from the query. Returns a *NotFoundError when no Metadata was found.
func (*MetadataQuery) FirstID ¶
func (mq *MetadataQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
FirstID returns the first Metadata ID from the query. Returns a *NotFoundError when no Metadata ID was found.
func (*MetadataQuery) FirstIDX ¶
func (mq *MetadataQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*MetadataQuery) FirstX ¶
func (mq *MetadataQuery) FirstX(ctx context.Context) *Metadata
FirstX is like First, but panics if an error occurs.
func (*MetadataQuery) GroupBy ¶
func (mq *MetadataQuery) GroupBy(field string, fields ...string) *MetadataGroupBy
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.Metadata.Query(). GroupBy(metadata.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*MetadataQuery) IDs ¶
func (mq *MetadataQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
IDs executes the query and returns a list of Metadata IDs.
func (*MetadataQuery) IDsX ¶
func (mq *MetadataQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*MetadataQuery) Limit ¶
func (mq *MetadataQuery) Limit(limit int) *MetadataQuery
Limit the number of records to be returned by this query.
func (*MetadataQuery) Offset ¶
func (mq *MetadataQuery) Offset(offset int) *MetadataQuery
Offset to start from.
func (*MetadataQuery) Only ¶
func (mq *MetadataQuery) Only(ctx context.Context) (*Metadata, error)
Only returns a single Metadata entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Metadata entity is found. Returns a *NotFoundError when no Metadata entities are found.
func (*MetadataQuery) OnlyID ¶
func (mq *MetadataQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
OnlyID is like Only, but returns the only Metadata ID in the query. Returns a *NotSingularError when more than one Metadata ID is found. Returns a *NotFoundError when no entities are found.
func (*MetadataQuery) OnlyIDX ¶
func (mq *MetadataQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MetadataQuery) OnlyX ¶
func (mq *MetadataQuery) OnlyX(ctx context.Context) *Metadata
OnlyX is like Only, but panics if an error occurs.
func (*MetadataQuery) Order ¶
func (mq *MetadataQuery) Order(o ...metadata.OrderOption) *MetadataQuery
Order specifies how the records should be ordered.
func (*MetadataQuery) Paginate ¶
func (m *MetadataQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...MetadataPaginateOption, ) (*MetadataConnection, error)
Paginate executes the query and returns a relay based cursor connection to Metadata.
func (*MetadataQuery) QueryAnnotations ¶
func (mq *MetadataQuery) QueryAnnotations() *AnnotationQuery
QueryAnnotations chains the current query on the "annotations" edge.
func (*MetadataQuery) QueryStatuses ¶
func (mq *MetadataQuery) QueryStatuses() *StatusQuery
QueryStatuses chains the current query on the "statuses" edge.
func (*MetadataQuery) Select ¶
func (mq *MetadataQuery) Select(fields ...string) *MetadataSelect
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.Metadata.Query(). Select(metadata.FieldCreatedAt). Scan(ctx, &v)
func (*MetadataQuery) Unique ¶
func (mq *MetadataQuery) Unique(unique bool) *MetadataQuery
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 (*MetadataQuery) Where ¶
func (mq *MetadataQuery) Where(ps ...predicate.Metadata) *MetadataQuery
Where adds a new predicate for the MetadataQuery builder.
func (*MetadataQuery) WithAnnotations ¶
func (mq *MetadataQuery) WithAnnotations(opts ...func(*AnnotationQuery)) *MetadataQuery
WithAnnotations tells the query-builder to eager-load the nodes that are connected to the "annotations" edge. The optional arguments are used to configure the query builder of the edge.
func (*MetadataQuery) WithNamedAnnotations ¶
func (mq *MetadataQuery) WithNamedAnnotations(name string, opts ...func(*AnnotationQuery)) *MetadataQuery
WithNamedAnnotations tells the query-builder to eager-load the nodes that are connected to the "annotations" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*MetadataQuery) WithNamedStatuses ¶
func (mq *MetadataQuery) WithNamedStatuses(name string, opts ...func(*StatusQuery)) *MetadataQuery
WithNamedStatuses tells the query-builder to eager-load the nodes that are connected to the "statuses" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*MetadataQuery) WithStatuses ¶
func (mq *MetadataQuery) WithStatuses(opts ...func(*StatusQuery)) *MetadataQuery
WithStatuses tells the query-builder to eager-load the nodes that are connected to the "statuses" edge. The optional arguments are used to configure the query builder of the edge.
type MetadataSelect ¶
type MetadataSelect struct { *MetadataQuery // contains filtered or unexported fields }
MetadataSelect is the builder for selecting fields of Metadata entities.
func (*MetadataSelect) Aggregate ¶
func (ms *MetadataSelect) Aggregate(fns ...AggregateFunc) *MetadataSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MetadataSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MetadataSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MetadataSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MetadataSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MetadataSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MetadataSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MetadataSelect) Scan ¶
func (ms *MetadataSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MetadataSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MetadataUpdate ¶
type MetadataUpdate struct {
// contains filtered or unexported fields
}
MetadataUpdate is the builder for updating Metadata entities.
func (*MetadataUpdate) AddAnnotationIDs ¶
func (mu *MetadataUpdate) AddAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdate
AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.
func (*MetadataUpdate) AddAnnotations ¶
func (mu *MetadataUpdate) AddAnnotations(a ...*Annotation) *MetadataUpdate
AddAnnotations adds the "annotations" edges to the Annotation entity.
func (*MetadataUpdate) AddStatusIDs ¶
func (mu *MetadataUpdate) AddStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdate
AddStatusIDs adds the "statuses" edge to the Status entity by IDs.
func (*MetadataUpdate) AddStatuses ¶
func (mu *MetadataUpdate) AddStatuses(s ...*Status) *MetadataUpdate
AddStatuses adds the "statuses" edges to the Status entity.
func (*MetadataUpdate) ClearAnnotations ¶
func (mu *MetadataUpdate) ClearAnnotations() *MetadataUpdate
ClearAnnotations clears all "annotations" edges to the Annotation entity.
func (*MetadataUpdate) ClearStatuses ¶
func (mu *MetadataUpdate) ClearStatuses() *MetadataUpdate
ClearStatuses clears all "statuses" edges to the Status entity.
func (*MetadataUpdate) Exec ¶
func (mu *MetadataUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MetadataUpdate) ExecX ¶
func (mu *MetadataUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataUpdate) Mutation ¶
func (mu *MetadataUpdate) Mutation() *MetadataMutation
Mutation returns the MetadataMutation object of the builder.
func (*MetadataUpdate) RemoveAnnotationIDs ¶
func (mu *MetadataUpdate) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdate
RemoveAnnotationIDs removes the "annotations" edge to Annotation entities by IDs.
func (*MetadataUpdate) RemoveAnnotations ¶
func (mu *MetadataUpdate) RemoveAnnotations(a ...*Annotation) *MetadataUpdate
RemoveAnnotations removes "annotations" edges to Annotation entities.
func (*MetadataUpdate) RemoveStatusIDs ¶
func (mu *MetadataUpdate) RemoveStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdate
RemoveStatusIDs removes the "statuses" edge to Status entities by IDs.
func (*MetadataUpdate) RemoveStatuses ¶
func (mu *MetadataUpdate) RemoveStatuses(s ...*Status) *MetadataUpdate
RemoveStatuses removes "statuses" edges to Status entities.
func (*MetadataUpdate) Save ¶
func (mu *MetadataUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MetadataUpdate) SaveX ¶
func (mu *MetadataUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MetadataUpdate) Where ¶
func (mu *MetadataUpdate) Where(ps ...predicate.Metadata) *MetadataUpdate
Where appends a list predicates to the MetadataUpdate builder.
type MetadataUpdateOne ¶
type MetadataUpdateOne struct {
// contains filtered or unexported fields
}
MetadataUpdateOne is the builder for updating a single Metadata entity.
func (*MetadataUpdateOne) AddAnnotationIDs ¶
func (muo *MetadataUpdateOne) AddAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne
AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.
func (*MetadataUpdateOne) AddAnnotations ¶
func (muo *MetadataUpdateOne) AddAnnotations(a ...*Annotation) *MetadataUpdateOne
AddAnnotations adds the "annotations" edges to the Annotation entity.
func (*MetadataUpdateOne) AddStatusIDs ¶
func (muo *MetadataUpdateOne) AddStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne
AddStatusIDs adds the "statuses" edge to the Status entity by IDs.
func (*MetadataUpdateOne) AddStatuses ¶
func (muo *MetadataUpdateOne) AddStatuses(s ...*Status) *MetadataUpdateOne
AddStatuses adds the "statuses" edges to the Status entity.
func (*MetadataUpdateOne) ClearAnnotations ¶
func (muo *MetadataUpdateOne) ClearAnnotations() *MetadataUpdateOne
ClearAnnotations clears all "annotations" edges to the Annotation entity.
func (*MetadataUpdateOne) ClearStatuses ¶
func (muo *MetadataUpdateOne) ClearStatuses() *MetadataUpdateOne
ClearStatuses clears all "statuses" edges to the Status entity.
func (*MetadataUpdateOne) Exec ¶
func (muo *MetadataUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MetadataUpdateOne) ExecX ¶
func (muo *MetadataUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetadataUpdateOne) Mutation ¶
func (muo *MetadataUpdateOne) Mutation() *MetadataMutation
Mutation returns the MetadataMutation object of the builder.
func (*MetadataUpdateOne) RemoveAnnotationIDs ¶
func (muo *MetadataUpdateOne) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne
RemoveAnnotationIDs removes the "annotations" edge to Annotation entities by IDs.
func (*MetadataUpdateOne) RemoveAnnotations ¶
func (muo *MetadataUpdateOne) RemoveAnnotations(a ...*Annotation) *MetadataUpdateOne
RemoveAnnotations removes "annotations" edges to Annotation entities.
func (*MetadataUpdateOne) RemoveStatusIDs ¶
func (muo *MetadataUpdateOne) RemoveStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne
RemoveStatusIDs removes the "statuses" edge to Status entities by IDs.
func (*MetadataUpdateOne) RemoveStatuses ¶
func (muo *MetadataUpdateOne) RemoveStatuses(s ...*Status) *MetadataUpdateOne
RemoveStatuses removes "statuses" edges to Status entities.
func (*MetadataUpdateOne) Save ¶
func (muo *MetadataUpdateOne) Save(ctx context.Context) (*Metadata, error)
Save executes the query and returns the updated Metadata entity.
func (*MetadataUpdateOne) SaveX ¶
func (muo *MetadataUpdateOne) SaveX(ctx context.Context) *Metadata
SaveX is like Save, but panics if an error occurs.
func (*MetadataUpdateOne) Select ¶
func (muo *MetadataUpdateOne) Select(field string, fields ...string) *MetadataUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MetadataUpdateOne) Where ¶
func (muo *MetadataUpdateOne) Where(ps ...predicate.Metadata) *MetadataUpdateOne
Where appends a list predicates to the MetadataUpdate builder.
type MetadataWhereInput ¶
type MetadataWhereInput struct { Predicates []predicate.Metadata `json:"-"` Not *MetadataWhereInput `json:"not,omitempty"` Or []*MetadataWhereInput `json:"or,omitempty"` And []*MetadataWhereInput `json:"and,omitempty"` // "id" field predicates. ID *gidx.PrefixedID `json:"id,omitempty"` IDNEQ *gidx.PrefixedID `json:"idNEQ,omitempty"` IDIn []gidx.PrefixedID `json:"idIn,omitempty"` IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"` IDGT *gidx.PrefixedID `json:"idGT,omitempty"` IDGTE *gidx.PrefixedID `json:"idGTE,omitempty"` IDLT *gidx.PrefixedID `json:"idLT,omitempty"` IDLTE *gidx.PrefixedID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "annotations" edge predicates. HasAnnotations *bool `json:"hasAnnotations,omitempty"` HasAnnotationsWith []*AnnotationWhereInput `json:"hasAnnotationsWith,omitempty"` // "statuses" edge predicates. HasStatuses *bool `json:"hasStatuses,omitempty"` HasStatusesWith []*StatusWhereInput `json:"hasStatusesWith,omitempty"` }
MetadataWhereInput represents a where input for filtering Metadata queries.
func (*MetadataWhereInput) AddPredicates ¶
func (i *MetadataWhereInput) AddPredicates(predicates ...predicate.Metadata)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*MetadataWhereInput) Filter ¶
func (i *MetadataWhereInput) Filter(q *MetadataQuery) (*MetadataQuery, error)
Filter applies the MetadataWhereInput filter on the MetadataQuery builder.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
func WithNodeType(f func(context.Context, gidx.PrefixedID) (string, error)) NodeOption
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
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 Option ¶
type Option func(*config)
Option function to configure the client.
func EventsPublisher ¶
func EventsPublisher(v events.Connection) Option
EventsPublisher configures the EventsPublisher.
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 Status ¶
type Status struct { // ID of the ent. ID gidx.PrefixedID `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"` // ID of the metadata of this status MetadataID gidx.PrefixedID `json:"metadata_id,omitempty"` // StatusNamespaceID holds the value of the "status_namespace_id" field. StatusNamespaceID gidx.PrefixedID `json:"status_namespace_id,omitempty"` // Source holds the value of the "source" field. Source string `json:"source,omitempty"` // JSON formatted data of this annotation. Data json.RawMessage `json:"data,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the StatusQuery when eager-loading is set. Edges StatusEdges `json:"edges"` // contains filtered or unexported fields }
Status is the model entity for the Status schema.
func (*Status) IsNode ¶
func (n *Status) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Status) Namespace ¶
func (s *Status) Namespace(ctx context.Context) (*StatusNamespace, error)
func (*Status) QueryMetadata ¶
func (s *Status) QueryMetadata() *MetadataQuery
QueryMetadata queries the "metadata" edge of the Status entity.
func (*Status) QueryNamespace ¶
func (s *Status) QueryNamespace() *StatusNamespaceQuery
QueryNamespace queries the "namespace" edge of the Status entity.
func (*Status) ToEdge ¶
func (s *Status) ToEdge(order *StatusOrder) *StatusEdge
ToEdge converts Status into StatusEdge.
func (*Status) Unwrap ¶
Unwrap unwraps the Status 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 (*Status) Update ¶
func (s *Status) Update() *StatusUpdateOne
Update returns a builder for updating this Status. Note that you need to call Status.Unwrap() before calling this method if this Status was returned from a transaction, and the transaction was committed or rolled back.
type StatusClient ¶
type StatusClient struct {
// contains filtered or unexported fields
}
StatusClient is a client for the Status schema.
func NewStatusClient ¶
func NewStatusClient(c config) *StatusClient
NewStatusClient returns a client for the Status from the given config.
func (*StatusClient) Create ¶
func (c *StatusClient) Create() *StatusCreate
Create returns a builder for creating a Status entity.
func (*StatusClient) CreateBulk ¶
func (c *StatusClient) CreateBulk(builders ...*StatusCreate) *StatusCreateBulk
CreateBulk returns a builder for creating a bulk of Status entities.
func (*StatusClient) Delete ¶
func (c *StatusClient) Delete() *StatusDelete
Delete returns a delete builder for Status.
func (*StatusClient) DeleteOne ¶
func (c *StatusClient) DeleteOne(s *Status) *StatusDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*StatusClient) DeleteOneID ¶
func (c *StatusClient) DeleteOneID(id gidx.PrefixedID) *StatusDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*StatusClient) Get ¶
func (c *StatusClient) Get(ctx context.Context, id gidx.PrefixedID) (*Status, error)
Get returns a Status entity by its id.
func (*StatusClient) GetX ¶
func (c *StatusClient) GetX(ctx context.Context, id gidx.PrefixedID) *Status
GetX is like Get, but panics if an error occurs.
func (*StatusClient) Intercept ¶
func (c *StatusClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `status.Intercept(f(g(h())))`.
func (*StatusClient) Interceptors ¶
func (c *StatusClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*StatusClient) MapCreateBulk ¶ added in v0.0.2
func (c *StatusClient) MapCreateBulk(slice any, setFunc func(*StatusCreate, int)) *StatusCreateBulk
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 (*StatusClient) Query ¶
func (c *StatusClient) Query() *StatusQuery
Query returns a query builder for Status.
func (*StatusClient) QueryMetadata ¶
func (c *StatusClient) QueryMetadata(s *Status) *MetadataQuery
QueryMetadata queries the metadata edge of a Status.
func (*StatusClient) QueryNamespace ¶
func (c *StatusClient) QueryNamespace(s *Status) *StatusNamespaceQuery
QueryNamespace queries the namespace edge of a Status.
func (*StatusClient) Update ¶
func (c *StatusClient) Update() *StatusUpdate
Update returns an update builder for Status.
func (*StatusClient) UpdateOne ¶
func (c *StatusClient) UpdateOne(s *Status) *StatusUpdateOne
UpdateOne returns an update builder for the given entity.
func (*StatusClient) UpdateOneID ¶
func (c *StatusClient) UpdateOneID(id gidx.PrefixedID) *StatusUpdateOne
UpdateOneID returns an update builder for the given id.
func (*StatusClient) Use ¶
func (c *StatusClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `status.Hooks(f(g(h())))`.
type StatusConnection ¶
type StatusConnection struct { Edges []*StatusEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
StatusConnection is the connection containing edges to Status.
type StatusCreate ¶
type StatusCreate struct {
// contains filtered or unexported fields
}
StatusCreate is the builder for creating a Status entity.
func (*StatusCreate) Exec ¶
func (sc *StatusCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*StatusCreate) ExecX ¶
func (sc *StatusCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusCreate) Mutation ¶
func (sc *StatusCreate) Mutation() *StatusMutation
Mutation returns the StatusMutation object of the builder.
func (*StatusCreate) Save ¶
func (sc *StatusCreate) Save(ctx context.Context) (*Status, error)
Save creates the Status in the database.
func (*StatusCreate) SaveX ¶
func (sc *StatusCreate) SaveX(ctx context.Context) *Status
SaveX calls Save and panics if Save returns an error.
func (*StatusCreate) SetCreatedAt ¶
func (sc *StatusCreate) SetCreatedAt(t time.Time) *StatusCreate
SetCreatedAt sets the "created_at" field.
func (*StatusCreate) SetData ¶
func (sc *StatusCreate) SetData(jm json.RawMessage) *StatusCreate
SetData sets the "data" field.
func (*StatusCreate) SetID ¶
func (sc *StatusCreate) SetID(gi gidx.PrefixedID) *StatusCreate
SetID sets the "id" field.
func (*StatusCreate) SetInput ¶
func (c *StatusCreate) SetInput(i CreateStatusInput) *StatusCreate
SetInput applies the change-set in the CreateStatusInput on the StatusCreate builder.
func (*StatusCreate) SetMetadata ¶
func (sc *StatusCreate) SetMetadata(m *Metadata) *StatusCreate
SetMetadata sets the "metadata" edge to the Metadata entity.
func (*StatusCreate) SetMetadataID ¶
func (sc *StatusCreate) SetMetadataID(gi gidx.PrefixedID) *StatusCreate
SetMetadataID sets the "metadata_id" field.
func (*StatusCreate) SetNamespace ¶
func (sc *StatusCreate) SetNamespace(s *StatusNamespace) *StatusCreate
SetNamespace sets the "namespace" edge to the StatusNamespace entity.
func (*StatusCreate) SetNamespaceID ¶
func (sc *StatusCreate) SetNamespaceID(id gidx.PrefixedID) *StatusCreate
SetNamespaceID sets the "namespace" edge to the StatusNamespace entity by ID.
func (*StatusCreate) SetNillableCreatedAt ¶
func (sc *StatusCreate) SetNillableCreatedAt(t *time.Time) *StatusCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*StatusCreate) SetNillableID ¶
func (sc *StatusCreate) SetNillableID(gi *gidx.PrefixedID) *StatusCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*StatusCreate) SetNillableUpdatedAt ¶
func (sc *StatusCreate) SetNillableUpdatedAt(t *time.Time) *StatusCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*StatusCreate) SetSource ¶
func (sc *StatusCreate) SetSource(s string) *StatusCreate
SetSource sets the "source" field.
func (*StatusCreate) SetStatusNamespaceID ¶
func (sc *StatusCreate) SetStatusNamespaceID(gi gidx.PrefixedID) *StatusCreate
SetStatusNamespaceID sets the "status_namespace_id" field.
func (*StatusCreate) SetUpdatedAt ¶
func (sc *StatusCreate) SetUpdatedAt(t time.Time) *StatusCreate
SetUpdatedAt sets the "updated_at" field.
type StatusCreateBulk ¶
type StatusCreateBulk struct {
// contains filtered or unexported fields
}
StatusCreateBulk is the builder for creating many Status entities in bulk.
func (*StatusCreateBulk) Exec ¶
func (scb *StatusCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StatusCreateBulk) ExecX ¶
func (scb *StatusCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type StatusDelete ¶
type StatusDelete struct {
// contains filtered or unexported fields
}
StatusDelete is the builder for deleting a Status entity.
func (*StatusDelete) Exec ¶
func (sd *StatusDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*StatusDelete) ExecX ¶
func (sd *StatusDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*StatusDelete) Where ¶
func (sd *StatusDelete) Where(ps ...predicate.Status) *StatusDelete
Where appends a list predicates to the StatusDelete builder.
type StatusDeleteOne ¶
type StatusDeleteOne struct {
// contains filtered or unexported fields
}
StatusDeleteOne is the builder for deleting a single Status entity.
func (*StatusDeleteOne) Exec ¶
func (sdo *StatusDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*StatusDeleteOne) ExecX ¶
func (sdo *StatusDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusDeleteOne) Where ¶
func (sdo *StatusDeleteOne) Where(ps ...predicate.Status) *StatusDeleteOne
Where appends a list predicates to the StatusDelete builder.
type StatusEdge ¶
StatusEdge is the edge representation of Status.
type StatusEdges ¶
type StatusEdges struct { // Namespace holds the value of the namespace edge. Namespace *StatusNamespace `json:"namespace,omitempty"` // Metadata holds the value of the metadata edge. Metadata *Metadata `json:"metadata,omitempty"` // contains filtered or unexported fields }
StatusEdges holds the relations/edges for other nodes in the graph.
func (StatusEdges) MetadataOrErr ¶
func (e StatusEdges) MetadataOrErr() (*Metadata, error)
MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (StatusEdges) NamespaceOrErr ¶
func (e StatusEdges) NamespaceOrErr() (*StatusNamespace, error)
NamespaceOrErr returns the Namespace value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type StatusGroupBy ¶
type StatusGroupBy struct {
// contains filtered or unexported fields
}
StatusGroupBy is the group-by builder for Status entities.
func (*StatusGroupBy) Aggregate ¶
func (sgb *StatusGroupBy) Aggregate(fns ...AggregateFunc) *StatusGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*StatusGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Scan ¶
func (sgb *StatusGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StatusGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StatusMutation ¶
type StatusMutation struct {
// contains filtered or unexported fields
}
StatusMutation represents an operation that mutates the Status nodes in the graph.
func (*StatusMutation) AddField ¶
func (m *StatusMutation) 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 (*StatusMutation) AddedEdges ¶
func (m *StatusMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*StatusMutation) AddedField ¶
func (m *StatusMutation) 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 (*StatusMutation) AddedFields ¶
func (m *StatusMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*StatusMutation) AddedIDs ¶
func (m *StatusMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*StatusMutation) AppendData ¶
func (m *StatusMutation) AppendData(jm json.RawMessage)
AppendData adds jm to the "data" field.
func (*StatusMutation) AppendedData ¶
func (m *StatusMutation) AppendedData() (json.RawMessage, bool)
AppendedData returns the list of values that were appended to the "data" field in this mutation.
func (*StatusMutation) ClearEdge ¶
func (m *StatusMutation) 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 (*StatusMutation) ClearField ¶
func (m *StatusMutation) 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 (*StatusMutation) ClearMetadata ¶
func (m *StatusMutation) ClearMetadata()
ClearMetadata clears the "metadata" edge to the Metadata entity.
func (*StatusMutation) ClearNamespace ¶
func (m *StatusMutation) ClearNamespace()
ClearNamespace clears the "namespace" edge to the StatusNamespace entity.
func (*StatusMutation) ClearedEdges ¶
func (m *StatusMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*StatusMutation) ClearedFields ¶
func (m *StatusMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (StatusMutation) Client ¶
func (m StatusMutation) 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 (*StatusMutation) CreatedAt ¶
func (m *StatusMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*StatusMutation) Data ¶
func (m *StatusMutation) Data() (r json.RawMessage, exists bool)
Data returns the value of the "data" field in the mutation.
func (*StatusMutation) EdgeCleared ¶
func (m *StatusMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*StatusMutation) Field ¶
func (m *StatusMutation) 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 (*StatusMutation) FieldCleared ¶
func (m *StatusMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*StatusMutation) Fields ¶
func (m *StatusMutation) 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 (*StatusMutation) ID ¶
func (m *StatusMutation) ID() (id gidx.PrefixedID, 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 (*StatusMutation) IDs ¶
func (m *StatusMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, 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 (*StatusMutation) MetadataCleared ¶
func (m *StatusMutation) MetadataCleared() bool
MetadataCleared reports if the "metadata" edge to the Metadata entity was cleared.
func (*StatusMutation) MetadataID ¶
func (m *StatusMutation) MetadataID() (r gidx.PrefixedID, exists bool)
MetadataID returns the value of the "metadata_id" field in the mutation.
func (*StatusMutation) MetadataIDs ¶
func (m *StatusMutation) MetadataIDs() (ids []gidx.PrefixedID)
MetadataIDs returns the "metadata" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MetadataID instead. It exists only for internal usage by the builders.
func (*StatusMutation) NamespaceCleared ¶
func (m *StatusMutation) NamespaceCleared() bool
NamespaceCleared reports if the "namespace" edge to the StatusNamespace entity was cleared.
func (*StatusMutation) NamespaceID ¶
func (m *StatusMutation) NamespaceID() (id gidx.PrefixedID, exists bool)
NamespaceID returns the "namespace" edge ID in the mutation.
func (*StatusMutation) NamespaceIDs ¶
func (m *StatusMutation) NamespaceIDs() (ids []gidx.PrefixedID)
NamespaceIDs returns the "namespace" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NamespaceID instead. It exists only for internal usage by the builders.
func (*StatusMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Status entity. If the Status 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 (*StatusMutation) OldData ¶
func (m *StatusMutation) OldData(ctx context.Context) (v json.RawMessage, err error)
OldData returns the old "data" field's value of the Status entity. If the Status 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 (*StatusMutation) 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 (*StatusMutation) OldMetadataID ¶
func (m *StatusMutation) OldMetadataID(ctx context.Context) (v gidx.PrefixedID, err error)
OldMetadataID returns the old "metadata_id" field's value of the Status entity. If the Status 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 (*StatusMutation) OldSource ¶
func (m *StatusMutation) OldSource(ctx context.Context) (v string, err error)
OldSource returns the old "source" field's value of the Status entity. If the Status 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 (*StatusMutation) OldStatusNamespaceID ¶
func (m *StatusMutation) OldStatusNamespaceID(ctx context.Context) (v gidx.PrefixedID, err error)
OldStatusNamespaceID returns the old "status_namespace_id" field's value of the Status entity. If the Status 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 (*StatusMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Status entity. If the Status 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 (*StatusMutation) RemovedEdges ¶
func (m *StatusMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*StatusMutation) RemovedIDs ¶
func (m *StatusMutation) 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 (*StatusMutation) ResetCreatedAt ¶
func (m *StatusMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*StatusMutation) ResetData ¶
func (m *StatusMutation) ResetData()
ResetData resets all changes to the "data" field.
func (*StatusMutation) ResetEdge ¶
func (m *StatusMutation) 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 (*StatusMutation) ResetField ¶
func (m *StatusMutation) 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 (*StatusMutation) ResetMetadata ¶
func (m *StatusMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" edge.
func (*StatusMutation) ResetMetadataID ¶
func (m *StatusMutation) ResetMetadataID()
ResetMetadataID resets all changes to the "metadata_id" field.
func (*StatusMutation) ResetNamespace ¶
func (m *StatusMutation) ResetNamespace()
ResetNamespace resets all changes to the "namespace" edge.
func (*StatusMutation) ResetSource ¶
func (m *StatusMutation) ResetSource()
ResetSource resets all changes to the "source" field.
func (*StatusMutation) ResetStatusNamespaceID ¶
func (m *StatusMutation) ResetStatusNamespaceID()
ResetStatusNamespaceID resets all changes to the "status_namespace_id" field.
func (*StatusMutation) ResetUpdatedAt ¶
func (m *StatusMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*StatusMutation) SetCreatedAt ¶
func (m *StatusMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*StatusMutation) SetData ¶
func (m *StatusMutation) SetData(jm json.RawMessage)
SetData sets the "data" field.
func (*StatusMutation) SetField ¶
func (m *StatusMutation) 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 (*StatusMutation) SetID ¶
func (m *StatusMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Status entities.
func (*StatusMutation) SetMetadataID ¶
func (m *StatusMutation) SetMetadataID(gi gidx.PrefixedID)
SetMetadataID sets the "metadata_id" field.
func (*StatusMutation) SetNamespaceID ¶
func (m *StatusMutation) SetNamespaceID(id gidx.PrefixedID)
SetNamespaceID sets the "namespace" edge to the StatusNamespace entity by id.
func (*StatusMutation) SetOp ¶
func (m *StatusMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*StatusMutation) SetSource ¶
func (m *StatusMutation) SetSource(s string)
SetSource sets the "source" field.
func (*StatusMutation) SetStatusNamespaceID ¶
func (m *StatusMutation) SetStatusNamespaceID(gi gidx.PrefixedID)
SetStatusNamespaceID sets the "status_namespace_id" field.
func (*StatusMutation) SetUpdatedAt ¶
func (m *StatusMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*StatusMutation) Source ¶
func (m *StatusMutation) Source() (r string, exists bool)
Source returns the value of the "source" field in the mutation.
func (*StatusMutation) StatusNamespaceID ¶
func (m *StatusMutation) StatusNamespaceID() (r gidx.PrefixedID, exists bool)
StatusNamespaceID returns the value of the "status_namespace_id" field in the mutation.
func (StatusMutation) Tx ¶
func (m StatusMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*StatusMutation) Type ¶
func (m *StatusMutation) Type() string
Type returns the node type of this mutation (Status).
func (*StatusMutation) UpdatedAt ¶
func (m *StatusMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*StatusMutation) Where ¶
func (m *StatusMutation) Where(ps ...predicate.Status)
Where appends a list predicates to the StatusMutation builder.
func (*StatusMutation) WhereP ¶
func (m *StatusMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the StatusMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type StatusNamespace ¶
type StatusNamespace struct { // ID of the ent. // The ID for the status namespace. ID gidx.PrefixedID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // The name of the status namespace. Name string `json:"name,omitempty"` // The ID of the resource provider for this status namespace. ResourceProviderID gidx.PrefixedID `json:"resource_provider_id,omitempty"` // Flag for if this namespace is private. Private bool `json:"private,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the StatusNamespaceQuery when eager-loading is set. Edges StatusNamespaceEdges `json:"edges"` // contains filtered or unexported fields }
Representation of a status namespace. Status namespaces are used group status data that is provided by a resource provider.
func (StatusNamespace) IsEntity ¶
func (sn StatusNamespace) IsEntity()
IsEntity implement fedruntime.Entity
func (*StatusNamespace) IsNode ¶
func (n *StatusNamespace) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*StatusNamespace) NamedStatuses ¶
func (sn *StatusNamespace) NamedStatuses(name string) ([]*Status, error)
NamedStatuses returns the Statuses named value or an error if the edge was not loaded in eager-loading with this name.
func (*StatusNamespace) QueryStatuses ¶
func (sn *StatusNamespace) QueryStatuses() *StatusQuery
QueryStatuses queries the "statuses" edge of the StatusNamespace entity.
func (*StatusNamespace) String ¶
func (sn *StatusNamespace) String() string
String implements the fmt.Stringer.
func (*StatusNamespace) ToEdge ¶
func (sn *StatusNamespace) ToEdge(order *StatusNamespaceOrder) *StatusNamespaceEdge
ToEdge converts StatusNamespace into StatusNamespaceEdge.
func (*StatusNamespace) Unwrap ¶
func (sn *StatusNamespace) Unwrap() *StatusNamespace
Unwrap unwraps the StatusNamespace 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 (*StatusNamespace) Update ¶
func (sn *StatusNamespace) Update() *StatusNamespaceUpdateOne
Update returns a builder for updating this StatusNamespace. Note that you need to call StatusNamespace.Unwrap() before calling this method if this StatusNamespace was returned from a transaction, and the transaction was committed or rolled back.
type StatusNamespaceClient ¶
type StatusNamespaceClient struct {
// contains filtered or unexported fields
}
StatusNamespaceClient is a client for the StatusNamespace schema.
func NewStatusNamespaceClient ¶
func NewStatusNamespaceClient(c config) *StatusNamespaceClient
NewStatusNamespaceClient returns a client for the StatusNamespace from the given config.
func (*StatusNamespaceClient) Create ¶
func (c *StatusNamespaceClient) Create() *StatusNamespaceCreate
Create returns a builder for creating a StatusNamespace entity.
func (*StatusNamespaceClient) CreateBulk ¶
func (c *StatusNamespaceClient) CreateBulk(builders ...*StatusNamespaceCreate) *StatusNamespaceCreateBulk
CreateBulk returns a builder for creating a bulk of StatusNamespace entities.
func (*StatusNamespaceClient) Delete ¶
func (c *StatusNamespaceClient) Delete() *StatusNamespaceDelete
Delete returns a delete builder for StatusNamespace.
func (*StatusNamespaceClient) DeleteOne ¶
func (c *StatusNamespaceClient) DeleteOne(sn *StatusNamespace) *StatusNamespaceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*StatusNamespaceClient) DeleteOneID ¶
func (c *StatusNamespaceClient) DeleteOneID(id gidx.PrefixedID) *StatusNamespaceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*StatusNamespaceClient) Get ¶
func (c *StatusNamespaceClient) Get(ctx context.Context, id gidx.PrefixedID) (*StatusNamespace, error)
Get returns a StatusNamespace entity by its id.
func (*StatusNamespaceClient) GetX ¶
func (c *StatusNamespaceClient) GetX(ctx context.Context, id gidx.PrefixedID) *StatusNamespace
GetX is like Get, but panics if an error occurs.
func (*StatusNamespaceClient) Hooks ¶
func (c *StatusNamespaceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*StatusNamespaceClient) Intercept ¶
func (c *StatusNamespaceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `statusnamespace.Intercept(f(g(h())))`.
func (*StatusNamespaceClient) Interceptors ¶
func (c *StatusNamespaceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*StatusNamespaceClient) MapCreateBulk ¶ added in v0.0.2
func (c *StatusNamespaceClient) MapCreateBulk(slice any, setFunc func(*StatusNamespaceCreate, int)) *StatusNamespaceCreateBulk
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 (*StatusNamespaceClient) Query ¶
func (c *StatusNamespaceClient) Query() *StatusNamespaceQuery
Query returns a query builder for StatusNamespace.
func (*StatusNamespaceClient) QueryStatuses ¶
func (c *StatusNamespaceClient) QueryStatuses(sn *StatusNamespace) *StatusQuery
QueryStatuses queries the statuses edge of a StatusNamespace.
func (*StatusNamespaceClient) Update ¶
func (c *StatusNamespaceClient) Update() *StatusNamespaceUpdate
Update returns an update builder for StatusNamespace.
func (*StatusNamespaceClient) UpdateOne ¶
func (c *StatusNamespaceClient) UpdateOne(sn *StatusNamespace) *StatusNamespaceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*StatusNamespaceClient) UpdateOneID ¶
func (c *StatusNamespaceClient) UpdateOneID(id gidx.PrefixedID) *StatusNamespaceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*StatusNamespaceClient) Use ¶
func (c *StatusNamespaceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `statusnamespace.Hooks(f(g(h())))`.
type StatusNamespaceConnection ¶
type StatusNamespaceConnection struct { Edges []*StatusNamespaceEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
StatusNamespaceConnection is the connection containing edges to StatusNamespace.
type StatusNamespaceCreate ¶
type StatusNamespaceCreate struct {
// contains filtered or unexported fields
}
StatusNamespaceCreate is the builder for creating a StatusNamespace entity.
func (*StatusNamespaceCreate) AddStatusIDs ¶
func (snc *StatusNamespaceCreate) AddStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceCreate
AddStatusIDs adds the "statuses" edge to the Status entity by IDs.
func (*StatusNamespaceCreate) AddStatuses ¶
func (snc *StatusNamespaceCreate) AddStatuses(s ...*Status) *StatusNamespaceCreate
AddStatuses adds the "statuses" edges to the Status entity.
func (*StatusNamespaceCreate) Exec ¶
func (snc *StatusNamespaceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*StatusNamespaceCreate) ExecX ¶
func (snc *StatusNamespaceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusNamespaceCreate) Mutation ¶
func (snc *StatusNamespaceCreate) Mutation() *StatusNamespaceMutation
Mutation returns the StatusNamespaceMutation object of the builder.
func (*StatusNamespaceCreate) Save ¶
func (snc *StatusNamespaceCreate) Save(ctx context.Context) (*StatusNamespace, error)
Save creates the StatusNamespace in the database.
func (*StatusNamespaceCreate) SaveX ¶
func (snc *StatusNamespaceCreate) SaveX(ctx context.Context) *StatusNamespace
SaveX calls Save and panics if Save returns an error.
func (*StatusNamespaceCreate) SetCreatedAt ¶
func (snc *StatusNamespaceCreate) SetCreatedAt(t time.Time) *StatusNamespaceCreate
SetCreatedAt sets the "created_at" field.
func (*StatusNamespaceCreate) SetID ¶
func (snc *StatusNamespaceCreate) SetID(gi gidx.PrefixedID) *StatusNamespaceCreate
SetID sets the "id" field.
func (*StatusNamespaceCreate) SetInput ¶
func (c *StatusNamespaceCreate) SetInput(i CreateStatusNamespaceInput) *StatusNamespaceCreate
SetInput applies the change-set in the CreateStatusNamespaceInput on the StatusNamespaceCreate builder.
func (*StatusNamespaceCreate) SetName ¶
func (snc *StatusNamespaceCreate) SetName(s string) *StatusNamespaceCreate
SetName sets the "name" field.
func (*StatusNamespaceCreate) SetNillableCreatedAt ¶
func (snc *StatusNamespaceCreate) SetNillableCreatedAt(t *time.Time) *StatusNamespaceCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*StatusNamespaceCreate) SetNillableID ¶
func (snc *StatusNamespaceCreate) SetNillableID(gi *gidx.PrefixedID) *StatusNamespaceCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*StatusNamespaceCreate) SetNillablePrivate ¶
func (snc *StatusNamespaceCreate) SetNillablePrivate(b *bool) *StatusNamespaceCreate
SetNillablePrivate sets the "private" field if the given value is not nil.
func (*StatusNamespaceCreate) SetNillableUpdatedAt ¶
func (snc *StatusNamespaceCreate) SetNillableUpdatedAt(t *time.Time) *StatusNamespaceCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*StatusNamespaceCreate) SetPrivate ¶
func (snc *StatusNamespaceCreate) SetPrivate(b bool) *StatusNamespaceCreate
SetPrivate sets the "private" field.
func (*StatusNamespaceCreate) SetResourceProviderID ¶
func (snc *StatusNamespaceCreate) SetResourceProviderID(gi gidx.PrefixedID) *StatusNamespaceCreate
SetResourceProviderID sets the "resource_provider_id" field.
func (*StatusNamespaceCreate) SetUpdatedAt ¶
func (snc *StatusNamespaceCreate) SetUpdatedAt(t time.Time) *StatusNamespaceCreate
SetUpdatedAt sets the "updated_at" field.
type StatusNamespaceCreateBulk ¶
type StatusNamespaceCreateBulk struct {
// contains filtered or unexported fields
}
StatusNamespaceCreateBulk is the builder for creating many StatusNamespace entities in bulk.
func (*StatusNamespaceCreateBulk) Exec ¶
func (sncb *StatusNamespaceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StatusNamespaceCreateBulk) ExecX ¶
func (sncb *StatusNamespaceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusNamespaceCreateBulk) Save ¶
func (sncb *StatusNamespaceCreateBulk) Save(ctx context.Context) ([]*StatusNamespace, error)
Save creates the StatusNamespace entities in the database.
func (*StatusNamespaceCreateBulk) SaveX ¶
func (sncb *StatusNamespaceCreateBulk) SaveX(ctx context.Context) []*StatusNamespace
SaveX is like Save, but panics if an error occurs.
type StatusNamespaceDelete ¶
type StatusNamespaceDelete struct {
// contains filtered or unexported fields
}
StatusNamespaceDelete is the builder for deleting a StatusNamespace entity.
func (*StatusNamespaceDelete) Exec ¶
func (snd *StatusNamespaceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*StatusNamespaceDelete) ExecX ¶
func (snd *StatusNamespaceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*StatusNamespaceDelete) Where ¶
func (snd *StatusNamespaceDelete) Where(ps ...predicate.StatusNamespace) *StatusNamespaceDelete
Where appends a list predicates to the StatusNamespaceDelete builder.
type StatusNamespaceDeleteOne ¶
type StatusNamespaceDeleteOne struct {
// contains filtered or unexported fields
}
StatusNamespaceDeleteOne is the builder for deleting a single StatusNamespace entity.
func (*StatusNamespaceDeleteOne) Exec ¶
func (sndo *StatusNamespaceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*StatusNamespaceDeleteOne) ExecX ¶
func (sndo *StatusNamespaceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusNamespaceDeleteOne) Where ¶
func (sndo *StatusNamespaceDeleteOne) Where(ps ...predicate.StatusNamespace) *StatusNamespaceDeleteOne
Where appends a list predicates to the StatusNamespaceDelete builder.
type StatusNamespaceEdge ¶
type StatusNamespaceEdge struct { Node *StatusNamespace `json:"node"` Cursor Cursor `json:"cursor"` }
StatusNamespaceEdge is the edge representation of StatusNamespace.
type StatusNamespaceEdges ¶
type StatusNamespaceEdges struct { // Statuses holds the value of the statuses edge. Statuses []*Status `json:"statuses,omitempty"` // contains filtered or unexported fields }
StatusNamespaceEdges holds the relations/edges for other nodes in the graph.
func (StatusNamespaceEdges) StatusesOrErr ¶
func (e StatusNamespaceEdges) StatusesOrErr() ([]*Status, error)
StatusesOrErr returns the Statuses value or an error if the edge was not loaded in eager-loading.
type StatusNamespaceGroupBy ¶
type StatusNamespaceGroupBy struct {
// contains filtered or unexported fields
}
StatusNamespaceGroupBy is the group-by builder for StatusNamespace entities.
func (*StatusNamespaceGroupBy) Aggregate ¶
func (sngb *StatusNamespaceGroupBy) Aggregate(fns ...AggregateFunc) *StatusNamespaceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*StatusNamespaceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*StatusNamespaceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceGroupBy) Scan ¶
func (sngb *StatusNamespaceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StatusNamespaceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StatusNamespaceMutation ¶
type StatusNamespaceMutation struct {
// contains filtered or unexported fields
}
StatusNamespaceMutation represents an operation that mutates the StatusNamespace nodes in the graph.
func (*StatusNamespaceMutation) AddField ¶
func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) AddStatusIDs ¶
func (m *StatusNamespaceMutation) AddStatusIDs(ids ...gidx.PrefixedID)
AddStatusIDs adds the "statuses" edge to the Status entity by ids.
func (*StatusNamespaceMutation) AddedEdges ¶
func (m *StatusNamespaceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*StatusNamespaceMutation) AddedField ¶
func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) AddedFields ¶
func (m *StatusNamespaceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*StatusNamespaceMutation) AddedIDs ¶
func (m *StatusNamespaceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*StatusNamespaceMutation) ClearEdge ¶
func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) ClearField ¶
func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) ClearStatuses ¶
func (m *StatusNamespaceMutation) ClearStatuses()
ClearStatuses clears the "statuses" edge to the Status entity.
func (*StatusNamespaceMutation) ClearedEdges ¶
func (m *StatusNamespaceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*StatusNamespaceMutation) ClearedFields ¶
func (m *StatusNamespaceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (StatusNamespaceMutation) Client ¶
func (m StatusNamespaceMutation) 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 (*StatusNamespaceMutation) CreatedAt ¶
func (m *StatusNamespaceMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*StatusNamespaceMutation) EdgeCleared ¶
func (m *StatusNamespaceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*StatusNamespaceMutation) Field ¶
func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) FieldCleared ¶
func (m *StatusNamespaceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*StatusNamespaceMutation) Fields ¶
func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) ID ¶
func (m *StatusNamespaceMutation) ID() (id gidx.PrefixedID, 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 (*StatusNamespaceMutation) IDs ¶
func (m *StatusNamespaceMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, 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 (*StatusNamespaceMutation) Name ¶
func (m *StatusNamespaceMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*StatusNamespaceMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the StatusNamespace entity. If the StatusNamespace 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 (*StatusNamespaceMutation) 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 (*StatusNamespaceMutation) OldName ¶
func (m *StatusNamespaceMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the StatusNamespace entity. If the StatusNamespace 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 (*StatusNamespaceMutation) OldPrivate ¶
func (m *StatusNamespaceMutation) OldPrivate(ctx context.Context) (v bool, err error)
OldPrivate returns the old "private" field's value of the StatusNamespace entity. If the StatusNamespace 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 (*StatusNamespaceMutation) OldResourceProviderID ¶
func (m *StatusNamespaceMutation) OldResourceProviderID(ctx context.Context) (v gidx.PrefixedID, err error)
OldResourceProviderID returns the old "resource_provider_id" field's value of the StatusNamespace entity. If the StatusNamespace 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 (*StatusNamespaceMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the StatusNamespace entity. If the StatusNamespace 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 (*StatusNamespaceMutation) Op ¶
func (m *StatusNamespaceMutation) Op() Op
Op returns the operation name.
func (*StatusNamespaceMutation) Private ¶
func (m *StatusNamespaceMutation) Private() (r bool, exists bool)
Private returns the value of the "private" field in the mutation.
func (*StatusNamespaceMutation) RemoveStatusIDs ¶
func (m *StatusNamespaceMutation) RemoveStatusIDs(ids ...gidx.PrefixedID)
RemoveStatusIDs removes the "statuses" edge to the Status entity by IDs.
func (*StatusNamespaceMutation) RemovedEdges ¶
func (m *StatusNamespaceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*StatusNamespaceMutation) RemovedIDs ¶
func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) RemovedStatusesIDs ¶
func (m *StatusNamespaceMutation) RemovedStatusesIDs() (ids []gidx.PrefixedID)
RemovedStatuses returns the removed IDs of the "statuses" edge to the Status entity.
func (*StatusNamespaceMutation) ResetCreatedAt ¶
func (m *StatusNamespaceMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*StatusNamespaceMutation) ResetEdge ¶
func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) ResetField ¶
func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) ResetName ¶
func (m *StatusNamespaceMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*StatusNamespaceMutation) ResetPrivate ¶
func (m *StatusNamespaceMutation) ResetPrivate()
ResetPrivate resets all changes to the "private" field.
func (*StatusNamespaceMutation) ResetResourceProviderID ¶
func (m *StatusNamespaceMutation) ResetResourceProviderID()
ResetResourceProviderID resets all changes to the "resource_provider_id" field.
func (*StatusNamespaceMutation) ResetStatuses ¶
func (m *StatusNamespaceMutation) ResetStatuses()
ResetStatuses resets all changes to the "statuses" edge.
func (*StatusNamespaceMutation) ResetUpdatedAt ¶
func (m *StatusNamespaceMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*StatusNamespaceMutation) ResourceProviderID ¶
func (m *StatusNamespaceMutation) ResourceProviderID() (r gidx.PrefixedID, exists bool)
ResourceProviderID returns the value of the "resource_provider_id" field in the mutation.
func (*StatusNamespaceMutation) SetCreatedAt ¶
func (m *StatusNamespaceMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*StatusNamespaceMutation) SetField ¶
func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) SetID ¶
func (m *StatusNamespaceMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of StatusNamespace entities.
func (*StatusNamespaceMutation) SetName ¶
func (m *StatusNamespaceMutation) SetName(s string)
SetName sets the "name" field.
func (*StatusNamespaceMutation) SetOp ¶
func (m *StatusNamespaceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*StatusNamespaceMutation) SetPrivate ¶
func (m *StatusNamespaceMutation) SetPrivate(b bool)
SetPrivate sets the "private" field.
func (*StatusNamespaceMutation) SetResourceProviderID ¶
func (m *StatusNamespaceMutation) SetResourceProviderID(gi gidx.PrefixedID)
SetResourceProviderID sets the "resource_provider_id" field.
func (*StatusNamespaceMutation) SetUpdatedAt ¶
func (m *StatusNamespaceMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*StatusNamespaceMutation) StatusesCleared ¶
func (m *StatusNamespaceMutation) StatusesCleared() bool
StatusesCleared reports if the "statuses" edge to the Status entity was cleared.
func (*StatusNamespaceMutation) StatusesIDs ¶
func (m *StatusNamespaceMutation) StatusesIDs() (ids []gidx.PrefixedID)
StatusesIDs returns the "statuses" edge IDs in the mutation.
func (StatusNamespaceMutation) Tx ¶
func (m StatusNamespaceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*StatusNamespaceMutation) Type ¶
func (m *StatusNamespaceMutation) Type() string
Type returns the node type of this mutation (StatusNamespace).
func (*StatusNamespaceMutation) UpdatedAt ¶
func (m *StatusNamespaceMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*StatusNamespaceMutation) Where ¶
func (m *StatusNamespaceMutation) Where(ps ...predicate.StatusNamespace)
Where appends a list predicates to the StatusNamespaceMutation builder.
func (*StatusNamespaceMutation) WhereP ¶
func (m *StatusNamespaceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the StatusNamespaceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type StatusNamespaceOrder ¶
type StatusNamespaceOrder struct { Direction OrderDirection `json:"direction"` Field *StatusNamespaceOrderField `json:"field"` }
StatusNamespaceOrder defines the ordering of StatusNamespace.
type StatusNamespaceOrderField ¶
type StatusNamespaceOrderField struct { // Value extracts the ordering value from the given StatusNamespace. Value func(*StatusNamespace) (ent.Value, error) // contains filtered or unexported fields }
StatusNamespaceOrderField defines the ordering field of StatusNamespace.
func (StatusNamespaceOrderField) MarshalGQL ¶
func (f StatusNamespaceOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (StatusNamespaceOrderField) String ¶
func (f StatusNamespaceOrderField) String() string
String implement fmt.Stringer interface.
func (*StatusNamespaceOrderField) UnmarshalGQL ¶
func (f *StatusNamespaceOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type StatusNamespacePaginateOption ¶
type StatusNamespacePaginateOption func(*statusnamespacePager) error
StatusNamespacePaginateOption enables pagination customization.
func WithStatusNamespaceFilter ¶
func WithStatusNamespaceFilter(filter func(*StatusNamespaceQuery) (*StatusNamespaceQuery, error)) StatusNamespacePaginateOption
WithStatusNamespaceFilter configures pagination filter.
func WithStatusNamespaceOrder ¶
func WithStatusNamespaceOrder(order *StatusNamespaceOrder) StatusNamespacePaginateOption
WithStatusNamespaceOrder configures pagination ordering.
type StatusNamespaceQuery ¶
type StatusNamespaceQuery struct {
// contains filtered or unexported fields
}
StatusNamespaceQuery is the builder for querying StatusNamespace entities.
func (*StatusNamespaceQuery) Aggregate ¶
func (snq *StatusNamespaceQuery) Aggregate(fns ...AggregateFunc) *StatusNamespaceSelect
Aggregate returns a StatusNamespaceSelect configured with the given aggregations.
func (*StatusNamespaceQuery) All ¶
func (snq *StatusNamespaceQuery) All(ctx context.Context) ([]*StatusNamespace, error)
All executes the query and returns a list of StatusNamespaces.
func (*StatusNamespaceQuery) AllX ¶
func (snq *StatusNamespaceQuery) AllX(ctx context.Context) []*StatusNamespace
AllX is like All, but panics if an error occurs.
func (*StatusNamespaceQuery) Clone ¶
func (snq *StatusNamespaceQuery) Clone() *StatusNamespaceQuery
Clone returns a duplicate of the StatusNamespaceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*StatusNamespaceQuery) CollectFields ¶
func (sn *StatusNamespaceQuery) CollectFields(ctx context.Context, satisfies ...string) (*StatusNamespaceQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*StatusNamespaceQuery) Count ¶
func (snq *StatusNamespaceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*StatusNamespaceQuery) CountX ¶
func (snq *StatusNamespaceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*StatusNamespaceQuery) Exist ¶
func (snq *StatusNamespaceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*StatusNamespaceQuery) ExistX ¶
func (snq *StatusNamespaceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*StatusNamespaceQuery) First ¶
func (snq *StatusNamespaceQuery) First(ctx context.Context) (*StatusNamespace, error)
First returns the first StatusNamespace entity from the query. Returns a *NotFoundError when no StatusNamespace was found.
func (*StatusNamespaceQuery) FirstID ¶
func (snq *StatusNamespaceQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
FirstID returns the first StatusNamespace ID from the query. Returns a *NotFoundError when no StatusNamespace ID was found.
func (*StatusNamespaceQuery) FirstIDX ¶
func (snq *StatusNamespaceQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*StatusNamespaceQuery) FirstX ¶
func (snq *StatusNamespaceQuery) FirstX(ctx context.Context) *StatusNamespace
FirstX is like First, but panics if an error occurs.
func (*StatusNamespaceQuery) GroupBy ¶
func (snq *StatusNamespaceQuery) GroupBy(field string, fields ...string) *StatusNamespaceGroupBy
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.StatusNamespace.Query(). GroupBy(statusnamespace.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*StatusNamespaceQuery) IDs ¶
func (snq *StatusNamespaceQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
IDs executes the query and returns a list of StatusNamespace IDs.
func (*StatusNamespaceQuery) IDsX ¶
func (snq *StatusNamespaceQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*StatusNamespaceQuery) Limit ¶
func (snq *StatusNamespaceQuery) Limit(limit int) *StatusNamespaceQuery
Limit the number of records to be returned by this query.
func (*StatusNamespaceQuery) Offset ¶
func (snq *StatusNamespaceQuery) Offset(offset int) *StatusNamespaceQuery
Offset to start from.
func (*StatusNamespaceQuery) Only ¶
func (snq *StatusNamespaceQuery) Only(ctx context.Context) (*StatusNamespace, error)
Only returns a single StatusNamespace entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one StatusNamespace entity is found. Returns a *NotFoundError when no StatusNamespace entities are found.
func (*StatusNamespaceQuery) OnlyID ¶
func (snq *StatusNamespaceQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
OnlyID is like Only, but returns the only StatusNamespace ID in the query. Returns a *NotSingularError when more than one StatusNamespace ID is found. Returns a *NotFoundError when no entities are found.
func (*StatusNamespaceQuery) OnlyIDX ¶
func (snq *StatusNamespaceQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*StatusNamespaceQuery) OnlyX ¶
func (snq *StatusNamespaceQuery) OnlyX(ctx context.Context) *StatusNamespace
OnlyX is like Only, but panics if an error occurs.
func (*StatusNamespaceQuery) Order ¶
func (snq *StatusNamespaceQuery) Order(o ...statusnamespace.OrderOption) *StatusNamespaceQuery
Order specifies how the records should be ordered.
func (*StatusNamespaceQuery) Paginate ¶
func (sn *StatusNamespaceQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...StatusNamespacePaginateOption, ) (*StatusNamespaceConnection, error)
Paginate executes the query and returns a relay based cursor connection to StatusNamespace.
func (*StatusNamespaceQuery) QueryStatuses ¶
func (snq *StatusNamespaceQuery) QueryStatuses() *StatusQuery
QueryStatuses chains the current query on the "statuses" edge.
func (*StatusNamespaceQuery) Select ¶
func (snq *StatusNamespaceQuery) Select(fields ...string) *StatusNamespaceSelect
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.StatusNamespace.Query(). Select(statusnamespace.FieldCreatedAt). Scan(ctx, &v)
func (*StatusNamespaceQuery) Unique ¶
func (snq *StatusNamespaceQuery) Unique(unique bool) *StatusNamespaceQuery
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 (*StatusNamespaceQuery) Where ¶
func (snq *StatusNamespaceQuery) Where(ps ...predicate.StatusNamespace) *StatusNamespaceQuery
Where adds a new predicate for the StatusNamespaceQuery builder.
func (*StatusNamespaceQuery) WithNamedStatuses ¶
func (snq *StatusNamespaceQuery) WithNamedStatuses(name string, opts ...func(*StatusQuery)) *StatusNamespaceQuery
WithNamedStatuses tells the query-builder to eager-load the nodes that are connected to the "statuses" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*StatusNamespaceQuery) WithStatuses ¶
func (snq *StatusNamespaceQuery) WithStatuses(opts ...func(*StatusQuery)) *StatusNamespaceQuery
WithStatuses tells the query-builder to eager-load the nodes that are connected to the "statuses" edge. The optional arguments are used to configure the query builder of the edge.
type StatusNamespaceSelect ¶
type StatusNamespaceSelect struct { *StatusNamespaceQuery // contains filtered or unexported fields }
StatusNamespaceSelect is the builder for selecting fields of StatusNamespace entities.
func (*StatusNamespaceSelect) Aggregate ¶
func (sns *StatusNamespaceSelect) Aggregate(fns ...AggregateFunc) *StatusNamespaceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*StatusNamespaceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*StatusNamespaceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StatusNamespaceSelect) Scan ¶
func (sns *StatusNamespaceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StatusNamespaceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StatusNamespaceUpdate ¶
type StatusNamespaceUpdate struct {
// contains filtered or unexported fields
}
StatusNamespaceUpdate is the builder for updating StatusNamespace entities.
func (*StatusNamespaceUpdate) AddStatusIDs ¶
func (snu *StatusNamespaceUpdate) AddStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceUpdate
AddStatusIDs adds the "statuses" edge to the Status entity by IDs.
func (*StatusNamespaceUpdate) AddStatuses ¶
func (snu *StatusNamespaceUpdate) AddStatuses(s ...*Status) *StatusNamespaceUpdate
AddStatuses adds the "statuses" edges to the Status entity.
func (*StatusNamespaceUpdate) ClearStatuses ¶
func (snu *StatusNamespaceUpdate) ClearStatuses() *StatusNamespaceUpdate
ClearStatuses clears all "statuses" edges to the Status entity.
func (*StatusNamespaceUpdate) Exec ¶
func (snu *StatusNamespaceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*StatusNamespaceUpdate) ExecX ¶
func (snu *StatusNamespaceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusNamespaceUpdate) Mutation ¶
func (snu *StatusNamespaceUpdate) Mutation() *StatusNamespaceMutation
Mutation returns the StatusNamespaceMutation object of the builder.
func (*StatusNamespaceUpdate) RemoveStatusIDs ¶
func (snu *StatusNamespaceUpdate) RemoveStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceUpdate
RemoveStatusIDs removes the "statuses" edge to Status entities by IDs.
func (*StatusNamespaceUpdate) RemoveStatuses ¶
func (snu *StatusNamespaceUpdate) RemoveStatuses(s ...*Status) *StatusNamespaceUpdate
RemoveStatuses removes "statuses" edges to Status entities.
func (*StatusNamespaceUpdate) Save ¶
func (snu *StatusNamespaceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*StatusNamespaceUpdate) SaveX ¶
func (snu *StatusNamespaceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*StatusNamespaceUpdate) SetInput ¶
func (c *StatusNamespaceUpdate) SetInput(i UpdateStatusNamespaceInput) *StatusNamespaceUpdate
SetInput applies the change-set in the UpdateStatusNamespaceInput on the StatusNamespaceUpdate builder.
func (*StatusNamespaceUpdate) SetName ¶
func (snu *StatusNamespaceUpdate) SetName(s string) *StatusNamespaceUpdate
SetName sets the "name" field.
func (*StatusNamespaceUpdate) SetNillablePrivate ¶
func (snu *StatusNamespaceUpdate) SetNillablePrivate(b *bool) *StatusNamespaceUpdate
SetNillablePrivate sets the "private" field if the given value is not nil.
func (*StatusNamespaceUpdate) SetPrivate ¶
func (snu *StatusNamespaceUpdate) SetPrivate(b bool) *StatusNamespaceUpdate
SetPrivate sets the "private" field.
func (*StatusNamespaceUpdate) Where ¶
func (snu *StatusNamespaceUpdate) Where(ps ...predicate.StatusNamespace) *StatusNamespaceUpdate
Where appends a list predicates to the StatusNamespaceUpdate builder.
type StatusNamespaceUpdateOne ¶
type StatusNamespaceUpdateOne struct {
// contains filtered or unexported fields
}
StatusNamespaceUpdateOne is the builder for updating a single StatusNamespace entity.
func (*StatusNamespaceUpdateOne) AddStatusIDs ¶
func (snuo *StatusNamespaceUpdateOne) AddStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceUpdateOne
AddStatusIDs adds the "statuses" edge to the Status entity by IDs.
func (*StatusNamespaceUpdateOne) AddStatuses ¶
func (snuo *StatusNamespaceUpdateOne) AddStatuses(s ...*Status) *StatusNamespaceUpdateOne
AddStatuses adds the "statuses" edges to the Status entity.
func (*StatusNamespaceUpdateOne) ClearStatuses ¶
func (snuo *StatusNamespaceUpdateOne) ClearStatuses() *StatusNamespaceUpdateOne
ClearStatuses clears all "statuses" edges to the Status entity.
func (*StatusNamespaceUpdateOne) Exec ¶
func (snuo *StatusNamespaceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*StatusNamespaceUpdateOne) ExecX ¶
func (snuo *StatusNamespaceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusNamespaceUpdateOne) Mutation ¶
func (snuo *StatusNamespaceUpdateOne) Mutation() *StatusNamespaceMutation
Mutation returns the StatusNamespaceMutation object of the builder.
func (*StatusNamespaceUpdateOne) RemoveStatusIDs ¶
func (snuo *StatusNamespaceUpdateOne) RemoveStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceUpdateOne
RemoveStatusIDs removes the "statuses" edge to Status entities by IDs.
func (*StatusNamespaceUpdateOne) RemoveStatuses ¶
func (snuo *StatusNamespaceUpdateOne) RemoveStatuses(s ...*Status) *StatusNamespaceUpdateOne
RemoveStatuses removes "statuses" edges to Status entities.
func (*StatusNamespaceUpdateOne) Save ¶
func (snuo *StatusNamespaceUpdateOne) Save(ctx context.Context) (*StatusNamespace, error)
Save executes the query and returns the updated StatusNamespace entity.
func (*StatusNamespaceUpdateOne) SaveX ¶
func (snuo *StatusNamespaceUpdateOne) SaveX(ctx context.Context) *StatusNamespace
SaveX is like Save, but panics if an error occurs.
func (*StatusNamespaceUpdateOne) Select ¶
func (snuo *StatusNamespaceUpdateOne) Select(field string, fields ...string) *StatusNamespaceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*StatusNamespaceUpdateOne) SetInput ¶
func (c *StatusNamespaceUpdateOne) SetInput(i UpdateStatusNamespaceInput) *StatusNamespaceUpdateOne
SetInput applies the change-set in the UpdateStatusNamespaceInput on the StatusNamespaceUpdateOne builder.
func (*StatusNamespaceUpdateOne) SetName ¶
func (snuo *StatusNamespaceUpdateOne) SetName(s string) *StatusNamespaceUpdateOne
SetName sets the "name" field.
func (*StatusNamespaceUpdateOne) SetNillablePrivate ¶
func (snuo *StatusNamespaceUpdateOne) SetNillablePrivate(b *bool) *StatusNamespaceUpdateOne
SetNillablePrivate sets the "private" field if the given value is not nil.
func (*StatusNamespaceUpdateOne) SetPrivate ¶
func (snuo *StatusNamespaceUpdateOne) SetPrivate(b bool) *StatusNamespaceUpdateOne
SetPrivate sets the "private" field.
func (*StatusNamespaceUpdateOne) Where ¶
func (snuo *StatusNamespaceUpdateOne) Where(ps ...predicate.StatusNamespace) *StatusNamespaceUpdateOne
Where appends a list predicates to the StatusNamespaceUpdate builder.
type StatusNamespaceWhereInput ¶
type StatusNamespaceWhereInput struct { Predicates []predicate.StatusNamespace `json:"-"` Not *StatusNamespaceWhereInput `json:"not,omitempty"` Or []*StatusNamespaceWhereInput `json:"or,omitempty"` And []*StatusNamespaceWhereInput `json:"and,omitempty"` // "id" field predicates. ID *gidx.PrefixedID `json:"id,omitempty"` IDNEQ *gidx.PrefixedID `json:"idNEQ,omitempty"` IDIn []gidx.PrefixedID `json:"idIn,omitempty"` IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"` IDGT *gidx.PrefixedID `json:"idGT,omitempty"` IDGTE *gidx.PrefixedID `json:"idGTE,omitempty"` IDLT *gidx.PrefixedID `json:"idLT,omitempty"` IDLTE *gidx.PrefixedID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` }
StatusNamespaceWhereInput represents a where input for filtering StatusNamespace queries.
func (*StatusNamespaceWhereInput) AddPredicates ¶
func (i *StatusNamespaceWhereInput) AddPredicates(predicates ...predicate.StatusNamespace)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*StatusNamespaceWhereInput) Filter ¶
func (i *StatusNamespaceWhereInput) Filter(q *StatusNamespaceQuery) (*StatusNamespaceQuery, error)
Filter applies the StatusNamespaceWhereInput filter on the StatusNamespaceQuery builder.
func (*StatusNamespaceWhereInput) P ¶
func (i *StatusNamespaceWhereInput) P() (predicate.StatusNamespace, error)
P returns a predicate for filtering statusnamespaces. An error is returned if the input is empty or invalid.
type StatusNamespaces ¶
type StatusNamespaces []*StatusNamespace
StatusNamespaces is a parsable slice of StatusNamespace.
type StatusOrder ¶
type StatusOrder struct { Direction OrderDirection `json:"direction"` Field *StatusOrderField `json:"field"` }
StatusOrder defines the ordering of Status.
type StatusOrderField ¶
type StatusOrderField struct { // Value extracts the ordering value from the given Status. Value func(*Status) (ent.Value, error) // contains filtered or unexported fields }
StatusOrderField defines the ordering field of Status.
func (StatusOrderField) MarshalGQL ¶
func (f StatusOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (StatusOrderField) String ¶
func (f StatusOrderField) String() string
String implement fmt.Stringer interface.
func (*StatusOrderField) UnmarshalGQL ¶
func (f *StatusOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type StatusPaginateOption ¶
type StatusPaginateOption func(*statusPager) error
StatusPaginateOption enables pagination customization.
func WithStatusFilter ¶
func WithStatusFilter(filter func(*StatusQuery) (*StatusQuery, error)) StatusPaginateOption
WithStatusFilter configures pagination filter.
func WithStatusOrder ¶
func WithStatusOrder(order *StatusOrder) StatusPaginateOption
WithStatusOrder configures pagination ordering.
type StatusQuery ¶
type StatusQuery struct {
// contains filtered or unexported fields
}
StatusQuery is the builder for querying Status entities.
func (*StatusQuery) Aggregate ¶
func (sq *StatusQuery) Aggregate(fns ...AggregateFunc) *StatusSelect
Aggregate returns a StatusSelect configured with the given aggregations.
func (*StatusQuery) All ¶
func (sq *StatusQuery) All(ctx context.Context) ([]*Status, error)
All executes the query and returns a list of StatusSlice.
func (*StatusQuery) AllX ¶
func (sq *StatusQuery) AllX(ctx context.Context) []*Status
AllX is like All, but panics if an error occurs.
func (*StatusQuery) Clone ¶
func (sq *StatusQuery) Clone() *StatusQuery
Clone returns a duplicate of the StatusQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*StatusQuery) CollectFields ¶
func (s *StatusQuery) CollectFields(ctx context.Context, satisfies ...string) (*StatusQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*StatusQuery) Count ¶
func (sq *StatusQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*StatusQuery) CountX ¶
func (sq *StatusQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*StatusQuery) Exist ¶
func (sq *StatusQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*StatusQuery) ExistX ¶
func (sq *StatusQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*StatusQuery) First ¶
func (sq *StatusQuery) First(ctx context.Context) (*Status, error)
First returns the first Status entity from the query. Returns a *NotFoundError when no Status was found.
func (*StatusQuery) FirstID ¶
func (sq *StatusQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
FirstID returns the first Status ID from the query. Returns a *NotFoundError when no Status ID was found.
func (*StatusQuery) FirstIDX ¶
func (sq *StatusQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*StatusQuery) FirstX ¶
func (sq *StatusQuery) FirstX(ctx context.Context) *Status
FirstX is like First, but panics if an error occurs.
func (*StatusQuery) GroupBy ¶
func (sq *StatusQuery) GroupBy(field string, fields ...string) *StatusGroupBy
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.Status.Query(). GroupBy(status.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*StatusQuery) IDs ¶
func (sq *StatusQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
IDs executes the query and returns a list of Status IDs.
func (*StatusQuery) IDsX ¶
func (sq *StatusQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*StatusQuery) Limit ¶
func (sq *StatusQuery) Limit(limit int) *StatusQuery
Limit the number of records to be returned by this query.
func (*StatusQuery) Offset ¶
func (sq *StatusQuery) Offset(offset int) *StatusQuery
Offset to start from.
func (*StatusQuery) Only ¶
func (sq *StatusQuery) Only(ctx context.Context) (*Status, error)
Only returns a single Status entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Status entity is found. Returns a *NotFoundError when no Status entities are found.
func (*StatusQuery) OnlyID ¶
func (sq *StatusQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
OnlyID is like Only, but returns the only Status ID in the query. Returns a *NotSingularError when more than one Status ID is found. Returns a *NotFoundError when no entities are found.
func (*StatusQuery) OnlyIDX ¶
func (sq *StatusQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*StatusQuery) OnlyX ¶
func (sq *StatusQuery) OnlyX(ctx context.Context) *Status
OnlyX is like Only, but panics if an error occurs.
func (*StatusQuery) Order ¶
func (sq *StatusQuery) Order(o ...status.OrderOption) *StatusQuery
Order specifies how the records should be ordered.
func (*StatusQuery) Paginate ¶
func (s *StatusQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...StatusPaginateOption, ) (*StatusConnection, error)
Paginate executes the query and returns a relay based cursor connection to Status.
func (*StatusQuery) QueryMetadata ¶
func (sq *StatusQuery) QueryMetadata() *MetadataQuery
QueryMetadata chains the current query on the "metadata" edge.
func (*StatusQuery) QueryNamespace ¶
func (sq *StatusQuery) QueryNamespace() *StatusNamespaceQuery
QueryNamespace chains the current query on the "namespace" edge.
func (*StatusQuery) Select ¶
func (sq *StatusQuery) Select(fields ...string) *StatusSelect
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.Status.Query(). Select(status.FieldCreatedAt). Scan(ctx, &v)
func (*StatusQuery) Unique ¶
func (sq *StatusQuery) Unique(unique bool) *StatusQuery
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 (*StatusQuery) Where ¶
func (sq *StatusQuery) Where(ps ...predicate.Status) *StatusQuery
Where adds a new predicate for the StatusQuery builder.
func (*StatusQuery) WithMetadata ¶
func (sq *StatusQuery) WithMetadata(opts ...func(*MetadataQuery)) *StatusQuery
WithMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge. The optional arguments are used to configure the query builder of the edge.
func (*StatusQuery) WithNamespace ¶
func (sq *StatusQuery) WithNamespace(opts ...func(*StatusNamespaceQuery)) *StatusQuery
WithNamespace tells the query-builder to eager-load the nodes that are connected to the "namespace" edge. The optional arguments are used to configure the query builder of the edge.
type StatusSelect ¶
type StatusSelect struct { *StatusQuery // contains filtered or unexported fields }
StatusSelect is the builder for selecting fields of Status entities.
func (*StatusSelect) Aggregate ¶
func (ss *StatusSelect) Aggregate(fns ...AggregateFunc) *StatusSelect
Aggregate adds the given aggregation functions to the selector query.
func (*StatusSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Scan ¶
func (ss *StatusSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StatusSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StatusUpdate ¶
type StatusUpdate struct {
// contains filtered or unexported fields
}
StatusUpdate is the builder for updating Status entities.
func (*StatusUpdate) AppendData ¶
func (su *StatusUpdate) AppendData(jm json.RawMessage) *StatusUpdate
AppendData appends jm to the "data" field.
func (*StatusUpdate) Exec ¶
func (su *StatusUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*StatusUpdate) ExecX ¶
func (su *StatusUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusUpdate) Mutation ¶
func (su *StatusUpdate) Mutation() *StatusMutation
Mutation returns the StatusMutation object of the builder.
func (*StatusUpdate) Save ¶
func (su *StatusUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*StatusUpdate) SaveX ¶
func (su *StatusUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*StatusUpdate) SetData ¶
func (su *StatusUpdate) SetData(jm json.RawMessage) *StatusUpdate
SetData sets the "data" field.
func (*StatusUpdate) SetInput ¶
func (c *StatusUpdate) SetInput(i UpdateStatusInput) *StatusUpdate
SetInput applies the change-set in the UpdateStatusInput on the StatusUpdate builder.
func (*StatusUpdate) Where ¶
func (su *StatusUpdate) Where(ps ...predicate.Status) *StatusUpdate
Where appends a list predicates to the StatusUpdate builder.
type StatusUpdateOne ¶
type StatusUpdateOne struct {
// contains filtered or unexported fields
}
StatusUpdateOne is the builder for updating a single Status entity.
func (*StatusUpdateOne) AppendData ¶
func (suo *StatusUpdateOne) AppendData(jm json.RawMessage) *StatusUpdateOne
AppendData appends jm to the "data" field.
func (*StatusUpdateOne) Exec ¶
func (suo *StatusUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*StatusUpdateOne) ExecX ¶
func (suo *StatusUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusUpdateOne) Mutation ¶
func (suo *StatusUpdateOne) Mutation() *StatusMutation
Mutation returns the StatusMutation object of the builder.
func (*StatusUpdateOne) Save ¶
func (suo *StatusUpdateOne) Save(ctx context.Context) (*Status, error)
Save executes the query and returns the updated Status entity.
func (*StatusUpdateOne) SaveX ¶
func (suo *StatusUpdateOne) SaveX(ctx context.Context) *Status
SaveX is like Save, but panics if an error occurs.
func (*StatusUpdateOne) Select ¶
func (suo *StatusUpdateOne) Select(field string, fields ...string) *StatusUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*StatusUpdateOne) SetData ¶
func (suo *StatusUpdateOne) SetData(jm json.RawMessage) *StatusUpdateOne
SetData sets the "data" field.
func (*StatusUpdateOne) SetInput ¶
func (c *StatusUpdateOne) SetInput(i UpdateStatusInput) *StatusUpdateOne
SetInput applies the change-set in the UpdateStatusInput on the StatusUpdateOne builder.
func (*StatusUpdateOne) Where ¶
func (suo *StatusUpdateOne) Where(ps ...predicate.Status) *StatusUpdateOne
Where appends a list predicates to the StatusUpdate builder.
type StatusWhereInput ¶
type StatusWhereInput struct { Predicates []predicate.Status `json:"-"` Not *StatusWhereInput `json:"not,omitempty"` Or []*StatusWhereInput `json:"or,omitempty"` And []*StatusWhereInput `json:"and,omitempty"` // "id" field predicates. ID *gidx.PrefixedID `json:"id,omitempty"` IDNEQ *gidx.PrefixedID `json:"idNEQ,omitempty"` IDIn []gidx.PrefixedID `json:"idIn,omitempty"` IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"` IDGT *gidx.PrefixedID `json:"idGT,omitempty"` IDGTE *gidx.PrefixedID `json:"idGTE,omitempty"` IDLT *gidx.PrefixedID `json:"idLT,omitempty"` IDLTE *gidx.PrefixedID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "source" field predicates. Source *string `json:"source,omitempty"` SourceNEQ *string `json:"sourceNEQ,omitempty"` SourceIn []string `json:"sourceIn,omitempty"` SourceNotIn []string `json:"sourceNotIn,omitempty"` SourceGT *string `json:"sourceGT,omitempty"` SourceGTE *string `json:"sourceGTE,omitempty"` SourceLT *string `json:"sourceLT,omitempty"` SourceLTE *string `json:"sourceLTE,omitempty"` SourceContains *string `json:"sourceContains,omitempty"` SourceHasPrefix *string `json:"sourceHasPrefix,omitempty"` SourceHasSuffix *string `json:"sourceHasSuffix,omitempty"` SourceEqualFold *string `json:"sourceEqualFold,omitempty"` SourceContainsFold *string `json:"sourceContainsFold,omitempty"` // "namespace" edge predicates. HasNamespace *bool `json:"hasNamespace,omitempty"` HasNamespaceWith []*StatusNamespaceWhereInput `json:"hasNamespaceWith,omitempty"` // "metadata" edge predicates. HasMetadata *bool `json:"hasMetadata,omitempty"` HasMetadataWith []*MetadataWhereInput `json:"hasMetadataWith,omitempty"` }
StatusWhereInput represents a where input for filtering Status queries.
func (*StatusWhereInput) AddPredicates ¶
func (i *StatusWhereInput) AddPredicates(predicates ...predicate.Status)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*StatusWhereInput) Filter ¶
func (i *StatusWhereInput) Filter(q *StatusQuery) (*StatusQuery, error)
Filter applies the StatusWhereInput filter on the StatusQuery builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Annotation is the client for interacting with the Annotation builders. Annotation *AnnotationClient // AnnotationNamespace is the client for interacting with the AnnotationNamespace builders. AnnotationNamespace *AnnotationNamespaceClient // Metadata is the client for interacting with the Metadata builders. Metadata *MetadataClient // Status is the client for interacting with the Status builders. Status *StatusClient // StatusNamespace is the client for interacting with the StatusNamespace builders. StatusNamespace *StatusNamespaceClient // 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 UpdateAnnotationNamespaceInput ¶
UpdateAnnotationNamespaceInput represents a mutation input for updating annotationnamespaces.
func (*UpdateAnnotationNamespaceInput) Mutate ¶
func (i *UpdateAnnotationNamespaceInput) Mutate(m *AnnotationNamespaceMutation)
Mutate applies the UpdateAnnotationNamespaceInput on the AnnotationNamespaceMutation builder.
type UpdateStatusInput ¶
type UpdateStatusInput struct { Data json.RawMessage AppendData json.RawMessage }
UpdateStatusInput represents a mutation input for updating statusslice.
func (*UpdateStatusInput) Mutate ¶
func (i *UpdateStatusInput) Mutate(m *StatusMutation)
Mutate applies the UpdateStatusInput on the StatusMutation builder.
type UpdateStatusNamespaceInput ¶
UpdateStatusNamespaceInput represents a mutation input for updating statusnamespaces.
func (*UpdateStatusNamespaceInput) Mutate ¶
func (i *UpdateStatusNamespaceInput) Mutate(m *StatusNamespaceMutation)
Mutate applies the UpdateStatusNamespaceInput on the StatusNamespaceMutation 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 ¶
- annotation.go
- annotation_create.go
- annotation_delete.go
- annotation_query.go
- annotation_update.go
- annotationnamespace.go
- annotationnamespace_create.go
- annotationnamespace_delete.go
- annotationnamespace_query.go
- annotationnamespace_update.go
- client.go
- ent.go
- gql_collection.go
- gql_edge.go
- gql_mutation_input.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- metadata.go
- metadata_create.go
- metadata_delete.go
- metadata_query.go
- metadata_update.go
- mutation.go
- runtime.go
- status.go
- status_create.go
- status_delete.go
- status_query.go
- status_update.go
- statusnamespace.go
- statusnamespace_create.go
- statusnamespace_delete.go
- statusnamespace_query.go
- statusnamespace_update.go
- tx.go