Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type CrackedPassword
- type CrackedPasswordClient
- func (c *CrackedPasswordClient) Create() *CrackedPasswordCreate
- func (c *CrackedPasswordClient) CreateBulk(builders ...*CrackedPasswordCreate) *CrackedPasswordCreateBulk
- func (c *CrackedPasswordClient) Delete() *CrackedPasswordDelete
- func (c *CrackedPasswordClient) DeleteOne(cp *CrackedPassword) *CrackedPasswordDeleteOne
- func (c *CrackedPasswordClient) DeleteOneID(id uuid.UUID) *CrackedPasswordDeleteOne
- func (c *CrackedPasswordClient) Get(ctx context.Context, id uuid.UUID) (*CrackedPassword, error)
- func (c *CrackedPasswordClient) GetX(ctx context.Context, id uuid.UUID) *CrackedPassword
- func (c *CrackedPasswordClient) Hooks() []Hook
- func (c *CrackedPasswordClient) Query() *CrackedPasswordQuery
- func (c *CrackedPasswordClient) QueryRelatedTask(cp *CrackedPassword) *TaskQuery
- func (c *CrackedPasswordClient) Update() *CrackedPasswordUpdate
- func (c *CrackedPasswordClient) UpdateOne(cp *CrackedPassword) *CrackedPasswordUpdateOne
- func (c *CrackedPasswordClient) UpdateOneID(id uuid.UUID) *CrackedPasswordUpdateOne
- func (c *CrackedPasswordClient) Use(hooks ...Hook)
- type CrackedPasswordCreate
- func (cpc *CrackedPasswordCreate) Exec(ctx context.Context) error
- func (cpc *CrackedPasswordCreate) ExecX(ctx context.Context)
- func (cpc *CrackedPasswordCreate) Mutation() *CrackedPasswordMutation
- func (cpc *CrackedPasswordCreate) OnConflict(opts ...sql.ConflictOption) *CrackedPasswordUpsertOne
- func (cpc *CrackedPasswordCreate) OnConflictColumns(columns ...string) *CrackedPasswordUpsertOne
- func (cpc *CrackedPasswordCreate) Save(ctx context.Context) (*CrackedPassword, error)
- func (cpc *CrackedPasswordCreate) SaveX(ctx context.Context) *CrackedPassword
- func (cpc *CrackedPasswordCreate) SetCrackedAt(t time.Time) *CrackedPasswordCreate
- func (cpc *CrackedPasswordCreate) SetHash(s string) *CrackedPasswordCreate
- func (cpc *CrackedPasswordCreate) SetID(u uuid.UUID) *CrackedPasswordCreate
- func (cpc *CrackedPasswordCreate) SetNillableCrackedAt(t *time.Time) *CrackedPasswordCreate
- func (cpc *CrackedPasswordCreate) SetRelatedTask(t *Task) *CrackedPasswordCreate
- func (cpc *CrackedPasswordCreate) SetRelatedTaskID(id uuid.UUID) *CrackedPasswordCreate
- func (cpc *CrackedPasswordCreate) SetValue(s string) *CrackedPasswordCreate
- type CrackedPasswordCreateBulk
- func (cpcb *CrackedPasswordCreateBulk) Exec(ctx context.Context) error
- func (cpcb *CrackedPasswordCreateBulk) ExecX(ctx context.Context)
- func (cpcb *CrackedPasswordCreateBulk) OnConflict(opts ...sql.ConflictOption) *CrackedPasswordUpsertBulk
- func (cpcb *CrackedPasswordCreateBulk) OnConflictColumns(columns ...string) *CrackedPasswordUpsertBulk
- func (cpcb *CrackedPasswordCreateBulk) Save(ctx context.Context) ([]*CrackedPassword, error)
- func (cpcb *CrackedPasswordCreateBulk) SaveX(ctx context.Context) []*CrackedPassword
- type CrackedPasswordDelete
- type CrackedPasswordDeleteOne
- type CrackedPasswordEdges
- type CrackedPasswordFilter
- func (f *CrackedPasswordFilter) Where(p entql.P)
- func (f *CrackedPasswordFilter) WhereCrackedAt(p entql.TimeP)
- func (f *CrackedPasswordFilter) WhereHasRelatedTask()
- func (f *CrackedPasswordFilter) WhereHasRelatedTaskWith(preds ...predicate.Task)
- func (f *CrackedPasswordFilter) WhereHash(p entql.StringP)
- func (f *CrackedPasswordFilter) WhereID(p entql.ValueP)
- func (f *CrackedPasswordFilter) WhereValue(p entql.StringP)
- type CrackedPasswordGroupBy
- func (cpgb *CrackedPasswordGroupBy) Aggregate(fns ...AggregateFunc) *CrackedPasswordGroupBy
- func (cpgb *CrackedPasswordGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (cpgb *CrackedPasswordGroupBy) BoolX(ctx context.Context) bool
- func (cpgb *CrackedPasswordGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (cpgb *CrackedPasswordGroupBy) BoolsX(ctx context.Context) []bool
- func (cpgb *CrackedPasswordGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (cpgb *CrackedPasswordGroupBy) Float64X(ctx context.Context) float64
- func (cpgb *CrackedPasswordGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (cpgb *CrackedPasswordGroupBy) Float64sX(ctx context.Context) []float64
- func (cpgb *CrackedPasswordGroupBy) Int(ctx context.Context) (_ int, err error)
- func (cpgb *CrackedPasswordGroupBy) IntX(ctx context.Context) int
- func (cpgb *CrackedPasswordGroupBy) Ints(ctx context.Context) ([]int, error)
- func (cpgb *CrackedPasswordGroupBy) IntsX(ctx context.Context) []int
- func (cpgb *CrackedPasswordGroupBy) Scan(ctx context.Context, v interface{}) error
- func (cpgb *CrackedPasswordGroupBy) ScanX(ctx context.Context, v interface{})
- func (cpgb *CrackedPasswordGroupBy) String(ctx context.Context) (_ string, err error)
- func (cpgb *CrackedPasswordGroupBy) StringX(ctx context.Context) string
- func (cpgb *CrackedPasswordGroupBy) Strings(ctx context.Context) ([]string, error)
- func (cpgb *CrackedPasswordGroupBy) StringsX(ctx context.Context) []string
- type CrackedPasswordMutation
- func (m *CrackedPasswordMutation) AddField(name string, value ent.Value) error
- func (m *CrackedPasswordMutation) AddedEdges() []string
- func (m *CrackedPasswordMutation) AddedField(name string) (ent.Value, bool)
- func (m *CrackedPasswordMutation) AddedFields() []string
- func (m *CrackedPasswordMutation) AddedIDs(name string) []ent.Value
- func (m *CrackedPasswordMutation) ClearEdge(name string) error
- func (m *CrackedPasswordMutation) ClearField(name string) error
- func (m *CrackedPasswordMutation) ClearRelatedTask()
- func (m *CrackedPasswordMutation) ClearedEdges() []string
- func (m *CrackedPasswordMutation) ClearedFields() []string
- func (m CrackedPasswordMutation) Client() *Client
- func (m *CrackedPasswordMutation) CrackedAt() (r time.Time, exists bool)
- func (m *CrackedPasswordMutation) EdgeCleared(name string) bool
- func (m *CrackedPasswordMutation) Field(name string) (ent.Value, bool)
- func (m *CrackedPasswordMutation) FieldCleared(name string) bool
- func (m *CrackedPasswordMutation) Fields() []string
- func (m *CrackedPasswordMutation) Filter() *CrackedPasswordFilter
- func (m *CrackedPasswordMutation) Hash() (r string, exists bool)
- func (m *CrackedPasswordMutation) ID() (id uuid.UUID, exists bool)
- func (m *CrackedPasswordMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CrackedPasswordMutation) OldCrackedAt(ctx context.Context) (v time.Time, err error)
- func (m *CrackedPasswordMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CrackedPasswordMutation) OldHash(ctx context.Context) (v string, err error)
- func (m *CrackedPasswordMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *CrackedPasswordMutation) Op() Op
- func (m *CrackedPasswordMutation) RelatedTaskCleared() bool
- func (m *CrackedPasswordMutation) RelatedTaskID() (id uuid.UUID, exists bool)
- func (m *CrackedPasswordMutation) RelatedTaskIDs() (ids []uuid.UUID)
- func (m *CrackedPasswordMutation) RemovedEdges() []string
- func (m *CrackedPasswordMutation) RemovedIDs(name string) []ent.Value
- func (m *CrackedPasswordMutation) ResetCrackedAt()
- func (m *CrackedPasswordMutation) ResetEdge(name string) error
- func (m *CrackedPasswordMutation) ResetField(name string) error
- func (m *CrackedPasswordMutation) ResetHash()
- func (m *CrackedPasswordMutation) ResetRelatedTask()
- func (m *CrackedPasswordMutation) ResetValue()
- func (m *CrackedPasswordMutation) SetCrackedAt(t time.Time)
- func (m *CrackedPasswordMutation) SetField(name string, value ent.Value) error
- func (m *CrackedPasswordMutation) SetHash(s string)
- func (m *CrackedPasswordMutation) SetID(id uuid.UUID)
- func (m *CrackedPasswordMutation) SetRelatedTaskID(id uuid.UUID)
- func (m *CrackedPasswordMutation) SetValue(s string)
- func (m CrackedPasswordMutation) Tx() (*Tx, error)
- func (m *CrackedPasswordMutation) Type() string
- func (m *CrackedPasswordMutation) Value() (r string, exists bool)
- func (m *CrackedPasswordMutation) Where(ps ...predicate.CrackedPassword)
- type CrackedPasswordQuery
- func (cpq *CrackedPasswordQuery) All(ctx context.Context) ([]*CrackedPassword, error)
- func (cpq *CrackedPasswordQuery) AllX(ctx context.Context) []*CrackedPassword
- func (cpq *CrackedPasswordQuery) Clone() *CrackedPasswordQuery
- func (cpq *CrackedPasswordQuery) Count(ctx context.Context) (int, error)
- func (cpq *CrackedPasswordQuery) CountX(ctx context.Context) int
- func (cpq *CrackedPasswordQuery) Exist(ctx context.Context) (bool, error)
- func (cpq *CrackedPasswordQuery) ExistX(ctx context.Context) bool
- func (cpq *CrackedPasswordQuery) Filter() *CrackedPasswordFilter
- func (cpq *CrackedPasswordQuery) First(ctx context.Context) (*CrackedPassword, error)
- func (cpq *CrackedPasswordQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cpq *CrackedPasswordQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (cpq *CrackedPasswordQuery) FirstX(ctx context.Context) *CrackedPassword
- func (cpq *CrackedPasswordQuery) GroupBy(field string, fields ...string) *CrackedPasswordGroupBy
- func (cpq *CrackedPasswordQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (cpq *CrackedPasswordQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cpq *CrackedPasswordQuery) Limit(limit int) *CrackedPasswordQuery
- func (cpq *CrackedPasswordQuery) Modify(modifiers ...func(s *sql.Selector)) *CrackedPasswordSelect
- func (cpq *CrackedPasswordQuery) Offset(offset int) *CrackedPasswordQuery
- func (cpq *CrackedPasswordQuery) Only(ctx context.Context) (*CrackedPassword, error)
- func (cpq *CrackedPasswordQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cpq *CrackedPasswordQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (cpq *CrackedPasswordQuery) OnlyX(ctx context.Context) *CrackedPassword
- func (cpq *CrackedPasswordQuery) Order(o ...OrderFunc) *CrackedPasswordQuery
- func (cpq *CrackedPasswordQuery) QueryRelatedTask() *TaskQuery
- func (cpq *CrackedPasswordQuery) Select(fields ...string) *CrackedPasswordSelect
- func (cpq *CrackedPasswordQuery) Unique(unique bool) *CrackedPasswordQuery
- func (cpq *CrackedPasswordQuery) Where(ps ...predicate.CrackedPassword) *CrackedPasswordQuery
- func (cpq *CrackedPasswordQuery) WithRelatedTask(opts ...func(*TaskQuery)) *CrackedPasswordQuery
- type CrackedPasswordSelect
- func (cps *CrackedPasswordSelect) Bool(ctx context.Context) (_ bool, err error)
- func (cps *CrackedPasswordSelect) BoolX(ctx context.Context) bool
- func (cps *CrackedPasswordSelect) Bools(ctx context.Context) ([]bool, error)
- func (cps *CrackedPasswordSelect) BoolsX(ctx context.Context) []bool
- func (cps *CrackedPasswordSelect) Float64(ctx context.Context) (_ float64, err error)
- func (cps *CrackedPasswordSelect) Float64X(ctx context.Context) float64
- func (cps *CrackedPasswordSelect) Float64s(ctx context.Context) ([]float64, error)
- func (cps *CrackedPasswordSelect) Float64sX(ctx context.Context) []float64
- func (cps *CrackedPasswordSelect) Int(ctx context.Context) (_ int, err error)
- func (cps *CrackedPasswordSelect) IntX(ctx context.Context) int
- func (cps *CrackedPasswordSelect) Ints(ctx context.Context) ([]int, error)
- func (cps *CrackedPasswordSelect) IntsX(ctx context.Context) []int
- func (cps *CrackedPasswordSelect) Modify(modifiers ...func(s *sql.Selector)) *CrackedPasswordSelect
- func (cps *CrackedPasswordSelect) Scan(ctx context.Context, v interface{}) error
- func (cps *CrackedPasswordSelect) ScanX(ctx context.Context, v interface{})
- func (cps *CrackedPasswordSelect) String(ctx context.Context) (_ string, err error)
- func (cps *CrackedPasswordSelect) StringX(ctx context.Context) string
- func (cps *CrackedPasswordSelect) Strings(ctx context.Context) ([]string, error)
- func (cps *CrackedPasswordSelect) StringsX(ctx context.Context) []string
- type CrackedPasswordUpdate
- func (cpu *CrackedPasswordUpdate) ClearRelatedTask() *CrackedPasswordUpdate
- func (cpu *CrackedPasswordUpdate) Exec(ctx context.Context) error
- func (cpu *CrackedPasswordUpdate) ExecX(ctx context.Context)
- func (cpu *CrackedPasswordUpdate) Mutation() *CrackedPasswordMutation
- func (cpu *CrackedPasswordUpdate) Save(ctx context.Context) (int, error)
- func (cpu *CrackedPasswordUpdate) SaveX(ctx context.Context) int
- func (cpu *CrackedPasswordUpdate) SetHash(s string) *CrackedPasswordUpdate
- func (cpu *CrackedPasswordUpdate) SetRelatedTask(t *Task) *CrackedPasswordUpdate
- func (cpu *CrackedPasswordUpdate) SetRelatedTaskID(id uuid.UUID) *CrackedPasswordUpdate
- func (cpu *CrackedPasswordUpdate) SetValue(s string) *CrackedPasswordUpdate
- func (cpu *CrackedPasswordUpdate) Where(ps ...predicate.CrackedPassword) *CrackedPasswordUpdate
- type CrackedPasswordUpdateOne
- func (cpuo *CrackedPasswordUpdateOne) ClearRelatedTask() *CrackedPasswordUpdateOne
- func (cpuo *CrackedPasswordUpdateOne) Exec(ctx context.Context) error
- func (cpuo *CrackedPasswordUpdateOne) ExecX(ctx context.Context)
- func (cpuo *CrackedPasswordUpdateOne) Mutation() *CrackedPasswordMutation
- func (cpuo *CrackedPasswordUpdateOne) Save(ctx context.Context) (*CrackedPassword, error)
- func (cpuo *CrackedPasswordUpdateOne) SaveX(ctx context.Context) *CrackedPassword
- func (cpuo *CrackedPasswordUpdateOne) Select(field string, fields ...string) *CrackedPasswordUpdateOne
- func (cpuo *CrackedPasswordUpdateOne) SetHash(s string) *CrackedPasswordUpdateOne
- func (cpuo *CrackedPasswordUpdateOne) SetRelatedTask(t *Task) *CrackedPasswordUpdateOne
- func (cpuo *CrackedPasswordUpdateOne) SetRelatedTaskID(id uuid.UUID) *CrackedPasswordUpdateOne
- func (cpuo *CrackedPasswordUpdateOne) SetValue(s string) *CrackedPasswordUpdateOne
- type CrackedPasswordUpsert
- func (u *CrackedPasswordUpsert) SetCrackedAt(v time.Time) *CrackedPasswordUpsert
- func (u *CrackedPasswordUpsert) SetHash(v string) *CrackedPasswordUpsert
- func (u *CrackedPasswordUpsert) SetValue(v string) *CrackedPasswordUpsert
- func (u *CrackedPasswordUpsert) UpdateCrackedAt() *CrackedPasswordUpsert
- func (u *CrackedPasswordUpsert) UpdateHash() *CrackedPasswordUpsert
- func (u *CrackedPasswordUpsert) UpdateValue() *CrackedPasswordUpsert
- type CrackedPasswordUpsertBulk
- func (u *CrackedPasswordUpsertBulk) DoNothing() *CrackedPasswordUpsertBulk
- func (u *CrackedPasswordUpsertBulk) Exec(ctx context.Context) error
- func (u *CrackedPasswordUpsertBulk) ExecX(ctx context.Context)
- func (u *CrackedPasswordUpsertBulk) Ignore() *CrackedPasswordUpsertBulk
- func (u *CrackedPasswordUpsertBulk) SetCrackedAt(v time.Time) *CrackedPasswordUpsertBulk
- func (u *CrackedPasswordUpsertBulk) SetHash(v string) *CrackedPasswordUpsertBulk
- func (u *CrackedPasswordUpsertBulk) SetValue(v string) *CrackedPasswordUpsertBulk
- func (u *CrackedPasswordUpsertBulk) Update(set func(*CrackedPasswordUpsert)) *CrackedPasswordUpsertBulk
- func (u *CrackedPasswordUpsertBulk) UpdateCrackedAt() *CrackedPasswordUpsertBulk
- func (u *CrackedPasswordUpsertBulk) UpdateHash() *CrackedPasswordUpsertBulk
- func (u *CrackedPasswordUpsertBulk) UpdateNewValues() *CrackedPasswordUpsertBulk
- func (u *CrackedPasswordUpsertBulk) UpdateValue() *CrackedPasswordUpsertBulk
- type CrackedPasswordUpsertOne
- func (u *CrackedPasswordUpsertOne) DoNothing() *CrackedPasswordUpsertOne
- func (u *CrackedPasswordUpsertOne) Exec(ctx context.Context) error
- func (u *CrackedPasswordUpsertOne) ExecX(ctx context.Context)
- func (u *CrackedPasswordUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *CrackedPasswordUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *CrackedPasswordUpsertOne) Ignore() *CrackedPasswordUpsertOne
- func (u *CrackedPasswordUpsertOne) SetCrackedAt(v time.Time) *CrackedPasswordUpsertOne
- func (u *CrackedPasswordUpsertOne) SetHash(v string) *CrackedPasswordUpsertOne
- func (u *CrackedPasswordUpsertOne) SetValue(v string) *CrackedPasswordUpsertOne
- func (u *CrackedPasswordUpsertOne) Update(set func(*CrackedPasswordUpsert)) *CrackedPasswordUpsertOne
- func (u *CrackedPasswordUpsertOne) UpdateCrackedAt() *CrackedPasswordUpsertOne
- func (u *CrackedPasswordUpsertOne) UpdateHash() *CrackedPasswordUpsertOne
- func (u *CrackedPasswordUpsertOne) UpdateNewValues() *CrackedPasswordUpsertOne
- func (u *CrackedPasswordUpsertOne) UpdateValue() *CrackedPasswordUpsertOne
- type CrackedPasswords
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Task
- type TaskClient
- func (c *TaskClient) Create() *TaskCreate
- func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk
- func (c *TaskClient) Delete() *TaskDelete
- func (c *TaskClient) DeleteOne(t *Task) *TaskDeleteOne
- func (c *TaskClient) DeleteOneID(id uuid.UUID) *TaskDeleteOne
- func (c *TaskClient) Get(ctx context.Context, id uuid.UUID) (*Task, error)
- func (c *TaskClient) GetX(ctx context.Context, id uuid.UUID) *Task
- func (c *TaskClient) Hooks() []Hook
- func (c *TaskClient) Query() *TaskQuery
- func (c *TaskClient) QueryCrackedPasswords(t *Task) *CrackedPasswordQuery
- func (c *TaskClient) QueryCreatedBy(t *Task) *UserQuery
- func (c *TaskClient) Update() *TaskUpdate
- func (c *TaskClient) UpdateOne(t *Task) *TaskUpdateOne
- func (c *TaskClient) UpdateOneID(id uuid.UUID) *TaskUpdateOne
- func (c *TaskClient) Use(hooks ...Hook)
- type TaskCreate
- func (tc *TaskCreate) AddCrackedPasswordIDs(ids ...uuid.UUID) *TaskCreate
- func (tc *TaskCreate) AddCrackedPasswords(c ...*CrackedPassword) *TaskCreate
- func (tc *TaskCreate) Exec(ctx context.Context) error
- func (tc *TaskCreate) ExecX(ctx context.Context)
- func (tc *TaskCreate) Mutation() *TaskMutation
- func (tc *TaskCreate) OnConflict(opts ...sql.ConflictOption) *TaskUpsertOne
- func (tc *TaskCreate) OnConflictColumns(columns ...string) *TaskUpsertOne
- func (tc *TaskCreate) Save(ctx context.Context) (*Task, error)
- func (tc *TaskCreate) SaveX(ctx context.Context) *Task
- func (tc *TaskCreate) SetAssignedToHost(s string) *TaskCreate
- func (tc *TaskCreate) SetCaseCode(s string) *TaskCreate
- func (tc *TaskCreate) SetComment(s string) *TaskCreate
- func (tc *TaskCreate) SetCreatedAt(t time.Time) *TaskCreate
- func (tc *TaskCreate) SetCreatedBy(u *User) *TaskCreate
- func (tc *TaskCreate) SetCreatedByID(id uuid.UUID) *TaskCreate
- func (tc *TaskCreate) SetEnginePayload(m map[string]interface{}) *TaskCreate
- func (tc *TaskCreate) SetError(s string) *TaskCreate
- func (tc *TaskCreate) SetID(u uuid.UUID) *TaskCreate
- func (tc *TaskCreate) SetLastUpdatedAt(t time.Time) *TaskCreate
- func (tc *TaskCreate) SetName(s string) *TaskCreate
- func (tc *TaskCreate) SetNillableAssignedToHost(s *string) *TaskCreate
- func (tc *TaskCreate) SetNillableCaseCode(s *string) *TaskCreate
- func (tc *TaskCreate) SetNillableComment(s *string) *TaskCreate
- func (tc *TaskCreate) SetNillableCreatedAt(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableError(s *string) *TaskCreate
- func (tc *TaskCreate) SetNillableLastUpdatedAt(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableNumberCracked(i *int) *TaskCreate
- func (tc *TaskCreate) SetNillableNumberPasswords(i *int) *TaskCreate
- func (tc *TaskCreate) SetNumberCracked(i int) *TaskCreate
- func (tc *TaskCreate) SetNumberPasswords(i int) *TaskCreate
- func (tc *TaskCreate) SetStatus(os oldschema.TaskStatus) *TaskCreate
- type TaskCreateBulk
- func (tcb *TaskCreateBulk) Exec(ctx context.Context) error
- func (tcb *TaskCreateBulk) ExecX(ctx context.Context)
- func (tcb *TaskCreateBulk) OnConflict(opts ...sql.ConflictOption) *TaskUpsertBulk
- func (tcb *TaskCreateBulk) OnConflictColumns(columns ...string) *TaskUpsertBulk
- func (tcb *TaskCreateBulk) Save(ctx context.Context) ([]*Task, error)
- func (tcb *TaskCreateBulk) SaveX(ctx context.Context) []*Task
- type TaskDelete
- type TaskDeleteOne
- type TaskEdges
- type TaskFilter
- func (f *TaskFilter) Where(p entql.P)
- func (f *TaskFilter) WhereAssignedToHost(p entql.StringP)
- func (f *TaskFilter) WhereCaseCode(p entql.StringP)
- func (f *TaskFilter) WhereComment(p entql.StringP)
- func (f *TaskFilter) WhereCreatedAt(p entql.TimeP)
- func (f *TaskFilter) WhereEnginePayload(p entql.BytesP)
- func (f *TaskFilter) WhereError(p entql.StringP)
- func (f *TaskFilter) WhereHasCrackedPasswords()
- func (f *TaskFilter) WhereHasCrackedPasswordsWith(preds ...predicate.CrackedPassword)
- func (f *TaskFilter) WhereHasCreatedBy()
- func (f *TaskFilter) WhereHasCreatedByWith(preds ...predicate.User)
- func (f *TaskFilter) WhereID(p entql.ValueP)
- func (f *TaskFilter) WhereLastUpdatedAt(p entql.TimeP)
- func (f *TaskFilter) WhereName(p entql.StringP)
- func (f *TaskFilter) WhereNumberCracked(p entql.IntP)
- func (f *TaskFilter) WhereNumberPasswords(p entql.IntP)
- func (f *TaskFilter) WhereStatus(p entql.StringP)
- type TaskGroupBy
- func (tgb *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy
- func (tgb *TaskGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (tgb *TaskGroupBy) BoolX(ctx context.Context) bool
- func (tgb *TaskGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (tgb *TaskGroupBy) BoolsX(ctx context.Context) []bool
- func (tgb *TaskGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (tgb *TaskGroupBy) Float64X(ctx context.Context) float64
- func (tgb *TaskGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (tgb *TaskGroupBy) Float64sX(ctx context.Context) []float64
- func (tgb *TaskGroupBy) Int(ctx context.Context) (_ int, err error)
- func (tgb *TaskGroupBy) IntX(ctx context.Context) int
- func (tgb *TaskGroupBy) Ints(ctx context.Context) ([]int, error)
- func (tgb *TaskGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TaskGroupBy) Scan(ctx context.Context, v interface{}) error
- func (tgb *TaskGroupBy) ScanX(ctx context.Context, v interface{})
- func (tgb *TaskGroupBy) String(ctx context.Context) (_ string, err error)
- func (tgb *TaskGroupBy) StringX(ctx context.Context) string
- func (tgb *TaskGroupBy) Strings(ctx context.Context) ([]string, error)
- func (tgb *TaskGroupBy) StringsX(ctx context.Context) []string
- type TaskMutation
- func (m *TaskMutation) AddCrackedPasswordIDs(ids ...uuid.UUID)
- func (m *TaskMutation) AddField(name string, value ent.Value) error
- func (m *TaskMutation) AddNumberCracked(i int)
- func (m *TaskMutation) AddNumberPasswords(i int)
- func (m *TaskMutation) AddedEdges() []string
- func (m *TaskMutation) AddedField(name string) (ent.Value, bool)
- func (m *TaskMutation) AddedFields() []string
- func (m *TaskMutation) AddedIDs(name string) []ent.Value
- func (m *TaskMutation) AddedNumberCracked() (r int, exists bool)
- func (m *TaskMutation) AddedNumberPasswords() (r int, exists bool)
- func (m *TaskMutation) AssignedToHost() (r string, exists bool)
- func (m *TaskMutation) AssignedToHostCleared() bool
- func (m *TaskMutation) CaseCode() (r string, exists bool)
- func (m *TaskMutation) CaseCodeCleared() bool
- func (m *TaskMutation) ClearAssignedToHost()
- func (m *TaskMutation) ClearCaseCode()
- func (m *TaskMutation) ClearComment()
- func (m *TaskMutation) ClearCrackedPasswords()
- func (m *TaskMutation) ClearCreatedBy()
- func (m *TaskMutation) ClearEdge(name string) error
- func (m *TaskMutation) ClearEnginePayload()
- func (m *TaskMutation) ClearError()
- func (m *TaskMutation) ClearField(name string) error
- func (m *TaskMutation) ClearedEdges() []string
- func (m *TaskMutation) ClearedFields() []string
- func (m TaskMutation) Client() *Client
- func (m *TaskMutation) Comment() (r string, exists bool)
- func (m *TaskMutation) CommentCleared() bool
- func (m *TaskMutation) CrackedPasswordsCleared() bool
- func (m *TaskMutation) CrackedPasswordsIDs() (ids []uuid.UUID)
- func (m *TaskMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TaskMutation) CreatedByCleared() bool
- func (m *TaskMutation) CreatedByID() (id uuid.UUID, exists bool)
- func (m *TaskMutation) CreatedByIDs() (ids []uuid.UUID)
- func (m *TaskMutation) EdgeCleared(name string) bool
- func (m *TaskMutation) EnginePayload() (r map[string]interface{}, exists bool)
- func (m *TaskMutation) EnginePayloadCleared() bool
- func (m *TaskMutation) Error() (r string, exists bool)
- func (m *TaskMutation) ErrorCleared() bool
- func (m *TaskMutation) Field(name string) (ent.Value, bool)
- func (m *TaskMutation) FieldCleared(name string) bool
- func (m *TaskMutation) Fields() []string
- func (m *TaskMutation) Filter() *TaskFilter
- func (m *TaskMutation) ID() (id uuid.UUID, exists bool)
- func (m *TaskMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TaskMutation) LastUpdatedAt() (r time.Time, exists bool)
- func (m *TaskMutation) Name() (r string, exists bool)
- func (m *TaskMutation) NumberCracked() (r int, exists bool)
- func (m *TaskMutation) NumberPasswords() (r int, exists bool)
- func (m *TaskMutation) OldAssignedToHost(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldCaseCode(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldComment(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) OldEnginePayload(ctx context.Context) (v map[string]interface{}, err error)
- func (m *TaskMutation) OldError(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TaskMutation) OldLastUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldNumberCracked(ctx context.Context) (v int, err error)
- func (m *TaskMutation) OldNumberPasswords(ctx context.Context) (v int, err error)
- func (m *TaskMutation) OldStatus(ctx context.Context) (v oldschema.TaskStatus, err error)
- func (m *TaskMutation) Op() Op
- func (m *TaskMutation) RemoveCrackedPasswordIDs(ids ...uuid.UUID)
- func (m *TaskMutation) RemovedCrackedPasswordsIDs() (ids []uuid.UUID)
- func (m *TaskMutation) RemovedEdges() []string
- func (m *TaskMutation) RemovedIDs(name string) []ent.Value
- func (m *TaskMutation) ResetAssignedToHost()
- func (m *TaskMutation) ResetCaseCode()
- func (m *TaskMutation) ResetComment()
- func (m *TaskMutation) ResetCrackedPasswords()
- func (m *TaskMutation) ResetCreatedAt()
- func (m *TaskMutation) ResetCreatedBy()
- func (m *TaskMutation) ResetEdge(name string) error
- func (m *TaskMutation) ResetEnginePayload()
- func (m *TaskMutation) ResetError()
- func (m *TaskMutation) ResetField(name string) error
- func (m *TaskMutation) ResetLastUpdatedAt()
- func (m *TaskMutation) ResetName()
- func (m *TaskMutation) ResetNumberCracked()
- func (m *TaskMutation) ResetNumberPasswords()
- func (m *TaskMutation) ResetStatus()
- func (m *TaskMutation) SetAssignedToHost(s string)
- func (m *TaskMutation) SetCaseCode(s string)
- func (m *TaskMutation) SetComment(s string)
- func (m *TaskMutation) SetCreatedAt(t time.Time)
- func (m *TaskMutation) SetCreatedByID(id uuid.UUID)
- func (m *TaskMutation) SetEnginePayload(value map[string]interface{})
- func (m *TaskMutation) SetError(s string)
- func (m *TaskMutation) SetField(name string, value ent.Value) error
- func (m *TaskMutation) SetID(id uuid.UUID)
- func (m *TaskMutation) SetLastUpdatedAt(t time.Time)
- func (m *TaskMutation) SetName(s string)
- func (m *TaskMutation) SetNumberCracked(i int)
- func (m *TaskMutation) SetNumberPasswords(i int)
- func (m *TaskMutation) SetStatus(os oldschema.TaskStatus)
- func (m *TaskMutation) Status() (r oldschema.TaskStatus, exists bool)
- func (m TaskMutation) Tx() (*Tx, error)
- func (m *TaskMutation) Type() string
- func (m *TaskMutation) Where(ps ...predicate.Task)
- type TaskQuery
- func (tq *TaskQuery) All(ctx context.Context) ([]*Task, error)
- func (tq *TaskQuery) AllX(ctx context.Context) []*Task
- func (tq *TaskQuery) Clone() *TaskQuery
- func (tq *TaskQuery) Count(ctx context.Context) (int, error)
- func (tq *TaskQuery) CountX(ctx context.Context) int
- func (tq *TaskQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TaskQuery) ExistX(ctx context.Context) bool
- func (tq *TaskQuery) Filter() *TaskFilter
- func (tq *TaskQuery) First(ctx context.Context) (*Task, error)
- func (tq *TaskQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TaskQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (tq *TaskQuery) FirstX(ctx context.Context) *Task
- func (tq *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy
- func (tq *TaskQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (tq *TaskQuery) IDsX(ctx context.Context) []uuid.UUID
- func (tq *TaskQuery) Limit(limit int) *TaskQuery
- func (tq *TaskQuery) Modify(modifiers ...func(s *sql.Selector)) *TaskSelect
- func (tq *TaskQuery) Offset(offset int) *TaskQuery
- func (tq *TaskQuery) Only(ctx context.Context) (*Task, error)
- func (tq *TaskQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TaskQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (tq *TaskQuery) OnlyX(ctx context.Context) *Task
- func (tq *TaskQuery) Order(o ...OrderFunc) *TaskQuery
- func (tq *TaskQuery) QueryCrackedPasswords() *CrackedPasswordQuery
- func (tq *TaskQuery) QueryCreatedBy() *UserQuery
- func (tq *TaskQuery) Select(fields ...string) *TaskSelect
- func (tq *TaskQuery) Unique(unique bool) *TaskQuery
- func (tq *TaskQuery) Where(ps ...predicate.Task) *TaskQuery
- func (tq *TaskQuery) WithCrackedPasswords(opts ...func(*CrackedPasswordQuery)) *TaskQuery
- func (tq *TaskQuery) WithCreatedBy(opts ...func(*UserQuery)) *TaskQuery
- type TaskSelect
- func (ts *TaskSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ts *TaskSelect) BoolX(ctx context.Context) bool
- func (ts *TaskSelect) Bools(ctx context.Context) ([]bool, error)
- func (ts *TaskSelect) BoolsX(ctx context.Context) []bool
- func (ts *TaskSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ts *TaskSelect) Float64X(ctx context.Context) float64
- func (ts *TaskSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ts *TaskSelect) Float64sX(ctx context.Context) []float64
- func (ts *TaskSelect) Int(ctx context.Context) (_ int, err error)
- func (ts *TaskSelect) IntX(ctx context.Context) int
- func (ts *TaskSelect) Ints(ctx context.Context) ([]int, error)
- func (ts *TaskSelect) IntsX(ctx context.Context) []int
- func (ts *TaskSelect) Modify(modifiers ...func(s *sql.Selector)) *TaskSelect
- func (ts *TaskSelect) Scan(ctx context.Context, v interface{}) error
- func (ts *TaskSelect) ScanX(ctx context.Context, v interface{})
- func (ts *TaskSelect) String(ctx context.Context) (_ string, err error)
- func (ts *TaskSelect) StringX(ctx context.Context) string
- func (ts *TaskSelect) Strings(ctx context.Context) ([]string, error)
- func (ts *TaskSelect) StringsX(ctx context.Context) []string
- type TaskUpdate
- func (tu *TaskUpdate) AddCrackedPasswordIDs(ids ...uuid.UUID) *TaskUpdate
- func (tu *TaskUpdate) AddCrackedPasswords(c ...*CrackedPassword) *TaskUpdate
- func (tu *TaskUpdate) AddNumberCracked(i int) *TaskUpdate
- func (tu *TaskUpdate) AddNumberPasswords(i int) *TaskUpdate
- func (tu *TaskUpdate) ClearAssignedToHost() *TaskUpdate
- func (tu *TaskUpdate) ClearCaseCode() *TaskUpdate
- func (tu *TaskUpdate) ClearComment() *TaskUpdate
- func (tu *TaskUpdate) ClearCrackedPasswords() *TaskUpdate
- func (tu *TaskUpdate) ClearCreatedBy() *TaskUpdate
- func (tu *TaskUpdate) ClearEnginePayload() *TaskUpdate
- func (tu *TaskUpdate) ClearError() *TaskUpdate
- func (tu *TaskUpdate) Exec(ctx context.Context) error
- func (tu *TaskUpdate) ExecX(ctx context.Context)
- func (tu *TaskUpdate) Mutation() *TaskMutation
- func (tu *TaskUpdate) RemoveCrackedPasswordIDs(ids ...uuid.UUID) *TaskUpdate
- func (tu *TaskUpdate) RemoveCrackedPasswords(c ...*CrackedPassword) *TaskUpdate
- func (tu *TaskUpdate) Save(ctx context.Context) (int, error)
- func (tu *TaskUpdate) SaveX(ctx context.Context) int
- func (tu *TaskUpdate) SetAssignedToHost(s string) *TaskUpdate
- func (tu *TaskUpdate) SetCaseCode(s string) *TaskUpdate
- func (tu *TaskUpdate) SetComment(s string) *TaskUpdate
- func (tu *TaskUpdate) SetCreatedBy(u *User) *TaskUpdate
- func (tu *TaskUpdate) SetCreatedByID(id uuid.UUID) *TaskUpdate
- func (tu *TaskUpdate) SetEnginePayload(m map[string]interface{}) *TaskUpdate
- func (tu *TaskUpdate) SetError(s string) *TaskUpdate
- func (tu *TaskUpdate) SetName(s string) *TaskUpdate
- func (tu *TaskUpdate) SetNillableAssignedToHost(s *string) *TaskUpdate
- func (tu *TaskUpdate) SetNillableCaseCode(s *string) *TaskUpdate
- func (tu *TaskUpdate) SetNillableComment(s *string) *TaskUpdate
- func (tu *TaskUpdate) SetNillableError(s *string) *TaskUpdate
- func (tu *TaskUpdate) SetNillableNumberCracked(i *int) *TaskUpdate
- func (tu *TaskUpdate) SetNillableNumberPasswords(i *int) *TaskUpdate
- func (tu *TaskUpdate) SetNumberCracked(i int) *TaskUpdate
- func (tu *TaskUpdate) SetNumberPasswords(i int) *TaskUpdate
- func (tu *TaskUpdate) SetStatus(os oldschema.TaskStatus) *TaskUpdate
- func (tu *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate
- type TaskUpdateOne
- func (tuo *TaskUpdateOne) AddCrackedPasswordIDs(ids ...uuid.UUID) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddCrackedPasswords(c ...*CrackedPassword) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddNumberCracked(i int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddNumberPasswords(i int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearAssignedToHost() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearCaseCode() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearComment() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearCrackedPasswords() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearCreatedBy() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearEnginePayload() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearError() *TaskUpdateOne
- func (tuo *TaskUpdateOne) Exec(ctx context.Context) error
- func (tuo *TaskUpdateOne) ExecX(ctx context.Context)
- func (tuo *TaskUpdateOne) Mutation() *TaskMutation
- func (tuo *TaskUpdateOne) RemoveCrackedPasswordIDs(ids ...uuid.UUID) *TaskUpdateOne
- func (tuo *TaskUpdateOne) RemoveCrackedPasswords(c ...*CrackedPassword) *TaskUpdateOne
- func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error)
- func (tuo *TaskUpdateOne) SaveX(ctx context.Context) *Task
- func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetAssignedToHost(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetCaseCode(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetComment(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetCreatedBy(u *User) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetCreatedByID(id uuid.UUID) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetEnginePayload(m map[string]interface{}) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetError(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetName(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableAssignedToHost(s *string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableCaseCode(s *string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableComment(s *string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableError(s *string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableNumberCracked(i *int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableNumberPasswords(i *int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNumberCracked(i int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNumberPasswords(i int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetStatus(os oldschema.TaskStatus) *TaskUpdateOne
- type TaskUpsert
- func (u *TaskUpsert) AddNumberCracked(v int) *TaskUpsert
- func (u *TaskUpsert) AddNumberPasswords(v int) *TaskUpsert
- func (u *TaskUpsert) ClearAssignedToHost() *TaskUpsert
- func (u *TaskUpsert) ClearCaseCode() *TaskUpsert
- func (u *TaskUpsert) ClearComment() *TaskUpsert
- func (u *TaskUpsert) ClearEnginePayload() *TaskUpsert
- func (u *TaskUpsert) ClearError() *TaskUpsert
- func (u *TaskUpsert) SetAssignedToHost(v string) *TaskUpsert
- func (u *TaskUpsert) SetCaseCode(v string) *TaskUpsert
- func (u *TaskUpsert) SetComment(v string) *TaskUpsert
- func (u *TaskUpsert) SetCreatedAt(v time.Time) *TaskUpsert
- func (u *TaskUpsert) SetEnginePayload(v map[string]interface{}) *TaskUpsert
- func (u *TaskUpsert) SetError(v string) *TaskUpsert
- func (u *TaskUpsert) SetLastUpdatedAt(v time.Time) *TaskUpsert
- func (u *TaskUpsert) SetName(v string) *TaskUpsert
- func (u *TaskUpsert) SetNumberCracked(v int) *TaskUpsert
- func (u *TaskUpsert) SetNumberPasswords(v int) *TaskUpsert
- func (u *TaskUpsert) SetStatus(v oldschema.TaskStatus) *TaskUpsert
- func (u *TaskUpsert) UpdateAssignedToHost() *TaskUpsert
- func (u *TaskUpsert) UpdateCaseCode() *TaskUpsert
- func (u *TaskUpsert) UpdateComment() *TaskUpsert
- func (u *TaskUpsert) UpdateCreatedAt() *TaskUpsert
- func (u *TaskUpsert) UpdateEnginePayload() *TaskUpsert
- func (u *TaskUpsert) UpdateError() *TaskUpsert
- func (u *TaskUpsert) UpdateLastUpdatedAt() *TaskUpsert
- func (u *TaskUpsert) UpdateName() *TaskUpsert
- func (u *TaskUpsert) UpdateNumberCracked() *TaskUpsert
- func (u *TaskUpsert) UpdateNumberPasswords() *TaskUpsert
- func (u *TaskUpsert) UpdateStatus() *TaskUpsert
- type TaskUpsertBulk
- func (u *TaskUpsertBulk) AddNumberCracked(v int) *TaskUpsertBulk
- func (u *TaskUpsertBulk) AddNumberPasswords(v int) *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearAssignedToHost() *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearCaseCode() *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearComment() *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearEnginePayload() *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearError() *TaskUpsertBulk
- func (u *TaskUpsertBulk) DoNothing() *TaskUpsertBulk
- func (u *TaskUpsertBulk) Exec(ctx context.Context) error
- func (u *TaskUpsertBulk) ExecX(ctx context.Context)
- func (u *TaskUpsertBulk) Ignore() *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetAssignedToHost(v string) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetCaseCode(v string) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetComment(v string) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetCreatedAt(v time.Time) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetEnginePayload(v map[string]interface{}) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetError(v string) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetLastUpdatedAt(v time.Time) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetName(v string) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetNumberCracked(v int) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetNumberPasswords(v int) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetStatus(v oldschema.TaskStatus) *TaskUpsertBulk
- func (u *TaskUpsertBulk) Update(set func(*TaskUpsert)) *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateAssignedToHost() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateCaseCode() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateComment() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateCreatedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateEnginePayload() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateError() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateLastUpdatedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateName() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateNewValues() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateNumberCracked() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateNumberPasswords() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateStatus() *TaskUpsertBulk
- type TaskUpsertOne
- func (u *TaskUpsertOne) AddNumberCracked(v int) *TaskUpsertOne
- func (u *TaskUpsertOne) AddNumberPasswords(v int) *TaskUpsertOne
- func (u *TaskUpsertOne) ClearAssignedToHost() *TaskUpsertOne
- func (u *TaskUpsertOne) ClearCaseCode() *TaskUpsertOne
- func (u *TaskUpsertOne) ClearComment() *TaskUpsertOne
- func (u *TaskUpsertOne) ClearEnginePayload() *TaskUpsertOne
- func (u *TaskUpsertOne) ClearError() *TaskUpsertOne
- func (u *TaskUpsertOne) DoNothing() *TaskUpsertOne
- func (u *TaskUpsertOne) Exec(ctx context.Context) error
- func (u *TaskUpsertOne) ExecX(ctx context.Context)
- func (u *TaskUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *TaskUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *TaskUpsertOne) Ignore() *TaskUpsertOne
- func (u *TaskUpsertOne) SetAssignedToHost(v string) *TaskUpsertOne
- func (u *TaskUpsertOne) SetCaseCode(v string) *TaskUpsertOne
- func (u *TaskUpsertOne) SetComment(v string) *TaskUpsertOne
- func (u *TaskUpsertOne) SetCreatedAt(v time.Time) *TaskUpsertOne
- func (u *TaskUpsertOne) SetEnginePayload(v map[string]interface{}) *TaskUpsertOne
- func (u *TaskUpsertOne) SetError(v string) *TaskUpsertOne
- func (u *TaskUpsertOne) SetLastUpdatedAt(v time.Time) *TaskUpsertOne
- func (u *TaskUpsertOne) SetName(v string) *TaskUpsertOne
- func (u *TaskUpsertOne) SetNumberCracked(v int) *TaskUpsertOne
- func (u *TaskUpsertOne) SetNumberPasswords(v int) *TaskUpsertOne
- func (u *TaskUpsertOne) SetStatus(v oldschema.TaskStatus) *TaskUpsertOne
- func (u *TaskUpsertOne) Update(set func(*TaskUpsert)) *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateAssignedToHost() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateCaseCode() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateComment() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateCreatedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateEnginePayload() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateError() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateLastUpdatedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateName() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateNewValues() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateNumberCracked() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateNumberPasswords() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateStatus() *TaskUpsertOne
- type Tasks
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryCreatedTasks(u *User) *TaskQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddCreatedTaskIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddCreatedTasks(t ...*Task) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmailAddress(s string) *UserCreate
- func (uc *UserCreate) SetEnabled(b bool) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetIsSuperUser(b bool) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserFilter
- func (f *UserFilter) Where(p entql.P)
- func (f *UserFilter) WhereCreatedAt(p entql.TimeP)
- func (f *UserFilter) WhereEmailAddress(p entql.StringP)
- func (f *UserFilter) WhereEnabled(p entql.BoolP)
- func (f *UserFilter) WhereHasCreatedTasks()
- func (f *UserFilter) WhereHasCreatedTasksWith(preds ...predicate.Task)
- func (f *UserFilter) WhereID(p entql.ValueP)
- func (f *UserFilter) WhereIsSuperUser(p entql.BoolP)
- func (f *UserFilter) WhereUsername(p entql.StringP)
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
- func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
- func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ugb *UserGroupBy) IntX(ctx context.Context) int
- func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
- func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (ugb *UserGroupBy) StringX(ctx context.Context) string
- func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddCreatedTaskIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearCreatedTasks()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) CreatedTasksCleared() bool
- func (m *UserMutation) CreatedTasksIDs() (ids []uuid.UUID)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) EmailAddress() (r string, exists bool)
- func (m *UserMutation) Enabled() (r bool, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) Filter() *UserFilter
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) IsSuperUser() (r bool, exists bool)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmailAddress(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldEnabled(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldIsSuperUser(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemoveCreatedTaskIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovedCreatedTasksIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetCreatedTasks()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmailAddress()
- func (m *UserMutation) ResetEnabled()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetIsSuperUser()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetEmailAddress(s string)
- func (m *UserMutation) SetEnabled(b bool)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetIsSuperUser(b bool)
- func (m *UserMutation) SetUsername(s string)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- type UserQuery
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) Filter() *UserFilter
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryCreatedTasks() *TaskQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithCreatedTasks(opts ...func(*TaskQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (us *UserSelect) BoolX(ctx context.Context) bool
- func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UserSelect) BoolsX(ctx context.Context) []bool
- func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (us *UserSelect) Float64X(ctx context.Context) float64
- func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UserSelect) Float64sX(ctx context.Context) []float64
- func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (us *UserSelect) IntX(ctx context.Context) int
- func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (us *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
- func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
- func (us *UserSelect) ScanX(ctx context.Context, v interface{})
- func (us *UserSelect) String(ctx context.Context) (_ string, err error)
- func (us *UserSelect) StringX(ctx context.Context) string
- func (us *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddCreatedTaskIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddCreatedTasks(t ...*Task) *UserUpdate
- func (uu *UserUpdate) ClearCreatedTasks() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveCreatedTaskIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveCreatedTasks(t ...*Task) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetEmailAddress(s string) *UserUpdate
- func (uu *UserUpdate) SetEnabled(b bool) *UserUpdate
- func (uu *UserUpdate) SetIsSuperUser(b bool) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddCreatedTaskIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCreatedTasks(t ...*Task) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCreatedTasks() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveCreatedTaskIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveCreatedTasks(t ...*Task) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmailAddress(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEnabled(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsSuperUser(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) SetCreatedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetEmailAddress(v string) *UserUpsert
- func (u *UserUpsert) SetEnabled(v bool) *UserUpsert
- func (u *UserUpsert) SetIsSuperUser(v bool) *UserUpsert
- func (u *UserUpsert) SetUsername(v string) *UserUpsert
- func (u *UserUpsert) UpdateCreatedAt() *UserUpsert
- func (u *UserUpsert) UpdateEmailAddress() *UserUpsert
- func (u *UserUpsert) UpdateEnabled() *UserUpsert
- func (u *UserUpsert) UpdateIsSuperUser() *UserUpsert
- func (u *UserUpsert) UpdateUsername() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetCreatedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetEmailAddress(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetEnabled(v bool) *UserUpsertBulk
- func (u *UserUpsertBulk) SetIsSuperUser(v bool) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateCreatedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateEmailAddress() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateEnabled() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateIsSuperUser() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetCreatedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetEmailAddress(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetEnabled(v bool) *UserUpsertOne
- func (u *UserUpsertOne) SetIsSuperUser(v bool) *UserUpsertOne
- func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateCreatedAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateEmailAddress() *UserUpsertOne
- func (u *UserUpsertOne) UpdateEnabled() *UserUpsertOne
- func (u *UserUpsertOne) UpdateIsSuperUser() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeCrackedPassword = "CrackedPassword" TypeTask = "Task" TypeUser = "User" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // CrackedPassword is the client for interacting with the CrackedPassword builders. CrackedPassword *CrackedPasswordClient // Task is the client for interacting with the Task builders. Task *TaskClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). CrackedPassword. Query(). Count(ctx)
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 CrackedPassword ¶
type CrackedPassword struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Hash holds the value of the "hash" field. Hash string `json:"hash,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // CrackedAt holds the value of the "cracked_at" field. CrackedAt time.Time `json:"cracked_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CrackedPasswordQuery when eager-loading is set. Edges CrackedPasswordEdges `json:"edges"` // contains filtered or unexported fields }
CrackedPassword is the model entity for the CrackedPassword schema.
func (*CrackedPassword) QueryRelatedTask ¶
func (cp *CrackedPassword) QueryRelatedTask() *TaskQuery
QueryRelatedTask queries the "related_task" edge of the CrackedPassword entity.
func (*CrackedPassword) String ¶
func (cp *CrackedPassword) String() string
String implements the fmt.Stringer.
func (*CrackedPassword) Unwrap ¶
func (cp *CrackedPassword) Unwrap() *CrackedPassword
Unwrap unwraps the CrackedPassword 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 (*CrackedPassword) Update ¶
func (cp *CrackedPassword) Update() *CrackedPasswordUpdateOne
Update returns a builder for updating this CrackedPassword. Note that you need to call CrackedPassword.Unwrap() before calling this method if this CrackedPassword was returned from a transaction, and the transaction was committed or rolled back.
type CrackedPasswordClient ¶
type CrackedPasswordClient struct {
// contains filtered or unexported fields
}
CrackedPasswordClient is a client for the CrackedPassword schema.
func NewCrackedPasswordClient ¶
func NewCrackedPasswordClient(c config) *CrackedPasswordClient
NewCrackedPasswordClient returns a client for the CrackedPassword from the given config.
func (*CrackedPasswordClient) Create ¶
func (c *CrackedPasswordClient) Create() *CrackedPasswordCreate
Create returns a create builder for CrackedPassword.
func (*CrackedPasswordClient) CreateBulk ¶
func (c *CrackedPasswordClient) CreateBulk(builders ...*CrackedPasswordCreate) *CrackedPasswordCreateBulk
CreateBulk returns a builder for creating a bulk of CrackedPassword entities.
func (*CrackedPasswordClient) Delete ¶
func (c *CrackedPasswordClient) Delete() *CrackedPasswordDelete
Delete returns a delete builder for CrackedPassword.
func (*CrackedPasswordClient) DeleteOne ¶
func (c *CrackedPasswordClient) DeleteOne(cp *CrackedPassword) *CrackedPasswordDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*CrackedPasswordClient) DeleteOneID ¶
func (c *CrackedPasswordClient) DeleteOneID(id uuid.UUID) *CrackedPasswordDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*CrackedPasswordClient) Get ¶
func (c *CrackedPasswordClient) Get(ctx context.Context, id uuid.UUID) (*CrackedPassword, error)
Get returns a CrackedPassword entity by its id.
func (*CrackedPasswordClient) GetX ¶
func (c *CrackedPasswordClient) GetX(ctx context.Context, id uuid.UUID) *CrackedPassword
GetX is like Get, but panics if an error occurs.
func (*CrackedPasswordClient) Hooks ¶
func (c *CrackedPasswordClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CrackedPasswordClient) Query ¶
func (c *CrackedPasswordClient) Query() *CrackedPasswordQuery
Query returns a query builder for CrackedPassword.
func (*CrackedPasswordClient) QueryRelatedTask ¶
func (c *CrackedPasswordClient) QueryRelatedTask(cp *CrackedPassword) *TaskQuery
QueryRelatedTask queries the related_task edge of a CrackedPassword.
func (*CrackedPasswordClient) Update ¶
func (c *CrackedPasswordClient) Update() *CrackedPasswordUpdate
Update returns an update builder for CrackedPassword.
func (*CrackedPasswordClient) UpdateOne ¶
func (c *CrackedPasswordClient) UpdateOne(cp *CrackedPassword) *CrackedPasswordUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CrackedPasswordClient) UpdateOneID ¶
func (c *CrackedPasswordClient) UpdateOneID(id uuid.UUID) *CrackedPasswordUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CrackedPasswordClient) Use ¶
func (c *CrackedPasswordClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `crackedpassword.Hooks(f(g(h())))`.
type CrackedPasswordCreate ¶
type CrackedPasswordCreate struct {
// contains filtered or unexported fields
}
CrackedPasswordCreate is the builder for creating a CrackedPassword entity.
func (*CrackedPasswordCreate) Exec ¶
func (cpc *CrackedPasswordCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CrackedPasswordCreate) ExecX ¶
func (cpc *CrackedPasswordCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CrackedPasswordCreate) Mutation ¶
func (cpc *CrackedPasswordCreate) Mutation() *CrackedPasswordMutation
Mutation returns the CrackedPasswordMutation object of the builder.
func (*CrackedPasswordCreate) OnConflict ¶
func (cpc *CrackedPasswordCreate) OnConflict(opts ...sql.ConflictOption) *CrackedPasswordUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.CrackedPassword.Create(). SetHash(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.CrackedPasswordUpsert) { SetHash(v+v). }). Exec(ctx)
func (*CrackedPasswordCreate) OnConflictColumns ¶
func (cpc *CrackedPasswordCreate) OnConflictColumns(columns ...string) *CrackedPasswordUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.CrackedPassword.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*CrackedPasswordCreate) Save ¶
func (cpc *CrackedPasswordCreate) Save(ctx context.Context) (*CrackedPassword, error)
Save creates the CrackedPassword in the database.
func (*CrackedPasswordCreate) SaveX ¶
func (cpc *CrackedPasswordCreate) SaveX(ctx context.Context) *CrackedPassword
SaveX calls Save and panics if Save returns an error.
func (*CrackedPasswordCreate) SetCrackedAt ¶
func (cpc *CrackedPasswordCreate) SetCrackedAt(t time.Time) *CrackedPasswordCreate
SetCrackedAt sets the "cracked_at" field.
func (*CrackedPasswordCreate) SetHash ¶
func (cpc *CrackedPasswordCreate) SetHash(s string) *CrackedPasswordCreate
SetHash sets the "hash" field.
func (*CrackedPasswordCreate) SetID ¶
func (cpc *CrackedPasswordCreate) SetID(u uuid.UUID) *CrackedPasswordCreate
SetID sets the "id" field.
func (*CrackedPasswordCreate) SetNillableCrackedAt ¶
func (cpc *CrackedPasswordCreate) SetNillableCrackedAt(t *time.Time) *CrackedPasswordCreate
SetNillableCrackedAt sets the "cracked_at" field if the given value is not nil.
func (*CrackedPasswordCreate) SetRelatedTask ¶
func (cpc *CrackedPasswordCreate) SetRelatedTask(t *Task) *CrackedPasswordCreate
SetRelatedTask sets the "related_task" edge to the Task entity.
func (*CrackedPasswordCreate) SetRelatedTaskID ¶
func (cpc *CrackedPasswordCreate) SetRelatedTaskID(id uuid.UUID) *CrackedPasswordCreate
SetRelatedTaskID sets the "related_task" edge to the Task entity by ID.
func (*CrackedPasswordCreate) SetValue ¶
func (cpc *CrackedPasswordCreate) SetValue(s string) *CrackedPasswordCreate
SetValue sets the "value" field.
type CrackedPasswordCreateBulk ¶
type CrackedPasswordCreateBulk struct {
// contains filtered or unexported fields
}
CrackedPasswordCreateBulk is the builder for creating many CrackedPassword entities in bulk.
func (*CrackedPasswordCreateBulk) Exec ¶
func (cpcb *CrackedPasswordCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CrackedPasswordCreateBulk) ExecX ¶
func (cpcb *CrackedPasswordCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CrackedPasswordCreateBulk) OnConflict ¶
func (cpcb *CrackedPasswordCreateBulk) OnConflict(opts ...sql.ConflictOption) *CrackedPasswordUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.CrackedPassword.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.CrackedPasswordUpsert) { SetHash(v+v). }). Exec(ctx)
func (*CrackedPasswordCreateBulk) OnConflictColumns ¶
func (cpcb *CrackedPasswordCreateBulk) OnConflictColumns(columns ...string) *CrackedPasswordUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.CrackedPassword.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*CrackedPasswordCreateBulk) Save ¶
func (cpcb *CrackedPasswordCreateBulk) Save(ctx context.Context) ([]*CrackedPassword, error)
Save creates the CrackedPassword entities in the database.
func (*CrackedPasswordCreateBulk) SaveX ¶
func (cpcb *CrackedPasswordCreateBulk) SaveX(ctx context.Context) []*CrackedPassword
SaveX is like Save, but panics if an error occurs.
type CrackedPasswordDelete ¶
type CrackedPasswordDelete struct {
// contains filtered or unexported fields
}
CrackedPasswordDelete is the builder for deleting a CrackedPassword entity.
func (*CrackedPasswordDelete) Exec ¶
func (cpd *CrackedPasswordDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CrackedPasswordDelete) ExecX ¶
func (cpd *CrackedPasswordDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CrackedPasswordDelete) Where ¶
func (cpd *CrackedPasswordDelete) Where(ps ...predicate.CrackedPassword) *CrackedPasswordDelete
Where appends a list predicates to the CrackedPasswordDelete builder.
type CrackedPasswordDeleteOne ¶
type CrackedPasswordDeleteOne struct {
// contains filtered or unexported fields
}
CrackedPasswordDeleteOne is the builder for deleting a single CrackedPassword entity.
func (*CrackedPasswordDeleteOne) Exec ¶
func (cpdo *CrackedPasswordDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CrackedPasswordDeleteOne) ExecX ¶
func (cpdo *CrackedPasswordDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CrackedPasswordEdges ¶
type CrackedPasswordEdges struct { // RelatedTask holds the value of the related_task edge. RelatedTask *Task `json:"related_task,omitempty"` // contains filtered or unexported fields }
CrackedPasswordEdges holds the relations/edges for other nodes in the graph.
func (CrackedPasswordEdges) RelatedTaskOrErr ¶
func (e CrackedPasswordEdges) RelatedTaskOrErr() (*Task, error)
RelatedTaskOrErr returns the RelatedTask value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type CrackedPasswordFilter ¶
type CrackedPasswordFilter struct {
// contains filtered or unexported fields
}
CrackedPasswordFilter provides a generic filtering capability at runtime for CrackedPasswordQuery.
func (*CrackedPasswordFilter) Where ¶
func (f *CrackedPasswordFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*CrackedPasswordFilter) WhereCrackedAt ¶
func (f *CrackedPasswordFilter) WhereCrackedAt(p entql.TimeP)
WhereCrackedAt applies the entql time.Time predicate on the cracked_at field.
func (*CrackedPasswordFilter) WhereHasRelatedTask ¶
func (f *CrackedPasswordFilter) WhereHasRelatedTask()
WhereHasRelatedTask applies a predicate to check if query has an edge related_task.
func (*CrackedPasswordFilter) WhereHasRelatedTaskWith ¶
func (f *CrackedPasswordFilter) WhereHasRelatedTaskWith(preds ...predicate.Task)
WhereHasRelatedTaskWith applies a predicate to check if query has an edge related_task with a given conditions (other predicates).
func (*CrackedPasswordFilter) WhereHash ¶
func (f *CrackedPasswordFilter) WhereHash(p entql.StringP)
WhereHash applies the entql string predicate on the hash field.
func (*CrackedPasswordFilter) WhereID ¶
func (f *CrackedPasswordFilter) WhereID(p entql.ValueP)
WhereID applies the entql [16]byte predicate on the id field.
func (*CrackedPasswordFilter) WhereValue ¶
func (f *CrackedPasswordFilter) WhereValue(p entql.StringP)
WhereValue applies the entql string predicate on the value field.
type CrackedPasswordGroupBy ¶
type CrackedPasswordGroupBy struct {
// contains filtered or unexported fields
}
CrackedPasswordGroupBy is the group-by builder for CrackedPassword entities.
func (*CrackedPasswordGroupBy) Aggregate ¶
func (cpgb *CrackedPasswordGroupBy) Aggregate(fns ...AggregateFunc) *CrackedPasswordGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CrackedPasswordGroupBy) Bool ¶
func (cpgb *CrackedPasswordGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*CrackedPasswordGroupBy) BoolX ¶
func (cpgb *CrackedPasswordGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*CrackedPasswordGroupBy) Bools ¶
func (cpgb *CrackedPasswordGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*CrackedPasswordGroupBy) BoolsX ¶
func (cpgb *CrackedPasswordGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*CrackedPasswordGroupBy) Float64 ¶
func (cpgb *CrackedPasswordGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*CrackedPasswordGroupBy) Float64X ¶
func (cpgb *CrackedPasswordGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*CrackedPasswordGroupBy) Float64s ¶
func (cpgb *CrackedPasswordGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*CrackedPasswordGroupBy) Float64sX ¶
func (cpgb *CrackedPasswordGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*CrackedPasswordGroupBy) Int ¶
func (cpgb *CrackedPasswordGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*CrackedPasswordGroupBy) IntX ¶
func (cpgb *CrackedPasswordGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*CrackedPasswordGroupBy) Ints ¶
func (cpgb *CrackedPasswordGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*CrackedPasswordGroupBy) IntsX ¶
func (cpgb *CrackedPasswordGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*CrackedPasswordGroupBy) Scan ¶
func (cpgb *CrackedPasswordGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*CrackedPasswordGroupBy) ScanX ¶
func (cpgb *CrackedPasswordGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*CrackedPasswordGroupBy) String ¶
func (cpgb *CrackedPasswordGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*CrackedPasswordGroupBy) StringX ¶
func (cpgb *CrackedPasswordGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type CrackedPasswordMutation ¶
type CrackedPasswordMutation struct {
// contains filtered or unexported fields
}
CrackedPasswordMutation represents an operation that mutates the CrackedPassword nodes in the graph.
func (*CrackedPasswordMutation) AddField ¶
func (m *CrackedPasswordMutation) 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 (*CrackedPasswordMutation) AddedEdges ¶
func (m *CrackedPasswordMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CrackedPasswordMutation) AddedField ¶
func (m *CrackedPasswordMutation) 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 (*CrackedPasswordMutation) AddedFields ¶
func (m *CrackedPasswordMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CrackedPasswordMutation) AddedIDs ¶
func (m *CrackedPasswordMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CrackedPasswordMutation) ClearEdge ¶
func (m *CrackedPasswordMutation) 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 (*CrackedPasswordMutation) ClearField ¶
func (m *CrackedPasswordMutation) 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 (*CrackedPasswordMutation) ClearRelatedTask ¶
func (m *CrackedPasswordMutation) ClearRelatedTask()
ClearRelatedTask clears the "related_task" edge to the Task entity.
func (*CrackedPasswordMutation) ClearedEdges ¶
func (m *CrackedPasswordMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CrackedPasswordMutation) ClearedFields ¶
func (m *CrackedPasswordMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CrackedPasswordMutation) Client ¶
func (m CrackedPasswordMutation) 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 (*CrackedPasswordMutation) CrackedAt ¶
func (m *CrackedPasswordMutation) CrackedAt() (r time.Time, exists bool)
CrackedAt returns the value of the "cracked_at" field in the mutation.
func (*CrackedPasswordMutation) EdgeCleared ¶
func (m *CrackedPasswordMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CrackedPasswordMutation) Field ¶
func (m *CrackedPasswordMutation) 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 (*CrackedPasswordMutation) FieldCleared ¶
func (m *CrackedPasswordMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CrackedPasswordMutation) Fields ¶
func (m *CrackedPasswordMutation) 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 (*CrackedPasswordMutation) Filter ¶
func (m *CrackedPasswordMutation) Filter() *CrackedPasswordFilter
Filter returns an entql.Where implementation to apply filters on the CrackedPasswordMutation builder.
func (*CrackedPasswordMutation) Hash ¶
func (m *CrackedPasswordMutation) Hash() (r string, exists bool)
Hash returns the value of the "hash" field in the mutation.
func (*CrackedPasswordMutation) ID ¶
func (m *CrackedPasswordMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CrackedPasswordMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CrackedPasswordMutation) OldCrackedAt ¶
OldCrackedAt returns the old "cracked_at" field's value of the CrackedPassword entity. If the CrackedPassword 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 (*CrackedPasswordMutation) 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 (*CrackedPasswordMutation) OldHash ¶
func (m *CrackedPasswordMutation) OldHash(ctx context.Context) (v string, err error)
OldHash returns the old "hash" field's value of the CrackedPassword entity. If the CrackedPassword 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 (*CrackedPasswordMutation) OldValue ¶
func (m *CrackedPasswordMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the CrackedPassword entity. If the CrackedPassword 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 (*CrackedPasswordMutation) Op ¶
func (m *CrackedPasswordMutation) Op() Op
Op returns the operation name.
func (*CrackedPasswordMutation) RelatedTaskCleared ¶
func (m *CrackedPasswordMutation) RelatedTaskCleared() bool
RelatedTaskCleared reports if the "related_task" edge to the Task entity was cleared.
func (*CrackedPasswordMutation) RelatedTaskID ¶
func (m *CrackedPasswordMutation) RelatedTaskID() (id uuid.UUID, exists bool)
RelatedTaskID returns the "related_task" edge ID in the mutation.
func (*CrackedPasswordMutation) RelatedTaskIDs ¶
func (m *CrackedPasswordMutation) RelatedTaskIDs() (ids []uuid.UUID)
RelatedTaskIDs returns the "related_task" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RelatedTaskID instead. It exists only for internal usage by the builders.
func (*CrackedPasswordMutation) RemovedEdges ¶
func (m *CrackedPasswordMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CrackedPasswordMutation) RemovedIDs ¶
func (m *CrackedPasswordMutation) 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 (*CrackedPasswordMutation) ResetCrackedAt ¶
func (m *CrackedPasswordMutation) ResetCrackedAt()
ResetCrackedAt resets all changes to the "cracked_at" field.
func (*CrackedPasswordMutation) ResetEdge ¶
func (m *CrackedPasswordMutation) 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 (*CrackedPasswordMutation) ResetField ¶
func (m *CrackedPasswordMutation) 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 (*CrackedPasswordMutation) ResetHash ¶
func (m *CrackedPasswordMutation) ResetHash()
ResetHash resets all changes to the "hash" field.
func (*CrackedPasswordMutation) ResetRelatedTask ¶
func (m *CrackedPasswordMutation) ResetRelatedTask()
ResetRelatedTask resets all changes to the "related_task" edge.
func (*CrackedPasswordMutation) ResetValue ¶
func (m *CrackedPasswordMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*CrackedPasswordMutation) SetCrackedAt ¶
func (m *CrackedPasswordMutation) SetCrackedAt(t time.Time)
SetCrackedAt sets the "cracked_at" field.
func (*CrackedPasswordMutation) SetField ¶
func (m *CrackedPasswordMutation) 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 (*CrackedPasswordMutation) SetHash ¶
func (m *CrackedPasswordMutation) SetHash(s string)
SetHash sets the "hash" field.
func (*CrackedPasswordMutation) SetID ¶
func (m *CrackedPasswordMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of CrackedPassword entities.
func (*CrackedPasswordMutation) SetRelatedTaskID ¶
func (m *CrackedPasswordMutation) SetRelatedTaskID(id uuid.UUID)
SetRelatedTaskID sets the "related_task" edge to the Task entity by id.
func (*CrackedPasswordMutation) SetValue ¶
func (m *CrackedPasswordMutation) SetValue(s string)
SetValue sets the "value" field.
func (CrackedPasswordMutation) Tx ¶
func (m CrackedPasswordMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CrackedPasswordMutation) Type ¶
func (m *CrackedPasswordMutation) Type() string
Type returns the node type of this mutation (CrackedPassword).
func (*CrackedPasswordMutation) Value ¶
func (m *CrackedPasswordMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*CrackedPasswordMutation) Where ¶
func (m *CrackedPasswordMutation) Where(ps ...predicate.CrackedPassword)
Where appends a list predicates to the CrackedPasswordMutation builder.
type CrackedPasswordQuery ¶
type CrackedPasswordQuery struct {
// contains filtered or unexported fields
}
CrackedPasswordQuery is the builder for querying CrackedPassword entities.
func (*CrackedPasswordQuery) All ¶
func (cpq *CrackedPasswordQuery) All(ctx context.Context) ([]*CrackedPassword, error)
All executes the query and returns a list of CrackedPasswords.
func (*CrackedPasswordQuery) AllX ¶
func (cpq *CrackedPasswordQuery) AllX(ctx context.Context) []*CrackedPassword
AllX is like All, but panics if an error occurs.
func (*CrackedPasswordQuery) Clone ¶
func (cpq *CrackedPasswordQuery) Clone() *CrackedPasswordQuery
Clone returns a duplicate of the CrackedPasswordQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CrackedPasswordQuery) Count ¶
func (cpq *CrackedPasswordQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CrackedPasswordQuery) CountX ¶
func (cpq *CrackedPasswordQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CrackedPasswordQuery) Exist ¶
func (cpq *CrackedPasswordQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CrackedPasswordQuery) ExistX ¶
func (cpq *CrackedPasswordQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CrackedPasswordQuery) Filter ¶
func (cpq *CrackedPasswordQuery) Filter() *CrackedPasswordFilter
Filter returns a Filter implementation to apply filters on the CrackedPasswordQuery builder.
func (*CrackedPasswordQuery) First ¶
func (cpq *CrackedPasswordQuery) First(ctx context.Context) (*CrackedPassword, error)
First returns the first CrackedPassword entity from the query. Returns a *NotFoundError when no CrackedPassword was found.
func (*CrackedPasswordQuery) FirstID ¶
FirstID returns the first CrackedPassword ID from the query. Returns a *NotFoundError when no CrackedPassword ID was found.
func (*CrackedPasswordQuery) FirstIDX ¶
func (cpq *CrackedPasswordQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CrackedPasswordQuery) FirstX ¶
func (cpq *CrackedPasswordQuery) FirstX(ctx context.Context) *CrackedPassword
FirstX is like First, but panics if an error occurs.
func (*CrackedPasswordQuery) GroupBy ¶
func (cpq *CrackedPasswordQuery) GroupBy(field string, fields ...string) *CrackedPasswordGroupBy
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 { Hash string `json:"hash,omitempty"` Count int `json:"count,omitempty"` } client.CrackedPassword.Query(). GroupBy(crackedpassword.FieldHash). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CrackedPasswordQuery) IDs ¶
IDs executes the query and returns a list of CrackedPassword IDs.
func (*CrackedPasswordQuery) IDsX ¶
func (cpq *CrackedPasswordQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CrackedPasswordQuery) Limit ¶
func (cpq *CrackedPasswordQuery) Limit(limit int) *CrackedPasswordQuery
Limit adds a limit step to the query.
func (*CrackedPasswordQuery) Modify ¶
func (cpq *CrackedPasswordQuery) Modify(modifiers ...func(s *sql.Selector)) *CrackedPasswordSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*CrackedPasswordQuery) Offset ¶
func (cpq *CrackedPasswordQuery) Offset(offset int) *CrackedPasswordQuery
Offset adds an offset step to the query.
func (*CrackedPasswordQuery) Only ¶
func (cpq *CrackedPasswordQuery) Only(ctx context.Context) (*CrackedPassword, error)
Only returns a single CrackedPassword entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one CrackedPassword entity is not found. Returns a *NotFoundError when no CrackedPassword entities are found.
func (*CrackedPasswordQuery) OnlyID ¶
OnlyID is like Only, but returns the only CrackedPassword ID in the query. Returns a *NotSingularError when exactly one CrackedPassword ID is not found. Returns a *NotFoundError when no entities are found.
func (*CrackedPasswordQuery) OnlyIDX ¶
func (cpq *CrackedPasswordQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CrackedPasswordQuery) OnlyX ¶
func (cpq *CrackedPasswordQuery) OnlyX(ctx context.Context) *CrackedPassword
OnlyX is like Only, but panics if an error occurs.
func (*CrackedPasswordQuery) Order ¶
func (cpq *CrackedPasswordQuery) Order(o ...OrderFunc) *CrackedPasswordQuery
Order adds an order step to the query.
func (*CrackedPasswordQuery) QueryRelatedTask ¶
func (cpq *CrackedPasswordQuery) QueryRelatedTask() *TaskQuery
QueryRelatedTask chains the current query on the "related_task" edge.
func (*CrackedPasswordQuery) Select ¶
func (cpq *CrackedPasswordQuery) Select(fields ...string) *CrackedPasswordSelect
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 { Hash string `json:"hash,omitempty"` } client.CrackedPassword.Query(). Select(crackedpassword.FieldHash). Scan(ctx, &v)
func (*CrackedPasswordQuery) Unique ¶
func (cpq *CrackedPasswordQuery) Unique(unique bool) *CrackedPasswordQuery
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 (*CrackedPasswordQuery) Where ¶
func (cpq *CrackedPasswordQuery) Where(ps ...predicate.CrackedPassword) *CrackedPasswordQuery
Where adds a new predicate for the CrackedPasswordQuery builder.
func (*CrackedPasswordQuery) WithRelatedTask ¶
func (cpq *CrackedPasswordQuery) WithRelatedTask(opts ...func(*TaskQuery)) *CrackedPasswordQuery
WithRelatedTask tells the query-builder to eager-load the nodes that are connected to the "related_task" edge. The optional arguments are used to configure the query builder of the edge.
type CrackedPasswordSelect ¶
type CrackedPasswordSelect struct { *CrackedPasswordQuery // contains filtered or unexported fields }
CrackedPasswordSelect is the builder for selecting fields of CrackedPassword entities.
func (*CrackedPasswordSelect) Bool ¶
func (cps *CrackedPasswordSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CrackedPasswordSelect) BoolX ¶
func (cps *CrackedPasswordSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*CrackedPasswordSelect) Bools ¶
func (cps *CrackedPasswordSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CrackedPasswordSelect) BoolsX ¶
func (cps *CrackedPasswordSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*CrackedPasswordSelect) Float64 ¶
func (cps *CrackedPasswordSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CrackedPasswordSelect) Float64X ¶
func (cps *CrackedPasswordSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*CrackedPasswordSelect) Float64s ¶
func (cps *CrackedPasswordSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CrackedPasswordSelect) Float64sX ¶
func (cps *CrackedPasswordSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*CrackedPasswordSelect) Int ¶
func (cps *CrackedPasswordSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CrackedPasswordSelect) IntX ¶
func (cps *CrackedPasswordSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*CrackedPasswordSelect) Ints ¶
func (cps *CrackedPasswordSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CrackedPasswordSelect) IntsX ¶
func (cps *CrackedPasswordSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*CrackedPasswordSelect) Modify ¶
func (cps *CrackedPasswordSelect) Modify(modifiers ...func(s *sql.Selector)) *CrackedPasswordSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*CrackedPasswordSelect) Scan ¶
func (cps *CrackedPasswordSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*CrackedPasswordSelect) ScanX ¶
func (cps *CrackedPasswordSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*CrackedPasswordSelect) String ¶
func (cps *CrackedPasswordSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*CrackedPasswordSelect) StringX ¶
func (cps *CrackedPasswordSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type CrackedPasswordUpdate ¶
type CrackedPasswordUpdate struct {
// contains filtered or unexported fields
}
CrackedPasswordUpdate is the builder for updating CrackedPassword entities.
func (*CrackedPasswordUpdate) ClearRelatedTask ¶
func (cpu *CrackedPasswordUpdate) ClearRelatedTask() *CrackedPasswordUpdate
ClearRelatedTask clears the "related_task" edge to the Task entity.
func (*CrackedPasswordUpdate) Exec ¶
func (cpu *CrackedPasswordUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CrackedPasswordUpdate) ExecX ¶
func (cpu *CrackedPasswordUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CrackedPasswordUpdate) Mutation ¶
func (cpu *CrackedPasswordUpdate) Mutation() *CrackedPasswordMutation
Mutation returns the CrackedPasswordMutation object of the builder.
func (*CrackedPasswordUpdate) Save ¶
func (cpu *CrackedPasswordUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CrackedPasswordUpdate) SaveX ¶
func (cpu *CrackedPasswordUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CrackedPasswordUpdate) SetHash ¶
func (cpu *CrackedPasswordUpdate) SetHash(s string) *CrackedPasswordUpdate
SetHash sets the "hash" field.
func (*CrackedPasswordUpdate) SetRelatedTask ¶
func (cpu *CrackedPasswordUpdate) SetRelatedTask(t *Task) *CrackedPasswordUpdate
SetRelatedTask sets the "related_task" edge to the Task entity.
func (*CrackedPasswordUpdate) SetRelatedTaskID ¶
func (cpu *CrackedPasswordUpdate) SetRelatedTaskID(id uuid.UUID) *CrackedPasswordUpdate
SetRelatedTaskID sets the "related_task" edge to the Task entity by ID.
func (*CrackedPasswordUpdate) SetValue ¶
func (cpu *CrackedPasswordUpdate) SetValue(s string) *CrackedPasswordUpdate
SetValue sets the "value" field.
func (*CrackedPasswordUpdate) Where ¶
func (cpu *CrackedPasswordUpdate) Where(ps ...predicate.CrackedPassword) *CrackedPasswordUpdate
Where appends a list predicates to the CrackedPasswordUpdate builder.
type CrackedPasswordUpdateOne ¶
type CrackedPasswordUpdateOne struct {
// contains filtered or unexported fields
}
CrackedPasswordUpdateOne is the builder for updating a single CrackedPassword entity.
func (*CrackedPasswordUpdateOne) ClearRelatedTask ¶
func (cpuo *CrackedPasswordUpdateOne) ClearRelatedTask() *CrackedPasswordUpdateOne
ClearRelatedTask clears the "related_task" edge to the Task entity.
func (*CrackedPasswordUpdateOne) Exec ¶
func (cpuo *CrackedPasswordUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CrackedPasswordUpdateOne) ExecX ¶
func (cpuo *CrackedPasswordUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CrackedPasswordUpdateOne) Mutation ¶
func (cpuo *CrackedPasswordUpdateOne) Mutation() *CrackedPasswordMutation
Mutation returns the CrackedPasswordMutation object of the builder.
func (*CrackedPasswordUpdateOne) Save ¶
func (cpuo *CrackedPasswordUpdateOne) Save(ctx context.Context) (*CrackedPassword, error)
Save executes the query and returns the updated CrackedPassword entity.
func (*CrackedPasswordUpdateOne) SaveX ¶
func (cpuo *CrackedPasswordUpdateOne) SaveX(ctx context.Context) *CrackedPassword
SaveX is like Save, but panics if an error occurs.
func (*CrackedPasswordUpdateOne) Select ¶
func (cpuo *CrackedPasswordUpdateOne) Select(field string, fields ...string) *CrackedPasswordUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CrackedPasswordUpdateOne) SetHash ¶
func (cpuo *CrackedPasswordUpdateOne) SetHash(s string) *CrackedPasswordUpdateOne
SetHash sets the "hash" field.
func (*CrackedPasswordUpdateOne) SetRelatedTask ¶
func (cpuo *CrackedPasswordUpdateOne) SetRelatedTask(t *Task) *CrackedPasswordUpdateOne
SetRelatedTask sets the "related_task" edge to the Task entity.
func (*CrackedPasswordUpdateOne) SetRelatedTaskID ¶
func (cpuo *CrackedPasswordUpdateOne) SetRelatedTaskID(id uuid.UUID) *CrackedPasswordUpdateOne
SetRelatedTaskID sets the "related_task" edge to the Task entity by ID.
func (*CrackedPasswordUpdateOne) SetValue ¶
func (cpuo *CrackedPasswordUpdateOne) SetValue(s string) *CrackedPasswordUpdateOne
SetValue sets the "value" field.
type CrackedPasswordUpsert ¶
CrackedPasswordUpsert is the "OnConflict" setter.
func (*CrackedPasswordUpsert) SetCrackedAt ¶
func (u *CrackedPasswordUpsert) SetCrackedAt(v time.Time) *CrackedPasswordUpsert
SetCrackedAt sets the "cracked_at" field.
func (*CrackedPasswordUpsert) SetHash ¶
func (u *CrackedPasswordUpsert) SetHash(v string) *CrackedPasswordUpsert
SetHash sets the "hash" field.
func (*CrackedPasswordUpsert) SetValue ¶
func (u *CrackedPasswordUpsert) SetValue(v string) *CrackedPasswordUpsert
SetValue sets the "value" field.
func (*CrackedPasswordUpsert) UpdateCrackedAt ¶
func (u *CrackedPasswordUpsert) UpdateCrackedAt() *CrackedPasswordUpsert
UpdateCrackedAt sets the "cracked_at" field to the value that was provided on create.
func (*CrackedPasswordUpsert) UpdateHash ¶
func (u *CrackedPasswordUpsert) UpdateHash() *CrackedPasswordUpsert
UpdateHash sets the "hash" field to the value that was provided on create.
func (*CrackedPasswordUpsert) UpdateValue ¶
func (u *CrackedPasswordUpsert) UpdateValue() *CrackedPasswordUpsert
UpdateValue sets the "value" field to the value that was provided on create.
type CrackedPasswordUpsertBulk ¶
type CrackedPasswordUpsertBulk struct {
// contains filtered or unexported fields
}
CrackedPasswordUpsertBulk is the builder for "upsert"-ing a bulk of CrackedPassword nodes.
func (*CrackedPasswordUpsertBulk) DoNothing ¶
func (u *CrackedPasswordUpsertBulk) DoNothing() *CrackedPasswordUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CrackedPasswordUpsertBulk) Exec ¶
func (u *CrackedPasswordUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CrackedPasswordUpsertBulk) ExecX ¶
func (u *CrackedPasswordUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CrackedPasswordUpsertBulk) Ignore ¶
func (u *CrackedPasswordUpsertBulk) Ignore() *CrackedPasswordUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.CrackedPassword.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CrackedPasswordUpsertBulk) SetCrackedAt ¶
func (u *CrackedPasswordUpsertBulk) SetCrackedAt(v time.Time) *CrackedPasswordUpsertBulk
SetCrackedAt sets the "cracked_at" field.
func (*CrackedPasswordUpsertBulk) SetHash ¶
func (u *CrackedPasswordUpsertBulk) SetHash(v string) *CrackedPasswordUpsertBulk
SetHash sets the "hash" field.
func (*CrackedPasswordUpsertBulk) SetValue ¶
func (u *CrackedPasswordUpsertBulk) SetValue(v string) *CrackedPasswordUpsertBulk
SetValue sets the "value" field.
func (*CrackedPasswordUpsertBulk) Update ¶
func (u *CrackedPasswordUpsertBulk) Update(set func(*CrackedPasswordUpsert)) *CrackedPasswordUpsertBulk
Update allows overriding fields `UPDATE` values. See the CrackedPasswordCreateBulk.OnConflict documentation for more info.
func (*CrackedPasswordUpsertBulk) UpdateCrackedAt ¶
func (u *CrackedPasswordUpsertBulk) UpdateCrackedAt() *CrackedPasswordUpsertBulk
UpdateCrackedAt sets the "cracked_at" field to the value that was provided on create.
func (*CrackedPasswordUpsertBulk) UpdateHash ¶
func (u *CrackedPasswordUpsertBulk) UpdateHash() *CrackedPasswordUpsertBulk
UpdateHash sets the "hash" field to the value that was provided on create.
func (*CrackedPasswordUpsertBulk) UpdateNewValues ¶
func (u *CrackedPasswordUpsertBulk) UpdateNewValues() *CrackedPasswordUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.CrackedPassword.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(crackedpassword.FieldID) }), ). Exec(ctx)
func (*CrackedPasswordUpsertBulk) UpdateValue ¶
func (u *CrackedPasswordUpsertBulk) UpdateValue() *CrackedPasswordUpsertBulk
UpdateValue sets the "value" field to the value that was provided on create.
type CrackedPasswordUpsertOne ¶
type CrackedPasswordUpsertOne struct {
// contains filtered or unexported fields
}
CrackedPasswordUpsertOne is the builder for "upsert"-ing
one CrackedPassword node.
func (*CrackedPasswordUpsertOne) DoNothing ¶
func (u *CrackedPasswordUpsertOne) DoNothing() *CrackedPasswordUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CrackedPasswordUpsertOne) Exec ¶
func (u *CrackedPasswordUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*CrackedPasswordUpsertOne) ExecX ¶
func (u *CrackedPasswordUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CrackedPasswordUpsertOne) ID ¶
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*CrackedPasswordUpsertOne) IDX ¶
func (u *CrackedPasswordUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*CrackedPasswordUpsertOne) Ignore ¶
func (u *CrackedPasswordUpsertOne) Ignore() *CrackedPasswordUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.CrackedPassword.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CrackedPasswordUpsertOne) SetCrackedAt ¶
func (u *CrackedPasswordUpsertOne) SetCrackedAt(v time.Time) *CrackedPasswordUpsertOne
SetCrackedAt sets the "cracked_at" field.
func (*CrackedPasswordUpsertOne) SetHash ¶
func (u *CrackedPasswordUpsertOne) SetHash(v string) *CrackedPasswordUpsertOne
SetHash sets the "hash" field.
func (*CrackedPasswordUpsertOne) SetValue ¶
func (u *CrackedPasswordUpsertOne) SetValue(v string) *CrackedPasswordUpsertOne
SetValue sets the "value" field.
func (*CrackedPasswordUpsertOne) Update ¶
func (u *CrackedPasswordUpsertOne) Update(set func(*CrackedPasswordUpsert)) *CrackedPasswordUpsertOne
Update allows overriding fields `UPDATE` values. See the CrackedPasswordCreate.OnConflict documentation for more info.
func (*CrackedPasswordUpsertOne) UpdateCrackedAt ¶
func (u *CrackedPasswordUpsertOne) UpdateCrackedAt() *CrackedPasswordUpsertOne
UpdateCrackedAt sets the "cracked_at" field to the value that was provided on create.
func (*CrackedPasswordUpsertOne) UpdateHash ¶
func (u *CrackedPasswordUpsertOne) UpdateHash() *CrackedPasswordUpsertOne
UpdateHash sets the "hash" field to the value that was provided on create.
func (*CrackedPasswordUpsertOne) UpdateNewValues ¶
func (u *CrackedPasswordUpsertOne) UpdateNewValues() *CrackedPasswordUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.CrackedPassword.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(crackedpassword.FieldID) }), ). Exec(ctx)
func (*CrackedPasswordUpsertOne) UpdateValue ¶
func (u *CrackedPasswordUpsertOne) UpdateValue() *CrackedPasswordUpsertOne
UpdateValue sets the "value" field to the value that was provided on create.
type CrackedPasswords ¶
type CrackedPasswords []*CrackedPassword
CrackedPasswords is a parsable slice of CrackedPassword.
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 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 Rollbacker method.
type Task ¶
type Task struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Status holds the value of the "status" field. Status oldschema.TaskStatus `json:"status,omitempty"` // EnginePayload holds the value of the "engine_payload" field. EnginePayload map[string]interface{} `json:"engine_payload,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // LastUpdatedAt holds the value of the "last_updated_at" field. LastUpdatedAt time.Time `json:"last_updated_at,omitempty"` // AssignedToHost holds the value of the "assigned_to_host" field. AssignedToHost string `json:"assigned_to_host,omitempty"` // Comment holds the value of the "comment" field. Comment string `json:"comment,omitempty"` // CaseCode holds the value of the "case_code" field. CaseCode string `json:"case_code,omitempty"` // NumberCracked holds the value of the "number_cracked" field. NumberCracked int `json:"number_cracked,omitempty"` // NumberPasswords holds the value of the "number_passwords" field. NumberPasswords int `json:"number_passwords,omitempty"` // Error holds the value of the "error" field. Error string `json:"error,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TaskQuery when eager-loading is set. Edges TaskEdges `json:"edges"` // contains filtered or unexported fields }
Task is the model entity for the Task schema.
func (*Task) QueryCrackedPasswords ¶
func (t *Task) QueryCrackedPasswords() *CrackedPasswordQuery
QueryCrackedPasswords queries the "cracked_passwords" edge of the Task entity.
func (*Task) QueryCreatedBy ¶
QueryCreatedBy queries the "created_by" edge of the Task entity.
func (*Task) Unwrap ¶
Unwrap unwraps the Task 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 (*Task) Update ¶
func (t *Task) Update() *TaskUpdateOne
Update returns a builder for updating this Task. Note that you need to call Task.Unwrap() before calling this method if this Task was returned from a transaction, and the transaction was committed or rolled back.
type TaskClient ¶
type TaskClient struct {
// contains filtered or unexported fields
}
TaskClient is a client for the Task schema.
func NewTaskClient ¶
func NewTaskClient(c config) *TaskClient
NewTaskClient returns a client for the Task from the given config.
func (*TaskClient) Create ¶
func (c *TaskClient) Create() *TaskCreate
Create returns a create builder for Task.
func (*TaskClient) CreateBulk ¶
func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk
CreateBulk returns a builder for creating a bulk of Task entities.
func (*TaskClient) Delete ¶
func (c *TaskClient) Delete() *TaskDelete
Delete returns a delete builder for Task.
func (*TaskClient) DeleteOne ¶
func (c *TaskClient) DeleteOne(t *Task) *TaskDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*TaskClient) DeleteOneID ¶
func (c *TaskClient) DeleteOneID(id uuid.UUID) *TaskDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*TaskClient) Query ¶
func (c *TaskClient) Query() *TaskQuery
Query returns a query builder for Task.
func (*TaskClient) QueryCrackedPasswords ¶
func (c *TaskClient) QueryCrackedPasswords(t *Task) *CrackedPasswordQuery
QueryCrackedPasswords queries the cracked_passwords edge of a Task.
func (*TaskClient) QueryCreatedBy ¶
func (c *TaskClient) QueryCreatedBy(t *Task) *UserQuery
QueryCreatedBy queries the created_by edge of a Task.
func (*TaskClient) Update ¶
func (c *TaskClient) Update() *TaskUpdate
Update returns an update builder for Task.
func (*TaskClient) UpdateOne ¶
func (c *TaskClient) UpdateOne(t *Task) *TaskUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TaskClient) UpdateOneID ¶
func (c *TaskClient) UpdateOneID(id uuid.UUID) *TaskUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TaskClient) Use ¶
func (c *TaskClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `task.Hooks(f(g(h())))`.
type TaskCreate ¶
type TaskCreate struct {
// contains filtered or unexported fields
}
TaskCreate is the builder for creating a Task entity.
func (*TaskCreate) AddCrackedPasswordIDs ¶
func (tc *TaskCreate) AddCrackedPasswordIDs(ids ...uuid.UUID) *TaskCreate
AddCrackedPasswordIDs adds the "cracked_passwords" edge to the CrackedPassword entity by IDs.
func (*TaskCreate) AddCrackedPasswords ¶
func (tc *TaskCreate) AddCrackedPasswords(c ...*CrackedPassword) *TaskCreate
AddCrackedPasswords adds the "cracked_passwords" edges to the CrackedPassword entity.
func (*TaskCreate) Exec ¶
func (tc *TaskCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCreate) ExecX ¶
func (tc *TaskCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCreate) Mutation ¶
func (tc *TaskCreate) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskCreate) OnConflict ¶
func (tc *TaskCreate) OnConflict(opts ...sql.ConflictOption) *TaskUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Task.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TaskUpsert) { SetName(v+v). }). Exec(ctx)
func (*TaskCreate) OnConflictColumns ¶
func (tc *TaskCreate) OnConflictColumns(columns ...string) *TaskUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Task.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TaskCreate) Save ¶
func (tc *TaskCreate) Save(ctx context.Context) (*Task, error)
Save creates the Task in the database.
func (*TaskCreate) SaveX ¶
func (tc *TaskCreate) SaveX(ctx context.Context) *Task
SaveX calls Save and panics if Save returns an error.
func (*TaskCreate) SetAssignedToHost ¶
func (tc *TaskCreate) SetAssignedToHost(s string) *TaskCreate
SetAssignedToHost sets the "assigned_to_host" field.
func (*TaskCreate) SetCaseCode ¶
func (tc *TaskCreate) SetCaseCode(s string) *TaskCreate
SetCaseCode sets the "case_code" field.
func (*TaskCreate) SetComment ¶
func (tc *TaskCreate) SetComment(s string) *TaskCreate
SetComment sets the "comment" field.
func (*TaskCreate) SetCreatedAt ¶
func (tc *TaskCreate) SetCreatedAt(t time.Time) *TaskCreate
SetCreatedAt sets the "created_at" field.
func (*TaskCreate) SetCreatedBy ¶
func (tc *TaskCreate) SetCreatedBy(u *User) *TaskCreate
SetCreatedBy sets the "created_by" edge to the User entity.
func (*TaskCreate) SetCreatedByID ¶
func (tc *TaskCreate) SetCreatedByID(id uuid.UUID) *TaskCreate
SetCreatedByID sets the "created_by" edge to the User entity by ID.
func (*TaskCreate) SetEnginePayload ¶
func (tc *TaskCreate) SetEnginePayload(m map[string]interface{}) *TaskCreate
SetEnginePayload sets the "engine_payload" field.
func (*TaskCreate) SetError ¶
func (tc *TaskCreate) SetError(s string) *TaskCreate
SetError sets the "error" field.
func (*TaskCreate) SetID ¶
func (tc *TaskCreate) SetID(u uuid.UUID) *TaskCreate
SetID sets the "id" field.
func (*TaskCreate) SetLastUpdatedAt ¶
func (tc *TaskCreate) SetLastUpdatedAt(t time.Time) *TaskCreate
SetLastUpdatedAt sets the "last_updated_at" field.
func (*TaskCreate) SetName ¶
func (tc *TaskCreate) SetName(s string) *TaskCreate
SetName sets the "name" field.
func (*TaskCreate) SetNillableAssignedToHost ¶
func (tc *TaskCreate) SetNillableAssignedToHost(s *string) *TaskCreate
SetNillableAssignedToHost sets the "assigned_to_host" field if the given value is not nil.
func (*TaskCreate) SetNillableCaseCode ¶
func (tc *TaskCreate) SetNillableCaseCode(s *string) *TaskCreate
SetNillableCaseCode sets the "case_code" field if the given value is not nil.
func (*TaskCreate) SetNillableComment ¶
func (tc *TaskCreate) SetNillableComment(s *string) *TaskCreate
SetNillableComment sets the "comment" field if the given value is not nil.
func (*TaskCreate) SetNillableCreatedAt ¶
func (tc *TaskCreate) SetNillableCreatedAt(t *time.Time) *TaskCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TaskCreate) SetNillableError ¶
func (tc *TaskCreate) SetNillableError(s *string) *TaskCreate
SetNillableError sets the "error" field if the given value is not nil.
func (*TaskCreate) SetNillableLastUpdatedAt ¶
func (tc *TaskCreate) SetNillableLastUpdatedAt(t *time.Time) *TaskCreate
SetNillableLastUpdatedAt sets the "last_updated_at" field if the given value is not nil.
func (*TaskCreate) SetNillableNumberCracked ¶
func (tc *TaskCreate) SetNillableNumberCracked(i *int) *TaskCreate
SetNillableNumberCracked sets the "number_cracked" field if the given value is not nil.
func (*TaskCreate) SetNillableNumberPasswords ¶
func (tc *TaskCreate) SetNillableNumberPasswords(i *int) *TaskCreate
SetNillableNumberPasswords sets the "number_passwords" field if the given value is not nil.
func (*TaskCreate) SetNumberCracked ¶
func (tc *TaskCreate) SetNumberCracked(i int) *TaskCreate
SetNumberCracked sets the "number_cracked" field.
func (*TaskCreate) SetNumberPasswords ¶
func (tc *TaskCreate) SetNumberPasswords(i int) *TaskCreate
SetNumberPasswords sets the "number_passwords" field.
func (*TaskCreate) SetStatus ¶
func (tc *TaskCreate) SetStatus(os oldschema.TaskStatus) *TaskCreate
SetStatus sets the "status" field.
type TaskCreateBulk ¶
type TaskCreateBulk struct {
// contains filtered or unexported fields
}
TaskCreateBulk is the builder for creating many Task entities in bulk.
func (*TaskCreateBulk) Exec ¶
func (tcb *TaskCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCreateBulk) ExecX ¶
func (tcb *TaskCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCreateBulk) OnConflict ¶
func (tcb *TaskCreateBulk) OnConflict(opts ...sql.ConflictOption) *TaskUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Task.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TaskUpsert) { SetName(v+v). }). Exec(ctx)
func (*TaskCreateBulk) OnConflictColumns ¶
func (tcb *TaskCreateBulk) OnConflictColumns(columns ...string) *TaskUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Task.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TaskDelete ¶
type TaskDelete struct {
// contains filtered or unexported fields
}
TaskDelete is the builder for deleting a Task entity.
func (*TaskDelete) Exec ¶
func (td *TaskDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TaskDelete) ExecX ¶
func (td *TaskDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TaskDelete) Where ¶
func (td *TaskDelete) Where(ps ...predicate.Task) *TaskDelete
Where appends a list predicates to the TaskDelete builder.
type TaskDeleteOne ¶
type TaskDeleteOne struct {
// contains filtered or unexported fields
}
TaskDeleteOne is the builder for deleting a single Task entity.
func (*TaskDeleteOne) Exec ¶
func (tdo *TaskDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TaskDeleteOne) ExecX ¶
func (tdo *TaskDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TaskEdges ¶
type TaskEdges struct { // CreatedBy holds the value of the created_by edge. CreatedBy *User `json:"created_by,omitempty"` // CrackedPasswords holds the value of the cracked_passwords edge. CrackedPasswords []*CrackedPassword `json:"cracked_passwords,omitempty"` // contains filtered or unexported fields }
TaskEdges holds the relations/edges for other nodes in the graph.
func (TaskEdges) CrackedPasswordsOrErr ¶
func (e TaskEdges) CrackedPasswordsOrErr() ([]*CrackedPassword, error)
CrackedPasswordsOrErr returns the CrackedPasswords value or an error if the edge was not loaded in eager-loading.
func (TaskEdges) CreatedByOrErr ¶
CreatedByOrErr returns the CreatedBy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TaskFilter ¶
type TaskFilter struct {
// contains filtered or unexported fields
}
TaskFilter provides a generic filtering capability at runtime for TaskQuery.
func (*TaskFilter) Where ¶
func (f *TaskFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*TaskFilter) WhereAssignedToHost ¶
func (f *TaskFilter) WhereAssignedToHost(p entql.StringP)
WhereAssignedToHost applies the entql string predicate on the assigned_to_host field.
func (*TaskFilter) WhereCaseCode ¶
func (f *TaskFilter) WhereCaseCode(p entql.StringP)
WhereCaseCode applies the entql string predicate on the case_code field.
func (*TaskFilter) WhereComment ¶
func (f *TaskFilter) WhereComment(p entql.StringP)
WhereComment applies the entql string predicate on the comment field.
func (*TaskFilter) WhereCreatedAt ¶
func (f *TaskFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*TaskFilter) WhereEnginePayload ¶
func (f *TaskFilter) WhereEnginePayload(p entql.BytesP)
WhereEnginePayload applies the entql json.RawMessage predicate on the engine_payload field.
func (*TaskFilter) WhereError ¶
func (f *TaskFilter) WhereError(p entql.StringP)
WhereError applies the entql string predicate on the error field.
func (*TaskFilter) WhereHasCrackedPasswords ¶
func (f *TaskFilter) WhereHasCrackedPasswords()
WhereHasCrackedPasswords applies a predicate to check if query has an edge cracked_passwords.
func (*TaskFilter) WhereHasCrackedPasswordsWith ¶
func (f *TaskFilter) WhereHasCrackedPasswordsWith(preds ...predicate.CrackedPassword)
WhereHasCrackedPasswordsWith applies a predicate to check if query has an edge cracked_passwords with a given conditions (other predicates).
func (*TaskFilter) WhereHasCreatedBy ¶
func (f *TaskFilter) WhereHasCreatedBy()
WhereHasCreatedBy applies a predicate to check if query has an edge created_by.
func (*TaskFilter) WhereHasCreatedByWith ¶
func (f *TaskFilter) WhereHasCreatedByWith(preds ...predicate.User)
WhereHasCreatedByWith applies a predicate to check if query has an edge created_by with a given conditions (other predicates).
func (*TaskFilter) WhereID ¶
func (f *TaskFilter) WhereID(p entql.ValueP)
WhereID applies the entql [16]byte predicate on the id field.
func (*TaskFilter) WhereLastUpdatedAt ¶
func (f *TaskFilter) WhereLastUpdatedAt(p entql.TimeP)
WhereLastUpdatedAt applies the entql time.Time predicate on the last_updated_at field.
func (*TaskFilter) WhereName ¶
func (f *TaskFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (*TaskFilter) WhereNumberCracked ¶
func (f *TaskFilter) WhereNumberCracked(p entql.IntP)
WhereNumberCracked applies the entql int predicate on the number_cracked field.
func (*TaskFilter) WhereNumberPasswords ¶
func (f *TaskFilter) WhereNumberPasswords(p entql.IntP)
WhereNumberPasswords applies the entql int predicate on the number_passwords field.
func (*TaskFilter) WhereStatus ¶
func (f *TaskFilter) WhereStatus(p entql.StringP)
WhereStatus applies the entql string predicate on the status field.
type TaskGroupBy ¶
type TaskGroupBy struct {
// contains filtered or unexported fields
}
TaskGroupBy is the group-by builder for Task entities.
func (*TaskGroupBy) Aggregate ¶
func (tgb *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TaskGroupBy) Bool ¶
func (tgb *TaskGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) BoolX ¶
func (tgb *TaskGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TaskGroupBy) Bools ¶
func (tgb *TaskGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) BoolsX ¶
func (tgb *TaskGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TaskGroupBy) Float64 ¶
func (tgb *TaskGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) Float64X ¶
func (tgb *TaskGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TaskGroupBy) Float64s ¶
func (tgb *TaskGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) Float64sX ¶
func (tgb *TaskGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TaskGroupBy) Int ¶
func (tgb *TaskGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) IntX ¶
func (tgb *TaskGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TaskGroupBy) Ints ¶
func (tgb *TaskGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) IntsX ¶
func (tgb *TaskGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TaskGroupBy) Scan ¶
func (tgb *TaskGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TaskGroupBy) ScanX ¶
func (tgb *TaskGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TaskGroupBy) String ¶
func (tgb *TaskGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) StringX ¶
func (tgb *TaskGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TaskMutation ¶
type TaskMutation struct {
// contains filtered or unexported fields
}
TaskMutation represents an operation that mutates the Task nodes in the graph.
func (*TaskMutation) AddCrackedPasswordIDs ¶
func (m *TaskMutation) AddCrackedPasswordIDs(ids ...uuid.UUID)
AddCrackedPasswordIDs adds the "cracked_passwords" edge to the CrackedPassword entity by ids.
func (*TaskMutation) AddField ¶
func (m *TaskMutation) 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 (*TaskMutation) AddNumberCracked ¶
func (m *TaskMutation) AddNumberCracked(i int)
AddNumberCracked adds i to the "number_cracked" field.
func (*TaskMutation) AddNumberPasswords ¶
func (m *TaskMutation) AddNumberPasswords(i int)
AddNumberPasswords adds i to the "number_passwords" field.
func (*TaskMutation) AddedEdges ¶
func (m *TaskMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TaskMutation) AddedField ¶
func (m *TaskMutation) 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 (*TaskMutation) AddedFields ¶
func (m *TaskMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TaskMutation) AddedIDs ¶
func (m *TaskMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TaskMutation) AddedNumberCracked ¶
func (m *TaskMutation) AddedNumberCracked() (r int, exists bool)
AddedNumberCracked returns the value that was added to the "number_cracked" field in this mutation.
func (*TaskMutation) AddedNumberPasswords ¶
func (m *TaskMutation) AddedNumberPasswords() (r int, exists bool)
AddedNumberPasswords returns the value that was added to the "number_passwords" field in this mutation.
func (*TaskMutation) AssignedToHost ¶
func (m *TaskMutation) AssignedToHost() (r string, exists bool)
AssignedToHost returns the value of the "assigned_to_host" field in the mutation.
func (*TaskMutation) AssignedToHostCleared ¶
func (m *TaskMutation) AssignedToHostCleared() bool
AssignedToHostCleared returns if the "assigned_to_host" field was cleared in this mutation.
func (*TaskMutation) CaseCode ¶
func (m *TaskMutation) CaseCode() (r string, exists bool)
CaseCode returns the value of the "case_code" field in the mutation.
func (*TaskMutation) CaseCodeCleared ¶
func (m *TaskMutation) CaseCodeCleared() bool
CaseCodeCleared returns if the "case_code" field was cleared in this mutation.
func (*TaskMutation) ClearAssignedToHost ¶
func (m *TaskMutation) ClearAssignedToHost()
ClearAssignedToHost clears the value of the "assigned_to_host" field.
func (*TaskMutation) ClearCaseCode ¶
func (m *TaskMutation) ClearCaseCode()
ClearCaseCode clears the value of the "case_code" field.
func (*TaskMutation) ClearComment ¶
func (m *TaskMutation) ClearComment()
ClearComment clears the value of the "comment" field.
func (*TaskMutation) ClearCrackedPasswords ¶
func (m *TaskMutation) ClearCrackedPasswords()
ClearCrackedPasswords clears the "cracked_passwords" edge to the CrackedPassword entity.
func (*TaskMutation) ClearCreatedBy ¶
func (m *TaskMutation) ClearCreatedBy()
ClearCreatedBy clears the "created_by" edge to the User entity.
func (*TaskMutation) ClearEdge ¶
func (m *TaskMutation) 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 (*TaskMutation) ClearEnginePayload ¶
func (m *TaskMutation) ClearEnginePayload()
ClearEnginePayload clears the value of the "engine_payload" field.
func (*TaskMutation) ClearError ¶
func (m *TaskMutation) ClearError()
ClearError clears the value of the "error" field.
func (*TaskMutation) ClearField ¶
func (m *TaskMutation) 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 (*TaskMutation) ClearedEdges ¶
func (m *TaskMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TaskMutation) ClearedFields ¶
func (m *TaskMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TaskMutation) Client ¶
func (m TaskMutation) 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 (*TaskMutation) Comment ¶
func (m *TaskMutation) Comment() (r string, exists bool)
Comment returns the value of the "comment" field in the mutation.
func (*TaskMutation) CommentCleared ¶
func (m *TaskMutation) CommentCleared() bool
CommentCleared returns if the "comment" field was cleared in this mutation.
func (*TaskMutation) CrackedPasswordsCleared ¶
func (m *TaskMutation) CrackedPasswordsCleared() bool
CrackedPasswordsCleared reports if the "cracked_passwords" edge to the CrackedPassword entity was cleared.
func (*TaskMutation) CrackedPasswordsIDs ¶
func (m *TaskMutation) CrackedPasswordsIDs() (ids []uuid.UUID)
CrackedPasswordsIDs returns the "cracked_passwords" edge IDs in the mutation.
func (*TaskMutation) CreatedAt ¶
func (m *TaskMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TaskMutation) CreatedByCleared ¶
func (m *TaskMutation) CreatedByCleared() bool
CreatedByCleared reports if the "created_by" edge to the User entity was cleared.
func (*TaskMutation) CreatedByID ¶
func (m *TaskMutation) CreatedByID() (id uuid.UUID, exists bool)
CreatedByID returns the "created_by" edge ID in the mutation.
func (*TaskMutation) CreatedByIDs ¶
func (m *TaskMutation) CreatedByIDs() (ids []uuid.UUID)
CreatedByIDs returns the "created_by" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatedByID instead. It exists only for internal usage by the builders.
func (*TaskMutation) EdgeCleared ¶
func (m *TaskMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TaskMutation) EnginePayload ¶
func (m *TaskMutation) EnginePayload() (r map[string]interface{}, exists bool)
EnginePayload returns the value of the "engine_payload" field in the mutation.
func (*TaskMutation) EnginePayloadCleared ¶
func (m *TaskMutation) EnginePayloadCleared() bool
EnginePayloadCleared returns if the "engine_payload" field was cleared in this mutation.
func (*TaskMutation) Error ¶
func (m *TaskMutation) Error() (r string, exists bool)
Error returns the value of the "error" field in the mutation.
func (*TaskMutation) ErrorCleared ¶
func (m *TaskMutation) ErrorCleared() bool
ErrorCleared returns if the "error" field was cleared in this mutation.
func (*TaskMutation) Field ¶
func (m *TaskMutation) 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 (*TaskMutation) FieldCleared ¶
func (m *TaskMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TaskMutation) Fields ¶
func (m *TaskMutation) 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 (*TaskMutation) Filter ¶
func (m *TaskMutation) Filter() *TaskFilter
Filter returns an entql.Where implementation to apply filters on the TaskMutation builder.
func (*TaskMutation) ID ¶
func (m *TaskMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TaskMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TaskMutation) LastUpdatedAt ¶
func (m *TaskMutation) LastUpdatedAt() (r time.Time, exists bool)
LastUpdatedAt returns the value of the "last_updated_at" field in the mutation.
func (*TaskMutation) Name ¶
func (m *TaskMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*TaskMutation) NumberCracked ¶
func (m *TaskMutation) NumberCracked() (r int, exists bool)
NumberCracked returns the value of the "number_cracked" field in the mutation.
func (*TaskMutation) NumberPasswords ¶
func (m *TaskMutation) NumberPasswords() (r int, exists bool)
NumberPasswords returns the value of the "number_passwords" field in the mutation.
func (*TaskMutation) OldAssignedToHost ¶
func (m *TaskMutation) OldAssignedToHost(ctx context.Context) (v string, err error)
OldAssignedToHost returns the old "assigned_to_host" field's value of the Task entity. If the Task 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 (*TaskMutation) OldCaseCode ¶
func (m *TaskMutation) OldCaseCode(ctx context.Context) (v string, err error)
OldCaseCode returns the old "case_code" field's value of the Task entity. If the Task 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 (*TaskMutation) OldComment ¶
func (m *TaskMutation) OldComment(ctx context.Context) (v string, err error)
OldComment returns the old "comment" field's value of the Task entity. If the Task 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 (*TaskMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Task entity. If the Task 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 (*TaskMutation) OldEnginePayload ¶
func (m *TaskMutation) OldEnginePayload(ctx context.Context) (v map[string]interface{}, err error)
OldEnginePayload returns the old "engine_payload" field's value of the Task entity. If the Task 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 (*TaskMutation) OldError ¶
func (m *TaskMutation) OldError(ctx context.Context) (v string, err error)
OldError returns the old "error" field's value of the Task entity. If the Task 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 (*TaskMutation) 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 (*TaskMutation) OldLastUpdatedAt ¶
OldLastUpdatedAt returns the old "last_updated_at" field's value of the Task entity. If the Task 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 (*TaskMutation) OldName ¶
func (m *TaskMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Task entity. If the Task 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 (*TaskMutation) OldNumberCracked ¶
func (m *TaskMutation) OldNumberCracked(ctx context.Context) (v int, err error)
OldNumberCracked returns the old "number_cracked" field's value of the Task entity. If the Task 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 (*TaskMutation) OldNumberPasswords ¶
func (m *TaskMutation) OldNumberPasswords(ctx context.Context) (v int, err error)
OldNumberPasswords returns the old "number_passwords" field's value of the Task entity. If the Task 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 (*TaskMutation) OldStatus ¶
func (m *TaskMutation) OldStatus(ctx context.Context) (v oldschema.TaskStatus, err error)
OldStatus returns the old "status" field's value of the Task entity. If the Task 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 (*TaskMutation) RemoveCrackedPasswordIDs ¶
func (m *TaskMutation) RemoveCrackedPasswordIDs(ids ...uuid.UUID)
RemoveCrackedPasswordIDs removes the "cracked_passwords" edge to the CrackedPassword entity by IDs.
func (*TaskMutation) RemovedCrackedPasswordsIDs ¶
func (m *TaskMutation) RemovedCrackedPasswordsIDs() (ids []uuid.UUID)
RemovedCrackedPasswords returns the removed IDs of the "cracked_passwords" edge to the CrackedPassword entity.
func (*TaskMutation) RemovedEdges ¶
func (m *TaskMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TaskMutation) RemovedIDs ¶
func (m *TaskMutation) 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 (*TaskMutation) ResetAssignedToHost ¶
func (m *TaskMutation) ResetAssignedToHost()
ResetAssignedToHost resets all changes to the "assigned_to_host" field.
func (*TaskMutation) ResetCaseCode ¶
func (m *TaskMutation) ResetCaseCode()
ResetCaseCode resets all changes to the "case_code" field.
func (*TaskMutation) ResetComment ¶
func (m *TaskMutation) ResetComment()
ResetComment resets all changes to the "comment" field.
func (*TaskMutation) ResetCrackedPasswords ¶
func (m *TaskMutation) ResetCrackedPasswords()
ResetCrackedPasswords resets all changes to the "cracked_passwords" edge.
func (*TaskMutation) ResetCreatedAt ¶
func (m *TaskMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TaskMutation) ResetCreatedBy ¶
func (m *TaskMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" edge.
func (*TaskMutation) ResetEdge ¶
func (m *TaskMutation) 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 (*TaskMutation) ResetEnginePayload ¶
func (m *TaskMutation) ResetEnginePayload()
ResetEnginePayload resets all changes to the "engine_payload" field.
func (*TaskMutation) ResetError ¶
func (m *TaskMutation) ResetError()
ResetError resets all changes to the "error" field.
func (*TaskMutation) ResetField ¶
func (m *TaskMutation) 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 (*TaskMutation) ResetLastUpdatedAt ¶
func (m *TaskMutation) ResetLastUpdatedAt()
ResetLastUpdatedAt resets all changes to the "last_updated_at" field.
func (*TaskMutation) ResetName ¶
func (m *TaskMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TaskMutation) ResetNumberCracked ¶
func (m *TaskMutation) ResetNumberCracked()
ResetNumberCracked resets all changes to the "number_cracked" field.
func (*TaskMutation) ResetNumberPasswords ¶
func (m *TaskMutation) ResetNumberPasswords()
ResetNumberPasswords resets all changes to the "number_passwords" field.
func (*TaskMutation) ResetStatus ¶
func (m *TaskMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*TaskMutation) SetAssignedToHost ¶
func (m *TaskMutation) SetAssignedToHost(s string)
SetAssignedToHost sets the "assigned_to_host" field.
func (*TaskMutation) SetCaseCode ¶
func (m *TaskMutation) SetCaseCode(s string)
SetCaseCode sets the "case_code" field.
func (*TaskMutation) SetComment ¶
func (m *TaskMutation) SetComment(s string)
SetComment sets the "comment" field.
func (*TaskMutation) SetCreatedAt ¶
func (m *TaskMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TaskMutation) SetCreatedByID ¶
func (m *TaskMutation) SetCreatedByID(id uuid.UUID)
SetCreatedByID sets the "created_by" edge to the User entity by id.
func (*TaskMutation) SetEnginePayload ¶
func (m *TaskMutation) SetEnginePayload(value map[string]interface{})
SetEnginePayload sets the "engine_payload" field.
func (*TaskMutation) SetError ¶
func (m *TaskMutation) SetError(s string)
SetError sets the "error" field.
func (*TaskMutation) SetField ¶
func (m *TaskMutation) 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 (*TaskMutation) SetID ¶
func (m *TaskMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Task entities.
func (*TaskMutation) SetLastUpdatedAt ¶
func (m *TaskMutation) SetLastUpdatedAt(t time.Time)
SetLastUpdatedAt sets the "last_updated_at" field.
func (*TaskMutation) SetName ¶
func (m *TaskMutation) SetName(s string)
SetName sets the "name" field.
func (*TaskMutation) SetNumberCracked ¶
func (m *TaskMutation) SetNumberCracked(i int)
SetNumberCracked sets the "number_cracked" field.
func (*TaskMutation) SetNumberPasswords ¶
func (m *TaskMutation) SetNumberPasswords(i int)
SetNumberPasswords sets the "number_passwords" field.
func (*TaskMutation) SetStatus ¶
func (m *TaskMutation) SetStatus(os oldschema.TaskStatus)
SetStatus sets the "status" field.
func (*TaskMutation) Status ¶
func (m *TaskMutation) Status() (r oldschema.TaskStatus, exists bool)
Status returns the value of the "status" field in the mutation.
func (TaskMutation) Tx ¶
func (m TaskMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TaskMutation) Type ¶
func (m *TaskMutation) Type() string
Type returns the node type of this mutation (Task).
func (*TaskMutation) Where ¶
func (m *TaskMutation) Where(ps ...predicate.Task)
Where appends a list predicates to the TaskMutation builder.
type TaskQuery ¶
type TaskQuery struct {
// contains filtered or unexported fields
}
TaskQuery is the builder for querying Task entities.
func (*TaskQuery) Clone ¶
Clone returns a duplicate of the TaskQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TaskQuery) Filter ¶
func (tq *TaskQuery) Filter() *TaskFilter
Filter returns a Filter implementation to apply filters on the TaskQuery builder.
func (*TaskQuery) First ¶
First returns the first Task entity from the query. Returns a *NotFoundError when no Task was found.
func (*TaskQuery) FirstID ¶
FirstID returns the first Task ID from the query. Returns a *NotFoundError when no Task ID was found.
func (*TaskQuery) GroupBy ¶
func (tq *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy
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.Task.Query(). GroupBy(task.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TaskQuery) Modify ¶
func (tq *TaskQuery) Modify(modifiers ...func(s *sql.Selector)) *TaskSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*TaskQuery) Only ¶
Only returns a single Task entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Task entity is not found. Returns a *NotFoundError when no Task entities are found.
func (*TaskQuery) OnlyID ¶
OnlyID is like Only, but returns the only Task ID in the query. Returns a *NotSingularError when exactly one Task ID is not found. Returns a *NotFoundError when no entities are found.
func (*TaskQuery) QueryCrackedPasswords ¶
func (tq *TaskQuery) QueryCrackedPasswords() *CrackedPasswordQuery
QueryCrackedPasswords chains the current query on the "cracked_passwords" edge.
func (*TaskQuery) QueryCreatedBy ¶
QueryCreatedBy chains the current query on the "created_by" edge.
func (*TaskQuery) Select ¶
func (tq *TaskQuery) Select(fields ...string) *TaskSelect
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.Task.Query(). Select(task.FieldName). Scan(ctx, &v)
func (*TaskQuery) 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 (*TaskQuery) WithCrackedPasswords ¶
func (tq *TaskQuery) WithCrackedPasswords(opts ...func(*CrackedPasswordQuery)) *TaskQuery
WithCrackedPasswords tells the query-builder to eager-load the nodes that are connected to the "cracked_passwords" edge. The optional arguments are used to configure the query builder of the edge.
func (*TaskQuery) WithCreatedBy ¶
WithCreatedBy tells the query-builder to eager-load the nodes that are connected to the "created_by" edge. The optional arguments are used to configure the query builder of the edge.
type TaskSelect ¶
type TaskSelect struct { *TaskQuery // contains filtered or unexported fields }
TaskSelect is the builder for selecting fields of Task entities.
func (*TaskSelect) Bool ¶
func (ts *TaskSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TaskSelect) BoolX ¶
func (ts *TaskSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TaskSelect) Bools ¶
func (ts *TaskSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TaskSelect) BoolsX ¶
func (ts *TaskSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TaskSelect) Float64 ¶
func (ts *TaskSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Float64X ¶
func (ts *TaskSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TaskSelect) Float64s ¶
func (ts *TaskSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Float64sX ¶
func (ts *TaskSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TaskSelect) Int ¶
func (ts *TaskSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TaskSelect) IntX ¶
func (ts *TaskSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TaskSelect) Ints ¶
func (ts *TaskSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TaskSelect) IntsX ¶
func (ts *TaskSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TaskSelect) Modify ¶
func (ts *TaskSelect) Modify(modifiers ...func(s *sql.Selector)) *TaskSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*TaskSelect) Scan ¶
func (ts *TaskSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TaskSelect) ScanX ¶
func (ts *TaskSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TaskSelect) String ¶
func (ts *TaskSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*TaskSelect) StringX ¶
func (ts *TaskSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TaskUpdate ¶
type TaskUpdate struct {
// contains filtered or unexported fields
}
TaskUpdate is the builder for updating Task entities.
func (*TaskUpdate) AddCrackedPasswordIDs ¶
func (tu *TaskUpdate) AddCrackedPasswordIDs(ids ...uuid.UUID) *TaskUpdate
AddCrackedPasswordIDs adds the "cracked_passwords" edge to the CrackedPassword entity by IDs.
func (*TaskUpdate) AddCrackedPasswords ¶
func (tu *TaskUpdate) AddCrackedPasswords(c ...*CrackedPassword) *TaskUpdate
AddCrackedPasswords adds the "cracked_passwords" edges to the CrackedPassword entity.
func (*TaskUpdate) AddNumberCracked ¶
func (tu *TaskUpdate) AddNumberCracked(i int) *TaskUpdate
AddNumberCracked adds i to the "number_cracked" field.
func (*TaskUpdate) AddNumberPasswords ¶
func (tu *TaskUpdate) AddNumberPasswords(i int) *TaskUpdate
AddNumberPasswords adds i to the "number_passwords" field.
func (*TaskUpdate) ClearAssignedToHost ¶
func (tu *TaskUpdate) ClearAssignedToHost() *TaskUpdate
ClearAssignedToHost clears the value of the "assigned_to_host" field.
func (*TaskUpdate) ClearCaseCode ¶
func (tu *TaskUpdate) ClearCaseCode() *TaskUpdate
ClearCaseCode clears the value of the "case_code" field.
func (*TaskUpdate) ClearComment ¶
func (tu *TaskUpdate) ClearComment() *TaskUpdate
ClearComment clears the value of the "comment" field.
func (*TaskUpdate) ClearCrackedPasswords ¶
func (tu *TaskUpdate) ClearCrackedPasswords() *TaskUpdate
ClearCrackedPasswords clears all "cracked_passwords" edges to the CrackedPassword entity.
func (*TaskUpdate) ClearCreatedBy ¶
func (tu *TaskUpdate) ClearCreatedBy() *TaskUpdate
ClearCreatedBy clears the "created_by" edge to the User entity.
func (*TaskUpdate) ClearEnginePayload ¶
func (tu *TaskUpdate) ClearEnginePayload() *TaskUpdate
ClearEnginePayload clears the value of the "engine_payload" field.
func (*TaskUpdate) ClearError ¶
func (tu *TaskUpdate) ClearError() *TaskUpdate
ClearError clears the value of the "error" field.
func (*TaskUpdate) Exec ¶
func (tu *TaskUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskUpdate) ExecX ¶
func (tu *TaskUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpdate) Mutation ¶
func (tu *TaskUpdate) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskUpdate) RemoveCrackedPasswordIDs ¶
func (tu *TaskUpdate) RemoveCrackedPasswordIDs(ids ...uuid.UUID) *TaskUpdate
RemoveCrackedPasswordIDs removes the "cracked_passwords" edge to CrackedPassword entities by IDs.
func (*TaskUpdate) RemoveCrackedPasswords ¶
func (tu *TaskUpdate) RemoveCrackedPasswords(c ...*CrackedPassword) *TaskUpdate
RemoveCrackedPasswords removes "cracked_passwords" edges to CrackedPassword entities.
func (*TaskUpdate) Save ¶
func (tu *TaskUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TaskUpdate) SaveX ¶
func (tu *TaskUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TaskUpdate) SetAssignedToHost ¶
func (tu *TaskUpdate) SetAssignedToHost(s string) *TaskUpdate
SetAssignedToHost sets the "assigned_to_host" field.
func (*TaskUpdate) SetCaseCode ¶
func (tu *TaskUpdate) SetCaseCode(s string) *TaskUpdate
SetCaseCode sets the "case_code" field.
func (*TaskUpdate) SetComment ¶
func (tu *TaskUpdate) SetComment(s string) *TaskUpdate
SetComment sets the "comment" field.
func (*TaskUpdate) SetCreatedBy ¶
func (tu *TaskUpdate) SetCreatedBy(u *User) *TaskUpdate
SetCreatedBy sets the "created_by" edge to the User entity.
func (*TaskUpdate) SetCreatedByID ¶
func (tu *TaskUpdate) SetCreatedByID(id uuid.UUID) *TaskUpdate
SetCreatedByID sets the "created_by" edge to the User entity by ID.
func (*TaskUpdate) SetEnginePayload ¶
func (tu *TaskUpdate) SetEnginePayload(m map[string]interface{}) *TaskUpdate
SetEnginePayload sets the "engine_payload" field.
func (*TaskUpdate) SetError ¶
func (tu *TaskUpdate) SetError(s string) *TaskUpdate
SetError sets the "error" field.
func (*TaskUpdate) SetName ¶
func (tu *TaskUpdate) SetName(s string) *TaskUpdate
SetName sets the "name" field.
func (*TaskUpdate) SetNillableAssignedToHost ¶
func (tu *TaskUpdate) SetNillableAssignedToHost(s *string) *TaskUpdate
SetNillableAssignedToHost sets the "assigned_to_host" field if the given value is not nil.
func (*TaskUpdate) SetNillableCaseCode ¶
func (tu *TaskUpdate) SetNillableCaseCode(s *string) *TaskUpdate
SetNillableCaseCode sets the "case_code" field if the given value is not nil.
func (*TaskUpdate) SetNillableComment ¶
func (tu *TaskUpdate) SetNillableComment(s *string) *TaskUpdate
SetNillableComment sets the "comment" field if the given value is not nil.
func (*TaskUpdate) SetNillableError ¶
func (tu *TaskUpdate) SetNillableError(s *string) *TaskUpdate
SetNillableError sets the "error" field if the given value is not nil.
func (*TaskUpdate) SetNillableNumberCracked ¶
func (tu *TaskUpdate) SetNillableNumberCracked(i *int) *TaskUpdate
SetNillableNumberCracked sets the "number_cracked" field if the given value is not nil.
func (*TaskUpdate) SetNillableNumberPasswords ¶
func (tu *TaskUpdate) SetNillableNumberPasswords(i *int) *TaskUpdate
SetNillableNumberPasswords sets the "number_passwords" field if the given value is not nil.
func (*TaskUpdate) SetNumberCracked ¶
func (tu *TaskUpdate) SetNumberCracked(i int) *TaskUpdate
SetNumberCracked sets the "number_cracked" field.
func (*TaskUpdate) SetNumberPasswords ¶
func (tu *TaskUpdate) SetNumberPasswords(i int) *TaskUpdate
SetNumberPasswords sets the "number_passwords" field.
func (*TaskUpdate) SetStatus ¶
func (tu *TaskUpdate) SetStatus(os oldschema.TaskStatus) *TaskUpdate
SetStatus sets the "status" field.
func (*TaskUpdate) Where ¶
func (tu *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate
Where appends a list predicates to the TaskUpdate builder.
type TaskUpdateOne ¶
type TaskUpdateOne struct {
// contains filtered or unexported fields
}
TaskUpdateOne is the builder for updating a single Task entity.
func (*TaskUpdateOne) AddCrackedPasswordIDs ¶
func (tuo *TaskUpdateOne) AddCrackedPasswordIDs(ids ...uuid.UUID) *TaskUpdateOne
AddCrackedPasswordIDs adds the "cracked_passwords" edge to the CrackedPassword entity by IDs.
func (*TaskUpdateOne) AddCrackedPasswords ¶
func (tuo *TaskUpdateOne) AddCrackedPasswords(c ...*CrackedPassword) *TaskUpdateOne
AddCrackedPasswords adds the "cracked_passwords" edges to the CrackedPassword entity.
func (*TaskUpdateOne) AddNumberCracked ¶
func (tuo *TaskUpdateOne) AddNumberCracked(i int) *TaskUpdateOne
AddNumberCracked adds i to the "number_cracked" field.
func (*TaskUpdateOne) AddNumberPasswords ¶
func (tuo *TaskUpdateOne) AddNumberPasswords(i int) *TaskUpdateOne
AddNumberPasswords adds i to the "number_passwords" field.
func (*TaskUpdateOne) ClearAssignedToHost ¶
func (tuo *TaskUpdateOne) ClearAssignedToHost() *TaskUpdateOne
ClearAssignedToHost clears the value of the "assigned_to_host" field.
func (*TaskUpdateOne) ClearCaseCode ¶
func (tuo *TaskUpdateOne) ClearCaseCode() *TaskUpdateOne
ClearCaseCode clears the value of the "case_code" field.
func (*TaskUpdateOne) ClearComment ¶
func (tuo *TaskUpdateOne) ClearComment() *TaskUpdateOne
ClearComment clears the value of the "comment" field.
func (*TaskUpdateOne) ClearCrackedPasswords ¶
func (tuo *TaskUpdateOne) ClearCrackedPasswords() *TaskUpdateOne
ClearCrackedPasswords clears all "cracked_passwords" edges to the CrackedPassword entity.
func (*TaskUpdateOne) ClearCreatedBy ¶
func (tuo *TaskUpdateOne) ClearCreatedBy() *TaskUpdateOne
ClearCreatedBy clears the "created_by" edge to the User entity.
func (*TaskUpdateOne) ClearEnginePayload ¶
func (tuo *TaskUpdateOne) ClearEnginePayload() *TaskUpdateOne
ClearEnginePayload clears the value of the "engine_payload" field.
func (*TaskUpdateOne) ClearError ¶
func (tuo *TaskUpdateOne) ClearError() *TaskUpdateOne
ClearError clears the value of the "error" field.
func (*TaskUpdateOne) Exec ¶
func (tuo *TaskUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TaskUpdateOne) ExecX ¶
func (tuo *TaskUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpdateOne) Mutation ¶
func (tuo *TaskUpdateOne) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskUpdateOne) RemoveCrackedPasswordIDs ¶
func (tuo *TaskUpdateOne) RemoveCrackedPasswordIDs(ids ...uuid.UUID) *TaskUpdateOne
RemoveCrackedPasswordIDs removes the "cracked_passwords" edge to CrackedPassword entities by IDs.
func (*TaskUpdateOne) RemoveCrackedPasswords ¶
func (tuo *TaskUpdateOne) RemoveCrackedPasswords(c ...*CrackedPassword) *TaskUpdateOne
RemoveCrackedPasswords removes "cracked_passwords" edges to CrackedPassword entities.
func (*TaskUpdateOne) Save ¶
func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error)
Save executes the query and returns the updated Task entity.
func (*TaskUpdateOne) SaveX ¶
func (tuo *TaskUpdateOne) SaveX(ctx context.Context) *Task
SaveX is like Save, but panics if an error occurs.
func (*TaskUpdateOne) Select ¶
func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TaskUpdateOne) SetAssignedToHost ¶
func (tuo *TaskUpdateOne) SetAssignedToHost(s string) *TaskUpdateOne
SetAssignedToHost sets the "assigned_to_host" field.
func (*TaskUpdateOne) SetCaseCode ¶
func (tuo *TaskUpdateOne) SetCaseCode(s string) *TaskUpdateOne
SetCaseCode sets the "case_code" field.
func (*TaskUpdateOne) SetComment ¶
func (tuo *TaskUpdateOne) SetComment(s string) *TaskUpdateOne
SetComment sets the "comment" field.
func (*TaskUpdateOne) SetCreatedBy ¶
func (tuo *TaskUpdateOne) SetCreatedBy(u *User) *TaskUpdateOne
SetCreatedBy sets the "created_by" edge to the User entity.
func (*TaskUpdateOne) SetCreatedByID ¶
func (tuo *TaskUpdateOne) SetCreatedByID(id uuid.UUID) *TaskUpdateOne
SetCreatedByID sets the "created_by" edge to the User entity by ID.
func (*TaskUpdateOne) SetEnginePayload ¶
func (tuo *TaskUpdateOne) SetEnginePayload(m map[string]interface{}) *TaskUpdateOne
SetEnginePayload sets the "engine_payload" field.
func (*TaskUpdateOne) SetError ¶
func (tuo *TaskUpdateOne) SetError(s string) *TaskUpdateOne
SetError sets the "error" field.
func (*TaskUpdateOne) SetName ¶
func (tuo *TaskUpdateOne) SetName(s string) *TaskUpdateOne
SetName sets the "name" field.
func (*TaskUpdateOne) SetNillableAssignedToHost ¶
func (tuo *TaskUpdateOne) SetNillableAssignedToHost(s *string) *TaskUpdateOne
SetNillableAssignedToHost sets the "assigned_to_host" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableCaseCode ¶
func (tuo *TaskUpdateOne) SetNillableCaseCode(s *string) *TaskUpdateOne
SetNillableCaseCode sets the "case_code" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableComment ¶
func (tuo *TaskUpdateOne) SetNillableComment(s *string) *TaskUpdateOne
SetNillableComment sets the "comment" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableError ¶
func (tuo *TaskUpdateOne) SetNillableError(s *string) *TaskUpdateOne
SetNillableError sets the "error" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableNumberCracked ¶
func (tuo *TaskUpdateOne) SetNillableNumberCracked(i *int) *TaskUpdateOne
SetNillableNumberCracked sets the "number_cracked" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableNumberPasswords ¶
func (tuo *TaskUpdateOne) SetNillableNumberPasswords(i *int) *TaskUpdateOne
SetNillableNumberPasswords sets the "number_passwords" field if the given value is not nil.
func (*TaskUpdateOne) SetNumberCracked ¶
func (tuo *TaskUpdateOne) SetNumberCracked(i int) *TaskUpdateOne
SetNumberCracked sets the "number_cracked" field.
func (*TaskUpdateOne) SetNumberPasswords ¶
func (tuo *TaskUpdateOne) SetNumberPasswords(i int) *TaskUpdateOne
SetNumberPasswords sets the "number_passwords" field.
func (*TaskUpdateOne) SetStatus ¶
func (tuo *TaskUpdateOne) SetStatus(os oldschema.TaskStatus) *TaskUpdateOne
SetStatus sets the "status" field.
type TaskUpsert ¶
TaskUpsert is the "OnConflict" setter.
func (*TaskUpsert) AddNumberCracked ¶
func (u *TaskUpsert) AddNumberCracked(v int) *TaskUpsert
AddNumberCracked adds v to the "number_cracked" field.
func (*TaskUpsert) AddNumberPasswords ¶
func (u *TaskUpsert) AddNumberPasswords(v int) *TaskUpsert
AddNumberPasswords adds v to the "number_passwords" field.
func (*TaskUpsert) ClearAssignedToHost ¶
func (u *TaskUpsert) ClearAssignedToHost() *TaskUpsert
ClearAssignedToHost clears the value of the "assigned_to_host" field.
func (*TaskUpsert) ClearCaseCode ¶
func (u *TaskUpsert) ClearCaseCode() *TaskUpsert
ClearCaseCode clears the value of the "case_code" field.
func (*TaskUpsert) ClearComment ¶
func (u *TaskUpsert) ClearComment() *TaskUpsert
ClearComment clears the value of the "comment" field.
func (*TaskUpsert) ClearEnginePayload ¶
func (u *TaskUpsert) ClearEnginePayload() *TaskUpsert
ClearEnginePayload clears the value of the "engine_payload" field.
func (*TaskUpsert) ClearError ¶
func (u *TaskUpsert) ClearError() *TaskUpsert
ClearError clears the value of the "error" field.
func (*TaskUpsert) SetAssignedToHost ¶
func (u *TaskUpsert) SetAssignedToHost(v string) *TaskUpsert
SetAssignedToHost sets the "assigned_to_host" field.
func (*TaskUpsert) SetCaseCode ¶
func (u *TaskUpsert) SetCaseCode(v string) *TaskUpsert
SetCaseCode sets the "case_code" field.
func (*TaskUpsert) SetComment ¶
func (u *TaskUpsert) SetComment(v string) *TaskUpsert
SetComment sets the "comment" field.
func (*TaskUpsert) SetCreatedAt ¶
func (u *TaskUpsert) SetCreatedAt(v time.Time) *TaskUpsert
SetCreatedAt sets the "created_at" field.
func (*TaskUpsert) SetEnginePayload ¶
func (u *TaskUpsert) SetEnginePayload(v map[string]interface{}) *TaskUpsert
SetEnginePayload sets the "engine_payload" field.
func (*TaskUpsert) SetError ¶
func (u *TaskUpsert) SetError(v string) *TaskUpsert
SetError sets the "error" field.
func (*TaskUpsert) SetLastUpdatedAt ¶
func (u *TaskUpsert) SetLastUpdatedAt(v time.Time) *TaskUpsert
SetLastUpdatedAt sets the "last_updated_at" field.
func (*TaskUpsert) SetName ¶
func (u *TaskUpsert) SetName(v string) *TaskUpsert
SetName sets the "name" field.
func (*TaskUpsert) SetNumberCracked ¶
func (u *TaskUpsert) SetNumberCracked(v int) *TaskUpsert
SetNumberCracked sets the "number_cracked" field.
func (*TaskUpsert) SetNumberPasswords ¶
func (u *TaskUpsert) SetNumberPasswords(v int) *TaskUpsert
SetNumberPasswords sets the "number_passwords" field.
func (*TaskUpsert) SetStatus ¶
func (u *TaskUpsert) SetStatus(v oldschema.TaskStatus) *TaskUpsert
SetStatus sets the "status" field.
func (*TaskUpsert) UpdateAssignedToHost ¶
func (u *TaskUpsert) UpdateAssignedToHost() *TaskUpsert
UpdateAssignedToHost sets the "assigned_to_host" field to the value that was provided on create.
func (*TaskUpsert) UpdateCaseCode ¶
func (u *TaskUpsert) UpdateCaseCode() *TaskUpsert
UpdateCaseCode sets the "case_code" field to the value that was provided on create.
func (*TaskUpsert) UpdateComment ¶
func (u *TaskUpsert) UpdateComment() *TaskUpsert
UpdateComment sets the "comment" field to the value that was provided on create.
func (*TaskUpsert) UpdateCreatedAt ¶
func (u *TaskUpsert) UpdateCreatedAt() *TaskUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*TaskUpsert) UpdateEnginePayload ¶
func (u *TaskUpsert) UpdateEnginePayload() *TaskUpsert
UpdateEnginePayload sets the "engine_payload" field to the value that was provided on create.
func (*TaskUpsert) UpdateError ¶
func (u *TaskUpsert) UpdateError() *TaskUpsert
UpdateError sets the "error" field to the value that was provided on create.
func (*TaskUpsert) UpdateLastUpdatedAt ¶
func (u *TaskUpsert) UpdateLastUpdatedAt() *TaskUpsert
UpdateLastUpdatedAt sets the "last_updated_at" field to the value that was provided on create.
func (*TaskUpsert) UpdateName ¶
func (u *TaskUpsert) UpdateName() *TaskUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*TaskUpsert) UpdateNumberCracked ¶
func (u *TaskUpsert) UpdateNumberCracked() *TaskUpsert
UpdateNumberCracked sets the "number_cracked" field to the value that was provided on create.
func (*TaskUpsert) UpdateNumberPasswords ¶
func (u *TaskUpsert) UpdateNumberPasswords() *TaskUpsert
UpdateNumberPasswords sets the "number_passwords" field to the value that was provided on create.
func (*TaskUpsert) UpdateStatus ¶
func (u *TaskUpsert) UpdateStatus() *TaskUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
type TaskUpsertBulk ¶
type TaskUpsertBulk struct {
// contains filtered or unexported fields
}
TaskUpsertBulk is the builder for "upsert"-ing a bulk of Task nodes.
func (*TaskUpsertBulk) AddNumberCracked ¶
func (u *TaskUpsertBulk) AddNumberCracked(v int) *TaskUpsertBulk
AddNumberCracked adds v to the "number_cracked" field.
func (*TaskUpsertBulk) AddNumberPasswords ¶
func (u *TaskUpsertBulk) AddNumberPasswords(v int) *TaskUpsertBulk
AddNumberPasswords adds v to the "number_passwords" field.
func (*TaskUpsertBulk) ClearAssignedToHost ¶
func (u *TaskUpsertBulk) ClearAssignedToHost() *TaskUpsertBulk
ClearAssignedToHost clears the value of the "assigned_to_host" field.
func (*TaskUpsertBulk) ClearCaseCode ¶
func (u *TaskUpsertBulk) ClearCaseCode() *TaskUpsertBulk
ClearCaseCode clears the value of the "case_code" field.
func (*TaskUpsertBulk) ClearComment ¶
func (u *TaskUpsertBulk) ClearComment() *TaskUpsertBulk
ClearComment clears the value of the "comment" field.
func (*TaskUpsertBulk) ClearEnginePayload ¶
func (u *TaskUpsertBulk) ClearEnginePayload() *TaskUpsertBulk
ClearEnginePayload clears the value of the "engine_payload" field.
func (*TaskUpsertBulk) ClearError ¶
func (u *TaskUpsertBulk) ClearError() *TaskUpsertBulk
ClearError clears the value of the "error" field.
func (*TaskUpsertBulk) DoNothing ¶
func (u *TaskUpsertBulk) DoNothing() *TaskUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TaskUpsertBulk) Exec ¶
func (u *TaskUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskUpsertBulk) ExecX ¶
func (u *TaskUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpsertBulk) Ignore ¶
func (u *TaskUpsertBulk) Ignore() *TaskUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Task.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TaskUpsertBulk) SetAssignedToHost ¶
func (u *TaskUpsertBulk) SetAssignedToHost(v string) *TaskUpsertBulk
SetAssignedToHost sets the "assigned_to_host" field.
func (*TaskUpsertBulk) SetCaseCode ¶
func (u *TaskUpsertBulk) SetCaseCode(v string) *TaskUpsertBulk
SetCaseCode sets the "case_code" field.
func (*TaskUpsertBulk) SetComment ¶
func (u *TaskUpsertBulk) SetComment(v string) *TaskUpsertBulk
SetComment sets the "comment" field.
func (*TaskUpsertBulk) SetCreatedAt ¶
func (u *TaskUpsertBulk) SetCreatedAt(v time.Time) *TaskUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*TaskUpsertBulk) SetEnginePayload ¶
func (u *TaskUpsertBulk) SetEnginePayload(v map[string]interface{}) *TaskUpsertBulk
SetEnginePayload sets the "engine_payload" field.
func (*TaskUpsertBulk) SetError ¶
func (u *TaskUpsertBulk) SetError(v string) *TaskUpsertBulk
SetError sets the "error" field.
func (*TaskUpsertBulk) SetLastUpdatedAt ¶
func (u *TaskUpsertBulk) SetLastUpdatedAt(v time.Time) *TaskUpsertBulk
SetLastUpdatedAt sets the "last_updated_at" field.
func (*TaskUpsertBulk) SetName ¶
func (u *TaskUpsertBulk) SetName(v string) *TaskUpsertBulk
SetName sets the "name" field.
func (*TaskUpsertBulk) SetNumberCracked ¶
func (u *TaskUpsertBulk) SetNumberCracked(v int) *TaskUpsertBulk
SetNumberCracked sets the "number_cracked" field.
func (*TaskUpsertBulk) SetNumberPasswords ¶
func (u *TaskUpsertBulk) SetNumberPasswords(v int) *TaskUpsertBulk
SetNumberPasswords sets the "number_passwords" field.
func (*TaskUpsertBulk) SetStatus ¶
func (u *TaskUpsertBulk) SetStatus(v oldschema.TaskStatus) *TaskUpsertBulk
SetStatus sets the "status" field.
func (*TaskUpsertBulk) Update ¶
func (u *TaskUpsertBulk) Update(set func(*TaskUpsert)) *TaskUpsertBulk
Update allows overriding fields `UPDATE` values. See the TaskCreateBulk.OnConflict documentation for more info.
func (*TaskUpsertBulk) UpdateAssignedToHost ¶
func (u *TaskUpsertBulk) UpdateAssignedToHost() *TaskUpsertBulk
UpdateAssignedToHost sets the "assigned_to_host" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateCaseCode ¶
func (u *TaskUpsertBulk) UpdateCaseCode() *TaskUpsertBulk
UpdateCaseCode sets the "case_code" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateComment ¶
func (u *TaskUpsertBulk) UpdateComment() *TaskUpsertBulk
UpdateComment sets the "comment" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateCreatedAt ¶
func (u *TaskUpsertBulk) UpdateCreatedAt() *TaskUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateEnginePayload ¶
func (u *TaskUpsertBulk) UpdateEnginePayload() *TaskUpsertBulk
UpdateEnginePayload sets the "engine_payload" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateError ¶
func (u *TaskUpsertBulk) UpdateError() *TaskUpsertBulk
UpdateError sets the "error" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateLastUpdatedAt ¶
func (u *TaskUpsertBulk) UpdateLastUpdatedAt() *TaskUpsertBulk
UpdateLastUpdatedAt sets the "last_updated_at" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateName ¶
func (u *TaskUpsertBulk) UpdateName() *TaskUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateNewValues ¶
func (u *TaskUpsertBulk) UpdateNewValues() *TaskUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Task.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(task.FieldID) }), ). Exec(ctx)
func (*TaskUpsertBulk) UpdateNumberCracked ¶
func (u *TaskUpsertBulk) UpdateNumberCracked() *TaskUpsertBulk
UpdateNumberCracked sets the "number_cracked" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateNumberPasswords ¶
func (u *TaskUpsertBulk) UpdateNumberPasswords() *TaskUpsertBulk
UpdateNumberPasswords sets the "number_passwords" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateStatus ¶
func (u *TaskUpsertBulk) UpdateStatus() *TaskUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
type TaskUpsertOne ¶
type TaskUpsertOne struct {
// contains filtered or unexported fields
}
TaskUpsertOne is the builder for "upsert"-ing
one Task node.
func (*TaskUpsertOne) AddNumberCracked ¶
func (u *TaskUpsertOne) AddNumberCracked(v int) *TaskUpsertOne
AddNumberCracked adds v to the "number_cracked" field.
func (*TaskUpsertOne) AddNumberPasswords ¶
func (u *TaskUpsertOne) AddNumberPasswords(v int) *TaskUpsertOne
AddNumberPasswords adds v to the "number_passwords" field.
func (*TaskUpsertOne) ClearAssignedToHost ¶
func (u *TaskUpsertOne) ClearAssignedToHost() *TaskUpsertOne
ClearAssignedToHost clears the value of the "assigned_to_host" field.
func (*TaskUpsertOne) ClearCaseCode ¶
func (u *TaskUpsertOne) ClearCaseCode() *TaskUpsertOne
ClearCaseCode clears the value of the "case_code" field.
func (*TaskUpsertOne) ClearComment ¶
func (u *TaskUpsertOne) ClearComment() *TaskUpsertOne
ClearComment clears the value of the "comment" field.
func (*TaskUpsertOne) ClearEnginePayload ¶
func (u *TaskUpsertOne) ClearEnginePayload() *TaskUpsertOne
ClearEnginePayload clears the value of the "engine_payload" field.
func (*TaskUpsertOne) ClearError ¶
func (u *TaskUpsertOne) ClearError() *TaskUpsertOne
ClearError clears the value of the "error" field.
func (*TaskUpsertOne) DoNothing ¶
func (u *TaskUpsertOne) DoNothing() *TaskUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TaskUpsertOne) Exec ¶
func (u *TaskUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskUpsertOne) ExecX ¶
func (u *TaskUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpsertOne) IDX ¶
func (u *TaskUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*TaskUpsertOne) Ignore ¶
func (u *TaskUpsertOne) Ignore() *TaskUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Task.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TaskUpsertOne) SetAssignedToHost ¶
func (u *TaskUpsertOne) SetAssignedToHost(v string) *TaskUpsertOne
SetAssignedToHost sets the "assigned_to_host" field.
func (*TaskUpsertOne) SetCaseCode ¶
func (u *TaskUpsertOne) SetCaseCode(v string) *TaskUpsertOne
SetCaseCode sets the "case_code" field.
func (*TaskUpsertOne) SetComment ¶
func (u *TaskUpsertOne) SetComment(v string) *TaskUpsertOne
SetComment sets the "comment" field.
func (*TaskUpsertOne) SetCreatedAt ¶
func (u *TaskUpsertOne) SetCreatedAt(v time.Time) *TaskUpsertOne
SetCreatedAt sets the "created_at" field.
func (*TaskUpsertOne) SetEnginePayload ¶
func (u *TaskUpsertOne) SetEnginePayload(v map[string]interface{}) *TaskUpsertOne
SetEnginePayload sets the "engine_payload" field.
func (*TaskUpsertOne) SetError ¶
func (u *TaskUpsertOne) SetError(v string) *TaskUpsertOne
SetError sets the "error" field.
func (*TaskUpsertOne) SetLastUpdatedAt ¶
func (u *TaskUpsertOne) SetLastUpdatedAt(v time.Time) *TaskUpsertOne
SetLastUpdatedAt sets the "last_updated_at" field.
func (*TaskUpsertOne) SetName ¶
func (u *TaskUpsertOne) SetName(v string) *TaskUpsertOne
SetName sets the "name" field.
func (*TaskUpsertOne) SetNumberCracked ¶
func (u *TaskUpsertOne) SetNumberCracked(v int) *TaskUpsertOne
SetNumberCracked sets the "number_cracked" field.
func (*TaskUpsertOne) SetNumberPasswords ¶
func (u *TaskUpsertOne) SetNumberPasswords(v int) *TaskUpsertOne
SetNumberPasswords sets the "number_passwords" field.
func (*TaskUpsertOne) SetStatus ¶
func (u *TaskUpsertOne) SetStatus(v oldschema.TaskStatus) *TaskUpsertOne
SetStatus sets the "status" field.
func (*TaskUpsertOne) Update ¶
func (u *TaskUpsertOne) Update(set func(*TaskUpsert)) *TaskUpsertOne
Update allows overriding fields `UPDATE` values. See the TaskCreate.OnConflict documentation for more info.
func (*TaskUpsertOne) UpdateAssignedToHost ¶
func (u *TaskUpsertOne) UpdateAssignedToHost() *TaskUpsertOne
UpdateAssignedToHost sets the "assigned_to_host" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateCaseCode ¶
func (u *TaskUpsertOne) UpdateCaseCode() *TaskUpsertOne
UpdateCaseCode sets the "case_code" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateComment ¶
func (u *TaskUpsertOne) UpdateComment() *TaskUpsertOne
UpdateComment sets the "comment" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateCreatedAt ¶
func (u *TaskUpsertOne) UpdateCreatedAt() *TaskUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateEnginePayload ¶
func (u *TaskUpsertOne) UpdateEnginePayload() *TaskUpsertOne
UpdateEnginePayload sets the "engine_payload" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateError ¶
func (u *TaskUpsertOne) UpdateError() *TaskUpsertOne
UpdateError sets the "error" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateLastUpdatedAt ¶
func (u *TaskUpsertOne) UpdateLastUpdatedAt() *TaskUpsertOne
UpdateLastUpdatedAt sets the "last_updated_at" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateName ¶
func (u *TaskUpsertOne) UpdateName() *TaskUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateNewValues ¶
func (u *TaskUpsertOne) UpdateNewValues() *TaskUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Task.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(task.FieldID) }), ). Exec(ctx)
func (*TaskUpsertOne) UpdateNumberCracked ¶
func (u *TaskUpsertOne) UpdateNumberCracked() *TaskUpsertOne
UpdateNumberCracked sets the "number_cracked" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateNumberPasswords ¶
func (u *TaskUpsertOne) UpdateNumberPasswords() *TaskUpsertOne
UpdateNumberPasswords sets the "number_passwords" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateStatus ¶
func (u *TaskUpsertOne) UpdateStatus() *TaskUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
type Tx ¶
type Tx struct { // CrackedPassword is the client for interacting with the CrackedPassword builders. CrackedPassword *CrackedPasswordClient // Task is the client for interacting with the Task builders. Task *TaskClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Enabled holds the value of the "enabled" field. Enabled bool `json:"enabled,omitempty"` // EmailAddress holds the value of the "email_address" field. EmailAddress string `json:"email_address,omitempty"` // IsSuperUser holds the value of the "is_super_user" field. IsSuperUser bool `json:"is_super_user,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryCreatedTasks ¶
QueryCreatedTasks queries the "created_tasks" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a create builder for User.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryCreatedTasks ¶
func (c *UserClient) QueryCreatedTasks(u *User) *TaskQuery
QueryCreatedTasks queries the created_tasks edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddCreatedTaskIDs ¶
func (uc *UserCreate) AddCreatedTaskIDs(ids ...uuid.UUID) *UserCreate
AddCreatedTaskIDs adds the "created_tasks" edge to the Task entity by IDs.
func (*UserCreate) AddCreatedTasks ¶
func (uc *UserCreate) AddCreatedTasks(t ...*Task) *UserCreate
AddCreatedTasks adds the "created_tasks" edges to the Task entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetUsername(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetUsername(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetEmailAddress ¶
func (uc *UserCreate) SetEmailAddress(s string) *UserCreate
SetEmailAddress sets the "email_address" field.
func (*UserCreate) SetEnabled ¶
func (uc *UserCreate) SetEnabled(b bool) *UserCreate
SetEnabled sets the "enabled" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIsSuperUser ¶
func (uc *UserCreate) SetIsSuperUser(b bool) *UserCreate
SetIsSuperUser sets the "is_super_user" field.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetUsername(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEdges ¶
type UserEdges struct { // CreatedTasks holds the value of the created_tasks edge. CreatedTasks []*Task `json:"created_tasks,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) CreatedTasksOrErr ¶
CreatedTasksOrErr returns the CreatedTasks value or an error if the edge was not loaded in eager-loading.
type UserFilter ¶
type UserFilter struct {
// contains filtered or unexported fields
}
UserFilter provides a generic filtering capability at runtime for UserQuery.
func (*UserFilter) Where ¶
func (f *UserFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*UserFilter) WhereCreatedAt ¶
func (f *UserFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*UserFilter) WhereEmailAddress ¶
func (f *UserFilter) WhereEmailAddress(p entql.StringP)
WhereEmailAddress applies the entql string predicate on the email_address field.
func (*UserFilter) WhereEnabled ¶
func (f *UserFilter) WhereEnabled(p entql.BoolP)
WhereEnabled applies the entql bool predicate on the enabled field.
func (*UserFilter) WhereHasCreatedTasks ¶
func (f *UserFilter) WhereHasCreatedTasks()
WhereHasCreatedTasks applies a predicate to check if query has an edge created_tasks.
func (*UserFilter) WhereHasCreatedTasksWith ¶
func (f *UserFilter) WhereHasCreatedTasksWith(preds ...predicate.Task)
WhereHasCreatedTasksWith applies a predicate to check if query has an edge created_tasks with a given conditions (other predicates).
func (*UserFilter) WhereID ¶
func (f *UserFilter) WhereID(p entql.ValueP)
WhereID applies the entql [16]byte predicate on the id field.
func (*UserFilter) WhereIsSuperUser ¶
func (f *UserFilter) WhereIsSuperUser(p entql.BoolP)
WhereIsSuperUser applies the entql bool predicate on the is_super_user field.
func (*UserFilter) WhereUsername ¶
func (f *UserFilter) WhereUsername(p entql.StringP)
WhereUsername applies the entql string predicate on the username field.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) BoolX ¶
func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserGroupBy) Bools ¶
func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) BoolsX ¶
func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserGroupBy) Float64 ¶
func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) Float64X ¶
func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserGroupBy) Float64s ¶
func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) Float64sX ¶
func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupBy) Int ¶
func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) IntX ¶
func (ugb *UserGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserGroupBy) Ints ¶
func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) IntsX ¶
func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupBy) ScanX ¶
func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserGroupBy) String ¶
func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) StringX ¶
func (ugb *UserGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddCreatedTaskIDs ¶
func (m *UserMutation) AddCreatedTaskIDs(ids ...uuid.UUID)
AddCreatedTaskIDs adds the "created_tasks" edge to the Task entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearCreatedTasks ¶
func (m *UserMutation) ClearCreatedTasks()
ClearCreatedTasks clears the "created_tasks" edge to the Task entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) CreatedTasksCleared ¶
func (m *UserMutation) CreatedTasksCleared() bool
CreatedTasksCleared reports if the "created_tasks" edge to the Task entity was cleared.
func (*UserMutation) CreatedTasksIDs ¶
func (m *UserMutation) CreatedTasksIDs() (ids []uuid.UUID)
CreatedTasksIDs returns the "created_tasks" edge IDs in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) EmailAddress ¶
func (m *UserMutation) EmailAddress() (r string, exists bool)
EmailAddress returns the value of the "email_address" field in the mutation.
func (*UserMutation) Enabled ¶
func (m *UserMutation) Enabled() (r bool, exists bool)
Enabled returns the value of the "enabled" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) Filter ¶
func (m *UserMutation) Filter() *UserFilter
Filter returns an entql.Where implementation to apply filters on the UserMutation builder.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) IsSuperUser ¶
func (m *UserMutation) IsSuperUser() (r bool, exists bool)
IsSuperUser returns the value of the "is_super_user" field in the mutation.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmailAddress ¶
func (m *UserMutation) OldEmailAddress(ctx context.Context) (v string, err error)
OldEmailAddress returns the old "email_address" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEnabled ¶
func (m *UserMutation) OldEnabled(ctx context.Context) (v bool, err error)
OldEnabled returns the old "enabled" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldIsSuperUser ¶
func (m *UserMutation) OldIsSuperUser(ctx context.Context) (v bool, err error)
OldIsSuperUser returns the old "is_super_user" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) RemoveCreatedTaskIDs ¶
func (m *UserMutation) RemoveCreatedTaskIDs(ids ...uuid.UUID)
RemoveCreatedTaskIDs removes the "created_tasks" edge to the Task entity by IDs.
func (*UserMutation) RemovedCreatedTasksIDs ¶
func (m *UserMutation) RemovedCreatedTasksIDs() (ids []uuid.UUID)
RemovedCreatedTasks returns the removed IDs of the "created_tasks" edge to the Task entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetCreatedTasks ¶
func (m *UserMutation) ResetCreatedTasks()
ResetCreatedTasks resets all changes to the "created_tasks" edge.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmailAddress ¶
func (m *UserMutation) ResetEmailAddress()
ResetEmailAddress resets all changes to the "email_address" field.
func (*UserMutation) ResetEnabled ¶
func (m *UserMutation) ResetEnabled()
ResetEnabled resets all changes to the "enabled" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetIsSuperUser ¶
func (m *UserMutation) ResetIsSuperUser()
ResetIsSuperUser resets all changes to the "is_super_user" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetEmailAddress ¶
func (m *UserMutation) SetEmailAddress(s string)
SetEmailAddress sets the "email_address" field.
func (*UserMutation) SetEnabled ¶
func (m *UserMutation) SetEnabled(b bool)
SetEnabled sets the "enabled" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetIsSuperUser ¶
func (m *UserMutation) SetIsSuperUser(b bool)
SetIsSuperUser sets the "is_super_user" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) Filter ¶
func (uq *UserQuery) Filter() *UserFilter
Filter returns a Filter implementation to apply filters on the UserQuery builder.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Username string `json:"username,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldUsername). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Modify ¶
func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one User entity is not found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when exactly one User ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryCreatedTasks ¶
QueryCreatedTasks chains the current query on the "created_tasks" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Username string `json:"username,omitempty"` } client.User.Query(). Select(user.FieldUsername). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithCreatedTasks ¶
WithCreatedTasks tells the query-builder to eager-load the nodes that are connected to the "created_tasks" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolX ¶
func (us *UserSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSelect) Bools ¶
func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolsX ¶
func (us *UserSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSelect) Float64 ¶
func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64X ¶
func (us *UserSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSelect) Float64s ¶
func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64sX ¶
func (us *UserSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSelect) Int ¶
func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntX ¶
func (us *UserSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSelect) Ints ¶
func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntsX ¶
func (us *UserSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSelect) Modify ¶
func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) ScanX ¶
func (us *UserSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSelect) String ¶
func (us *UserSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserSelect) StringX ¶
func (us *UserSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddCreatedTaskIDs ¶
func (uu *UserUpdate) AddCreatedTaskIDs(ids ...uuid.UUID) *UserUpdate
AddCreatedTaskIDs adds the "created_tasks" edge to the Task entity by IDs.
func (*UserUpdate) AddCreatedTasks ¶
func (uu *UserUpdate) AddCreatedTasks(t ...*Task) *UserUpdate
AddCreatedTasks adds the "created_tasks" edges to the Task entity.
func (*UserUpdate) ClearCreatedTasks ¶
func (uu *UserUpdate) ClearCreatedTasks() *UserUpdate
ClearCreatedTasks clears all "created_tasks" edges to the Task entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveCreatedTaskIDs ¶
func (uu *UserUpdate) RemoveCreatedTaskIDs(ids ...uuid.UUID) *UserUpdate
RemoveCreatedTaskIDs removes the "created_tasks" edge to Task entities by IDs.
func (*UserUpdate) RemoveCreatedTasks ¶
func (uu *UserUpdate) RemoveCreatedTasks(t ...*Task) *UserUpdate
RemoveCreatedTasks removes "created_tasks" edges to Task entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetEmailAddress ¶
func (uu *UserUpdate) SetEmailAddress(s string) *UserUpdate
SetEmailAddress sets the "email_address" field.
func (*UserUpdate) SetEnabled ¶
func (uu *UserUpdate) SetEnabled(b bool) *UserUpdate
SetEnabled sets the "enabled" field.
func (*UserUpdate) SetIsSuperUser ¶
func (uu *UserUpdate) SetIsSuperUser(b bool) *UserUpdate
SetIsSuperUser sets the "is_super_user" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddCreatedTaskIDs ¶
func (uuo *UserUpdateOne) AddCreatedTaskIDs(ids ...uuid.UUID) *UserUpdateOne
AddCreatedTaskIDs adds the "created_tasks" edge to the Task entity by IDs.
func (*UserUpdateOne) AddCreatedTasks ¶
func (uuo *UserUpdateOne) AddCreatedTasks(t ...*Task) *UserUpdateOne
AddCreatedTasks adds the "created_tasks" edges to the Task entity.
func (*UserUpdateOne) ClearCreatedTasks ¶
func (uuo *UserUpdateOne) ClearCreatedTasks() *UserUpdateOne
ClearCreatedTasks clears all "created_tasks" edges to the Task entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveCreatedTaskIDs ¶
func (uuo *UserUpdateOne) RemoveCreatedTaskIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveCreatedTaskIDs removes the "created_tasks" edge to Task entities by IDs.
func (*UserUpdateOne) RemoveCreatedTasks ¶
func (uuo *UserUpdateOne) RemoveCreatedTasks(t ...*Task) *UserUpdateOne
RemoveCreatedTasks removes "created_tasks" edges to Task entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetEmailAddress ¶
func (uuo *UserUpdateOne) SetEmailAddress(s string) *UserUpdateOne
SetEmailAddress sets the "email_address" field.
func (*UserUpdateOne) SetEnabled ¶
func (uuo *UserUpdateOne) SetEnabled(b bool) *UserUpdateOne
SetEnabled sets the "enabled" field.
func (*UserUpdateOne) SetIsSuperUser ¶
func (uuo *UserUpdateOne) SetIsSuperUser(b bool) *UserUpdateOne
SetIsSuperUser sets the "is_super_user" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) SetCreatedAt ¶
func (u *UserUpsert) SetCreatedAt(v time.Time) *UserUpsert
SetCreatedAt sets the "created_at" field.
func (*UserUpsert) SetEmailAddress ¶
func (u *UserUpsert) SetEmailAddress(v string) *UserUpsert
SetEmailAddress sets the "email_address" field.
func (*UserUpsert) SetEnabled ¶
func (u *UserUpsert) SetEnabled(v bool) *UserUpsert
SetEnabled sets the "enabled" field.
func (*UserUpsert) SetIsSuperUser ¶
func (u *UserUpsert) SetIsSuperUser(v bool) *UserUpsert
SetIsSuperUser sets the "is_super_user" field.
func (*UserUpsert) SetUsername ¶
func (u *UserUpsert) SetUsername(v string) *UserUpsert
SetUsername sets the "username" field.
func (*UserUpsert) UpdateCreatedAt ¶
func (u *UserUpsert) UpdateCreatedAt() *UserUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsert) UpdateEmailAddress ¶
func (u *UserUpsert) UpdateEmailAddress() *UserUpsert
UpdateEmailAddress sets the "email_address" field to the value that was provided on create.
func (*UserUpsert) UpdateEnabled ¶
func (u *UserUpsert) UpdateEnabled() *UserUpsert
UpdateEnabled sets the "enabled" field to the value that was provided on create.
func (*UserUpsert) UpdateIsSuperUser ¶
func (u *UserUpsert) UpdateIsSuperUser() *UserUpsert
UpdateIsSuperUser sets the "is_super_user" field to the value that was provided on create.
func (*UserUpsert) UpdateUsername ¶
func (u *UserUpsert) UpdateUsername() *UserUpsert
UpdateUsername sets the "username" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetCreatedAt ¶
func (u *UserUpsertBulk) SetCreatedAt(v time.Time) *UserUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*UserUpsertBulk) SetEmailAddress ¶
func (u *UserUpsertBulk) SetEmailAddress(v string) *UserUpsertBulk
SetEmailAddress sets the "email_address" field.
func (*UserUpsertBulk) SetEnabled ¶
func (u *UserUpsertBulk) SetEnabled(v bool) *UserUpsertBulk
SetEnabled sets the "enabled" field.
func (*UserUpsertBulk) SetIsSuperUser ¶
func (u *UserUpsertBulk) SetIsSuperUser(v bool) *UserUpsertBulk
SetIsSuperUser sets the "is_super_user" field.
func (*UserUpsertBulk) SetUsername ¶
func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk
SetUsername sets the "username" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateCreatedAt ¶
func (u *UserUpsertBulk) UpdateCreatedAt() *UserUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateEmailAddress ¶
func (u *UserUpsertBulk) UpdateEmailAddress() *UserUpsertBulk
UpdateEmailAddress sets the "email_address" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateEnabled ¶
func (u *UserUpsertBulk) UpdateEnabled() *UserUpsertBulk
UpdateEnabled sets the "enabled" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateIsSuperUser ¶
func (u *UserUpsertBulk) UpdateIsSuperUser() *UserUpsertBulk
UpdateIsSuperUser sets the "is_super_user" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertBulk) UpdateUsername ¶
func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk
UpdateUsername sets the "username" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetCreatedAt ¶
func (u *UserUpsertOne) SetCreatedAt(v time.Time) *UserUpsertOne
SetCreatedAt sets the "created_at" field.
func (*UserUpsertOne) SetEmailAddress ¶
func (u *UserUpsertOne) SetEmailAddress(v string) *UserUpsertOne
SetEmailAddress sets the "email_address" field.
func (*UserUpsertOne) SetEnabled ¶
func (u *UserUpsertOne) SetEnabled(v bool) *UserUpsertOne
SetEnabled sets the "enabled" field.
func (*UserUpsertOne) SetIsSuperUser ¶
func (u *UserUpsertOne) SetIsSuperUser(v bool) *UserUpsertOne
SetIsSuperUser sets the "is_super_user" field.
func (*UserUpsertOne) SetUsername ¶
func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne
SetUsername sets the "username" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateCreatedAt ¶
func (u *UserUpsertOne) UpdateCreatedAt() *UserUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateEmailAddress ¶
func (u *UserUpsertOne) UpdateEmailAddress() *UserUpsertOne
UpdateEmailAddress sets the "email_address" field to the value that was provided on create.
func (*UserUpsertOne) UpdateEnabled ¶
func (u *UserUpsertOne) UpdateEnabled() *UserUpsertOne
UpdateEnabled sets the "enabled" field to the value that was provided on create.
func (*UserUpsertOne) UpdateIsSuperUser ¶
func (u *UserUpsertOne) UpdateIsSuperUser() *UserUpsertOne
UpdateIsSuperUser sets the "is_super_user" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertOne) UpdateUsername ¶
func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne
UpdateUsername sets the "username" field to the value that was provided on create.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- config.go
- context.go
- crackedpassword.go
- crackedpassword_create.go
- crackedpassword_delete.go
- crackedpassword_query.go
- crackedpassword_update.go
- ent.go
- entql.go
- mutation.go
- runtime.go
- task.go
- task_create.go
- task_delete.go
- task_query.go
- task_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go