Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Pkg
- type PkgClient
- func (c *PkgClient) Create() *PkgCreate
- func (c *PkgClient) CreateBulk(builders ...*PkgCreate) *PkgCreateBulk
- func (c *PkgClient) Delete() *PkgDelete
- func (c *PkgClient) DeleteOne(pk *Pkg) *PkgDeleteOne
- func (c *PkgClient) DeleteOneID(id int) *PkgDeleteOne
- func (c *PkgClient) Get(ctx context.Context, id int) (*Pkg, error)
- func (c *PkgClient) GetX(ctx context.Context, id int) *Pkg
- func (c *PkgClient) Hooks() []Hook
- func (c *PkgClient) Intercept(interceptors ...Interceptor)
- func (c *PkgClient) Interceptors() []Interceptor
- func (c *PkgClient) MapCreateBulk(slice any, setFunc func(*PkgCreate, int)) *PkgCreateBulk
- func (c *PkgClient) Query() *PkgQuery
- func (c *PkgClient) QueryPreservationActions(pk *Pkg) *PreservationActionQuery
- func (c *PkgClient) Update() *PkgUpdate
- func (c *PkgClient) UpdateOne(pk *Pkg) *PkgUpdateOne
- func (c *PkgClient) UpdateOneID(id int) *PkgUpdateOne
- func (c *PkgClient) Use(hooks ...Hook)
- type PkgCreate
- func (pc *PkgCreate) AddPreservationActionIDs(ids ...int) *PkgCreate
- func (pc *PkgCreate) AddPreservationActions(p ...*PreservationAction) *PkgCreate
- func (pc *PkgCreate) Exec(ctx context.Context) error
- func (pc *PkgCreate) ExecX(ctx context.Context)
- func (pc *PkgCreate) Mutation() *PkgMutation
- func (pc *PkgCreate) Save(ctx context.Context) (*Pkg, error)
- func (pc *PkgCreate) SaveX(ctx context.Context) *Pkg
- func (pc *PkgCreate) SetAipID(u uuid.UUID) *PkgCreate
- func (pc *PkgCreate) SetCompletedAt(t time.Time) *PkgCreate
- func (pc *PkgCreate) SetCreatedAt(t time.Time) *PkgCreate
- func (pc *PkgCreate) SetLocationID(u uuid.UUID) *PkgCreate
- func (pc *PkgCreate) SetName(s string) *PkgCreate
- func (pc *PkgCreate) SetNillableAipID(u *uuid.UUID) *PkgCreate
- func (pc *PkgCreate) SetNillableCompletedAt(t *time.Time) *PkgCreate
- func (pc *PkgCreate) SetNillableCreatedAt(t *time.Time) *PkgCreate
- func (pc *PkgCreate) SetNillableLocationID(u *uuid.UUID) *PkgCreate
- func (pc *PkgCreate) SetNillableStartedAt(t *time.Time) *PkgCreate
- func (pc *PkgCreate) SetRunID(u uuid.UUID) *PkgCreate
- func (pc *PkgCreate) SetStartedAt(t time.Time) *PkgCreate
- func (pc *PkgCreate) SetStatus(i int8) *PkgCreate
- func (pc *PkgCreate) SetWorkflowID(s string) *PkgCreate
- type PkgCreateBulk
- type PkgDelete
- type PkgDeleteOne
- type PkgEdges
- type PkgGroupBy
- func (pgb *PkgGroupBy) Aggregate(fns ...AggregateFunc) *PkgGroupBy
- func (s *PkgGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PkgGroupBy) BoolX(ctx context.Context) bool
- func (s *PkgGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PkgGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PkgGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PkgGroupBy) Float64X(ctx context.Context) float64
- func (s *PkgGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PkgGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PkgGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PkgGroupBy) IntX(ctx context.Context) int
- func (s *PkgGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PkgGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PkgGroupBy) Scan(ctx context.Context, v any) error
- func (s *PkgGroupBy) ScanX(ctx context.Context, v any)
- func (s *PkgGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PkgGroupBy) StringX(ctx context.Context) string
- func (s *PkgGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PkgGroupBy) StringsX(ctx context.Context) []string
- type PkgMutation
- func (m *PkgMutation) AddField(name string, value ent.Value) error
- func (m *PkgMutation) AddPreservationActionIDs(ids ...int)
- func (m *PkgMutation) AddStatus(i int8)
- func (m *PkgMutation) AddedEdges() []string
- func (m *PkgMutation) AddedField(name string) (ent.Value, bool)
- func (m *PkgMutation) AddedFields() []string
- func (m *PkgMutation) AddedIDs(name string) []ent.Value
- func (m *PkgMutation) AddedStatus() (r int8, exists bool)
- func (m *PkgMutation) AipID() (r uuid.UUID, exists bool)
- func (m *PkgMutation) AipIDCleared() bool
- func (m *PkgMutation) ClearAipID()
- func (m *PkgMutation) ClearCompletedAt()
- func (m *PkgMutation) ClearEdge(name string) error
- func (m *PkgMutation) ClearField(name string) error
- func (m *PkgMutation) ClearLocationID()
- func (m *PkgMutation) ClearPreservationActions()
- func (m *PkgMutation) ClearStartedAt()
- func (m *PkgMutation) ClearedEdges() []string
- func (m *PkgMutation) ClearedFields() []string
- func (m PkgMutation) Client() *Client
- func (m *PkgMutation) CompletedAt() (r time.Time, exists bool)
- func (m *PkgMutation) CompletedAtCleared() bool
- func (m *PkgMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PkgMutation) EdgeCleared(name string) bool
- func (m *PkgMutation) Field(name string) (ent.Value, bool)
- func (m *PkgMutation) FieldCleared(name string) bool
- func (m *PkgMutation) Fields() []string
- func (m *PkgMutation) ID() (id int, exists bool)
- func (m *PkgMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PkgMutation) LocationID() (r uuid.UUID, exists bool)
- func (m *PkgMutation) LocationIDCleared() bool
- func (m *PkgMutation) Name() (r string, exists bool)
- func (m *PkgMutation) OldAipID(ctx context.Context) (v uuid.UUID, err error)
- func (m *PkgMutation) OldCompletedAt(ctx context.Context) (v time.Time, err error)
- func (m *PkgMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PkgMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PkgMutation) OldLocationID(ctx context.Context) (v uuid.UUID, err error)
- func (m *PkgMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PkgMutation) OldRunID(ctx context.Context) (v uuid.UUID, err error)
- func (m *PkgMutation) OldStartedAt(ctx context.Context) (v time.Time, err error)
- func (m *PkgMutation) OldStatus(ctx context.Context) (v int8, err error)
- func (m *PkgMutation) OldWorkflowID(ctx context.Context) (v string, err error)
- func (m *PkgMutation) Op() Op
- func (m *PkgMutation) PreservationActionsCleared() bool
- func (m *PkgMutation) PreservationActionsIDs() (ids []int)
- func (m *PkgMutation) RemovePreservationActionIDs(ids ...int)
- func (m *PkgMutation) RemovedEdges() []string
- func (m *PkgMutation) RemovedIDs(name string) []ent.Value
- func (m *PkgMutation) RemovedPreservationActionsIDs() (ids []int)
- func (m *PkgMutation) ResetAipID()
- func (m *PkgMutation) ResetCompletedAt()
- func (m *PkgMutation) ResetCreatedAt()
- func (m *PkgMutation) ResetEdge(name string) error
- func (m *PkgMutation) ResetField(name string) error
- func (m *PkgMutation) ResetLocationID()
- func (m *PkgMutation) ResetName()
- func (m *PkgMutation) ResetPreservationActions()
- func (m *PkgMutation) ResetRunID()
- func (m *PkgMutation) ResetStartedAt()
- func (m *PkgMutation) ResetStatus()
- func (m *PkgMutation) ResetWorkflowID()
- func (m *PkgMutation) RunID() (r uuid.UUID, exists bool)
- func (m *PkgMutation) SetAipID(u uuid.UUID)
- func (m *PkgMutation) SetCompletedAt(t time.Time)
- func (m *PkgMutation) SetCreatedAt(t time.Time)
- func (m *PkgMutation) SetField(name string, value ent.Value) error
- func (m *PkgMutation) SetLocationID(u uuid.UUID)
- func (m *PkgMutation) SetName(s string)
- func (m *PkgMutation) SetOp(op Op)
- func (m *PkgMutation) SetRunID(u uuid.UUID)
- func (m *PkgMutation) SetStartedAt(t time.Time)
- func (m *PkgMutation) SetStatus(i int8)
- func (m *PkgMutation) SetWorkflowID(s string)
- func (m *PkgMutation) StartedAt() (r time.Time, exists bool)
- func (m *PkgMutation) StartedAtCleared() bool
- func (m *PkgMutation) Status() (r int8, exists bool)
- func (m PkgMutation) Tx() (*Tx, error)
- func (m *PkgMutation) Type() string
- func (m *PkgMutation) Where(ps ...predicate.Pkg)
- func (m *PkgMutation) WhereP(ps ...func(*sql.Selector))
- func (m *PkgMutation) WorkflowID() (r string, exists bool)
- type PkgQuery
- func (pq *PkgQuery) Aggregate(fns ...AggregateFunc) *PkgSelect
- func (pq *PkgQuery) All(ctx context.Context) ([]*Pkg, error)
- func (pq *PkgQuery) AllX(ctx context.Context) []*Pkg
- func (pq *PkgQuery) Clone() *PkgQuery
- func (pq *PkgQuery) Count(ctx context.Context) (int, error)
- func (pq *PkgQuery) CountX(ctx context.Context) int
- func (pq *PkgQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PkgQuery) ExistX(ctx context.Context) bool
- func (pq *PkgQuery) First(ctx context.Context) (*Pkg, error)
- func (pq *PkgQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *PkgQuery) FirstIDX(ctx context.Context) int
- func (pq *PkgQuery) FirstX(ctx context.Context) *Pkg
- func (pq *PkgQuery) GroupBy(field string, fields ...string) *PkgGroupBy
- func (pq *PkgQuery) IDs(ctx context.Context) (ids []int, err error)
- func (pq *PkgQuery) IDsX(ctx context.Context) []int
- func (pq *PkgQuery) Limit(limit int) *PkgQuery
- func (pq *PkgQuery) Offset(offset int) *PkgQuery
- func (pq *PkgQuery) Only(ctx context.Context) (*Pkg, error)
- func (pq *PkgQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *PkgQuery) OnlyIDX(ctx context.Context) int
- func (pq *PkgQuery) OnlyX(ctx context.Context) *Pkg
- func (pq *PkgQuery) Order(o ...pkg.OrderOption) *PkgQuery
- func (pq *PkgQuery) QueryPreservationActions() *PreservationActionQuery
- func (pq *PkgQuery) Select(fields ...string) *PkgSelect
- func (pq *PkgQuery) Unique(unique bool) *PkgQuery
- func (pq *PkgQuery) Where(ps ...predicate.Pkg) *PkgQuery
- func (pq *PkgQuery) WithPreservationActions(opts ...func(*PreservationActionQuery)) *PkgQuery
- type PkgSelect
- func (ps *PkgSelect) Aggregate(fns ...AggregateFunc) *PkgSelect
- func (s *PkgSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PkgSelect) BoolX(ctx context.Context) bool
- func (s *PkgSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PkgSelect) BoolsX(ctx context.Context) []bool
- func (s *PkgSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PkgSelect) Float64X(ctx context.Context) float64
- func (s *PkgSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PkgSelect) Float64sX(ctx context.Context) []float64
- func (s *PkgSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PkgSelect) IntX(ctx context.Context) int
- func (s *PkgSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PkgSelect) IntsX(ctx context.Context) []int
- func (ps *PkgSelect) Scan(ctx context.Context, v any) error
- func (s *PkgSelect) ScanX(ctx context.Context, v any)
- func (s *PkgSelect) String(ctx context.Context) (_ string, err error)
- func (s *PkgSelect) StringX(ctx context.Context) string
- func (s *PkgSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PkgSelect) StringsX(ctx context.Context) []string
- type PkgUpdate
- func (pu *PkgUpdate) AddPreservationActionIDs(ids ...int) *PkgUpdate
- func (pu *PkgUpdate) AddPreservationActions(p ...*PreservationAction) *PkgUpdate
- func (pu *PkgUpdate) AddStatus(i int8) *PkgUpdate
- func (pu *PkgUpdate) ClearAipID() *PkgUpdate
- func (pu *PkgUpdate) ClearCompletedAt() *PkgUpdate
- func (pu *PkgUpdate) ClearLocationID() *PkgUpdate
- func (pu *PkgUpdate) ClearPreservationActions() *PkgUpdate
- func (pu *PkgUpdate) ClearStartedAt() *PkgUpdate
- func (pu *PkgUpdate) Exec(ctx context.Context) error
- func (pu *PkgUpdate) ExecX(ctx context.Context)
- func (pu *PkgUpdate) Mutation() *PkgMutation
- func (pu *PkgUpdate) RemovePreservationActionIDs(ids ...int) *PkgUpdate
- func (pu *PkgUpdate) RemovePreservationActions(p ...*PreservationAction) *PkgUpdate
- func (pu *PkgUpdate) Save(ctx context.Context) (int, error)
- func (pu *PkgUpdate) SaveX(ctx context.Context) int
- func (pu *PkgUpdate) SetAipID(u uuid.UUID) *PkgUpdate
- func (pu *PkgUpdate) SetCompletedAt(t time.Time) *PkgUpdate
- func (pu *PkgUpdate) SetLocationID(u uuid.UUID) *PkgUpdate
- func (pu *PkgUpdate) SetName(s string) *PkgUpdate
- func (pu *PkgUpdate) SetNillableAipID(u *uuid.UUID) *PkgUpdate
- func (pu *PkgUpdate) SetNillableCompletedAt(t *time.Time) *PkgUpdate
- func (pu *PkgUpdate) SetNillableLocationID(u *uuid.UUID) *PkgUpdate
- func (pu *PkgUpdate) SetNillableName(s *string) *PkgUpdate
- func (pu *PkgUpdate) SetNillableRunID(u *uuid.UUID) *PkgUpdate
- func (pu *PkgUpdate) SetNillableStartedAt(t *time.Time) *PkgUpdate
- func (pu *PkgUpdate) SetNillableStatus(i *int8) *PkgUpdate
- func (pu *PkgUpdate) SetNillableWorkflowID(s *string) *PkgUpdate
- func (pu *PkgUpdate) SetRunID(u uuid.UUID) *PkgUpdate
- func (pu *PkgUpdate) SetStartedAt(t time.Time) *PkgUpdate
- func (pu *PkgUpdate) SetStatus(i int8) *PkgUpdate
- func (pu *PkgUpdate) SetWorkflowID(s string) *PkgUpdate
- func (pu *PkgUpdate) Where(ps ...predicate.Pkg) *PkgUpdate
- type PkgUpdateOne
- func (puo *PkgUpdateOne) AddPreservationActionIDs(ids ...int) *PkgUpdateOne
- func (puo *PkgUpdateOne) AddPreservationActions(p ...*PreservationAction) *PkgUpdateOne
- func (puo *PkgUpdateOne) AddStatus(i int8) *PkgUpdateOne
- func (puo *PkgUpdateOne) ClearAipID() *PkgUpdateOne
- func (puo *PkgUpdateOne) ClearCompletedAt() *PkgUpdateOne
- func (puo *PkgUpdateOne) ClearLocationID() *PkgUpdateOne
- func (puo *PkgUpdateOne) ClearPreservationActions() *PkgUpdateOne
- func (puo *PkgUpdateOne) ClearStartedAt() *PkgUpdateOne
- func (puo *PkgUpdateOne) Exec(ctx context.Context) error
- func (puo *PkgUpdateOne) ExecX(ctx context.Context)
- func (puo *PkgUpdateOne) Mutation() *PkgMutation
- func (puo *PkgUpdateOne) RemovePreservationActionIDs(ids ...int) *PkgUpdateOne
- func (puo *PkgUpdateOne) RemovePreservationActions(p ...*PreservationAction) *PkgUpdateOne
- func (puo *PkgUpdateOne) Save(ctx context.Context) (*Pkg, error)
- func (puo *PkgUpdateOne) SaveX(ctx context.Context) *Pkg
- func (puo *PkgUpdateOne) Select(field string, fields ...string) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetAipID(u uuid.UUID) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetCompletedAt(t time.Time) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetLocationID(u uuid.UUID) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetName(s string) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetNillableAipID(u *uuid.UUID) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetNillableCompletedAt(t *time.Time) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetNillableLocationID(u *uuid.UUID) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetNillableName(s *string) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetNillableRunID(u *uuid.UUID) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetNillableStartedAt(t *time.Time) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetNillableStatus(i *int8) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetNillableWorkflowID(s *string) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetRunID(u uuid.UUID) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetStartedAt(t time.Time) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetStatus(i int8) *PkgUpdateOne
- func (puo *PkgUpdateOne) SetWorkflowID(s string) *PkgUpdateOne
- func (puo *PkgUpdateOne) Where(ps ...predicate.Pkg) *PkgUpdateOne
- type Pkgs
- type Policy
- type PreservationAction
- func (pa *PreservationAction) QueryPackage() *PkgQuery
- func (pa *PreservationAction) QueryTasks() *PreservationTaskQuery
- func (pa *PreservationAction) String() string
- func (pa *PreservationAction) Unwrap() *PreservationAction
- func (pa *PreservationAction) Update() *PreservationActionUpdateOne
- func (pa *PreservationAction) Value(name string) (ent.Value, error)
- type PreservationActionClient
- func (c *PreservationActionClient) Create() *PreservationActionCreate
- func (c *PreservationActionClient) CreateBulk(builders ...*PreservationActionCreate) *PreservationActionCreateBulk
- func (c *PreservationActionClient) Delete() *PreservationActionDelete
- func (c *PreservationActionClient) DeleteOne(pa *PreservationAction) *PreservationActionDeleteOne
- func (c *PreservationActionClient) DeleteOneID(id int) *PreservationActionDeleteOne
- func (c *PreservationActionClient) Get(ctx context.Context, id int) (*PreservationAction, error)
- func (c *PreservationActionClient) GetX(ctx context.Context, id int) *PreservationAction
- func (c *PreservationActionClient) Hooks() []Hook
- func (c *PreservationActionClient) Intercept(interceptors ...Interceptor)
- func (c *PreservationActionClient) Interceptors() []Interceptor
- func (c *PreservationActionClient) MapCreateBulk(slice any, setFunc func(*PreservationActionCreate, int)) *PreservationActionCreateBulk
- func (c *PreservationActionClient) Query() *PreservationActionQuery
- func (c *PreservationActionClient) QueryPackage(pa *PreservationAction) *PkgQuery
- func (c *PreservationActionClient) QueryTasks(pa *PreservationAction) *PreservationTaskQuery
- func (c *PreservationActionClient) Update() *PreservationActionUpdate
- func (c *PreservationActionClient) UpdateOne(pa *PreservationAction) *PreservationActionUpdateOne
- func (c *PreservationActionClient) UpdateOneID(id int) *PreservationActionUpdateOne
- func (c *PreservationActionClient) Use(hooks ...Hook)
- type PreservationActionCreate
- func (pac *PreservationActionCreate) AddTaskIDs(ids ...int) *PreservationActionCreate
- func (pac *PreservationActionCreate) AddTasks(p ...*PreservationTask) *PreservationActionCreate
- func (pac *PreservationActionCreate) Exec(ctx context.Context) error
- func (pac *PreservationActionCreate) ExecX(ctx context.Context)
- func (pac *PreservationActionCreate) Mutation() *PreservationActionMutation
- func (pac *PreservationActionCreate) Save(ctx context.Context) (*PreservationAction, error)
- func (pac *PreservationActionCreate) SaveX(ctx context.Context) *PreservationAction
- func (pac *PreservationActionCreate) SetCompletedAt(t time.Time) *PreservationActionCreate
- func (pac *PreservationActionCreate) SetNillableCompletedAt(t *time.Time) *PreservationActionCreate
- func (pac *PreservationActionCreate) SetNillableStartedAt(t *time.Time) *PreservationActionCreate
- func (pac *PreservationActionCreate) SetPackage(p *Pkg) *PreservationActionCreate
- func (pac *PreservationActionCreate) SetPackageID(i int) *PreservationActionCreate
- func (pac *PreservationActionCreate) SetStartedAt(t time.Time) *PreservationActionCreate
- func (pac *PreservationActionCreate) SetStatus(i int8) *PreservationActionCreate
- func (pac *PreservationActionCreate) SetType(i int8) *PreservationActionCreate
- func (pac *PreservationActionCreate) SetWorkflowID(s string) *PreservationActionCreate
- type PreservationActionCreateBulk
- func (pacb *PreservationActionCreateBulk) Exec(ctx context.Context) error
- func (pacb *PreservationActionCreateBulk) ExecX(ctx context.Context)
- func (pacb *PreservationActionCreateBulk) Save(ctx context.Context) ([]*PreservationAction, error)
- func (pacb *PreservationActionCreateBulk) SaveX(ctx context.Context) []*PreservationAction
- type PreservationActionDelete
- type PreservationActionDeleteOne
- type PreservationActionEdges
- type PreservationActionGroupBy
- func (pagb *PreservationActionGroupBy) Aggregate(fns ...AggregateFunc) *PreservationActionGroupBy
- func (s *PreservationActionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PreservationActionGroupBy) BoolX(ctx context.Context) bool
- func (s *PreservationActionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PreservationActionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PreservationActionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PreservationActionGroupBy) Float64X(ctx context.Context) float64
- func (s *PreservationActionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PreservationActionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PreservationActionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PreservationActionGroupBy) IntX(ctx context.Context) int
- func (s *PreservationActionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PreservationActionGroupBy) IntsX(ctx context.Context) []int
- func (pagb *PreservationActionGroupBy) Scan(ctx context.Context, v any) error
- func (s *PreservationActionGroupBy) ScanX(ctx context.Context, v any)
- func (s *PreservationActionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PreservationActionGroupBy) StringX(ctx context.Context) string
- func (s *PreservationActionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PreservationActionGroupBy) StringsX(ctx context.Context) []string
- type PreservationActionMutation
- func (m *PreservationActionMutation) AddField(name string, value ent.Value) error
- func (m *PreservationActionMutation) AddStatus(i int8)
- func (m *PreservationActionMutation) AddTaskIDs(ids ...int)
- func (m *PreservationActionMutation) AddType(i int8)
- func (m *PreservationActionMutation) AddedEdges() []string
- func (m *PreservationActionMutation) AddedField(name string) (ent.Value, bool)
- func (m *PreservationActionMutation) AddedFields() []string
- func (m *PreservationActionMutation) AddedIDs(name string) []ent.Value
- func (m *PreservationActionMutation) AddedStatus() (r int8, exists bool)
- func (m *PreservationActionMutation) AddedType() (r int8, exists bool)
- func (m *PreservationActionMutation) ClearCompletedAt()
- func (m *PreservationActionMutation) ClearEdge(name string) error
- func (m *PreservationActionMutation) ClearField(name string) error
- func (m *PreservationActionMutation) ClearPackage()
- func (m *PreservationActionMutation) ClearStartedAt()
- func (m *PreservationActionMutation) ClearTasks()
- func (m *PreservationActionMutation) ClearedEdges() []string
- func (m *PreservationActionMutation) ClearedFields() []string
- func (m PreservationActionMutation) Client() *Client
- func (m *PreservationActionMutation) CompletedAt() (r time.Time, exists bool)
- func (m *PreservationActionMutation) CompletedAtCleared() bool
- func (m *PreservationActionMutation) EdgeCleared(name string) bool
- func (m *PreservationActionMutation) Field(name string) (ent.Value, bool)
- func (m *PreservationActionMutation) FieldCleared(name string) bool
- func (m *PreservationActionMutation) Fields() []string
- func (m *PreservationActionMutation) GetType() (r int8, exists bool)
- func (m *PreservationActionMutation) ID() (id int, exists bool)
- func (m *PreservationActionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PreservationActionMutation) OldCompletedAt(ctx context.Context) (v time.Time, err error)
- func (m *PreservationActionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PreservationActionMutation) OldPackageID(ctx context.Context) (v int, err error)
- func (m *PreservationActionMutation) OldStartedAt(ctx context.Context) (v time.Time, err error)
- func (m *PreservationActionMutation) OldStatus(ctx context.Context) (v int8, err error)
- func (m *PreservationActionMutation) OldType(ctx context.Context) (v int8, err error)
- func (m *PreservationActionMutation) OldWorkflowID(ctx context.Context) (v string, err error)
- func (m *PreservationActionMutation) Op() Op
- func (m *PreservationActionMutation) PackageCleared() bool
- func (m *PreservationActionMutation) PackageID() (r int, exists bool)
- func (m *PreservationActionMutation) PackageIDs() (ids []int)
- func (m *PreservationActionMutation) RemoveTaskIDs(ids ...int)
- func (m *PreservationActionMutation) RemovedEdges() []string
- func (m *PreservationActionMutation) RemovedIDs(name string) []ent.Value
- func (m *PreservationActionMutation) RemovedTasksIDs() (ids []int)
- func (m *PreservationActionMutation) ResetCompletedAt()
- func (m *PreservationActionMutation) ResetEdge(name string) error
- func (m *PreservationActionMutation) ResetField(name string) error
- func (m *PreservationActionMutation) ResetPackage()
- func (m *PreservationActionMutation) ResetPackageID()
- func (m *PreservationActionMutation) ResetStartedAt()
- func (m *PreservationActionMutation) ResetStatus()
- func (m *PreservationActionMutation) ResetTasks()
- func (m *PreservationActionMutation) ResetType()
- func (m *PreservationActionMutation) ResetWorkflowID()
- func (m *PreservationActionMutation) SetCompletedAt(t time.Time)
- func (m *PreservationActionMutation) SetField(name string, value ent.Value) error
- func (m *PreservationActionMutation) SetOp(op Op)
- func (m *PreservationActionMutation) SetPackageID(i int)
- func (m *PreservationActionMutation) SetStartedAt(t time.Time)
- func (m *PreservationActionMutation) SetStatus(i int8)
- func (m *PreservationActionMutation) SetType(i int8)
- func (m *PreservationActionMutation) SetWorkflowID(s string)
- func (m *PreservationActionMutation) StartedAt() (r time.Time, exists bool)
- func (m *PreservationActionMutation) StartedAtCleared() bool
- func (m *PreservationActionMutation) Status() (r int8, exists bool)
- func (m *PreservationActionMutation) TasksCleared() bool
- func (m *PreservationActionMutation) TasksIDs() (ids []int)
- func (m PreservationActionMutation) Tx() (*Tx, error)
- func (m *PreservationActionMutation) Type() string
- func (m *PreservationActionMutation) Where(ps ...predicate.PreservationAction)
- func (m *PreservationActionMutation) WhereP(ps ...func(*sql.Selector))
- func (m *PreservationActionMutation) WorkflowID() (r string, exists bool)
- type PreservationActionQuery
- func (paq *PreservationActionQuery) Aggregate(fns ...AggregateFunc) *PreservationActionSelect
- func (paq *PreservationActionQuery) All(ctx context.Context) ([]*PreservationAction, error)
- func (paq *PreservationActionQuery) AllX(ctx context.Context) []*PreservationAction
- func (paq *PreservationActionQuery) Clone() *PreservationActionQuery
- func (paq *PreservationActionQuery) Count(ctx context.Context) (int, error)
- func (paq *PreservationActionQuery) CountX(ctx context.Context) int
- func (paq *PreservationActionQuery) Exist(ctx context.Context) (bool, error)
- func (paq *PreservationActionQuery) ExistX(ctx context.Context) bool
- func (paq *PreservationActionQuery) First(ctx context.Context) (*PreservationAction, error)
- func (paq *PreservationActionQuery) FirstID(ctx context.Context) (id int, err error)
- func (paq *PreservationActionQuery) FirstIDX(ctx context.Context) int
- func (paq *PreservationActionQuery) FirstX(ctx context.Context) *PreservationAction
- func (paq *PreservationActionQuery) GroupBy(field string, fields ...string) *PreservationActionGroupBy
- func (paq *PreservationActionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (paq *PreservationActionQuery) IDsX(ctx context.Context) []int
- func (paq *PreservationActionQuery) Limit(limit int) *PreservationActionQuery
- func (paq *PreservationActionQuery) Offset(offset int) *PreservationActionQuery
- func (paq *PreservationActionQuery) Only(ctx context.Context) (*PreservationAction, error)
- func (paq *PreservationActionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (paq *PreservationActionQuery) OnlyIDX(ctx context.Context) int
- func (paq *PreservationActionQuery) OnlyX(ctx context.Context) *PreservationAction
- func (paq *PreservationActionQuery) Order(o ...preservationaction.OrderOption) *PreservationActionQuery
- func (paq *PreservationActionQuery) QueryPackage() *PkgQuery
- func (paq *PreservationActionQuery) QueryTasks() *PreservationTaskQuery
- func (paq *PreservationActionQuery) Select(fields ...string) *PreservationActionSelect
- func (paq *PreservationActionQuery) Unique(unique bool) *PreservationActionQuery
- func (paq *PreservationActionQuery) Where(ps ...predicate.PreservationAction) *PreservationActionQuery
- func (paq *PreservationActionQuery) WithPackage(opts ...func(*PkgQuery)) *PreservationActionQuery
- func (paq *PreservationActionQuery) WithTasks(opts ...func(*PreservationTaskQuery)) *PreservationActionQuery
- type PreservationActionSelect
- func (pas *PreservationActionSelect) Aggregate(fns ...AggregateFunc) *PreservationActionSelect
- func (s *PreservationActionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PreservationActionSelect) BoolX(ctx context.Context) bool
- func (s *PreservationActionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PreservationActionSelect) BoolsX(ctx context.Context) []bool
- func (s *PreservationActionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PreservationActionSelect) Float64X(ctx context.Context) float64
- func (s *PreservationActionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PreservationActionSelect) Float64sX(ctx context.Context) []float64
- func (s *PreservationActionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PreservationActionSelect) IntX(ctx context.Context) int
- func (s *PreservationActionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PreservationActionSelect) IntsX(ctx context.Context) []int
- func (pas *PreservationActionSelect) Scan(ctx context.Context, v any) error
- func (s *PreservationActionSelect) ScanX(ctx context.Context, v any)
- func (s *PreservationActionSelect) String(ctx context.Context) (_ string, err error)
- func (s *PreservationActionSelect) StringX(ctx context.Context) string
- func (s *PreservationActionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PreservationActionSelect) StringsX(ctx context.Context) []string
- type PreservationActionUpdate
- func (pau *PreservationActionUpdate) AddStatus(i int8) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) AddTaskIDs(ids ...int) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) AddTasks(p ...*PreservationTask) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) AddType(i int8) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) ClearCompletedAt() *PreservationActionUpdate
- func (pau *PreservationActionUpdate) ClearPackage() *PreservationActionUpdate
- func (pau *PreservationActionUpdate) ClearStartedAt() *PreservationActionUpdate
- func (pau *PreservationActionUpdate) ClearTasks() *PreservationActionUpdate
- func (pau *PreservationActionUpdate) Exec(ctx context.Context) error
- func (pau *PreservationActionUpdate) ExecX(ctx context.Context)
- func (pau *PreservationActionUpdate) Mutation() *PreservationActionMutation
- func (pau *PreservationActionUpdate) RemoveTaskIDs(ids ...int) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) RemoveTasks(p ...*PreservationTask) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) Save(ctx context.Context) (int, error)
- func (pau *PreservationActionUpdate) SaveX(ctx context.Context) int
- func (pau *PreservationActionUpdate) SetCompletedAt(t time.Time) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetNillableCompletedAt(t *time.Time) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetNillablePackageID(i *int) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetNillableStartedAt(t *time.Time) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetNillableStatus(i *int8) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetNillableType(i *int8) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetNillableWorkflowID(s *string) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetPackage(p *Pkg) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetPackageID(i int) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetStartedAt(t time.Time) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetStatus(i int8) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetType(i int8) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) SetWorkflowID(s string) *PreservationActionUpdate
- func (pau *PreservationActionUpdate) Where(ps ...predicate.PreservationAction) *PreservationActionUpdate
- type PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) AddStatus(i int8) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) AddTaskIDs(ids ...int) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) AddTasks(p ...*PreservationTask) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) AddType(i int8) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) ClearCompletedAt() *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) ClearPackage() *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) ClearStartedAt() *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) ClearTasks() *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) Exec(ctx context.Context) error
- func (pauo *PreservationActionUpdateOne) ExecX(ctx context.Context)
- func (pauo *PreservationActionUpdateOne) Mutation() *PreservationActionMutation
- func (pauo *PreservationActionUpdateOne) RemoveTaskIDs(ids ...int) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) RemoveTasks(p ...*PreservationTask) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) Save(ctx context.Context) (*PreservationAction, error)
- func (pauo *PreservationActionUpdateOne) SaveX(ctx context.Context) *PreservationAction
- func (pauo *PreservationActionUpdateOne) Select(field string, fields ...string) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetCompletedAt(t time.Time) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetNillableCompletedAt(t *time.Time) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetNillablePackageID(i *int) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetNillableStartedAt(t *time.Time) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetNillableStatus(i *int8) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetNillableType(i *int8) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetNillableWorkflowID(s *string) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetPackage(p *Pkg) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetPackageID(i int) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetStartedAt(t time.Time) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetStatus(i int8) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetType(i int8) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) SetWorkflowID(s string) *PreservationActionUpdateOne
- func (pauo *PreservationActionUpdateOne) Where(ps ...predicate.PreservationAction) *PreservationActionUpdateOne
- type PreservationActions
- type PreservationTask
- type PreservationTaskClient
- func (c *PreservationTaskClient) Create() *PreservationTaskCreate
- func (c *PreservationTaskClient) CreateBulk(builders ...*PreservationTaskCreate) *PreservationTaskCreateBulk
- func (c *PreservationTaskClient) Delete() *PreservationTaskDelete
- func (c *PreservationTaskClient) DeleteOne(pt *PreservationTask) *PreservationTaskDeleteOne
- func (c *PreservationTaskClient) DeleteOneID(id int) *PreservationTaskDeleteOne
- func (c *PreservationTaskClient) Get(ctx context.Context, id int) (*PreservationTask, error)
- func (c *PreservationTaskClient) GetX(ctx context.Context, id int) *PreservationTask
- func (c *PreservationTaskClient) Hooks() []Hook
- func (c *PreservationTaskClient) Intercept(interceptors ...Interceptor)
- func (c *PreservationTaskClient) Interceptors() []Interceptor
- func (c *PreservationTaskClient) MapCreateBulk(slice any, setFunc func(*PreservationTaskCreate, int)) *PreservationTaskCreateBulk
- func (c *PreservationTaskClient) Query() *PreservationTaskQuery
- func (c *PreservationTaskClient) QueryAction(pt *PreservationTask) *PreservationActionQuery
- func (c *PreservationTaskClient) Update() *PreservationTaskUpdate
- func (c *PreservationTaskClient) UpdateOne(pt *PreservationTask) *PreservationTaskUpdateOne
- func (c *PreservationTaskClient) UpdateOneID(id int) *PreservationTaskUpdateOne
- func (c *PreservationTaskClient) Use(hooks ...Hook)
- type PreservationTaskCreate
- func (ptc *PreservationTaskCreate) Exec(ctx context.Context) error
- func (ptc *PreservationTaskCreate) ExecX(ctx context.Context)
- func (ptc *PreservationTaskCreate) Mutation() *PreservationTaskMutation
- func (ptc *PreservationTaskCreate) Save(ctx context.Context) (*PreservationTask, error)
- func (ptc *PreservationTaskCreate) SaveX(ctx context.Context) *PreservationTask
- func (ptc *PreservationTaskCreate) SetAction(p *PreservationAction) *PreservationTaskCreate
- func (ptc *PreservationTaskCreate) SetActionID(id int) *PreservationTaskCreate
- func (ptc *PreservationTaskCreate) SetCompletedAt(t time.Time) *PreservationTaskCreate
- func (ptc *PreservationTaskCreate) SetName(s string) *PreservationTaskCreate
- func (ptc *PreservationTaskCreate) SetNillableCompletedAt(t *time.Time) *PreservationTaskCreate
- func (ptc *PreservationTaskCreate) SetNillableStartedAt(t *time.Time) *PreservationTaskCreate
- func (ptc *PreservationTaskCreate) SetNote(s string) *PreservationTaskCreate
- func (ptc *PreservationTaskCreate) SetPreservationActionID(i int) *PreservationTaskCreate
- func (ptc *PreservationTaskCreate) SetStartedAt(t time.Time) *PreservationTaskCreate
- func (ptc *PreservationTaskCreate) SetStatus(i int8) *PreservationTaskCreate
- func (ptc *PreservationTaskCreate) SetTaskID(u uuid.UUID) *PreservationTaskCreate
- type PreservationTaskCreateBulk
- func (ptcb *PreservationTaskCreateBulk) Exec(ctx context.Context) error
- func (ptcb *PreservationTaskCreateBulk) ExecX(ctx context.Context)
- func (ptcb *PreservationTaskCreateBulk) Save(ctx context.Context) ([]*PreservationTask, error)
- func (ptcb *PreservationTaskCreateBulk) SaveX(ctx context.Context) []*PreservationTask
- type PreservationTaskDelete
- type PreservationTaskDeleteOne
- type PreservationTaskEdges
- type PreservationTaskGroupBy
- func (ptgb *PreservationTaskGroupBy) Aggregate(fns ...AggregateFunc) *PreservationTaskGroupBy
- func (s *PreservationTaskGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PreservationTaskGroupBy) BoolX(ctx context.Context) bool
- func (s *PreservationTaskGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PreservationTaskGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PreservationTaskGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PreservationTaskGroupBy) Float64X(ctx context.Context) float64
- func (s *PreservationTaskGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PreservationTaskGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PreservationTaskGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PreservationTaskGroupBy) IntX(ctx context.Context) int
- func (s *PreservationTaskGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PreservationTaskGroupBy) IntsX(ctx context.Context) []int
- func (ptgb *PreservationTaskGroupBy) Scan(ctx context.Context, v any) error
- func (s *PreservationTaskGroupBy) ScanX(ctx context.Context, v any)
- func (s *PreservationTaskGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PreservationTaskGroupBy) StringX(ctx context.Context) string
- func (s *PreservationTaskGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PreservationTaskGroupBy) StringsX(ctx context.Context) []string
- type PreservationTaskMutation
- func (m *PreservationTaskMutation) ActionCleared() bool
- func (m *PreservationTaskMutation) ActionID() (id int, exists bool)
- func (m *PreservationTaskMutation) ActionIDs() (ids []int)
- func (m *PreservationTaskMutation) AddField(name string, value ent.Value) error
- func (m *PreservationTaskMutation) AddStatus(i int8)
- func (m *PreservationTaskMutation) AddedEdges() []string
- func (m *PreservationTaskMutation) AddedField(name string) (ent.Value, bool)
- func (m *PreservationTaskMutation) AddedFields() []string
- func (m *PreservationTaskMutation) AddedIDs(name string) []ent.Value
- func (m *PreservationTaskMutation) AddedStatus() (r int8, exists bool)
- func (m *PreservationTaskMutation) ClearAction()
- func (m *PreservationTaskMutation) ClearCompletedAt()
- func (m *PreservationTaskMutation) ClearEdge(name string) error
- func (m *PreservationTaskMutation) ClearField(name string) error
- func (m *PreservationTaskMutation) ClearStartedAt()
- func (m *PreservationTaskMutation) ClearedEdges() []string
- func (m *PreservationTaskMutation) ClearedFields() []string
- func (m PreservationTaskMutation) Client() *Client
- func (m *PreservationTaskMutation) CompletedAt() (r time.Time, exists bool)
- func (m *PreservationTaskMutation) CompletedAtCleared() bool
- func (m *PreservationTaskMutation) EdgeCleared(name string) bool
- func (m *PreservationTaskMutation) Field(name string) (ent.Value, bool)
- func (m *PreservationTaskMutation) FieldCleared(name string) bool
- func (m *PreservationTaskMutation) Fields() []string
- func (m *PreservationTaskMutation) ID() (id int, exists bool)
- func (m *PreservationTaskMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PreservationTaskMutation) Name() (r string, exists bool)
- func (m *PreservationTaskMutation) Note() (r string, exists bool)
- func (m *PreservationTaskMutation) OldCompletedAt(ctx context.Context) (v time.Time, err error)
- func (m *PreservationTaskMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PreservationTaskMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PreservationTaskMutation) OldNote(ctx context.Context) (v string, err error)
- func (m *PreservationTaskMutation) OldPreservationActionID(ctx context.Context) (v int, err error)
- func (m *PreservationTaskMutation) OldStartedAt(ctx context.Context) (v time.Time, err error)
- func (m *PreservationTaskMutation) OldStatus(ctx context.Context) (v int8, err error)
- func (m *PreservationTaskMutation) OldTaskID(ctx context.Context) (v uuid.UUID, err error)
- func (m *PreservationTaskMutation) Op() Op
- func (m *PreservationTaskMutation) PreservationActionID() (r int, exists bool)
- func (m *PreservationTaskMutation) RemovedEdges() []string
- func (m *PreservationTaskMutation) RemovedIDs(name string) []ent.Value
- func (m *PreservationTaskMutation) ResetAction()
- func (m *PreservationTaskMutation) ResetCompletedAt()
- func (m *PreservationTaskMutation) ResetEdge(name string) error
- func (m *PreservationTaskMutation) ResetField(name string) error
- func (m *PreservationTaskMutation) ResetName()
- func (m *PreservationTaskMutation) ResetNote()
- func (m *PreservationTaskMutation) ResetPreservationActionID()
- func (m *PreservationTaskMutation) ResetStartedAt()
- func (m *PreservationTaskMutation) ResetStatus()
- func (m *PreservationTaskMutation) ResetTaskID()
- func (m *PreservationTaskMutation) SetActionID(id int)
- func (m *PreservationTaskMutation) SetCompletedAt(t time.Time)
- func (m *PreservationTaskMutation) SetField(name string, value ent.Value) error
- func (m *PreservationTaskMutation) SetName(s string)
- func (m *PreservationTaskMutation) SetNote(s string)
- func (m *PreservationTaskMutation) SetOp(op Op)
- func (m *PreservationTaskMutation) SetPreservationActionID(i int)
- func (m *PreservationTaskMutation) SetStartedAt(t time.Time)
- func (m *PreservationTaskMutation) SetStatus(i int8)
- func (m *PreservationTaskMutation) SetTaskID(u uuid.UUID)
- func (m *PreservationTaskMutation) StartedAt() (r time.Time, exists bool)
- func (m *PreservationTaskMutation) StartedAtCleared() bool
- func (m *PreservationTaskMutation) Status() (r int8, exists bool)
- func (m *PreservationTaskMutation) TaskID() (r uuid.UUID, exists bool)
- func (m PreservationTaskMutation) Tx() (*Tx, error)
- func (m *PreservationTaskMutation) Type() string
- func (m *PreservationTaskMutation) Where(ps ...predicate.PreservationTask)
- func (m *PreservationTaskMutation) WhereP(ps ...func(*sql.Selector))
- type PreservationTaskQuery
- func (ptq *PreservationTaskQuery) Aggregate(fns ...AggregateFunc) *PreservationTaskSelect
- func (ptq *PreservationTaskQuery) All(ctx context.Context) ([]*PreservationTask, error)
- func (ptq *PreservationTaskQuery) AllX(ctx context.Context) []*PreservationTask
- func (ptq *PreservationTaskQuery) Clone() *PreservationTaskQuery
- func (ptq *PreservationTaskQuery) Count(ctx context.Context) (int, error)
- func (ptq *PreservationTaskQuery) CountX(ctx context.Context) int
- func (ptq *PreservationTaskQuery) Exist(ctx context.Context) (bool, error)
- func (ptq *PreservationTaskQuery) ExistX(ctx context.Context) bool
- func (ptq *PreservationTaskQuery) First(ctx context.Context) (*PreservationTask, error)
- func (ptq *PreservationTaskQuery) FirstID(ctx context.Context) (id int, err error)
- func (ptq *PreservationTaskQuery) FirstIDX(ctx context.Context) int
- func (ptq *PreservationTaskQuery) FirstX(ctx context.Context) *PreservationTask
- func (ptq *PreservationTaskQuery) GroupBy(field string, fields ...string) *PreservationTaskGroupBy
- func (ptq *PreservationTaskQuery) IDs(ctx context.Context) (ids []int, err error)
- func (ptq *PreservationTaskQuery) IDsX(ctx context.Context) []int
- func (ptq *PreservationTaskQuery) Limit(limit int) *PreservationTaskQuery
- func (ptq *PreservationTaskQuery) Offset(offset int) *PreservationTaskQuery
- func (ptq *PreservationTaskQuery) Only(ctx context.Context) (*PreservationTask, error)
- func (ptq *PreservationTaskQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ptq *PreservationTaskQuery) OnlyIDX(ctx context.Context) int
- func (ptq *PreservationTaskQuery) OnlyX(ctx context.Context) *PreservationTask
- func (ptq *PreservationTaskQuery) Order(o ...preservationtask.OrderOption) *PreservationTaskQuery
- func (ptq *PreservationTaskQuery) QueryAction() *PreservationActionQuery
- func (ptq *PreservationTaskQuery) Select(fields ...string) *PreservationTaskSelect
- func (ptq *PreservationTaskQuery) Unique(unique bool) *PreservationTaskQuery
- func (ptq *PreservationTaskQuery) Where(ps ...predicate.PreservationTask) *PreservationTaskQuery
- func (ptq *PreservationTaskQuery) WithAction(opts ...func(*PreservationActionQuery)) *PreservationTaskQuery
- type PreservationTaskSelect
- func (pts *PreservationTaskSelect) Aggregate(fns ...AggregateFunc) *PreservationTaskSelect
- func (s *PreservationTaskSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PreservationTaskSelect) BoolX(ctx context.Context) bool
- func (s *PreservationTaskSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PreservationTaskSelect) BoolsX(ctx context.Context) []bool
- func (s *PreservationTaskSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PreservationTaskSelect) Float64X(ctx context.Context) float64
- func (s *PreservationTaskSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PreservationTaskSelect) Float64sX(ctx context.Context) []float64
- func (s *PreservationTaskSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PreservationTaskSelect) IntX(ctx context.Context) int
- func (s *PreservationTaskSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PreservationTaskSelect) IntsX(ctx context.Context) []int
- func (pts *PreservationTaskSelect) Scan(ctx context.Context, v any) error
- func (s *PreservationTaskSelect) ScanX(ctx context.Context, v any)
- func (s *PreservationTaskSelect) String(ctx context.Context) (_ string, err error)
- func (s *PreservationTaskSelect) StringX(ctx context.Context) string
- func (s *PreservationTaskSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PreservationTaskSelect) StringsX(ctx context.Context) []string
- type PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) AddStatus(i int8) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) ClearAction() *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) ClearCompletedAt() *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) ClearStartedAt() *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) Exec(ctx context.Context) error
- func (ptu *PreservationTaskUpdate) ExecX(ctx context.Context)
- func (ptu *PreservationTaskUpdate) Mutation() *PreservationTaskMutation
- func (ptu *PreservationTaskUpdate) Save(ctx context.Context) (int, error)
- func (ptu *PreservationTaskUpdate) SaveX(ctx context.Context) int
- func (ptu *PreservationTaskUpdate) SetAction(p *PreservationAction) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetActionID(id int) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetCompletedAt(t time.Time) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetName(s string) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetNillableCompletedAt(t *time.Time) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetNillableName(s *string) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetNillableNote(s *string) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetNillablePreservationActionID(i *int) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetNillableStartedAt(t *time.Time) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetNillableStatus(i *int8) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetNillableTaskID(u *uuid.UUID) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetNote(s string) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetPreservationActionID(i int) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetStartedAt(t time.Time) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetStatus(i int8) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) SetTaskID(u uuid.UUID) *PreservationTaskUpdate
- func (ptu *PreservationTaskUpdate) Where(ps ...predicate.PreservationTask) *PreservationTaskUpdate
- type PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) AddStatus(i int8) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) ClearAction() *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) ClearCompletedAt() *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) ClearStartedAt() *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) Exec(ctx context.Context) error
- func (ptuo *PreservationTaskUpdateOne) ExecX(ctx context.Context)
- func (ptuo *PreservationTaskUpdateOne) Mutation() *PreservationTaskMutation
- func (ptuo *PreservationTaskUpdateOne) Save(ctx context.Context) (*PreservationTask, error)
- func (ptuo *PreservationTaskUpdateOne) SaveX(ctx context.Context) *PreservationTask
- func (ptuo *PreservationTaskUpdateOne) Select(field string, fields ...string) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetAction(p *PreservationAction) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetActionID(id int) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetCompletedAt(t time.Time) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetName(s string) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetNillableCompletedAt(t *time.Time) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetNillableName(s *string) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetNillableNote(s *string) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetNillablePreservationActionID(i *int) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetNillableStartedAt(t *time.Time) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetNillableStatus(i *int8) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetNillableTaskID(u *uuid.UUID) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetNote(s string) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetPreservationActionID(i int) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetStartedAt(t time.Time) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetStatus(i int8) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) SetTaskID(u uuid.UUID) *PreservationTaskUpdateOne
- func (ptuo *PreservationTaskUpdateOne) Where(ps ...predicate.PreservationTask) *PreservationTaskUpdateOne
- type PreservationTasks
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- 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. TypePkg = "Pkg" TypePreservationAction = "PreservationAction" TypePreservationTask = "PreservationTask" )
Variables ¶
var ErrTxStarted = errors.New("db: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(db.As(db.Sum(field1), "sum_field1"), (db.As(db.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Pkg is the client for interacting with the Pkg builders. Pkg *PkgClient // PreservationAction is the client for interacting with the PreservationAction builders. PreservationAction *PreservationActionClient // PreservationTask is the client for interacting with the PreservationTask builders. PreservationTask *PreservationTaskClient // 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(). Pkg. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type Pkg ¶
type Pkg struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // WorkflowID holds the value of the "workflow_id" field. WorkflowID string `json:"workflow_id,omitempty"` // RunID holds the value of the "run_id" field. RunID uuid.UUID `json:"run_id,omitempty"` // AipID holds the value of the "aip_id" field. AipID uuid.UUID `json:"aip_id,omitempty"` // LocationID holds the value of the "location_id" field. LocationID uuid.UUID `json:"location_id,omitempty"` // Status holds the value of the "status" field. Status int8 `json:"status,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // StartedAt holds the value of the "started_at" field. StartedAt time.Time `json:"started_at,omitempty"` // CompletedAt holds the value of the "completed_at" field. CompletedAt time.Time `json:"completed_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PkgQuery when eager-loading is set. Edges PkgEdges `json:"edges"` // contains filtered or unexported fields }
Pkg is the model entity for the Pkg schema.
func (*Pkg) QueryPreservationActions ¶
func (pk *Pkg) QueryPreservationActions() *PreservationActionQuery
QueryPreservationActions queries the "preservation_actions" edge of the Pkg entity.
func (*Pkg) Unwrap ¶
Unwrap unwraps the Pkg 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 (*Pkg) Update ¶
func (pk *Pkg) Update() *PkgUpdateOne
Update returns a builder for updating this Pkg. Note that you need to call Pkg.Unwrap() before calling this method if this Pkg was returned from a transaction, and the transaction was committed or rolled back.
type PkgClient ¶
type PkgClient struct {
// contains filtered or unexported fields
}
PkgClient is a client for the Pkg schema.
func NewPkgClient ¶
func NewPkgClient(c config) *PkgClient
NewPkgClient returns a client for the Pkg from the given config.
func (*PkgClient) CreateBulk ¶
func (c *PkgClient) CreateBulk(builders ...*PkgCreate) *PkgCreateBulk
CreateBulk returns a builder for creating a bulk of Pkg entities.
func (*PkgClient) DeleteOne ¶
func (c *PkgClient) DeleteOne(pk *Pkg) *PkgDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PkgClient) DeleteOneID ¶
func (c *PkgClient) DeleteOneID(id int) *PkgDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PkgClient) Intercept ¶
func (c *PkgClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `pkg.Intercept(f(g(h())))`.
func (*PkgClient) Interceptors ¶
func (c *PkgClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PkgClient) MapCreateBulk ¶
func (c *PkgClient) MapCreateBulk(slice any, setFunc func(*PkgCreate, int)) *PkgCreateBulk
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 (*PkgClient) QueryPreservationActions ¶
func (c *PkgClient) QueryPreservationActions(pk *Pkg) *PreservationActionQuery
QueryPreservationActions queries the preservation_actions edge of a Pkg.
func (*PkgClient) UpdateOne ¶
func (c *PkgClient) UpdateOne(pk *Pkg) *PkgUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PkgClient) UpdateOneID ¶
func (c *PkgClient) UpdateOneID(id int) *PkgUpdateOne
UpdateOneID returns an update builder for the given id.
type PkgCreate ¶
type PkgCreate struct {
// contains filtered or unexported fields
}
PkgCreate is the builder for creating a Pkg entity.
func (*PkgCreate) AddPreservationActionIDs ¶
AddPreservationActionIDs adds the "preservation_actions" edge to the PreservationAction entity by IDs.
func (*PkgCreate) AddPreservationActions ¶
func (pc *PkgCreate) AddPreservationActions(p ...*PreservationAction) *PkgCreate
AddPreservationActions adds the "preservation_actions" edges to the PreservationAction entity.
func (*PkgCreate) Mutation ¶
func (pc *PkgCreate) Mutation() *PkgMutation
Mutation returns the PkgMutation object of the builder.
func (*PkgCreate) SetCompletedAt ¶
SetCompletedAt sets the "completed_at" field.
func (*PkgCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*PkgCreate) SetLocationID ¶
SetLocationID sets the "location_id" field.
func (*PkgCreate) SetNillableAipID ¶
SetNillableAipID sets the "aip_id" field if the given value is not nil.
func (*PkgCreate) SetNillableCompletedAt ¶
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*PkgCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PkgCreate) SetNillableLocationID ¶
SetNillableLocationID sets the "location_id" field if the given value is not nil.
func (*PkgCreate) SetNillableStartedAt ¶
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*PkgCreate) SetStartedAt ¶
SetStartedAt sets the "started_at" field.
func (*PkgCreate) SetWorkflowID ¶
SetWorkflowID sets the "workflow_id" field.
type PkgCreateBulk ¶
type PkgCreateBulk struct {
// contains filtered or unexported fields
}
PkgCreateBulk is the builder for creating many Pkg entities in bulk.
func (*PkgCreateBulk) Exec ¶
func (pcb *PkgCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PkgCreateBulk) ExecX ¶
func (pcb *PkgCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PkgDelete ¶
type PkgDelete struct {
// contains filtered or unexported fields
}
PkgDelete is the builder for deleting a Pkg entity.
func (*PkgDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type PkgDeleteOne ¶
type PkgDeleteOne struct {
// contains filtered or unexported fields
}
PkgDeleteOne is the builder for deleting a single Pkg entity.
func (*PkgDeleteOne) Exec ¶
func (pdo *PkgDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PkgDeleteOne) ExecX ¶
func (pdo *PkgDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PkgDeleteOne) Where ¶
func (pdo *PkgDeleteOne) Where(ps ...predicate.Pkg) *PkgDeleteOne
Where appends a list predicates to the PkgDelete builder.
type PkgEdges ¶
type PkgEdges struct { // PreservationActions holds the value of the preservation_actions edge. PreservationActions []*PreservationAction `json:"preservation_actions,omitempty"` // contains filtered or unexported fields }
PkgEdges holds the relations/edges for other nodes in the graph.
func (PkgEdges) PreservationActionsOrErr ¶
func (e PkgEdges) PreservationActionsOrErr() ([]*PreservationAction, error)
PreservationActionsOrErr returns the PreservationActions value or an error if the edge was not loaded in eager-loading.
type PkgGroupBy ¶
type PkgGroupBy struct {
// contains filtered or unexported fields
}
PkgGroupBy is the group-by builder for Pkg entities.
func (*PkgGroupBy) Aggregate ¶
func (pgb *PkgGroupBy) Aggregate(fns ...AggregateFunc) *PkgGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PkgGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PkgGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PkgGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PkgGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PkgGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PkgGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PkgGroupBy) Scan ¶
func (pgb *PkgGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PkgGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PkgMutation ¶
type PkgMutation struct {
// contains filtered or unexported fields
}
PkgMutation represents an operation that mutates the Pkg nodes in the graph.
func (*PkgMutation) AddField ¶
func (m *PkgMutation) 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 (*PkgMutation) AddPreservationActionIDs ¶
func (m *PkgMutation) AddPreservationActionIDs(ids ...int)
AddPreservationActionIDs adds the "preservation_actions" edge to the PreservationAction entity by ids.
func (*PkgMutation) AddStatus ¶
func (m *PkgMutation) AddStatus(i int8)
AddStatus adds i to the "status" field.
func (*PkgMutation) AddedEdges ¶
func (m *PkgMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PkgMutation) AddedField ¶
func (m *PkgMutation) 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 (*PkgMutation) AddedFields ¶
func (m *PkgMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PkgMutation) AddedIDs ¶
func (m *PkgMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PkgMutation) AddedStatus ¶
func (m *PkgMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*PkgMutation) AipID ¶
func (m *PkgMutation) AipID() (r uuid.UUID, exists bool)
AipID returns the value of the "aip_id" field in the mutation.
func (*PkgMutation) AipIDCleared ¶
func (m *PkgMutation) AipIDCleared() bool
AipIDCleared returns if the "aip_id" field was cleared in this mutation.
func (*PkgMutation) ClearAipID ¶
func (m *PkgMutation) ClearAipID()
ClearAipID clears the value of the "aip_id" field.
func (*PkgMutation) ClearCompletedAt ¶
func (m *PkgMutation) ClearCompletedAt()
ClearCompletedAt clears the value of the "completed_at" field.
func (*PkgMutation) ClearEdge ¶
func (m *PkgMutation) 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 (*PkgMutation) ClearField ¶
func (m *PkgMutation) 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 (*PkgMutation) ClearLocationID ¶
func (m *PkgMutation) ClearLocationID()
ClearLocationID clears the value of the "location_id" field.
func (*PkgMutation) ClearPreservationActions ¶
func (m *PkgMutation) ClearPreservationActions()
ClearPreservationActions clears the "preservation_actions" edge to the PreservationAction entity.
func (*PkgMutation) ClearStartedAt ¶
func (m *PkgMutation) ClearStartedAt()
ClearStartedAt clears the value of the "started_at" field.
func (*PkgMutation) ClearedEdges ¶
func (m *PkgMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PkgMutation) ClearedFields ¶
func (m *PkgMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PkgMutation) Client ¶
func (m PkgMutation) 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 (*PkgMutation) CompletedAt ¶
func (m *PkgMutation) CompletedAt() (r time.Time, exists bool)
CompletedAt returns the value of the "completed_at" field in the mutation.
func (*PkgMutation) CompletedAtCleared ¶
func (m *PkgMutation) CompletedAtCleared() bool
CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.
func (*PkgMutation) CreatedAt ¶
func (m *PkgMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PkgMutation) EdgeCleared ¶
func (m *PkgMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PkgMutation) Field ¶
func (m *PkgMutation) 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 (*PkgMutation) FieldCleared ¶
func (m *PkgMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PkgMutation) Fields ¶
func (m *PkgMutation) 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 (*PkgMutation) ID ¶
func (m *PkgMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PkgMutation) IDs ¶
func (m *PkgMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PkgMutation) LocationID ¶
func (m *PkgMutation) LocationID() (r uuid.UUID, exists bool)
LocationID returns the value of the "location_id" field in the mutation.
func (*PkgMutation) LocationIDCleared ¶
func (m *PkgMutation) LocationIDCleared() bool
LocationIDCleared returns if the "location_id" field was cleared in this mutation.
func (*PkgMutation) Name ¶
func (m *PkgMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PkgMutation) OldAipID ¶
OldAipID returns the old "aip_id" field's value of the Pkg entity. If the Pkg 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 (*PkgMutation) OldCompletedAt ¶
OldCompletedAt returns the old "completed_at" field's value of the Pkg entity. If the Pkg 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 (*PkgMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Pkg entity. If the Pkg 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 (*PkgMutation) 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 (*PkgMutation) OldLocationID ¶
OldLocationID returns the old "location_id" field's value of the Pkg entity. If the Pkg 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 (*PkgMutation) OldName ¶
func (m *PkgMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Pkg entity. If the Pkg 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 (*PkgMutation) OldRunID ¶
OldRunID returns the old "run_id" field's value of the Pkg entity. If the Pkg 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 (*PkgMutation) OldStartedAt ¶
OldStartedAt returns the old "started_at" field's value of the Pkg entity. If the Pkg 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 (*PkgMutation) OldStatus ¶
func (m *PkgMutation) OldStatus(ctx context.Context) (v int8, err error)
OldStatus returns the old "status" field's value of the Pkg entity. If the Pkg 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 (*PkgMutation) OldWorkflowID ¶
func (m *PkgMutation) OldWorkflowID(ctx context.Context) (v string, err error)
OldWorkflowID returns the old "workflow_id" field's value of the Pkg entity. If the Pkg 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 (*PkgMutation) PreservationActionsCleared ¶
func (m *PkgMutation) PreservationActionsCleared() bool
PreservationActionsCleared reports if the "preservation_actions" edge to the PreservationAction entity was cleared.
func (*PkgMutation) PreservationActionsIDs ¶
func (m *PkgMutation) PreservationActionsIDs() (ids []int)
PreservationActionsIDs returns the "preservation_actions" edge IDs in the mutation.
func (*PkgMutation) RemovePreservationActionIDs ¶
func (m *PkgMutation) RemovePreservationActionIDs(ids ...int)
RemovePreservationActionIDs removes the "preservation_actions" edge to the PreservationAction entity by IDs.
func (*PkgMutation) RemovedEdges ¶
func (m *PkgMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PkgMutation) RemovedIDs ¶
func (m *PkgMutation) 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 (*PkgMutation) RemovedPreservationActionsIDs ¶
func (m *PkgMutation) RemovedPreservationActionsIDs() (ids []int)
RemovedPreservationActions returns the removed IDs of the "preservation_actions" edge to the PreservationAction entity.
func (*PkgMutation) ResetAipID ¶
func (m *PkgMutation) ResetAipID()
ResetAipID resets all changes to the "aip_id" field.
func (*PkgMutation) ResetCompletedAt ¶
func (m *PkgMutation) ResetCompletedAt()
ResetCompletedAt resets all changes to the "completed_at" field.
func (*PkgMutation) ResetCreatedAt ¶
func (m *PkgMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PkgMutation) ResetEdge ¶
func (m *PkgMutation) 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 (*PkgMutation) ResetField ¶
func (m *PkgMutation) 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 (*PkgMutation) ResetLocationID ¶
func (m *PkgMutation) ResetLocationID()
ResetLocationID resets all changes to the "location_id" field.
func (*PkgMutation) ResetName ¶
func (m *PkgMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PkgMutation) ResetPreservationActions ¶
func (m *PkgMutation) ResetPreservationActions()
ResetPreservationActions resets all changes to the "preservation_actions" edge.
func (*PkgMutation) ResetRunID ¶
func (m *PkgMutation) ResetRunID()
ResetRunID resets all changes to the "run_id" field.
func (*PkgMutation) ResetStartedAt ¶
func (m *PkgMutation) ResetStartedAt()
ResetStartedAt resets all changes to the "started_at" field.
func (*PkgMutation) ResetStatus ¶
func (m *PkgMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*PkgMutation) ResetWorkflowID ¶
func (m *PkgMutation) ResetWorkflowID()
ResetWorkflowID resets all changes to the "workflow_id" field.
func (*PkgMutation) RunID ¶
func (m *PkgMutation) RunID() (r uuid.UUID, exists bool)
RunID returns the value of the "run_id" field in the mutation.
func (*PkgMutation) SetAipID ¶
func (m *PkgMutation) SetAipID(u uuid.UUID)
SetAipID sets the "aip_id" field.
func (*PkgMutation) SetCompletedAt ¶
func (m *PkgMutation) SetCompletedAt(t time.Time)
SetCompletedAt sets the "completed_at" field.
func (*PkgMutation) SetCreatedAt ¶
func (m *PkgMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PkgMutation) SetField ¶
func (m *PkgMutation) 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 (*PkgMutation) SetLocationID ¶
func (m *PkgMutation) SetLocationID(u uuid.UUID)
SetLocationID sets the "location_id" field.
func (*PkgMutation) SetName ¶
func (m *PkgMutation) SetName(s string)
SetName sets the "name" field.
func (*PkgMutation) SetOp ¶
func (m *PkgMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PkgMutation) SetRunID ¶
func (m *PkgMutation) SetRunID(u uuid.UUID)
SetRunID sets the "run_id" field.
func (*PkgMutation) SetStartedAt ¶
func (m *PkgMutation) SetStartedAt(t time.Time)
SetStartedAt sets the "started_at" field.
func (*PkgMutation) SetStatus ¶
func (m *PkgMutation) SetStatus(i int8)
SetStatus sets the "status" field.
func (*PkgMutation) SetWorkflowID ¶
func (m *PkgMutation) SetWorkflowID(s string)
SetWorkflowID sets the "workflow_id" field.
func (*PkgMutation) StartedAt ¶
func (m *PkgMutation) StartedAt() (r time.Time, exists bool)
StartedAt returns the value of the "started_at" field in the mutation.
func (*PkgMutation) StartedAtCleared ¶
func (m *PkgMutation) StartedAtCleared() bool
StartedAtCleared returns if the "started_at" field was cleared in this mutation.
func (*PkgMutation) Status ¶
func (m *PkgMutation) Status() (r int8, exists bool)
Status returns the value of the "status" field in the mutation.
func (PkgMutation) Tx ¶
func (m PkgMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PkgMutation) Type ¶
func (m *PkgMutation) Type() string
Type returns the node type of this mutation (Pkg).
func (*PkgMutation) Where ¶
func (m *PkgMutation) Where(ps ...predicate.Pkg)
Where appends a list predicates to the PkgMutation builder.
func (*PkgMutation) WhereP ¶
func (m *PkgMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PkgMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*PkgMutation) WorkflowID ¶
func (m *PkgMutation) WorkflowID() (r string, exists bool)
WorkflowID returns the value of the "workflow_id" field in the mutation.
type PkgQuery ¶
type PkgQuery struct {
// contains filtered or unexported fields
}
PkgQuery is the builder for querying Pkg entities.
func (*PkgQuery) Aggregate ¶
func (pq *PkgQuery) Aggregate(fns ...AggregateFunc) *PkgSelect
Aggregate returns a PkgSelect configured with the given aggregations.
func (*PkgQuery) Clone ¶
Clone returns a duplicate of the PkgQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PkgQuery) First ¶
First returns the first Pkg entity from the query. Returns a *NotFoundError when no Pkg was found.
func (*PkgQuery) FirstID ¶
FirstID returns the first Pkg ID from the query. Returns a *NotFoundError when no Pkg ID was found.
func (*PkgQuery) GroupBy ¶
func (pq *PkgQuery) GroupBy(field string, fields ...string) *PkgGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Pkg.Query(). GroupBy(pkg.FieldName). Aggregate(db.Count()). Scan(ctx, &v)
func (*PkgQuery) Only ¶
Only returns a single Pkg entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Pkg entity is found. Returns a *NotFoundError when no Pkg entities are found.
func (*PkgQuery) OnlyID ¶
OnlyID is like Only, but returns the only Pkg ID in the query. Returns a *NotSingularError when more than one Pkg ID is found. Returns a *NotFoundError when no entities are found.
func (*PkgQuery) Order ¶
func (pq *PkgQuery) Order(o ...pkg.OrderOption) *PkgQuery
Order specifies how the records should be ordered.
func (*PkgQuery) QueryPreservationActions ¶
func (pq *PkgQuery) QueryPreservationActions() *PreservationActionQuery
QueryPreservationActions chains the current query on the "preservation_actions" edge.
func (*PkgQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Pkg.Query(). Select(pkg.FieldName). Scan(ctx, &v)
func (*PkgQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PkgQuery) WithPreservationActions ¶
func (pq *PkgQuery) WithPreservationActions(opts ...func(*PreservationActionQuery)) *PkgQuery
WithPreservationActions tells the query-builder to eager-load the nodes that are connected to the "preservation_actions" edge. The optional arguments are used to configure the query builder of the edge.
type PkgSelect ¶
type PkgSelect struct { *PkgQuery // contains filtered or unexported fields }
PkgSelect is the builder for selecting fields of Pkg entities.
func (*PkgSelect) Aggregate ¶
func (ps *PkgSelect) Aggregate(fns ...AggregateFunc) *PkgSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PkgSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PkgSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PkgSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PkgSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PkgSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PkgSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PkgSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PkgUpdate ¶
type PkgUpdate struct {
// contains filtered or unexported fields
}
PkgUpdate is the builder for updating Pkg entities.
func (*PkgUpdate) AddPreservationActionIDs ¶
AddPreservationActionIDs adds the "preservation_actions" edge to the PreservationAction entity by IDs.
func (*PkgUpdate) AddPreservationActions ¶
func (pu *PkgUpdate) AddPreservationActions(p ...*PreservationAction) *PkgUpdate
AddPreservationActions adds the "preservation_actions" edges to the PreservationAction entity.
func (*PkgUpdate) ClearAipID ¶
ClearAipID clears the value of the "aip_id" field.
func (*PkgUpdate) ClearCompletedAt ¶
ClearCompletedAt clears the value of the "completed_at" field.
func (*PkgUpdate) ClearLocationID ¶
ClearLocationID clears the value of the "location_id" field.
func (*PkgUpdate) ClearPreservationActions ¶
ClearPreservationActions clears all "preservation_actions" edges to the PreservationAction entity.
func (*PkgUpdate) ClearStartedAt ¶
ClearStartedAt clears the value of the "started_at" field.
func (*PkgUpdate) Mutation ¶
func (pu *PkgUpdate) Mutation() *PkgMutation
Mutation returns the PkgMutation object of the builder.
func (*PkgUpdate) RemovePreservationActionIDs ¶
RemovePreservationActionIDs removes the "preservation_actions" edge to PreservationAction entities by IDs.
func (*PkgUpdate) RemovePreservationActions ¶
func (pu *PkgUpdate) RemovePreservationActions(p ...*PreservationAction) *PkgUpdate
RemovePreservationActions removes "preservation_actions" edges to PreservationAction entities.
func (*PkgUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*PkgUpdate) SetCompletedAt ¶
SetCompletedAt sets the "completed_at" field.
func (*PkgUpdate) SetLocationID ¶
SetLocationID sets the "location_id" field.
func (*PkgUpdate) SetNillableAipID ¶
SetNillableAipID sets the "aip_id" field if the given value is not nil.
func (*PkgUpdate) SetNillableCompletedAt ¶
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*PkgUpdate) SetNillableLocationID ¶
SetNillableLocationID sets the "location_id" field if the given value is not nil.
func (*PkgUpdate) SetNillableName ¶
SetNillableName sets the "name" field if the given value is not nil.
func (*PkgUpdate) SetNillableRunID ¶
SetNillableRunID sets the "run_id" field if the given value is not nil.
func (*PkgUpdate) SetNillableStartedAt ¶
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*PkgUpdate) SetNillableStatus ¶
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PkgUpdate) SetNillableWorkflowID ¶
SetNillableWorkflowID sets the "workflow_id" field if the given value is not nil.
func (*PkgUpdate) SetStartedAt ¶
SetStartedAt sets the "started_at" field.
func (*PkgUpdate) SetWorkflowID ¶
SetWorkflowID sets the "workflow_id" field.
type PkgUpdateOne ¶
type PkgUpdateOne struct {
// contains filtered or unexported fields
}
PkgUpdateOne is the builder for updating a single Pkg entity.
func (*PkgUpdateOne) AddPreservationActionIDs ¶
func (puo *PkgUpdateOne) AddPreservationActionIDs(ids ...int) *PkgUpdateOne
AddPreservationActionIDs adds the "preservation_actions" edge to the PreservationAction entity by IDs.
func (*PkgUpdateOne) AddPreservationActions ¶
func (puo *PkgUpdateOne) AddPreservationActions(p ...*PreservationAction) *PkgUpdateOne
AddPreservationActions adds the "preservation_actions" edges to the PreservationAction entity.
func (*PkgUpdateOne) AddStatus ¶
func (puo *PkgUpdateOne) AddStatus(i int8) *PkgUpdateOne
AddStatus adds i to the "status" field.
func (*PkgUpdateOne) ClearAipID ¶
func (puo *PkgUpdateOne) ClearAipID() *PkgUpdateOne
ClearAipID clears the value of the "aip_id" field.
func (*PkgUpdateOne) ClearCompletedAt ¶
func (puo *PkgUpdateOne) ClearCompletedAt() *PkgUpdateOne
ClearCompletedAt clears the value of the "completed_at" field.
func (*PkgUpdateOne) ClearLocationID ¶
func (puo *PkgUpdateOne) ClearLocationID() *PkgUpdateOne
ClearLocationID clears the value of the "location_id" field.
func (*PkgUpdateOne) ClearPreservationActions ¶
func (puo *PkgUpdateOne) ClearPreservationActions() *PkgUpdateOne
ClearPreservationActions clears all "preservation_actions" edges to the PreservationAction entity.
func (*PkgUpdateOne) ClearStartedAt ¶
func (puo *PkgUpdateOne) ClearStartedAt() *PkgUpdateOne
ClearStartedAt clears the value of the "started_at" field.
func (*PkgUpdateOne) Exec ¶
func (puo *PkgUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PkgUpdateOne) ExecX ¶
func (puo *PkgUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PkgUpdateOne) Mutation ¶
func (puo *PkgUpdateOne) Mutation() *PkgMutation
Mutation returns the PkgMutation object of the builder.
func (*PkgUpdateOne) RemovePreservationActionIDs ¶
func (puo *PkgUpdateOne) RemovePreservationActionIDs(ids ...int) *PkgUpdateOne
RemovePreservationActionIDs removes the "preservation_actions" edge to PreservationAction entities by IDs.
func (*PkgUpdateOne) RemovePreservationActions ¶
func (puo *PkgUpdateOne) RemovePreservationActions(p ...*PreservationAction) *PkgUpdateOne
RemovePreservationActions removes "preservation_actions" edges to PreservationAction entities.
func (*PkgUpdateOne) Save ¶
func (puo *PkgUpdateOne) Save(ctx context.Context) (*Pkg, error)
Save executes the query and returns the updated Pkg entity.
func (*PkgUpdateOne) SaveX ¶
func (puo *PkgUpdateOne) SaveX(ctx context.Context) *Pkg
SaveX is like Save, but panics if an error occurs.
func (*PkgUpdateOne) Select ¶
func (puo *PkgUpdateOne) Select(field string, fields ...string) *PkgUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PkgUpdateOne) SetAipID ¶
func (puo *PkgUpdateOne) SetAipID(u uuid.UUID) *PkgUpdateOne
SetAipID sets the "aip_id" field.
func (*PkgUpdateOne) SetCompletedAt ¶
func (puo *PkgUpdateOne) SetCompletedAt(t time.Time) *PkgUpdateOne
SetCompletedAt sets the "completed_at" field.
func (*PkgUpdateOne) SetLocationID ¶
func (puo *PkgUpdateOne) SetLocationID(u uuid.UUID) *PkgUpdateOne
SetLocationID sets the "location_id" field.
func (*PkgUpdateOne) SetName ¶
func (puo *PkgUpdateOne) SetName(s string) *PkgUpdateOne
SetName sets the "name" field.
func (*PkgUpdateOne) SetNillableAipID ¶
func (puo *PkgUpdateOne) SetNillableAipID(u *uuid.UUID) *PkgUpdateOne
SetNillableAipID sets the "aip_id" field if the given value is not nil.
func (*PkgUpdateOne) SetNillableCompletedAt ¶
func (puo *PkgUpdateOne) SetNillableCompletedAt(t *time.Time) *PkgUpdateOne
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*PkgUpdateOne) SetNillableLocationID ¶
func (puo *PkgUpdateOne) SetNillableLocationID(u *uuid.UUID) *PkgUpdateOne
SetNillableLocationID sets the "location_id" field if the given value is not nil.
func (*PkgUpdateOne) SetNillableName ¶
func (puo *PkgUpdateOne) SetNillableName(s *string) *PkgUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PkgUpdateOne) SetNillableRunID ¶
func (puo *PkgUpdateOne) SetNillableRunID(u *uuid.UUID) *PkgUpdateOne
SetNillableRunID sets the "run_id" field if the given value is not nil.
func (*PkgUpdateOne) SetNillableStartedAt ¶
func (puo *PkgUpdateOne) SetNillableStartedAt(t *time.Time) *PkgUpdateOne
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*PkgUpdateOne) SetNillableStatus ¶
func (puo *PkgUpdateOne) SetNillableStatus(i *int8) *PkgUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PkgUpdateOne) SetNillableWorkflowID ¶
func (puo *PkgUpdateOne) SetNillableWorkflowID(s *string) *PkgUpdateOne
SetNillableWorkflowID sets the "workflow_id" field if the given value is not nil.
func (*PkgUpdateOne) SetRunID ¶
func (puo *PkgUpdateOne) SetRunID(u uuid.UUID) *PkgUpdateOne
SetRunID sets the "run_id" field.
func (*PkgUpdateOne) SetStartedAt ¶
func (puo *PkgUpdateOne) SetStartedAt(t time.Time) *PkgUpdateOne
SetStartedAt sets the "started_at" field.
func (*PkgUpdateOne) SetStatus ¶
func (puo *PkgUpdateOne) SetStatus(i int8) *PkgUpdateOne
SetStatus sets the "status" field.
func (*PkgUpdateOne) SetWorkflowID ¶
func (puo *PkgUpdateOne) SetWorkflowID(s string) *PkgUpdateOne
SetWorkflowID sets the "workflow_id" field.
func (*PkgUpdateOne) Where ¶
func (puo *PkgUpdateOne) Where(ps ...predicate.Pkg) *PkgUpdateOne
Where appends a list predicates to the PkgUpdate builder.
type PreservationAction ¶
type PreservationAction struct { // ID of the ent. ID int `json:"id,omitempty"` // WorkflowID holds the value of the "workflow_id" field. WorkflowID string `json:"workflow_id,omitempty"` // Type holds the value of the "type" field. Type int8 `json:"type,omitempty"` // Status holds the value of the "status" field. Status int8 `json:"status,omitempty"` // StartedAt holds the value of the "started_at" field. StartedAt time.Time `json:"started_at,omitempty"` // CompletedAt holds the value of the "completed_at" field. CompletedAt time.Time `json:"completed_at,omitempty"` // PackageID holds the value of the "package_id" field. PackageID int `json:"package_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PreservationActionQuery when eager-loading is set. Edges PreservationActionEdges `json:"edges"` // contains filtered or unexported fields }
PreservationAction is the model entity for the PreservationAction schema.
func (*PreservationAction) QueryPackage ¶
func (pa *PreservationAction) QueryPackage() *PkgQuery
QueryPackage queries the "package" edge of the PreservationAction entity.
func (*PreservationAction) QueryTasks ¶
func (pa *PreservationAction) QueryTasks() *PreservationTaskQuery
QueryTasks queries the "tasks" edge of the PreservationAction entity.
func (*PreservationAction) String ¶
func (pa *PreservationAction) String() string
String implements the fmt.Stringer.
func (*PreservationAction) Unwrap ¶
func (pa *PreservationAction) Unwrap() *PreservationAction
Unwrap unwraps the PreservationAction 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 (*PreservationAction) Update ¶
func (pa *PreservationAction) Update() *PreservationActionUpdateOne
Update returns a builder for updating this PreservationAction. Note that you need to call PreservationAction.Unwrap() before calling this method if this PreservationAction was returned from a transaction, and the transaction was committed or rolled back.
type PreservationActionClient ¶
type PreservationActionClient struct {
// contains filtered or unexported fields
}
PreservationActionClient is a client for the PreservationAction schema.
func NewPreservationActionClient ¶
func NewPreservationActionClient(c config) *PreservationActionClient
NewPreservationActionClient returns a client for the PreservationAction from the given config.
func (*PreservationActionClient) Create ¶
func (c *PreservationActionClient) Create() *PreservationActionCreate
Create returns a builder for creating a PreservationAction entity.
func (*PreservationActionClient) CreateBulk ¶
func (c *PreservationActionClient) CreateBulk(builders ...*PreservationActionCreate) *PreservationActionCreateBulk
CreateBulk returns a builder for creating a bulk of PreservationAction entities.
func (*PreservationActionClient) Delete ¶
func (c *PreservationActionClient) Delete() *PreservationActionDelete
Delete returns a delete builder for PreservationAction.
func (*PreservationActionClient) DeleteOne ¶
func (c *PreservationActionClient) DeleteOne(pa *PreservationAction) *PreservationActionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PreservationActionClient) DeleteOneID ¶
func (c *PreservationActionClient) DeleteOneID(id int) *PreservationActionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PreservationActionClient) Get ¶
func (c *PreservationActionClient) Get(ctx context.Context, id int) (*PreservationAction, error)
Get returns a PreservationAction entity by its id.
func (*PreservationActionClient) GetX ¶
func (c *PreservationActionClient) GetX(ctx context.Context, id int) *PreservationAction
GetX is like Get, but panics if an error occurs.
func (*PreservationActionClient) Hooks ¶
func (c *PreservationActionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PreservationActionClient) Intercept ¶
func (c *PreservationActionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `preservationaction.Intercept(f(g(h())))`.
func (*PreservationActionClient) Interceptors ¶
func (c *PreservationActionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PreservationActionClient) MapCreateBulk ¶
func (c *PreservationActionClient) MapCreateBulk(slice any, setFunc func(*PreservationActionCreate, int)) *PreservationActionCreateBulk
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 (*PreservationActionClient) Query ¶
func (c *PreservationActionClient) Query() *PreservationActionQuery
Query returns a query builder for PreservationAction.
func (*PreservationActionClient) QueryPackage ¶
func (c *PreservationActionClient) QueryPackage(pa *PreservationAction) *PkgQuery
QueryPackage queries the package edge of a PreservationAction.
func (*PreservationActionClient) QueryTasks ¶
func (c *PreservationActionClient) QueryTasks(pa *PreservationAction) *PreservationTaskQuery
QueryTasks queries the tasks edge of a PreservationAction.
func (*PreservationActionClient) Update ¶
func (c *PreservationActionClient) Update() *PreservationActionUpdate
Update returns an update builder for PreservationAction.
func (*PreservationActionClient) UpdateOne ¶
func (c *PreservationActionClient) UpdateOne(pa *PreservationAction) *PreservationActionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PreservationActionClient) UpdateOneID ¶
func (c *PreservationActionClient) UpdateOneID(id int) *PreservationActionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PreservationActionClient) Use ¶
func (c *PreservationActionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `preservationaction.Hooks(f(g(h())))`.
type PreservationActionCreate ¶
type PreservationActionCreate struct {
// contains filtered or unexported fields
}
PreservationActionCreate is the builder for creating a PreservationAction entity.
func (*PreservationActionCreate) AddTaskIDs ¶
func (pac *PreservationActionCreate) AddTaskIDs(ids ...int) *PreservationActionCreate
AddTaskIDs adds the "tasks" edge to the PreservationTask entity by IDs.
func (*PreservationActionCreate) AddTasks ¶
func (pac *PreservationActionCreate) AddTasks(p ...*PreservationTask) *PreservationActionCreate
AddTasks adds the "tasks" edges to the PreservationTask entity.
func (*PreservationActionCreate) Exec ¶
func (pac *PreservationActionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PreservationActionCreate) ExecX ¶
func (pac *PreservationActionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PreservationActionCreate) Mutation ¶
func (pac *PreservationActionCreate) Mutation() *PreservationActionMutation
Mutation returns the PreservationActionMutation object of the builder.
func (*PreservationActionCreate) Save ¶
func (pac *PreservationActionCreate) Save(ctx context.Context) (*PreservationAction, error)
Save creates the PreservationAction in the database.
func (*PreservationActionCreate) SaveX ¶
func (pac *PreservationActionCreate) SaveX(ctx context.Context) *PreservationAction
SaveX calls Save and panics if Save returns an error.
func (*PreservationActionCreate) SetCompletedAt ¶
func (pac *PreservationActionCreate) SetCompletedAt(t time.Time) *PreservationActionCreate
SetCompletedAt sets the "completed_at" field.
func (*PreservationActionCreate) SetNillableCompletedAt ¶
func (pac *PreservationActionCreate) SetNillableCompletedAt(t *time.Time) *PreservationActionCreate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*PreservationActionCreate) SetNillableStartedAt ¶
func (pac *PreservationActionCreate) SetNillableStartedAt(t *time.Time) *PreservationActionCreate
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*PreservationActionCreate) SetPackage ¶
func (pac *PreservationActionCreate) SetPackage(p *Pkg) *PreservationActionCreate
SetPackage sets the "package" edge to the Pkg entity.
func (*PreservationActionCreate) SetPackageID ¶
func (pac *PreservationActionCreate) SetPackageID(i int) *PreservationActionCreate
SetPackageID sets the "package_id" field.
func (*PreservationActionCreate) SetStartedAt ¶
func (pac *PreservationActionCreate) SetStartedAt(t time.Time) *PreservationActionCreate
SetStartedAt sets the "started_at" field.
func (*PreservationActionCreate) SetStatus ¶
func (pac *PreservationActionCreate) SetStatus(i int8) *PreservationActionCreate
SetStatus sets the "status" field.
func (*PreservationActionCreate) SetType ¶
func (pac *PreservationActionCreate) SetType(i int8) *PreservationActionCreate
SetType sets the "type" field.
func (*PreservationActionCreate) SetWorkflowID ¶
func (pac *PreservationActionCreate) SetWorkflowID(s string) *PreservationActionCreate
SetWorkflowID sets the "workflow_id" field.
type PreservationActionCreateBulk ¶
type PreservationActionCreateBulk struct {
// contains filtered or unexported fields
}
PreservationActionCreateBulk is the builder for creating many PreservationAction entities in bulk.
func (*PreservationActionCreateBulk) Exec ¶
func (pacb *PreservationActionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PreservationActionCreateBulk) ExecX ¶
func (pacb *PreservationActionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PreservationActionCreateBulk) Save ¶
func (pacb *PreservationActionCreateBulk) Save(ctx context.Context) ([]*PreservationAction, error)
Save creates the PreservationAction entities in the database.
func (*PreservationActionCreateBulk) SaveX ¶
func (pacb *PreservationActionCreateBulk) SaveX(ctx context.Context) []*PreservationAction
SaveX is like Save, but panics if an error occurs.
type PreservationActionDelete ¶
type PreservationActionDelete struct {
// contains filtered or unexported fields
}
PreservationActionDelete is the builder for deleting a PreservationAction entity.
func (*PreservationActionDelete) Exec ¶
func (pad *PreservationActionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PreservationActionDelete) ExecX ¶
func (pad *PreservationActionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PreservationActionDelete) Where ¶
func (pad *PreservationActionDelete) Where(ps ...predicate.PreservationAction) *PreservationActionDelete
Where appends a list predicates to the PreservationActionDelete builder.
type PreservationActionDeleteOne ¶
type PreservationActionDeleteOne struct {
// contains filtered or unexported fields
}
PreservationActionDeleteOne is the builder for deleting a single PreservationAction entity.
func (*PreservationActionDeleteOne) Exec ¶
func (pado *PreservationActionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PreservationActionDeleteOne) ExecX ¶
func (pado *PreservationActionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PreservationActionDeleteOne) Where ¶
func (pado *PreservationActionDeleteOne) Where(ps ...predicate.PreservationAction) *PreservationActionDeleteOne
Where appends a list predicates to the PreservationActionDelete builder.
type PreservationActionEdges ¶
type PreservationActionEdges struct { // Package holds the value of the package edge. Package *Pkg `json:"package,omitempty"` // Tasks holds the value of the tasks edge. Tasks []*PreservationTask `json:"tasks,omitempty"` // contains filtered or unexported fields }
PreservationActionEdges holds the relations/edges for other nodes in the graph.
func (PreservationActionEdges) PackageOrErr ¶
func (e PreservationActionEdges) PackageOrErr() (*Pkg, error)
PackageOrErr returns the Package value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PreservationActionEdges) TasksOrErr ¶
func (e PreservationActionEdges) TasksOrErr() ([]*PreservationTask, error)
TasksOrErr returns the Tasks value or an error if the edge was not loaded in eager-loading.
type PreservationActionGroupBy ¶
type PreservationActionGroupBy struct {
// contains filtered or unexported fields
}
PreservationActionGroupBy is the group-by builder for PreservationAction entities.
func (*PreservationActionGroupBy) Aggregate ¶
func (pagb *PreservationActionGroupBy) Aggregate(fns ...AggregateFunc) *PreservationActionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PreservationActionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PreservationActionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PreservationActionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PreservationActionGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*PreservationActionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PreservationActionGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PreservationActionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PreservationActionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PreservationActionGroupBy) Scan ¶
func (pagb *PreservationActionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PreservationActionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PreservationActionMutation ¶
type PreservationActionMutation struct {
// contains filtered or unexported fields
}
PreservationActionMutation represents an operation that mutates the PreservationAction nodes in the graph.
func (*PreservationActionMutation) AddField ¶
func (m *PreservationActionMutation) 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 (*PreservationActionMutation) AddStatus ¶
func (m *PreservationActionMutation) AddStatus(i int8)
AddStatus adds i to the "status" field.
func (*PreservationActionMutation) AddTaskIDs ¶
func (m *PreservationActionMutation) AddTaskIDs(ids ...int)
AddTaskIDs adds the "tasks" edge to the PreservationTask entity by ids.
func (*PreservationActionMutation) AddType ¶
func (m *PreservationActionMutation) AddType(i int8)
AddType adds i to the "type" field.
func (*PreservationActionMutation) AddedEdges ¶
func (m *PreservationActionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PreservationActionMutation) AddedField ¶
func (m *PreservationActionMutation) 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 (*PreservationActionMutation) AddedFields ¶
func (m *PreservationActionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PreservationActionMutation) AddedIDs ¶
func (m *PreservationActionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PreservationActionMutation) AddedStatus ¶
func (m *PreservationActionMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*PreservationActionMutation) AddedType ¶
func (m *PreservationActionMutation) AddedType() (r int8, exists bool)
AddedType returns the value that was added to the "type" field in this mutation.
func (*PreservationActionMutation) ClearCompletedAt ¶
func (m *PreservationActionMutation) ClearCompletedAt()
ClearCompletedAt clears the value of the "completed_at" field.
func (*PreservationActionMutation) ClearEdge ¶
func (m *PreservationActionMutation) 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 (*PreservationActionMutation) ClearField ¶
func (m *PreservationActionMutation) 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 (*PreservationActionMutation) ClearPackage ¶
func (m *PreservationActionMutation) ClearPackage()
ClearPackage clears the "package" edge to the Pkg entity.
func (*PreservationActionMutation) ClearStartedAt ¶
func (m *PreservationActionMutation) ClearStartedAt()
ClearStartedAt clears the value of the "started_at" field.
func (*PreservationActionMutation) ClearTasks ¶
func (m *PreservationActionMutation) ClearTasks()
ClearTasks clears the "tasks" edge to the PreservationTask entity.
func (*PreservationActionMutation) ClearedEdges ¶
func (m *PreservationActionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PreservationActionMutation) ClearedFields ¶
func (m *PreservationActionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PreservationActionMutation) Client ¶
func (m PreservationActionMutation) 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 (*PreservationActionMutation) CompletedAt ¶
func (m *PreservationActionMutation) CompletedAt() (r time.Time, exists bool)
CompletedAt returns the value of the "completed_at" field in the mutation.
func (*PreservationActionMutation) CompletedAtCleared ¶
func (m *PreservationActionMutation) CompletedAtCleared() bool
CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.
func (*PreservationActionMutation) EdgeCleared ¶
func (m *PreservationActionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PreservationActionMutation) Field ¶
func (m *PreservationActionMutation) 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 (*PreservationActionMutation) FieldCleared ¶
func (m *PreservationActionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PreservationActionMutation) Fields ¶
func (m *PreservationActionMutation) 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 (*PreservationActionMutation) GetType ¶
func (m *PreservationActionMutation) GetType() (r int8, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*PreservationActionMutation) ID ¶
func (m *PreservationActionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PreservationActionMutation) IDs ¶
func (m *PreservationActionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PreservationActionMutation) OldCompletedAt ¶
OldCompletedAt returns the old "completed_at" field's value of the PreservationAction entity. If the PreservationAction 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 (*PreservationActionMutation) 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 (*PreservationActionMutation) OldPackageID ¶
func (m *PreservationActionMutation) OldPackageID(ctx context.Context) (v int, err error)
OldPackageID returns the old "package_id" field's value of the PreservationAction entity. If the PreservationAction 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 (*PreservationActionMutation) OldStartedAt ¶
OldStartedAt returns the old "started_at" field's value of the PreservationAction entity. If the PreservationAction 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 (*PreservationActionMutation) OldStatus ¶
func (m *PreservationActionMutation) OldStatus(ctx context.Context) (v int8, err error)
OldStatus returns the old "status" field's value of the PreservationAction entity. If the PreservationAction 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 (*PreservationActionMutation) OldType ¶
func (m *PreservationActionMutation) OldType(ctx context.Context) (v int8, err error)
OldType returns the old "type" field's value of the PreservationAction entity. If the PreservationAction 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 (*PreservationActionMutation) OldWorkflowID ¶
func (m *PreservationActionMutation) OldWorkflowID(ctx context.Context) (v string, err error)
OldWorkflowID returns the old "workflow_id" field's value of the PreservationAction entity. If the PreservationAction 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 (*PreservationActionMutation) Op ¶
func (m *PreservationActionMutation) Op() Op
Op returns the operation name.
func (*PreservationActionMutation) PackageCleared ¶
func (m *PreservationActionMutation) PackageCleared() bool
PackageCleared reports if the "package" edge to the Pkg entity was cleared.
func (*PreservationActionMutation) PackageID ¶
func (m *PreservationActionMutation) PackageID() (r int, exists bool)
PackageID returns the value of the "package_id" field in the mutation.
func (*PreservationActionMutation) PackageIDs ¶
func (m *PreservationActionMutation) PackageIDs() (ids []int)
PackageIDs returns the "package" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageID instead. It exists only for internal usage by the builders.
func (*PreservationActionMutation) RemoveTaskIDs ¶
func (m *PreservationActionMutation) RemoveTaskIDs(ids ...int)
RemoveTaskIDs removes the "tasks" edge to the PreservationTask entity by IDs.
func (*PreservationActionMutation) RemovedEdges ¶
func (m *PreservationActionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PreservationActionMutation) RemovedIDs ¶
func (m *PreservationActionMutation) 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 (*PreservationActionMutation) RemovedTasksIDs ¶
func (m *PreservationActionMutation) RemovedTasksIDs() (ids []int)
RemovedTasks returns the removed IDs of the "tasks" edge to the PreservationTask entity.
func (*PreservationActionMutation) ResetCompletedAt ¶
func (m *PreservationActionMutation) ResetCompletedAt()
ResetCompletedAt resets all changes to the "completed_at" field.
func (*PreservationActionMutation) ResetEdge ¶
func (m *PreservationActionMutation) 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 (*PreservationActionMutation) ResetField ¶
func (m *PreservationActionMutation) 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 (*PreservationActionMutation) ResetPackage ¶
func (m *PreservationActionMutation) ResetPackage()
ResetPackage resets all changes to the "package" edge.
func (*PreservationActionMutation) ResetPackageID ¶
func (m *PreservationActionMutation) ResetPackageID()
ResetPackageID resets all changes to the "package_id" field.
func (*PreservationActionMutation) ResetStartedAt ¶
func (m *PreservationActionMutation) ResetStartedAt()
ResetStartedAt resets all changes to the "started_at" field.
func (*PreservationActionMutation) ResetStatus ¶
func (m *PreservationActionMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*PreservationActionMutation) ResetTasks ¶
func (m *PreservationActionMutation) ResetTasks()
ResetTasks resets all changes to the "tasks" edge.
func (*PreservationActionMutation) ResetType ¶
func (m *PreservationActionMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*PreservationActionMutation) ResetWorkflowID ¶
func (m *PreservationActionMutation) ResetWorkflowID()
ResetWorkflowID resets all changes to the "workflow_id" field.
func (*PreservationActionMutation) SetCompletedAt ¶
func (m *PreservationActionMutation) SetCompletedAt(t time.Time)
SetCompletedAt sets the "completed_at" field.
func (*PreservationActionMutation) SetField ¶
func (m *PreservationActionMutation) 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 (*PreservationActionMutation) SetOp ¶
func (m *PreservationActionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PreservationActionMutation) SetPackageID ¶
func (m *PreservationActionMutation) SetPackageID(i int)
SetPackageID sets the "package_id" field.
func (*PreservationActionMutation) SetStartedAt ¶
func (m *PreservationActionMutation) SetStartedAt(t time.Time)
SetStartedAt sets the "started_at" field.
func (*PreservationActionMutation) SetStatus ¶
func (m *PreservationActionMutation) SetStatus(i int8)
SetStatus sets the "status" field.
func (*PreservationActionMutation) SetType ¶
func (m *PreservationActionMutation) SetType(i int8)
SetType sets the "type" field.
func (*PreservationActionMutation) SetWorkflowID ¶
func (m *PreservationActionMutation) SetWorkflowID(s string)
SetWorkflowID sets the "workflow_id" field.
func (*PreservationActionMutation) StartedAt ¶
func (m *PreservationActionMutation) StartedAt() (r time.Time, exists bool)
StartedAt returns the value of the "started_at" field in the mutation.
func (*PreservationActionMutation) StartedAtCleared ¶
func (m *PreservationActionMutation) StartedAtCleared() bool
StartedAtCleared returns if the "started_at" field was cleared in this mutation.
func (*PreservationActionMutation) Status ¶
func (m *PreservationActionMutation) Status() (r int8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*PreservationActionMutation) TasksCleared ¶
func (m *PreservationActionMutation) TasksCleared() bool
TasksCleared reports if the "tasks" edge to the PreservationTask entity was cleared.
func (*PreservationActionMutation) TasksIDs ¶
func (m *PreservationActionMutation) TasksIDs() (ids []int)
TasksIDs returns the "tasks" edge IDs in the mutation.
func (PreservationActionMutation) Tx ¶
func (m PreservationActionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PreservationActionMutation) Type ¶
func (m *PreservationActionMutation) Type() string
Type returns the node type of this mutation (PreservationAction).
func (*PreservationActionMutation) Where ¶
func (m *PreservationActionMutation) Where(ps ...predicate.PreservationAction)
Where appends a list predicates to the PreservationActionMutation builder.
func (*PreservationActionMutation) WhereP ¶
func (m *PreservationActionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PreservationActionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*PreservationActionMutation) WorkflowID ¶
func (m *PreservationActionMutation) WorkflowID() (r string, exists bool)
WorkflowID returns the value of the "workflow_id" field in the mutation.
type PreservationActionQuery ¶
type PreservationActionQuery struct {
// contains filtered or unexported fields
}
PreservationActionQuery is the builder for querying PreservationAction entities.
func (*PreservationActionQuery) Aggregate ¶
func (paq *PreservationActionQuery) Aggregate(fns ...AggregateFunc) *PreservationActionSelect
Aggregate returns a PreservationActionSelect configured with the given aggregations.
func (*PreservationActionQuery) All ¶
func (paq *PreservationActionQuery) All(ctx context.Context) ([]*PreservationAction, error)
All executes the query and returns a list of PreservationActions.
func (*PreservationActionQuery) AllX ¶
func (paq *PreservationActionQuery) AllX(ctx context.Context) []*PreservationAction
AllX is like All, but panics if an error occurs.
func (*PreservationActionQuery) Clone ¶
func (paq *PreservationActionQuery) Clone() *PreservationActionQuery
Clone returns a duplicate of the PreservationActionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PreservationActionQuery) Count ¶
func (paq *PreservationActionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PreservationActionQuery) CountX ¶
func (paq *PreservationActionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PreservationActionQuery) Exist ¶
func (paq *PreservationActionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PreservationActionQuery) ExistX ¶
func (paq *PreservationActionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PreservationActionQuery) First ¶
func (paq *PreservationActionQuery) First(ctx context.Context) (*PreservationAction, error)
First returns the first PreservationAction entity from the query. Returns a *NotFoundError when no PreservationAction was found.
func (*PreservationActionQuery) FirstID ¶
func (paq *PreservationActionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PreservationAction ID from the query. Returns a *NotFoundError when no PreservationAction ID was found.
func (*PreservationActionQuery) FirstIDX ¶
func (paq *PreservationActionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PreservationActionQuery) FirstX ¶
func (paq *PreservationActionQuery) FirstX(ctx context.Context) *PreservationAction
FirstX is like First, but panics if an error occurs.
func (*PreservationActionQuery) GroupBy ¶
func (paq *PreservationActionQuery) GroupBy(field string, fields ...string) *PreservationActionGroupBy
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 { WorkflowID string `json:"workflow_id,omitempty"` Count int `json:"count,omitempty"` } client.PreservationAction.Query(). GroupBy(preservationaction.FieldWorkflowID). Aggregate(db.Count()). Scan(ctx, &v)
func (*PreservationActionQuery) IDs ¶
func (paq *PreservationActionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of PreservationAction IDs.
func (*PreservationActionQuery) IDsX ¶
func (paq *PreservationActionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PreservationActionQuery) Limit ¶
func (paq *PreservationActionQuery) Limit(limit int) *PreservationActionQuery
Limit the number of records to be returned by this query.
func (*PreservationActionQuery) Offset ¶
func (paq *PreservationActionQuery) Offset(offset int) *PreservationActionQuery
Offset to start from.
func (*PreservationActionQuery) Only ¶
func (paq *PreservationActionQuery) Only(ctx context.Context) (*PreservationAction, error)
Only returns a single PreservationAction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PreservationAction entity is found. Returns a *NotFoundError when no PreservationAction entities are found.
func (*PreservationActionQuery) OnlyID ¶
func (paq *PreservationActionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only PreservationAction ID in the query. Returns a *NotSingularError when more than one PreservationAction ID is found. Returns a *NotFoundError when no entities are found.
func (*PreservationActionQuery) OnlyIDX ¶
func (paq *PreservationActionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PreservationActionQuery) OnlyX ¶
func (paq *PreservationActionQuery) OnlyX(ctx context.Context) *PreservationAction
OnlyX is like Only, but panics if an error occurs.
func (*PreservationActionQuery) Order ¶
func (paq *PreservationActionQuery) Order(o ...preservationaction.OrderOption) *PreservationActionQuery
Order specifies how the records should be ordered.
func (*PreservationActionQuery) QueryPackage ¶
func (paq *PreservationActionQuery) QueryPackage() *PkgQuery
QueryPackage chains the current query on the "package" edge.
func (*PreservationActionQuery) QueryTasks ¶
func (paq *PreservationActionQuery) QueryTasks() *PreservationTaskQuery
QueryTasks chains the current query on the "tasks" edge.
func (*PreservationActionQuery) Select ¶
func (paq *PreservationActionQuery) Select(fields ...string) *PreservationActionSelect
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 { WorkflowID string `json:"workflow_id,omitempty"` } client.PreservationAction.Query(). Select(preservationaction.FieldWorkflowID). Scan(ctx, &v)
func (*PreservationActionQuery) Unique ¶
func (paq *PreservationActionQuery) Unique(unique bool) *PreservationActionQuery
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 (*PreservationActionQuery) Where ¶
func (paq *PreservationActionQuery) Where(ps ...predicate.PreservationAction) *PreservationActionQuery
Where adds a new predicate for the PreservationActionQuery builder.
func (*PreservationActionQuery) WithPackage ¶
func (paq *PreservationActionQuery) WithPackage(opts ...func(*PkgQuery)) *PreservationActionQuery
WithPackage tells the query-builder to eager-load the nodes that are connected to the "package" edge. The optional arguments are used to configure the query builder of the edge.
func (*PreservationActionQuery) WithTasks ¶
func (paq *PreservationActionQuery) WithTasks(opts ...func(*PreservationTaskQuery)) *PreservationActionQuery
WithTasks tells the query-builder to eager-load the nodes that are connected to the "tasks" edge. The optional arguments are used to configure the query builder of the edge.
type PreservationActionSelect ¶
type PreservationActionSelect struct { *PreservationActionQuery // contains filtered or unexported fields }
PreservationActionSelect is the builder for selecting fields of PreservationAction entities.
func (*PreservationActionSelect) Aggregate ¶
func (pas *PreservationActionSelect) Aggregate(fns ...AggregateFunc) *PreservationActionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PreservationActionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PreservationActionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PreservationActionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PreservationActionSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*PreservationActionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PreservationActionSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PreservationActionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PreservationActionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PreservationActionSelect) Scan ¶
func (pas *PreservationActionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PreservationActionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PreservationActionUpdate ¶
type PreservationActionUpdate struct {
// contains filtered or unexported fields
}
PreservationActionUpdate is the builder for updating PreservationAction entities.
func (*PreservationActionUpdate) AddStatus ¶
func (pau *PreservationActionUpdate) AddStatus(i int8) *PreservationActionUpdate
AddStatus adds i to the "status" field.
func (*PreservationActionUpdate) AddTaskIDs ¶
func (pau *PreservationActionUpdate) AddTaskIDs(ids ...int) *PreservationActionUpdate
AddTaskIDs adds the "tasks" edge to the PreservationTask entity by IDs.
func (*PreservationActionUpdate) AddTasks ¶
func (pau *PreservationActionUpdate) AddTasks(p ...*PreservationTask) *PreservationActionUpdate
AddTasks adds the "tasks" edges to the PreservationTask entity.
func (*PreservationActionUpdate) AddType ¶
func (pau *PreservationActionUpdate) AddType(i int8) *PreservationActionUpdate
AddType adds i to the "type" field.
func (*PreservationActionUpdate) ClearCompletedAt ¶
func (pau *PreservationActionUpdate) ClearCompletedAt() *PreservationActionUpdate
ClearCompletedAt clears the value of the "completed_at" field.
func (*PreservationActionUpdate) ClearPackage ¶
func (pau *PreservationActionUpdate) ClearPackage() *PreservationActionUpdate
ClearPackage clears the "package" edge to the Pkg entity.
func (*PreservationActionUpdate) ClearStartedAt ¶
func (pau *PreservationActionUpdate) ClearStartedAt() *PreservationActionUpdate
ClearStartedAt clears the value of the "started_at" field.
func (*PreservationActionUpdate) ClearTasks ¶
func (pau *PreservationActionUpdate) ClearTasks() *PreservationActionUpdate
ClearTasks clears all "tasks" edges to the PreservationTask entity.
func (*PreservationActionUpdate) Exec ¶
func (pau *PreservationActionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PreservationActionUpdate) ExecX ¶
func (pau *PreservationActionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PreservationActionUpdate) Mutation ¶
func (pau *PreservationActionUpdate) Mutation() *PreservationActionMutation
Mutation returns the PreservationActionMutation object of the builder.
func (*PreservationActionUpdate) RemoveTaskIDs ¶
func (pau *PreservationActionUpdate) RemoveTaskIDs(ids ...int) *PreservationActionUpdate
RemoveTaskIDs removes the "tasks" edge to PreservationTask entities by IDs.
func (*PreservationActionUpdate) RemoveTasks ¶
func (pau *PreservationActionUpdate) RemoveTasks(p ...*PreservationTask) *PreservationActionUpdate
RemoveTasks removes "tasks" edges to PreservationTask entities.
func (*PreservationActionUpdate) Save ¶
func (pau *PreservationActionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PreservationActionUpdate) SaveX ¶
func (pau *PreservationActionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PreservationActionUpdate) SetCompletedAt ¶
func (pau *PreservationActionUpdate) SetCompletedAt(t time.Time) *PreservationActionUpdate
SetCompletedAt sets the "completed_at" field.
func (*PreservationActionUpdate) SetNillableCompletedAt ¶
func (pau *PreservationActionUpdate) SetNillableCompletedAt(t *time.Time) *PreservationActionUpdate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*PreservationActionUpdate) SetNillablePackageID ¶
func (pau *PreservationActionUpdate) SetNillablePackageID(i *int) *PreservationActionUpdate
SetNillablePackageID sets the "package_id" field if the given value is not nil.
func (*PreservationActionUpdate) SetNillableStartedAt ¶
func (pau *PreservationActionUpdate) SetNillableStartedAt(t *time.Time) *PreservationActionUpdate
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*PreservationActionUpdate) SetNillableStatus ¶
func (pau *PreservationActionUpdate) SetNillableStatus(i *int8) *PreservationActionUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PreservationActionUpdate) SetNillableType ¶
func (pau *PreservationActionUpdate) SetNillableType(i *int8) *PreservationActionUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*PreservationActionUpdate) SetNillableWorkflowID ¶
func (pau *PreservationActionUpdate) SetNillableWorkflowID(s *string) *PreservationActionUpdate
SetNillableWorkflowID sets the "workflow_id" field if the given value is not nil.
func (*PreservationActionUpdate) SetPackage ¶
func (pau *PreservationActionUpdate) SetPackage(p *Pkg) *PreservationActionUpdate
SetPackage sets the "package" edge to the Pkg entity.
func (*PreservationActionUpdate) SetPackageID ¶
func (pau *PreservationActionUpdate) SetPackageID(i int) *PreservationActionUpdate
SetPackageID sets the "package_id" field.
func (*PreservationActionUpdate) SetStartedAt ¶
func (pau *PreservationActionUpdate) SetStartedAt(t time.Time) *PreservationActionUpdate
SetStartedAt sets the "started_at" field.
func (*PreservationActionUpdate) SetStatus ¶
func (pau *PreservationActionUpdate) SetStatus(i int8) *PreservationActionUpdate
SetStatus sets the "status" field.
func (*PreservationActionUpdate) SetType ¶
func (pau *PreservationActionUpdate) SetType(i int8) *PreservationActionUpdate
SetType sets the "type" field.
func (*PreservationActionUpdate) SetWorkflowID ¶
func (pau *PreservationActionUpdate) SetWorkflowID(s string) *PreservationActionUpdate
SetWorkflowID sets the "workflow_id" field.
func (*PreservationActionUpdate) Where ¶
func (pau *PreservationActionUpdate) Where(ps ...predicate.PreservationAction) *PreservationActionUpdate
Where appends a list predicates to the PreservationActionUpdate builder.
type PreservationActionUpdateOne ¶
type PreservationActionUpdateOne struct {
// contains filtered or unexported fields
}
PreservationActionUpdateOne is the builder for updating a single PreservationAction entity.
func (*PreservationActionUpdateOne) AddStatus ¶
func (pauo *PreservationActionUpdateOne) AddStatus(i int8) *PreservationActionUpdateOne
AddStatus adds i to the "status" field.
func (*PreservationActionUpdateOne) AddTaskIDs ¶
func (pauo *PreservationActionUpdateOne) AddTaskIDs(ids ...int) *PreservationActionUpdateOne
AddTaskIDs adds the "tasks" edge to the PreservationTask entity by IDs.
func (*PreservationActionUpdateOne) AddTasks ¶
func (pauo *PreservationActionUpdateOne) AddTasks(p ...*PreservationTask) *PreservationActionUpdateOne
AddTasks adds the "tasks" edges to the PreservationTask entity.
func (*PreservationActionUpdateOne) AddType ¶
func (pauo *PreservationActionUpdateOne) AddType(i int8) *PreservationActionUpdateOne
AddType adds i to the "type" field.
func (*PreservationActionUpdateOne) ClearCompletedAt ¶
func (pauo *PreservationActionUpdateOne) ClearCompletedAt() *PreservationActionUpdateOne
ClearCompletedAt clears the value of the "completed_at" field.
func (*PreservationActionUpdateOne) ClearPackage ¶
func (pauo *PreservationActionUpdateOne) ClearPackage() *PreservationActionUpdateOne
ClearPackage clears the "package" edge to the Pkg entity.
func (*PreservationActionUpdateOne) ClearStartedAt ¶
func (pauo *PreservationActionUpdateOne) ClearStartedAt() *PreservationActionUpdateOne
ClearStartedAt clears the value of the "started_at" field.
func (*PreservationActionUpdateOne) ClearTasks ¶
func (pauo *PreservationActionUpdateOne) ClearTasks() *PreservationActionUpdateOne
ClearTasks clears all "tasks" edges to the PreservationTask entity.
func (*PreservationActionUpdateOne) Exec ¶
func (pauo *PreservationActionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PreservationActionUpdateOne) ExecX ¶
func (pauo *PreservationActionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PreservationActionUpdateOne) Mutation ¶
func (pauo *PreservationActionUpdateOne) Mutation() *PreservationActionMutation
Mutation returns the PreservationActionMutation object of the builder.
func (*PreservationActionUpdateOne) RemoveTaskIDs ¶
func (pauo *PreservationActionUpdateOne) RemoveTaskIDs(ids ...int) *PreservationActionUpdateOne
RemoveTaskIDs removes the "tasks" edge to PreservationTask entities by IDs.
func (*PreservationActionUpdateOne) RemoveTasks ¶
func (pauo *PreservationActionUpdateOne) RemoveTasks(p ...*PreservationTask) *PreservationActionUpdateOne
RemoveTasks removes "tasks" edges to PreservationTask entities.
func (*PreservationActionUpdateOne) Save ¶
func (pauo *PreservationActionUpdateOne) Save(ctx context.Context) (*PreservationAction, error)
Save executes the query and returns the updated PreservationAction entity.
func (*PreservationActionUpdateOne) SaveX ¶
func (pauo *PreservationActionUpdateOne) SaveX(ctx context.Context) *PreservationAction
SaveX is like Save, but panics if an error occurs.
func (*PreservationActionUpdateOne) Select ¶
func (pauo *PreservationActionUpdateOne) Select(field string, fields ...string) *PreservationActionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PreservationActionUpdateOne) SetCompletedAt ¶
func (pauo *PreservationActionUpdateOne) SetCompletedAt(t time.Time) *PreservationActionUpdateOne
SetCompletedAt sets the "completed_at" field.
func (*PreservationActionUpdateOne) SetNillableCompletedAt ¶
func (pauo *PreservationActionUpdateOne) SetNillableCompletedAt(t *time.Time) *PreservationActionUpdateOne
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*PreservationActionUpdateOne) SetNillablePackageID ¶
func (pauo *PreservationActionUpdateOne) SetNillablePackageID(i *int) *PreservationActionUpdateOne
SetNillablePackageID sets the "package_id" field if the given value is not nil.
func (*PreservationActionUpdateOne) SetNillableStartedAt ¶
func (pauo *PreservationActionUpdateOne) SetNillableStartedAt(t *time.Time) *PreservationActionUpdateOne
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*PreservationActionUpdateOne) SetNillableStatus ¶
func (pauo *PreservationActionUpdateOne) SetNillableStatus(i *int8) *PreservationActionUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PreservationActionUpdateOne) SetNillableType ¶
func (pauo *PreservationActionUpdateOne) SetNillableType(i *int8) *PreservationActionUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*PreservationActionUpdateOne) SetNillableWorkflowID ¶
func (pauo *PreservationActionUpdateOne) SetNillableWorkflowID(s *string) *PreservationActionUpdateOne
SetNillableWorkflowID sets the "workflow_id" field if the given value is not nil.
func (*PreservationActionUpdateOne) SetPackage ¶
func (pauo *PreservationActionUpdateOne) SetPackage(p *Pkg) *PreservationActionUpdateOne
SetPackage sets the "package" edge to the Pkg entity.
func (*PreservationActionUpdateOne) SetPackageID ¶
func (pauo *PreservationActionUpdateOne) SetPackageID(i int) *PreservationActionUpdateOne
SetPackageID sets the "package_id" field.
func (*PreservationActionUpdateOne) SetStartedAt ¶
func (pauo *PreservationActionUpdateOne) SetStartedAt(t time.Time) *PreservationActionUpdateOne
SetStartedAt sets the "started_at" field.
func (*PreservationActionUpdateOne) SetStatus ¶
func (pauo *PreservationActionUpdateOne) SetStatus(i int8) *PreservationActionUpdateOne
SetStatus sets the "status" field.
func (*PreservationActionUpdateOne) SetType ¶
func (pauo *PreservationActionUpdateOne) SetType(i int8) *PreservationActionUpdateOne
SetType sets the "type" field.
func (*PreservationActionUpdateOne) SetWorkflowID ¶
func (pauo *PreservationActionUpdateOne) SetWorkflowID(s string) *PreservationActionUpdateOne
SetWorkflowID sets the "workflow_id" field.
func (*PreservationActionUpdateOne) Where ¶
func (pauo *PreservationActionUpdateOne) Where(ps ...predicate.PreservationAction) *PreservationActionUpdateOne
Where appends a list predicates to the PreservationActionUpdate builder.
type PreservationActions ¶
type PreservationActions []*PreservationAction
PreservationActions is a parsable slice of PreservationAction.
type PreservationTask ¶
type PreservationTask struct { // ID of the ent. ID int `json:"id,omitempty"` // TaskID holds the value of the "task_id" field. TaskID uuid.UUID `json:"task_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Status holds the value of the "status" field. Status int8 `json:"status,omitempty"` // StartedAt holds the value of the "started_at" field. StartedAt time.Time `json:"started_at,omitempty"` // CompletedAt holds the value of the "completed_at" field. CompletedAt time.Time `json:"completed_at,omitempty"` // Note holds the value of the "note" field. Note string `json:"note,omitempty"` // PreservationActionID holds the value of the "preservation_action_id" field. PreservationActionID int `json:"preservation_action_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PreservationTaskQuery when eager-loading is set. Edges PreservationTaskEdges `json:"edges"` // contains filtered or unexported fields }
PreservationTask is the model entity for the PreservationTask schema.
func (*PreservationTask) QueryAction ¶
func (pt *PreservationTask) QueryAction() *PreservationActionQuery
QueryAction queries the "action" edge of the PreservationTask entity.
func (*PreservationTask) String ¶
func (pt *PreservationTask) String() string
String implements the fmt.Stringer.
func (*PreservationTask) Unwrap ¶
func (pt *PreservationTask) Unwrap() *PreservationTask
Unwrap unwraps the PreservationTask 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 (*PreservationTask) Update ¶
func (pt *PreservationTask) Update() *PreservationTaskUpdateOne
Update returns a builder for updating this PreservationTask. Note that you need to call PreservationTask.Unwrap() before calling this method if this PreservationTask was returned from a transaction, and the transaction was committed or rolled back.
type PreservationTaskClient ¶
type PreservationTaskClient struct {
// contains filtered or unexported fields
}
PreservationTaskClient is a client for the PreservationTask schema.
func NewPreservationTaskClient ¶
func NewPreservationTaskClient(c config) *PreservationTaskClient
NewPreservationTaskClient returns a client for the PreservationTask from the given config.
func (*PreservationTaskClient) Create ¶
func (c *PreservationTaskClient) Create() *PreservationTaskCreate
Create returns a builder for creating a PreservationTask entity.
func (*PreservationTaskClient) CreateBulk ¶
func (c *PreservationTaskClient) CreateBulk(builders ...*PreservationTaskCreate) *PreservationTaskCreateBulk
CreateBulk returns a builder for creating a bulk of PreservationTask entities.
func (*PreservationTaskClient) Delete ¶
func (c *PreservationTaskClient) Delete() *PreservationTaskDelete
Delete returns a delete builder for PreservationTask.
func (*PreservationTaskClient) DeleteOne ¶
func (c *PreservationTaskClient) DeleteOne(pt *PreservationTask) *PreservationTaskDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PreservationTaskClient) DeleteOneID ¶
func (c *PreservationTaskClient) DeleteOneID(id int) *PreservationTaskDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PreservationTaskClient) Get ¶
func (c *PreservationTaskClient) Get(ctx context.Context, id int) (*PreservationTask, error)
Get returns a PreservationTask entity by its id.
func (*PreservationTaskClient) GetX ¶
func (c *PreservationTaskClient) GetX(ctx context.Context, id int) *PreservationTask
GetX is like Get, but panics if an error occurs.
func (*PreservationTaskClient) Hooks ¶
func (c *PreservationTaskClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PreservationTaskClient) Intercept ¶
func (c *PreservationTaskClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `preservationtask.Intercept(f(g(h())))`.
func (*PreservationTaskClient) Interceptors ¶
func (c *PreservationTaskClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PreservationTaskClient) MapCreateBulk ¶
func (c *PreservationTaskClient) MapCreateBulk(slice any, setFunc func(*PreservationTaskCreate, int)) *PreservationTaskCreateBulk
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 (*PreservationTaskClient) Query ¶
func (c *PreservationTaskClient) Query() *PreservationTaskQuery
Query returns a query builder for PreservationTask.
func (*PreservationTaskClient) QueryAction ¶
func (c *PreservationTaskClient) QueryAction(pt *PreservationTask) *PreservationActionQuery
QueryAction queries the action edge of a PreservationTask.
func (*PreservationTaskClient) Update ¶
func (c *PreservationTaskClient) Update() *PreservationTaskUpdate
Update returns an update builder for PreservationTask.
func (*PreservationTaskClient) UpdateOne ¶
func (c *PreservationTaskClient) UpdateOne(pt *PreservationTask) *PreservationTaskUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PreservationTaskClient) UpdateOneID ¶
func (c *PreservationTaskClient) UpdateOneID(id int) *PreservationTaskUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PreservationTaskClient) Use ¶
func (c *PreservationTaskClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `preservationtask.Hooks(f(g(h())))`.
type PreservationTaskCreate ¶
type PreservationTaskCreate struct {
// contains filtered or unexported fields
}
PreservationTaskCreate is the builder for creating a PreservationTask entity.
func (*PreservationTaskCreate) Exec ¶
func (ptc *PreservationTaskCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PreservationTaskCreate) ExecX ¶
func (ptc *PreservationTaskCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PreservationTaskCreate) Mutation ¶
func (ptc *PreservationTaskCreate) Mutation() *PreservationTaskMutation
Mutation returns the PreservationTaskMutation object of the builder.
func (*PreservationTaskCreate) Save ¶
func (ptc *PreservationTaskCreate) Save(ctx context.Context) (*PreservationTask, error)
Save creates the PreservationTask in the database.
func (*PreservationTaskCreate) SaveX ¶
func (ptc *PreservationTaskCreate) SaveX(ctx context.Context) *PreservationTask
SaveX calls Save and panics if Save returns an error.
func (*PreservationTaskCreate) SetAction ¶
func (ptc *PreservationTaskCreate) SetAction(p *PreservationAction) *PreservationTaskCreate
SetAction sets the "action" edge to the PreservationAction entity.
func (*PreservationTaskCreate) SetActionID ¶
func (ptc *PreservationTaskCreate) SetActionID(id int) *PreservationTaskCreate
SetActionID sets the "action" edge to the PreservationAction entity by ID.
func (*PreservationTaskCreate) SetCompletedAt ¶
func (ptc *PreservationTaskCreate) SetCompletedAt(t time.Time) *PreservationTaskCreate
SetCompletedAt sets the "completed_at" field.
func (*PreservationTaskCreate) SetName ¶
func (ptc *PreservationTaskCreate) SetName(s string) *PreservationTaskCreate
SetName sets the "name" field.
func (*PreservationTaskCreate) SetNillableCompletedAt ¶
func (ptc *PreservationTaskCreate) SetNillableCompletedAt(t *time.Time) *PreservationTaskCreate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*PreservationTaskCreate) SetNillableStartedAt ¶
func (ptc *PreservationTaskCreate) SetNillableStartedAt(t *time.Time) *PreservationTaskCreate
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*PreservationTaskCreate) SetNote ¶
func (ptc *PreservationTaskCreate) SetNote(s string) *PreservationTaskCreate
SetNote sets the "note" field.
func (*PreservationTaskCreate) SetPreservationActionID ¶
func (ptc *PreservationTaskCreate) SetPreservationActionID(i int) *PreservationTaskCreate
SetPreservationActionID sets the "preservation_action_id" field.
func (*PreservationTaskCreate) SetStartedAt ¶
func (ptc *PreservationTaskCreate) SetStartedAt(t time.Time) *PreservationTaskCreate
SetStartedAt sets the "started_at" field.
func (*PreservationTaskCreate) SetStatus ¶
func (ptc *PreservationTaskCreate) SetStatus(i int8) *PreservationTaskCreate
SetStatus sets the "status" field.
func (*PreservationTaskCreate) SetTaskID ¶
func (ptc *PreservationTaskCreate) SetTaskID(u uuid.UUID) *PreservationTaskCreate
SetTaskID sets the "task_id" field.
type PreservationTaskCreateBulk ¶
type PreservationTaskCreateBulk struct {
// contains filtered or unexported fields
}
PreservationTaskCreateBulk is the builder for creating many PreservationTask entities in bulk.
func (*PreservationTaskCreateBulk) Exec ¶
func (ptcb *PreservationTaskCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PreservationTaskCreateBulk) ExecX ¶
func (ptcb *PreservationTaskCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PreservationTaskCreateBulk) Save ¶
func (ptcb *PreservationTaskCreateBulk) Save(ctx context.Context) ([]*PreservationTask, error)
Save creates the PreservationTask entities in the database.
func (*PreservationTaskCreateBulk) SaveX ¶
func (ptcb *PreservationTaskCreateBulk) SaveX(ctx context.Context) []*PreservationTask
SaveX is like Save, but panics if an error occurs.
type PreservationTaskDelete ¶
type PreservationTaskDelete struct {
// contains filtered or unexported fields
}
PreservationTaskDelete is the builder for deleting a PreservationTask entity.
func (*PreservationTaskDelete) Exec ¶
func (ptd *PreservationTaskDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PreservationTaskDelete) ExecX ¶
func (ptd *PreservationTaskDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PreservationTaskDelete) Where ¶
func (ptd *PreservationTaskDelete) Where(ps ...predicate.PreservationTask) *PreservationTaskDelete
Where appends a list predicates to the PreservationTaskDelete builder.
type PreservationTaskDeleteOne ¶
type PreservationTaskDeleteOne struct {
// contains filtered or unexported fields
}
PreservationTaskDeleteOne is the builder for deleting a single PreservationTask entity.
func (*PreservationTaskDeleteOne) Exec ¶
func (ptdo *PreservationTaskDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PreservationTaskDeleteOne) ExecX ¶
func (ptdo *PreservationTaskDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PreservationTaskDeleteOne) Where ¶
func (ptdo *PreservationTaskDeleteOne) Where(ps ...predicate.PreservationTask) *PreservationTaskDeleteOne
Where appends a list predicates to the PreservationTaskDelete builder.
type PreservationTaskEdges ¶
type PreservationTaskEdges struct { // Action holds the value of the action edge. Action *PreservationAction `json:"action,omitempty"` // contains filtered or unexported fields }
PreservationTaskEdges holds the relations/edges for other nodes in the graph.
func (PreservationTaskEdges) ActionOrErr ¶
func (e PreservationTaskEdges) ActionOrErr() (*PreservationAction, error)
ActionOrErr returns the Action value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PreservationTaskGroupBy ¶
type PreservationTaskGroupBy struct {
// contains filtered or unexported fields
}
PreservationTaskGroupBy is the group-by builder for PreservationTask entities.
func (*PreservationTaskGroupBy) Aggregate ¶
func (ptgb *PreservationTaskGroupBy) Aggregate(fns ...AggregateFunc) *PreservationTaskGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PreservationTaskGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PreservationTaskGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PreservationTaskGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PreservationTaskGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PreservationTaskGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PreservationTaskGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PreservationTaskGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PreservationTaskGroupBy) Scan ¶
func (ptgb *PreservationTaskGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PreservationTaskGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PreservationTaskMutation ¶
type PreservationTaskMutation struct {
// contains filtered or unexported fields
}
PreservationTaskMutation represents an operation that mutates the PreservationTask nodes in the graph.
func (*PreservationTaskMutation) ActionCleared ¶
func (m *PreservationTaskMutation) ActionCleared() bool
ActionCleared reports if the "action" edge to the PreservationAction entity was cleared.
func (*PreservationTaskMutation) ActionID ¶
func (m *PreservationTaskMutation) ActionID() (id int, exists bool)
ActionID returns the "action" edge ID in the mutation.
func (*PreservationTaskMutation) ActionIDs ¶
func (m *PreservationTaskMutation) ActionIDs() (ids []int)
ActionIDs returns the "action" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ActionID instead. It exists only for internal usage by the builders.
func (*PreservationTaskMutation) AddField ¶
func (m *PreservationTaskMutation) 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 (*PreservationTaskMutation) AddStatus ¶
func (m *PreservationTaskMutation) AddStatus(i int8)
AddStatus adds i to the "status" field.
func (*PreservationTaskMutation) AddedEdges ¶
func (m *PreservationTaskMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PreservationTaskMutation) AddedField ¶
func (m *PreservationTaskMutation) 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 (*PreservationTaskMutation) AddedFields ¶
func (m *PreservationTaskMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PreservationTaskMutation) AddedIDs ¶
func (m *PreservationTaskMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PreservationTaskMutation) AddedStatus ¶
func (m *PreservationTaskMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*PreservationTaskMutation) ClearAction ¶
func (m *PreservationTaskMutation) ClearAction()
ClearAction clears the "action" edge to the PreservationAction entity.
func (*PreservationTaskMutation) ClearCompletedAt ¶
func (m *PreservationTaskMutation) ClearCompletedAt()
ClearCompletedAt clears the value of the "completed_at" field.
func (*PreservationTaskMutation) ClearEdge ¶
func (m *PreservationTaskMutation) 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 (*PreservationTaskMutation) ClearField ¶
func (m *PreservationTaskMutation) 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 (*PreservationTaskMutation) ClearStartedAt ¶
func (m *PreservationTaskMutation) ClearStartedAt()
ClearStartedAt clears the value of the "started_at" field.
func (*PreservationTaskMutation) ClearedEdges ¶
func (m *PreservationTaskMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PreservationTaskMutation) ClearedFields ¶
func (m *PreservationTaskMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PreservationTaskMutation) Client ¶
func (m PreservationTaskMutation) 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 (*PreservationTaskMutation) CompletedAt ¶
func (m *PreservationTaskMutation) CompletedAt() (r time.Time, exists bool)
CompletedAt returns the value of the "completed_at" field in the mutation.
func (*PreservationTaskMutation) CompletedAtCleared ¶
func (m *PreservationTaskMutation) CompletedAtCleared() bool
CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.
func (*PreservationTaskMutation) EdgeCleared ¶
func (m *PreservationTaskMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PreservationTaskMutation) Field ¶
func (m *PreservationTaskMutation) 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 (*PreservationTaskMutation) FieldCleared ¶
func (m *PreservationTaskMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PreservationTaskMutation) Fields ¶
func (m *PreservationTaskMutation) 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 (*PreservationTaskMutation) ID ¶
func (m *PreservationTaskMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PreservationTaskMutation) IDs ¶
func (m *PreservationTaskMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PreservationTaskMutation) Name ¶
func (m *PreservationTaskMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PreservationTaskMutation) Note ¶
func (m *PreservationTaskMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*PreservationTaskMutation) OldCompletedAt ¶
OldCompletedAt returns the old "completed_at" field's value of the PreservationTask entity. If the PreservationTask 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 (*PreservationTaskMutation) 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 (*PreservationTaskMutation) OldName ¶
func (m *PreservationTaskMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the PreservationTask entity. If the PreservationTask 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 (*PreservationTaskMutation) OldNote ¶
func (m *PreservationTaskMutation) OldNote(ctx context.Context) (v string, err error)
OldNote returns the old "note" field's value of the PreservationTask entity. If the PreservationTask 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 (*PreservationTaskMutation) OldPreservationActionID ¶
func (m *PreservationTaskMutation) OldPreservationActionID(ctx context.Context) (v int, err error)
OldPreservationActionID returns the old "preservation_action_id" field's value of the PreservationTask entity. If the PreservationTask 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 (*PreservationTaskMutation) OldStartedAt ¶
OldStartedAt returns the old "started_at" field's value of the PreservationTask entity. If the PreservationTask 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 (*PreservationTaskMutation) OldStatus ¶
func (m *PreservationTaskMutation) OldStatus(ctx context.Context) (v int8, err error)
OldStatus returns the old "status" field's value of the PreservationTask entity. If the PreservationTask 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 (*PreservationTaskMutation) OldTaskID ¶
OldTaskID returns the old "task_id" field's value of the PreservationTask entity. If the PreservationTask 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 (*PreservationTaskMutation) Op ¶
func (m *PreservationTaskMutation) Op() Op
Op returns the operation name.
func (*PreservationTaskMutation) PreservationActionID ¶
func (m *PreservationTaskMutation) PreservationActionID() (r int, exists bool)
PreservationActionID returns the value of the "preservation_action_id" field in the mutation.
func (*PreservationTaskMutation) RemovedEdges ¶
func (m *PreservationTaskMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PreservationTaskMutation) RemovedIDs ¶
func (m *PreservationTaskMutation) 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 (*PreservationTaskMutation) ResetAction ¶
func (m *PreservationTaskMutation) ResetAction()
ResetAction resets all changes to the "action" edge.
func (*PreservationTaskMutation) ResetCompletedAt ¶
func (m *PreservationTaskMutation) ResetCompletedAt()
ResetCompletedAt resets all changes to the "completed_at" field.
func (*PreservationTaskMutation) ResetEdge ¶
func (m *PreservationTaskMutation) 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 (*PreservationTaskMutation) ResetField ¶
func (m *PreservationTaskMutation) 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 (*PreservationTaskMutation) ResetName ¶
func (m *PreservationTaskMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PreservationTaskMutation) ResetNote ¶
func (m *PreservationTaskMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*PreservationTaskMutation) ResetPreservationActionID ¶
func (m *PreservationTaskMutation) ResetPreservationActionID()
ResetPreservationActionID resets all changes to the "preservation_action_id" field.
func (*PreservationTaskMutation) ResetStartedAt ¶
func (m *PreservationTaskMutation) ResetStartedAt()
ResetStartedAt resets all changes to the "started_at" field.
func (*PreservationTaskMutation) ResetStatus ¶
func (m *PreservationTaskMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*PreservationTaskMutation) ResetTaskID ¶
func (m *PreservationTaskMutation) ResetTaskID()
ResetTaskID resets all changes to the "task_id" field.
func (*PreservationTaskMutation) SetActionID ¶
func (m *PreservationTaskMutation) SetActionID(id int)
SetActionID sets the "action" edge to the PreservationAction entity by id.
func (*PreservationTaskMutation) SetCompletedAt ¶
func (m *PreservationTaskMutation) SetCompletedAt(t time.Time)
SetCompletedAt sets the "completed_at" field.
func (*PreservationTaskMutation) SetField ¶
func (m *PreservationTaskMutation) 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 (*PreservationTaskMutation) SetName ¶
func (m *PreservationTaskMutation) SetName(s string)
SetName sets the "name" field.
func (*PreservationTaskMutation) SetNote ¶
func (m *PreservationTaskMutation) SetNote(s string)
SetNote sets the "note" field.
func (*PreservationTaskMutation) SetOp ¶
func (m *PreservationTaskMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PreservationTaskMutation) SetPreservationActionID ¶
func (m *PreservationTaskMutation) SetPreservationActionID(i int)
SetPreservationActionID sets the "preservation_action_id" field.
func (*PreservationTaskMutation) SetStartedAt ¶
func (m *PreservationTaskMutation) SetStartedAt(t time.Time)
SetStartedAt sets the "started_at" field.
func (*PreservationTaskMutation) SetStatus ¶
func (m *PreservationTaskMutation) SetStatus(i int8)
SetStatus sets the "status" field.
func (*PreservationTaskMutation) SetTaskID ¶
func (m *PreservationTaskMutation) SetTaskID(u uuid.UUID)
SetTaskID sets the "task_id" field.
func (*PreservationTaskMutation) StartedAt ¶
func (m *PreservationTaskMutation) StartedAt() (r time.Time, exists bool)
StartedAt returns the value of the "started_at" field in the mutation.
func (*PreservationTaskMutation) StartedAtCleared ¶
func (m *PreservationTaskMutation) StartedAtCleared() bool
StartedAtCleared returns if the "started_at" field was cleared in this mutation.
func (*PreservationTaskMutation) Status ¶
func (m *PreservationTaskMutation) Status() (r int8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*PreservationTaskMutation) TaskID ¶
func (m *PreservationTaskMutation) TaskID() (r uuid.UUID, exists bool)
TaskID returns the value of the "task_id" field in the mutation.
func (PreservationTaskMutation) Tx ¶
func (m PreservationTaskMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PreservationTaskMutation) Type ¶
func (m *PreservationTaskMutation) Type() string
Type returns the node type of this mutation (PreservationTask).
func (*PreservationTaskMutation) Where ¶
func (m *PreservationTaskMutation) Where(ps ...predicate.PreservationTask)
Where appends a list predicates to the PreservationTaskMutation builder.
func (*PreservationTaskMutation) WhereP ¶
func (m *PreservationTaskMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PreservationTaskMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PreservationTaskQuery ¶
type PreservationTaskQuery struct {
// contains filtered or unexported fields
}
PreservationTaskQuery is the builder for querying PreservationTask entities.
func (*PreservationTaskQuery) Aggregate ¶
func (ptq *PreservationTaskQuery) Aggregate(fns ...AggregateFunc) *PreservationTaskSelect
Aggregate returns a PreservationTaskSelect configured with the given aggregations.
func (*PreservationTaskQuery) All ¶
func (ptq *PreservationTaskQuery) All(ctx context.Context) ([]*PreservationTask, error)
All executes the query and returns a list of PreservationTasks.
func (*PreservationTaskQuery) AllX ¶
func (ptq *PreservationTaskQuery) AllX(ctx context.Context) []*PreservationTask
AllX is like All, but panics if an error occurs.
func (*PreservationTaskQuery) Clone ¶
func (ptq *PreservationTaskQuery) Clone() *PreservationTaskQuery
Clone returns a duplicate of the PreservationTaskQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PreservationTaskQuery) Count ¶
func (ptq *PreservationTaskQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PreservationTaskQuery) CountX ¶
func (ptq *PreservationTaskQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PreservationTaskQuery) Exist ¶
func (ptq *PreservationTaskQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PreservationTaskQuery) ExistX ¶
func (ptq *PreservationTaskQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PreservationTaskQuery) First ¶
func (ptq *PreservationTaskQuery) First(ctx context.Context) (*PreservationTask, error)
First returns the first PreservationTask entity from the query. Returns a *NotFoundError when no PreservationTask was found.
func (*PreservationTaskQuery) FirstID ¶
func (ptq *PreservationTaskQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PreservationTask ID from the query. Returns a *NotFoundError when no PreservationTask ID was found.
func (*PreservationTaskQuery) FirstIDX ¶
func (ptq *PreservationTaskQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PreservationTaskQuery) FirstX ¶
func (ptq *PreservationTaskQuery) FirstX(ctx context.Context) *PreservationTask
FirstX is like First, but panics if an error occurs.
func (*PreservationTaskQuery) GroupBy ¶
func (ptq *PreservationTaskQuery) GroupBy(field string, fields ...string) *PreservationTaskGroupBy
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 { TaskID uuid.UUID `json:"task_id,omitempty"` Count int `json:"count,omitempty"` } client.PreservationTask.Query(). GroupBy(preservationtask.FieldTaskID). Aggregate(db.Count()). Scan(ctx, &v)
func (*PreservationTaskQuery) IDs ¶
func (ptq *PreservationTaskQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of PreservationTask IDs.
func (*PreservationTaskQuery) IDsX ¶
func (ptq *PreservationTaskQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PreservationTaskQuery) Limit ¶
func (ptq *PreservationTaskQuery) Limit(limit int) *PreservationTaskQuery
Limit the number of records to be returned by this query.
func (*PreservationTaskQuery) Offset ¶
func (ptq *PreservationTaskQuery) Offset(offset int) *PreservationTaskQuery
Offset to start from.
func (*PreservationTaskQuery) Only ¶
func (ptq *PreservationTaskQuery) Only(ctx context.Context) (*PreservationTask, error)
Only returns a single PreservationTask entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PreservationTask entity is found. Returns a *NotFoundError when no PreservationTask entities are found.
func (*PreservationTaskQuery) OnlyID ¶
func (ptq *PreservationTaskQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only PreservationTask ID in the query. Returns a *NotSingularError when more than one PreservationTask ID is found. Returns a *NotFoundError when no entities are found.
func (*PreservationTaskQuery) OnlyIDX ¶
func (ptq *PreservationTaskQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PreservationTaskQuery) OnlyX ¶
func (ptq *PreservationTaskQuery) OnlyX(ctx context.Context) *PreservationTask
OnlyX is like Only, but panics if an error occurs.
func (*PreservationTaskQuery) Order ¶
func (ptq *PreservationTaskQuery) Order(o ...preservationtask.OrderOption) *PreservationTaskQuery
Order specifies how the records should be ordered.
func (*PreservationTaskQuery) QueryAction ¶
func (ptq *PreservationTaskQuery) QueryAction() *PreservationActionQuery
QueryAction chains the current query on the "action" edge.
func (*PreservationTaskQuery) Select ¶
func (ptq *PreservationTaskQuery) Select(fields ...string) *PreservationTaskSelect
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 { TaskID uuid.UUID `json:"task_id,omitempty"` } client.PreservationTask.Query(). Select(preservationtask.FieldTaskID). Scan(ctx, &v)
func (*PreservationTaskQuery) Unique ¶
func (ptq *PreservationTaskQuery) Unique(unique bool) *PreservationTaskQuery
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 (*PreservationTaskQuery) Where ¶
func (ptq *PreservationTaskQuery) Where(ps ...predicate.PreservationTask) *PreservationTaskQuery
Where adds a new predicate for the PreservationTaskQuery builder.
func (*PreservationTaskQuery) WithAction ¶
func (ptq *PreservationTaskQuery) WithAction(opts ...func(*PreservationActionQuery)) *PreservationTaskQuery
WithAction tells the query-builder to eager-load the nodes that are connected to the "action" edge. The optional arguments are used to configure the query builder of the edge.
type PreservationTaskSelect ¶
type PreservationTaskSelect struct { *PreservationTaskQuery // contains filtered or unexported fields }
PreservationTaskSelect is the builder for selecting fields of PreservationTask entities.
func (*PreservationTaskSelect) Aggregate ¶
func (pts *PreservationTaskSelect) Aggregate(fns ...AggregateFunc) *PreservationTaskSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PreservationTaskSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PreservationTaskSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PreservationTaskSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PreservationTaskSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PreservationTaskSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PreservationTaskSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PreservationTaskSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PreservationTaskSelect) Scan ¶
func (pts *PreservationTaskSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PreservationTaskSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PreservationTaskUpdate ¶
type PreservationTaskUpdate struct {
// contains filtered or unexported fields
}
PreservationTaskUpdate is the builder for updating PreservationTask entities.
func (*PreservationTaskUpdate) AddStatus ¶
func (ptu *PreservationTaskUpdate) AddStatus(i int8) *PreservationTaskUpdate
AddStatus adds i to the "status" field.
func (*PreservationTaskUpdate) ClearAction ¶
func (ptu *PreservationTaskUpdate) ClearAction() *PreservationTaskUpdate
ClearAction clears the "action" edge to the PreservationAction entity.
func (*PreservationTaskUpdate) ClearCompletedAt ¶
func (ptu *PreservationTaskUpdate) ClearCompletedAt() *PreservationTaskUpdate
ClearCompletedAt clears the value of the "completed_at" field.
func (*PreservationTaskUpdate) ClearStartedAt ¶
func (ptu *PreservationTaskUpdate) ClearStartedAt() *PreservationTaskUpdate
ClearStartedAt clears the value of the "started_at" field.
func (*PreservationTaskUpdate) Exec ¶
func (ptu *PreservationTaskUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PreservationTaskUpdate) ExecX ¶
func (ptu *PreservationTaskUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PreservationTaskUpdate) Mutation ¶
func (ptu *PreservationTaskUpdate) Mutation() *PreservationTaskMutation
Mutation returns the PreservationTaskMutation object of the builder.
func (*PreservationTaskUpdate) Save ¶
func (ptu *PreservationTaskUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PreservationTaskUpdate) SaveX ¶
func (ptu *PreservationTaskUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PreservationTaskUpdate) SetAction ¶
func (ptu *PreservationTaskUpdate) SetAction(p *PreservationAction) *PreservationTaskUpdate
SetAction sets the "action" edge to the PreservationAction entity.
func (*PreservationTaskUpdate) SetActionID ¶
func (ptu *PreservationTaskUpdate) SetActionID(id int) *PreservationTaskUpdate
SetActionID sets the "action" edge to the PreservationAction entity by ID.
func (*PreservationTaskUpdate) SetCompletedAt ¶
func (ptu *PreservationTaskUpdate) SetCompletedAt(t time.Time) *PreservationTaskUpdate
SetCompletedAt sets the "completed_at" field.
func (*PreservationTaskUpdate) SetName ¶
func (ptu *PreservationTaskUpdate) SetName(s string) *PreservationTaskUpdate
SetName sets the "name" field.
func (*PreservationTaskUpdate) SetNillableCompletedAt ¶
func (ptu *PreservationTaskUpdate) SetNillableCompletedAt(t *time.Time) *PreservationTaskUpdate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*PreservationTaskUpdate) SetNillableName ¶
func (ptu *PreservationTaskUpdate) SetNillableName(s *string) *PreservationTaskUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*PreservationTaskUpdate) SetNillableNote ¶
func (ptu *PreservationTaskUpdate) SetNillableNote(s *string) *PreservationTaskUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*PreservationTaskUpdate) SetNillablePreservationActionID ¶
func (ptu *PreservationTaskUpdate) SetNillablePreservationActionID(i *int) *PreservationTaskUpdate
SetNillablePreservationActionID sets the "preservation_action_id" field if the given value is not nil.
func (*PreservationTaskUpdate) SetNillableStartedAt ¶
func (ptu *PreservationTaskUpdate) SetNillableStartedAt(t *time.Time) *PreservationTaskUpdate
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*PreservationTaskUpdate) SetNillableStatus ¶
func (ptu *PreservationTaskUpdate) SetNillableStatus(i *int8) *PreservationTaskUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PreservationTaskUpdate) SetNillableTaskID ¶
func (ptu *PreservationTaskUpdate) SetNillableTaskID(u *uuid.UUID) *PreservationTaskUpdate
SetNillableTaskID sets the "task_id" field if the given value is not nil.
func (*PreservationTaskUpdate) SetNote ¶
func (ptu *PreservationTaskUpdate) SetNote(s string) *PreservationTaskUpdate
SetNote sets the "note" field.
func (*PreservationTaskUpdate) SetPreservationActionID ¶
func (ptu *PreservationTaskUpdate) SetPreservationActionID(i int) *PreservationTaskUpdate
SetPreservationActionID sets the "preservation_action_id" field.
func (*PreservationTaskUpdate) SetStartedAt ¶
func (ptu *PreservationTaskUpdate) SetStartedAt(t time.Time) *PreservationTaskUpdate
SetStartedAt sets the "started_at" field.
func (*PreservationTaskUpdate) SetStatus ¶
func (ptu *PreservationTaskUpdate) SetStatus(i int8) *PreservationTaskUpdate
SetStatus sets the "status" field.
func (*PreservationTaskUpdate) SetTaskID ¶
func (ptu *PreservationTaskUpdate) SetTaskID(u uuid.UUID) *PreservationTaskUpdate
SetTaskID sets the "task_id" field.
func (*PreservationTaskUpdate) Where ¶
func (ptu *PreservationTaskUpdate) Where(ps ...predicate.PreservationTask) *PreservationTaskUpdate
Where appends a list predicates to the PreservationTaskUpdate builder.
type PreservationTaskUpdateOne ¶
type PreservationTaskUpdateOne struct {
// contains filtered or unexported fields
}
PreservationTaskUpdateOne is the builder for updating a single PreservationTask entity.
func (*PreservationTaskUpdateOne) AddStatus ¶
func (ptuo *PreservationTaskUpdateOne) AddStatus(i int8) *PreservationTaskUpdateOne
AddStatus adds i to the "status" field.
func (*PreservationTaskUpdateOne) ClearAction ¶
func (ptuo *PreservationTaskUpdateOne) ClearAction() *PreservationTaskUpdateOne
ClearAction clears the "action" edge to the PreservationAction entity.
func (*PreservationTaskUpdateOne) ClearCompletedAt ¶
func (ptuo *PreservationTaskUpdateOne) ClearCompletedAt() *PreservationTaskUpdateOne
ClearCompletedAt clears the value of the "completed_at" field.
func (*PreservationTaskUpdateOne) ClearStartedAt ¶
func (ptuo *PreservationTaskUpdateOne) ClearStartedAt() *PreservationTaskUpdateOne
ClearStartedAt clears the value of the "started_at" field.
func (*PreservationTaskUpdateOne) Exec ¶
func (ptuo *PreservationTaskUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PreservationTaskUpdateOne) ExecX ¶
func (ptuo *PreservationTaskUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PreservationTaskUpdateOne) Mutation ¶
func (ptuo *PreservationTaskUpdateOne) Mutation() *PreservationTaskMutation
Mutation returns the PreservationTaskMutation object of the builder.
func (*PreservationTaskUpdateOne) Save ¶
func (ptuo *PreservationTaskUpdateOne) Save(ctx context.Context) (*PreservationTask, error)
Save executes the query and returns the updated PreservationTask entity.
func (*PreservationTaskUpdateOne) SaveX ¶
func (ptuo *PreservationTaskUpdateOne) SaveX(ctx context.Context) *PreservationTask
SaveX is like Save, but panics if an error occurs.
func (*PreservationTaskUpdateOne) Select ¶
func (ptuo *PreservationTaskUpdateOne) Select(field string, fields ...string) *PreservationTaskUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PreservationTaskUpdateOne) SetAction ¶
func (ptuo *PreservationTaskUpdateOne) SetAction(p *PreservationAction) *PreservationTaskUpdateOne
SetAction sets the "action" edge to the PreservationAction entity.
func (*PreservationTaskUpdateOne) SetActionID ¶
func (ptuo *PreservationTaskUpdateOne) SetActionID(id int) *PreservationTaskUpdateOne
SetActionID sets the "action" edge to the PreservationAction entity by ID.
func (*PreservationTaskUpdateOne) SetCompletedAt ¶
func (ptuo *PreservationTaskUpdateOne) SetCompletedAt(t time.Time) *PreservationTaskUpdateOne
SetCompletedAt sets the "completed_at" field.
func (*PreservationTaskUpdateOne) SetName ¶
func (ptuo *PreservationTaskUpdateOne) SetName(s string) *PreservationTaskUpdateOne
SetName sets the "name" field.
func (*PreservationTaskUpdateOne) SetNillableCompletedAt ¶
func (ptuo *PreservationTaskUpdateOne) SetNillableCompletedAt(t *time.Time) *PreservationTaskUpdateOne
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*PreservationTaskUpdateOne) SetNillableName ¶
func (ptuo *PreservationTaskUpdateOne) SetNillableName(s *string) *PreservationTaskUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PreservationTaskUpdateOne) SetNillableNote ¶
func (ptuo *PreservationTaskUpdateOne) SetNillableNote(s *string) *PreservationTaskUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*PreservationTaskUpdateOne) SetNillablePreservationActionID ¶
func (ptuo *PreservationTaskUpdateOne) SetNillablePreservationActionID(i *int) *PreservationTaskUpdateOne
SetNillablePreservationActionID sets the "preservation_action_id" field if the given value is not nil.
func (*PreservationTaskUpdateOne) SetNillableStartedAt ¶
func (ptuo *PreservationTaskUpdateOne) SetNillableStartedAt(t *time.Time) *PreservationTaskUpdateOne
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*PreservationTaskUpdateOne) SetNillableStatus ¶
func (ptuo *PreservationTaskUpdateOne) SetNillableStatus(i *int8) *PreservationTaskUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PreservationTaskUpdateOne) SetNillableTaskID ¶
func (ptuo *PreservationTaskUpdateOne) SetNillableTaskID(u *uuid.UUID) *PreservationTaskUpdateOne
SetNillableTaskID sets the "task_id" field if the given value is not nil.
func (*PreservationTaskUpdateOne) SetNote ¶
func (ptuo *PreservationTaskUpdateOne) SetNote(s string) *PreservationTaskUpdateOne
SetNote sets the "note" field.
func (*PreservationTaskUpdateOne) SetPreservationActionID ¶
func (ptuo *PreservationTaskUpdateOne) SetPreservationActionID(i int) *PreservationTaskUpdateOne
SetPreservationActionID sets the "preservation_action_id" field.
func (*PreservationTaskUpdateOne) SetStartedAt ¶
func (ptuo *PreservationTaskUpdateOne) SetStartedAt(t time.Time) *PreservationTaskUpdateOne
SetStartedAt sets the "started_at" field.
func (*PreservationTaskUpdateOne) SetStatus ¶
func (ptuo *PreservationTaskUpdateOne) SetStatus(i int8) *PreservationTaskUpdateOne
SetStatus sets the "status" field.
func (*PreservationTaskUpdateOne) SetTaskID ¶
func (ptuo *PreservationTaskUpdateOne) SetTaskID(u uuid.UUID) *PreservationTaskUpdateOne
SetTaskID sets the "task_id" field.
func (*PreservationTaskUpdateOne) Where ¶
func (ptuo *PreservationTaskUpdateOne) Where(ps ...predicate.PreservationTask) *PreservationTaskUpdateOne
Where appends a list predicates to the PreservationTaskUpdate builder.
type PreservationTasks ¶
type PreservationTasks []*PreservationTask
PreservationTasks is a parsable slice of PreservationTask.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Pkg is the client for interacting with the Pkg builders. Pkg *PkgClient // PreservationAction is the client for interacting with the PreservationAction builders. PreservationAction *PreservationActionClient // PreservationTask is the client for interacting with the PreservationTask builders. PreservationTask *PreservationTaskClient // 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 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 ¶
- client.go
- ent.go
- mutation.go
- pkg.go
- pkg_create.go
- pkg_delete.go
- pkg_query.go
- pkg_update.go
- preservationaction.go
- preservationaction_create.go
- preservationaction_delete.go
- preservationaction_query.go
- preservationaction_update.go
- preservationtask.go
- preservationtask_create.go
- preservationtask_delete.go
- preservationtask_query.go
- preservationtask_update.go
- runtime.go
- tx.go