Documentation
¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(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 Account
- type AccountClient
- func (c *AccountClient) Create() *AccountCreate
- func (c *AccountClient) Delete() *AccountDelete
- func (c *AccountClient) DeleteOne(a *Account) *AccountDeleteOne
- func (c *AccountClient) DeleteOneID(id uuid.UUID) *AccountDeleteOne
- func (c *AccountClient) Get(ctx context.Context, id uuid.UUID) (*Account, error)
- func (c *AccountClient) GetX(ctx context.Context, id uuid.UUID) *Account
- func (c *AccountClient) Hooks() []Hook
- func (c *AccountClient) Query() *AccountQuery
- func (c *AccountClient) QueryOwner(a *Account) *PersonQuery
- func (c *AccountClient) Update() *AccountUpdate
- func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne
- func (c *AccountClient) UpdateOneID(id uuid.UUID) *AccountUpdateOne
- func (c *AccountClient) Use(hooks ...Hook)
- type AccountCreate
- func (ac *AccountCreate) Save(ctx context.Context) (*Account, error)
- func (ac *AccountCreate) SaveX(ctx context.Context) *Account
- func (ac *AccountCreate) SetID(u uuid.UUID) *AccountCreate
- func (ac *AccountCreate) SetNillableOwnerID(id *uuid.UUID) *AccountCreate
- func (ac *AccountCreate) SetNillableSecret(s *string) *AccountCreate
- func (ac *AccountCreate) SetOwner(p *Person) *AccountCreate
- func (ac *AccountCreate) SetOwnerID(id uuid.UUID) *AccountCreate
- func (ac *AccountCreate) SetRemoteID(s string) *AccountCreate
- func (ac *AccountCreate) SetSecret(s string) *AccountCreate
- func (ac *AccountCreate) SetSub(s string) *AccountCreate
- func (ac *AccountCreate) SetType(a account.Type) *AccountCreate
- type AccountDelete
- type AccountDeleteOne
- type AccountEdges
- type AccountGroupBy
- func (agb *AccountGroupBy) Aggregate(fns ...Aggregate) *AccountGroupBy
- func (agb *AccountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (agb *AccountGroupBy) BoolsX(ctx context.Context) []bool
- func (agb *AccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (agb *AccountGroupBy) Float64sX(ctx context.Context) []float64
- func (agb *AccountGroupBy) Ints(ctx context.Context) ([]int, error)
- func (agb *AccountGroupBy) IntsX(ctx context.Context) []int
- func (agb *AccountGroupBy) Scan(ctx context.Context, v interface{}) error
- func (agb *AccountGroupBy) ScanX(ctx context.Context, v interface{})
- func (agb *AccountGroupBy) Strings(ctx context.Context) ([]string, error)
- func (agb *AccountGroupBy) StringsX(ctx context.Context) []string
- type AccountMutation
- func (m *AccountMutation) AddField(name string, value ent.Value) error
- func (m *AccountMutation) AddedEdges() []string
- func (m *AccountMutation) AddedField(name string) (ent.Value, bool)
- func (m *AccountMutation) AddedFields() []string
- func (m *AccountMutation) AddedIDs(name string) []ent.Value
- func (m *AccountMutation) ClearEdge(name string) error
- func (m *AccountMutation) ClearField(name string) error
- func (m *AccountMutation) ClearOwner()
- func (m *AccountMutation) ClearSecret()
- func (m *AccountMutation) ClearedEdges() []string
- func (m *AccountMutation) ClearedFields() []string
- func (m AccountMutation) Client() *Client
- func (m *AccountMutation) EdgeCleared(name string) bool
- func (m *AccountMutation) Field(name string) (ent.Value, bool)
- func (m *AccountMutation) FieldCleared(name string) bool
- func (m *AccountMutation) Fields() []string
- func (m *AccountMutation) GetType() (r account.Type, exists bool)
- func (m *AccountMutation) ID() (id uuid.UUID, exists bool)
- func (m *AccountMutation) Op() Op
- func (m *AccountMutation) OwnerCleared() bool
- func (m *AccountMutation) OwnerID() (id uuid.UUID, exists bool)
- func (m *AccountMutation) OwnerIDs() (ids []uuid.UUID)
- func (m *AccountMutation) RemoteID() (r string, exists bool)
- func (m *AccountMutation) RemovedEdges() []string
- func (m *AccountMutation) RemovedIDs(name string) []ent.Value
- func (m *AccountMutation) ResetEdge(name string) error
- func (m *AccountMutation) ResetField(name string) error
- func (m *AccountMutation) ResetOwner()
- func (m *AccountMutation) ResetRemoteID()
- func (m *AccountMutation) ResetSecret()
- func (m *AccountMutation) ResetSub()
- func (m *AccountMutation) ResetType()
- func (m *AccountMutation) Secret() (r string, exists bool)
- func (m *AccountMutation) SecretCleared() bool
- func (m *AccountMutation) SetField(name string, value ent.Value) error
- func (m *AccountMutation) SetID(id uuid.UUID)
- func (m *AccountMutation) SetOwnerID(id uuid.UUID)
- func (m *AccountMutation) SetRemoteID(s string)
- func (m *AccountMutation) SetSecret(s string)
- func (m *AccountMutation) SetSub(s string)
- func (m *AccountMutation) SetType(a account.Type)
- func (m *AccountMutation) Sub() (r string, exists bool)
- func (m AccountMutation) Tx() (*Tx, error)
- func (m *AccountMutation) Type() string
- type AccountQuery
- func (aq *AccountQuery) All(ctx context.Context) ([]*Account, error)
- func (aq *AccountQuery) AllX(ctx context.Context) []*Account
- func (aq *AccountQuery) Clone() *AccountQuery
- func (aq *AccountQuery) Count(ctx context.Context) (int, error)
- func (aq *AccountQuery) CountX(ctx context.Context) int
- func (aq *AccountQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AccountQuery) ExistX(ctx context.Context) bool
- func (aq *AccountQuery) First(ctx context.Context) (*Account, error)
- func (aq *AccountQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AccountQuery) FirstX(ctx context.Context) *Account
- func (aq *AccountQuery) FirstXID(ctx context.Context) uuid.UUID
- func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy
- func (aq *AccountQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (aq *AccountQuery) IDsX(ctx context.Context) []uuid.UUID
- func (aq *AccountQuery) Limit(limit int) *AccountQuery
- func (aq *AccountQuery) Offset(offset int) *AccountQuery
- func (aq *AccountQuery) Only(ctx context.Context) (*Account, error)
- func (aq *AccountQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AccountQuery) OnlyX(ctx context.Context) *Account
- func (aq *AccountQuery) OnlyXID(ctx context.Context) uuid.UUID
- func (aq *AccountQuery) Order(o ...Order) *AccountQuery
- func (aq *AccountQuery) QueryOwner() *PersonQuery
- func (aq *AccountQuery) Select(field string, fields ...string) *AccountSelect
- func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
- func (aq *AccountQuery) WithOwner(opts ...func(*PersonQuery)) *AccountQuery
- type AccountSelect
- func (as *AccountSelect) Bools(ctx context.Context) ([]bool, error)
- func (as *AccountSelect) BoolsX(ctx context.Context) []bool
- func (as *AccountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (as *AccountSelect) Float64sX(ctx context.Context) []float64
- func (as *AccountSelect) Ints(ctx context.Context) ([]int, error)
- func (as *AccountSelect) IntsX(ctx context.Context) []int
- func (as *AccountSelect) Scan(ctx context.Context, v interface{}) error
- func (as *AccountSelect) ScanX(ctx context.Context, v interface{})
- func (as *AccountSelect) Strings(ctx context.Context) ([]string, error)
- func (as *AccountSelect) StringsX(ctx context.Context) []string
- type AccountUpdate
- func (au *AccountUpdate) ClearOwner() *AccountUpdate
- func (au *AccountUpdate) ClearSecret() *AccountUpdate
- func (au *AccountUpdate) Exec(ctx context.Context) error
- func (au *AccountUpdate) ExecX(ctx context.Context)
- func (au *AccountUpdate) Save(ctx context.Context) (int, error)
- func (au *AccountUpdate) SaveX(ctx context.Context) int
- func (au *AccountUpdate) SetNillableOwnerID(id *uuid.UUID) *AccountUpdate
- func (au *AccountUpdate) SetNillableSecret(s *string) *AccountUpdate
- func (au *AccountUpdate) SetOwner(p *Person) *AccountUpdate
- func (au *AccountUpdate) SetOwnerID(id uuid.UUID) *AccountUpdate
- func (au *AccountUpdate) SetRemoteID(s string) *AccountUpdate
- func (au *AccountUpdate) SetSecret(s string) *AccountUpdate
- func (au *AccountUpdate) SetSub(s string) *AccountUpdate
- func (au *AccountUpdate) SetType(a account.Type) *AccountUpdate
- func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
- type AccountUpdateOne
- func (auo *AccountUpdateOne) ClearOwner() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearSecret() *AccountUpdateOne
- func (auo *AccountUpdateOne) Exec(ctx context.Context) error
- func (auo *AccountUpdateOne) ExecX(ctx context.Context)
- func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)
- func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account
- func (auo *AccountUpdateOne) SetNillableOwnerID(id *uuid.UUID) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableSecret(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetOwner(p *Person) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetOwnerID(id uuid.UUID) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetRemoteID(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetSecret(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetSub(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetType(a account.Type) *AccountUpdateOne
- type Accounts
- type Aggregate
- type Answer
- type AnswerClient
- func (c *AnswerClient) Create() *AnswerCreate
- func (c *AnswerClient) Delete() *AnswerDelete
- func (c *AnswerClient) DeleteOne(a *Answer) *AnswerDeleteOne
- func (c *AnswerClient) DeleteOneID(id uuid.UUID) *AnswerDeleteOne
- func (c *AnswerClient) Get(ctx context.Context, id uuid.UUID) (*Answer, error)
- func (c *AnswerClient) GetX(ctx context.Context, id uuid.UUID) *Answer
- func (c *AnswerClient) Hooks() []Hook
- func (c *AnswerClient) Query() *AnswerQuery
- func (c *AnswerClient) QueryQuestion(a *Answer) *QuestionQuery
- func (c *AnswerClient) Update() *AnswerUpdate
- func (c *AnswerClient) UpdateOne(a *Answer) *AnswerUpdateOne
- func (c *AnswerClient) UpdateOneID(id uuid.UUID) *AnswerUpdateOne
- func (c *AnswerClient) Use(hooks ...Hook)
- type AnswerCreate
- func (ac *AnswerCreate) Save(ctx context.Context) (*Answer, error)
- func (ac *AnswerCreate) SaveX(ctx context.Context) *Answer
- func (ac *AnswerCreate) SetAt(t time.Time) *AnswerCreate
- func (ac *AnswerCreate) SetID(u uuid.UUID) *AnswerCreate
- func (ac *AnswerCreate) SetNillableAt(t *time.Time) *AnswerCreate
- func (ac *AnswerCreate) SetNillableValid(b *bool) *AnswerCreate
- func (ac *AnswerCreate) SetQuestion(q *Question) *AnswerCreate
- func (ac *AnswerCreate) SetQuestionID(id uuid.UUID) *AnswerCreate
- func (ac *AnswerCreate) SetResponses(s []string) *AnswerCreate
- func (ac *AnswerCreate) SetValid(b bool) *AnswerCreate
- type AnswerDelete
- type AnswerDeleteOne
- type AnswerEdges
- type AnswerGroupBy
- func (agb *AnswerGroupBy) Aggregate(fns ...Aggregate) *AnswerGroupBy
- func (agb *AnswerGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (agb *AnswerGroupBy) BoolsX(ctx context.Context) []bool
- func (agb *AnswerGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (agb *AnswerGroupBy) Float64sX(ctx context.Context) []float64
- func (agb *AnswerGroupBy) Ints(ctx context.Context) ([]int, error)
- func (agb *AnswerGroupBy) IntsX(ctx context.Context) []int
- func (agb *AnswerGroupBy) Scan(ctx context.Context, v interface{}) error
- func (agb *AnswerGroupBy) ScanX(ctx context.Context, v interface{})
- func (agb *AnswerGroupBy) Strings(ctx context.Context) ([]string, error)
- func (agb *AnswerGroupBy) StringsX(ctx context.Context) []string
- type AnswerMutation
- func (m *AnswerMutation) AddField(name string, value ent.Value) error
- func (m *AnswerMutation) AddedEdges() []string
- func (m *AnswerMutation) AddedField(name string) (ent.Value, bool)
- func (m *AnswerMutation) AddedFields() []string
- func (m *AnswerMutation) AddedIDs(name string) []ent.Value
- func (m *AnswerMutation) At() (r time.Time, exists bool)
- func (m *AnswerMutation) ClearEdge(name string) error
- func (m *AnswerMutation) ClearField(name string) error
- func (m *AnswerMutation) ClearQuestion()
- func (m *AnswerMutation) ClearValid()
- func (m *AnswerMutation) ClearedEdges() []string
- func (m *AnswerMutation) ClearedFields() []string
- func (m AnswerMutation) Client() *Client
- func (m *AnswerMutation) EdgeCleared(name string) bool
- func (m *AnswerMutation) Field(name string) (ent.Value, bool)
- func (m *AnswerMutation) FieldCleared(name string) bool
- func (m *AnswerMutation) Fields() []string
- func (m *AnswerMutation) ID() (id uuid.UUID, exists bool)
- func (m *AnswerMutation) Op() Op
- func (m *AnswerMutation) QuestionCleared() bool
- func (m *AnswerMutation) QuestionID() (id uuid.UUID, exists bool)
- func (m *AnswerMutation) QuestionIDs() (ids []uuid.UUID)
- func (m *AnswerMutation) RemovedEdges() []string
- func (m *AnswerMutation) RemovedIDs(name string) []ent.Value
- func (m *AnswerMutation) ResetAt()
- func (m *AnswerMutation) ResetEdge(name string) error
- func (m *AnswerMutation) ResetField(name string) error
- func (m *AnswerMutation) ResetQuestion()
- func (m *AnswerMutation) ResetResponses()
- func (m *AnswerMutation) ResetValid()
- func (m *AnswerMutation) Responses() (r []string, exists bool)
- func (m *AnswerMutation) SetAt(t time.Time)
- func (m *AnswerMutation) SetField(name string, value ent.Value) error
- func (m *AnswerMutation) SetID(id uuid.UUID)
- func (m *AnswerMutation) SetQuestionID(id uuid.UUID)
- func (m *AnswerMutation) SetResponses(s []string)
- func (m *AnswerMutation) SetValid(b bool)
- func (m AnswerMutation) Tx() (*Tx, error)
- func (m *AnswerMutation) Type() string
- func (m *AnswerMutation) Valid() (r bool, exists bool)
- func (m *AnswerMutation) ValidCleared() bool
- type AnswerQuery
- func (aq *AnswerQuery) All(ctx context.Context) ([]*Answer, error)
- func (aq *AnswerQuery) AllX(ctx context.Context) []*Answer
- func (aq *AnswerQuery) Clone() *AnswerQuery
- func (aq *AnswerQuery) Count(ctx context.Context) (int, error)
- func (aq *AnswerQuery) CountX(ctx context.Context) int
- func (aq *AnswerQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AnswerQuery) ExistX(ctx context.Context) bool
- func (aq *AnswerQuery) First(ctx context.Context) (*Answer, error)
- func (aq *AnswerQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AnswerQuery) FirstX(ctx context.Context) *Answer
- func (aq *AnswerQuery) FirstXID(ctx context.Context) uuid.UUID
- func (aq *AnswerQuery) GroupBy(field string, fields ...string) *AnswerGroupBy
- func (aq *AnswerQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (aq *AnswerQuery) IDsX(ctx context.Context) []uuid.UUID
- func (aq *AnswerQuery) Limit(limit int) *AnswerQuery
- func (aq *AnswerQuery) Offset(offset int) *AnswerQuery
- func (aq *AnswerQuery) Only(ctx context.Context) (*Answer, error)
- func (aq *AnswerQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AnswerQuery) OnlyX(ctx context.Context) *Answer
- func (aq *AnswerQuery) OnlyXID(ctx context.Context) uuid.UUID
- func (aq *AnswerQuery) Order(o ...Order) *AnswerQuery
- func (aq *AnswerQuery) QueryQuestion() *QuestionQuery
- func (aq *AnswerQuery) Select(field string, fields ...string) *AnswerSelect
- func (aq *AnswerQuery) Where(ps ...predicate.Answer) *AnswerQuery
- func (aq *AnswerQuery) WithQuestion(opts ...func(*QuestionQuery)) *AnswerQuery
- type AnswerSelect
- func (as *AnswerSelect) Bools(ctx context.Context) ([]bool, error)
- func (as *AnswerSelect) BoolsX(ctx context.Context) []bool
- func (as *AnswerSelect) Float64s(ctx context.Context) ([]float64, error)
- func (as *AnswerSelect) Float64sX(ctx context.Context) []float64
- func (as *AnswerSelect) Ints(ctx context.Context) ([]int, error)
- func (as *AnswerSelect) IntsX(ctx context.Context) []int
- func (as *AnswerSelect) Scan(ctx context.Context, v interface{}) error
- func (as *AnswerSelect) ScanX(ctx context.Context, v interface{})
- func (as *AnswerSelect) Strings(ctx context.Context) ([]string, error)
- func (as *AnswerSelect) StringsX(ctx context.Context) []string
- type AnswerUpdate
- func (au *AnswerUpdate) ClearQuestion() *AnswerUpdate
- func (au *AnswerUpdate) ClearValid() *AnswerUpdate
- func (au *AnswerUpdate) Exec(ctx context.Context) error
- func (au *AnswerUpdate) ExecX(ctx context.Context)
- func (au *AnswerUpdate) Save(ctx context.Context) (int, error)
- func (au *AnswerUpdate) SaveX(ctx context.Context) int
- func (au *AnswerUpdate) SetNillableValid(b *bool) *AnswerUpdate
- func (au *AnswerUpdate) SetQuestion(q *Question) *AnswerUpdate
- func (au *AnswerUpdate) SetQuestionID(id uuid.UUID) *AnswerUpdate
- func (au *AnswerUpdate) SetValid(b bool) *AnswerUpdate
- func (au *AnswerUpdate) Where(ps ...predicate.Answer) *AnswerUpdate
- type AnswerUpdateOne
- func (auo *AnswerUpdateOne) ClearQuestion() *AnswerUpdateOne
- func (auo *AnswerUpdateOne) ClearValid() *AnswerUpdateOne
- func (auo *AnswerUpdateOne) Exec(ctx context.Context) error
- func (auo *AnswerUpdateOne) ExecX(ctx context.Context)
- func (auo *AnswerUpdateOne) Save(ctx context.Context) (*Answer, error)
- func (auo *AnswerUpdateOne) SaveX(ctx context.Context) *Answer
- func (auo *AnswerUpdateOne) SetNillableValid(b *bool) *AnswerUpdateOne
- func (auo *AnswerUpdateOne) SetQuestion(q *Question) *AnswerUpdateOne
- func (auo *AnswerUpdateOne) SetQuestionID(id uuid.UUID) *AnswerUpdateOne
- func (auo *AnswerUpdateOne) SetValid(b bool) *AnswerUpdateOne
- type Answers
- type Client
- type ConstraintError
- type Contact
- type ContactClient
- func (c *ContactClient) Create() *ContactCreate
- func (c *ContactClient) Delete() *ContactDelete
- func (c *ContactClient) DeleteOne(co *Contact) *ContactDeleteOne
- func (c *ContactClient) DeleteOneID(id uuid.UUID) *ContactDeleteOne
- func (c *ContactClient) Get(ctx context.Context, id uuid.UUID) (*Contact, error)
- func (c *ContactClient) GetX(ctx context.Context, id uuid.UUID) *Contact
- func (c *ContactClient) Hooks() []Hook
- func (c *ContactClient) Query() *ContactQuery
- func (c *ContactClient) QueryOwner(co *Contact) *PersonQuery
- func (c *ContactClient) Update() *ContactUpdate
- func (c *ContactClient) UpdateOne(co *Contact) *ContactUpdateOne
- func (c *ContactClient) UpdateOneID(id uuid.UUID) *ContactUpdateOne
- func (c *ContactClient) Use(hooks ...Hook)
- type ContactCreate
- func (cc *ContactCreate) Save(ctx context.Context) (*Contact, error)
- func (cc *ContactCreate) SaveX(ctx context.Context) *Contact
- func (cc *ContactCreate) SetFromAccount(b bool) *ContactCreate
- func (cc *ContactCreate) SetID(u uuid.UUID) *ContactCreate
- func (cc *ContactCreate) SetKind(c contact.Kind) *ContactCreate
- func (cc *ContactCreate) SetName(s string) *ContactCreate
- func (cc *ContactCreate) SetNillableFromAccount(b *bool) *ContactCreate
- func (cc *ContactCreate) SetNillableKind(c *contact.Kind) *ContactCreate
- func (cc *ContactCreate) SetOwner(p *Person) *ContactCreate
- func (cc *ContactCreate) SetOwnerID(id uuid.UUID) *ContactCreate
- func (cc *ContactCreate) SetPrincipal(b bool) *ContactCreate
- func (cc *ContactCreate) SetValidated(b bool) *ContactCreate
- func (cc *ContactCreate) SetValue(s string) *ContactCreate
- type ContactDelete
- type ContactDeleteOne
- type ContactEdges
- type ContactGroupBy
- func (cgb *ContactGroupBy) Aggregate(fns ...Aggregate) *ContactGroupBy
- func (cgb *ContactGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (cgb *ContactGroupBy) BoolsX(ctx context.Context) []bool
- func (cgb *ContactGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (cgb *ContactGroupBy) Float64sX(ctx context.Context) []float64
- func (cgb *ContactGroupBy) Ints(ctx context.Context) ([]int, error)
- func (cgb *ContactGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ContactGroupBy) Scan(ctx context.Context, v interface{}) error
- func (cgb *ContactGroupBy) ScanX(ctx context.Context, v interface{})
- func (cgb *ContactGroupBy) Strings(ctx context.Context) ([]string, error)
- func (cgb *ContactGroupBy) StringsX(ctx context.Context) []string
- type ContactMutation
- func (m *ContactMutation) AddField(name string, value ent.Value) error
- func (m *ContactMutation) AddedEdges() []string
- func (m *ContactMutation) AddedField(name string) (ent.Value, bool)
- func (m *ContactMutation) AddedFields() []string
- func (m *ContactMutation) AddedIDs(name string) []ent.Value
- func (m *ContactMutation) ClearEdge(name string) error
- func (m *ContactMutation) ClearField(name string) error
- func (m *ContactMutation) ClearOwner()
- func (m *ContactMutation) ClearedEdges() []string
- func (m *ContactMutation) ClearedFields() []string
- func (m ContactMutation) Client() *Client
- func (m *ContactMutation) EdgeCleared(name string) bool
- func (m *ContactMutation) Field(name string) (ent.Value, bool)
- func (m *ContactMutation) FieldCleared(name string) bool
- func (m *ContactMutation) Fields() []string
- func (m *ContactMutation) FromAccount() (r bool, exists bool)
- func (m *ContactMutation) ID() (id uuid.UUID, exists bool)
- func (m *ContactMutation) Kind() (r contact.Kind, exists bool)
- func (m *ContactMutation) Name() (r string, exists bool)
- func (m *ContactMutation) Op() Op
- func (m *ContactMutation) OwnerCleared() bool
- func (m *ContactMutation) OwnerID() (id uuid.UUID, exists bool)
- func (m *ContactMutation) OwnerIDs() (ids []uuid.UUID)
- func (m *ContactMutation) Principal() (r bool, exists bool)
- func (m *ContactMutation) RemovedEdges() []string
- func (m *ContactMutation) RemovedIDs(name string) []ent.Value
- func (m *ContactMutation) ResetEdge(name string) error
- func (m *ContactMutation) ResetField(name string) error
- func (m *ContactMutation) ResetFromAccount()
- func (m *ContactMutation) ResetKind()
- func (m *ContactMutation) ResetName()
- func (m *ContactMutation) ResetOwner()
- func (m *ContactMutation) ResetPrincipal()
- func (m *ContactMutation) ResetValidated()
- func (m *ContactMutation) ResetValue()
- func (m *ContactMutation) SetField(name string, value ent.Value) error
- func (m *ContactMutation) SetFromAccount(b bool)
- func (m *ContactMutation) SetID(id uuid.UUID)
- func (m *ContactMutation) SetKind(c contact.Kind)
- func (m *ContactMutation) SetName(s string)
- func (m *ContactMutation) SetOwnerID(id uuid.UUID)
- func (m *ContactMutation) SetPrincipal(b bool)
- func (m *ContactMutation) SetValidated(b bool)
- func (m *ContactMutation) SetValue(s string)
- func (m ContactMutation) Tx() (*Tx, error)
- func (m *ContactMutation) Type() string
- func (m *ContactMutation) Validated() (r bool, exists bool)
- func (m *ContactMutation) Value() (r string, exists bool)
- type ContactQuery
- func (cq *ContactQuery) All(ctx context.Context) ([]*Contact, error)
- func (cq *ContactQuery) AllX(ctx context.Context) []*Contact
- func (cq *ContactQuery) Clone() *ContactQuery
- func (cq *ContactQuery) Count(ctx context.Context) (int, error)
- func (cq *ContactQuery) CountX(ctx context.Context) int
- func (cq *ContactQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ContactQuery) ExistX(ctx context.Context) bool
- func (cq *ContactQuery) First(ctx context.Context) (*Contact, error)
- func (cq *ContactQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *ContactQuery) FirstX(ctx context.Context) *Contact
- func (cq *ContactQuery) FirstXID(ctx context.Context) uuid.UUID
- func (cq *ContactQuery) GroupBy(field string, fields ...string) *ContactGroupBy
- func (cq *ContactQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (cq *ContactQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cq *ContactQuery) Limit(limit int) *ContactQuery
- func (cq *ContactQuery) Offset(offset int) *ContactQuery
- func (cq *ContactQuery) Only(ctx context.Context) (*Contact, error)
- func (cq *ContactQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *ContactQuery) OnlyX(ctx context.Context) *Contact
- func (cq *ContactQuery) OnlyXID(ctx context.Context) uuid.UUID
- func (cq *ContactQuery) Order(o ...Order) *ContactQuery
- func (cq *ContactQuery) QueryOwner() *PersonQuery
- func (cq *ContactQuery) Select(field string, fields ...string) *ContactSelect
- func (cq *ContactQuery) Where(ps ...predicate.Contact) *ContactQuery
- func (cq *ContactQuery) WithOwner(opts ...func(*PersonQuery)) *ContactQuery
- type ContactSelect
- func (cs *ContactSelect) Bools(ctx context.Context) ([]bool, error)
- func (cs *ContactSelect) BoolsX(ctx context.Context) []bool
- func (cs *ContactSelect) Float64s(ctx context.Context) ([]float64, error)
- func (cs *ContactSelect) Float64sX(ctx context.Context) []float64
- func (cs *ContactSelect) Ints(ctx context.Context) ([]int, error)
- func (cs *ContactSelect) IntsX(ctx context.Context) []int
- func (cs *ContactSelect) Scan(ctx context.Context, v interface{}) error
- func (cs *ContactSelect) ScanX(ctx context.Context, v interface{})
- func (cs *ContactSelect) Strings(ctx context.Context) ([]string, error)
- func (cs *ContactSelect) StringsX(ctx context.Context) []string
- type ContactUpdate
- func (cu *ContactUpdate) ClearOwner() *ContactUpdate
- func (cu *ContactUpdate) Exec(ctx context.Context) error
- func (cu *ContactUpdate) ExecX(ctx context.Context)
- func (cu *ContactUpdate) Save(ctx context.Context) (int, error)
- func (cu *ContactUpdate) SaveX(ctx context.Context) int
- func (cu *ContactUpdate) SetFromAccount(b bool) *ContactUpdate
- func (cu *ContactUpdate) SetKind(c contact.Kind) *ContactUpdate
- func (cu *ContactUpdate) SetName(s string) *ContactUpdate
- func (cu *ContactUpdate) SetNillableFromAccount(b *bool) *ContactUpdate
- func (cu *ContactUpdate) SetNillableKind(c *contact.Kind) *ContactUpdate
- func (cu *ContactUpdate) SetOwner(p *Person) *ContactUpdate
- func (cu *ContactUpdate) SetOwnerID(id uuid.UUID) *ContactUpdate
- func (cu *ContactUpdate) SetPrincipal(b bool) *ContactUpdate
- func (cu *ContactUpdate) SetValidated(b bool) *ContactUpdate
- func (cu *ContactUpdate) SetValue(s string) *ContactUpdate
- func (cu *ContactUpdate) Where(ps ...predicate.Contact) *ContactUpdate
- type ContactUpdateOne
- func (cuo *ContactUpdateOne) ClearOwner() *ContactUpdateOne
- func (cuo *ContactUpdateOne) Exec(ctx context.Context) error
- func (cuo *ContactUpdateOne) ExecX(ctx context.Context)
- func (cuo *ContactUpdateOne) Save(ctx context.Context) (*Contact, error)
- func (cuo *ContactUpdateOne) SaveX(ctx context.Context) *Contact
- func (cuo *ContactUpdateOne) SetFromAccount(b bool) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetKind(c contact.Kind) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetName(s string) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableFromAccount(b *bool) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetNillableKind(c *contact.Kind) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetOwner(p *Person) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetOwnerID(id uuid.UUID) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetPrincipal(b bool) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetValidated(b bool) *ContactUpdateOne
- func (cuo *ContactUpdateOne) SetValue(s string) *ContactUpdateOne
- type Contacts
- type Device
- type DeviceClient
- func (c *DeviceClient) Create() *DeviceCreate
- func (c *DeviceClient) Delete() *DeviceDelete
- func (c *DeviceClient) DeleteOne(d *Device) *DeviceDeleteOne
- func (c *DeviceClient) DeleteOneID(id int) *DeviceDeleteOne
- func (c *DeviceClient) Get(ctx context.Context, id int) (*Device, error)
- func (c *DeviceClient) GetX(ctx context.Context, id int) *Device
- func (c *DeviceClient) Hooks() []Hook
- func (c *DeviceClient) Query() *DeviceQuery
- func (c *DeviceClient) Update() *DeviceUpdate
- func (c *DeviceClient) UpdateOne(d *Device) *DeviceUpdateOne
- func (c *DeviceClient) UpdateOneID(id int) *DeviceUpdateOne
- func (c *DeviceClient) Use(hooks ...Hook)
- type DeviceCreate
- type DeviceDelete
- type DeviceDeleteOne
- type DeviceGroupBy
- func (dgb *DeviceGroupBy) Aggregate(fns ...Aggregate) *DeviceGroupBy
- func (dgb *DeviceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (dgb *DeviceGroupBy) BoolsX(ctx context.Context) []bool
- func (dgb *DeviceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (dgb *DeviceGroupBy) Float64sX(ctx context.Context) []float64
- func (dgb *DeviceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (dgb *DeviceGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DeviceGroupBy) Scan(ctx context.Context, v interface{}) error
- func (dgb *DeviceGroupBy) ScanX(ctx context.Context, v interface{})
- func (dgb *DeviceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (dgb *DeviceGroupBy) StringsX(ctx context.Context) []string
- type DeviceMutation
- func (m *DeviceMutation) AddField(name string, value ent.Value) error
- func (m *DeviceMutation) AddedEdges() []string
- func (m *DeviceMutation) AddedField(name string) (ent.Value, bool)
- func (m *DeviceMutation) AddedFields() []string
- func (m *DeviceMutation) AddedIDs(name string) []ent.Value
- func (m *DeviceMutation) ClearEdge(name string) error
- func (m *DeviceMutation) ClearField(name string) error
- func (m *DeviceMutation) ClearedEdges() []string
- func (m *DeviceMutation) ClearedFields() []string
- func (m DeviceMutation) Client() *Client
- func (m *DeviceMutation) Device() (r string, exists bool)
- func (m *DeviceMutation) EdgeCleared(name string) bool
- func (m *DeviceMutation) Field(name string) (ent.Value, bool)
- func (m *DeviceMutation) FieldCleared(name string) bool
- func (m *DeviceMutation) Fields() []string
- func (m *DeviceMutation) ID() (id int, exists bool)
- func (m *DeviceMutation) Op() Op
- func (m *DeviceMutation) RemovedEdges() []string
- func (m *DeviceMutation) RemovedIDs(name string) []ent.Value
- func (m *DeviceMutation) ResetDevice()
- func (m *DeviceMutation) ResetEdge(name string) error
- func (m *DeviceMutation) ResetField(name string) error
- func (m *DeviceMutation) SetDevice(s string)
- func (m *DeviceMutation) SetField(name string, value ent.Value) error
- func (m DeviceMutation) Tx() (*Tx, error)
- func (m *DeviceMutation) Type() string
- type DeviceQuery
- func (dq *DeviceQuery) All(ctx context.Context) ([]*Device, error)
- func (dq *DeviceQuery) AllX(ctx context.Context) []*Device
- func (dq *DeviceQuery) Clone() *DeviceQuery
- func (dq *DeviceQuery) Count(ctx context.Context) (int, error)
- func (dq *DeviceQuery) CountX(ctx context.Context) int
- func (dq *DeviceQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DeviceQuery) ExistX(ctx context.Context) bool
- func (dq *DeviceQuery) First(ctx context.Context) (*Device, error)
- func (dq *DeviceQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DeviceQuery) FirstX(ctx context.Context) *Device
- func (dq *DeviceQuery) FirstXID(ctx context.Context) int
- func (dq *DeviceQuery) GroupBy(field string, fields ...string) *DeviceGroupBy
- func (dq *DeviceQuery) IDs(ctx context.Context) ([]int, error)
- func (dq *DeviceQuery) IDsX(ctx context.Context) []int
- func (dq *DeviceQuery) Limit(limit int) *DeviceQuery
- func (dq *DeviceQuery) Offset(offset int) *DeviceQuery
- func (dq *DeviceQuery) Only(ctx context.Context) (*Device, error)
- func (dq *DeviceQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DeviceQuery) OnlyX(ctx context.Context) *Device
- func (dq *DeviceQuery) OnlyXID(ctx context.Context) int
- func (dq *DeviceQuery) Order(o ...Order) *DeviceQuery
- func (dq *DeviceQuery) Select(field string, fields ...string) *DeviceSelect
- func (dq *DeviceQuery) Where(ps ...predicate.Device) *DeviceQuery
- type DeviceSelect
- func (ds *DeviceSelect) Bools(ctx context.Context) ([]bool, error)
- func (ds *DeviceSelect) BoolsX(ctx context.Context) []bool
- func (ds *DeviceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ds *DeviceSelect) Float64sX(ctx context.Context) []float64
- func (ds *DeviceSelect) Ints(ctx context.Context) ([]int, error)
- func (ds *DeviceSelect) IntsX(ctx context.Context) []int
- func (ds *DeviceSelect) Scan(ctx context.Context, v interface{}) error
- func (ds *DeviceSelect) ScanX(ctx context.Context, v interface{})
- func (ds *DeviceSelect) Strings(ctx context.Context) ([]string, error)
- func (ds *DeviceSelect) StringsX(ctx context.Context) []string
- type DeviceUpdate
- func (du *DeviceUpdate) Exec(ctx context.Context) error
- func (du *DeviceUpdate) ExecX(ctx context.Context)
- func (du *DeviceUpdate) Save(ctx context.Context) (int, error)
- func (du *DeviceUpdate) SaveX(ctx context.Context) int
- func (du *DeviceUpdate) SetDevice(s string) *DeviceUpdate
- func (du *DeviceUpdate) Where(ps ...predicate.Device) *DeviceUpdate
- type DeviceUpdateOne
- func (duo *DeviceUpdateOne) Exec(ctx context.Context) error
- func (duo *DeviceUpdateOne) ExecX(ctx context.Context)
- func (duo *DeviceUpdateOne) Save(ctx context.Context) (*Device, error)
- func (duo *DeviceUpdateOne) SaveX(ctx context.Context) *Device
- func (duo *DeviceUpdateOne) SetDevice(s string) *DeviceUpdateOne
- type Devices
- type Domain
- type DomainClient
- func (c *DomainClient) Create() *DomainCreate
- func (c *DomainClient) Delete() *DomainDelete
- func (c *DomainClient) DeleteOne(d *Domain) *DomainDeleteOne
- func (c *DomainClient) DeleteOneID(id uuid.UUID) *DomainDeleteOne
- func (c *DomainClient) Get(ctx context.Context, id uuid.UUID) (*Domain, error)
- func (c *DomainClient) GetX(ctx context.Context, id uuid.UUID) *Domain
- func (c *DomainClient) Hooks() []Hook
- func (c *DomainClient) Query() *DomainQuery
- func (c *DomainClient) QueryAdmins(d *Domain) *PersonQuery
- func (c *DomainClient) QuerySurveys(d *Domain) *SurveyQuery
- func (c *DomainClient) QueryUsers(d *Domain) *PersonQuery
- func (c *DomainClient) Update() *DomainUpdate
- func (c *DomainClient) UpdateOne(d *Domain) *DomainUpdateOne
- func (c *DomainClient) UpdateOneID(id uuid.UUID) *DomainUpdateOne
- func (c *DomainClient) Use(hooks ...Hook)
- type DomainCreate
- func (dc *DomainCreate) AddAdminIDs(ids ...uuid.UUID) *DomainCreate
- func (dc *DomainCreate) AddAdmins(p ...*Person) *DomainCreate
- func (dc *DomainCreate) AddSurveyIDs(ids ...uuid.UUID) *DomainCreate
- func (dc *DomainCreate) AddSurveys(s ...*Survey) *DomainCreate
- func (dc *DomainCreate) AddUserIDs(ids ...uuid.UUID) *DomainCreate
- func (dc *DomainCreate) AddUsers(p ...*Person) *DomainCreate
- func (dc *DomainCreate) Save(ctx context.Context) (*Domain, error)
- func (dc *DomainCreate) SaveX(ctx context.Context) *Domain
- func (dc *DomainCreate) SetCallback(s string) *DomainCreate
- func (dc *DomainCreate) SetDomain(s string) *DomainCreate
- func (dc *DomainCreate) SetEmail(s string) *DomainCreate
- func (dc *DomainCreate) SetID(u uuid.UUID) *DomainCreate
- func (dc *DomainCreate) SetName(s string) *DomainCreate
- func (dc *DomainCreate) SetTags(s []string) *DomainCreate
- type DomainDelete
- type DomainDeleteOne
- type DomainEdges
- type DomainGroupBy
- func (dgb *DomainGroupBy) Aggregate(fns ...Aggregate) *DomainGroupBy
- func (dgb *DomainGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (dgb *DomainGroupBy) BoolsX(ctx context.Context) []bool
- func (dgb *DomainGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (dgb *DomainGroupBy) Float64sX(ctx context.Context) []float64
- func (dgb *DomainGroupBy) Ints(ctx context.Context) ([]int, error)
- func (dgb *DomainGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DomainGroupBy) Scan(ctx context.Context, v interface{}) error
- func (dgb *DomainGroupBy) ScanX(ctx context.Context, v interface{})
- func (dgb *DomainGroupBy) Strings(ctx context.Context) ([]string, error)
- func (dgb *DomainGroupBy) StringsX(ctx context.Context) []string
- type DomainMutation
- func (m *DomainMutation) AddAdminIDs(ids ...uuid.UUID)
- func (m *DomainMutation) AddField(name string, value ent.Value) error
- func (m *DomainMutation) AddSurveyIDs(ids ...uuid.UUID)
- func (m *DomainMutation) AddUserIDs(ids ...uuid.UUID)
- func (m *DomainMutation) AddedEdges() []string
- func (m *DomainMutation) AddedField(name string) (ent.Value, bool)
- func (m *DomainMutation) AddedFields() []string
- func (m *DomainMutation) AddedIDs(name string) []ent.Value
- func (m *DomainMutation) AdminsIDs() (ids []uuid.UUID)
- func (m *DomainMutation) Callback() (r string, exists bool)
- func (m *DomainMutation) ClearEdge(name string) error
- func (m *DomainMutation) ClearField(name string) error
- func (m *DomainMutation) ClearedEdges() []string
- func (m *DomainMutation) ClearedFields() []string
- func (m DomainMutation) Client() *Client
- func (m *DomainMutation) Domain() (r string, exists bool)
- func (m *DomainMutation) EdgeCleared(name string) bool
- func (m *DomainMutation) Email() (r string, exists bool)
- func (m *DomainMutation) Field(name string) (ent.Value, bool)
- func (m *DomainMutation) FieldCleared(name string) bool
- func (m *DomainMutation) Fields() []string
- func (m *DomainMutation) ID() (id uuid.UUID, exists bool)
- func (m *DomainMutation) Name() (r string, exists bool)
- func (m *DomainMutation) Op() Op
- func (m *DomainMutation) RemoveAdminIDs(ids ...uuid.UUID)
- func (m *DomainMutation) RemoveSurveyIDs(ids ...uuid.UUID)
- func (m *DomainMutation) RemoveUserIDs(ids ...uuid.UUID)
- func (m *DomainMutation) RemovedAdminsIDs() (ids []uuid.UUID)
- func (m *DomainMutation) RemovedEdges() []string
- func (m *DomainMutation) RemovedIDs(name string) []ent.Value
- func (m *DomainMutation) RemovedSurveysIDs() (ids []uuid.UUID)
- func (m *DomainMutation) RemovedUsersIDs() (ids []uuid.UUID)
- func (m *DomainMutation) ResetAdmins()
- func (m *DomainMutation) ResetCallback()
- func (m *DomainMutation) ResetDomain()
- func (m *DomainMutation) ResetEdge(name string) error
- func (m *DomainMutation) ResetEmail()
- func (m *DomainMutation) ResetField(name string) error
- func (m *DomainMutation) ResetName()
- func (m *DomainMutation) ResetSurveys()
- func (m *DomainMutation) ResetTags()
- func (m *DomainMutation) ResetUsers()
- func (m *DomainMutation) SetCallback(s string)
- func (m *DomainMutation) SetDomain(s string)
- func (m *DomainMutation) SetEmail(s string)
- func (m *DomainMutation) SetField(name string, value ent.Value) error
- func (m *DomainMutation) SetID(id uuid.UUID)
- func (m *DomainMutation) SetName(s string)
- func (m *DomainMutation) SetTags(s []string)
- func (m *DomainMutation) SurveysIDs() (ids []uuid.UUID)
- func (m *DomainMutation) Tags() (r []string, exists bool)
- func (m DomainMutation) Tx() (*Tx, error)
- func (m *DomainMutation) Type() string
- func (m *DomainMutation) UsersIDs() (ids []uuid.UUID)
- type DomainQuery
- func (dq *DomainQuery) All(ctx context.Context) ([]*Domain, error)
- func (dq *DomainQuery) AllX(ctx context.Context) []*Domain
- func (dq *DomainQuery) Clone() *DomainQuery
- func (dq *DomainQuery) Count(ctx context.Context) (int, error)
- func (dq *DomainQuery) CountX(ctx context.Context) int
- func (dq *DomainQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DomainQuery) ExistX(ctx context.Context) bool
- func (dq *DomainQuery) First(ctx context.Context) (*Domain, error)
- func (dq *DomainQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (dq *DomainQuery) FirstX(ctx context.Context) *Domain
- func (dq *DomainQuery) FirstXID(ctx context.Context) uuid.UUID
- func (dq *DomainQuery) GroupBy(field string, fields ...string) *DomainGroupBy
- func (dq *DomainQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (dq *DomainQuery) IDsX(ctx context.Context) []uuid.UUID
- func (dq *DomainQuery) Limit(limit int) *DomainQuery
- func (dq *DomainQuery) Offset(offset int) *DomainQuery
- func (dq *DomainQuery) Only(ctx context.Context) (*Domain, error)
- func (dq *DomainQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (dq *DomainQuery) OnlyX(ctx context.Context) *Domain
- func (dq *DomainQuery) OnlyXID(ctx context.Context) uuid.UUID
- func (dq *DomainQuery) Order(o ...Order) *DomainQuery
- func (dq *DomainQuery) QueryAdmins() *PersonQuery
- func (dq *DomainQuery) QuerySurveys() *SurveyQuery
- func (dq *DomainQuery) QueryUsers() *PersonQuery
- func (dq *DomainQuery) Select(field string, fields ...string) *DomainSelect
- func (dq *DomainQuery) Where(ps ...predicate.Domain) *DomainQuery
- func (dq *DomainQuery) WithAdmins(opts ...func(*PersonQuery)) *DomainQuery
- func (dq *DomainQuery) WithSurveys(opts ...func(*SurveyQuery)) *DomainQuery
- func (dq *DomainQuery) WithUsers(opts ...func(*PersonQuery)) *DomainQuery
- type DomainSelect
- func (ds *DomainSelect) Bools(ctx context.Context) ([]bool, error)
- func (ds *DomainSelect) BoolsX(ctx context.Context) []bool
- func (ds *DomainSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ds *DomainSelect) Float64sX(ctx context.Context) []float64
- func (ds *DomainSelect) Ints(ctx context.Context) ([]int, error)
- func (ds *DomainSelect) IntsX(ctx context.Context) []int
- func (ds *DomainSelect) Scan(ctx context.Context, v interface{}) error
- func (ds *DomainSelect) ScanX(ctx context.Context, v interface{})
- func (ds *DomainSelect) Strings(ctx context.Context) ([]string, error)
- func (ds *DomainSelect) StringsX(ctx context.Context) []string
- type DomainUpdate
- func (du *DomainUpdate) AddAdminIDs(ids ...uuid.UUID) *DomainUpdate
- func (du *DomainUpdate) AddAdmins(p ...*Person) *DomainUpdate
- func (du *DomainUpdate) AddSurveyIDs(ids ...uuid.UUID) *DomainUpdate
- func (du *DomainUpdate) AddSurveys(s ...*Survey) *DomainUpdate
- func (du *DomainUpdate) AddUserIDs(ids ...uuid.UUID) *DomainUpdate
- func (du *DomainUpdate) AddUsers(p ...*Person) *DomainUpdate
- func (du *DomainUpdate) Exec(ctx context.Context) error
- func (du *DomainUpdate) ExecX(ctx context.Context)
- func (du *DomainUpdate) RemoveAdminIDs(ids ...uuid.UUID) *DomainUpdate
- func (du *DomainUpdate) RemoveAdmins(p ...*Person) *DomainUpdate
- func (du *DomainUpdate) RemoveSurveyIDs(ids ...uuid.UUID) *DomainUpdate
- func (du *DomainUpdate) RemoveSurveys(s ...*Survey) *DomainUpdate
- func (du *DomainUpdate) RemoveUserIDs(ids ...uuid.UUID) *DomainUpdate
- func (du *DomainUpdate) RemoveUsers(p ...*Person) *DomainUpdate
- func (du *DomainUpdate) Save(ctx context.Context) (int, error)
- func (du *DomainUpdate) SaveX(ctx context.Context) int
- func (du *DomainUpdate) SetCallback(s string) *DomainUpdate
- func (du *DomainUpdate) SetDomain(s string) *DomainUpdate
- func (du *DomainUpdate) SetEmail(s string) *DomainUpdate
- func (du *DomainUpdate) SetName(s string) *DomainUpdate
- func (du *DomainUpdate) SetTags(s []string) *DomainUpdate
- func (du *DomainUpdate) Where(ps ...predicate.Domain) *DomainUpdate
- type DomainUpdateOne
- func (duo *DomainUpdateOne) AddAdminIDs(ids ...uuid.UUID) *DomainUpdateOne
- func (duo *DomainUpdateOne) AddAdmins(p ...*Person) *DomainUpdateOne
- func (duo *DomainUpdateOne) AddSurveyIDs(ids ...uuid.UUID) *DomainUpdateOne
- func (duo *DomainUpdateOne) AddSurveys(s ...*Survey) *DomainUpdateOne
- func (duo *DomainUpdateOne) AddUserIDs(ids ...uuid.UUID) *DomainUpdateOne
- func (duo *DomainUpdateOne) AddUsers(p ...*Person) *DomainUpdateOne
- func (duo *DomainUpdateOne) Exec(ctx context.Context) error
- func (duo *DomainUpdateOne) ExecX(ctx context.Context)
- func (duo *DomainUpdateOne) RemoveAdminIDs(ids ...uuid.UUID) *DomainUpdateOne
- func (duo *DomainUpdateOne) RemoveAdmins(p ...*Person) *DomainUpdateOne
- func (duo *DomainUpdateOne) RemoveSurveyIDs(ids ...uuid.UUID) *DomainUpdateOne
- func (duo *DomainUpdateOne) RemoveSurveys(s ...*Survey) *DomainUpdateOne
- func (duo *DomainUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *DomainUpdateOne
- func (duo *DomainUpdateOne) RemoveUsers(p ...*Person) *DomainUpdateOne
- func (duo *DomainUpdateOne) Save(ctx context.Context) (*Domain, error)
- func (duo *DomainUpdateOne) SaveX(ctx context.Context) *Domain
- func (duo *DomainUpdateOne) SetCallback(s string) *DomainUpdateOne
- func (duo *DomainUpdateOne) SetDomain(s string) *DomainUpdateOne
- func (duo *DomainUpdateOne) SetEmail(s string) *DomainUpdateOne
- func (duo *DomainUpdateOne) SetName(s string) *DomainUpdateOne
- func (duo *DomainUpdateOne) SetTags(s []string) *DomainUpdateOne
- type Domains
- type Flow
- type FlowClient
- func (c *FlowClient) Create() *FlowCreate
- func (c *FlowClient) Delete() *FlowDelete
- func (c *FlowClient) DeleteOne(f *Flow) *FlowDeleteOne
- func (c *FlowClient) DeleteOneID(id uuid.UUID) *FlowDeleteOne
- func (c *FlowClient) Get(ctx context.Context, id uuid.UUID) (*Flow, error)
- func (c *FlowClient) GetX(ctx context.Context, id uuid.UUID) *Flow
- func (c *FlowClient) Hooks() []Hook
- func (c *FlowClient) Query() *FlowQuery
- func (c *FlowClient) QueryQuestions(f *Flow) *QuestionQuery
- func (c *FlowClient) QuerySurvey(f *Flow) *SurveyQuery
- func (c *FlowClient) Update() *FlowUpdate
- func (c *FlowClient) UpdateOne(f *Flow) *FlowUpdateOne
- func (c *FlowClient) UpdateOneID(id uuid.UUID) *FlowUpdateOne
- func (c *FlowClient) Use(hooks ...Hook)
- type FlowCreate
- func (fc *FlowCreate) AddQuestionIDs(ids ...uuid.UUID) *FlowCreate
- func (fc *FlowCreate) AddQuestions(q ...*Question) *FlowCreate
- func (fc *FlowCreate) Save(ctx context.Context) (*Flow, error)
- func (fc *FlowCreate) SaveX(ctx context.Context) *Flow
- func (fc *FlowCreate) SetID(u uuid.UUID) *FlowCreate
- func (fc *FlowCreate) SetInitialState(u uuid.UUID) *FlowCreate
- func (fc *FlowCreate) SetInputs(s []string) *FlowCreate
- func (fc *FlowCreate) SetNillableSurveyID(id *uuid.UUID) *FlowCreate
- func (fc *FlowCreate) SetPastState(u uuid.UUID) *FlowCreate
- func (fc *FlowCreate) SetState(u uuid.UUID) *FlowCreate
- func (fc *FlowCreate) SetStateTable(s string) *FlowCreate
- func (fc *FlowCreate) SetSurvey(s *Survey) *FlowCreate
- func (fc *FlowCreate) SetSurveyID(id uuid.UUID) *FlowCreate
- func (fc *FlowCreate) SetTerminationState(u uuid.UUID) *FlowCreate
- type FlowDelete
- type FlowDeleteOne
- type FlowEdges
- type FlowGroupBy
- func (fgb *FlowGroupBy) Aggregate(fns ...Aggregate) *FlowGroupBy
- func (fgb *FlowGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (fgb *FlowGroupBy) BoolsX(ctx context.Context) []bool
- func (fgb *FlowGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (fgb *FlowGroupBy) Float64sX(ctx context.Context) []float64
- func (fgb *FlowGroupBy) Ints(ctx context.Context) ([]int, error)
- func (fgb *FlowGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FlowGroupBy) Scan(ctx context.Context, v interface{}) error
- func (fgb *FlowGroupBy) ScanX(ctx context.Context, v interface{})
- func (fgb *FlowGroupBy) Strings(ctx context.Context) ([]string, error)
- func (fgb *FlowGroupBy) StringsX(ctx context.Context) []string
- type FlowMutation
- func (m *FlowMutation) AddField(name string, value ent.Value) error
- func (m *FlowMutation) AddQuestionIDs(ids ...uuid.UUID)
- func (m *FlowMutation) AddedEdges() []string
- func (m *FlowMutation) AddedField(name string) (ent.Value, bool)
- func (m *FlowMutation) AddedFields() []string
- func (m *FlowMutation) AddedIDs(name string) []ent.Value
- func (m *FlowMutation) ClearEdge(name string) error
- func (m *FlowMutation) ClearField(name string) error
- func (m *FlowMutation) ClearInputs()
- func (m *FlowMutation) ClearPastState()
- func (m *FlowMutation) ClearSurvey()
- func (m *FlowMutation) ClearedEdges() []string
- func (m *FlowMutation) ClearedFields() []string
- func (m FlowMutation) Client() *Client
- func (m *FlowMutation) EdgeCleared(name string) bool
- func (m *FlowMutation) Field(name string) (ent.Value, bool)
- func (m *FlowMutation) FieldCleared(name string) bool
- func (m *FlowMutation) Fields() []string
- func (m *FlowMutation) ID() (id uuid.UUID, exists bool)
- func (m *FlowMutation) InitialState() (r uuid.UUID, exists bool)
- func (m *FlowMutation) Inputs() (r []string, exists bool)
- func (m *FlowMutation) InputsCleared() bool
- func (m *FlowMutation) Op() Op
- func (m *FlowMutation) PastState() (r uuid.UUID, exists bool)
- func (m *FlowMutation) PastStateCleared() bool
- func (m *FlowMutation) QuestionsIDs() (ids []uuid.UUID)
- func (m *FlowMutation) RemoveQuestionIDs(ids ...uuid.UUID)
- func (m *FlowMutation) RemovedEdges() []string
- func (m *FlowMutation) RemovedIDs(name string) []ent.Value
- func (m *FlowMutation) RemovedQuestionsIDs() (ids []uuid.UUID)
- func (m *FlowMutation) ResetEdge(name string) error
- func (m *FlowMutation) ResetField(name string) error
- func (m *FlowMutation) ResetInitialState()
- func (m *FlowMutation) ResetInputs()
- func (m *FlowMutation) ResetPastState()
- func (m *FlowMutation) ResetQuestions()
- func (m *FlowMutation) ResetState()
- func (m *FlowMutation) ResetStateTable()
- func (m *FlowMutation) ResetSurvey()
- func (m *FlowMutation) ResetTerminationState()
- func (m *FlowMutation) SetField(name string, value ent.Value) error
- func (m *FlowMutation) SetID(id uuid.UUID)
- func (m *FlowMutation) SetInitialState(u uuid.UUID)
- func (m *FlowMutation) SetInputs(s []string)
- func (m *FlowMutation) SetPastState(u uuid.UUID)
- func (m *FlowMutation) SetState(u uuid.UUID)
- func (m *FlowMutation) SetStateTable(s string)
- func (m *FlowMutation) SetSurveyID(id uuid.UUID)
- func (m *FlowMutation) SetTerminationState(u uuid.UUID)
- func (m *FlowMutation) State() (r uuid.UUID, exists bool)
- func (m *FlowMutation) StateTable() (r string, exists bool)
- func (m *FlowMutation) SurveyCleared() bool
- func (m *FlowMutation) SurveyID() (id uuid.UUID, exists bool)
- func (m *FlowMutation) SurveyIDs() (ids []uuid.UUID)
- func (m *FlowMutation) TerminationState() (r uuid.UUID, exists bool)
- func (m FlowMutation) Tx() (*Tx, error)
- func (m *FlowMutation) Type() string
- type FlowQuery
- func (fq *FlowQuery) All(ctx context.Context) ([]*Flow, error)
- func (fq *FlowQuery) AllX(ctx context.Context) []*Flow
- func (fq *FlowQuery) Clone() *FlowQuery
- func (fq *FlowQuery) Count(ctx context.Context) (int, error)
- func (fq *FlowQuery) CountX(ctx context.Context) int
- func (fq *FlowQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FlowQuery) ExistX(ctx context.Context) bool
- func (fq *FlowQuery) First(ctx context.Context) (*Flow, error)
- func (fq *FlowQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (fq *FlowQuery) FirstX(ctx context.Context) *Flow
- func (fq *FlowQuery) FirstXID(ctx context.Context) uuid.UUID
- func (fq *FlowQuery) GroupBy(field string, fields ...string) *FlowGroupBy
- func (fq *FlowQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (fq *FlowQuery) IDsX(ctx context.Context) []uuid.UUID
- func (fq *FlowQuery) Limit(limit int) *FlowQuery
- func (fq *FlowQuery) Offset(offset int) *FlowQuery
- func (fq *FlowQuery) Only(ctx context.Context) (*Flow, error)
- func (fq *FlowQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (fq *FlowQuery) OnlyX(ctx context.Context) *Flow
- func (fq *FlowQuery) OnlyXID(ctx context.Context) uuid.UUID
- func (fq *FlowQuery) Order(o ...Order) *FlowQuery
- func (fq *FlowQuery) QueryQuestions() *QuestionQuery
- func (fq *FlowQuery) QuerySurvey() *SurveyQuery
- func (fq *FlowQuery) Select(field string, fields ...string) *FlowSelect
- func (fq *FlowQuery) Where(ps ...predicate.Flow) *FlowQuery
- func (fq *FlowQuery) WithQuestions(opts ...func(*QuestionQuery)) *FlowQuery
- func (fq *FlowQuery) WithSurvey(opts ...func(*SurveyQuery)) *FlowQuery
- type FlowSelect
- func (fs *FlowSelect) Bools(ctx context.Context) ([]bool, error)
- func (fs *FlowSelect) BoolsX(ctx context.Context) []bool
- func (fs *FlowSelect) Float64s(ctx context.Context) ([]float64, error)
- func (fs *FlowSelect) Float64sX(ctx context.Context) []float64
- func (fs *FlowSelect) Ints(ctx context.Context) ([]int, error)
- func (fs *FlowSelect) IntsX(ctx context.Context) []int
- func (fs *FlowSelect) Scan(ctx context.Context, v interface{}) error
- func (fs *FlowSelect) ScanX(ctx context.Context, v interface{})
- func (fs *FlowSelect) Strings(ctx context.Context) ([]string, error)
- func (fs *FlowSelect) StringsX(ctx context.Context) []string
- type FlowUpdate
- func (fu *FlowUpdate) AddQuestionIDs(ids ...uuid.UUID) *FlowUpdate
- func (fu *FlowUpdate) AddQuestions(q ...*Question) *FlowUpdate
- func (fu *FlowUpdate) ClearPastState() *FlowUpdate
- func (fu *FlowUpdate) ClearSurvey() *FlowUpdate
- func (fu *FlowUpdate) Exec(ctx context.Context) error
- func (fu *FlowUpdate) ExecX(ctx context.Context)
- func (fu *FlowUpdate) RemoveQuestionIDs(ids ...uuid.UUID) *FlowUpdate
- func (fu *FlowUpdate) RemoveQuestions(q ...*Question) *FlowUpdate
- func (fu *FlowUpdate) Save(ctx context.Context) (int, error)
- func (fu *FlowUpdate) SaveX(ctx context.Context) int
- func (fu *FlowUpdate) SetInitialState(u uuid.UUID) *FlowUpdate
- func (fu *FlowUpdate) SetNillableSurveyID(id *uuid.UUID) *FlowUpdate
- func (fu *FlowUpdate) SetPastState(u uuid.UUID) *FlowUpdate
- func (fu *FlowUpdate) SetState(u uuid.UUID) *FlowUpdate
- func (fu *FlowUpdate) SetStateTable(s string) *FlowUpdate
- func (fu *FlowUpdate) SetSurvey(s *Survey) *FlowUpdate
- func (fu *FlowUpdate) SetSurveyID(id uuid.UUID) *FlowUpdate
- func (fu *FlowUpdate) SetTerminationState(u uuid.UUID) *FlowUpdate
- func (fu *FlowUpdate) Where(ps ...predicate.Flow) *FlowUpdate
- type FlowUpdateOne
- func (fuo *FlowUpdateOne) AddQuestionIDs(ids ...uuid.UUID) *FlowUpdateOne
- func (fuo *FlowUpdateOne) AddQuestions(q ...*Question) *FlowUpdateOne
- func (fuo *FlowUpdateOne) ClearPastState() *FlowUpdateOne
- func (fuo *FlowUpdateOne) ClearSurvey() *FlowUpdateOne
- func (fuo *FlowUpdateOne) Exec(ctx context.Context) error
- func (fuo *FlowUpdateOne) ExecX(ctx context.Context)
- func (fuo *FlowUpdateOne) RemoveQuestionIDs(ids ...uuid.UUID) *FlowUpdateOne
- func (fuo *FlowUpdateOne) RemoveQuestions(q ...*Question) *FlowUpdateOne
- func (fuo *FlowUpdateOne) Save(ctx context.Context) (*Flow, error)
- func (fuo *FlowUpdateOne) SaveX(ctx context.Context) *Flow
- func (fuo *FlowUpdateOne) SetInitialState(u uuid.UUID) *FlowUpdateOne
- func (fuo *FlowUpdateOne) SetNillableSurveyID(id *uuid.UUID) *FlowUpdateOne
- func (fuo *FlowUpdateOne) SetPastState(u uuid.UUID) *FlowUpdateOne
- func (fuo *FlowUpdateOne) SetState(u uuid.UUID) *FlowUpdateOne
- func (fuo *FlowUpdateOne) SetStateTable(s string) *FlowUpdateOne
- func (fuo *FlowUpdateOne) SetSurvey(s *Survey) *FlowUpdateOne
- func (fuo *FlowUpdateOne) SetSurveyID(id uuid.UUID) *FlowUpdateOne
- func (fuo *FlowUpdateOne) SetTerminationState(u uuid.UUID) *FlowUpdateOne
- type Flows
- type Hook
- type IP
- type IPClient
- func (c *IPClient) Create() *IPCreate
- func (c *IPClient) Delete() *IPDelete
- func (c *IPClient) DeleteOne(i *IP) *IPDeleteOne
- func (c *IPClient) DeleteOneID(id int) *IPDeleteOne
- func (c *IPClient) Get(ctx context.Context, id int) (*IP, error)
- func (c *IPClient) GetX(ctx context.Context, id int) *IP
- func (c *IPClient) Hooks() []Hook
- func (c *IPClient) Query() *IPQuery
- func (c *IPClient) Update() *IPUpdate
- func (c *IPClient) UpdateOne(i *IP) *IPUpdateOne
- func (c *IPClient) UpdateOneID(id int) *IPUpdateOne
- func (c *IPClient) Use(hooks ...Hook)
- type IPCreate
- type IPDelete
- type IPDeleteOne
- type IPGroupBy
- func (igb *IPGroupBy) Aggregate(fns ...Aggregate) *IPGroupBy
- func (igb *IPGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (igb *IPGroupBy) BoolsX(ctx context.Context) []bool
- func (igb *IPGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (igb *IPGroupBy) Float64sX(ctx context.Context) []float64
- func (igb *IPGroupBy) Ints(ctx context.Context) ([]int, error)
- func (igb *IPGroupBy) IntsX(ctx context.Context) []int
- func (igb *IPGroupBy) Scan(ctx context.Context, v interface{}) error
- func (igb *IPGroupBy) ScanX(ctx context.Context, v interface{})
- func (igb *IPGroupBy) Strings(ctx context.Context) ([]string, error)
- func (igb *IPGroupBy) StringsX(ctx context.Context) []string
- type IPMutation
- func (m *IPMutation) AddField(name string, value ent.Value) error
- func (m *IPMutation) AddedEdges() []string
- func (m *IPMutation) AddedField(name string) (ent.Value, bool)
- func (m *IPMutation) AddedFields() []string
- func (m *IPMutation) AddedIDs(name string) []ent.Value
- func (m *IPMutation) ClearEdge(name string) error
- func (m *IPMutation) ClearField(name string) error
- func (m *IPMutation) ClearedEdges() []string
- func (m *IPMutation) ClearedFields() []string
- func (m IPMutation) Client() *Client
- func (m *IPMutation) EdgeCleared(name string) bool
- func (m *IPMutation) Field(name string) (ent.Value, bool)
- func (m *IPMutation) FieldCleared(name string) bool
- func (m *IPMutation) Fields() []string
- func (m *IPMutation) ID() (id int, exists bool)
- func (m *IPMutation) IP() (r string, exists bool)
- func (m *IPMutation) Op() Op
- func (m *IPMutation) RemovedEdges() []string
- func (m *IPMutation) RemovedIDs(name string) []ent.Value
- func (m *IPMutation) ResetEdge(name string) error
- func (m *IPMutation) ResetField(name string) error
- func (m *IPMutation) ResetIP()
- func (m *IPMutation) SetField(name string, value ent.Value) error
- func (m *IPMutation) SetIP(s string)
- func (m IPMutation) Tx() (*Tx, error)
- func (m *IPMutation) Type() string
- type IPQuery
- func (iq *IPQuery) All(ctx context.Context) ([]*IP, error)
- func (iq *IPQuery) AllX(ctx context.Context) []*IP
- func (iq *IPQuery) Clone() *IPQuery
- func (iq *IPQuery) Count(ctx context.Context) (int, error)
- func (iq *IPQuery) CountX(ctx context.Context) int
- func (iq *IPQuery) Exist(ctx context.Context) (bool, error)
- func (iq *IPQuery) ExistX(ctx context.Context) bool
- func (iq *IPQuery) First(ctx context.Context) (*IP, error)
- func (iq *IPQuery) FirstID(ctx context.Context) (id int, err error)
- func (iq *IPQuery) FirstX(ctx context.Context) *IP
- func (iq *IPQuery) FirstXID(ctx context.Context) int
- func (iq *IPQuery) GroupBy(field string, fields ...string) *IPGroupBy
- func (iq *IPQuery) IDs(ctx context.Context) ([]int, error)
- func (iq *IPQuery) IDsX(ctx context.Context) []int
- func (iq *IPQuery) Limit(limit int) *IPQuery
- func (iq *IPQuery) Offset(offset int) *IPQuery
- func (iq *IPQuery) Only(ctx context.Context) (*IP, error)
- func (iq *IPQuery) OnlyID(ctx context.Context) (id int, err error)
- func (iq *IPQuery) OnlyX(ctx context.Context) *IP
- func (iq *IPQuery) OnlyXID(ctx context.Context) int
- func (iq *IPQuery) Order(o ...Order) *IPQuery
- func (iq *IPQuery) Select(field string, fields ...string) *IPSelect
- func (iq *IPQuery) Where(ps ...predicate.IP) *IPQuery
- type IPSelect
- func (is *IPSelect) Bools(ctx context.Context) ([]bool, error)
- func (is *IPSelect) BoolsX(ctx context.Context) []bool
- func (is *IPSelect) Float64s(ctx context.Context) ([]float64, error)
- func (is *IPSelect) Float64sX(ctx context.Context) []float64
- func (is *IPSelect) Ints(ctx context.Context) ([]int, error)
- func (is *IPSelect) IntsX(ctx context.Context) []int
- func (is *IPSelect) Scan(ctx context.Context, v interface{}) error
- func (is *IPSelect) ScanX(ctx context.Context, v interface{})
- func (is *IPSelect) Strings(ctx context.Context) ([]string, error)
- func (is *IPSelect) StringsX(ctx context.Context) []string
- type IPUpdate
- func (iu *IPUpdate) Exec(ctx context.Context) error
- func (iu *IPUpdate) ExecX(ctx context.Context)
- func (iu *IPUpdate) Save(ctx context.Context) (int, error)
- func (iu *IPUpdate) SaveX(ctx context.Context) int
- func (iu *IPUpdate) SetIP(s string) *IPUpdate
- func (iu *IPUpdate) Where(ps ...predicate.IP) *IPUpdate
- type IPUpdateOne
- type IPs
- type Input
- type InputClient
- func (c *InputClient) Create() *InputCreate
- func (c *InputClient) Delete() *InputDelete
- func (c *InputClient) DeleteOne(i *Input) *InputDeleteOne
- func (c *InputClient) DeleteOneID(id uuid.UUID) *InputDeleteOne
- func (c *InputClient) Get(ctx context.Context, id uuid.UUID) (*Input, error)
- func (c *InputClient) GetX(ctx context.Context, id uuid.UUID) *Input
- func (c *InputClient) Hooks() []Hook
- func (c *InputClient) Query() *InputQuery
- func (c *InputClient) QueryQuestion(i *Input) *QuestionQuery
- func (c *InputClient) Update() *InputUpdate
- func (c *InputClient) UpdateOne(i *Input) *InputUpdateOne
- func (c *InputClient) UpdateOneID(id uuid.UUID) *InputUpdateOne
- func (c *InputClient) Use(hooks ...Hook)
- type InputCreate
- func (ic *InputCreate) Save(ctx context.Context) (*Input, error)
- func (ic *InputCreate) SaveX(ctx context.Context) *Input
- func (ic *InputCreate) SetDefaults(s []string) *InputCreate
- func (ic *InputCreate) SetID(u uuid.UUID) *InputCreate
- func (ic *InputCreate) SetKind(i input.Kind) *InputCreate
- func (ic *InputCreate) SetMultiple(b bool) *InputCreate
- func (ic *InputCreate) SetNillableMultiple(b *bool) *InputCreate
- func (ic *InputCreate) SetOptions(m map[string]interface{}) *InputCreate
- func (ic *InputCreate) SetQuestion(q *Question) *InputCreate
- func (ic *InputCreate) SetQuestionID(id uuid.UUID) *InputCreate
- type InputDelete
- type InputDeleteOne
- type InputEdges
- type InputGroupBy
- func (igb *InputGroupBy) Aggregate(fns ...Aggregate) *InputGroupBy
- func (igb *InputGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (igb *InputGroupBy) BoolsX(ctx context.Context) []bool
- func (igb *InputGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (igb *InputGroupBy) Float64sX(ctx context.Context) []float64
- func (igb *InputGroupBy) Ints(ctx context.Context) ([]int, error)
- func (igb *InputGroupBy) IntsX(ctx context.Context) []int
- func (igb *InputGroupBy) Scan(ctx context.Context, v interface{}) error
- func (igb *InputGroupBy) ScanX(ctx context.Context, v interface{})
- func (igb *InputGroupBy) Strings(ctx context.Context) ([]string, error)
- func (igb *InputGroupBy) StringsX(ctx context.Context) []string
- type InputMutation
- func (m *InputMutation) AddField(name string, value ent.Value) error
- func (m *InputMutation) AddedEdges() []string
- func (m *InputMutation) AddedField(name string) (ent.Value, bool)
- func (m *InputMutation) AddedFields() []string
- func (m *InputMutation) AddedIDs(name string) []ent.Value
- func (m *InputMutation) ClearDefaults()
- func (m *InputMutation) ClearEdge(name string) error
- func (m *InputMutation) ClearField(name string) error
- func (m *InputMutation) ClearMultiple()
- func (m *InputMutation) ClearOptions()
- func (m *InputMutation) ClearQuestion()
- func (m *InputMutation) ClearedEdges() []string
- func (m *InputMutation) ClearedFields() []string
- func (m InputMutation) Client() *Client
- func (m *InputMutation) Defaults() (r []string, exists bool)
- func (m *InputMutation) DefaultsCleared() bool
- func (m *InputMutation) EdgeCleared(name string) bool
- func (m *InputMutation) Field(name string) (ent.Value, bool)
- func (m *InputMutation) FieldCleared(name string) bool
- func (m *InputMutation) Fields() []string
- func (m *InputMutation) ID() (id uuid.UUID, exists bool)
- func (m *InputMutation) Kind() (r input.Kind, exists bool)
- func (m *InputMutation) Multiple() (r bool, exists bool)
- func (m *InputMutation) MultipleCleared() bool
- func (m *InputMutation) Op() Op
- func (m *InputMutation) Options() (r map[string]interface{}, exists bool)
- func (m *InputMutation) OptionsCleared() bool
- func (m *InputMutation) QuestionCleared() bool
- func (m *InputMutation) QuestionID() (id uuid.UUID, exists bool)
- func (m *InputMutation) QuestionIDs() (ids []uuid.UUID)
- func (m *InputMutation) RemovedEdges() []string
- func (m *InputMutation) RemovedIDs(name string) []ent.Value
- func (m *InputMutation) ResetDefaults()
- func (m *InputMutation) ResetEdge(name string) error
- func (m *InputMutation) ResetField(name string) error
- func (m *InputMutation) ResetKind()
- func (m *InputMutation) ResetMultiple()
- func (m *InputMutation) ResetOptions()
- func (m *InputMutation) ResetQuestion()
- func (m *InputMutation) SetDefaults(s []string)
- func (m *InputMutation) SetField(name string, value ent.Value) error
- func (m *InputMutation) SetID(id uuid.UUID)
- func (m *InputMutation) SetKind(i input.Kind)
- func (m *InputMutation) SetMultiple(b bool)
- func (m *InputMutation) SetOptions(value map[string]interface{})
- func (m *InputMutation) SetQuestionID(id uuid.UUID)
- func (m InputMutation) Tx() (*Tx, error)
- func (m *InputMutation) Type() string
- type InputQuery
- func (iq *InputQuery) All(ctx context.Context) ([]*Input, error)
- func (iq *InputQuery) AllX(ctx context.Context) []*Input
- func (iq *InputQuery) Clone() *InputQuery
- func (iq *InputQuery) Count(ctx context.Context) (int, error)
- func (iq *InputQuery) CountX(ctx context.Context) int
- func (iq *InputQuery) Exist(ctx context.Context) (bool, error)
- func (iq *InputQuery) ExistX(ctx context.Context) bool
- func (iq *InputQuery) First(ctx context.Context) (*Input, error)
- func (iq *InputQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *InputQuery) FirstX(ctx context.Context) *Input
- func (iq *InputQuery) FirstXID(ctx context.Context) uuid.UUID
- func (iq *InputQuery) GroupBy(field string, fields ...string) *InputGroupBy
- func (iq *InputQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (iq *InputQuery) IDsX(ctx context.Context) []uuid.UUID
- func (iq *InputQuery) Limit(limit int) *InputQuery
- func (iq *InputQuery) Offset(offset int) *InputQuery
- func (iq *InputQuery) Only(ctx context.Context) (*Input, error)
- func (iq *InputQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *InputQuery) OnlyX(ctx context.Context) *Input
- func (iq *InputQuery) OnlyXID(ctx context.Context) uuid.UUID
- func (iq *InputQuery) Order(o ...Order) *InputQuery
- func (iq *InputQuery) QueryQuestion() *QuestionQuery
- func (iq *InputQuery) Select(field string, fields ...string) *InputSelect
- func (iq *InputQuery) Where(ps ...predicate.Input) *InputQuery
- func (iq *InputQuery) WithQuestion(opts ...func(*QuestionQuery)) *InputQuery
- type InputSelect
- func (is *InputSelect) Bools(ctx context.Context) ([]bool, error)
- func (is *InputSelect) BoolsX(ctx context.Context) []bool
- func (is *InputSelect) Float64s(ctx context.Context) ([]float64, error)
- func (is *InputSelect) Float64sX(ctx context.Context) []float64
- func (is *InputSelect) Ints(ctx context.Context) ([]int, error)
- func (is *InputSelect) IntsX(ctx context.Context) []int
- func (is *InputSelect) Scan(ctx context.Context, v interface{}) error
- func (is *InputSelect) ScanX(ctx context.Context, v interface{})
- func (is *InputSelect) Strings(ctx context.Context) ([]string, error)
- func (is *InputSelect) StringsX(ctx context.Context) []string
- type InputUpdate
- func (iu *InputUpdate) ClearDefaults() *InputUpdate
- func (iu *InputUpdate) ClearMultiple() *InputUpdate
- func (iu *InputUpdate) ClearOptions() *InputUpdate
- func (iu *InputUpdate) ClearQuestion() *InputUpdate
- func (iu *InputUpdate) Exec(ctx context.Context) error
- func (iu *InputUpdate) ExecX(ctx context.Context)
- func (iu *InputUpdate) Save(ctx context.Context) (int, error)
- func (iu *InputUpdate) SaveX(ctx context.Context) int
- func (iu *InputUpdate) SetDefaults(s []string) *InputUpdate
- func (iu *InputUpdate) SetMultiple(b bool) *InputUpdate
- func (iu *InputUpdate) SetNillableMultiple(b *bool) *InputUpdate
- func (iu *InputUpdate) SetOptions(m map[string]interface{}) *InputUpdate
- func (iu *InputUpdate) SetQuestion(q *Question) *InputUpdate
- func (iu *InputUpdate) SetQuestionID(id uuid.UUID) *InputUpdate
- func (iu *InputUpdate) Where(ps ...predicate.Input) *InputUpdate
- type InputUpdateOne
- func (iuo *InputUpdateOne) ClearDefaults() *InputUpdateOne
- func (iuo *InputUpdateOne) ClearMultiple() *InputUpdateOne
- func (iuo *InputUpdateOne) ClearOptions() *InputUpdateOne
- func (iuo *InputUpdateOne) ClearQuestion() *InputUpdateOne
- func (iuo *InputUpdateOne) Exec(ctx context.Context) error
- func (iuo *InputUpdateOne) ExecX(ctx context.Context)
- func (iuo *InputUpdateOne) Save(ctx context.Context) (*Input, error)
- func (iuo *InputUpdateOne) SaveX(ctx context.Context) *Input
- func (iuo *InputUpdateOne) SetDefaults(s []string) *InputUpdateOne
- func (iuo *InputUpdateOne) SetMultiple(b bool) *InputUpdateOne
- func (iuo *InputUpdateOne) SetNillableMultiple(b *bool) *InputUpdateOne
- func (iuo *InputUpdateOne) SetOptions(m map[string]interface{}) *InputUpdateOne
- func (iuo *InputUpdateOne) SetQuestion(q *Question) *InputUpdateOne
- func (iuo *InputUpdateOne) SetQuestionID(id uuid.UUID) *InputUpdateOne
- type Inputs
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type Order
- type Person
- func (pe *Person) QueryAccounts() *AccountQuery
- func (pe *Person) QueryAdminOf() *DomainQuery
- func (pe *Person) QueryContacts() *ContactQuery
- func (pe *Person) QueryDomains() *DomainQuery
- func (pe *Person) QuerySurveys() *SurveyQuery
- func (pe *Person) String() string
- func (pe *Person) Unwrap() *Person
- func (pe *Person) Update() *PersonUpdateOne
- type PersonClient
- func (c *PersonClient) Create() *PersonCreate
- func (c *PersonClient) Delete() *PersonDelete
- func (c *PersonClient) DeleteOne(pe *Person) *PersonDeleteOne
- func (c *PersonClient) DeleteOneID(id uuid.UUID) *PersonDeleteOne
- func (c *PersonClient) Get(ctx context.Context, id uuid.UUID) (*Person, error)
- func (c *PersonClient) GetX(ctx context.Context, id uuid.UUID) *Person
- func (c *PersonClient) Hooks() []Hook
- func (c *PersonClient) Query() *PersonQuery
- func (c *PersonClient) QueryAccounts(pe *Person) *AccountQuery
- func (c *PersonClient) QueryAdminOf(pe *Person) *DomainQuery
- func (c *PersonClient) QueryContacts(pe *Person) *ContactQuery
- func (c *PersonClient) QueryDomains(pe *Person) *DomainQuery
- func (c *PersonClient) QuerySurveys(pe *Person) *SurveyQuery
- func (c *PersonClient) Update() *PersonUpdate
- func (c *PersonClient) UpdateOne(pe *Person) *PersonUpdateOne
- func (c *PersonClient) UpdateOneID(id uuid.UUID) *PersonUpdateOne
- func (c *PersonClient) Use(hooks ...Hook)
- type PersonCreate
- func (pc *PersonCreate) AddAccountIDs(ids ...uuid.UUID) *PersonCreate
- func (pc *PersonCreate) AddAccounts(a ...*Account) *PersonCreate
- func (pc *PersonCreate) AddAdminOf(d ...*Domain) *PersonCreate
- func (pc *PersonCreate) AddAdminOfIDs(ids ...uuid.UUID) *PersonCreate
- func (pc *PersonCreate) AddContactIDs(ids ...uuid.UUID) *PersonCreate
- func (pc *PersonCreate) AddContacts(c ...*Contact) *PersonCreate
- func (pc *PersonCreate) AddDomainIDs(ids ...uuid.UUID) *PersonCreate
- func (pc *PersonCreate) AddDomains(d ...*Domain) *PersonCreate
- func (pc *PersonCreate) AddSurveyIDs(ids ...uuid.UUID) *PersonCreate
- func (pc *PersonCreate) AddSurveys(s ...*Survey) *PersonCreate
- func (pc *PersonCreate) Save(ctx context.Context) (*Person, error)
- func (pc *PersonCreate) SaveX(ctx context.Context) *Person
- func (pc *PersonCreate) SetID(u uuid.UUID) *PersonCreate
- func (pc *PersonCreate) SetLastActivity(t time.Time) *PersonCreate
- func (pc *PersonCreate) SetName(s string) *PersonCreate
- func (pc *PersonCreate) SetNillableLastActivity(t *time.Time) *PersonCreate
- func (pc *PersonCreate) SetNillablePicture(s *string) *PersonCreate
- func (pc *PersonCreate) SetNillableUsername(s *string) *PersonCreate
- func (pc *PersonCreate) SetPicture(s string) *PersonCreate
- func (pc *PersonCreate) SetRoles(s []string) *PersonCreate
- func (pc *PersonCreate) SetUsername(s string) *PersonCreate
- type PersonDelete
- type PersonDeleteOne
- type PersonEdges
- type PersonGroupBy
- func (pgb *PersonGroupBy) Aggregate(fns ...Aggregate) *PersonGroupBy
- func (pgb *PersonGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (pgb *PersonGroupBy) BoolsX(ctx context.Context) []bool
- func (pgb *PersonGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (pgb *PersonGroupBy) Float64sX(ctx context.Context) []float64
- func (pgb *PersonGroupBy) Ints(ctx context.Context) ([]int, error)
- func (pgb *PersonGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PersonGroupBy) Scan(ctx context.Context, v interface{}) error
- func (pgb *PersonGroupBy) ScanX(ctx context.Context, v interface{})
- func (pgb *PersonGroupBy) Strings(ctx context.Context) ([]string, error)
- func (pgb *PersonGroupBy) StringsX(ctx context.Context) []string
- type PersonMutation
- func (m *PersonMutation) AccountsIDs() (ids []uuid.UUID)
- func (m *PersonMutation) AddAccountIDs(ids ...uuid.UUID)
- func (m *PersonMutation) AddAdminOfIDs(ids ...uuid.UUID)
- func (m *PersonMutation) AddContactIDs(ids ...uuid.UUID)
- func (m *PersonMutation) AddDomainIDs(ids ...uuid.UUID)
- func (m *PersonMutation) AddField(name string, value ent.Value) error
- func (m *PersonMutation) AddSurveyIDs(ids ...uuid.UUID)
- func (m *PersonMutation) AddedEdges() []string
- func (m *PersonMutation) AddedField(name string) (ent.Value, bool)
- func (m *PersonMutation) AddedFields() []string
- func (m *PersonMutation) AddedIDs(name string) []ent.Value
- func (m *PersonMutation) AdminOfIDs() (ids []uuid.UUID)
- func (m *PersonMutation) ClearEdge(name string) error
- func (m *PersonMutation) ClearField(name string) error
- func (m *PersonMutation) ClearPicture()
- func (m *PersonMutation) ClearRoles()
- func (m *PersonMutation) ClearUsername()
- func (m *PersonMutation) ClearedEdges() []string
- func (m *PersonMutation) ClearedFields() []string
- func (m PersonMutation) Client() *Client
- func (m *PersonMutation) ContactsIDs() (ids []uuid.UUID)
- func (m *PersonMutation) DomainsIDs() (ids []uuid.UUID)
- func (m *PersonMutation) EdgeCleared(name string) bool
- func (m *PersonMutation) Field(name string) (ent.Value, bool)
- func (m *PersonMutation) FieldCleared(name string) bool
- func (m *PersonMutation) Fields() []string
- func (m *PersonMutation) ID() (id uuid.UUID, exists bool)
- func (m *PersonMutation) LastActivity() (r time.Time, exists bool)
- func (m *PersonMutation) Name() (r string, exists bool)
- func (m *PersonMutation) Op() Op
- func (m *PersonMutation) Picture() (r string, exists bool)
- func (m *PersonMutation) PictureCleared() bool
- func (m *PersonMutation) RemoveAccountIDs(ids ...uuid.UUID)
- func (m *PersonMutation) RemoveAdminOfIDs(ids ...uuid.UUID)
- func (m *PersonMutation) RemoveContactIDs(ids ...uuid.UUID)
- func (m *PersonMutation) RemoveDomainIDs(ids ...uuid.UUID)
- func (m *PersonMutation) RemoveSurveyIDs(ids ...uuid.UUID)
- func (m *PersonMutation) RemovedAccountsIDs() (ids []uuid.UUID)
- func (m *PersonMutation) RemovedAdminOfIDs() (ids []uuid.UUID)
- func (m *PersonMutation) RemovedContactsIDs() (ids []uuid.UUID)
- func (m *PersonMutation) RemovedDomainsIDs() (ids []uuid.UUID)
- func (m *PersonMutation) RemovedEdges() []string
- func (m *PersonMutation) RemovedIDs(name string) []ent.Value
- func (m *PersonMutation) RemovedSurveysIDs() (ids []uuid.UUID)
- func (m *PersonMutation) ResetAccounts()
- func (m *PersonMutation) ResetAdminOf()
- func (m *PersonMutation) ResetContacts()
- func (m *PersonMutation) ResetDomains()
- func (m *PersonMutation) ResetEdge(name string) error
- func (m *PersonMutation) ResetField(name string) error
- func (m *PersonMutation) ResetLastActivity()
- func (m *PersonMutation) ResetName()
- func (m *PersonMutation) ResetPicture()
- func (m *PersonMutation) ResetRoles()
- func (m *PersonMutation) ResetSurveys()
- func (m *PersonMutation) ResetUsername()
- func (m *PersonMutation) Roles() (r []string, exists bool)
- func (m *PersonMutation) RolesCleared() bool
- func (m *PersonMutation) SetField(name string, value ent.Value) error
- func (m *PersonMutation) SetID(id uuid.UUID)
- func (m *PersonMutation) SetLastActivity(t time.Time)
- func (m *PersonMutation) SetName(s string)
- func (m *PersonMutation) SetPicture(s string)
- func (m *PersonMutation) SetRoles(s []string)
- func (m *PersonMutation) SetUsername(s string)
- func (m *PersonMutation) SurveysIDs() (ids []uuid.UUID)
- func (m PersonMutation) Tx() (*Tx, error)
- func (m *PersonMutation) Type() string
- func (m *PersonMutation) Username() (r string, exists bool)
- func (m *PersonMutation) UsernameCleared() bool
- type PersonQuery
- func (pq *PersonQuery) All(ctx context.Context) ([]*Person, error)
- func (pq *PersonQuery) AllX(ctx context.Context) []*Person
- func (pq *PersonQuery) Clone() *PersonQuery
- func (pq *PersonQuery) Count(ctx context.Context) (int, error)
- func (pq *PersonQuery) CountX(ctx context.Context) int
- func (pq *PersonQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PersonQuery) ExistX(ctx context.Context) bool
- func (pq *PersonQuery) First(ctx context.Context) (*Person, error)
- func (pq *PersonQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PersonQuery) FirstX(ctx context.Context) *Person
- func (pq *PersonQuery) FirstXID(ctx context.Context) uuid.UUID
- func (pq *PersonQuery) GroupBy(field string, fields ...string) *PersonGroupBy
- func (pq *PersonQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (pq *PersonQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pq *PersonQuery) Limit(limit int) *PersonQuery
- func (pq *PersonQuery) Offset(offset int) *PersonQuery
- func (pq *PersonQuery) Only(ctx context.Context) (*Person, error)
- func (pq *PersonQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PersonQuery) OnlyX(ctx context.Context) *Person
- func (pq *PersonQuery) OnlyXID(ctx context.Context) uuid.UUID
- func (pq *PersonQuery) Order(o ...Order) *PersonQuery
- func (pq *PersonQuery) QueryAccounts() *AccountQuery
- func (pq *PersonQuery) QueryAdminOf() *DomainQuery
- func (pq *PersonQuery) QueryContacts() *ContactQuery
- func (pq *PersonQuery) QueryDomains() *DomainQuery
- func (pq *PersonQuery) QuerySurveys() *SurveyQuery
- func (pq *PersonQuery) Select(field string, fields ...string) *PersonSelect
- func (pq *PersonQuery) Where(ps ...predicate.Person) *PersonQuery
- func (pq *PersonQuery) WithAccounts(opts ...func(*AccountQuery)) *PersonQuery
- func (pq *PersonQuery) WithAdminOf(opts ...func(*DomainQuery)) *PersonQuery
- func (pq *PersonQuery) WithContacts(opts ...func(*ContactQuery)) *PersonQuery
- func (pq *PersonQuery) WithDomains(opts ...func(*DomainQuery)) *PersonQuery
- func (pq *PersonQuery) WithSurveys(opts ...func(*SurveyQuery)) *PersonQuery
- type PersonSelect
- func (ps *PersonSelect) Bools(ctx context.Context) ([]bool, error)
- func (ps *PersonSelect) BoolsX(ctx context.Context) []bool
- func (ps *PersonSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ps *PersonSelect) Float64sX(ctx context.Context) []float64
- func (ps *PersonSelect) Ints(ctx context.Context) ([]int, error)
- func (ps *PersonSelect) IntsX(ctx context.Context) []int
- func (ps *PersonSelect) Scan(ctx context.Context, v interface{}) error
- func (ps *PersonSelect) ScanX(ctx context.Context, v interface{})
- func (ps *PersonSelect) Strings(ctx context.Context) ([]string, error)
- func (ps *PersonSelect) StringsX(ctx context.Context) []string
- type PersonUpdate
- func (pu *PersonUpdate) AddAccountIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) AddAccounts(a ...*Account) *PersonUpdate
- func (pu *PersonUpdate) AddAdminOf(d ...*Domain) *PersonUpdate
- func (pu *PersonUpdate) AddAdminOfIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) AddContactIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) AddContacts(c ...*Contact) *PersonUpdate
- func (pu *PersonUpdate) AddDomainIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) AddDomains(d ...*Domain) *PersonUpdate
- func (pu *PersonUpdate) AddSurveyIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) AddSurveys(s ...*Survey) *PersonUpdate
- func (pu *PersonUpdate) ClearPicture() *PersonUpdate
- func (pu *PersonUpdate) ClearRoles() *PersonUpdate
- func (pu *PersonUpdate) ClearUsername() *PersonUpdate
- func (pu *PersonUpdate) Exec(ctx context.Context) error
- func (pu *PersonUpdate) ExecX(ctx context.Context)
- func (pu *PersonUpdate) RemoveAccountIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) RemoveAccounts(a ...*Account) *PersonUpdate
- func (pu *PersonUpdate) RemoveAdminOf(d ...*Domain) *PersonUpdate
- func (pu *PersonUpdate) RemoveAdminOfIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) RemoveContactIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) RemoveContacts(c ...*Contact) *PersonUpdate
- func (pu *PersonUpdate) RemoveDomainIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) RemoveDomains(d ...*Domain) *PersonUpdate
- func (pu *PersonUpdate) RemoveSurveyIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) RemoveSurveys(s ...*Survey) *PersonUpdate
- func (pu *PersonUpdate) Save(ctx context.Context) (int, error)
- func (pu *PersonUpdate) SaveX(ctx context.Context) int
- func (pu *PersonUpdate) SetLastActivity(t time.Time) *PersonUpdate
- func (pu *PersonUpdate) SetName(s string) *PersonUpdate
- func (pu *PersonUpdate) SetNillableLastActivity(t *time.Time) *PersonUpdate
- func (pu *PersonUpdate) SetNillablePicture(s *string) *PersonUpdate
- func (pu *PersonUpdate) SetNillableUsername(s *string) *PersonUpdate
- func (pu *PersonUpdate) SetPicture(s string) *PersonUpdate
- func (pu *PersonUpdate) SetRoles(s []string) *PersonUpdate
- func (pu *PersonUpdate) SetUsername(s string) *PersonUpdate
- func (pu *PersonUpdate) Where(ps ...predicate.Person) *PersonUpdate
- type PersonUpdateOne
- func (puo *PersonUpdateOne) AddAccountIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) AddAccounts(a ...*Account) *PersonUpdateOne
- func (puo *PersonUpdateOne) AddAdminOf(d ...*Domain) *PersonUpdateOne
- func (puo *PersonUpdateOne) AddAdminOfIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) AddContactIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) AddContacts(c ...*Contact) *PersonUpdateOne
- func (puo *PersonUpdateOne) AddDomainIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) AddDomains(d ...*Domain) *PersonUpdateOne
- func (puo *PersonUpdateOne) AddSurveyIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) AddSurveys(s ...*Survey) *PersonUpdateOne
- func (puo *PersonUpdateOne) ClearPicture() *PersonUpdateOne
- func (puo *PersonUpdateOne) ClearRoles() *PersonUpdateOne
- func (puo *PersonUpdateOne) ClearUsername() *PersonUpdateOne
- func (puo *PersonUpdateOne) Exec(ctx context.Context) error
- func (puo *PersonUpdateOne) ExecX(ctx context.Context)
- func (puo *PersonUpdateOne) RemoveAccountIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) RemoveAccounts(a ...*Account) *PersonUpdateOne
- func (puo *PersonUpdateOne) RemoveAdminOf(d ...*Domain) *PersonUpdateOne
- func (puo *PersonUpdateOne) RemoveAdminOfIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) RemoveContactIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) RemoveContacts(c ...*Contact) *PersonUpdateOne
- func (puo *PersonUpdateOne) RemoveDomainIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) RemoveDomains(d ...*Domain) *PersonUpdateOne
- func (puo *PersonUpdateOne) RemoveSurveyIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) RemoveSurveys(s ...*Survey) *PersonUpdateOne
- func (puo *PersonUpdateOne) Save(ctx context.Context) (*Person, error)
- func (puo *PersonUpdateOne) SaveX(ctx context.Context) *Person
- func (puo *PersonUpdateOne) SetLastActivity(t time.Time) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetName(s string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableLastActivity(t *time.Time) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillablePicture(s *string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableUsername(s *string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetPicture(s string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetRoles(s []string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetUsername(s string) *PersonUpdateOne
- type Persons
- type Policy
- type Query
- type Question
- type QuestionClient
- func (c *QuestionClient) Create() *QuestionCreate
- func (c *QuestionClient) Delete() *QuestionDelete
- func (c *QuestionClient) DeleteOne(q *Question) *QuestionDeleteOne
- func (c *QuestionClient) DeleteOneID(id uuid.UUID) *QuestionDeleteOne
- func (c *QuestionClient) Get(ctx context.Context, id uuid.UUID) (*Question, error)
- func (c *QuestionClient) GetX(ctx context.Context, id uuid.UUID) *Question
- func (c *QuestionClient) Hooks() []Hook
- func (c *QuestionClient) Query() *QuestionQuery
- func (c *QuestionClient) QueryAnswers(q *Question) *AnswerQuery
- func (c *QuestionClient) QueryFlow(q *Question) *FlowQuery
- func (c *QuestionClient) QueryInput(q *Question) *InputQuery
- func (c *QuestionClient) Update() *QuestionUpdate
- func (c *QuestionClient) UpdateOne(q *Question) *QuestionUpdateOne
- func (c *QuestionClient) UpdateOneID(id uuid.UUID) *QuestionUpdateOne
- func (c *QuestionClient) Use(hooks ...Hook)
- type QuestionCreate
- func (qc *QuestionCreate) AddAnswerIDs(ids ...uuid.UUID) *QuestionCreate
- func (qc *QuestionCreate) AddAnswers(a ...*Answer) *QuestionCreate
- func (qc *QuestionCreate) Save(ctx context.Context) (*Question, error)
- func (qc *QuestionCreate) SaveX(ctx context.Context) *Question
- func (qc *QuestionCreate) SetAnonymous(b bool) *QuestionCreate
- func (qc *QuestionCreate) SetDescription(s string) *QuestionCreate
- func (qc *QuestionCreate) SetFlow(f *Flow) *QuestionCreate
- func (qc *QuestionCreate) SetFlowID(id uuid.UUID) *QuestionCreate
- func (qc *QuestionCreate) SetHash(s string) *QuestionCreate
- func (qc *QuestionCreate) SetID(u uuid.UUID) *QuestionCreate
- func (qc *QuestionCreate) SetInput(i *Input) *QuestionCreate
- func (qc *QuestionCreate) SetInputID(id uuid.UUID) *QuestionCreate
- func (qc *QuestionCreate) SetMetadata(m map[string]interface{}) *QuestionCreate
- func (qc *QuestionCreate) SetNillableAnonymous(b *bool) *QuestionCreate
- func (qc *QuestionCreate) SetNillableFlowID(id *uuid.UUID) *QuestionCreate
- func (qc *QuestionCreate) SetNillableInputID(id *uuid.UUID) *QuestionCreate
- func (qc *QuestionCreate) SetNillableValidator(s *string) *QuestionCreate
- func (qc *QuestionCreate) SetTitle(s string) *QuestionCreate
- func (qc *QuestionCreate) SetValidator(s string) *QuestionCreate
- type QuestionDelete
- type QuestionDeleteOne
- type QuestionEdges
- type QuestionGroupBy
- func (qgb *QuestionGroupBy) Aggregate(fns ...Aggregate) *QuestionGroupBy
- func (qgb *QuestionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (qgb *QuestionGroupBy) BoolsX(ctx context.Context) []bool
- func (qgb *QuestionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (qgb *QuestionGroupBy) Float64sX(ctx context.Context) []float64
- func (qgb *QuestionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (qgb *QuestionGroupBy) IntsX(ctx context.Context) []int
- func (qgb *QuestionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (qgb *QuestionGroupBy) ScanX(ctx context.Context, v interface{})
- func (qgb *QuestionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (qgb *QuestionGroupBy) StringsX(ctx context.Context) []string
- type QuestionMutation
- func (m *QuestionMutation) AddAnswerIDs(ids ...uuid.UUID)
- func (m *QuestionMutation) AddField(name string, value ent.Value) error
- func (m *QuestionMutation) AddedEdges() []string
- func (m *QuestionMutation) AddedField(name string) (ent.Value, bool)
- func (m *QuestionMutation) AddedFields() []string
- func (m *QuestionMutation) AddedIDs(name string) []ent.Value
- func (m *QuestionMutation) Anonymous() (r bool, exists bool)
- func (m *QuestionMutation) AnswersIDs() (ids []uuid.UUID)
- func (m *QuestionMutation) ClearEdge(name string) error
- func (m *QuestionMutation) ClearField(name string) error
- func (m *QuestionMutation) ClearFlow()
- func (m *QuestionMutation) ClearInput()
- func (m *QuestionMutation) ClearMetadata()
- func (m *QuestionMutation) ClearValidator()
- func (m *QuestionMutation) ClearedEdges() []string
- func (m *QuestionMutation) ClearedFields() []string
- func (m QuestionMutation) Client() *Client
- func (m *QuestionMutation) Description() (r string, exists bool)
- func (m *QuestionMutation) EdgeCleared(name string) bool
- func (m *QuestionMutation) Field(name string) (ent.Value, bool)
- func (m *QuestionMutation) FieldCleared(name string) bool
- func (m *QuestionMutation) Fields() []string
- func (m *QuestionMutation) FlowCleared() bool
- func (m *QuestionMutation) FlowID() (id uuid.UUID, exists bool)
- func (m *QuestionMutation) FlowIDs() (ids []uuid.UUID)
- func (m *QuestionMutation) Hash() (r string, exists bool)
- func (m *QuestionMutation) ID() (id uuid.UUID, exists bool)
- func (m *QuestionMutation) InputCleared() bool
- func (m *QuestionMutation) InputID() (id uuid.UUID, exists bool)
- func (m *QuestionMutation) InputIDs() (ids []uuid.UUID)
- func (m *QuestionMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *QuestionMutation) MetadataCleared() bool
- func (m *QuestionMutation) Op() Op
- func (m *QuestionMutation) RemoveAnswerIDs(ids ...uuid.UUID)
- func (m *QuestionMutation) RemovedAnswersIDs() (ids []uuid.UUID)
- func (m *QuestionMutation) RemovedEdges() []string
- func (m *QuestionMutation) RemovedIDs(name string) []ent.Value
- func (m *QuestionMutation) ResetAnonymous()
- func (m *QuestionMutation) ResetAnswers()
- func (m *QuestionMutation) ResetDescription()
- func (m *QuestionMutation) ResetEdge(name string) error
- func (m *QuestionMutation) ResetField(name string) error
- func (m *QuestionMutation) ResetFlow()
- func (m *QuestionMutation) ResetHash()
- func (m *QuestionMutation) ResetInput()
- func (m *QuestionMutation) ResetMetadata()
- func (m *QuestionMutation) ResetTitle()
- func (m *QuestionMutation) ResetValidator()
- func (m *QuestionMutation) SetAnonymous(b bool)
- func (m *QuestionMutation) SetDescription(s string)
- func (m *QuestionMutation) SetField(name string, value ent.Value) error
- func (m *QuestionMutation) SetFlowID(id uuid.UUID)
- func (m *QuestionMutation) SetHash(s string)
- func (m *QuestionMutation) SetID(id uuid.UUID)
- func (m *QuestionMutation) SetInputID(id uuid.UUID)
- func (m *QuestionMutation) SetMetadata(value map[string]interface{})
- func (m *QuestionMutation) SetTitle(s string)
- func (m *QuestionMutation) SetValidator(s string)
- func (m *QuestionMutation) Title() (r string, exists bool)
- func (m QuestionMutation) Tx() (*Tx, error)
- func (m *QuestionMutation) Type() string
- func (m *QuestionMutation) Validator() (r string, exists bool)
- func (m *QuestionMutation) ValidatorCleared() bool
- type QuestionQuery
- func (qq *QuestionQuery) All(ctx context.Context) ([]*Question, error)
- func (qq *QuestionQuery) AllX(ctx context.Context) []*Question
- func (qq *QuestionQuery) Clone() *QuestionQuery
- func (qq *QuestionQuery) Count(ctx context.Context) (int, error)
- func (qq *QuestionQuery) CountX(ctx context.Context) int
- func (qq *QuestionQuery) Exist(ctx context.Context) (bool, error)
- func (qq *QuestionQuery) ExistX(ctx context.Context) bool
- func (qq *QuestionQuery) First(ctx context.Context) (*Question, error)
- func (qq *QuestionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (qq *QuestionQuery) FirstX(ctx context.Context) *Question
- func (qq *QuestionQuery) FirstXID(ctx context.Context) uuid.UUID
- func (qq *QuestionQuery) GroupBy(field string, fields ...string) *QuestionGroupBy
- func (qq *QuestionQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (qq *QuestionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (qq *QuestionQuery) Limit(limit int) *QuestionQuery
- func (qq *QuestionQuery) Offset(offset int) *QuestionQuery
- func (qq *QuestionQuery) Only(ctx context.Context) (*Question, error)
- func (qq *QuestionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (qq *QuestionQuery) OnlyX(ctx context.Context) *Question
- func (qq *QuestionQuery) OnlyXID(ctx context.Context) uuid.UUID
- func (qq *QuestionQuery) Order(o ...Order) *QuestionQuery
- func (qq *QuestionQuery) QueryAnswers() *AnswerQuery
- func (qq *QuestionQuery) QueryFlow() *FlowQuery
- func (qq *QuestionQuery) QueryInput() *InputQuery
- func (qq *QuestionQuery) Select(field string, fields ...string) *QuestionSelect
- func (qq *QuestionQuery) Where(ps ...predicate.Question) *QuestionQuery
- func (qq *QuestionQuery) WithAnswers(opts ...func(*AnswerQuery)) *QuestionQuery
- func (qq *QuestionQuery) WithFlow(opts ...func(*FlowQuery)) *QuestionQuery
- func (qq *QuestionQuery) WithInput(opts ...func(*InputQuery)) *QuestionQuery
- type QuestionSelect
- func (qs *QuestionSelect) Bools(ctx context.Context) ([]bool, error)
- func (qs *QuestionSelect) BoolsX(ctx context.Context) []bool
- func (qs *QuestionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (qs *QuestionSelect) Float64sX(ctx context.Context) []float64
- func (qs *QuestionSelect) Ints(ctx context.Context) ([]int, error)
- func (qs *QuestionSelect) IntsX(ctx context.Context) []int
- func (qs *QuestionSelect) Scan(ctx context.Context, v interface{}) error
- func (qs *QuestionSelect) ScanX(ctx context.Context, v interface{})
- func (qs *QuestionSelect) Strings(ctx context.Context) ([]string, error)
- func (qs *QuestionSelect) StringsX(ctx context.Context) []string
- type QuestionUpdate
- func (qu *QuestionUpdate) AddAnswerIDs(ids ...uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) AddAnswers(a ...*Answer) *QuestionUpdate
- func (qu *QuestionUpdate) ClearFlow() *QuestionUpdate
- func (qu *QuestionUpdate) ClearInput() *QuestionUpdate
- func (qu *QuestionUpdate) ClearMetadata() *QuestionUpdate
- func (qu *QuestionUpdate) Exec(ctx context.Context) error
- func (qu *QuestionUpdate) ExecX(ctx context.Context)
- func (qu *QuestionUpdate) RemoveAnswerIDs(ids ...uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) RemoveAnswers(a ...*Answer) *QuestionUpdate
- func (qu *QuestionUpdate) Save(ctx context.Context) (int, error)
- func (qu *QuestionUpdate) SaveX(ctx context.Context) int
- func (qu *QuestionUpdate) SetAnonymous(b bool) *QuestionUpdate
- func (qu *QuestionUpdate) SetDescription(s string) *QuestionUpdate
- func (qu *QuestionUpdate) SetFlow(f *Flow) *QuestionUpdate
- func (qu *QuestionUpdate) SetFlowID(id uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) SetHash(s string) *QuestionUpdate
- func (qu *QuestionUpdate) SetInput(i *Input) *QuestionUpdate
- func (qu *QuestionUpdate) SetInputID(id uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) SetMetadata(m map[string]interface{}) *QuestionUpdate
- func (qu *QuestionUpdate) SetNillableAnonymous(b *bool) *QuestionUpdate
- func (qu *QuestionUpdate) SetNillableFlowID(id *uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) SetNillableInputID(id *uuid.UUID) *QuestionUpdate
- func (qu *QuestionUpdate) SetTitle(s string) *QuestionUpdate
- func (qu *QuestionUpdate) Where(ps ...predicate.Question) *QuestionUpdate
- type QuestionUpdateOne
- func (quo *QuestionUpdateOne) AddAnswerIDs(ids ...uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) AddAnswers(a ...*Answer) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) ClearFlow() *QuestionUpdateOne
- func (quo *QuestionUpdateOne) ClearInput() *QuestionUpdateOne
- func (quo *QuestionUpdateOne) ClearMetadata() *QuestionUpdateOne
- func (quo *QuestionUpdateOne) Exec(ctx context.Context) error
- func (quo *QuestionUpdateOne) ExecX(ctx context.Context)
- func (quo *QuestionUpdateOne) RemoveAnswerIDs(ids ...uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) RemoveAnswers(a ...*Answer) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) Save(ctx context.Context) (*Question, error)
- func (quo *QuestionUpdateOne) SaveX(ctx context.Context) *Question
- func (quo *QuestionUpdateOne) SetAnonymous(b bool) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetDescription(s string) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetFlow(f *Flow) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetFlowID(id uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetHash(s string) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetInput(i *Input) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetInputID(id uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetMetadata(m map[string]interface{}) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetNillableAnonymous(b *bool) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetNillableFlowID(id *uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetNillableInputID(id *uuid.UUID) *QuestionUpdateOne
- func (quo *QuestionUpdateOne) SetTitle(s string) *QuestionUpdateOne
- type Questions
- type Short
- type ShortClient
- func (c *ShortClient) Create() *ShortCreate
- func (c *ShortClient) Delete() *ShortDelete
- func (c *ShortClient) DeleteOne(s *Short) *ShortDeleteOne
- func (c *ShortClient) DeleteOneID(id int) *ShortDeleteOne
- func (c *ShortClient) Get(ctx context.Context, id int) (*Short, error)
- func (c *ShortClient) GetX(ctx context.Context, id int) *Short
- func (c *ShortClient) Hooks() []Hook
- func (c *ShortClient) Query() *ShortQuery
- func (c *ShortClient) Update() *ShortUpdate
- func (c *ShortClient) UpdateOne(s *Short) *ShortUpdateOne
- func (c *ShortClient) UpdateOneID(id int) *ShortUpdateOne
- func (c *ShortClient) Use(hooks ...Hook)
- type ShortCreate
- type ShortDelete
- type ShortDeleteOne
- type ShortGroupBy
- func (sgb *ShortGroupBy) Aggregate(fns ...Aggregate) *ShortGroupBy
- func (sgb *ShortGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sgb *ShortGroupBy) BoolsX(ctx context.Context) []bool
- func (sgb *ShortGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sgb *ShortGroupBy) Float64sX(ctx context.Context) []float64
- func (sgb *ShortGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sgb *ShortGroupBy) IntsX(ctx context.Context) []int
- func (sgb *ShortGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sgb *ShortGroupBy) ScanX(ctx context.Context, v interface{})
- func (sgb *ShortGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sgb *ShortGroupBy) StringsX(ctx context.Context) []string
- type ShortMutation
- func (m *ShortMutation) AddField(name string, value ent.Value) error
- func (m *ShortMutation) AddedEdges() []string
- func (m *ShortMutation) AddedField(name string) (ent.Value, bool)
- func (m *ShortMutation) AddedFields() []string
- func (m *ShortMutation) AddedIDs(name string) []ent.Value
- func (m *ShortMutation) ClearEdge(name string) error
- func (m *ShortMutation) ClearField(name string) error
- func (m *ShortMutation) ClearedEdges() []string
- func (m *ShortMutation) ClearedFields() []string
- func (m ShortMutation) Client() *Client
- func (m *ShortMutation) EdgeCleared(name string) bool
- func (m *ShortMutation) Field(name string) (ent.Value, bool)
- func (m *ShortMutation) FieldCleared(name string) bool
- func (m *ShortMutation) Fields() []string
- func (m *ShortMutation) ID() (id int, exists bool)
- func (m *ShortMutation) Key() (r string, exists bool)
- func (m *ShortMutation) Op() Op
- func (m *ShortMutation) RemovedEdges() []string
- func (m *ShortMutation) RemovedIDs(name string) []ent.Value
- func (m *ShortMutation) ResetEdge(name string) error
- func (m *ShortMutation) ResetField(name string) error
- func (m *ShortMutation) ResetKey()
- func (m *ShortMutation) ResetValue()
- func (m *ShortMutation) SetField(name string, value ent.Value) error
- func (m *ShortMutation) SetKey(s string)
- func (m *ShortMutation) SetValue(u uuid.UUID)
- func (m ShortMutation) Tx() (*Tx, error)
- func (m *ShortMutation) Type() string
- func (m *ShortMutation) Value() (r uuid.UUID, exists bool)
- type ShortQuery
- func (sq *ShortQuery) All(ctx context.Context) ([]*Short, error)
- func (sq *ShortQuery) AllX(ctx context.Context) []*Short
- func (sq *ShortQuery) Clone() *ShortQuery
- func (sq *ShortQuery) Count(ctx context.Context) (int, error)
- func (sq *ShortQuery) CountX(ctx context.Context) int
- func (sq *ShortQuery) Exist(ctx context.Context) (bool, error)
- func (sq *ShortQuery) ExistX(ctx context.Context) bool
- func (sq *ShortQuery) First(ctx context.Context) (*Short, error)
- func (sq *ShortQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *ShortQuery) FirstX(ctx context.Context) *Short
- func (sq *ShortQuery) FirstXID(ctx context.Context) int
- func (sq *ShortQuery) GroupBy(field string, fields ...string) *ShortGroupBy
- func (sq *ShortQuery) IDs(ctx context.Context) ([]int, error)
- func (sq *ShortQuery) IDsX(ctx context.Context) []int
- func (sq *ShortQuery) Limit(limit int) *ShortQuery
- func (sq *ShortQuery) Offset(offset int) *ShortQuery
- func (sq *ShortQuery) Only(ctx context.Context) (*Short, error)
- func (sq *ShortQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *ShortQuery) OnlyX(ctx context.Context) *Short
- func (sq *ShortQuery) OnlyXID(ctx context.Context) int
- func (sq *ShortQuery) Order(o ...Order) *ShortQuery
- func (sq *ShortQuery) Select(field string, fields ...string) *ShortSelect
- func (sq *ShortQuery) Where(ps ...predicate.Short) *ShortQuery
- type ShortSelect
- func (ss *ShortSelect) Bools(ctx context.Context) ([]bool, error)
- func (ss *ShortSelect) BoolsX(ctx context.Context) []bool
- func (ss *ShortSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ss *ShortSelect) Float64sX(ctx context.Context) []float64
- func (ss *ShortSelect) Ints(ctx context.Context) ([]int, error)
- func (ss *ShortSelect) IntsX(ctx context.Context) []int
- func (ss *ShortSelect) Scan(ctx context.Context, v interface{}) error
- func (ss *ShortSelect) ScanX(ctx context.Context, v interface{})
- func (ss *ShortSelect) Strings(ctx context.Context) ([]string, error)
- func (ss *ShortSelect) StringsX(ctx context.Context) []string
- type ShortUpdate
- type ShortUpdateOne
- type Shorts
- type Survey
- type SurveyClient
- func (c *SurveyClient) Create() *SurveyCreate
- func (c *SurveyClient) Delete() *SurveyDelete
- func (c *SurveyClient) DeleteOne(s *Survey) *SurveyDeleteOne
- func (c *SurveyClient) DeleteOneID(id uuid.UUID) *SurveyDeleteOne
- func (c *SurveyClient) Get(ctx context.Context, id uuid.UUID) (*Survey, error)
- func (c *SurveyClient) GetX(ctx context.Context, id uuid.UUID) *Survey
- func (c *SurveyClient) Hooks() []Hook
- func (c *SurveyClient) Query() *SurveyQuery
- func (c *SurveyClient) QueryFlow(s *Survey) *FlowQuery
- func (c *SurveyClient) QueryFor(s *Survey) *PersonQuery
- func (c *SurveyClient) QueryOwner(s *Survey) *DomainQuery
- func (c *SurveyClient) Update() *SurveyUpdate
- func (c *SurveyClient) UpdateOne(s *Survey) *SurveyUpdateOne
- func (c *SurveyClient) UpdateOneID(id uuid.UUID) *SurveyUpdateOne
- func (c *SurveyClient) Use(hooks ...Hook)
- type SurveyCreate
- func (sc *SurveyCreate) Save(ctx context.Context) (*Survey, error)
- func (sc *SurveyCreate) SaveX(ctx context.Context) *Survey
- func (sc *SurveyCreate) SetDescription(s string) *SurveyCreate
- func (sc *SurveyCreate) SetDone(b bool) *SurveyCreate
- func (sc *SurveyCreate) SetDueDate(t time.Time) *SurveyCreate
- func (sc *SurveyCreate) SetFlow(f *Flow) *SurveyCreate
- func (sc *SurveyCreate) SetFlowID(id uuid.UUID) *SurveyCreate
- func (sc *SurveyCreate) SetFor(p *Person) *SurveyCreate
- func (sc *SurveyCreate) SetForID(id uuid.UUID) *SurveyCreate
- func (sc *SurveyCreate) SetID(u uuid.UUID) *SurveyCreate
- func (sc *SurveyCreate) SetIsPublic(b bool) *SurveyCreate
- func (sc *SurveyCreate) SetLastInteraction(t time.Time) *SurveyCreate
- func (sc *SurveyCreate) SetMetadata(m map[string]interface{}) *SurveyCreate
- func (sc *SurveyCreate) SetNillableDescription(s *string) *SurveyCreate
- func (sc *SurveyCreate) SetNillableDone(b *bool) *SurveyCreate
- func (sc *SurveyCreate) SetNillableDueDate(t *time.Time) *SurveyCreate
- func (sc *SurveyCreate) SetNillableIsPublic(b *bool) *SurveyCreate
- func (sc *SurveyCreate) SetNillableOwnerID(id *uuid.UUID) *SurveyCreate
- func (sc *SurveyCreate) SetOwner(d *Domain) *SurveyCreate
- func (sc *SurveyCreate) SetOwnerID(id uuid.UUID) *SurveyCreate
- func (sc *SurveyCreate) SetTags(s []string) *SurveyCreate
- func (sc *SurveyCreate) SetTitle(s string) *SurveyCreate
- type SurveyDelete
- type SurveyDeleteOne
- type SurveyEdges
- type SurveyGroupBy
- func (sgb *SurveyGroupBy) Aggregate(fns ...Aggregate) *SurveyGroupBy
- func (sgb *SurveyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sgb *SurveyGroupBy) BoolsX(ctx context.Context) []bool
- func (sgb *SurveyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sgb *SurveyGroupBy) Float64sX(ctx context.Context) []float64
- func (sgb *SurveyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sgb *SurveyGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SurveyGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sgb *SurveyGroupBy) ScanX(ctx context.Context, v interface{})
- func (sgb *SurveyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sgb *SurveyGroupBy) StringsX(ctx context.Context) []string
- type SurveyMutation
- func (m *SurveyMutation) AddField(name string, value ent.Value) error
- func (m *SurveyMutation) AddedEdges() []string
- func (m *SurveyMutation) AddedField(name string) (ent.Value, bool)
- func (m *SurveyMutation) AddedFields() []string
- func (m *SurveyMutation) AddedIDs(name string) []ent.Value
- func (m *SurveyMutation) ClearDescription()
- func (m *SurveyMutation) ClearDone()
- func (m *SurveyMutation) ClearEdge(name string) error
- func (m *SurveyMutation) ClearField(name string) error
- func (m *SurveyMutation) ClearFlow()
- func (m *SurveyMutation) ClearFor()
- func (m *SurveyMutation) ClearIsPublic()
- func (m *SurveyMutation) ClearMetadata()
- func (m *SurveyMutation) ClearOwner()
- func (m *SurveyMutation) ClearedEdges() []string
- func (m *SurveyMutation) ClearedFields() []string
- func (m SurveyMutation) Client() *Client
- func (m *SurveyMutation) Description() (r string, exists bool)
- func (m *SurveyMutation) DescriptionCleared() bool
- func (m *SurveyMutation) Done() (r bool, exists bool)
- func (m *SurveyMutation) DoneCleared() bool
- func (m *SurveyMutation) DueDate() (r time.Time, exists bool)
- func (m *SurveyMutation) EdgeCleared(name string) bool
- func (m *SurveyMutation) Field(name string) (ent.Value, bool)
- func (m *SurveyMutation) FieldCleared(name string) bool
- func (m *SurveyMutation) Fields() []string
- func (m *SurveyMutation) FlowCleared() bool
- func (m *SurveyMutation) FlowID() (id uuid.UUID, exists bool)
- func (m *SurveyMutation) FlowIDs() (ids []uuid.UUID)
- func (m *SurveyMutation) ForCleared() bool
- func (m *SurveyMutation) ForID() (id uuid.UUID, exists bool)
- func (m *SurveyMutation) ForIDs() (ids []uuid.UUID)
- func (m *SurveyMutation) ID() (id uuid.UUID, exists bool)
- func (m *SurveyMutation) IsPublic() (r bool, exists bool)
- func (m *SurveyMutation) IsPublicCleared() bool
- func (m *SurveyMutation) LastInteraction() (r time.Time, exists bool)
- func (m *SurveyMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *SurveyMutation) MetadataCleared() bool
- func (m *SurveyMutation) Op() Op
- func (m *SurveyMutation) OwnerCleared() bool
- func (m *SurveyMutation) OwnerID() (id uuid.UUID, exists bool)
- func (m *SurveyMutation) OwnerIDs() (ids []uuid.UUID)
- func (m *SurveyMutation) RemovedEdges() []string
- func (m *SurveyMutation) RemovedIDs(name string) []ent.Value
- func (m *SurveyMutation) ResetDescription()
- func (m *SurveyMutation) ResetDone()
- func (m *SurveyMutation) ResetDueDate()
- func (m *SurveyMutation) ResetEdge(name string) error
- func (m *SurveyMutation) ResetField(name string) error
- func (m *SurveyMutation) ResetFlow()
- func (m *SurveyMutation) ResetFor()
- func (m *SurveyMutation) ResetIsPublic()
- func (m *SurveyMutation) ResetLastInteraction()
- func (m *SurveyMutation) ResetMetadata()
- func (m *SurveyMutation) ResetOwner()
- func (m *SurveyMutation) ResetTags()
- func (m *SurveyMutation) ResetTitle()
- func (m *SurveyMutation) SetDescription(s string)
- func (m *SurveyMutation) SetDone(b bool)
- func (m *SurveyMutation) SetDueDate(t time.Time)
- func (m *SurveyMutation) SetField(name string, value ent.Value) error
- func (m *SurveyMutation) SetFlowID(id uuid.UUID)
- func (m *SurveyMutation) SetForID(id uuid.UUID)
- func (m *SurveyMutation) SetID(id uuid.UUID)
- func (m *SurveyMutation) SetIsPublic(b bool)
- func (m *SurveyMutation) SetLastInteraction(t time.Time)
- func (m *SurveyMutation) SetMetadata(value map[string]interface{})
- func (m *SurveyMutation) SetOwnerID(id uuid.UUID)
- func (m *SurveyMutation) SetTags(s []string)
- func (m *SurveyMutation) SetTitle(s string)
- func (m *SurveyMutation) Tags() (r []string, exists bool)
- func (m *SurveyMutation) Title() (r string, exists bool)
- func (m SurveyMutation) Tx() (*Tx, error)
- func (m *SurveyMutation) Type() string
- type SurveyQuery
- func (sq *SurveyQuery) All(ctx context.Context) ([]*Survey, error)
- func (sq *SurveyQuery) AllX(ctx context.Context) []*Survey
- func (sq *SurveyQuery) Clone() *SurveyQuery
- func (sq *SurveyQuery) Count(ctx context.Context) (int, error)
- func (sq *SurveyQuery) CountX(ctx context.Context) int
- func (sq *SurveyQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SurveyQuery) ExistX(ctx context.Context) bool
- func (sq *SurveyQuery) First(ctx context.Context) (*Survey, error)
- func (sq *SurveyQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SurveyQuery) FirstX(ctx context.Context) *Survey
- func (sq *SurveyQuery) FirstXID(ctx context.Context) uuid.UUID
- func (sq *SurveyQuery) GroupBy(field string, fields ...string) *SurveyGroupBy
- func (sq *SurveyQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (sq *SurveyQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sq *SurveyQuery) Limit(limit int) *SurveyQuery
- func (sq *SurveyQuery) Offset(offset int) *SurveyQuery
- func (sq *SurveyQuery) Only(ctx context.Context) (*Survey, error)
- func (sq *SurveyQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SurveyQuery) OnlyX(ctx context.Context) *Survey
- func (sq *SurveyQuery) OnlyXID(ctx context.Context) uuid.UUID
- func (sq *SurveyQuery) Order(o ...Order) *SurveyQuery
- func (sq *SurveyQuery) QueryFlow() *FlowQuery
- func (sq *SurveyQuery) QueryFor() *PersonQuery
- func (sq *SurveyQuery) QueryOwner() *DomainQuery
- func (sq *SurveyQuery) Select(field string, fields ...string) *SurveySelect
- func (sq *SurveyQuery) Where(ps ...predicate.Survey) *SurveyQuery
- func (sq *SurveyQuery) WithFlow(opts ...func(*FlowQuery)) *SurveyQuery
- func (sq *SurveyQuery) WithFor(opts ...func(*PersonQuery)) *SurveyQuery
- func (sq *SurveyQuery) WithOwner(opts ...func(*DomainQuery)) *SurveyQuery
- type SurveySelect
- func (ss *SurveySelect) Bools(ctx context.Context) ([]bool, error)
- func (ss *SurveySelect) BoolsX(ctx context.Context) []bool
- func (ss *SurveySelect) Float64s(ctx context.Context) ([]float64, error)
- func (ss *SurveySelect) Float64sX(ctx context.Context) []float64
- func (ss *SurveySelect) Ints(ctx context.Context) ([]int, error)
- func (ss *SurveySelect) IntsX(ctx context.Context) []int
- func (ss *SurveySelect) Scan(ctx context.Context, v interface{}) error
- func (ss *SurveySelect) ScanX(ctx context.Context, v interface{})
- func (ss *SurveySelect) Strings(ctx context.Context) ([]string, error)
- func (ss *SurveySelect) StringsX(ctx context.Context) []string
- type SurveyUpdate
- func (su *SurveyUpdate) ClearDescription() *SurveyUpdate
- func (su *SurveyUpdate) ClearDone() *SurveyUpdate
- func (su *SurveyUpdate) ClearFlow() *SurveyUpdate
- func (su *SurveyUpdate) ClearFor() *SurveyUpdate
- func (su *SurveyUpdate) ClearIsPublic() *SurveyUpdate
- func (su *SurveyUpdate) ClearMetadata() *SurveyUpdate
- func (su *SurveyUpdate) ClearOwner() *SurveyUpdate
- func (su *SurveyUpdate) Exec(ctx context.Context) error
- func (su *SurveyUpdate) ExecX(ctx context.Context)
- func (su *SurveyUpdate) Save(ctx context.Context) (int, error)
- func (su *SurveyUpdate) SaveX(ctx context.Context) int
- func (su *SurveyUpdate) SetDescription(s string) *SurveyUpdate
- func (su *SurveyUpdate) SetDone(b bool) *SurveyUpdate
- func (su *SurveyUpdate) SetFlow(f *Flow) *SurveyUpdate
- func (su *SurveyUpdate) SetFlowID(id uuid.UUID) *SurveyUpdate
- func (su *SurveyUpdate) SetFor(p *Person) *SurveyUpdate
- func (su *SurveyUpdate) SetForID(id uuid.UUID) *SurveyUpdate
- func (su *SurveyUpdate) SetIsPublic(b bool) *SurveyUpdate
- func (su *SurveyUpdate) SetLastInteraction(t time.Time) *SurveyUpdate
- func (su *SurveyUpdate) SetMetadata(m map[string]interface{}) *SurveyUpdate
- func (su *SurveyUpdate) SetNillableDescription(s *string) *SurveyUpdate
- func (su *SurveyUpdate) SetNillableDone(b *bool) *SurveyUpdate
- func (su *SurveyUpdate) SetNillableIsPublic(b *bool) *SurveyUpdate
- func (su *SurveyUpdate) SetNillableOwnerID(id *uuid.UUID) *SurveyUpdate
- func (su *SurveyUpdate) SetOwner(d *Domain) *SurveyUpdate
- func (su *SurveyUpdate) SetOwnerID(id uuid.UUID) *SurveyUpdate
- func (su *SurveyUpdate) SetTags(s []string) *SurveyUpdate
- func (su *SurveyUpdate) SetTitle(s string) *SurveyUpdate
- func (su *SurveyUpdate) Where(ps ...predicate.Survey) *SurveyUpdate
- type SurveyUpdateOne
- func (suo *SurveyUpdateOne) ClearDescription() *SurveyUpdateOne
- func (suo *SurveyUpdateOne) ClearDone() *SurveyUpdateOne
- func (suo *SurveyUpdateOne) ClearFlow() *SurveyUpdateOne
- func (suo *SurveyUpdateOne) ClearFor() *SurveyUpdateOne
- func (suo *SurveyUpdateOne) ClearIsPublic() *SurveyUpdateOne
- func (suo *SurveyUpdateOne) ClearMetadata() *SurveyUpdateOne
- func (suo *SurveyUpdateOne) ClearOwner() *SurveyUpdateOne
- func (suo *SurveyUpdateOne) Exec(ctx context.Context) error
- func (suo *SurveyUpdateOne) ExecX(ctx context.Context)
- func (suo *SurveyUpdateOne) Save(ctx context.Context) (*Survey, error)
- func (suo *SurveyUpdateOne) SaveX(ctx context.Context) *Survey
- func (suo *SurveyUpdateOne) SetDescription(s string) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetDone(b bool) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetFlow(f *Flow) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetFlowID(id uuid.UUID) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetFor(p *Person) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetForID(id uuid.UUID) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetIsPublic(b bool) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetLastInteraction(t time.Time) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetMetadata(m map[string]interface{}) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetNillableDescription(s *string) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetNillableDone(b *bool) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetNillableIsPublic(b *bool) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetNillableOwnerID(id *uuid.UUID) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetOwner(d *Domain) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetOwnerID(id uuid.UUID) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetTags(s []string) *SurveyUpdateOne
- func (suo *SurveyUpdateOne) SetTitle(s string) *SurveyUpdateOne
- type Surveys
- type Tx
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAccount = "Account" TypeAnswer = "Answer" TypeContact = "Contact" TypeDevice = "Device" TypeDomain = "Domain" TypeFlow = "Flow" TypeIP = "IP" TypeInput = "Input" TypePerson = "Person" TypeQuestion = "Question" TypeShort = "Short" TypeSurvey = "Survey" )
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 NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Account ¶
type Account struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Type holds the value of the "type" field. Type account.Type `json:"type,omitempty"` // Sub holds the value of the "sub" field. Sub string `json:"sub,omitempty"` // RemoteID holds the value of the "remoteID" field. RemoteID string `json:"remoteID,omitempty"` // Secret holds the value of the "secret" field. Secret string `json:"secret,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AccountQuery when eager-loading is set. Edges AccountEdges `json:"edges"` // contains filtered or unexported fields }
Account is the model entity for the Account schema.
func (*Account) QueryOwner ¶
func (a *Account) QueryOwner() *PersonQuery
QueryOwner queries the owner edge of the Account.
func (*Account) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Account) Update ¶
func (a *Account) Update() *AccountUpdateOne
Update returns a builder for updating this Account. Note that, you need to call Account.Unwrap() before calling this method, if this Account was returned from a transaction, and the transaction was committed or rolled back.
type AccountClient ¶
type AccountClient struct {
// contains filtered or unexported fields
}
AccountClient is a client for the Account schema.
func NewAccountClient ¶
func NewAccountClient(c config) *AccountClient
NewAccountClient returns a client for the Account from the given config.
func (*AccountClient) Create ¶
func (c *AccountClient) Create() *AccountCreate
Create returns a create builder for Account.
func (*AccountClient) Delete ¶
func (c *AccountClient) Delete() *AccountDelete
Delete returns a delete builder for Account.
func (*AccountClient) DeleteOne ¶
func (c *AccountClient) DeleteOne(a *Account) *AccountDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*AccountClient) DeleteOneID ¶
func (c *AccountClient) DeleteOneID(id uuid.UUID) *AccountDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*AccountClient) Hooks ¶
func (c *AccountClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AccountClient) Query ¶
func (c *AccountClient) Query() *AccountQuery
Create returns a query builder for Account.
func (*AccountClient) QueryOwner ¶
func (c *AccountClient) QueryOwner(a *Account) *PersonQuery
QueryOwner queries the owner edge of a Account.
func (*AccountClient) Update ¶
func (c *AccountClient) Update() *AccountUpdate
Update returns an update builder for Account.
func (*AccountClient) UpdateOne ¶
func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AccountClient) UpdateOneID ¶
func (c *AccountClient) UpdateOneID(id uuid.UUID) *AccountUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AccountClient) Use ¶
func (c *AccountClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `account.Hooks(f(g(h())))`.
type AccountCreate ¶
type AccountCreate struct {
// contains filtered or unexported fields
}
AccountCreate is the builder for creating a Account entity.
func (*AccountCreate) Save ¶
func (ac *AccountCreate) Save(ctx context.Context) (*Account, error)
Save creates the Account in the database.
func (*AccountCreate) SaveX ¶
func (ac *AccountCreate) SaveX(ctx context.Context) *Account
SaveX calls Save and panics if Save returns an error.
func (*AccountCreate) SetID ¶
func (ac *AccountCreate) SetID(u uuid.UUID) *AccountCreate
SetID sets the id field.
func (*AccountCreate) SetNillableOwnerID ¶
func (ac *AccountCreate) SetNillableOwnerID(id *uuid.UUID) *AccountCreate
SetNillableOwnerID sets the owner edge to Person by id if the given value is not nil.
func (*AccountCreate) SetNillableSecret ¶
func (ac *AccountCreate) SetNillableSecret(s *string) *AccountCreate
SetNillableSecret sets the secret field if the given value is not nil.
func (*AccountCreate) SetOwner ¶
func (ac *AccountCreate) SetOwner(p *Person) *AccountCreate
SetOwner sets the owner edge to Person.
func (*AccountCreate) SetOwnerID ¶
func (ac *AccountCreate) SetOwnerID(id uuid.UUID) *AccountCreate
SetOwnerID sets the owner edge to Person by id.
func (*AccountCreate) SetRemoteID ¶
func (ac *AccountCreate) SetRemoteID(s string) *AccountCreate
SetRemoteID sets the remoteID field.
func (*AccountCreate) SetSecret ¶
func (ac *AccountCreate) SetSecret(s string) *AccountCreate
SetSecret sets the secret field.
func (*AccountCreate) SetSub ¶
func (ac *AccountCreate) SetSub(s string) *AccountCreate
SetSub sets the sub field.
func (*AccountCreate) SetType ¶
func (ac *AccountCreate) SetType(a account.Type) *AccountCreate
SetType sets the type field.
type AccountDelete ¶
type AccountDelete struct {
// contains filtered or unexported fields
}
AccountDelete is the builder for deleting a Account entity.
func (*AccountDelete) Exec ¶
func (ad *AccountDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AccountDelete) ExecX ¶
func (ad *AccountDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AccountDelete) Where ¶
func (ad *AccountDelete) Where(ps ...predicate.Account) *AccountDelete
Where adds a new predicate to the delete builder.
type AccountDeleteOne ¶
type AccountDeleteOne struct {
// contains filtered or unexported fields
}
AccountDeleteOne is the builder for deleting a single Account entity.
func (*AccountDeleteOne) Exec ¶
func (ado *AccountDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AccountDeleteOne) ExecX ¶
func (ado *AccountDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AccountEdges ¶
type AccountEdges struct { // Owner holds the value of the owner edge. Owner *Person // contains filtered or unexported fields }
AccountEdges holds the relations/edges for other nodes in the graph.
func (AccountEdges) OwnerOrErr ¶
func (e AccountEdges) OwnerOrErr() (*Person, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AccountGroupBy ¶
type AccountGroupBy struct {
// contains filtered or unexported fields
}
AccountGroupBy is the builder for group-by Account entities.
func (*AccountGroupBy) Aggregate ¶
func (agb *AccountGroupBy) Aggregate(fns ...Aggregate) *AccountGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AccountGroupBy) Bools ¶
func (agb *AccountGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*AccountGroupBy) BoolsX ¶
func (agb *AccountGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AccountGroupBy) Float64s ¶
func (agb *AccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*AccountGroupBy) Float64sX ¶
func (agb *AccountGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AccountGroupBy) Ints ¶
func (agb *AccountGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*AccountGroupBy) IntsX ¶
func (agb *AccountGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AccountGroupBy) Scan ¶
func (agb *AccountGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*AccountGroupBy) ScanX ¶
func (agb *AccountGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type AccountMutation ¶
type AccountMutation struct {
// contains filtered or unexported fields
}
AccountMutation represents an operation that mutate the Accounts nodes in the graph.
func (*AccountMutation) AddField ¶
func (m *AccountMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*AccountMutation) AddedEdges ¶
func (m *AccountMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AccountMutation) AddedField ¶
func (m *AccountMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*AccountMutation) AddedFields ¶
func (m *AccountMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*AccountMutation) AddedIDs ¶
func (m *AccountMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*AccountMutation) ClearEdge ¶
func (m *AccountMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*AccountMutation) ClearField ¶
func (m *AccountMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*AccountMutation) ClearOwner ¶
func (m *AccountMutation) ClearOwner()
ClearOwner clears the owner edge to Person.
func (*AccountMutation) ClearSecret ¶
func (m *AccountMutation) ClearSecret()
ClearSecret clears the value of secret.
func (*AccountMutation) ClearedEdges ¶
func (m *AccountMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AccountMutation) ClearedFields ¶
func (m *AccountMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AccountMutation) Client ¶
func (m AccountMutation) 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 (*AccountMutation) EdgeCleared ¶
func (m *AccountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*AccountMutation) Field ¶
func (m *AccountMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*AccountMutation) FieldCleared ¶
func (m *AccountMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*AccountMutation) Fields ¶
func (m *AccountMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*AccountMutation) GetType ¶
func (m *AccountMutation) GetType() (r account.Type, exists bool)
GetType returns the type value in the mutation.
func (*AccountMutation) ID ¶
func (m *AccountMutation) ID() (id uuid.UUID, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*AccountMutation) OwnerCleared ¶
func (m *AccountMutation) OwnerCleared() bool
OwnerCleared returns if the edge owner was cleared.
func (*AccountMutation) OwnerID ¶
func (m *AccountMutation) OwnerID() (id uuid.UUID, exists bool)
OwnerID returns the owner id in the mutation.
func (*AccountMutation) OwnerIDs ¶
func (m *AccountMutation) OwnerIDs() (ids []uuid.UUID)
OwnerIDs returns the owner ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*AccountMutation) RemoteID ¶
func (m *AccountMutation) RemoteID() (r string, exists bool)
RemoteID returns the remoteID value in the mutation.
func (*AccountMutation) RemovedEdges ¶
func (m *AccountMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AccountMutation) RemovedIDs ¶
func (m *AccountMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*AccountMutation) ResetEdge ¶
func (m *AccountMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*AccountMutation) ResetField ¶
func (m *AccountMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*AccountMutation) ResetOwner ¶
func (m *AccountMutation) ResetOwner()
ResetOwner reset all changes of the owner edge.
func (*AccountMutation) ResetRemoteID ¶
func (m *AccountMutation) ResetRemoteID()
ResetRemoteID reset all changes of the remoteID field.
func (*AccountMutation) ResetSecret ¶
func (m *AccountMutation) ResetSecret()
ResetSecret reset all changes of the secret field.
func (*AccountMutation) ResetSub ¶
func (m *AccountMutation) ResetSub()
ResetSub reset all changes of the sub field.
func (*AccountMutation) ResetType ¶
func (m *AccountMutation) ResetType()
ResetType reset all changes of the type field.
func (*AccountMutation) Secret ¶
func (m *AccountMutation) Secret() (r string, exists bool)
Secret returns the secret value in the mutation.
func (*AccountMutation) SecretCleared ¶
func (m *AccountMutation) SecretCleared() bool
SecretCleared returns if the field secret was cleared in this mutation.
func (*AccountMutation) SetField ¶
func (m *AccountMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*AccountMutation) SetID ¶
func (m *AccountMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Account creation.
func (*AccountMutation) SetOwnerID ¶
func (m *AccountMutation) SetOwnerID(id uuid.UUID)
SetOwnerID sets the owner edge to Person by id.
func (*AccountMutation) SetRemoteID ¶
func (m *AccountMutation) SetRemoteID(s string)
SetRemoteID sets the remoteID field.
func (*AccountMutation) SetSecret ¶
func (m *AccountMutation) SetSecret(s string)
SetSecret sets the secret field.
func (*AccountMutation) SetSub ¶
func (m *AccountMutation) SetSub(s string)
SetSub sets the sub field.
func (*AccountMutation) SetType ¶
func (m *AccountMutation) SetType(a account.Type)
SetType sets the type field.
func (*AccountMutation) Sub ¶
func (m *AccountMutation) Sub() (r string, exists bool)
Sub returns the sub value in the mutation.
func (AccountMutation) Tx ¶
func (m AccountMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AccountMutation) Type ¶
func (m *AccountMutation) Type() string
Type returns the node type of this mutation (Account).
type AccountQuery ¶
type AccountQuery struct {
// contains filtered or unexported fields
}
AccountQuery is the builder for querying Account entities.
func (*AccountQuery) All ¶
func (aq *AccountQuery) All(ctx context.Context) ([]*Account, error)
All executes the query and returns a list of Accounts.
func (*AccountQuery) AllX ¶
func (aq *AccountQuery) AllX(ctx context.Context) []*Account
AllX is like All, but panics if an error occurs.
func (*AccountQuery) Clone ¶
func (aq *AccountQuery) Clone() *AccountQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AccountQuery) Count ¶
func (aq *AccountQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AccountQuery) CountX ¶
func (aq *AccountQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AccountQuery) Exist ¶
func (aq *AccountQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AccountQuery) ExistX ¶
func (aq *AccountQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AccountQuery) First ¶
func (aq *AccountQuery) First(ctx context.Context) (*Account, error)
First returns the first Account entity in the query. Returns *NotFoundError when no account was found.
func (*AccountQuery) FirstID ¶
FirstID returns the first Account id in the query. Returns *NotFoundError when no id was found.
func (*AccountQuery) FirstX ¶
func (aq *AccountQuery) FirstX(ctx context.Context) *Account
FirstX is like First, but panics if an error occurs.
func (*AccountQuery) FirstXID ¶
func (aq *AccountQuery) FirstXID(ctx context.Context) uuid.UUID
FirstXID is like FirstID, but panics if an error occurs.
func (*AccountQuery) GroupBy ¶
func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy
GroupBy 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 { Type account.Type `json:"type,omitempty"` Count int `json:"count,omitempty"` } client.Account.Query(). GroupBy(account.FieldType). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AccountQuery) IDsX ¶
func (aq *AccountQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AccountQuery) Limit ¶
func (aq *AccountQuery) Limit(limit int) *AccountQuery
Limit adds a limit step to the query.
func (*AccountQuery) Offset ¶
func (aq *AccountQuery) Offset(offset int) *AccountQuery
Offset adds an offset step to the query.
func (*AccountQuery) Only ¶
func (aq *AccountQuery) Only(ctx context.Context) (*Account, error)
Only returns the only Account entity in the query, returns an error if not exactly one entity was returned.
func (*AccountQuery) OnlyID ¶
OnlyID returns the only Account id in the query, returns an error if not exactly one id was returned.
func (*AccountQuery) OnlyX ¶
func (aq *AccountQuery) OnlyX(ctx context.Context) *Account
OnlyX is like Only, but panics if an error occurs.
func (*AccountQuery) OnlyXID ¶
func (aq *AccountQuery) OnlyXID(ctx context.Context) uuid.UUID
OnlyXID is like OnlyID, but panics if an error occurs.
func (*AccountQuery) Order ¶
func (aq *AccountQuery) Order(o ...Order) *AccountQuery
Order adds an order step to the query.
func (*AccountQuery) QueryOwner ¶
func (aq *AccountQuery) QueryOwner() *PersonQuery
QueryOwner chains the current query on the owner edge.
func (*AccountQuery) Select ¶
func (aq *AccountQuery) Select(field string, fields ...string) *AccountSelect
Select one or more fields from the given query.
Example:
var v []struct { Type account.Type `json:"type,omitempty"` } client.Account.Query(). Select(account.FieldType). Scan(ctx, &v)
func (*AccountQuery) Where ¶
func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
Where adds a new predicate for the builder.
func (*AccountQuery) WithOwner ¶
func (aq *AccountQuery) WithOwner(opts ...func(*PersonQuery)) *AccountQuery
WithOwner tells the query-builder to eager-loads the nodes that are connected to
the "owner" edge. The optional arguments used to configure the query builder of the edge.
type AccountSelect ¶
type AccountSelect struct {
// contains filtered or unexported fields
}
AccountSelect is the builder for select fields of Account entities.
func (*AccountSelect) Bools ¶
func (as *AccountSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*AccountSelect) BoolsX ¶
func (as *AccountSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AccountSelect) Float64s ¶
func (as *AccountSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*AccountSelect) Float64sX ¶
func (as *AccountSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AccountSelect) Ints ¶
func (as *AccountSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*AccountSelect) IntsX ¶
func (as *AccountSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AccountSelect) Scan ¶
func (as *AccountSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*AccountSelect) ScanX ¶
func (as *AccountSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type AccountUpdate ¶
type AccountUpdate struct {
// contains filtered or unexported fields
}
AccountUpdate is the builder for updating Account entities.
func (*AccountUpdate) ClearOwner ¶
func (au *AccountUpdate) ClearOwner() *AccountUpdate
ClearOwner clears the owner edge to Person.
func (*AccountUpdate) ClearSecret ¶
func (au *AccountUpdate) ClearSecret() *AccountUpdate
ClearSecret clears the value of secret.
func (*AccountUpdate) Exec ¶
func (au *AccountUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUpdate) ExecX ¶
func (au *AccountUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpdate) Save ¶
func (au *AccountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*AccountUpdate) SaveX ¶
func (au *AccountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdate) SetNillableOwnerID ¶
func (au *AccountUpdate) SetNillableOwnerID(id *uuid.UUID) *AccountUpdate
SetNillableOwnerID sets the owner edge to Person by id if the given value is not nil.
func (*AccountUpdate) SetNillableSecret ¶
func (au *AccountUpdate) SetNillableSecret(s *string) *AccountUpdate
SetNillableSecret sets the secret field if the given value is not nil.
func (*AccountUpdate) SetOwner ¶
func (au *AccountUpdate) SetOwner(p *Person) *AccountUpdate
SetOwner sets the owner edge to Person.
func (*AccountUpdate) SetOwnerID ¶
func (au *AccountUpdate) SetOwnerID(id uuid.UUID) *AccountUpdate
SetOwnerID sets the owner edge to Person by id.
func (*AccountUpdate) SetRemoteID ¶
func (au *AccountUpdate) SetRemoteID(s string) *AccountUpdate
SetRemoteID sets the remoteID field.
func (*AccountUpdate) SetSecret ¶
func (au *AccountUpdate) SetSecret(s string) *AccountUpdate
SetSecret sets the secret field.
func (*AccountUpdate) SetSub ¶
func (au *AccountUpdate) SetSub(s string) *AccountUpdate
SetSub sets the sub field.
func (*AccountUpdate) SetType ¶
func (au *AccountUpdate) SetType(a account.Type) *AccountUpdate
SetType sets the type field.
func (*AccountUpdate) Where ¶
func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
Where adds a new predicate for the builder.
type AccountUpdateOne ¶
type AccountUpdateOne struct {
// contains filtered or unexported fields
}
AccountUpdateOne is the builder for updating a single Account entity.
func (*AccountUpdateOne) ClearOwner ¶
func (auo *AccountUpdateOne) ClearOwner() *AccountUpdateOne
ClearOwner clears the owner edge to Person.
func (*AccountUpdateOne) ClearSecret ¶
func (auo *AccountUpdateOne) ClearSecret() *AccountUpdateOne
ClearSecret clears the value of secret.
func (*AccountUpdateOne) Exec ¶
func (auo *AccountUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AccountUpdateOne) ExecX ¶
func (auo *AccountUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpdateOne) Save ¶
func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)
Save executes the query and returns the updated entity.
func (*AccountUpdateOne) SaveX ¶
func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdateOne) SetNillableOwnerID ¶
func (auo *AccountUpdateOne) SetNillableOwnerID(id *uuid.UUID) *AccountUpdateOne
SetNillableOwnerID sets the owner edge to Person by id if the given value is not nil.
func (*AccountUpdateOne) SetNillableSecret ¶
func (auo *AccountUpdateOne) SetNillableSecret(s *string) *AccountUpdateOne
SetNillableSecret sets the secret field if the given value is not nil.
func (*AccountUpdateOne) SetOwner ¶
func (auo *AccountUpdateOne) SetOwner(p *Person) *AccountUpdateOne
SetOwner sets the owner edge to Person.
func (*AccountUpdateOne) SetOwnerID ¶
func (auo *AccountUpdateOne) SetOwnerID(id uuid.UUID) *AccountUpdateOne
SetOwnerID sets the owner edge to Person by id.
func (*AccountUpdateOne) SetRemoteID ¶
func (auo *AccountUpdateOne) SetRemoteID(s string) *AccountUpdateOne
SetRemoteID sets the remoteID field.
func (*AccountUpdateOne) SetSecret ¶
func (auo *AccountUpdateOne) SetSecret(s string) *AccountUpdateOne
SetSecret sets the secret field.
func (*AccountUpdateOne) SetSub ¶
func (auo *AccountUpdateOne) SetSub(s string) *AccountUpdateOne
SetSub sets the sub field.
func (*AccountUpdateOne) SetType ¶
func (auo *AccountUpdateOne) SetType(a account.Type) *AccountUpdateOne
SetType sets the type field.
type Aggregate ¶
Aggregate applies an aggregation step on the group-by traversal/selector.
func As ¶
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)
type Answer ¶
type Answer struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // At holds the value of the "at" field. At time.Time `json:"at,omitempty"` // Responses holds the value of the "responses" field. Responses []string `json:"responses,omitempty"` // Valid holds the value of the "valid" field. Valid bool `json:"valid,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AnswerQuery when eager-loading is set. Edges AnswerEdges `json:"edges"` // contains filtered or unexported fields }
Answer is the model entity for the Answer schema.
func (*Answer) QueryQuestion ¶
func (a *Answer) QueryQuestion() *QuestionQuery
QueryQuestion queries the question edge of the Answer.
func (*Answer) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Answer) Update ¶
func (a *Answer) Update() *AnswerUpdateOne
Update returns a builder for updating this Answer. Note that, you need to call Answer.Unwrap() before calling this method, if this Answer was returned from a transaction, and the transaction was committed or rolled back.
type AnswerClient ¶
type AnswerClient struct {
// contains filtered or unexported fields
}
AnswerClient is a client for the Answer schema.
func NewAnswerClient ¶
func NewAnswerClient(c config) *AnswerClient
NewAnswerClient returns a client for the Answer from the given config.
func (*AnswerClient) Create ¶
func (c *AnswerClient) Create() *AnswerCreate
Create returns a create builder for Answer.
func (*AnswerClient) Delete ¶
func (c *AnswerClient) Delete() *AnswerDelete
Delete returns a delete builder for Answer.
func (*AnswerClient) DeleteOne ¶
func (c *AnswerClient) DeleteOne(a *Answer) *AnswerDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*AnswerClient) DeleteOneID ¶
func (c *AnswerClient) DeleteOneID(id uuid.UUID) *AnswerDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*AnswerClient) Query ¶
func (c *AnswerClient) Query() *AnswerQuery
Create returns a query builder for Answer.
func (*AnswerClient) QueryQuestion ¶
func (c *AnswerClient) QueryQuestion(a *Answer) *QuestionQuery
QueryQuestion queries the question edge of a Answer.
func (*AnswerClient) Update ¶
func (c *AnswerClient) Update() *AnswerUpdate
Update returns an update builder for Answer.
func (*AnswerClient) UpdateOne ¶
func (c *AnswerClient) UpdateOne(a *Answer) *AnswerUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AnswerClient) UpdateOneID ¶
func (c *AnswerClient) UpdateOneID(id uuid.UUID) *AnswerUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AnswerClient) Use ¶
func (c *AnswerClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `answer.Hooks(f(g(h())))`.
type AnswerCreate ¶
type AnswerCreate struct {
// contains filtered or unexported fields
}
AnswerCreate is the builder for creating a Answer entity.
func (*AnswerCreate) Save ¶
func (ac *AnswerCreate) Save(ctx context.Context) (*Answer, error)
Save creates the Answer in the database.
func (*AnswerCreate) SaveX ¶
func (ac *AnswerCreate) SaveX(ctx context.Context) *Answer
SaveX calls Save and panics if Save returns an error.
func (*AnswerCreate) SetAt ¶
func (ac *AnswerCreate) SetAt(t time.Time) *AnswerCreate
SetAt sets the at field.
func (*AnswerCreate) SetID ¶
func (ac *AnswerCreate) SetID(u uuid.UUID) *AnswerCreate
SetID sets the id field.
func (*AnswerCreate) SetNillableAt ¶
func (ac *AnswerCreate) SetNillableAt(t *time.Time) *AnswerCreate
SetNillableAt sets the at field if the given value is not nil.
func (*AnswerCreate) SetNillableValid ¶
func (ac *AnswerCreate) SetNillableValid(b *bool) *AnswerCreate
SetNillableValid sets the valid field if the given value is not nil.
func (*AnswerCreate) SetQuestion ¶
func (ac *AnswerCreate) SetQuestion(q *Question) *AnswerCreate
SetQuestion sets the question edge to Question.
func (*AnswerCreate) SetQuestionID ¶
func (ac *AnswerCreate) SetQuestionID(id uuid.UUID) *AnswerCreate
SetQuestionID sets the question edge to Question by id.
func (*AnswerCreate) SetResponses ¶
func (ac *AnswerCreate) SetResponses(s []string) *AnswerCreate
SetResponses sets the responses field.
func (*AnswerCreate) SetValid ¶
func (ac *AnswerCreate) SetValid(b bool) *AnswerCreate
SetValid sets the valid field.
type AnswerDelete ¶
type AnswerDelete struct {
// contains filtered or unexported fields
}
AnswerDelete is the builder for deleting a Answer entity.
func (*AnswerDelete) Exec ¶
func (ad *AnswerDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AnswerDelete) ExecX ¶
func (ad *AnswerDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AnswerDelete) Where ¶
func (ad *AnswerDelete) Where(ps ...predicate.Answer) *AnswerDelete
Where adds a new predicate to the delete builder.
type AnswerDeleteOne ¶
type AnswerDeleteOne struct {
// contains filtered or unexported fields
}
AnswerDeleteOne is the builder for deleting a single Answer entity.
func (*AnswerDeleteOne) Exec ¶
func (ado *AnswerDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AnswerDeleteOne) ExecX ¶
func (ado *AnswerDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AnswerEdges ¶
type AnswerEdges struct { // Question holds the value of the question edge. Question *Question // contains filtered or unexported fields }
AnswerEdges holds the relations/edges for other nodes in the graph.
func (AnswerEdges) QuestionOrErr ¶
func (e AnswerEdges) QuestionOrErr() (*Question, error)
QuestionOrErr returns the Question value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AnswerGroupBy ¶
type AnswerGroupBy struct {
// contains filtered or unexported fields
}
AnswerGroupBy is the builder for group-by Answer entities.
func (*AnswerGroupBy) Aggregate ¶
func (agb *AnswerGroupBy) Aggregate(fns ...Aggregate) *AnswerGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AnswerGroupBy) Bools ¶
func (agb *AnswerGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*AnswerGroupBy) BoolsX ¶
func (agb *AnswerGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AnswerGroupBy) Float64s ¶
func (agb *AnswerGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*AnswerGroupBy) Float64sX ¶
func (agb *AnswerGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AnswerGroupBy) Ints ¶
func (agb *AnswerGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*AnswerGroupBy) IntsX ¶
func (agb *AnswerGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AnswerGroupBy) Scan ¶
func (agb *AnswerGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*AnswerGroupBy) ScanX ¶
func (agb *AnswerGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type AnswerMutation ¶
type AnswerMutation struct {
// contains filtered or unexported fields
}
AnswerMutation represents an operation that mutate the Answers nodes in the graph.
func (*AnswerMutation) AddField ¶
func (m *AnswerMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*AnswerMutation) AddedEdges ¶
func (m *AnswerMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AnswerMutation) AddedField ¶
func (m *AnswerMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*AnswerMutation) AddedFields ¶
func (m *AnswerMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*AnswerMutation) AddedIDs ¶
func (m *AnswerMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*AnswerMutation) At ¶
func (m *AnswerMutation) At() (r time.Time, exists bool)
At returns the at value in the mutation.
func (*AnswerMutation) ClearEdge ¶
func (m *AnswerMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*AnswerMutation) ClearField ¶
func (m *AnswerMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*AnswerMutation) ClearQuestion ¶
func (m *AnswerMutation) ClearQuestion()
ClearQuestion clears the question edge to Question.
func (*AnswerMutation) ClearValid ¶
func (m *AnswerMutation) ClearValid()
ClearValid clears the value of valid.
func (*AnswerMutation) ClearedEdges ¶
func (m *AnswerMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AnswerMutation) ClearedFields ¶
func (m *AnswerMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AnswerMutation) Client ¶
func (m AnswerMutation) 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 (*AnswerMutation) EdgeCleared ¶
func (m *AnswerMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*AnswerMutation) Field ¶
func (m *AnswerMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*AnswerMutation) FieldCleared ¶
func (m *AnswerMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*AnswerMutation) Fields ¶
func (m *AnswerMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*AnswerMutation) ID ¶
func (m *AnswerMutation) ID() (id uuid.UUID, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*AnswerMutation) QuestionCleared ¶
func (m *AnswerMutation) QuestionCleared() bool
QuestionCleared returns if the edge question was cleared.
func (*AnswerMutation) QuestionID ¶
func (m *AnswerMutation) QuestionID() (id uuid.UUID, exists bool)
QuestionID returns the question id in the mutation.
func (*AnswerMutation) QuestionIDs ¶
func (m *AnswerMutation) QuestionIDs() (ids []uuid.UUID)
QuestionIDs returns the question ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use QuestionID instead. It exists only for internal usage by the builders.
func (*AnswerMutation) RemovedEdges ¶
func (m *AnswerMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AnswerMutation) RemovedIDs ¶
func (m *AnswerMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*AnswerMutation) ResetAt ¶
func (m *AnswerMutation) ResetAt()
ResetAt reset all changes of the at field.
func (*AnswerMutation) ResetEdge ¶
func (m *AnswerMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*AnswerMutation) ResetField ¶
func (m *AnswerMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*AnswerMutation) ResetQuestion ¶
func (m *AnswerMutation) ResetQuestion()
ResetQuestion reset all changes of the question edge.
func (*AnswerMutation) ResetResponses ¶
func (m *AnswerMutation) ResetResponses()
ResetResponses reset all changes of the responses field.
func (*AnswerMutation) ResetValid ¶
func (m *AnswerMutation) ResetValid()
ResetValid reset all changes of the valid field.
func (*AnswerMutation) Responses ¶
func (m *AnswerMutation) Responses() (r []string, exists bool)
Responses returns the responses value in the mutation.
func (*AnswerMutation) SetField ¶
func (m *AnswerMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*AnswerMutation) SetID ¶
func (m *AnswerMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Answer creation.
func (*AnswerMutation) SetQuestionID ¶
func (m *AnswerMutation) SetQuestionID(id uuid.UUID)
SetQuestionID sets the question edge to Question by id.
func (*AnswerMutation) SetResponses ¶
func (m *AnswerMutation) SetResponses(s []string)
SetResponses sets the responses field.
func (*AnswerMutation) SetValid ¶
func (m *AnswerMutation) SetValid(b bool)
SetValid sets the valid field.
func (AnswerMutation) Tx ¶
func (m AnswerMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AnswerMutation) Type ¶
func (m *AnswerMutation) Type() string
Type returns the node type of this mutation (Answer).
func (*AnswerMutation) Valid ¶
func (m *AnswerMutation) Valid() (r bool, exists bool)
Valid returns the valid value in the mutation.
func (*AnswerMutation) ValidCleared ¶
func (m *AnswerMutation) ValidCleared() bool
ValidCleared returns if the field valid was cleared in this mutation.
type AnswerQuery ¶
type AnswerQuery struct {
// contains filtered or unexported fields
}
AnswerQuery is the builder for querying Answer entities.
func (*AnswerQuery) All ¶
func (aq *AnswerQuery) All(ctx context.Context) ([]*Answer, error)
All executes the query and returns a list of Answers.
func (*AnswerQuery) AllX ¶
func (aq *AnswerQuery) AllX(ctx context.Context) []*Answer
AllX is like All, but panics if an error occurs.
func (*AnswerQuery) Clone ¶
func (aq *AnswerQuery) Clone() *AnswerQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AnswerQuery) Count ¶
func (aq *AnswerQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AnswerQuery) CountX ¶
func (aq *AnswerQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AnswerQuery) Exist ¶
func (aq *AnswerQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AnswerQuery) ExistX ¶
func (aq *AnswerQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AnswerQuery) First ¶
func (aq *AnswerQuery) First(ctx context.Context) (*Answer, error)
First returns the first Answer entity in the query. Returns *NotFoundError when no answer was found.
func (*AnswerQuery) FirstID ¶
FirstID returns the first Answer id in the query. Returns *NotFoundError when no id was found.
func (*AnswerQuery) FirstX ¶
func (aq *AnswerQuery) FirstX(ctx context.Context) *Answer
FirstX is like First, but panics if an error occurs.
func (*AnswerQuery) FirstXID ¶
func (aq *AnswerQuery) FirstXID(ctx context.Context) uuid.UUID
FirstXID is like FirstID, but panics if an error occurs.
func (*AnswerQuery) GroupBy ¶
func (aq *AnswerQuery) GroupBy(field string, fields ...string) *AnswerGroupBy
GroupBy 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 { At time.Time `json:"at,omitempty"` Count int `json:"count,omitempty"` } client.Answer.Query(). GroupBy(answer.FieldAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AnswerQuery) IDsX ¶
func (aq *AnswerQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AnswerQuery) Limit ¶
func (aq *AnswerQuery) Limit(limit int) *AnswerQuery
Limit adds a limit step to the query.
func (*AnswerQuery) Offset ¶
func (aq *AnswerQuery) Offset(offset int) *AnswerQuery
Offset adds an offset step to the query.
func (*AnswerQuery) Only ¶
func (aq *AnswerQuery) Only(ctx context.Context) (*Answer, error)
Only returns the only Answer entity in the query, returns an error if not exactly one entity was returned.
func (*AnswerQuery) OnlyID ¶
OnlyID returns the only Answer id in the query, returns an error if not exactly one id was returned.
func (*AnswerQuery) OnlyX ¶
func (aq *AnswerQuery) OnlyX(ctx context.Context) *Answer
OnlyX is like Only, but panics if an error occurs.
func (*AnswerQuery) OnlyXID ¶
func (aq *AnswerQuery) OnlyXID(ctx context.Context) uuid.UUID
OnlyXID is like OnlyID, but panics if an error occurs.
func (*AnswerQuery) Order ¶
func (aq *AnswerQuery) Order(o ...Order) *AnswerQuery
Order adds an order step to the query.
func (*AnswerQuery) QueryQuestion ¶
func (aq *AnswerQuery) QueryQuestion() *QuestionQuery
QueryQuestion chains the current query on the question edge.
func (*AnswerQuery) Select ¶
func (aq *AnswerQuery) Select(field string, fields ...string) *AnswerSelect
Select one or more fields from the given query.
Example:
var v []struct { At time.Time `json:"at,omitempty"` } client.Answer.Query(). Select(answer.FieldAt). Scan(ctx, &v)
func (*AnswerQuery) Where ¶
func (aq *AnswerQuery) Where(ps ...predicate.Answer) *AnswerQuery
Where adds a new predicate for the builder.
func (*AnswerQuery) WithQuestion ¶
func (aq *AnswerQuery) WithQuestion(opts ...func(*QuestionQuery)) *AnswerQuery
WithQuestion tells the query-builder to eager-loads the nodes that are connected to
the "question" edge. The optional arguments used to configure the query builder of the edge.
type AnswerSelect ¶
type AnswerSelect struct {
// contains filtered or unexported fields
}
AnswerSelect is the builder for select fields of Answer entities.
func (*AnswerSelect) Bools ¶
func (as *AnswerSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*AnswerSelect) BoolsX ¶
func (as *AnswerSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AnswerSelect) Float64s ¶
func (as *AnswerSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*AnswerSelect) Float64sX ¶
func (as *AnswerSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AnswerSelect) Ints ¶
func (as *AnswerSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*AnswerSelect) IntsX ¶
func (as *AnswerSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AnswerSelect) Scan ¶
func (as *AnswerSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*AnswerSelect) ScanX ¶
func (as *AnswerSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type AnswerUpdate ¶
type AnswerUpdate struct {
// contains filtered or unexported fields
}
AnswerUpdate is the builder for updating Answer entities.
func (*AnswerUpdate) ClearQuestion ¶
func (au *AnswerUpdate) ClearQuestion() *AnswerUpdate
ClearQuestion clears the question edge to Question.
func (*AnswerUpdate) ClearValid ¶
func (au *AnswerUpdate) ClearValid() *AnswerUpdate
ClearValid clears the value of valid.
func (*AnswerUpdate) Exec ¶
func (au *AnswerUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AnswerUpdate) ExecX ¶
func (au *AnswerUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnswerUpdate) Save ¶
func (au *AnswerUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*AnswerUpdate) SaveX ¶
func (au *AnswerUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AnswerUpdate) SetNillableValid ¶
func (au *AnswerUpdate) SetNillableValid(b *bool) *AnswerUpdate
SetNillableValid sets the valid field if the given value is not nil.
func (*AnswerUpdate) SetQuestion ¶
func (au *AnswerUpdate) SetQuestion(q *Question) *AnswerUpdate
SetQuestion sets the question edge to Question.
func (*AnswerUpdate) SetQuestionID ¶
func (au *AnswerUpdate) SetQuestionID(id uuid.UUID) *AnswerUpdate
SetQuestionID sets the question edge to Question by id.
func (*AnswerUpdate) SetValid ¶
func (au *AnswerUpdate) SetValid(b bool) *AnswerUpdate
SetValid sets the valid field.
func (*AnswerUpdate) Where ¶
func (au *AnswerUpdate) Where(ps ...predicate.Answer) *AnswerUpdate
Where adds a new predicate for the builder.
type AnswerUpdateOne ¶
type AnswerUpdateOne struct {
// contains filtered or unexported fields
}
AnswerUpdateOne is the builder for updating a single Answer entity.
func (*AnswerUpdateOne) ClearQuestion ¶
func (auo *AnswerUpdateOne) ClearQuestion() *AnswerUpdateOne
ClearQuestion clears the question edge to Question.
func (*AnswerUpdateOne) ClearValid ¶
func (auo *AnswerUpdateOne) ClearValid() *AnswerUpdateOne
ClearValid clears the value of valid.
func (*AnswerUpdateOne) Exec ¶
func (auo *AnswerUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AnswerUpdateOne) ExecX ¶
func (auo *AnswerUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnswerUpdateOne) Save ¶
func (auo *AnswerUpdateOne) Save(ctx context.Context) (*Answer, error)
Save executes the query and returns the updated entity.
func (*AnswerUpdateOne) SaveX ¶
func (auo *AnswerUpdateOne) SaveX(ctx context.Context) *Answer
SaveX is like Save, but panics if an error occurs.
func (*AnswerUpdateOne) SetNillableValid ¶
func (auo *AnswerUpdateOne) SetNillableValid(b *bool) *AnswerUpdateOne
SetNillableValid sets the valid field if the given value is not nil.
func (*AnswerUpdateOne) SetQuestion ¶
func (auo *AnswerUpdateOne) SetQuestion(q *Question) *AnswerUpdateOne
SetQuestion sets the question edge to Question.
func (*AnswerUpdateOne) SetQuestionID ¶
func (auo *AnswerUpdateOne) SetQuestionID(id uuid.UUID) *AnswerUpdateOne
SetQuestionID sets the question edge to Question by id.
func (*AnswerUpdateOne) SetValid ¶
func (auo *AnswerUpdateOne) SetValid(b bool) *AnswerUpdateOne
SetValid sets the valid field.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Account is the client for interacting with the Account builders. Account *AccountClient // Answer is the client for interacting with the Answer builders. Answer *AnswerClient // Contact is the client for interacting with the Contact builders. Contact *ContactClient // Device is the client for interacting with the Device builders. Device *DeviceClient // Domain is the client for interacting with the Domain builders. Domain *DomainClient // Flow is the client for interacting with the Flow builders. Flow *FlowClient // IP is the client for interacting with the IP builders. IP *IPClient // Input is the client for interacting with the Input builders. Input *InputClient // Person is the client for interacting with the Person builders. Person *PersonClient // Question is the client for interacting with the Question builders. Question *QuestionClient // Short is the client for interacting with the Short builders. Short *ShortClient // Survey is the client for interacting with the Survey builders. Survey *SurveyClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns the Client stored in a context, or nil if there isn't one.
func Open ¶
Open opens a connection to the database specified by the driver name and a driver-specific 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(). Account. Query(). Count(ctx)
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 Contact ¶
type Contact struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // Kind holds the value of the "kind" field. Kind contact.Kind `json:"kind,omitempty"` // Principal holds the value of the "principal" field. Principal bool `json:"principal,omitempty"` // Validated holds the value of the "validated" field. Validated bool `json:"validated,omitempty"` // FromAccount holds the value of the "fromAccount" field. FromAccount bool `json:"fromAccount,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ContactQuery when eager-loading is set. Edges ContactEdges `json:"edges"` // contains filtered or unexported fields }
Contact is the model entity for the Contact schema.
func (*Contact) QueryOwner ¶
func (c *Contact) QueryOwner() *PersonQuery
QueryOwner queries the owner edge of the Contact.
func (*Contact) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Contact) Update ¶
func (c *Contact) Update() *ContactUpdateOne
Update returns a builder for updating this Contact. Note that, you need to call Contact.Unwrap() before calling this method, if this Contact was returned from a transaction, and the transaction was committed or rolled back.
type ContactClient ¶
type ContactClient struct {
// contains filtered or unexported fields
}
ContactClient is a client for the Contact schema.
func NewContactClient ¶
func NewContactClient(c config) *ContactClient
NewContactClient returns a client for the Contact from the given config.
func (*ContactClient) Create ¶
func (c *ContactClient) Create() *ContactCreate
Create returns a create builder for Contact.
func (*ContactClient) Delete ¶
func (c *ContactClient) Delete() *ContactDelete
Delete returns a delete builder for Contact.
func (*ContactClient) DeleteOne ¶
func (c *ContactClient) DeleteOne(co *Contact) *ContactDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ContactClient) DeleteOneID ¶
func (c *ContactClient) DeleteOneID(id uuid.UUID) *ContactDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ContactClient) Hooks ¶
func (c *ContactClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ContactClient) Query ¶
func (c *ContactClient) Query() *ContactQuery
Create returns a query builder for Contact.
func (*ContactClient) QueryOwner ¶
func (c *ContactClient) QueryOwner(co *Contact) *PersonQuery
QueryOwner queries the owner edge of a Contact.
func (*ContactClient) Update ¶
func (c *ContactClient) Update() *ContactUpdate
Update returns an update builder for Contact.
func (*ContactClient) UpdateOne ¶
func (c *ContactClient) UpdateOne(co *Contact) *ContactUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ContactClient) UpdateOneID ¶
func (c *ContactClient) UpdateOneID(id uuid.UUID) *ContactUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ContactClient) Use ¶
func (c *ContactClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `contact.Hooks(f(g(h())))`.
type ContactCreate ¶
type ContactCreate struct {
// contains filtered or unexported fields
}
ContactCreate is the builder for creating a Contact entity.
func (*ContactCreate) Save ¶
func (cc *ContactCreate) Save(ctx context.Context) (*Contact, error)
Save creates the Contact in the database.
func (*ContactCreate) SaveX ¶
func (cc *ContactCreate) SaveX(ctx context.Context) *Contact
SaveX calls Save and panics if Save returns an error.
func (*ContactCreate) SetFromAccount ¶
func (cc *ContactCreate) SetFromAccount(b bool) *ContactCreate
SetFromAccount sets the fromAccount field.
func (*ContactCreate) SetID ¶
func (cc *ContactCreate) SetID(u uuid.UUID) *ContactCreate
SetID sets the id field.
func (*ContactCreate) SetKind ¶
func (cc *ContactCreate) SetKind(c contact.Kind) *ContactCreate
SetKind sets the kind field.
func (*ContactCreate) SetName ¶
func (cc *ContactCreate) SetName(s string) *ContactCreate
SetName sets the name field.
func (*ContactCreate) SetNillableFromAccount ¶
func (cc *ContactCreate) SetNillableFromAccount(b *bool) *ContactCreate
SetNillableFromAccount sets the fromAccount field if the given value is not nil.
func (*ContactCreate) SetNillableKind ¶
func (cc *ContactCreate) SetNillableKind(c *contact.Kind) *ContactCreate
SetNillableKind sets the kind field if the given value is not nil.
func (*ContactCreate) SetOwner ¶
func (cc *ContactCreate) SetOwner(p *Person) *ContactCreate
SetOwner sets the owner edge to Person.
func (*ContactCreate) SetOwnerID ¶
func (cc *ContactCreate) SetOwnerID(id uuid.UUID) *ContactCreate
SetOwnerID sets the owner edge to Person by id.
func (*ContactCreate) SetPrincipal ¶
func (cc *ContactCreate) SetPrincipal(b bool) *ContactCreate
SetPrincipal sets the principal field.
func (*ContactCreate) SetValidated ¶
func (cc *ContactCreate) SetValidated(b bool) *ContactCreate
SetValidated sets the validated field.
func (*ContactCreate) SetValue ¶
func (cc *ContactCreate) SetValue(s string) *ContactCreate
SetValue sets the value field.
type ContactDelete ¶
type ContactDelete struct {
// contains filtered or unexported fields
}
ContactDelete is the builder for deleting a Contact entity.
func (*ContactDelete) Exec ¶
func (cd *ContactDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ContactDelete) ExecX ¶
func (cd *ContactDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ContactDelete) Where ¶
func (cd *ContactDelete) Where(ps ...predicate.Contact) *ContactDelete
Where adds a new predicate to the delete builder.
type ContactDeleteOne ¶
type ContactDeleteOne struct {
// contains filtered or unexported fields
}
ContactDeleteOne is the builder for deleting a single Contact entity.
func (*ContactDeleteOne) Exec ¶
func (cdo *ContactDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ContactDeleteOne) ExecX ¶
func (cdo *ContactDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ContactEdges ¶
type ContactEdges struct { // Owner holds the value of the owner edge. Owner *Person // contains filtered or unexported fields }
ContactEdges holds the relations/edges for other nodes in the graph.
func (ContactEdges) OwnerOrErr ¶
func (e ContactEdges) OwnerOrErr() (*Person, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ContactGroupBy ¶
type ContactGroupBy struct {
// contains filtered or unexported fields
}
ContactGroupBy is the builder for group-by Contact entities.
func (*ContactGroupBy) Aggregate ¶
func (cgb *ContactGroupBy) Aggregate(fns ...Aggregate) *ContactGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ContactGroupBy) Bools ¶
func (cgb *ContactGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*ContactGroupBy) BoolsX ¶
func (cgb *ContactGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ContactGroupBy) Float64s ¶
func (cgb *ContactGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*ContactGroupBy) Float64sX ¶
func (cgb *ContactGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ContactGroupBy) Ints ¶
func (cgb *ContactGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*ContactGroupBy) IntsX ¶
func (cgb *ContactGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ContactGroupBy) Scan ¶
func (cgb *ContactGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*ContactGroupBy) ScanX ¶
func (cgb *ContactGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type ContactMutation ¶
type ContactMutation struct {
// contains filtered or unexported fields
}
ContactMutation represents an operation that mutate the Contacts nodes in the graph.
func (*ContactMutation) AddField ¶
func (m *ContactMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*ContactMutation) AddedEdges ¶
func (m *ContactMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ContactMutation) AddedField ¶
func (m *ContactMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*ContactMutation) AddedFields ¶
func (m *ContactMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*ContactMutation) AddedIDs ¶
func (m *ContactMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*ContactMutation) ClearEdge ¶
func (m *ContactMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*ContactMutation) ClearField ¶
func (m *ContactMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*ContactMutation) ClearOwner ¶
func (m *ContactMutation) ClearOwner()
ClearOwner clears the owner edge to Person.
func (*ContactMutation) ClearedEdges ¶
func (m *ContactMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ContactMutation) ClearedFields ¶
func (m *ContactMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ContactMutation) Client ¶
func (m ContactMutation) 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 (*ContactMutation) EdgeCleared ¶
func (m *ContactMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*ContactMutation) Field ¶
func (m *ContactMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*ContactMutation) FieldCleared ¶
func (m *ContactMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*ContactMutation) Fields ¶
func (m *ContactMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*ContactMutation) FromAccount ¶
func (m *ContactMutation) FromAccount() (r bool, exists bool)
FromAccount returns the fromAccount value in the mutation.
func (*ContactMutation) ID ¶
func (m *ContactMutation) ID() (id uuid.UUID, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*ContactMutation) Kind ¶
func (m *ContactMutation) Kind() (r contact.Kind, exists bool)
Kind returns the kind value in the mutation.
func (*ContactMutation) Name ¶
func (m *ContactMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*ContactMutation) OwnerCleared ¶
func (m *ContactMutation) OwnerCleared() bool
OwnerCleared returns if the edge owner was cleared.
func (*ContactMutation) OwnerID ¶
func (m *ContactMutation) OwnerID() (id uuid.UUID, exists bool)
OwnerID returns the owner id in the mutation.
func (*ContactMutation) OwnerIDs ¶
func (m *ContactMutation) OwnerIDs() (ids []uuid.UUID)
OwnerIDs returns the owner ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*ContactMutation) Principal ¶
func (m *ContactMutation) Principal() (r bool, exists bool)
Principal returns the principal value in the mutation.
func (*ContactMutation) RemovedEdges ¶
func (m *ContactMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ContactMutation) RemovedIDs ¶
func (m *ContactMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*ContactMutation) ResetEdge ¶
func (m *ContactMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*ContactMutation) ResetField ¶
func (m *ContactMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*ContactMutation) ResetFromAccount ¶
func (m *ContactMutation) ResetFromAccount()
ResetFromAccount reset all changes of the fromAccount field.
func (*ContactMutation) ResetKind ¶
func (m *ContactMutation) ResetKind()
ResetKind reset all changes of the kind field.
func (*ContactMutation) ResetName ¶
func (m *ContactMutation) ResetName()
ResetName reset all changes of the name field.
func (*ContactMutation) ResetOwner ¶
func (m *ContactMutation) ResetOwner()
ResetOwner reset all changes of the owner edge.
func (*ContactMutation) ResetPrincipal ¶
func (m *ContactMutation) ResetPrincipal()
ResetPrincipal reset all changes of the principal field.
func (*ContactMutation) ResetValidated ¶
func (m *ContactMutation) ResetValidated()
ResetValidated reset all changes of the validated field.
func (*ContactMutation) ResetValue ¶
func (m *ContactMutation) ResetValue()
ResetValue reset all changes of the value field.
func (*ContactMutation) SetField ¶
func (m *ContactMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*ContactMutation) SetFromAccount ¶
func (m *ContactMutation) SetFromAccount(b bool)
SetFromAccount sets the fromAccount field.
func (*ContactMutation) SetID ¶
func (m *ContactMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Contact creation.
func (*ContactMutation) SetKind ¶
func (m *ContactMutation) SetKind(c contact.Kind)
SetKind sets the kind field.
func (*ContactMutation) SetName ¶
func (m *ContactMutation) SetName(s string)
SetName sets the name field.
func (*ContactMutation) SetOwnerID ¶
func (m *ContactMutation) SetOwnerID(id uuid.UUID)
SetOwnerID sets the owner edge to Person by id.
func (*ContactMutation) SetPrincipal ¶
func (m *ContactMutation) SetPrincipal(b bool)
SetPrincipal sets the principal field.
func (*ContactMutation) SetValidated ¶
func (m *ContactMutation) SetValidated(b bool)
SetValidated sets the validated field.
func (*ContactMutation) SetValue ¶
func (m *ContactMutation) SetValue(s string)
SetValue sets the value field.
func (ContactMutation) Tx ¶
func (m ContactMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ContactMutation) Type ¶
func (m *ContactMutation) Type() string
Type returns the node type of this mutation (Contact).
func (*ContactMutation) Validated ¶
func (m *ContactMutation) Validated() (r bool, exists bool)
Validated returns the validated value in the mutation.
func (*ContactMutation) Value ¶
func (m *ContactMutation) Value() (r string, exists bool)
Value returns the value value in the mutation.
type ContactQuery ¶
type ContactQuery struct {
// contains filtered or unexported fields
}
ContactQuery is the builder for querying Contact entities.
func (*ContactQuery) All ¶
func (cq *ContactQuery) All(ctx context.Context) ([]*Contact, error)
All executes the query and returns a list of Contacts.
func (*ContactQuery) AllX ¶
func (cq *ContactQuery) AllX(ctx context.Context) []*Contact
AllX is like All, but panics if an error occurs.
func (*ContactQuery) Clone ¶
func (cq *ContactQuery) Clone() *ContactQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ContactQuery) Count ¶
func (cq *ContactQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ContactQuery) CountX ¶
func (cq *ContactQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ContactQuery) Exist ¶
func (cq *ContactQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ContactQuery) ExistX ¶
func (cq *ContactQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ContactQuery) First ¶
func (cq *ContactQuery) First(ctx context.Context) (*Contact, error)
First returns the first Contact entity in the query. Returns *NotFoundError when no contact was found.
func (*ContactQuery) FirstID ¶
FirstID returns the first Contact id in the query. Returns *NotFoundError when no id was found.
func (*ContactQuery) FirstX ¶
func (cq *ContactQuery) FirstX(ctx context.Context) *Contact
FirstX is like First, but panics if an error occurs.
func (*ContactQuery) FirstXID ¶
func (cq *ContactQuery) FirstXID(ctx context.Context) uuid.UUID
FirstXID is like FirstID, but panics if an error occurs.
func (*ContactQuery) GroupBy ¶
func (cq *ContactQuery) GroupBy(field string, fields ...string) *ContactGroupBy
GroupBy 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.Contact.Query(). GroupBy(contact.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ContactQuery) IDsX ¶
func (cq *ContactQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ContactQuery) Limit ¶
func (cq *ContactQuery) Limit(limit int) *ContactQuery
Limit adds a limit step to the query.
func (*ContactQuery) Offset ¶
func (cq *ContactQuery) Offset(offset int) *ContactQuery
Offset adds an offset step to the query.
func (*ContactQuery) Only ¶
func (cq *ContactQuery) Only(ctx context.Context) (*Contact, error)
Only returns the only Contact entity in the query, returns an error if not exactly one entity was returned.
func (*ContactQuery) OnlyID ¶
OnlyID returns the only Contact id in the query, returns an error if not exactly one id was returned.
func (*ContactQuery) OnlyX ¶
func (cq *ContactQuery) OnlyX(ctx context.Context) *Contact
OnlyX is like Only, but panics if an error occurs.
func (*ContactQuery) OnlyXID ¶
func (cq *ContactQuery) OnlyXID(ctx context.Context) uuid.UUID
OnlyXID is like OnlyID, but panics if an error occurs.
func (*ContactQuery) Order ¶
func (cq *ContactQuery) Order(o ...Order) *ContactQuery
Order adds an order step to the query.
func (*ContactQuery) QueryOwner ¶
func (cq *ContactQuery) QueryOwner() *PersonQuery
QueryOwner chains the current query on the owner edge.
func (*ContactQuery) Select ¶
func (cq *ContactQuery) Select(field string, fields ...string) *ContactSelect
Select one or more fields from the given query.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Contact.Query(). Select(contact.FieldName). Scan(ctx, &v)
func (*ContactQuery) Where ¶
func (cq *ContactQuery) Where(ps ...predicate.Contact) *ContactQuery
Where adds a new predicate for the builder.
func (*ContactQuery) WithOwner ¶
func (cq *ContactQuery) WithOwner(opts ...func(*PersonQuery)) *ContactQuery
WithOwner tells the query-builder to eager-loads the nodes that are connected to
the "owner" edge. The optional arguments used to configure the query builder of the edge.
type ContactSelect ¶
type ContactSelect struct {
// contains filtered or unexported fields
}
ContactSelect is the builder for select fields of Contact entities.
func (*ContactSelect) Bools ¶
func (cs *ContactSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*ContactSelect) BoolsX ¶
func (cs *ContactSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ContactSelect) Float64s ¶
func (cs *ContactSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*ContactSelect) Float64sX ¶
func (cs *ContactSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ContactSelect) Ints ¶
func (cs *ContactSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*ContactSelect) IntsX ¶
func (cs *ContactSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ContactSelect) Scan ¶
func (cs *ContactSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*ContactSelect) ScanX ¶
func (cs *ContactSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type ContactUpdate ¶
type ContactUpdate struct {
// contains filtered or unexported fields
}
ContactUpdate is the builder for updating Contact entities.
func (*ContactUpdate) ClearOwner ¶
func (cu *ContactUpdate) ClearOwner() *ContactUpdate
ClearOwner clears the owner edge to Person.
func (*ContactUpdate) Exec ¶
func (cu *ContactUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContactUpdate) ExecX ¶
func (cu *ContactUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactUpdate) Save ¶
func (cu *ContactUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*ContactUpdate) SaveX ¶
func (cu *ContactUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ContactUpdate) SetFromAccount ¶
func (cu *ContactUpdate) SetFromAccount(b bool) *ContactUpdate
SetFromAccount sets the fromAccount field.
func (*ContactUpdate) SetKind ¶
func (cu *ContactUpdate) SetKind(c contact.Kind) *ContactUpdate
SetKind sets the kind field.
func (*ContactUpdate) SetName ¶
func (cu *ContactUpdate) SetName(s string) *ContactUpdate
SetName sets the name field.
func (*ContactUpdate) SetNillableFromAccount ¶
func (cu *ContactUpdate) SetNillableFromAccount(b *bool) *ContactUpdate
SetNillableFromAccount sets the fromAccount field if the given value is not nil.
func (*ContactUpdate) SetNillableKind ¶
func (cu *ContactUpdate) SetNillableKind(c *contact.Kind) *ContactUpdate
SetNillableKind sets the kind field if the given value is not nil.
func (*ContactUpdate) SetOwner ¶
func (cu *ContactUpdate) SetOwner(p *Person) *ContactUpdate
SetOwner sets the owner edge to Person.
func (*ContactUpdate) SetOwnerID ¶
func (cu *ContactUpdate) SetOwnerID(id uuid.UUID) *ContactUpdate
SetOwnerID sets the owner edge to Person by id.
func (*ContactUpdate) SetPrincipal ¶
func (cu *ContactUpdate) SetPrincipal(b bool) *ContactUpdate
SetPrincipal sets the principal field.
func (*ContactUpdate) SetValidated ¶
func (cu *ContactUpdate) SetValidated(b bool) *ContactUpdate
SetValidated sets the validated field.
func (*ContactUpdate) SetValue ¶
func (cu *ContactUpdate) SetValue(s string) *ContactUpdate
SetValue sets the value field.
func (*ContactUpdate) Where ¶
func (cu *ContactUpdate) Where(ps ...predicate.Contact) *ContactUpdate
Where adds a new predicate for the builder.
type ContactUpdateOne ¶
type ContactUpdateOne struct {
// contains filtered or unexported fields
}
ContactUpdateOne is the builder for updating a single Contact entity.
func (*ContactUpdateOne) ClearOwner ¶
func (cuo *ContactUpdateOne) ClearOwner() *ContactUpdateOne
ClearOwner clears the owner edge to Person.
func (*ContactUpdateOne) Exec ¶
func (cuo *ContactUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ContactUpdateOne) ExecX ¶
func (cuo *ContactUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContactUpdateOne) Save ¶
func (cuo *ContactUpdateOne) Save(ctx context.Context) (*Contact, error)
Save executes the query and returns the updated entity.
func (*ContactUpdateOne) SaveX ¶
func (cuo *ContactUpdateOne) SaveX(ctx context.Context) *Contact
SaveX is like Save, but panics if an error occurs.
func (*ContactUpdateOne) SetFromAccount ¶
func (cuo *ContactUpdateOne) SetFromAccount(b bool) *ContactUpdateOne
SetFromAccount sets the fromAccount field.
func (*ContactUpdateOne) SetKind ¶
func (cuo *ContactUpdateOne) SetKind(c contact.Kind) *ContactUpdateOne
SetKind sets the kind field.
func (*ContactUpdateOne) SetName ¶
func (cuo *ContactUpdateOne) SetName(s string) *ContactUpdateOne
SetName sets the name field.
func (*ContactUpdateOne) SetNillableFromAccount ¶
func (cuo *ContactUpdateOne) SetNillableFromAccount(b *bool) *ContactUpdateOne
SetNillableFromAccount sets the fromAccount field if the given value is not nil.
func (*ContactUpdateOne) SetNillableKind ¶
func (cuo *ContactUpdateOne) SetNillableKind(c *contact.Kind) *ContactUpdateOne
SetNillableKind sets the kind field if the given value is not nil.
func (*ContactUpdateOne) SetOwner ¶
func (cuo *ContactUpdateOne) SetOwner(p *Person) *ContactUpdateOne
SetOwner sets the owner edge to Person.
func (*ContactUpdateOne) SetOwnerID ¶
func (cuo *ContactUpdateOne) SetOwnerID(id uuid.UUID) *ContactUpdateOne
SetOwnerID sets the owner edge to Person by id.
func (*ContactUpdateOne) SetPrincipal ¶
func (cuo *ContactUpdateOne) SetPrincipal(b bool) *ContactUpdateOne
SetPrincipal sets the principal field.
func (*ContactUpdateOne) SetValidated ¶
func (cuo *ContactUpdateOne) SetValidated(b bool) *ContactUpdateOne
SetValidated sets the validated field.
func (*ContactUpdateOne) SetValue ¶
func (cuo *ContactUpdateOne) SetValue(s string) *ContactUpdateOne
SetValue sets the value field.
type Device ¶
type Device struct { // ID of the ent. ID int `json:"id,omitempty"` // Device holds the value of the "device" field. Device string `json:"device,omitempty"` // contains filtered or unexported fields }
Device is the model entity for the Device schema.
func (*Device) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Device) Update ¶
func (d *Device) Update() *DeviceUpdateOne
Update returns a builder for updating this Device. Note that, you need to call Device.Unwrap() before calling this method, if this Device was returned from a transaction, and the transaction was committed or rolled back.
type DeviceClient ¶
type DeviceClient struct {
// contains filtered or unexported fields
}
DeviceClient is a client for the Device schema.
func NewDeviceClient ¶
func NewDeviceClient(c config) *DeviceClient
NewDeviceClient returns a client for the Device from the given config.
func (*DeviceClient) Create ¶
func (c *DeviceClient) Create() *DeviceCreate
Create returns a create builder for Device.
func (*DeviceClient) Delete ¶
func (c *DeviceClient) Delete() *DeviceDelete
Delete returns a delete builder for Device.
func (*DeviceClient) DeleteOne ¶
func (c *DeviceClient) DeleteOne(d *Device) *DeviceDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DeviceClient) DeleteOneID ¶
func (c *DeviceClient) DeleteOneID(id int) *DeviceDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DeviceClient) GetX ¶
func (c *DeviceClient) GetX(ctx context.Context, id int) *Device
GetX is like Get, but panics if an error occurs.
func (*DeviceClient) Query ¶
func (c *DeviceClient) Query() *DeviceQuery
Create returns a query builder for Device.
func (*DeviceClient) Update ¶
func (c *DeviceClient) Update() *DeviceUpdate
Update returns an update builder for Device.
func (*DeviceClient) UpdateOne ¶
func (c *DeviceClient) UpdateOne(d *Device) *DeviceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DeviceClient) UpdateOneID ¶
func (c *DeviceClient) UpdateOneID(id int) *DeviceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DeviceClient) Use ¶
func (c *DeviceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `device.Hooks(f(g(h())))`.
type DeviceCreate ¶
type DeviceCreate struct {
// contains filtered or unexported fields
}
DeviceCreate is the builder for creating a Device entity.
func (*DeviceCreate) Save ¶
func (dc *DeviceCreate) Save(ctx context.Context) (*Device, error)
Save creates the Device in the database.
func (*DeviceCreate) SaveX ¶
func (dc *DeviceCreate) SaveX(ctx context.Context) *Device
SaveX calls Save and panics if Save returns an error.
func (*DeviceCreate) SetDevice ¶
func (dc *DeviceCreate) SetDevice(s string) *DeviceCreate
SetDevice sets the device field.
type DeviceDelete ¶
type DeviceDelete struct {
// contains filtered or unexported fields
}
DeviceDelete is the builder for deleting a Device entity.
func (*DeviceDelete) Exec ¶
func (dd *DeviceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DeviceDelete) ExecX ¶
func (dd *DeviceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DeviceDelete) Where ¶
func (dd *DeviceDelete) Where(ps ...predicate.Device) *DeviceDelete
Where adds a new predicate to the delete builder.
type DeviceDeleteOne ¶
type DeviceDeleteOne struct {
// contains filtered or unexported fields
}
DeviceDeleteOne is the builder for deleting a single Device entity.
func (*DeviceDeleteOne) Exec ¶
func (ddo *DeviceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DeviceDeleteOne) ExecX ¶
func (ddo *DeviceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DeviceGroupBy ¶
type DeviceGroupBy struct {
// contains filtered or unexported fields
}
DeviceGroupBy is the builder for group-by Device entities.
func (*DeviceGroupBy) Aggregate ¶
func (dgb *DeviceGroupBy) Aggregate(fns ...Aggregate) *DeviceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DeviceGroupBy) Bools ¶
func (dgb *DeviceGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*DeviceGroupBy) BoolsX ¶
func (dgb *DeviceGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DeviceGroupBy) Float64s ¶
func (dgb *DeviceGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*DeviceGroupBy) Float64sX ¶
func (dgb *DeviceGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DeviceGroupBy) Ints ¶
func (dgb *DeviceGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*DeviceGroupBy) IntsX ¶
func (dgb *DeviceGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DeviceGroupBy) Scan ¶
func (dgb *DeviceGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*DeviceGroupBy) ScanX ¶
func (dgb *DeviceGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type DeviceMutation ¶
type DeviceMutation struct {
// contains filtered or unexported fields
}
DeviceMutation represents an operation that mutate the Devices nodes in the graph.
func (*DeviceMutation) AddField ¶
func (m *DeviceMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*DeviceMutation) AddedEdges ¶
func (m *DeviceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DeviceMutation) AddedField ¶
func (m *DeviceMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*DeviceMutation) AddedFields ¶
func (m *DeviceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*DeviceMutation) AddedIDs ¶
func (m *DeviceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*DeviceMutation) ClearEdge ¶
func (m *DeviceMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*DeviceMutation) ClearField ¶
func (m *DeviceMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*DeviceMutation) ClearedEdges ¶
func (m *DeviceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DeviceMutation) ClearedFields ¶
func (m *DeviceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DeviceMutation) Client ¶
func (m DeviceMutation) 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 (*DeviceMutation) Device ¶
func (m *DeviceMutation) Device() (r string, exists bool)
Device returns the device value in the mutation.
func (*DeviceMutation) EdgeCleared ¶
func (m *DeviceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*DeviceMutation) Field ¶
func (m *DeviceMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*DeviceMutation) FieldCleared ¶
func (m *DeviceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*DeviceMutation) Fields ¶
func (m *DeviceMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*DeviceMutation) ID ¶
func (m *DeviceMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*DeviceMutation) RemovedEdges ¶
func (m *DeviceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DeviceMutation) RemovedIDs ¶
func (m *DeviceMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*DeviceMutation) ResetDevice ¶
func (m *DeviceMutation) ResetDevice()
ResetDevice reset all changes of the device field.
func (*DeviceMutation) ResetEdge ¶
func (m *DeviceMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*DeviceMutation) ResetField ¶
func (m *DeviceMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*DeviceMutation) SetDevice ¶
func (m *DeviceMutation) SetDevice(s string)
SetDevice sets the device field.
func (*DeviceMutation) SetField ¶
func (m *DeviceMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (DeviceMutation) Tx ¶
func (m DeviceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DeviceMutation) Type ¶
func (m *DeviceMutation) Type() string
Type returns the node type of this mutation (Device).
type DeviceQuery ¶
type DeviceQuery struct {
// contains filtered or unexported fields
}
DeviceQuery is the builder for querying Device entities.
func (*DeviceQuery) All ¶
func (dq *DeviceQuery) All(ctx context.Context) ([]*Device, error)
All executes the query and returns a list of Devices.
func (*DeviceQuery) AllX ¶
func (dq *DeviceQuery) AllX(ctx context.Context) []*Device
AllX is like All, but panics if an error occurs.
func (*DeviceQuery) Clone ¶
func (dq *DeviceQuery) Clone() *DeviceQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DeviceQuery) Count ¶
func (dq *DeviceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DeviceQuery) CountX ¶
func (dq *DeviceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DeviceQuery) Exist ¶
func (dq *DeviceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DeviceQuery) ExistX ¶
func (dq *DeviceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DeviceQuery) First ¶
func (dq *DeviceQuery) First(ctx context.Context) (*Device, error)
First returns the first Device entity in the query. Returns *NotFoundError when no device was found.
func (*DeviceQuery) FirstID ¶
func (dq *DeviceQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Device id in the query. Returns *NotFoundError when no id was found.
func (*DeviceQuery) FirstX ¶
func (dq *DeviceQuery) FirstX(ctx context.Context) *Device
FirstX is like First, but panics if an error occurs.
func (*DeviceQuery) FirstXID ¶
func (dq *DeviceQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*DeviceQuery) GroupBy ¶
func (dq *DeviceQuery) GroupBy(field string, fields ...string) *DeviceGroupBy
GroupBy 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 { Device string `json:"device,omitempty"` Count int `json:"count,omitempty"` } client.Device.Query(). GroupBy(device.FieldDevice). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DeviceQuery) IDs ¶
func (dq *DeviceQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Device ids.
func (*DeviceQuery) IDsX ¶
func (dq *DeviceQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DeviceQuery) Limit ¶
func (dq *DeviceQuery) Limit(limit int) *DeviceQuery
Limit adds a limit step to the query.
func (*DeviceQuery) Offset ¶
func (dq *DeviceQuery) Offset(offset int) *DeviceQuery
Offset adds an offset step to the query.
func (*DeviceQuery) Only ¶
func (dq *DeviceQuery) Only(ctx context.Context) (*Device, error)
Only returns the only Device entity in the query, returns an error if not exactly one entity was returned.
func (*DeviceQuery) OnlyID ¶
func (dq *DeviceQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Device id in the query, returns an error if not exactly one id was returned.
func (*DeviceQuery) OnlyX ¶
func (dq *DeviceQuery) OnlyX(ctx context.Context) *Device
OnlyX is like Only, but panics if an error occurs.
func (*DeviceQuery) OnlyXID ¶
func (dq *DeviceQuery) OnlyXID(ctx context.Context) int
OnlyXID is like OnlyID, but panics if an error occurs.
func (*DeviceQuery) Order ¶
func (dq *DeviceQuery) Order(o ...Order) *DeviceQuery
Order adds an order step to the query.
func (*DeviceQuery) Select ¶
func (dq *DeviceQuery) Select(field string, fields ...string) *DeviceSelect
Select one or more fields from the given query.
Example:
var v []struct { Device string `json:"device,omitempty"` } client.Device.Query(). Select(device.FieldDevice). Scan(ctx, &v)
func (*DeviceQuery) Where ¶
func (dq *DeviceQuery) Where(ps ...predicate.Device) *DeviceQuery
Where adds a new predicate for the builder.
type DeviceSelect ¶
type DeviceSelect struct {
// contains filtered or unexported fields
}
DeviceSelect is the builder for select fields of Device entities.
func (*DeviceSelect) Bools ¶
func (ds *DeviceSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*DeviceSelect) BoolsX ¶
func (ds *DeviceSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DeviceSelect) Float64s ¶
func (ds *DeviceSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*DeviceSelect) Float64sX ¶
func (ds *DeviceSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DeviceSelect) Ints ¶
func (ds *DeviceSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*DeviceSelect) IntsX ¶
func (ds *DeviceSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DeviceSelect) Scan ¶
func (ds *DeviceSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*DeviceSelect) ScanX ¶
func (ds *DeviceSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type DeviceUpdate ¶
type DeviceUpdate struct {
// contains filtered or unexported fields
}
DeviceUpdate is the builder for updating Device entities.
func (*DeviceUpdate) Exec ¶
func (du *DeviceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DeviceUpdate) ExecX ¶
func (du *DeviceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeviceUpdate) Save ¶
func (du *DeviceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*DeviceUpdate) SaveX ¶
func (du *DeviceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DeviceUpdate) SetDevice ¶
func (du *DeviceUpdate) SetDevice(s string) *DeviceUpdate
SetDevice sets the device field.
func (*DeviceUpdate) Where ¶
func (du *DeviceUpdate) Where(ps ...predicate.Device) *DeviceUpdate
Where adds a new predicate for the builder.
type DeviceUpdateOne ¶
type DeviceUpdateOne struct {
// contains filtered or unexported fields
}
DeviceUpdateOne is the builder for updating a single Device entity.
func (*DeviceUpdateOne) Exec ¶
func (duo *DeviceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DeviceUpdateOne) ExecX ¶
func (duo *DeviceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeviceUpdateOne) Save ¶
func (duo *DeviceUpdateOne) Save(ctx context.Context) (*Device, error)
Save executes the query and returns the updated entity.
func (*DeviceUpdateOne) SaveX ¶
func (duo *DeviceUpdateOne) SaveX(ctx context.Context) *Device
SaveX is like Save, but panics if an error occurs.
func (*DeviceUpdateOne) SetDevice ¶
func (duo *DeviceUpdateOne) SetDevice(s string) *DeviceUpdateOne
SetDevice sets the device field.
type Domain ¶
type Domain struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Domain holds the value of the "domain" field. Domain string `json:"domain,omitempty"` // Callback holds the value of the "callback" field. Callback string `json:"callback,omitempty"` // Tags holds the value of the "tags" field. Tags []string `json:"tags,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DomainQuery when eager-loading is set. Edges DomainEdges `json:"edges"` // contains filtered or unexported fields }
Domain is the model entity for the Domain schema.
func (*Domain) QueryAdmins ¶
func (d *Domain) QueryAdmins() *PersonQuery
QueryAdmins queries the admins edge of the Domain.
func (*Domain) QuerySurveys ¶
func (d *Domain) QuerySurveys() *SurveyQuery
QuerySurveys queries the surveys edge of the Domain.
func (*Domain) QueryUsers ¶
func (d *Domain) QueryUsers() *PersonQuery
QueryUsers queries the users edge of the Domain.
func (*Domain) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Domain) Update ¶
func (d *Domain) Update() *DomainUpdateOne
Update returns a builder for updating this Domain. Note that, you need to call Domain.Unwrap() before calling this method, if this Domain was returned from a transaction, and the transaction was committed or rolled back.
type DomainClient ¶
type DomainClient struct {
// contains filtered or unexported fields
}
DomainClient is a client for the Domain schema.
func NewDomainClient ¶
func NewDomainClient(c config) *DomainClient
NewDomainClient returns a client for the Domain from the given config.
func (*DomainClient) Create ¶
func (c *DomainClient) Create() *DomainCreate
Create returns a create builder for Domain.
func (*DomainClient) Delete ¶
func (c *DomainClient) Delete() *DomainDelete
Delete returns a delete builder for Domain.
func (*DomainClient) DeleteOne ¶
func (c *DomainClient) DeleteOne(d *Domain) *DomainDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DomainClient) DeleteOneID ¶
func (c *DomainClient) DeleteOneID(id uuid.UUID) *DomainDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DomainClient) Query ¶
func (c *DomainClient) Query() *DomainQuery
Create returns a query builder for Domain.
func (*DomainClient) QueryAdmins ¶
func (c *DomainClient) QueryAdmins(d *Domain) *PersonQuery
QueryAdmins queries the admins edge of a Domain.
func (*DomainClient) QuerySurveys ¶
func (c *DomainClient) QuerySurveys(d *Domain) *SurveyQuery
QuerySurveys queries the surveys edge of a Domain.
func (*DomainClient) QueryUsers ¶
func (c *DomainClient) QueryUsers(d *Domain) *PersonQuery
QueryUsers queries the users edge of a Domain.
func (*DomainClient) Update ¶
func (c *DomainClient) Update() *DomainUpdate
Update returns an update builder for Domain.
func (*DomainClient) UpdateOne ¶
func (c *DomainClient) UpdateOne(d *Domain) *DomainUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DomainClient) UpdateOneID ¶
func (c *DomainClient) UpdateOneID(id uuid.UUID) *DomainUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DomainClient) Use ¶
func (c *DomainClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `domain.Hooks(f(g(h())))`.
type DomainCreate ¶
type DomainCreate struct {
// contains filtered or unexported fields
}
DomainCreate is the builder for creating a Domain entity.
func (*DomainCreate) AddAdminIDs ¶
func (dc *DomainCreate) AddAdminIDs(ids ...uuid.UUID) *DomainCreate
AddAdminIDs adds the admins edge to Person by ids.
func (*DomainCreate) AddAdmins ¶
func (dc *DomainCreate) AddAdmins(p ...*Person) *DomainCreate
AddAdmins adds the admins edges to Person.
func (*DomainCreate) AddSurveyIDs ¶
func (dc *DomainCreate) AddSurveyIDs(ids ...uuid.UUID) *DomainCreate
AddSurveyIDs adds the surveys edge to Survey by ids.
func (*DomainCreate) AddSurveys ¶
func (dc *DomainCreate) AddSurveys(s ...*Survey) *DomainCreate
AddSurveys adds the surveys edges to Survey.
func (*DomainCreate) AddUserIDs ¶
func (dc *DomainCreate) AddUserIDs(ids ...uuid.UUID) *DomainCreate
AddUserIDs adds the users edge to Person by ids.
func (*DomainCreate) AddUsers ¶
func (dc *DomainCreate) AddUsers(p ...*Person) *DomainCreate
AddUsers adds the users edges to Person.
func (*DomainCreate) Save ¶
func (dc *DomainCreate) Save(ctx context.Context) (*Domain, error)
Save creates the Domain in the database.
func (*DomainCreate) SaveX ¶
func (dc *DomainCreate) SaveX(ctx context.Context) *Domain
SaveX calls Save and panics if Save returns an error.
func (*DomainCreate) SetCallback ¶
func (dc *DomainCreate) SetCallback(s string) *DomainCreate
SetCallback sets the callback field.
func (*DomainCreate) SetDomain ¶
func (dc *DomainCreate) SetDomain(s string) *DomainCreate
SetDomain sets the domain field.
func (*DomainCreate) SetEmail ¶
func (dc *DomainCreate) SetEmail(s string) *DomainCreate
SetEmail sets the email field.
func (*DomainCreate) SetID ¶
func (dc *DomainCreate) SetID(u uuid.UUID) *DomainCreate
SetID sets the id field.
func (*DomainCreate) SetName ¶
func (dc *DomainCreate) SetName(s string) *DomainCreate
SetName sets the name field.
func (*DomainCreate) SetTags ¶
func (dc *DomainCreate) SetTags(s []string) *DomainCreate
SetTags sets the tags field.
type DomainDelete ¶
type DomainDelete struct {
// contains filtered or unexported fields
}
DomainDelete is the builder for deleting a Domain entity.
func (*DomainDelete) Exec ¶
func (dd *DomainDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DomainDelete) ExecX ¶
func (dd *DomainDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DomainDelete) Where ¶
func (dd *DomainDelete) Where(ps ...predicate.Domain) *DomainDelete
Where adds a new predicate to the delete builder.
type DomainDeleteOne ¶
type DomainDeleteOne struct {
// contains filtered or unexported fields
}
DomainDeleteOne is the builder for deleting a single Domain entity.
func (*DomainDeleteOne) Exec ¶
func (ddo *DomainDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DomainDeleteOne) ExecX ¶
func (ddo *DomainDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DomainEdges ¶
type DomainEdges struct { // Surveys holds the value of the surveys edge. Surveys []*Survey // Users holds the value of the users edge. Users []*Person // Admins holds the value of the admins edge. Admins []*Person // contains filtered or unexported fields }
DomainEdges holds the relations/edges for other nodes in the graph.
func (DomainEdges) AdminsOrErr ¶
func (e DomainEdges) AdminsOrErr() ([]*Person, error)
AdminsOrErr returns the Admins value or an error if the edge was not loaded in eager-loading.
func (DomainEdges) SurveysOrErr ¶
func (e DomainEdges) SurveysOrErr() ([]*Survey, error)
SurveysOrErr returns the Surveys value or an error if the edge was not loaded in eager-loading.
func (DomainEdges) UsersOrErr ¶
func (e DomainEdges) UsersOrErr() ([]*Person, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type DomainGroupBy ¶
type DomainGroupBy struct {
// contains filtered or unexported fields
}
DomainGroupBy is the builder for group-by Domain entities.
func (*DomainGroupBy) Aggregate ¶
func (dgb *DomainGroupBy) Aggregate(fns ...Aggregate) *DomainGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DomainGroupBy) Bools ¶
func (dgb *DomainGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*DomainGroupBy) BoolsX ¶
func (dgb *DomainGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DomainGroupBy) Float64s ¶
func (dgb *DomainGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*DomainGroupBy) Float64sX ¶
func (dgb *DomainGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DomainGroupBy) Ints ¶
func (dgb *DomainGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*DomainGroupBy) IntsX ¶
func (dgb *DomainGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DomainGroupBy) Scan ¶
func (dgb *DomainGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*DomainGroupBy) ScanX ¶
func (dgb *DomainGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type DomainMutation ¶
type DomainMutation struct {
// contains filtered or unexported fields
}
DomainMutation represents an operation that mutate the Domains nodes in the graph.
func (*DomainMutation) AddAdminIDs ¶
func (m *DomainMutation) AddAdminIDs(ids ...uuid.UUID)
AddAdminIDs adds the admins edge to Person by ids.
func (*DomainMutation) AddField ¶
func (m *DomainMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*DomainMutation) AddSurveyIDs ¶
func (m *DomainMutation) AddSurveyIDs(ids ...uuid.UUID)
AddSurveyIDs adds the surveys edge to Survey by ids.
func (*DomainMutation) AddUserIDs ¶
func (m *DomainMutation) AddUserIDs(ids ...uuid.UUID)
AddUserIDs adds the users edge to Person by ids.
func (*DomainMutation) AddedEdges ¶
func (m *DomainMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DomainMutation) AddedField ¶
func (m *DomainMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*DomainMutation) AddedFields ¶
func (m *DomainMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*DomainMutation) AddedIDs ¶
func (m *DomainMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*DomainMutation) AdminsIDs ¶
func (m *DomainMutation) AdminsIDs() (ids []uuid.UUID)
AdminsIDs returns the admins ids in the mutation.
func (*DomainMutation) Callback ¶
func (m *DomainMutation) Callback() (r string, exists bool)
Callback returns the callback value in the mutation.
func (*DomainMutation) ClearEdge ¶
func (m *DomainMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*DomainMutation) ClearField ¶
func (m *DomainMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*DomainMutation) ClearedEdges ¶
func (m *DomainMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DomainMutation) ClearedFields ¶
func (m *DomainMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DomainMutation) Client ¶
func (m DomainMutation) 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 (*DomainMutation) Domain ¶
func (m *DomainMutation) Domain() (r string, exists bool)
Domain returns the domain value in the mutation.
func (*DomainMutation) EdgeCleared ¶
func (m *DomainMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*DomainMutation) Email ¶
func (m *DomainMutation) Email() (r string, exists bool)
Email returns the email value in the mutation.
func (*DomainMutation) Field ¶
func (m *DomainMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*DomainMutation) FieldCleared ¶
func (m *DomainMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*DomainMutation) Fields ¶
func (m *DomainMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*DomainMutation) ID ¶
func (m *DomainMutation) ID() (id uuid.UUID, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*DomainMutation) Name ¶
func (m *DomainMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*DomainMutation) RemoveAdminIDs ¶
func (m *DomainMutation) RemoveAdminIDs(ids ...uuid.UUID)
RemoveAdminIDs removes the admins edge to Person by ids.
func (*DomainMutation) RemoveSurveyIDs ¶
func (m *DomainMutation) RemoveSurveyIDs(ids ...uuid.UUID)
RemoveSurveyIDs removes the surveys edge to Survey by ids.
func (*DomainMutation) RemoveUserIDs ¶
func (m *DomainMutation) RemoveUserIDs(ids ...uuid.UUID)
RemoveUserIDs removes the users edge to Person by ids.
func (*DomainMutation) RemovedAdminsIDs ¶
func (m *DomainMutation) RemovedAdminsIDs() (ids []uuid.UUID)
RemovedAdmins returns the removed ids of admins.
func (*DomainMutation) RemovedEdges ¶
func (m *DomainMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DomainMutation) RemovedIDs ¶
func (m *DomainMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*DomainMutation) RemovedSurveysIDs ¶
func (m *DomainMutation) RemovedSurveysIDs() (ids []uuid.UUID)
RemovedSurveys returns the removed ids of surveys.
func (*DomainMutation) RemovedUsersIDs ¶
func (m *DomainMutation) RemovedUsersIDs() (ids []uuid.UUID)
RemovedUsers returns the removed ids of users.
func (*DomainMutation) ResetAdmins ¶
func (m *DomainMutation) ResetAdmins()
ResetAdmins reset all changes of the admins edge.
func (*DomainMutation) ResetCallback ¶
func (m *DomainMutation) ResetCallback()
ResetCallback reset all changes of the callback field.
func (*DomainMutation) ResetDomain ¶
func (m *DomainMutation) ResetDomain()
ResetDomain reset all changes of the domain field.
func (*DomainMutation) ResetEdge ¶
func (m *DomainMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*DomainMutation) ResetEmail ¶
func (m *DomainMutation) ResetEmail()
ResetEmail reset all changes of the email field.
func (*DomainMutation) ResetField ¶
func (m *DomainMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*DomainMutation) ResetName ¶
func (m *DomainMutation) ResetName()
ResetName reset all changes of the name field.
func (*DomainMutation) ResetSurveys ¶
func (m *DomainMutation) ResetSurveys()
ResetSurveys reset all changes of the surveys edge.
func (*DomainMutation) ResetTags ¶
func (m *DomainMutation) ResetTags()
ResetTags reset all changes of the tags field.
func (*DomainMutation) ResetUsers ¶
func (m *DomainMutation) ResetUsers()
ResetUsers reset all changes of the users edge.
func (*DomainMutation) SetCallback ¶
func (m *DomainMutation) SetCallback(s string)
SetCallback sets the callback field.
func (*DomainMutation) SetDomain ¶
func (m *DomainMutation) SetDomain(s string)
SetDomain sets the domain field.
func (*DomainMutation) SetEmail ¶
func (m *DomainMutation) SetEmail(s string)
SetEmail sets the email field.
func (*DomainMutation) SetField ¶
func (m *DomainMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*DomainMutation) SetID ¶
func (m *DomainMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Domain creation.
func (*DomainMutation) SetName ¶
func (m *DomainMutation) SetName(s string)
SetName sets the name field.
func (*DomainMutation) SetTags ¶
func (m *DomainMutation) SetTags(s []string)
SetTags sets the tags field.
func (*DomainMutation) SurveysIDs ¶
func (m *DomainMutation) SurveysIDs() (ids []uuid.UUID)
SurveysIDs returns the surveys ids in the mutation.
func (*DomainMutation) Tags ¶
func (m *DomainMutation) Tags() (r []string, exists bool)
Tags returns the tags value in the mutation.
func (DomainMutation) Tx ¶
func (m DomainMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DomainMutation) Type ¶
func (m *DomainMutation) Type() string
Type returns the node type of this mutation (Domain).
func (*DomainMutation) UsersIDs ¶
func (m *DomainMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the users ids in the mutation.
type DomainQuery ¶
type DomainQuery struct {
// contains filtered or unexported fields
}
DomainQuery is the builder for querying Domain entities.
func (*DomainQuery) All ¶
func (dq *DomainQuery) All(ctx context.Context) ([]*Domain, error)
All executes the query and returns a list of Domains.
func (*DomainQuery) AllX ¶
func (dq *DomainQuery) AllX(ctx context.Context) []*Domain
AllX is like All, but panics if an error occurs.
func (*DomainQuery) Clone ¶
func (dq *DomainQuery) Clone() *DomainQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DomainQuery) Count ¶
func (dq *DomainQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DomainQuery) CountX ¶
func (dq *DomainQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DomainQuery) Exist ¶
func (dq *DomainQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DomainQuery) ExistX ¶
func (dq *DomainQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DomainQuery) First ¶
func (dq *DomainQuery) First(ctx context.Context) (*Domain, error)
First returns the first Domain entity in the query. Returns *NotFoundError when no domain was found.
func (*DomainQuery) FirstID ¶
FirstID returns the first Domain id in the query. Returns *NotFoundError when no id was found.
func (*DomainQuery) FirstX ¶
func (dq *DomainQuery) FirstX(ctx context.Context) *Domain
FirstX is like First, but panics if an error occurs.
func (*DomainQuery) FirstXID ¶
func (dq *DomainQuery) FirstXID(ctx context.Context) uuid.UUID
FirstXID is like FirstID, but panics if an error occurs.
func (*DomainQuery) GroupBy ¶
func (dq *DomainQuery) GroupBy(field string, fields ...string) *DomainGroupBy
GroupBy 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.Domain.Query(). GroupBy(domain.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DomainQuery) IDsX ¶
func (dq *DomainQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*DomainQuery) Limit ¶
func (dq *DomainQuery) Limit(limit int) *DomainQuery
Limit adds a limit step to the query.
func (*DomainQuery) Offset ¶
func (dq *DomainQuery) Offset(offset int) *DomainQuery
Offset adds an offset step to the query.
func (*DomainQuery) Only ¶
func (dq *DomainQuery) Only(ctx context.Context) (*Domain, error)
Only returns the only Domain entity in the query, returns an error if not exactly one entity was returned.
func (*DomainQuery) OnlyID ¶
OnlyID returns the only Domain id in the query, returns an error if not exactly one id was returned.
func (*DomainQuery) OnlyX ¶
func (dq *DomainQuery) OnlyX(ctx context.Context) *Domain
OnlyX is like Only, but panics if an error occurs.
func (*DomainQuery) OnlyXID ¶
func (dq *DomainQuery) OnlyXID(ctx context.Context) uuid.UUID
OnlyXID is like OnlyID, but panics if an error occurs.
func (*DomainQuery) Order ¶
func (dq *DomainQuery) Order(o ...Order) *DomainQuery
Order adds an order step to the query.
func (*DomainQuery) QueryAdmins ¶
func (dq *DomainQuery) QueryAdmins() *PersonQuery
QueryAdmins chains the current query on the admins edge.
func (*DomainQuery) QuerySurveys ¶
func (dq *DomainQuery) QuerySurveys() *SurveyQuery
QuerySurveys chains the current query on the surveys edge.
func (*DomainQuery) QueryUsers ¶
func (dq *DomainQuery) QueryUsers() *PersonQuery
QueryUsers chains the current query on the users edge.
func (*DomainQuery) Select ¶
func (dq *DomainQuery) Select(field string, fields ...string) *DomainSelect
Select one or more fields from the given query.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Domain.Query(). Select(domain.FieldName). Scan(ctx, &v)
func (*DomainQuery) Where ¶
func (dq *DomainQuery) Where(ps ...predicate.Domain) *DomainQuery
Where adds a new predicate for the builder.
func (*DomainQuery) WithAdmins ¶
func (dq *DomainQuery) WithAdmins(opts ...func(*PersonQuery)) *DomainQuery
WithAdmins tells the query-builder to eager-loads the nodes that are connected to
the "admins" edge. The optional arguments used to configure the query builder of the edge.
func (*DomainQuery) WithSurveys ¶
func (dq *DomainQuery) WithSurveys(opts ...func(*SurveyQuery)) *DomainQuery
WithSurveys tells the query-builder to eager-loads the nodes that are connected to
the "surveys" edge. The optional arguments used to configure the query builder of the edge.
func (*DomainQuery) WithUsers ¶
func (dq *DomainQuery) WithUsers(opts ...func(*PersonQuery)) *DomainQuery
WithUsers tells the query-builder to eager-loads the nodes that are connected to
the "users" edge. The optional arguments used to configure the query builder of the edge.
type DomainSelect ¶
type DomainSelect struct {
// contains filtered or unexported fields
}
DomainSelect is the builder for select fields of Domain entities.
func (*DomainSelect) Bools ¶
func (ds *DomainSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*DomainSelect) BoolsX ¶
func (ds *DomainSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DomainSelect) Float64s ¶
func (ds *DomainSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*DomainSelect) Float64sX ¶
func (ds *DomainSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DomainSelect) Ints ¶
func (ds *DomainSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*DomainSelect) IntsX ¶
func (ds *DomainSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DomainSelect) Scan ¶
func (ds *DomainSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*DomainSelect) ScanX ¶
func (ds *DomainSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type DomainUpdate ¶
type DomainUpdate struct {
// contains filtered or unexported fields
}
DomainUpdate is the builder for updating Domain entities.
func (*DomainUpdate) AddAdminIDs ¶
func (du *DomainUpdate) AddAdminIDs(ids ...uuid.UUID) *DomainUpdate
AddAdminIDs adds the admins edge to Person by ids.
func (*DomainUpdate) AddAdmins ¶
func (du *DomainUpdate) AddAdmins(p ...*Person) *DomainUpdate
AddAdmins adds the admins edges to Person.
func (*DomainUpdate) AddSurveyIDs ¶
func (du *DomainUpdate) AddSurveyIDs(ids ...uuid.UUID) *DomainUpdate
AddSurveyIDs adds the surveys edge to Survey by ids.
func (*DomainUpdate) AddSurveys ¶
func (du *DomainUpdate) AddSurveys(s ...*Survey) *DomainUpdate
AddSurveys adds the surveys edges to Survey.
func (*DomainUpdate) AddUserIDs ¶
func (du *DomainUpdate) AddUserIDs(ids ...uuid.UUID) *DomainUpdate
AddUserIDs adds the users edge to Person by ids.
func (*DomainUpdate) AddUsers ¶
func (du *DomainUpdate) AddUsers(p ...*Person) *DomainUpdate
AddUsers adds the users edges to Person.
func (*DomainUpdate) Exec ¶
func (du *DomainUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DomainUpdate) ExecX ¶
func (du *DomainUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DomainUpdate) RemoveAdminIDs ¶
func (du *DomainUpdate) RemoveAdminIDs(ids ...uuid.UUID) *DomainUpdate
RemoveAdminIDs removes the admins edge to Person by ids.
func (*DomainUpdate) RemoveAdmins ¶
func (du *DomainUpdate) RemoveAdmins(p ...*Person) *DomainUpdate
RemoveAdmins removes admins edges to Person.
func (*DomainUpdate) RemoveSurveyIDs ¶
func (du *DomainUpdate) RemoveSurveyIDs(ids ...uuid.UUID) *DomainUpdate
RemoveSurveyIDs removes the surveys edge to Survey by ids.
func (*DomainUpdate) RemoveSurveys ¶
func (du *DomainUpdate) RemoveSurveys(s ...*Survey) *DomainUpdate
RemoveSurveys removes surveys edges to Survey.
func (*DomainUpdate) RemoveUserIDs ¶
func (du *DomainUpdate) RemoveUserIDs(ids ...uuid.UUID) *DomainUpdate
RemoveUserIDs removes the users edge to Person by ids.
func (*DomainUpdate) RemoveUsers ¶
func (du *DomainUpdate) RemoveUsers(p ...*Person) *DomainUpdate
RemoveUsers removes users edges to Person.
func (*DomainUpdate) Save ¶
func (du *DomainUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*DomainUpdate) SaveX ¶
func (du *DomainUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DomainUpdate) SetCallback ¶
func (du *DomainUpdate) SetCallback(s string) *DomainUpdate
SetCallback sets the callback field.
func (*DomainUpdate) SetDomain ¶
func (du *DomainUpdate) SetDomain(s string) *DomainUpdate
SetDomain sets the domain field.
func (*DomainUpdate) SetEmail ¶
func (du *DomainUpdate) SetEmail(s string) *DomainUpdate
SetEmail sets the email field.
func (*DomainUpdate) SetName ¶
func (du *DomainUpdate) SetName(s string) *DomainUpdate
SetName sets the name field.
func (*DomainUpdate) SetTags ¶
func (du *DomainUpdate) SetTags(s []string) *DomainUpdate
SetTags sets the tags field.
func (*DomainUpdate) Where ¶
func (du *DomainUpdate) Where(ps ...predicate.Domain) *DomainUpdate
Where adds a new predicate for the builder.
type DomainUpdateOne ¶
type DomainUpdateOne struct {
// contains filtered or unexported fields
}
DomainUpdateOne is the builder for updating a single Domain entity.
func (*DomainUpdateOne) AddAdminIDs ¶
func (duo *DomainUpdateOne) AddAdminIDs(ids ...uuid.UUID) *DomainUpdateOne
AddAdminIDs adds the admins edge to Person by ids.
func (*DomainUpdateOne) AddAdmins ¶
func (duo *DomainUpdateOne) AddAdmins(p ...*Person) *DomainUpdateOne
AddAdmins adds the admins edges to Person.
func (*DomainUpdateOne) AddSurveyIDs ¶
func (duo *DomainUpdateOne) AddSurveyIDs(ids ...uuid.UUID) *DomainUpdateOne
AddSurveyIDs adds the surveys edge to Survey by ids.
func (*DomainUpdateOne) AddSurveys ¶
func (duo *DomainUpdateOne) AddSurveys(s ...*Survey) *DomainUpdateOne
AddSurveys adds the surveys edges to Survey.
func (*DomainUpdateOne) AddUserIDs ¶
func (duo *DomainUpdateOne) AddUserIDs(ids ...uuid.UUID) *DomainUpdateOne
AddUserIDs adds the users edge to Person by ids.
func (*DomainUpdateOne) AddUsers ¶
func (duo *DomainUpdateOne) AddUsers(p ...*Person) *DomainUpdateOne
AddUsers adds the users edges to Person.
func (*DomainUpdateOne) Exec ¶
func (duo *DomainUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DomainUpdateOne) ExecX ¶
func (duo *DomainUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DomainUpdateOne) RemoveAdminIDs ¶
func (duo *DomainUpdateOne) RemoveAdminIDs(ids ...uuid.UUID) *DomainUpdateOne
RemoveAdminIDs removes the admins edge to Person by ids.
func (*DomainUpdateOne) RemoveAdmins ¶
func (duo *DomainUpdateOne) RemoveAdmins(p ...*Person) *DomainUpdateOne
RemoveAdmins removes admins edges to Person.
func (*DomainUpdateOne) RemoveSurveyIDs ¶
func (duo *DomainUpdateOne) RemoveSurveyIDs(ids ...uuid.UUID) *DomainUpdateOne
RemoveSurveyIDs removes the surveys edge to Survey by ids.
func (*DomainUpdateOne) RemoveSurveys ¶
func (duo *DomainUpdateOne) RemoveSurveys(s ...*Survey) *DomainUpdateOne
RemoveSurveys removes surveys edges to Survey.
func (*DomainUpdateOne) RemoveUserIDs ¶
func (duo *DomainUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *DomainUpdateOne
RemoveUserIDs removes the users edge to Person by ids.
func (*DomainUpdateOne) RemoveUsers ¶
func (duo *DomainUpdateOne) RemoveUsers(p ...*Person) *DomainUpdateOne
RemoveUsers removes users edges to Person.
func (*DomainUpdateOne) Save ¶
func (duo *DomainUpdateOne) Save(ctx context.Context) (*Domain, error)
Save executes the query and returns the updated entity.
func (*DomainUpdateOne) SaveX ¶
func (duo *DomainUpdateOne) SaveX(ctx context.Context) *Domain
SaveX is like Save, but panics if an error occurs.
func (*DomainUpdateOne) SetCallback ¶
func (duo *DomainUpdateOne) SetCallback(s string) *DomainUpdateOne
SetCallback sets the callback field.
func (*DomainUpdateOne) SetDomain ¶
func (duo *DomainUpdateOne) SetDomain(s string) *DomainUpdateOne
SetDomain sets the domain field.
func (*DomainUpdateOne) SetEmail ¶
func (duo *DomainUpdateOne) SetEmail(s string) *DomainUpdateOne
SetEmail sets the email field.
func (*DomainUpdateOne) SetName ¶
func (duo *DomainUpdateOne) SetName(s string) *DomainUpdateOne
SetName sets the name field.
func (*DomainUpdateOne) SetTags ¶
func (duo *DomainUpdateOne) SetTags(s []string) *DomainUpdateOne
SetTags sets the tags field.
type Flow ¶
type Flow struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // State holds the value of the "state" field. State uuid.UUID `json:"state,omitempty"` // StateTable holds the value of the "stateTable" field. StateTable string `json:"stateTable,omitempty"` // InitialState holds the value of the "initialState" field. InitialState uuid.UUID `json:"initialState,omitempty"` // TerminationState holds the value of the "terminationState" field. TerminationState uuid.UUID `json:"terminationState,omitempty"` // PastState holds the value of the "pastState" field. PastState uuid.UUID `json:"pastState,omitempty"` // Inputs holds the value of the "inputs" field. Inputs []string `json:"inputs,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FlowQuery when eager-loading is set. Edges FlowEdges `json:"edges"` // contains filtered or unexported fields }
Flow is the model entity for the Flow schema.
func (*Flow) QueryQuestions ¶
func (f *Flow) QueryQuestions() *QuestionQuery
QueryQuestions queries the questions edge of the Flow.
func (*Flow) QuerySurvey ¶
func (f *Flow) QuerySurvey() *SurveyQuery
QuerySurvey queries the survey edge of the Flow.
func (*Flow) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Flow) Update ¶
func (f *Flow) Update() *FlowUpdateOne
Update returns a builder for updating this Flow. Note that, you need to call Flow.Unwrap() before calling this method, if this Flow was returned from a transaction, and the transaction was committed or rolled back.
type FlowClient ¶
type FlowClient struct {
// contains filtered or unexported fields
}
FlowClient is a client for the Flow schema.
func NewFlowClient ¶
func NewFlowClient(c config) *FlowClient
NewFlowClient returns a client for the Flow from the given config.
func (*FlowClient) Create ¶
func (c *FlowClient) Create() *FlowCreate
Create returns a create builder for Flow.
func (*FlowClient) Delete ¶
func (c *FlowClient) Delete() *FlowDelete
Delete returns a delete builder for Flow.
func (*FlowClient) DeleteOne ¶
func (c *FlowClient) DeleteOne(f *Flow) *FlowDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*FlowClient) DeleteOneID ¶
func (c *FlowClient) DeleteOneID(id uuid.UUID) *FlowDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*FlowClient) Query ¶
func (c *FlowClient) Query() *FlowQuery
Create returns a query builder for Flow.
func (*FlowClient) QueryQuestions ¶
func (c *FlowClient) QueryQuestions(f *Flow) *QuestionQuery
QueryQuestions queries the questions edge of a Flow.
func (*FlowClient) QuerySurvey ¶
func (c *FlowClient) QuerySurvey(f *Flow) *SurveyQuery
QuerySurvey queries the survey edge of a Flow.
func (*FlowClient) Update ¶
func (c *FlowClient) Update() *FlowUpdate
Update returns an update builder for Flow.
func (*FlowClient) UpdateOne ¶
func (c *FlowClient) UpdateOne(f *Flow) *FlowUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FlowClient) UpdateOneID ¶
func (c *FlowClient) UpdateOneID(id uuid.UUID) *FlowUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FlowClient) Use ¶
func (c *FlowClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `flow.Hooks(f(g(h())))`.
type FlowCreate ¶
type FlowCreate struct {
// contains filtered or unexported fields
}
FlowCreate is the builder for creating a Flow entity.
func (*FlowCreate) AddQuestionIDs ¶
func (fc *FlowCreate) AddQuestionIDs(ids ...uuid.UUID) *FlowCreate
AddQuestionIDs adds the questions edge to Question by ids.
func (*FlowCreate) AddQuestions ¶
func (fc *FlowCreate) AddQuestions(q ...*Question) *FlowCreate
AddQuestions adds the questions edges to Question.
func (*FlowCreate) Save ¶
func (fc *FlowCreate) Save(ctx context.Context) (*Flow, error)
Save creates the Flow in the database.
func (*FlowCreate) SaveX ¶
func (fc *FlowCreate) SaveX(ctx context.Context) *Flow
SaveX calls Save and panics if Save returns an error.
func (*FlowCreate) SetID ¶
func (fc *FlowCreate) SetID(u uuid.UUID) *FlowCreate
SetID sets the id field.
func (*FlowCreate) SetInitialState ¶
func (fc *FlowCreate) SetInitialState(u uuid.UUID) *FlowCreate
SetInitialState sets the initialState field.
func (*FlowCreate) SetInputs ¶
func (fc *FlowCreate) SetInputs(s []string) *FlowCreate
SetInputs sets the inputs field.
func (*FlowCreate) SetNillableSurveyID ¶
func (fc *FlowCreate) SetNillableSurveyID(id *uuid.UUID) *FlowCreate
SetNillableSurveyID sets the survey edge to Survey by id if the given value is not nil.
func (*FlowCreate) SetPastState ¶
func (fc *FlowCreate) SetPastState(u uuid.UUID) *FlowCreate
SetPastState sets the pastState field.
func (*FlowCreate) SetState ¶
func (fc *FlowCreate) SetState(u uuid.UUID) *FlowCreate
SetState sets the state field.
func (*FlowCreate) SetStateTable ¶
func (fc *FlowCreate) SetStateTable(s string) *FlowCreate
SetStateTable sets the stateTable field.
func (*FlowCreate) SetSurvey ¶
func (fc *FlowCreate) SetSurvey(s *Survey) *FlowCreate
SetSurvey sets the survey edge to Survey.
func (*FlowCreate) SetSurveyID ¶
func (fc *FlowCreate) SetSurveyID(id uuid.UUID) *FlowCreate
SetSurveyID sets the survey edge to Survey by id.
func (*FlowCreate) SetTerminationState ¶
func (fc *FlowCreate) SetTerminationState(u uuid.UUID) *FlowCreate
SetTerminationState sets the terminationState field.
type FlowDelete ¶
type FlowDelete struct {
// contains filtered or unexported fields
}
FlowDelete is the builder for deleting a Flow entity.
func (*FlowDelete) Exec ¶
func (fd *FlowDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FlowDelete) ExecX ¶
func (fd *FlowDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FlowDelete) Where ¶
func (fd *FlowDelete) Where(ps ...predicate.Flow) *FlowDelete
Where adds a new predicate to the delete builder.
type FlowDeleteOne ¶
type FlowDeleteOne struct {
// contains filtered or unexported fields
}
FlowDeleteOne is the builder for deleting a single Flow entity.
func (*FlowDeleteOne) Exec ¶
func (fdo *FlowDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FlowDeleteOne) ExecX ¶
func (fdo *FlowDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type FlowEdges ¶
type FlowEdges struct { // Survey holds the value of the survey edge. Survey *Survey // Questions holds the value of the questions edge. Questions []*Question // contains filtered or unexported fields }
FlowEdges holds the relations/edges for other nodes in the graph.
func (FlowEdges) QuestionsOrErr ¶
QuestionsOrErr returns the Questions value or an error if the edge was not loaded in eager-loading.
func (FlowEdges) SurveyOrErr ¶
SurveyOrErr returns the Survey value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type FlowGroupBy ¶
type FlowGroupBy struct {
// contains filtered or unexported fields
}
FlowGroupBy is the builder for group-by Flow entities.
func (*FlowGroupBy) Aggregate ¶
func (fgb *FlowGroupBy) Aggregate(fns ...Aggregate) *FlowGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FlowGroupBy) Bools ¶
func (fgb *FlowGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*FlowGroupBy) BoolsX ¶
func (fgb *FlowGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*FlowGroupBy) Float64s ¶
func (fgb *FlowGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*FlowGroupBy) Float64sX ¶
func (fgb *FlowGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*FlowGroupBy) Ints ¶
func (fgb *FlowGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*FlowGroupBy) IntsX ¶
func (fgb *FlowGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*FlowGroupBy) Scan ¶
func (fgb *FlowGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*FlowGroupBy) ScanX ¶
func (fgb *FlowGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type FlowMutation ¶
type FlowMutation struct {
// contains filtered or unexported fields
}
FlowMutation represents an operation that mutate the Flows nodes in the graph.
func (*FlowMutation) AddField ¶
func (m *FlowMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*FlowMutation) AddQuestionIDs ¶
func (m *FlowMutation) AddQuestionIDs(ids ...uuid.UUID)
AddQuestionIDs adds the questions edge to Question by ids.
func (*FlowMutation) AddedEdges ¶
func (m *FlowMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FlowMutation) AddedField ¶
func (m *FlowMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*FlowMutation) AddedFields ¶
func (m *FlowMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*FlowMutation) AddedIDs ¶
func (m *FlowMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*FlowMutation) ClearEdge ¶
func (m *FlowMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*FlowMutation) ClearField ¶
func (m *FlowMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*FlowMutation) ClearInputs ¶
func (m *FlowMutation) ClearInputs()
ClearInputs clears the value of inputs.
func (*FlowMutation) ClearPastState ¶
func (m *FlowMutation) ClearPastState()
ClearPastState clears the value of pastState.
func (*FlowMutation) ClearSurvey ¶
func (m *FlowMutation) ClearSurvey()
ClearSurvey clears the survey edge to Survey.
func (*FlowMutation) ClearedEdges ¶
func (m *FlowMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FlowMutation) ClearedFields ¶
func (m *FlowMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FlowMutation) Client ¶
func (m FlowMutation) 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 (*FlowMutation) EdgeCleared ¶
func (m *FlowMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*FlowMutation) Field ¶
func (m *FlowMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*FlowMutation) FieldCleared ¶
func (m *FlowMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*FlowMutation) Fields ¶
func (m *FlowMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*FlowMutation) ID ¶
func (m *FlowMutation) ID() (id uuid.UUID, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*FlowMutation) InitialState ¶
func (m *FlowMutation) InitialState() (r uuid.UUID, exists bool)
InitialState returns the initialState value in the mutation.
func (*FlowMutation) Inputs ¶
func (m *FlowMutation) Inputs() (r []string, exists bool)
Inputs returns the inputs value in the mutation.
func (*FlowMutation) InputsCleared ¶
func (m *FlowMutation) InputsCleared() bool
InputsCleared returns if the field inputs was cleared in this mutation.
func (*FlowMutation) PastState ¶
func (m *FlowMutation) PastState() (r uuid.UUID, exists bool)
PastState returns the pastState value in the mutation.
func (*FlowMutation) PastStateCleared ¶
func (m *FlowMutation) PastStateCleared() bool
PastStateCleared returns if the field pastState was cleared in this mutation.
func (*FlowMutation) QuestionsIDs ¶
func (m *FlowMutation) QuestionsIDs() (ids []uuid.UUID)
QuestionsIDs returns the questions ids in the mutation.
func (*FlowMutation) RemoveQuestionIDs ¶
func (m *FlowMutation) RemoveQuestionIDs(ids ...uuid.UUID)
RemoveQuestionIDs removes the questions edge to Question by ids.
func (*FlowMutation) RemovedEdges ¶
func (m *FlowMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FlowMutation) RemovedIDs ¶
func (m *FlowMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*FlowMutation) RemovedQuestionsIDs ¶
func (m *FlowMutation) RemovedQuestionsIDs() (ids []uuid.UUID)
RemovedQuestions returns the removed ids of questions.
func (*FlowMutation) ResetEdge ¶
func (m *FlowMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*FlowMutation) ResetField ¶
func (m *FlowMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*FlowMutation) ResetInitialState ¶
func (m *FlowMutation) ResetInitialState()
ResetInitialState reset all changes of the initialState field.
func (*FlowMutation) ResetInputs ¶
func (m *FlowMutation) ResetInputs()
ResetInputs reset all changes of the inputs field.
func (*FlowMutation) ResetPastState ¶
func (m *FlowMutation) ResetPastState()
ResetPastState reset all changes of the pastState field.
func (*FlowMutation) ResetQuestions ¶
func (m *FlowMutation) ResetQuestions()
ResetQuestions reset all changes of the questions edge.
func (*FlowMutation) ResetState ¶
func (m *FlowMutation) ResetState()
ResetState reset all changes of the state field.
func (*FlowMutation) ResetStateTable ¶
func (m *FlowMutation) ResetStateTable()
ResetStateTable reset all changes of the stateTable field.
func (*FlowMutation) ResetSurvey ¶
func (m *FlowMutation) ResetSurvey()
ResetSurvey reset all changes of the survey edge.
func (*FlowMutation) ResetTerminationState ¶
func (m *FlowMutation) ResetTerminationState()
ResetTerminationState reset all changes of the terminationState field.
func (*FlowMutation) SetField ¶
func (m *FlowMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*FlowMutation) SetID ¶
func (m *FlowMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Flow creation.
func (*FlowMutation) SetInitialState ¶
func (m *FlowMutation) SetInitialState(u uuid.UUID)
SetInitialState sets the initialState field.
func (*FlowMutation) SetInputs ¶
func (m *FlowMutation) SetInputs(s []string)
SetInputs sets the inputs field.
func (*FlowMutation) SetPastState ¶
func (m *FlowMutation) SetPastState(u uuid.UUID)
SetPastState sets the pastState field.
func (*FlowMutation) SetState ¶
func (m *FlowMutation) SetState(u uuid.UUID)
SetState sets the state field.
func (*FlowMutation) SetStateTable ¶
func (m *FlowMutation) SetStateTable(s string)
SetStateTable sets the stateTable field.
func (*FlowMutation) SetSurveyID ¶
func (m *FlowMutation) SetSurveyID(id uuid.UUID)
SetSurveyID sets the survey edge to Survey by id.
func (*FlowMutation) SetTerminationState ¶
func (m *FlowMutation) SetTerminationState(u uuid.UUID)
SetTerminationState sets the terminationState field.
func (*FlowMutation) State ¶
func (m *FlowMutation) State() (r uuid.UUID, exists bool)
State returns the state value in the mutation.
func (*FlowMutation) StateTable ¶
func (m *FlowMutation) StateTable() (r string, exists bool)
StateTable returns the stateTable value in the mutation.
func (*FlowMutation) SurveyCleared ¶
func (m *FlowMutation) SurveyCleared() bool
SurveyCleared returns if the edge survey was cleared.
func (*FlowMutation) SurveyID ¶
func (m *FlowMutation) SurveyID() (id uuid.UUID, exists bool)
SurveyID returns the survey id in the mutation.
func (*FlowMutation) SurveyIDs ¶
func (m *FlowMutation) SurveyIDs() (ids []uuid.UUID)
SurveyIDs returns the survey ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use SurveyID instead. It exists only for internal usage by the builders.
func (*FlowMutation) TerminationState ¶
func (m *FlowMutation) TerminationState() (r uuid.UUID, exists bool)
TerminationState returns the terminationState value in the mutation.
func (FlowMutation) Tx ¶
func (m FlowMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FlowMutation) Type ¶
func (m *FlowMutation) Type() string
Type returns the node type of this mutation (Flow).
type FlowQuery ¶
type FlowQuery struct {
// contains filtered or unexported fields
}
FlowQuery is the builder for querying Flow entities.
func (*FlowQuery) Clone ¶
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FlowQuery) First ¶
First returns the first Flow entity in the query. Returns *NotFoundError when no flow was found.
func (*FlowQuery) FirstID ¶
FirstID returns the first Flow id in the query. Returns *NotFoundError when no id was found.
func (*FlowQuery) GroupBy ¶
func (fq *FlowQuery) GroupBy(field string, fields ...string) *FlowGroupBy
GroupBy 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 { State uuid.UUID `json:"state,omitempty"` Count int `json:"count,omitempty"` } client.Flow.Query(). GroupBy(flow.FieldState). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FlowQuery) Only ¶
Only returns the only Flow entity in the query, returns an error if not exactly one entity was returned.
func (*FlowQuery) OnlyID ¶
OnlyID returns the only Flow id in the query, returns an error if not exactly one id was returned.
func (*FlowQuery) QueryQuestions ¶
func (fq *FlowQuery) QueryQuestions() *QuestionQuery
QueryQuestions chains the current query on the questions edge.
func (*FlowQuery) QuerySurvey ¶
func (fq *FlowQuery) QuerySurvey() *SurveyQuery
QuerySurvey chains the current query on the survey edge.
func (*FlowQuery) Select ¶
func (fq *FlowQuery) Select(field string, fields ...string) *FlowSelect
Select one or more fields from the given query.
Example:
var v []struct { State uuid.UUID `json:"state,omitempty"` } client.Flow.Query(). Select(flow.FieldState). Scan(ctx, &v)
func (*FlowQuery) WithQuestions ¶
func (fq *FlowQuery) WithQuestions(opts ...func(*QuestionQuery)) *FlowQuery
WithQuestions tells the query-builder to eager-loads the nodes that are connected to
the "questions" edge. The optional arguments used to configure the query builder of the edge.
func (*FlowQuery) WithSurvey ¶
func (fq *FlowQuery) WithSurvey(opts ...func(*SurveyQuery)) *FlowQuery
WithSurvey tells the query-builder to eager-loads the nodes that are connected to
the "survey" edge. The optional arguments used to configure the query builder of the edge.
type FlowSelect ¶
type FlowSelect struct {
// contains filtered or unexported fields
}
FlowSelect is the builder for select fields of Flow entities.
func (*FlowSelect) Bools ¶
func (fs *FlowSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*FlowSelect) BoolsX ¶
func (fs *FlowSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*FlowSelect) Float64s ¶
func (fs *FlowSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*FlowSelect) Float64sX ¶
func (fs *FlowSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*FlowSelect) Ints ¶
func (fs *FlowSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*FlowSelect) IntsX ¶
func (fs *FlowSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*FlowSelect) Scan ¶
func (fs *FlowSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*FlowSelect) ScanX ¶
func (fs *FlowSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type FlowUpdate ¶
type FlowUpdate struct {
// contains filtered or unexported fields
}
FlowUpdate is the builder for updating Flow entities.
func (*FlowUpdate) AddQuestionIDs ¶
func (fu *FlowUpdate) AddQuestionIDs(ids ...uuid.UUID) *FlowUpdate
AddQuestionIDs adds the questions edge to Question by ids.
func (*FlowUpdate) AddQuestions ¶
func (fu *FlowUpdate) AddQuestions(q ...*Question) *FlowUpdate
AddQuestions adds the questions edges to Question.
func (*FlowUpdate) ClearPastState ¶
func (fu *FlowUpdate) ClearPastState() *FlowUpdate
ClearPastState clears the value of pastState.
func (*FlowUpdate) ClearSurvey ¶
func (fu *FlowUpdate) ClearSurvey() *FlowUpdate
ClearSurvey clears the survey edge to Survey.
func (*FlowUpdate) Exec ¶
func (fu *FlowUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FlowUpdate) ExecX ¶
func (fu *FlowUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FlowUpdate) RemoveQuestionIDs ¶
func (fu *FlowUpdate) RemoveQuestionIDs(ids ...uuid.UUID) *FlowUpdate
RemoveQuestionIDs removes the questions edge to Question by ids.
func (*FlowUpdate) RemoveQuestions ¶
func (fu *FlowUpdate) RemoveQuestions(q ...*Question) *FlowUpdate
RemoveQuestions removes questions edges to Question.
func (*FlowUpdate) Save ¶
func (fu *FlowUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*FlowUpdate) SaveX ¶
func (fu *FlowUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FlowUpdate) SetInitialState ¶
func (fu *FlowUpdate) SetInitialState(u uuid.UUID) *FlowUpdate
SetInitialState sets the initialState field.
func (*FlowUpdate) SetNillableSurveyID ¶
func (fu *FlowUpdate) SetNillableSurveyID(id *uuid.UUID) *FlowUpdate
SetNillableSurveyID sets the survey edge to Survey by id if the given value is not nil.
func (*FlowUpdate) SetPastState ¶
func (fu *FlowUpdate) SetPastState(u uuid.UUID) *FlowUpdate
SetPastState sets the pastState field.
func (*FlowUpdate) SetState ¶
func (fu *FlowUpdate) SetState(u uuid.UUID) *FlowUpdate
SetState sets the state field.
func (*FlowUpdate) SetStateTable ¶
func (fu *FlowUpdate) SetStateTable(s string) *FlowUpdate
SetStateTable sets the stateTable field.
func (*FlowUpdate) SetSurvey ¶
func (fu *FlowUpdate) SetSurvey(s *Survey) *FlowUpdate
SetSurvey sets the survey edge to Survey.
func (*FlowUpdate) SetSurveyID ¶
func (fu *FlowUpdate) SetSurveyID(id uuid.UUID) *FlowUpdate
SetSurveyID sets the survey edge to Survey by id.
func (*FlowUpdate) SetTerminationState ¶
func (fu *FlowUpdate) SetTerminationState(u uuid.UUID) *FlowUpdate
SetTerminationState sets the terminationState field.
func (*FlowUpdate) Where ¶
func (fu *FlowUpdate) Where(ps ...predicate.Flow) *FlowUpdate
Where adds a new predicate for the builder.
type FlowUpdateOne ¶
type FlowUpdateOne struct {
// contains filtered or unexported fields
}
FlowUpdateOne is the builder for updating a single Flow entity.
func (*FlowUpdateOne) AddQuestionIDs ¶
func (fuo *FlowUpdateOne) AddQuestionIDs(ids ...uuid.UUID) *FlowUpdateOne
AddQuestionIDs adds the questions edge to Question by ids.
func (*FlowUpdateOne) AddQuestions ¶
func (fuo *FlowUpdateOne) AddQuestions(q ...*Question) *FlowUpdateOne
AddQuestions adds the questions edges to Question.
func (*FlowUpdateOne) ClearPastState ¶
func (fuo *FlowUpdateOne) ClearPastState() *FlowUpdateOne
ClearPastState clears the value of pastState.
func (*FlowUpdateOne) ClearSurvey ¶
func (fuo *FlowUpdateOne) ClearSurvey() *FlowUpdateOne
ClearSurvey clears the survey edge to Survey.
func (*FlowUpdateOne) Exec ¶
func (fuo *FlowUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FlowUpdateOne) ExecX ¶
func (fuo *FlowUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FlowUpdateOne) RemoveQuestionIDs ¶
func (fuo *FlowUpdateOne) RemoveQuestionIDs(ids ...uuid.UUID) *FlowUpdateOne
RemoveQuestionIDs removes the questions edge to Question by ids.
func (*FlowUpdateOne) RemoveQuestions ¶
func (fuo *FlowUpdateOne) RemoveQuestions(q ...*Question) *FlowUpdateOne
RemoveQuestions removes questions edges to Question.
func (*FlowUpdateOne) Save ¶
func (fuo *FlowUpdateOne) Save(ctx context.Context) (*Flow, error)
Save executes the query and returns the updated entity.
func (*FlowUpdateOne) SaveX ¶
func (fuo *FlowUpdateOne) SaveX(ctx context.Context) *Flow
SaveX is like Save, but panics if an error occurs.
func (*FlowUpdateOne) SetInitialState ¶
func (fuo *FlowUpdateOne) SetInitialState(u uuid.UUID) *FlowUpdateOne
SetInitialState sets the initialState field.
func (*FlowUpdateOne) SetNillableSurveyID ¶
func (fuo *FlowUpdateOne) SetNillableSurveyID(id *uuid.UUID) *FlowUpdateOne
SetNillableSurveyID sets the survey edge to Survey by id if the given value is not nil.
func (*FlowUpdateOne) SetPastState ¶
func (fuo *FlowUpdateOne) SetPastState(u uuid.UUID) *FlowUpdateOne
SetPastState sets the pastState field.
func (*FlowUpdateOne) SetState ¶
func (fuo *FlowUpdateOne) SetState(u uuid.UUID) *FlowUpdateOne
SetState sets the state field.
func (*FlowUpdateOne) SetStateTable ¶
func (fuo *FlowUpdateOne) SetStateTable(s string) *FlowUpdateOne
SetStateTable sets the stateTable field.
func (*FlowUpdateOne) SetSurvey ¶
func (fuo *FlowUpdateOne) SetSurvey(s *Survey) *FlowUpdateOne
SetSurvey sets the survey edge to Survey.
func (*FlowUpdateOne) SetSurveyID ¶
func (fuo *FlowUpdateOne) SetSurveyID(id uuid.UUID) *FlowUpdateOne
SetSurveyID sets the survey edge to Survey by id.
func (*FlowUpdateOne) SetTerminationState ¶
func (fuo *FlowUpdateOne) SetTerminationState(u uuid.UUID) *FlowUpdateOne
SetTerminationState sets the terminationState field.
type IP ¶
type IP struct { // ID of the ent. ID int `json:"id,omitempty"` // IP holds the value of the "ip" field. IP string `json:"ip,omitempty"` // contains filtered or unexported fields }
IP is the model entity for the IP schema.
func (*IP) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*IP) Update ¶
func (i *IP) Update() *IPUpdateOne
Update returns a builder for updating this IP. Note that, you need to call IP.Unwrap() before calling this method, if this IP was returned from a transaction, and the transaction was committed or rolled back.
type IPClient ¶
type IPClient struct {
// contains filtered or unexported fields
}
IPClient is a client for the IP schema.
func NewIPClient ¶
func NewIPClient(c config) *IPClient
NewIPClient returns a client for the IP from the given config.
func (*IPClient) DeleteOne ¶
func (c *IPClient) DeleteOne(i *IP) *IPDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*IPClient) DeleteOneID ¶
func (c *IPClient) DeleteOneID(id int) *IPDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*IPClient) UpdateOne ¶
func (c *IPClient) UpdateOne(i *IP) *IPUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IPClient) UpdateOneID ¶
func (c *IPClient) UpdateOneID(id int) *IPUpdateOne
UpdateOneID returns an update builder for the given id.
type IPCreate ¶
type IPCreate struct {
// contains filtered or unexported fields
}
IPCreate is the builder for creating a IP entity.
type IPDelete ¶
type IPDelete struct {
// contains filtered or unexported fields
}
IPDelete is the builder for deleting a IP entity.
func (*IPDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type IPDeleteOne ¶
type IPDeleteOne struct {
// contains filtered or unexported fields
}
IPDeleteOne is the builder for deleting a single IP entity.
func (*IPDeleteOne) Exec ¶
func (ido *IPDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IPDeleteOne) ExecX ¶
func (ido *IPDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type IPGroupBy ¶
type IPGroupBy struct {
// contains filtered or unexported fields
}
IPGroupBy is the builder for group-by IP entities.
func (*IPGroupBy) Bools ¶
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*IPGroupBy) Float64s ¶
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*IPGroupBy) Ints ¶
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
type IPMutation ¶
type IPMutation struct {
// contains filtered or unexported fields
}
IPMutation represents an operation that mutate the IPs nodes in the graph.
func (*IPMutation) AddField ¶
func (m *IPMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*IPMutation) AddedEdges ¶
func (m *IPMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IPMutation) AddedField ¶
func (m *IPMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*IPMutation) AddedFields ¶
func (m *IPMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*IPMutation) AddedIDs ¶
func (m *IPMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*IPMutation) ClearEdge ¶
func (m *IPMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*IPMutation) ClearField ¶
func (m *IPMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*IPMutation) ClearedEdges ¶
func (m *IPMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IPMutation) ClearedFields ¶
func (m *IPMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IPMutation) Client ¶
func (m IPMutation) 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 (*IPMutation) EdgeCleared ¶
func (m *IPMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*IPMutation) Field ¶
func (m *IPMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*IPMutation) FieldCleared ¶
func (m *IPMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*IPMutation) Fields ¶
func (m *IPMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*IPMutation) ID ¶
func (m *IPMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*IPMutation) IP ¶
func (m *IPMutation) IP() (r string, exists bool)
IP returns the ip value in the mutation.
func (*IPMutation) RemovedEdges ¶
func (m *IPMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IPMutation) RemovedIDs ¶
func (m *IPMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*IPMutation) ResetEdge ¶
func (m *IPMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*IPMutation) ResetField ¶
func (m *IPMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*IPMutation) ResetIP ¶
func (m *IPMutation) ResetIP()
ResetIP reset all changes of the ip field.
func (*IPMutation) SetField ¶
func (m *IPMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (IPMutation) Tx ¶
func (m IPMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*IPMutation) Type ¶
func (m *IPMutation) Type() string
Type returns the node type of this mutation (IP).
type IPQuery ¶
type IPQuery struct {
// contains filtered or unexported fields
}
IPQuery is the builder for querying IP entities.
func (*IPQuery) Clone ¶
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*IPQuery) First ¶
First returns the first IP entity in the query. Returns *NotFoundError when no ip was found.
func (*IPQuery) FirstID ¶
FirstID returns the first IP id in the query. Returns *NotFoundError when no id was found.
func (*IPQuery) GroupBy ¶
GroupBy 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 { IP string `json:"ip,omitempty"` Count int `json:"count,omitempty"` } client.IP.Query(). GroupBy(ip.FieldIP). Aggregate(ent.Count()). Scan(ctx, &v)
func (*IPQuery) Only ¶
Only returns the only IP entity in the query, returns an error if not exactly one entity was returned.
func (*IPQuery) OnlyID ¶
OnlyID returns the only IP id in the query, returns an error if not exactly one id was returned.
type IPSelect ¶
type IPSelect struct {
// contains filtered or unexported fields
}
IPSelect is the builder for select fields of IP entities.
func (*IPSelect) Bools ¶
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*IPSelect) Float64s ¶
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*IPSelect) Ints ¶
Ints returns list of ints from selector. It is only allowed when selecting one field.
type IPUpdate ¶
type IPUpdate struct {
// contains filtered or unexported fields
}
IPUpdate is the builder for updating IP entities.
func (*IPUpdate) Save ¶
Save executes the query and returns the number of rows/vertices matched by this operation.
type IPUpdateOne ¶
type IPUpdateOne struct {
// contains filtered or unexported fields
}
IPUpdateOne is the builder for updating a single IP entity.
func (*IPUpdateOne) Exec ¶
func (iuo *IPUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IPUpdateOne) ExecX ¶
func (iuo *IPUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPUpdateOne) Save ¶
func (iuo *IPUpdateOne) Save(ctx context.Context) (*IP, error)
Save executes the query and returns the updated entity.
func (*IPUpdateOne) SaveX ¶
func (iuo *IPUpdateOne) SaveX(ctx context.Context) *IP
SaveX is like Save, but panics if an error occurs.
func (*IPUpdateOne) SetIP ¶
func (iuo *IPUpdateOne) SetIP(s string) *IPUpdateOne
SetIP sets the ip field.
type Input ¶
type Input struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Kind holds the value of the "kind" field. Kind input.Kind `json:"kind,omitempty"` // Multiple holds the value of the "multiple" field. Multiple bool `json:"multiple,omitempty"` // Defaults holds the value of the "defaults" field. Defaults []string `json:"defaults,omitempty"` // Options holds the value of the "options" field. Options map[string]interface{} `json:"options,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the InputQuery when eager-loading is set. Edges InputEdges `json:"edges"` // contains filtered or unexported fields }
Input is the model entity for the Input schema.
func (*Input) QueryQuestion ¶
func (i *Input) QueryQuestion() *QuestionQuery
QueryQuestion queries the question edge of the Input.
func (*Input) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Input) Update ¶
func (i *Input) Update() *InputUpdateOne
Update returns a builder for updating this Input. Note that, you need to call Input.Unwrap() before calling this method, if this Input was returned from a transaction, and the transaction was committed or rolled back.
type InputClient ¶
type InputClient struct {
// contains filtered or unexported fields
}
InputClient is a client for the Input schema.
func NewInputClient ¶
func NewInputClient(c config) *InputClient
NewInputClient returns a client for the Input from the given config.
func (*InputClient) Create ¶
func (c *InputClient) Create() *InputCreate
Create returns a create builder for Input.
func (*InputClient) Delete ¶
func (c *InputClient) Delete() *InputDelete
Delete returns a delete builder for Input.
func (*InputClient) DeleteOne ¶
func (c *InputClient) DeleteOne(i *Input) *InputDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*InputClient) DeleteOneID ¶
func (c *InputClient) DeleteOneID(id uuid.UUID) *InputDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*InputClient) Query ¶
func (c *InputClient) Query() *InputQuery
Create returns a query builder for Input.
func (*InputClient) QueryQuestion ¶
func (c *InputClient) QueryQuestion(i *Input) *QuestionQuery
QueryQuestion queries the question edge of a Input.
func (*InputClient) Update ¶
func (c *InputClient) Update() *InputUpdate
Update returns an update builder for Input.
func (*InputClient) UpdateOne ¶
func (c *InputClient) UpdateOne(i *Input) *InputUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InputClient) UpdateOneID ¶
func (c *InputClient) UpdateOneID(id uuid.UUID) *InputUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InputClient) Use ¶
func (c *InputClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `input.Hooks(f(g(h())))`.
type InputCreate ¶
type InputCreate struct {
// contains filtered or unexported fields
}
InputCreate is the builder for creating a Input entity.
func (*InputCreate) Save ¶
func (ic *InputCreate) Save(ctx context.Context) (*Input, error)
Save creates the Input in the database.
func (*InputCreate) SaveX ¶
func (ic *InputCreate) SaveX(ctx context.Context) *Input
SaveX calls Save and panics if Save returns an error.
func (*InputCreate) SetDefaults ¶
func (ic *InputCreate) SetDefaults(s []string) *InputCreate
SetDefaults sets the defaults field.
func (*InputCreate) SetID ¶
func (ic *InputCreate) SetID(u uuid.UUID) *InputCreate
SetID sets the id field.
func (*InputCreate) SetKind ¶
func (ic *InputCreate) SetKind(i input.Kind) *InputCreate
SetKind sets the kind field.
func (*InputCreate) SetMultiple ¶
func (ic *InputCreate) SetMultiple(b bool) *InputCreate
SetMultiple sets the multiple field.
func (*InputCreate) SetNillableMultiple ¶
func (ic *InputCreate) SetNillableMultiple(b *bool) *InputCreate
SetNillableMultiple sets the multiple field if the given value is not nil.
func (*InputCreate) SetOptions ¶
func (ic *InputCreate) SetOptions(m map[string]interface{}) *InputCreate
SetOptions sets the options field.
func (*InputCreate) SetQuestion ¶
func (ic *InputCreate) SetQuestion(q *Question) *InputCreate
SetQuestion sets the question edge to Question.
func (*InputCreate) SetQuestionID ¶
func (ic *InputCreate) SetQuestionID(id uuid.UUID) *InputCreate
SetQuestionID sets the question edge to Question by id.
type InputDelete ¶
type InputDelete struct {
// contains filtered or unexported fields
}
InputDelete is the builder for deleting a Input entity.
func (*InputDelete) Exec ¶
func (id *InputDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InputDelete) ExecX ¶
func (id *InputDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InputDelete) Where ¶
func (id *InputDelete) Where(ps ...predicate.Input) *InputDelete
Where adds a new predicate to the delete builder.
type InputDeleteOne ¶
type InputDeleteOne struct {
// contains filtered or unexported fields
}
InputDeleteOne is the builder for deleting a single Input entity.
func (*InputDeleteOne) Exec ¶
func (ido *InputDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InputDeleteOne) ExecX ¶
func (ido *InputDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type InputEdges ¶
type InputEdges struct { // Question holds the value of the question edge. Question *Question // contains filtered or unexported fields }
InputEdges holds the relations/edges for other nodes in the graph.
func (InputEdges) QuestionOrErr ¶
func (e InputEdges) QuestionOrErr() (*Question, error)
QuestionOrErr returns the Question value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type InputGroupBy ¶
type InputGroupBy struct {
// contains filtered or unexported fields
}
InputGroupBy is the builder for group-by Input entities.
func (*InputGroupBy) Aggregate ¶
func (igb *InputGroupBy) Aggregate(fns ...Aggregate) *InputGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InputGroupBy) Bools ¶
func (igb *InputGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*InputGroupBy) BoolsX ¶
func (igb *InputGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*InputGroupBy) Float64s ¶
func (igb *InputGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*InputGroupBy) Float64sX ¶
func (igb *InputGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*InputGroupBy) Ints ¶
func (igb *InputGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*InputGroupBy) IntsX ¶
func (igb *InputGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*InputGroupBy) Scan ¶
func (igb *InputGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*InputGroupBy) ScanX ¶
func (igb *InputGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type InputMutation ¶
type InputMutation struct {
// contains filtered or unexported fields
}
InputMutation represents an operation that mutate the Inputs nodes in the graph.
func (*InputMutation) AddField ¶
func (m *InputMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*InputMutation) AddedEdges ¶
func (m *InputMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InputMutation) AddedField ¶
func (m *InputMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*InputMutation) AddedFields ¶
func (m *InputMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*InputMutation) AddedIDs ¶
func (m *InputMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*InputMutation) ClearDefaults ¶
func (m *InputMutation) ClearDefaults()
ClearDefaults clears the value of defaults.
func (*InputMutation) ClearEdge ¶
func (m *InputMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*InputMutation) ClearField ¶
func (m *InputMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*InputMutation) ClearMultiple ¶
func (m *InputMutation) ClearMultiple()
ClearMultiple clears the value of multiple.
func (*InputMutation) ClearOptions ¶
func (m *InputMutation) ClearOptions()
ClearOptions clears the value of options.
func (*InputMutation) ClearQuestion ¶
func (m *InputMutation) ClearQuestion()
ClearQuestion clears the question edge to Question.
func (*InputMutation) ClearedEdges ¶
func (m *InputMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InputMutation) ClearedFields ¶
func (m *InputMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InputMutation) Client ¶
func (m InputMutation) 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 (*InputMutation) Defaults ¶
func (m *InputMutation) Defaults() (r []string, exists bool)
Defaults returns the defaults value in the mutation.
func (*InputMutation) DefaultsCleared ¶
func (m *InputMutation) DefaultsCleared() bool
DefaultsCleared returns if the field defaults was cleared in this mutation.
func (*InputMutation) EdgeCleared ¶
func (m *InputMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*InputMutation) Field ¶
func (m *InputMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*InputMutation) FieldCleared ¶
func (m *InputMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*InputMutation) Fields ¶
func (m *InputMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*InputMutation) ID ¶
func (m *InputMutation) ID() (id uuid.UUID, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*InputMutation) Kind ¶
func (m *InputMutation) Kind() (r input.Kind, exists bool)
Kind returns the kind value in the mutation.
func (*InputMutation) Multiple ¶
func (m *InputMutation) Multiple() (r bool, exists bool)
Multiple returns the multiple value in the mutation.
func (*InputMutation) MultipleCleared ¶
func (m *InputMutation) MultipleCleared() bool
MultipleCleared returns if the field multiple was cleared in this mutation.
func (*InputMutation) Options ¶
func (m *InputMutation) Options() (r map[string]interface{}, exists bool)
Options returns the options value in the mutation.
func (*InputMutation) OptionsCleared ¶
func (m *InputMutation) OptionsCleared() bool
OptionsCleared returns if the field options was cleared in this mutation.
func (*InputMutation) QuestionCleared ¶
func (m *InputMutation) QuestionCleared() bool
QuestionCleared returns if the edge question was cleared.
func (*InputMutation) QuestionID ¶
func (m *InputMutation) QuestionID() (id uuid.UUID, exists bool)
QuestionID returns the question id in the mutation.
func (*InputMutation) QuestionIDs ¶
func (m *InputMutation) QuestionIDs() (ids []uuid.UUID)
QuestionIDs returns the question ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use QuestionID instead. It exists only for internal usage by the builders.
func (*InputMutation) RemovedEdges ¶
func (m *InputMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InputMutation) RemovedIDs ¶
func (m *InputMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*InputMutation) ResetDefaults ¶
func (m *InputMutation) ResetDefaults()
ResetDefaults reset all changes of the defaults field.
func (*InputMutation) ResetEdge ¶
func (m *InputMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*InputMutation) ResetField ¶
func (m *InputMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*InputMutation) ResetKind ¶
func (m *InputMutation) ResetKind()
ResetKind reset all changes of the kind field.
func (*InputMutation) ResetMultiple ¶
func (m *InputMutation) ResetMultiple()
ResetMultiple reset all changes of the multiple field.
func (*InputMutation) ResetOptions ¶
func (m *InputMutation) ResetOptions()
ResetOptions reset all changes of the options field.
func (*InputMutation) ResetQuestion ¶
func (m *InputMutation) ResetQuestion()
ResetQuestion reset all changes of the question edge.
func (*InputMutation) SetDefaults ¶
func (m *InputMutation) SetDefaults(s []string)
SetDefaults sets the defaults field.
func (*InputMutation) SetField ¶
func (m *InputMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*InputMutation) SetID ¶
func (m *InputMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Input creation.
func (*InputMutation) SetKind ¶
func (m *InputMutation) SetKind(i input.Kind)
SetKind sets the kind field.
func (*InputMutation) SetMultiple ¶
func (m *InputMutation) SetMultiple(b bool)
SetMultiple sets the multiple field.
func (*InputMutation) SetOptions ¶
func (m *InputMutation) SetOptions(value map[string]interface{})
SetOptions sets the options field.
func (*InputMutation) SetQuestionID ¶
func (m *InputMutation) SetQuestionID(id uuid.UUID)
SetQuestionID sets the question edge to Question by id.
func (InputMutation) Tx ¶
func (m InputMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InputMutation) Type ¶
func (m *InputMutation) Type() string
Type returns the node type of this mutation (Input).
type InputQuery ¶
type InputQuery struct {
// contains filtered or unexported fields
}
InputQuery is the builder for querying Input entities.
func (*InputQuery) All ¶
func (iq *InputQuery) All(ctx context.Context) ([]*Input, error)
All executes the query and returns a list of Inputs.
func (*InputQuery) AllX ¶
func (iq *InputQuery) AllX(ctx context.Context) []*Input
AllX is like All, but panics if an error occurs.
func (*InputQuery) Clone ¶
func (iq *InputQuery) Clone() *InputQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InputQuery) Count ¶
func (iq *InputQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InputQuery) CountX ¶
func (iq *InputQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InputQuery) Exist ¶
func (iq *InputQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InputQuery) ExistX ¶
func (iq *InputQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InputQuery) First ¶
func (iq *InputQuery) First(ctx context.Context) (*Input, error)
First returns the first Input entity in the query. Returns *NotFoundError when no input was found.
func (*InputQuery) FirstID ¶
FirstID returns the first Input id in the query. Returns *NotFoundError when no id was found.
func (*InputQuery) FirstX ¶
func (iq *InputQuery) FirstX(ctx context.Context) *Input
FirstX is like First, but panics if an error occurs.
func (*InputQuery) FirstXID ¶
func (iq *InputQuery) FirstXID(ctx context.Context) uuid.UUID
FirstXID is like FirstID, but panics if an error occurs.
func (*InputQuery) GroupBy ¶
func (iq *InputQuery) GroupBy(field string, fields ...string) *InputGroupBy
GroupBy 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 { Kind input.Kind `json:"kind,omitempty"` Count int `json:"count,omitempty"` } client.Input.Query(). GroupBy(input.FieldKind). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InputQuery) IDsX ¶
func (iq *InputQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*InputQuery) Limit ¶
func (iq *InputQuery) Limit(limit int) *InputQuery
Limit adds a limit step to the query.
func (*InputQuery) Offset ¶
func (iq *InputQuery) Offset(offset int) *InputQuery
Offset adds an offset step to the query.
func (*InputQuery) Only ¶
func (iq *InputQuery) Only(ctx context.Context) (*Input, error)
Only returns the only Input entity in the query, returns an error if not exactly one entity was returned.
func (*InputQuery) OnlyID ¶
OnlyID returns the only Input id in the query, returns an error if not exactly one id was returned.
func (*InputQuery) OnlyX ¶
func (iq *InputQuery) OnlyX(ctx context.Context) *Input
OnlyX is like Only, but panics if an error occurs.
func (*InputQuery) OnlyXID ¶
func (iq *InputQuery) OnlyXID(ctx context.Context) uuid.UUID
OnlyXID is like OnlyID, but panics if an error occurs.
func (*InputQuery) Order ¶
func (iq *InputQuery) Order(o ...Order) *InputQuery
Order adds an order step to the query.
func (*InputQuery) QueryQuestion ¶
func (iq *InputQuery) QueryQuestion() *QuestionQuery
QueryQuestion chains the current query on the question edge.
func (*InputQuery) Select ¶
func (iq *InputQuery) Select(field string, fields ...string) *InputSelect
Select one or more fields from the given query.
Example:
var v []struct { Kind input.Kind `json:"kind,omitempty"` } client.Input.Query(). Select(input.FieldKind). Scan(ctx, &v)
func (*InputQuery) Where ¶
func (iq *InputQuery) Where(ps ...predicate.Input) *InputQuery
Where adds a new predicate for the builder.
func (*InputQuery) WithQuestion ¶
func (iq *InputQuery) WithQuestion(opts ...func(*QuestionQuery)) *InputQuery
WithQuestion tells the query-builder to eager-loads the nodes that are connected to
the "question" edge. The optional arguments used to configure the query builder of the edge.
type InputSelect ¶
type InputSelect struct {
// contains filtered or unexported fields
}
InputSelect is the builder for select fields of Input entities.
func (*InputSelect) Bools ¶
func (is *InputSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*InputSelect) BoolsX ¶
func (is *InputSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*InputSelect) Float64s ¶
func (is *InputSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*InputSelect) Float64sX ¶
func (is *InputSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*InputSelect) Ints ¶
func (is *InputSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*InputSelect) IntsX ¶
func (is *InputSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*InputSelect) Scan ¶
func (is *InputSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*InputSelect) ScanX ¶
func (is *InputSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type InputUpdate ¶
type InputUpdate struct {
// contains filtered or unexported fields
}
InputUpdate is the builder for updating Input entities.
func (*InputUpdate) ClearDefaults ¶
func (iu *InputUpdate) ClearDefaults() *InputUpdate
ClearDefaults clears the value of defaults.
func (*InputUpdate) ClearMultiple ¶
func (iu *InputUpdate) ClearMultiple() *InputUpdate
ClearMultiple clears the value of multiple.
func (*InputUpdate) ClearOptions ¶
func (iu *InputUpdate) ClearOptions() *InputUpdate
ClearOptions clears the value of options.
func (*InputUpdate) ClearQuestion ¶
func (iu *InputUpdate) ClearQuestion() *InputUpdate
ClearQuestion clears the question edge to Question.
func (*InputUpdate) Exec ¶
func (iu *InputUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InputUpdate) ExecX ¶
func (iu *InputUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InputUpdate) Save ¶
func (iu *InputUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*InputUpdate) SaveX ¶
func (iu *InputUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InputUpdate) SetDefaults ¶
func (iu *InputUpdate) SetDefaults(s []string) *InputUpdate
SetDefaults sets the defaults field.
func (*InputUpdate) SetMultiple ¶
func (iu *InputUpdate) SetMultiple(b bool) *InputUpdate
SetMultiple sets the multiple field.
func (*InputUpdate) SetNillableMultiple ¶
func (iu *InputUpdate) SetNillableMultiple(b *bool) *InputUpdate
SetNillableMultiple sets the multiple field if the given value is not nil.
func (*InputUpdate) SetOptions ¶
func (iu *InputUpdate) SetOptions(m map[string]interface{}) *InputUpdate
SetOptions sets the options field.
func (*InputUpdate) SetQuestion ¶
func (iu *InputUpdate) SetQuestion(q *Question) *InputUpdate
SetQuestion sets the question edge to Question.
func (*InputUpdate) SetQuestionID ¶
func (iu *InputUpdate) SetQuestionID(id uuid.UUID) *InputUpdate
SetQuestionID sets the question edge to Question by id.
func (*InputUpdate) Where ¶
func (iu *InputUpdate) Where(ps ...predicate.Input) *InputUpdate
Where adds a new predicate for the builder.
type InputUpdateOne ¶
type InputUpdateOne struct {
// contains filtered or unexported fields
}
InputUpdateOne is the builder for updating a single Input entity.
func (*InputUpdateOne) ClearDefaults ¶
func (iuo *InputUpdateOne) ClearDefaults() *InputUpdateOne
ClearDefaults clears the value of defaults.
func (*InputUpdateOne) ClearMultiple ¶
func (iuo *InputUpdateOne) ClearMultiple() *InputUpdateOne
ClearMultiple clears the value of multiple.
func (*InputUpdateOne) ClearOptions ¶
func (iuo *InputUpdateOne) ClearOptions() *InputUpdateOne
ClearOptions clears the value of options.
func (*InputUpdateOne) ClearQuestion ¶
func (iuo *InputUpdateOne) ClearQuestion() *InputUpdateOne
ClearQuestion clears the question edge to Question.
func (*InputUpdateOne) Exec ¶
func (iuo *InputUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InputUpdateOne) ExecX ¶
func (iuo *InputUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InputUpdateOne) Save ¶
func (iuo *InputUpdateOne) Save(ctx context.Context) (*Input, error)
Save executes the query and returns the updated entity.
func (*InputUpdateOne) SaveX ¶
func (iuo *InputUpdateOne) SaveX(ctx context.Context) *Input
SaveX is like Save, but panics if an error occurs.
func (*InputUpdateOne) SetDefaults ¶
func (iuo *InputUpdateOne) SetDefaults(s []string) *InputUpdateOne
SetDefaults sets the defaults field.
func (*InputUpdateOne) SetMultiple ¶
func (iuo *InputUpdateOne) SetMultiple(b bool) *InputUpdateOne
SetMultiple sets the multiple field.
func (*InputUpdateOne) SetNillableMultiple ¶
func (iuo *InputUpdateOne) SetNillableMultiple(b *bool) *InputUpdateOne
SetNillableMultiple sets the multiple field if the given value is not nil.
func (*InputUpdateOne) SetOptions ¶
func (iuo *InputUpdateOne) SetOptions(m map[string]interface{}) *InputUpdateOne
SetOptions sets the options field.
func (*InputUpdateOne) SetQuestion ¶
func (iuo *InputUpdateOne) SetQuestion(q *Question) *InputUpdateOne
SetQuestion sets the question edge to Question.
func (*InputUpdateOne) SetQuestionID ¶
func (iuo *InputUpdateOne) SetQuestionID(id uuid.UUID) *InputUpdateOne
SetQuestionID sets the question edge to Question by id.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflict 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 Person ¶
type Person struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // LastActivity holds the value of the "lastActivity" field. LastActivity time.Time `json:"lastActivity,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Picture holds the value of the "picture" field. Picture string `json:"picture,omitempty"` // Roles holds the value of the "roles" field. Roles []string `json:"roles,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PersonQuery when eager-loading is set. Edges PersonEdges `json:"edges"` // contains filtered or unexported fields }
Person is the model entity for the Person schema.
func (*Person) QueryAccounts ¶
func (pe *Person) QueryAccounts() *AccountQuery
QueryAccounts queries the accounts edge of the Person.
func (*Person) QueryAdminOf ¶
func (pe *Person) QueryAdminOf() *DomainQuery
QueryAdminOf queries the adminOf edge of the Person.
func (*Person) QueryContacts ¶
func (pe *Person) QueryContacts() *ContactQuery
QueryContacts queries the contacts edge of the Person.
func (*Person) QueryDomains ¶
func (pe *Person) QueryDomains() *DomainQuery
QueryDomains queries the domains edge of the Person.
func (*Person) QuerySurveys ¶
func (pe *Person) QuerySurveys() *SurveyQuery
QuerySurveys queries the surveys edge of the Person.
func (*Person) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Person) Update ¶
func (pe *Person) Update() *PersonUpdateOne
Update returns a builder for updating this Person. Note that, you need to call Person.Unwrap() before calling this method, if this Person was returned from a transaction, and the transaction was committed or rolled back.
type PersonClient ¶
type PersonClient struct {
// contains filtered or unexported fields
}
PersonClient is a client for the Person schema.
func NewPersonClient ¶
func NewPersonClient(c config) *PersonClient
NewPersonClient returns a client for the Person from the given config.
func (*PersonClient) Create ¶
func (c *PersonClient) Create() *PersonCreate
Create returns a create builder for Person.
func (*PersonClient) Delete ¶
func (c *PersonClient) Delete() *PersonDelete
Delete returns a delete builder for Person.
func (*PersonClient) DeleteOne ¶
func (c *PersonClient) DeleteOne(pe *Person) *PersonDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*PersonClient) DeleteOneID ¶
func (c *PersonClient) DeleteOneID(id uuid.UUID) *PersonDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*PersonClient) Query ¶
func (c *PersonClient) Query() *PersonQuery
Create returns a query builder for Person.
func (*PersonClient) QueryAccounts ¶
func (c *PersonClient) QueryAccounts(pe *Person) *AccountQuery
QueryAccounts queries the accounts edge of a Person.
func (*PersonClient) QueryAdminOf ¶
func (c *PersonClient) QueryAdminOf(pe *Person) *DomainQuery
QueryAdminOf queries the adminOf edge of a Person.
func (*PersonClient) QueryContacts ¶
func (c *PersonClient) QueryContacts(pe *Person) *ContactQuery
QueryContacts queries the contacts edge of a Person.
func (*PersonClient) QueryDomains ¶
func (c *PersonClient) QueryDomains(pe *Person) *DomainQuery
QueryDomains queries the domains edge of a Person.
func (*PersonClient) QuerySurveys ¶
func (c *PersonClient) QuerySurveys(pe *Person) *SurveyQuery
QuerySurveys queries the surveys edge of a Person.
func (*PersonClient) Update ¶
func (c *PersonClient) Update() *PersonUpdate
Update returns an update builder for Person.
func (*PersonClient) UpdateOne ¶
func (c *PersonClient) UpdateOne(pe *Person) *PersonUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PersonClient) UpdateOneID ¶
func (c *PersonClient) UpdateOneID(id uuid.UUID) *PersonUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PersonClient) Use ¶
func (c *PersonClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `person.Hooks(f(g(h())))`.
type PersonCreate ¶
type PersonCreate struct {
// contains filtered or unexported fields
}
PersonCreate is the builder for creating a Person entity.
func (*PersonCreate) AddAccountIDs ¶
func (pc *PersonCreate) AddAccountIDs(ids ...uuid.UUID) *PersonCreate
AddAccountIDs adds the accounts edge to Account by ids.
func (*PersonCreate) AddAccounts ¶
func (pc *PersonCreate) AddAccounts(a ...*Account) *PersonCreate
AddAccounts adds the accounts edges to Account.
func (*PersonCreate) AddAdminOf ¶
func (pc *PersonCreate) AddAdminOf(d ...*Domain) *PersonCreate
AddAdminOf adds the adminOf edges to Domain.
func (*PersonCreate) AddAdminOfIDs ¶
func (pc *PersonCreate) AddAdminOfIDs(ids ...uuid.UUID) *PersonCreate
AddAdminOfIDs adds the adminOf edge to Domain by ids.
func (*PersonCreate) AddContactIDs ¶
func (pc *PersonCreate) AddContactIDs(ids ...uuid.UUID) *PersonCreate
AddContactIDs adds the contacts edge to Contact by ids.
func (*PersonCreate) AddContacts ¶
func (pc *PersonCreate) AddContacts(c ...*Contact) *PersonCreate
AddContacts adds the contacts edges to Contact.
func (*PersonCreate) AddDomainIDs ¶
func (pc *PersonCreate) AddDomainIDs(ids ...uuid.UUID) *PersonCreate
AddDomainIDs adds the domains edge to Domain by ids.
func (*PersonCreate) AddDomains ¶
func (pc *PersonCreate) AddDomains(d ...*Domain) *PersonCreate
AddDomains adds the domains edges to Domain.
func (*PersonCreate) AddSurveyIDs ¶
func (pc *PersonCreate) AddSurveyIDs(ids ...uuid.UUID) *PersonCreate
AddSurveyIDs adds the surveys edge to Survey by ids.
func (*PersonCreate) AddSurveys ¶
func (pc *PersonCreate) AddSurveys(s ...*Survey) *PersonCreate
AddSurveys adds the surveys edges to Survey.
func (*PersonCreate) Save ¶
func (pc *PersonCreate) Save(ctx context.Context) (*Person, error)
Save creates the Person in the database.
func (*PersonCreate) SaveX ¶
func (pc *PersonCreate) SaveX(ctx context.Context) *Person
SaveX calls Save and panics if Save returns an error.
func (*PersonCreate) SetID ¶
func (pc *PersonCreate) SetID(u uuid.UUID) *PersonCreate
SetID sets the id field.
func (*PersonCreate) SetLastActivity ¶
func (pc *PersonCreate) SetLastActivity(t time.Time) *PersonCreate
SetLastActivity sets the lastActivity field.
func (*PersonCreate) SetName ¶
func (pc *PersonCreate) SetName(s string) *PersonCreate
SetName sets the name field.
func (*PersonCreate) SetNillableLastActivity ¶
func (pc *PersonCreate) SetNillableLastActivity(t *time.Time) *PersonCreate
SetNillableLastActivity sets the lastActivity field if the given value is not nil.
func (*PersonCreate) SetNillablePicture ¶
func (pc *PersonCreate) SetNillablePicture(s *string) *PersonCreate
SetNillablePicture sets the picture field if the given value is not nil.
func (*PersonCreate) SetNillableUsername ¶
func (pc *PersonCreate) SetNillableUsername(s *string) *PersonCreate
SetNillableUsername sets the username field if the given value is not nil.
func (*PersonCreate) SetPicture ¶
func (pc *PersonCreate) SetPicture(s string) *PersonCreate
SetPicture sets the picture field.
func (*PersonCreate) SetRoles ¶
func (pc *PersonCreate) SetRoles(s []string) *PersonCreate
SetRoles sets the roles field.
func (*PersonCreate) SetUsername ¶
func (pc *PersonCreate) SetUsername(s string) *PersonCreate
SetUsername sets the username field.
type PersonDelete ¶
type PersonDelete struct {
// contains filtered or unexported fields
}
PersonDelete is the builder for deleting a Person entity.
func (*PersonDelete) Exec ¶
func (pd *PersonDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PersonDelete) ExecX ¶
func (pd *PersonDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PersonDelete) Where ¶
func (pd *PersonDelete) Where(ps ...predicate.Person) *PersonDelete
Where adds a new predicate to the delete builder.
type PersonDeleteOne ¶
type PersonDeleteOne struct {
// contains filtered or unexported fields
}
PersonDeleteOne is the builder for deleting a single Person entity.
func (*PersonDeleteOne) Exec ¶
func (pdo *PersonDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PersonDeleteOne) ExecX ¶
func (pdo *PersonDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PersonEdges ¶
type PersonEdges struct { // Accounts holds the value of the accounts edge. Accounts []*Account // Contacts holds the value of the contacts edge. Contacts []*Contact // Surveys holds the value of the surveys edge. Surveys []*Survey // Domains holds the value of the domains edge. Domains []*Domain // AdminOf holds the value of the adminOf edge. AdminOf []*Domain // contains filtered or unexported fields }
PersonEdges holds the relations/edges for other nodes in the graph.
func (PersonEdges) AccountsOrErr ¶
func (e PersonEdges) AccountsOrErr() ([]*Account, error)
AccountsOrErr returns the Accounts value or an error if the edge was not loaded in eager-loading.
func (PersonEdges) AdminOfOrErr ¶
func (e PersonEdges) AdminOfOrErr() ([]*Domain, error)
AdminOfOrErr returns the AdminOf value or an error if the edge was not loaded in eager-loading.
func (PersonEdges) ContactsOrErr ¶
func (e PersonEdges) ContactsOrErr() ([]*Contact, error)
ContactsOrErr returns the Contacts value or an error if the edge was not loaded in eager-loading.
func (PersonEdges) DomainsOrErr ¶
func (e PersonEdges) DomainsOrErr() ([]*Domain, error)
DomainsOrErr returns the Domains value or an error if the edge was not loaded in eager-loading.
func (PersonEdges) SurveysOrErr ¶
func (e PersonEdges) SurveysOrErr() ([]*Survey, error)
SurveysOrErr returns the Surveys value or an error if the edge was not loaded in eager-loading.
type PersonGroupBy ¶
type PersonGroupBy struct {
// contains filtered or unexported fields
}
PersonGroupBy is the builder for group-by Person entities.
func (*PersonGroupBy) Aggregate ¶
func (pgb *PersonGroupBy) Aggregate(fns ...Aggregate) *PersonGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PersonGroupBy) Bools ¶
func (pgb *PersonGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*PersonGroupBy) BoolsX ¶
func (pgb *PersonGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*PersonGroupBy) Float64s ¶
func (pgb *PersonGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*PersonGroupBy) Float64sX ¶
func (pgb *PersonGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*PersonGroupBy) Ints ¶
func (pgb *PersonGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*PersonGroupBy) IntsX ¶
func (pgb *PersonGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*PersonGroupBy) Scan ¶
func (pgb *PersonGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*PersonGroupBy) ScanX ¶
func (pgb *PersonGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type PersonMutation ¶
type PersonMutation struct {
// contains filtered or unexported fields
}
PersonMutation represents an operation that mutate the Persons nodes in the graph.
func (*PersonMutation) AccountsIDs ¶
func (m *PersonMutation) AccountsIDs() (ids []uuid.UUID)
AccountsIDs returns the accounts ids in the mutation.
func (*PersonMutation) AddAccountIDs ¶
func (m *PersonMutation) AddAccountIDs(ids ...uuid.UUID)
AddAccountIDs adds the accounts edge to Account by ids.
func (*PersonMutation) AddAdminOfIDs ¶
func (m *PersonMutation) AddAdminOfIDs(ids ...uuid.UUID)
AddAdminOfIDs adds the adminOf edge to Domain by ids.
func (*PersonMutation) AddContactIDs ¶
func (m *PersonMutation) AddContactIDs(ids ...uuid.UUID)
AddContactIDs adds the contacts edge to Contact by ids.
func (*PersonMutation) AddDomainIDs ¶
func (m *PersonMutation) AddDomainIDs(ids ...uuid.UUID)
AddDomainIDs adds the domains edge to Domain by ids.
func (*PersonMutation) AddField ¶
func (m *PersonMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*PersonMutation) AddSurveyIDs ¶
func (m *PersonMutation) AddSurveyIDs(ids ...uuid.UUID)
AddSurveyIDs adds the surveys edge to Survey by ids.
func (*PersonMutation) AddedEdges ¶
func (m *PersonMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PersonMutation) AddedField ¶
func (m *PersonMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*PersonMutation) AddedFields ¶
func (m *PersonMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*PersonMutation) AddedIDs ¶
func (m *PersonMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*PersonMutation) AdminOfIDs ¶
func (m *PersonMutation) AdminOfIDs() (ids []uuid.UUID)
AdminOfIDs returns the adminOf ids in the mutation.
func (*PersonMutation) ClearEdge ¶
func (m *PersonMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*PersonMutation) ClearField ¶
func (m *PersonMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*PersonMutation) ClearPicture ¶
func (m *PersonMutation) ClearPicture()
ClearPicture clears the value of picture.
func (*PersonMutation) ClearRoles ¶
func (m *PersonMutation) ClearRoles()
ClearRoles clears the value of roles.
func (*PersonMutation) ClearUsername ¶
func (m *PersonMutation) ClearUsername()
ClearUsername clears the value of username.
func (*PersonMutation) ClearedEdges ¶
func (m *PersonMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PersonMutation) ClearedFields ¶
func (m *PersonMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PersonMutation) Client ¶
func (m PersonMutation) 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 (*PersonMutation) ContactsIDs ¶
func (m *PersonMutation) ContactsIDs() (ids []uuid.UUID)
ContactsIDs returns the contacts ids in the mutation.
func (*PersonMutation) DomainsIDs ¶
func (m *PersonMutation) DomainsIDs() (ids []uuid.UUID)
DomainsIDs returns the domains ids in the mutation.
func (*PersonMutation) EdgeCleared ¶
func (m *PersonMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*PersonMutation) Field ¶
func (m *PersonMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*PersonMutation) FieldCleared ¶
func (m *PersonMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*PersonMutation) Fields ¶
func (m *PersonMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*PersonMutation) ID ¶
func (m *PersonMutation) ID() (id uuid.UUID, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*PersonMutation) LastActivity ¶
func (m *PersonMutation) LastActivity() (r time.Time, exists bool)
LastActivity returns the lastActivity value in the mutation.
func (*PersonMutation) Name ¶
func (m *PersonMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*PersonMutation) Picture ¶
func (m *PersonMutation) Picture() (r string, exists bool)
Picture returns the picture value in the mutation.
func (*PersonMutation) PictureCleared ¶
func (m *PersonMutation) PictureCleared() bool
PictureCleared returns if the field picture was cleared in this mutation.
func (*PersonMutation) RemoveAccountIDs ¶
func (m *PersonMutation) RemoveAccountIDs(ids ...uuid.UUID)
RemoveAccountIDs removes the accounts edge to Account by ids.
func (*PersonMutation) RemoveAdminOfIDs ¶
func (m *PersonMutation) RemoveAdminOfIDs(ids ...uuid.UUID)
RemoveAdminOfIDs removes the adminOf edge to Domain by ids.
func (*PersonMutation) RemoveContactIDs ¶
func (m *PersonMutation) RemoveContactIDs(ids ...uuid.UUID)
RemoveContactIDs removes the contacts edge to Contact by ids.
func (*PersonMutation) RemoveDomainIDs ¶
func (m *PersonMutation) RemoveDomainIDs(ids ...uuid.UUID)
RemoveDomainIDs removes the domains edge to Domain by ids.
func (*PersonMutation) RemoveSurveyIDs ¶
func (m *PersonMutation) RemoveSurveyIDs(ids ...uuid.UUID)
RemoveSurveyIDs removes the surveys edge to Survey by ids.
func (*PersonMutation) RemovedAccountsIDs ¶
func (m *PersonMutation) RemovedAccountsIDs() (ids []uuid.UUID)
RemovedAccounts returns the removed ids of accounts.
func (*PersonMutation) RemovedAdminOfIDs ¶
func (m *PersonMutation) RemovedAdminOfIDs() (ids []uuid.UUID)
RemovedAdminOf returns the removed ids of adminOf.
func (*PersonMutation) RemovedContactsIDs ¶
func (m *PersonMutation) RemovedContactsIDs() (ids []uuid.UUID)
RemovedContacts returns the removed ids of contacts.
func (*PersonMutation) RemovedDomainsIDs ¶
func (m *PersonMutation) RemovedDomainsIDs() (ids []uuid.UUID)
RemovedDomains returns the removed ids of domains.
func (*PersonMutation) RemovedEdges ¶
func (m *PersonMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PersonMutation) RemovedIDs ¶
func (m *PersonMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*PersonMutation) RemovedSurveysIDs ¶
func (m *PersonMutation) RemovedSurveysIDs() (ids []uuid.UUID)
RemovedSurveys returns the removed ids of surveys.
func (*PersonMutation) ResetAccounts ¶
func (m *PersonMutation) ResetAccounts()
ResetAccounts reset all changes of the accounts edge.
func (*PersonMutation) ResetAdminOf ¶
func (m *PersonMutation) ResetAdminOf()
ResetAdminOf reset all changes of the adminOf edge.
func (*PersonMutation) ResetContacts ¶
func (m *PersonMutation) ResetContacts()
ResetContacts reset all changes of the contacts edge.
func (*PersonMutation) ResetDomains ¶
func (m *PersonMutation) ResetDomains()
ResetDomains reset all changes of the domains edge.
func (*PersonMutation) ResetEdge ¶
func (m *PersonMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*PersonMutation) ResetField ¶
func (m *PersonMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*PersonMutation) ResetLastActivity ¶
func (m *PersonMutation) ResetLastActivity()
ResetLastActivity reset all changes of the lastActivity field.
func (*PersonMutation) ResetName ¶
func (m *PersonMutation) ResetName()
ResetName reset all changes of the name field.
func (*PersonMutation) ResetPicture ¶
func (m *PersonMutation) ResetPicture()
ResetPicture reset all changes of the picture field.
func (*PersonMutation) ResetRoles ¶
func (m *PersonMutation) ResetRoles()
ResetRoles reset all changes of the roles field.
func (*PersonMutation) ResetSurveys ¶
func (m *PersonMutation) ResetSurveys()
ResetSurveys reset all changes of the surveys edge.
func (*PersonMutation) ResetUsername ¶
func (m *PersonMutation) ResetUsername()
ResetUsername reset all changes of the username field.
func (*PersonMutation) Roles ¶
func (m *PersonMutation) Roles() (r []string, exists bool)
Roles returns the roles value in the mutation.
func (*PersonMutation) RolesCleared ¶
func (m *PersonMutation) RolesCleared() bool
RolesCleared returns if the field roles was cleared in this mutation.
func (*PersonMutation) SetField ¶
func (m *PersonMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*PersonMutation) SetID ¶
func (m *PersonMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Person creation.
func (*PersonMutation) SetLastActivity ¶
func (m *PersonMutation) SetLastActivity(t time.Time)
SetLastActivity sets the lastActivity field.
func (*PersonMutation) SetName ¶
func (m *PersonMutation) SetName(s string)
SetName sets the name field.
func (*PersonMutation) SetPicture ¶
func (m *PersonMutation) SetPicture(s string)
SetPicture sets the picture field.
func (*PersonMutation) SetRoles ¶
func (m *PersonMutation) SetRoles(s []string)
SetRoles sets the roles field.
func (*PersonMutation) SetUsername ¶
func (m *PersonMutation) SetUsername(s string)
SetUsername sets the username field.
func (*PersonMutation) SurveysIDs ¶
func (m *PersonMutation) SurveysIDs() (ids []uuid.UUID)
SurveysIDs returns the surveys ids in the mutation.
func (PersonMutation) Tx ¶
func (m PersonMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PersonMutation) Type ¶
func (m *PersonMutation) Type() string
Type returns the node type of this mutation (Person).
func (*PersonMutation) Username ¶
func (m *PersonMutation) Username() (r string, exists bool)
Username returns the username value in the mutation.
func (*PersonMutation) UsernameCleared ¶
func (m *PersonMutation) UsernameCleared() bool
UsernameCleared returns if the field username was cleared in this mutation.
type PersonQuery ¶
type PersonQuery struct {
// contains filtered or unexported fields
}
PersonQuery is the builder for querying Person entities.
func (*PersonQuery) All ¶
func (pq *PersonQuery) All(ctx context.Context) ([]*Person, error)
All executes the query and returns a list of Persons.
func (*PersonQuery) AllX ¶
func (pq *PersonQuery) AllX(ctx context.Context) []*Person
AllX is like All, but panics if an error occurs.
func (*PersonQuery) Clone ¶
func (pq *PersonQuery) Clone() *PersonQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PersonQuery) Count ¶
func (pq *PersonQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PersonQuery) CountX ¶
func (pq *PersonQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PersonQuery) Exist ¶
func (pq *PersonQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PersonQuery) ExistX ¶
func (pq *PersonQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PersonQuery) First ¶
func (pq *PersonQuery) First(ctx context.Context) (*Person, error)
First returns the first Person entity in the query. Returns *NotFoundError when no person was found.
func (*PersonQuery) FirstID ¶
FirstID returns the first Person id in the query. Returns *NotFoundError when no id was found.
func (*PersonQuery) FirstX ¶
func (pq *PersonQuery) FirstX(ctx context.Context) *Person
FirstX is like First, but panics if an error occurs.
func (*PersonQuery) FirstXID ¶
func (pq *PersonQuery) FirstXID(ctx context.Context) uuid.UUID
FirstXID is like FirstID, but panics if an error occurs.
func (*PersonQuery) GroupBy ¶
func (pq *PersonQuery) GroupBy(field string, fields ...string) *PersonGroupBy
GroupBy 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.Person.Query(). GroupBy(person.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PersonQuery) IDsX ¶
func (pq *PersonQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*PersonQuery) Limit ¶
func (pq *PersonQuery) Limit(limit int) *PersonQuery
Limit adds a limit step to the query.
func (*PersonQuery) Offset ¶
func (pq *PersonQuery) Offset(offset int) *PersonQuery
Offset adds an offset step to the query.
func (*PersonQuery) Only ¶
func (pq *PersonQuery) Only(ctx context.Context) (*Person, error)
Only returns the only Person entity in the query, returns an error if not exactly one entity was returned.
func (*PersonQuery) OnlyID ¶
OnlyID returns the only Person id in the query, returns an error if not exactly one id was returned.
func (*PersonQuery) OnlyX ¶
func (pq *PersonQuery) OnlyX(ctx context.Context) *Person
OnlyX is like Only, but panics if an error occurs.
func (*PersonQuery) OnlyXID ¶
func (pq *PersonQuery) OnlyXID(ctx context.Context) uuid.UUID
OnlyXID is like OnlyID, but panics if an error occurs.
func (*PersonQuery) Order ¶
func (pq *PersonQuery) Order(o ...Order) *PersonQuery
Order adds an order step to the query.
func (*PersonQuery) QueryAccounts ¶
func (pq *PersonQuery) QueryAccounts() *AccountQuery
QueryAccounts chains the current query on the accounts edge.
func (*PersonQuery) QueryAdminOf ¶
func (pq *PersonQuery) QueryAdminOf() *DomainQuery
QueryAdminOf chains the current query on the adminOf edge.
func (*PersonQuery) QueryContacts ¶
func (pq *PersonQuery) QueryContacts() *ContactQuery
QueryContacts chains the current query on the contacts edge.
func (*PersonQuery) QueryDomains ¶
func (pq *PersonQuery) QueryDomains() *DomainQuery
QueryDomains chains the current query on the domains edge.
func (*PersonQuery) QuerySurveys ¶
func (pq *PersonQuery) QuerySurveys() *SurveyQuery
QuerySurveys chains the current query on the surveys edge.
func (*PersonQuery) Select ¶
func (pq *PersonQuery) Select(field string, fields ...string) *PersonSelect
Select one or more fields from the given query.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Person.Query(). Select(person.FieldName). Scan(ctx, &v)
func (*PersonQuery) Where ¶
func (pq *PersonQuery) Where(ps ...predicate.Person) *PersonQuery
Where adds a new predicate for the builder.
func (*PersonQuery) WithAccounts ¶
func (pq *PersonQuery) WithAccounts(opts ...func(*AccountQuery)) *PersonQuery
WithAccounts tells the query-builder to eager-loads the nodes that are connected to
the "accounts" edge. The optional arguments used to configure the query builder of the edge.
func (*PersonQuery) WithAdminOf ¶
func (pq *PersonQuery) WithAdminOf(opts ...func(*DomainQuery)) *PersonQuery
WithAdminOf tells the query-builder to eager-loads the nodes that are connected to
the "adminOf" edge. The optional arguments used to configure the query builder of the edge.
func (*PersonQuery) WithContacts ¶
func (pq *PersonQuery) WithContacts(opts ...func(*ContactQuery)) *PersonQuery
WithContacts tells the query-builder to eager-loads the nodes that are connected to
the "contacts" edge. The optional arguments used to configure the query builder of the edge.
func (*PersonQuery) WithDomains ¶
func (pq *PersonQuery) WithDomains(opts ...func(*DomainQuery)) *PersonQuery
WithDomains tells the query-builder to eager-loads the nodes that are connected to
the "domains" edge. The optional arguments used to configure the query builder of the edge.
func (*PersonQuery) WithSurveys ¶
func (pq *PersonQuery) WithSurveys(opts ...func(*SurveyQuery)) *PersonQuery
WithSurveys tells the query-builder to eager-loads the nodes that are connected to
the "surveys" edge. The optional arguments used to configure the query builder of the edge.
type PersonSelect ¶
type PersonSelect struct {
// contains filtered or unexported fields
}
PersonSelect is the builder for select fields of Person entities.
func (*PersonSelect) Bools ¶
func (ps *PersonSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*PersonSelect) BoolsX ¶
func (ps *PersonSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*PersonSelect) Float64s ¶
func (ps *PersonSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*PersonSelect) Float64sX ¶
func (ps *PersonSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*PersonSelect) Ints ¶
func (ps *PersonSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*PersonSelect) IntsX ¶
func (ps *PersonSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*PersonSelect) Scan ¶
func (ps *PersonSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*PersonSelect) ScanX ¶
func (ps *PersonSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type PersonUpdate ¶
type PersonUpdate struct {
// contains filtered or unexported fields
}
PersonUpdate is the builder for updating Person entities.
func (*PersonUpdate) AddAccountIDs ¶
func (pu *PersonUpdate) AddAccountIDs(ids ...uuid.UUID) *PersonUpdate
AddAccountIDs adds the accounts edge to Account by ids.
func (*PersonUpdate) AddAccounts ¶
func (pu *PersonUpdate) AddAccounts(a ...*Account) *PersonUpdate
AddAccounts adds the accounts edges to Account.
func (*PersonUpdate) AddAdminOf ¶
func (pu *PersonUpdate) AddAdminOf(d ...*Domain) *PersonUpdate
AddAdminOf adds the adminOf edges to Domain.
func (*PersonUpdate) AddAdminOfIDs ¶
func (pu *PersonUpdate) AddAdminOfIDs(ids ...uuid.UUID) *PersonUpdate
AddAdminOfIDs adds the adminOf edge to Domain by ids.
func (*PersonUpdate) AddContactIDs ¶
func (pu *PersonUpdate) AddContactIDs(ids ...uuid.UUID) *PersonUpdate
AddContactIDs adds the contacts edge to Contact by ids.
func (*PersonUpdate) AddContacts ¶
func (pu *PersonUpdate) AddContacts(c ...*Contact) *PersonUpdate
AddContacts adds the contacts edges to Contact.
func (*PersonUpdate) AddDomainIDs ¶
func (pu *PersonUpdate) AddDomainIDs(ids ...uuid.UUID) *PersonUpdate
AddDomainIDs adds the domains edge to Domain by ids.
func (*PersonUpdate) AddDomains ¶
func (pu *PersonUpdate) AddDomains(d ...*Domain) *PersonUpdate
AddDomains adds the domains edges to Domain.
func (*PersonUpdate) AddSurveyIDs ¶
func (pu *PersonUpdate) AddSurveyIDs(ids ...uuid.UUID) *PersonUpdate
AddSurveyIDs adds the surveys edge to Survey by ids.
func (*PersonUpdate) AddSurveys ¶
func (pu *PersonUpdate) AddSurveys(s ...*Survey) *PersonUpdate
AddSurveys adds the surveys edges to Survey.
func (*PersonUpdate) ClearPicture ¶
func (pu *PersonUpdate) ClearPicture() *PersonUpdate
ClearPicture clears the value of picture.
func (*PersonUpdate) ClearRoles ¶
func (pu *PersonUpdate) ClearRoles() *PersonUpdate
ClearRoles clears the value of roles.
func (*PersonUpdate) ClearUsername ¶
func (pu *PersonUpdate) ClearUsername() *PersonUpdate
ClearUsername clears the value of username.
func (*PersonUpdate) Exec ¶
func (pu *PersonUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonUpdate) ExecX ¶
func (pu *PersonUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonUpdate) RemoveAccountIDs ¶
func (pu *PersonUpdate) RemoveAccountIDs(ids ...uuid.UUID) *PersonUpdate
RemoveAccountIDs removes the accounts edge to Account by ids.
func (*PersonUpdate) RemoveAccounts ¶
func (pu *PersonUpdate) RemoveAccounts(a ...*Account) *PersonUpdate
RemoveAccounts removes accounts edges to Account.
func (*PersonUpdate) RemoveAdminOf ¶
func (pu *PersonUpdate) RemoveAdminOf(d ...*Domain) *PersonUpdate
RemoveAdminOf removes adminOf edges to Domain.
func (*PersonUpdate) RemoveAdminOfIDs ¶
func (pu *PersonUpdate) RemoveAdminOfIDs(ids ...uuid.UUID) *PersonUpdate
RemoveAdminOfIDs removes the adminOf edge to Domain by ids.
func (*PersonUpdate) RemoveContactIDs ¶
func (pu *PersonUpdate) RemoveContactIDs(ids ...uuid.UUID) *PersonUpdate
RemoveContactIDs removes the contacts edge to Contact by ids.
func (*PersonUpdate) RemoveContacts ¶
func (pu *PersonUpdate) RemoveContacts(c ...*Contact) *PersonUpdate
RemoveContacts removes contacts edges to Contact.
func (*PersonUpdate) RemoveDomainIDs ¶
func (pu *PersonUpdate) RemoveDomainIDs(ids ...uuid.UUID) *PersonUpdate
RemoveDomainIDs removes the domains edge to Domain by ids.
func (*PersonUpdate) RemoveDomains ¶
func (pu *PersonUpdate) RemoveDomains(d ...*Domain) *PersonUpdate
RemoveDomains removes domains edges to Domain.
func (*PersonUpdate) RemoveSurveyIDs ¶
func (pu *PersonUpdate) RemoveSurveyIDs(ids ...uuid.UUID) *PersonUpdate
RemoveSurveyIDs removes the surveys edge to Survey by ids.
func (*PersonUpdate) RemoveSurveys ¶
func (pu *PersonUpdate) RemoveSurveys(s ...*Survey) *PersonUpdate
RemoveSurveys removes surveys edges to Survey.
func (*PersonUpdate) Save ¶
func (pu *PersonUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*PersonUpdate) SaveX ¶
func (pu *PersonUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PersonUpdate) SetLastActivity ¶
func (pu *PersonUpdate) SetLastActivity(t time.Time) *PersonUpdate
SetLastActivity sets the lastActivity field.
func (*PersonUpdate) SetName ¶
func (pu *PersonUpdate) SetName(s string) *PersonUpdate
SetName sets the name field.
func (*PersonUpdate) SetNillableLastActivity ¶
func (pu *PersonUpdate) SetNillableLastActivity(t *time.Time) *PersonUpdate
SetNillableLastActivity sets the lastActivity field if the given value is not nil.
func (*PersonUpdate) SetNillablePicture ¶
func (pu *PersonUpdate) SetNillablePicture(s *string) *PersonUpdate
SetNillablePicture sets the picture field if the given value is not nil.
func (*PersonUpdate) SetNillableUsername ¶
func (pu *PersonUpdate) SetNillableUsername(s *string) *PersonUpdate
SetNillableUsername sets the username field if the given value is not nil.
func (*PersonUpdate) SetPicture ¶
func (pu *PersonUpdate) SetPicture(s string) *PersonUpdate
SetPicture sets the picture field.
func (*PersonUpdate) SetRoles ¶
func (pu *PersonUpdate) SetRoles(s []string) *PersonUpdate
SetRoles sets the roles field.
func (*PersonUpdate) SetUsername ¶
func (pu *PersonUpdate) SetUsername(s string) *PersonUpdate
SetUsername sets the username field.
func (*PersonUpdate) Where ¶
func (pu *PersonUpdate) Where(ps ...predicate.Person) *PersonUpdate
Where adds a new predicate for the builder.
type PersonUpdateOne ¶
type PersonUpdateOne struct {
// contains filtered or unexported fields
}
PersonUpdateOne is the builder for updating a single Person entity.
func (*PersonUpdateOne) AddAccountIDs ¶
func (puo *PersonUpdateOne) AddAccountIDs(ids ...uuid.UUID) *PersonUpdateOne
AddAccountIDs adds the accounts edge to Account by ids.
func (*PersonUpdateOne) AddAccounts ¶
func (puo *PersonUpdateOne) AddAccounts(a ...*Account) *PersonUpdateOne
AddAccounts adds the accounts edges to Account.
func (*PersonUpdateOne) AddAdminOf ¶
func (puo *PersonUpdateOne) AddAdminOf(d ...*Domain) *PersonUpdateOne
AddAdminOf adds the adminOf edges to Domain.
func (*PersonUpdateOne) AddAdminOfIDs ¶
func (puo *PersonUpdateOne) AddAdminOfIDs(ids ...uuid.UUID) *PersonUpdateOne
AddAdminOfIDs adds the adminOf edge to Domain by ids.
func (*PersonUpdateOne) AddContactIDs ¶
func (puo *PersonUpdateOne) AddContactIDs(ids ...uuid.UUID) *PersonUpdateOne
AddContactIDs adds the contacts edge to Contact by ids.
func (*PersonUpdateOne) AddContacts ¶
func (puo *PersonUpdateOne) AddContacts(c ...*Contact) *PersonUpdateOne
AddContacts adds the contacts edges to Contact.
func (*PersonUpdateOne) AddDomainIDs ¶
func (puo *PersonUpdateOne) AddDomainIDs(ids ...uuid.UUID) *PersonUpdateOne
AddDomainIDs adds the domains edge to Domain by ids.
func (*PersonUpdateOne) AddDomains ¶
func (puo *PersonUpdateOne) AddDomains(d ...*Domain) *PersonUpdateOne
AddDomains adds the domains edges to Domain.
func (*PersonUpdateOne) AddSurveyIDs ¶
func (puo *PersonUpdateOne) AddSurveyIDs(ids ...uuid.UUID) *PersonUpdateOne
AddSurveyIDs adds the surveys edge to Survey by ids.
func (*PersonUpdateOne) AddSurveys ¶
func (puo *PersonUpdateOne) AddSurveys(s ...*Survey) *PersonUpdateOne
AddSurveys adds the surveys edges to Survey.
func (*PersonUpdateOne) ClearPicture ¶
func (puo *PersonUpdateOne) ClearPicture() *PersonUpdateOne
ClearPicture clears the value of picture.
func (*PersonUpdateOne) ClearRoles ¶
func (puo *PersonUpdateOne) ClearRoles() *PersonUpdateOne
ClearRoles clears the value of roles.
func (*PersonUpdateOne) ClearUsername ¶
func (puo *PersonUpdateOne) ClearUsername() *PersonUpdateOne
ClearUsername clears the value of username.
func (*PersonUpdateOne) Exec ¶
func (puo *PersonUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PersonUpdateOne) ExecX ¶
func (puo *PersonUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonUpdateOne) RemoveAccountIDs ¶
func (puo *PersonUpdateOne) RemoveAccountIDs(ids ...uuid.UUID) *PersonUpdateOne
RemoveAccountIDs removes the accounts edge to Account by ids.
func (*PersonUpdateOne) RemoveAccounts ¶
func (puo *PersonUpdateOne) RemoveAccounts(a ...*Account) *PersonUpdateOne
RemoveAccounts removes accounts edges to Account.
func (*PersonUpdateOne) RemoveAdminOf ¶
func (puo *PersonUpdateOne) RemoveAdminOf(d ...*Domain) *PersonUpdateOne
RemoveAdminOf removes adminOf edges to Domain.
func (*PersonUpdateOne) RemoveAdminOfIDs ¶
func (puo *PersonUpdateOne) RemoveAdminOfIDs(ids ...uuid.UUID) *PersonUpdateOne
RemoveAdminOfIDs removes the adminOf edge to Domain by ids.
func (*PersonUpdateOne) RemoveContactIDs ¶
func (puo *PersonUpdateOne) RemoveContactIDs(ids ...uuid.UUID) *PersonUpdateOne
RemoveContactIDs removes the contacts edge to Contact by ids.
func (*PersonUpdateOne) RemoveContacts ¶
func (puo *PersonUpdateOne) RemoveContacts(c ...*Contact) *PersonUpdateOne
RemoveContacts removes contacts edges to Contact.
func (*PersonUpdateOne) RemoveDomainIDs ¶
func (puo *PersonUpdateOne) RemoveDomainIDs(ids ...uuid.UUID) *PersonUpdateOne
RemoveDomainIDs removes the domains edge to Domain by ids.
func (*PersonUpdateOne) RemoveDomains ¶
func (puo *PersonUpdateOne) RemoveDomains(d ...*Domain) *PersonUpdateOne
RemoveDomains removes domains edges to Domain.
func (*PersonUpdateOne) RemoveSurveyIDs ¶
func (puo *PersonUpdateOne) RemoveSurveyIDs(ids ...uuid.UUID) *PersonUpdateOne
RemoveSurveyIDs removes the surveys edge to Survey by ids.
func (*PersonUpdateOne) RemoveSurveys ¶
func (puo *PersonUpdateOne) RemoveSurveys(s ...*Survey) *PersonUpdateOne
RemoveSurveys removes surveys edges to Survey.
func (*PersonUpdateOne) Save ¶
func (puo *PersonUpdateOne) Save(ctx context.Context) (*Person, error)
Save executes the query and returns the updated entity.
func (*PersonUpdateOne) SaveX ¶
func (puo *PersonUpdateOne) SaveX(ctx context.Context) *Person
SaveX is like Save, but panics if an error occurs.
func (*PersonUpdateOne) SetLastActivity ¶
func (puo *PersonUpdateOne) SetLastActivity(t time.Time) *PersonUpdateOne
SetLastActivity sets the lastActivity field.
func (*PersonUpdateOne) SetName ¶
func (puo *PersonUpdateOne) SetName(s string) *PersonUpdateOne
SetName sets the name field.
func (*PersonUpdateOne) SetNillableLastActivity ¶
func (puo *PersonUpdateOne) SetNillableLastActivity(t *time.Time) *PersonUpdateOne
SetNillableLastActivity sets the lastActivity field if the given value is not nil.
func (*PersonUpdateOne) SetNillablePicture ¶
func (puo *PersonUpdateOne) SetNillablePicture(s *string) *PersonUpdateOne
SetNillablePicture sets the picture field if the given value is not nil.
func (*PersonUpdateOne) SetNillableUsername ¶
func (puo *PersonUpdateOne) SetNillableUsername(s *string) *PersonUpdateOne
SetNillableUsername sets the username field if the given value is not nil.
func (*PersonUpdateOne) SetPicture ¶
func (puo *PersonUpdateOne) SetPicture(s string) *PersonUpdateOne
SetPicture sets the picture field.
func (*PersonUpdateOne) SetRoles ¶
func (puo *PersonUpdateOne) SetRoles(s []string) *PersonUpdateOne
SetRoles sets the roles field.
func (*PersonUpdateOne) SetUsername ¶
func (puo *PersonUpdateOne) SetUsername(s string) *PersonUpdateOne
SetUsername sets the username field.
type Question ¶
type Question struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Hash holds the value of the "hash" field. Hash string `json:"hash,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Metadata holds the value of the "metadata" field. Metadata map[string]interface{} `json:"metadata,omitempty"` // Validator holds the value of the "validator" field. Validator string `json:"validator,omitempty"` // Anonymous holds the value of the "anonymous" field. Anonymous bool `json:"anonymous,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the QuestionQuery when eager-loading is set. Edges QuestionEdges `json:"edges"` // contains filtered or unexported fields }
Question is the model entity for the Question schema.
func (*Question) QueryAnswers ¶
func (q *Question) QueryAnswers() *AnswerQuery
QueryAnswers queries the answers edge of the Question.
func (*Question) QueryInput ¶
func (q *Question) QueryInput() *InputQuery
QueryInput queries the input edge of the Question.
func (*Question) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Question) Update ¶
func (q *Question) Update() *QuestionUpdateOne
Update returns a builder for updating this Question. Note that, you need to call Question.Unwrap() before calling this method, if this Question was returned from a transaction, and the transaction was committed or rolled back.
type QuestionClient ¶
type QuestionClient struct {
// contains filtered or unexported fields
}
QuestionClient is a client for the Question schema.
func NewQuestionClient ¶
func NewQuestionClient(c config) *QuestionClient
NewQuestionClient returns a client for the Question from the given config.
func (*QuestionClient) Create ¶
func (c *QuestionClient) Create() *QuestionCreate
Create returns a create builder for Question.
func (*QuestionClient) Delete ¶
func (c *QuestionClient) Delete() *QuestionDelete
Delete returns a delete builder for Question.
func (*QuestionClient) DeleteOne ¶
func (c *QuestionClient) DeleteOne(q *Question) *QuestionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*QuestionClient) DeleteOneID ¶
func (c *QuestionClient) DeleteOneID(id uuid.UUID) *QuestionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*QuestionClient) Hooks ¶
func (c *QuestionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*QuestionClient) Query ¶
func (c *QuestionClient) Query() *QuestionQuery
Create returns a query builder for Question.
func (*QuestionClient) QueryAnswers ¶
func (c *QuestionClient) QueryAnswers(q *Question) *AnswerQuery
QueryAnswers queries the answers edge of a Question.
func (*QuestionClient) QueryFlow ¶
func (c *QuestionClient) QueryFlow(q *Question) *FlowQuery
QueryFlow queries the flow edge of a Question.
func (*QuestionClient) QueryInput ¶
func (c *QuestionClient) QueryInput(q *Question) *InputQuery
QueryInput queries the input edge of a Question.
func (*QuestionClient) Update ¶
func (c *QuestionClient) Update() *QuestionUpdate
Update returns an update builder for Question.
func (*QuestionClient) UpdateOne ¶
func (c *QuestionClient) UpdateOne(q *Question) *QuestionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*QuestionClient) UpdateOneID ¶
func (c *QuestionClient) UpdateOneID(id uuid.UUID) *QuestionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*QuestionClient) Use ¶
func (c *QuestionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `question.Hooks(f(g(h())))`.
type QuestionCreate ¶
type QuestionCreate struct {
// contains filtered or unexported fields
}
QuestionCreate is the builder for creating a Question entity.
func (*QuestionCreate) AddAnswerIDs ¶
func (qc *QuestionCreate) AddAnswerIDs(ids ...uuid.UUID) *QuestionCreate
AddAnswerIDs adds the answers edge to Answer by ids.
func (*QuestionCreate) AddAnswers ¶
func (qc *QuestionCreate) AddAnswers(a ...*Answer) *QuestionCreate
AddAnswers adds the answers edges to Answer.
func (*QuestionCreate) Save ¶
func (qc *QuestionCreate) Save(ctx context.Context) (*Question, error)
Save creates the Question in the database.
func (*QuestionCreate) SaveX ¶
func (qc *QuestionCreate) SaveX(ctx context.Context) *Question
SaveX calls Save and panics if Save returns an error.
func (*QuestionCreate) SetAnonymous ¶
func (qc *QuestionCreate) SetAnonymous(b bool) *QuestionCreate
SetAnonymous sets the anonymous field.
func (*QuestionCreate) SetDescription ¶
func (qc *QuestionCreate) SetDescription(s string) *QuestionCreate
SetDescription sets the description field.
func (*QuestionCreate) SetFlow ¶
func (qc *QuestionCreate) SetFlow(f *Flow) *QuestionCreate
SetFlow sets the flow edge to Flow.
func (*QuestionCreate) SetFlowID ¶
func (qc *QuestionCreate) SetFlowID(id uuid.UUID) *QuestionCreate
SetFlowID sets the flow edge to Flow by id.
func (*QuestionCreate) SetHash ¶
func (qc *QuestionCreate) SetHash(s string) *QuestionCreate
SetHash sets the hash field.
func (*QuestionCreate) SetID ¶
func (qc *QuestionCreate) SetID(u uuid.UUID) *QuestionCreate
SetID sets the id field.
func (*QuestionCreate) SetInput ¶
func (qc *QuestionCreate) SetInput(i *Input) *QuestionCreate
SetInput sets the input edge to Input.
func (*QuestionCreate) SetInputID ¶
func (qc *QuestionCreate) SetInputID(id uuid.UUID) *QuestionCreate
SetInputID sets the input edge to Input by id.
func (*QuestionCreate) SetMetadata ¶
func (qc *QuestionCreate) SetMetadata(m map[string]interface{}) *QuestionCreate
SetMetadata sets the metadata field.
func (*QuestionCreate) SetNillableAnonymous ¶
func (qc *QuestionCreate) SetNillableAnonymous(b *bool) *QuestionCreate
SetNillableAnonymous sets the anonymous field if the given value is not nil.
func (*QuestionCreate) SetNillableFlowID ¶
func (qc *QuestionCreate) SetNillableFlowID(id *uuid.UUID) *QuestionCreate
SetNillableFlowID sets the flow edge to Flow by id if the given value is not nil.
func (*QuestionCreate) SetNillableInputID ¶
func (qc *QuestionCreate) SetNillableInputID(id *uuid.UUID) *QuestionCreate
SetNillableInputID sets the input edge to Input by id if the given value is not nil.
func (*QuestionCreate) SetNillableValidator ¶
func (qc *QuestionCreate) SetNillableValidator(s *string) *QuestionCreate
SetNillableValidator sets the validator field if the given value is not nil.
func (*QuestionCreate) SetTitle ¶
func (qc *QuestionCreate) SetTitle(s string) *QuestionCreate
SetTitle sets the title field.
func (*QuestionCreate) SetValidator ¶
func (qc *QuestionCreate) SetValidator(s string) *QuestionCreate
SetValidator sets the validator field.
type QuestionDelete ¶
type QuestionDelete struct {
// contains filtered or unexported fields
}
QuestionDelete is the builder for deleting a Question entity.
func (*QuestionDelete) Exec ¶
func (qd *QuestionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*QuestionDelete) ExecX ¶
func (qd *QuestionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*QuestionDelete) Where ¶
func (qd *QuestionDelete) Where(ps ...predicate.Question) *QuestionDelete
Where adds a new predicate to the delete builder.
type QuestionDeleteOne ¶
type QuestionDeleteOne struct {
// contains filtered or unexported fields
}
QuestionDeleteOne is the builder for deleting a single Question entity.
func (*QuestionDeleteOne) Exec ¶
func (qdo *QuestionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*QuestionDeleteOne) ExecX ¶
func (qdo *QuestionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type QuestionEdges ¶
type QuestionEdges struct { // Answers holds the value of the answers edge. Answers []*Answer // Input holds the value of the input edge. Input *Input // Flow holds the value of the flow edge. Flow *Flow // contains filtered or unexported fields }
QuestionEdges holds the relations/edges for other nodes in the graph.
func (QuestionEdges) AnswersOrErr ¶
func (e QuestionEdges) AnswersOrErr() ([]*Answer, error)
AnswersOrErr returns the Answers value or an error if the edge was not loaded in eager-loading.
func (QuestionEdges) FlowOrErr ¶
func (e QuestionEdges) FlowOrErr() (*Flow, error)
FlowOrErr returns the Flow value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (QuestionEdges) InputOrErr ¶
func (e QuestionEdges) InputOrErr() (*Input, error)
InputOrErr returns the Input value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type QuestionGroupBy ¶
type QuestionGroupBy struct {
// contains filtered or unexported fields
}
QuestionGroupBy is the builder for group-by Question entities.
func (*QuestionGroupBy) Aggregate ¶
func (qgb *QuestionGroupBy) Aggregate(fns ...Aggregate) *QuestionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*QuestionGroupBy) Bools ¶
func (qgb *QuestionGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*QuestionGroupBy) BoolsX ¶
func (qgb *QuestionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*QuestionGroupBy) Float64s ¶
func (qgb *QuestionGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*QuestionGroupBy) Float64sX ¶
func (qgb *QuestionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*QuestionGroupBy) Ints ¶
func (qgb *QuestionGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*QuestionGroupBy) IntsX ¶
func (qgb *QuestionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*QuestionGroupBy) Scan ¶
func (qgb *QuestionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*QuestionGroupBy) ScanX ¶
func (qgb *QuestionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type QuestionMutation ¶
type QuestionMutation struct {
// contains filtered or unexported fields
}
QuestionMutation represents an operation that mutate the Questions nodes in the graph.
func (*QuestionMutation) AddAnswerIDs ¶
func (m *QuestionMutation) AddAnswerIDs(ids ...uuid.UUID)
AddAnswerIDs adds the answers edge to Answer by ids.
func (*QuestionMutation) AddField ¶
func (m *QuestionMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*QuestionMutation) AddedEdges ¶
func (m *QuestionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*QuestionMutation) AddedField ¶
func (m *QuestionMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*QuestionMutation) AddedFields ¶
func (m *QuestionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*QuestionMutation) AddedIDs ¶
func (m *QuestionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*QuestionMutation) Anonymous ¶
func (m *QuestionMutation) Anonymous() (r bool, exists bool)
Anonymous returns the anonymous value in the mutation.
func (*QuestionMutation) AnswersIDs ¶
func (m *QuestionMutation) AnswersIDs() (ids []uuid.UUID)
AnswersIDs returns the answers ids in the mutation.
func (*QuestionMutation) ClearEdge ¶
func (m *QuestionMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*QuestionMutation) ClearField ¶
func (m *QuestionMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*QuestionMutation) ClearFlow ¶
func (m *QuestionMutation) ClearFlow()
ClearFlow clears the flow edge to Flow.
func (*QuestionMutation) ClearInput ¶
func (m *QuestionMutation) ClearInput()
ClearInput clears the input edge to Input.
func (*QuestionMutation) ClearMetadata ¶
func (m *QuestionMutation) ClearMetadata()
ClearMetadata clears the value of metadata.
func (*QuestionMutation) ClearValidator ¶
func (m *QuestionMutation) ClearValidator()
ClearValidator clears the value of validator.
func (*QuestionMutation) ClearedEdges ¶
func (m *QuestionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*QuestionMutation) ClearedFields ¶
func (m *QuestionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (QuestionMutation) Client ¶
func (m QuestionMutation) 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 (*QuestionMutation) Description ¶
func (m *QuestionMutation) Description() (r string, exists bool)
Description returns the description value in the mutation.
func (*QuestionMutation) EdgeCleared ¶
func (m *QuestionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*QuestionMutation) Field ¶
func (m *QuestionMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*QuestionMutation) FieldCleared ¶
func (m *QuestionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*QuestionMutation) Fields ¶
func (m *QuestionMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*QuestionMutation) FlowCleared ¶
func (m *QuestionMutation) FlowCleared() bool
FlowCleared returns if the edge flow was cleared.
func (*QuestionMutation) FlowID ¶
func (m *QuestionMutation) FlowID() (id uuid.UUID, exists bool)
FlowID returns the flow id in the mutation.
func (*QuestionMutation) FlowIDs ¶
func (m *QuestionMutation) FlowIDs() (ids []uuid.UUID)
FlowIDs returns the flow ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use FlowID instead. It exists only for internal usage by the builders.
func (*QuestionMutation) Hash ¶
func (m *QuestionMutation) Hash() (r string, exists bool)
Hash returns the hash value in the mutation.
func (*QuestionMutation) ID ¶
func (m *QuestionMutation) ID() (id uuid.UUID, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*QuestionMutation) InputCleared ¶
func (m *QuestionMutation) InputCleared() bool
InputCleared returns if the edge input was cleared.
func (*QuestionMutation) InputID ¶
func (m *QuestionMutation) InputID() (id uuid.UUID, exists bool)
InputID returns the input id in the mutation.
func (*QuestionMutation) InputIDs ¶
func (m *QuestionMutation) InputIDs() (ids []uuid.UUID)
InputIDs returns the input ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use InputID instead. It exists only for internal usage by the builders.
func (*QuestionMutation) Metadata ¶
func (m *QuestionMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the metadata value in the mutation.
func (*QuestionMutation) MetadataCleared ¶
func (m *QuestionMutation) MetadataCleared() bool
MetadataCleared returns if the field metadata was cleared in this mutation.
func (*QuestionMutation) RemoveAnswerIDs ¶
func (m *QuestionMutation) RemoveAnswerIDs(ids ...uuid.UUID)
RemoveAnswerIDs removes the answers edge to Answer by ids.
func (*QuestionMutation) RemovedAnswersIDs ¶
func (m *QuestionMutation) RemovedAnswersIDs() (ids []uuid.UUID)
RemovedAnswers returns the removed ids of answers.
func (*QuestionMutation) RemovedEdges ¶
func (m *QuestionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*QuestionMutation) RemovedIDs ¶
func (m *QuestionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*QuestionMutation) ResetAnonymous ¶
func (m *QuestionMutation) ResetAnonymous()
ResetAnonymous reset all changes of the anonymous field.
func (*QuestionMutation) ResetAnswers ¶
func (m *QuestionMutation) ResetAnswers()
ResetAnswers reset all changes of the answers edge.
func (*QuestionMutation) ResetDescription ¶
func (m *QuestionMutation) ResetDescription()
ResetDescription reset all changes of the description field.
func (*QuestionMutation) ResetEdge ¶
func (m *QuestionMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*QuestionMutation) ResetField ¶
func (m *QuestionMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*QuestionMutation) ResetFlow ¶
func (m *QuestionMutation) ResetFlow()
ResetFlow reset all changes of the flow edge.
func (*QuestionMutation) ResetHash ¶
func (m *QuestionMutation) ResetHash()
ResetHash reset all changes of the hash field.
func (*QuestionMutation) ResetInput ¶
func (m *QuestionMutation) ResetInput()
ResetInput reset all changes of the input edge.
func (*QuestionMutation) ResetMetadata ¶
func (m *QuestionMutation) ResetMetadata()
ResetMetadata reset all changes of the metadata field.
func (*QuestionMutation) ResetTitle ¶
func (m *QuestionMutation) ResetTitle()
ResetTitle reset all changes of the title field.
func (*QuestionMutation) ResetValidator ¶
func (m *QuestionMutation) ResetValidator()
ResetValidator reset all changes of the validator field.
func (*QuestionMutation) SetAnonymous ¶
func (m *QuestionMutation) SetAnonymous(b bool)
SetAnonymous sets the anonymous field.
func (*QuestionMutation) SetDescription ¶
func (m *QuestionMutation) SetDescription(s string)
SetDescription sets the description field.
func (*QuestionMutation) SetField ¶
func (m *QuestionMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*QuestionMutation) SetFlowID ¶
func (m *QuestionMutation) SetFlowID(id uuid.UUID)
SetFlowID sets the flow edge to Flow by id.
func (*QuestionMutation) SetHash ¶
func (m *QuestionMutation) SetHash(s string)
SetHash sets the hash field.
func (*QuestionMutation) SetID ¶
func (m *QuestionMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Question creation.
func (*QuestionMutation) SetInputID ¶
func (m *QuestionMutation) SetInputID(id uuid.UUID)
SetInputID sets the input edge to Input by id.
func (*QuestionMutation) SetMetadata ¶
func (m *QuestionMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the metadata field.
func (*QuestionMutation) SetTitle ¶
func (m *QuestionMutation) SetTitle(s string)
SetTitle sets the title field.
func (*QuestionMutation) SetValidator ¶
func (m *QuestionMutation) SetValidator(s string)
SetValidator sets the validator field.
func (*QuestionMutation) Title ¶
func (m *QuestionMutation) Title() (r string, exists bool)
Title returns the title value in the mutation.
func (QuestionMutation) Tx ¶
func (m QuestionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*QuestionMutation) Type ¶
func (m *QuestionMutation) Type() string
Type returns the node type of this mutation (Question).
func (*QuestionMutation) Validator ¶
func (m *QuestionMutation) Validator() (r string, exists bool)
Validator returns the validator value in the mutation.
func (*QuestionMutation) ValidatorCleared ¶
func (m *QuestionMutation) ValidatorCleared() bool
ValidatorCleared returns if the field validator was cleared in this mutation.
type QuestionQuery ¶
type QuestionQuery struct {
// contains filtered or unexported fields
}
QuestionQuery is the builder for querying Question entities.
func (*QuestionQuery) All ¶
func (qq *QuestionQuery) All(ctx context.Context) ([]*Question, error)
All executes the query and returns a list of Questions.
func (*QuestionQuery) AllX ¶
func (qq *QuestionQuery) AllX(ctx context.Context) []*Question
AllX is like All, but panics if an error occurs.
func (*QuestionQuery) Clone ¶
func (qq *QuestionQuery) Clone() *QuestionQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*QuestionQuery) Count ¶
func (qq *QuestionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*QuestionQuery) CountX ¶
func (qq *QuestionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*QuestionQuery) Exist ¶
func (qq *QuestionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*QuestionQuery) ExistX ¶
func (qq *QuestionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*QuestionQuery) First ¶
func (qq *QuestionQuery) First(ctx context.Context) (*Question, error)
First returns the first Question entity in the query. Returns *NotFoundError when no question was found.
func (*QuestionQuery) FirstID ¶
FirstID returns the first Question id in the query. Returns *NotFoundError when no id was found.
func (*QuestionQuery) FirstX ¶
func (qq *QuestionQuery) FirstX(ctx context.Context) *Question
FirstX is like First, but panics if an error occurs.
func (*QuestionQuery) FirstXID ¶
func (qq *QuestionQuery) FirstXID(ctx context.Context) uuid.UUID
FirstXID is like FirstID, but panics if an error occurs.
func (*QuestionQuery) GroupBy ¶
func (qq *QuestionQuery) GroupBy(field string, fields ...string) *QuestionGroupBy
GroupBy 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.Question.Query(). GroupBy(question.FieldHash). Aggregate(ent.Count()). Scan(ctx, &v)
func (*QuestionQuery) IDsX ¶
func (qq *QuestionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*QuestionQuery) Limit ¶
func (qq *QuestionQuery) Limit(limit int) *QuestionQuery
Limit adds a limit step to the query.
func (*QuestionQuery) Offset ¶
func (qq *QuestionQuery) Offset(offset int) *QuestionQuery
Offset adds an offset step to the query.
func (*QuestionQuery) Only ¶
func (qq *QuestionQuery) Only(ctx context.Context) (*Question, error)
Only returns the only Question entity in the query, returns an error if not exactly one entity was returned.
func (*QuestionQuery) OnlyID ¶
OnlyID returns the only Question id in the query, returns an error if not exactly one id was returned.
func (*QuestionQuery) OnlyX ¶
func (qq *QuestionQuery) OnlyX(ctx context.Context) *Question
OnlyX is like Only, but panics if an error occurs.
func (*QuestionQuery) OnlyXID ¶
func (qq *QuestionQuery) OnlyXID(ctx context.Context) uuid.UUID
OnlyXID is like OnlyID, but panics if an error occurs.
func (*QuestionQuery) Order ¶
func (qq *QuestionQuery) Order(o ...Order) *QuestionQuery
Order adds an order step to the query.
func (*QuestionQuery) QueryAnswers ¶
func (qq *QuestionQuery) QueryAnswers() *AnswerQuery
QueryAnswers chains the current query on the answers edge.
func (*QuestionQuery) QueryFlow ¶
func (qq *QuestionQuery) QueryFlow() *FlowQuery
QueryFlow chains the current query on the flow edge.
func (*QuestionQuery) QueryInput ¶
func (qq *QuestionQuery) QueryInput() *InputQuery
QueryInput chains the current query on the input edge.
func (*QuestionQuery) Select ¶
func (qq *QuestionQuery) Select(field string, fields ...string) *QuestionSelect
Select one or more fields from the given query.
Example:
var v []struct { Hash string `json:"hash,omitempty"` } client.Question.Query(). Select(question.FieldHash). Scan(ctx, &v)
func (*QuestionQuery) Where ¶
func (qq *QuestionQuery) Where(ps ...predicate.Question) *QuestionQuery
Where adds a new predicate for the builder.
func (*QuestionQuery) WithAnswers ¶
func (qq *QuestionQuery) WithAnswers(opts ...func(*AnswerQuery)) *QuestionQuery
WithAnswers tells the query-builder to eager-loads the nodes that are connected to
the "answers" edge. The optional arguments used to configure the query builder of the edge.
func (*QuestionQuery) WithFlow ¶
func (qq *QuestionQuery) WithFlow(opts ...func(*FlowQuery)) *QuestionQuery
WithFlow tells the query-builder to eager-loads the nodes that are connected to
the "flow" edge. The optional arguments used to configure the query builder of the edge.
func (*QuestionQuery) WithInput ¶
func (qq *QuestionQuery) WithInput(opts ...func(*InputQuery)) *QuestionQuery
WithInput tells the query-builder to eager-loads the nodes that are connected to
the "input" edge. The optional arguments used to configure the query builder of the edge.
type QuestionSelect ¶
type QuestionSelect struct {
// contains filtered or unexported fields
}
QuestionSelect is the builder for select fields of Question entities.
func (*QuestionSelect) Bools ¶
func (qs *QuestionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*QuestionSelect) BoolsX ¶
func (qs *QuestionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*QuestionSelect) Float64s ¶
func (qs *QuestionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*QuestionSelect) Float64sX ¶
func (qs *QuestionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*QuestionSelect) Ints ¶
func (qs *QuestionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*QuestionSelect) IntsX ¶
func (qs *QuestionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*QuestionSelect) Scan ¶
func (qs *QuestionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*QuestionSelect) ScanX ¶
func (qs *QuestionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type QuestionUpdate ¶
type QuestionUpdate struct {
// contains filtered or unexported fields
}
QuestionUpdate is the builder for updating Question entities.
func (*QuestionUpdate) AddAnswerIDs ¶
func (qu *QuestionUpdate) AddAnswerIDs(ids ...uuid.UUID) *QuestionUpdate
AddAnswerIDs adds the answers edge to Answer by ids.
func (*QuestionUpdate) AddAnswers ¶
func (qu *QuestionUpdate) AddAnswers(a ...*Answer) *QuestionUpdate
AddAnswers adds the answers edges to Answer.
func (*QuestionUpdate) ClearFlow ¶
func (qu *QuestionUpdate) ClearFlow() *QuestionUpdate
ClearFlow clears the flow edge to Flow.
func (*QuestionUpdate) ClearInput ¶
func (qu *QuestionUpdate) ClearInput() *QuestionUpdate
ClearInput clears the input edge to Input.
func (*QuestionUpdate) ClearMetadata ¶
func (qu *QuestionUpdate) ClearMetadata() *QuestionUpdate
ClearMetadata clears the value of metadata.
func (*QuestionUpdate) Exec ¶
func (qu *QuestionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestionUpdate) ExecX ¶
func (qu *QuestionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestionUpdate) RemoveAnswerIDs ¶
func (qu *QuestionUpdate) RemoveAnswerIDs(ids ...uuid.UUID) *QuestionUpdate
RemoveAnswerIDs removes the answers edge to Answer by ids.
func (*QuestionUpdate) RemoveAnswers ¶
func (qu *QuestionUpdate) RemoveAnswers(a ...*Answer) *QuestionUpdate
RemoveAnswers removes answers edges to Answer.
func (*QuestionUpdate) Save ¶
func (qu *QuestionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*QuestionUpdate) SaveX ¶
func (qu *QuestionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*QuestionUpdate) SetAnonymous ¶
func (qu *QuestionUpdate) SetAnonymous(b bool) *QuestionUpdate
SetAnonymous sets the anonymous field.
func (*QuestionUpdate) SetDescription ¶
func (qu *QuestionUpdate) SetDescription(s string) *QuestionUpdate
SetDescription sets the description field.
func (*QuestionUpdate) SetFlow ¶
func (qu *QuestionUpdate) SetFlow(f *Flow) *QuestionUpdate
SetFlow sets the flow edge to Flow.
func (*QuestionUpdate) SetFlowID ¶
func (qu *QuestionUpdate) SetFlowID(id uuid.UUID) *QuestionUpdate
SetFlowID sets the flow edge to Flow by id.
func (*QuestionUpdate) SetHash ¶
func (qu *QuestionUpdate) SetHash(s string) *QuestionUpdate
SetHash sets the hash field.
func (*QuestionUpdate) SetInput ¶
func (qu *QuestionUpdate) SetInput(i *Input) *QuestionUpdate
SetInput sets the input edge to Input.
func (*QuestionUpdate) SetInputID ¶
func (qu *QuestionUpdate) SetInputID(id uuid.UUID) *QuestionUpdate
SetInputID sets the input edge to Input by id.
func (*QuestionUpdate) SetMetadata ¶
func (qu *QuestionUpdate) SetMetadata(m map[string]interface{}) *QuestionUpdate
SetMetadata sets the metadata field.
func (*QuestionUpdate) SetNillableAnonymous ¶
func (qu *QuestionUpdate) SetNillableAnonymous(b *bool) *QuestionUpdate
SetNillableAnonymous sets the anonymous field if the given value is not nil.
func (*QuestionUpdate) SetNillableFlowID ¶
func (qu *QuestionUpdate) SetNillableFlowID(id *uuid.UUID) *QuestionUpdate
SetNillableFlowID sets the flow edge to Flow by id if the given value is not nil.
func (*QuestionUpdate) SetNillableInputID ¶
func (qu *QuestionUpdate) SetNillableInputID(id *uuid.UUID) *QuestionUpdate
SetNillableInputID sets the input edge to Input by id if the given value is not nil.
func (*QuestionUpdate) SetTitle ¶
func (qu *QuestionUpdate) SetTitle(s string) *QuestionUpdate
SetTitle sets the title field.
func (*QuestionUpdate) Where ¶
func (qu *QuestionUpdate) Where(ps ...predicate.Question) *QuestionUpdate
Where adds a new predicate for the builder.
type QuestionUpdateOne ¶
type QuestionUpdateOne struct {
// contains filtered or unexported fields
}
QuestionUpdateOne is the builder for updating a single Question entity.
func (*QuestionUpdateOne) AddAnswerIDs ¶
func (quo *QuestionUpdateOne) AddAnswerIDs(ids ...uuid.UUID) *QuestionUpdateOne
AddAnswerIDs adds the answers edge to Answer by ids.
func (*QuestionUpdateOne) AddAnswers ¶
func (quo *QuestionUpdateOne) AddAnswers(a ...*Answer) *QuestionUpdateOne
AddAnswers adds the answers edges to Answer.
func (*QuestionUpdateOne) ClearFlow ¶
func (quo *QuestionUpdateOne) ClearFlow() *QuestionUpdateOne
ClearFlow clears the flow edge to Flow.
func (*QuestionUpdateOne) ClearInput ¶
func (quo *QuestionUpdateOne) ClearInput() *QuestionUpdateOne
ClearInput clears the input edge to Input.
func (*QuestionUpdateOne) ClearMetadata ¶
func (quo *QuestionUpdateOne) ClearMetadata() *QuestionUpdateOne
ClearMetadata clears the value of metadata.
func (*QuestionUpdateOne) Exec ¶
func (quo *QuestionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*QuestionUpdateOne) ExecX ¶
func (quo *QuestionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestionUpdateOne) RemoveAnswerIDs ¶
func (quo *QuestionUpdateOne) RemoveAnswerIDs(ids ...uuid.UUID) *QuestionUpdateOne
RemoveAnswerIDs removes the answers edge to Answer by ids.
func (*QuestionUpdateOne) RemoveAnswers ¶
func (quo *QuestionUpdateOne) RemoveAnswers(a ...*Answer) *QuestionUpdateOne
RemoveAnswers removes answers edges to Answer.
func (*QuestionUpdateOne) Save ¶
func (quo *QuestionUpdateOne) Save(ctx context.Context) (*Question, error)
Save executes the query and returns the updated entity.
func (*QuestionUpdateOne) SaveX ¶
func (quo *QuestionUpdateOne) SaveX(ctx context.Context) *Question
SaveX is like Save, but panics if an error occurs.
func (*QuestionUpdateOne) SetAnonymous ¶
func (quo *QuestionUpdateOne) SetAnonymous(b bool) *QuestionUpdateOne
SetAnonymous sets the anonymous field.
func (*QuestionUpdateOne) SetDescription ¶
func (quo *QuestionUpdateOne) SetDescription(s string) *QuestionUpdateOne
SetDescription sets the description field.
func (*QuestionUpdateOne) SetFlow ¶
func (quo *QuestionUpdateOne) SetFlow(f *Flow) *QuestionUpdateOne
SetFlow sets the flow edge to Flow.
func (*QuestionUpdateOne) SetFlowID ¶
func (quo *QuestionUpdateOne) SetFlowID(id uuid.UUID) *QuestionUpdateOne
SetFlowID sets the flow edge to Flow by id.
func (*QuestionUpdateOne) SetHash ¶
func (quo *QuestionUpdateOne) SetHash(s string) *QuestionUpdateOne
SetHash sets the hash field.
func (*QuestionUpdateOne) SetInput ¶
func (quo *QuestionUpdateOne) SetInput(i *Input) *QuestionUpdateOne
SetInput sets the input edge to Input.
func (*QuestionUpdateOne) SetInputID ¶
func (quo *QuestionUpdateOne) SetInputID(id uuid.UUID) *QuestionUpdateOne
SetInputID sets the input edge to Input by id.
func (*QuestionUpdateOne) SetMetadata ¶
func (quo *QuestionUpdateOne) SetMetadata(m map[string]interface{}) *QuestionUpdateOne
SetMetadata sets the metadata field.
func (*QuestionUpdateOne) SetNillableAnonymous ¶
func (quo *QuestionUpdateOne) SetNillableAnonymous(b *bool) *QuestionUpdateOne
SetNillableAnonymous sets the anonymous field if the given value is not nil.
func (*QuestionUpdateOne) SetNillableFlowID ¶
func (quo *QuestionUpdateOne) SetNillableFlowID(id *uuid.UUID) *QuestionUpdateOne
SetNillableFlowID sets the flow edge to Flow by id if the given value is not nil.
func (*QuestionUpdateOne) SetNillableInputID ¶
func (quo *QuestionUpdateOne) SetNillableInputID(id *uuid.UUID) *QuestionUpdateOne
SetNillableInputID sets the input edge to Input by id if the given value is not nil.
func (*QuestionUpdateOne) SetTitle ¶
func (quo *QuestionUpdateOne) SetTitle(s string) *QuestionUpdateOne
SetTitle sets the title field.
type Short ¶
type Short struct { // ID of the ent. ID int `json:"id,omitempty"` // Key holds the value of the "key" field. Key string `json:"key,omitempty"` // Value holds the value of the "value" field. Value uuid.UUID `json:"value,omitempty"` // contains filtered or unexported fields }
Short is the model entity for the Short schema.
func (*Short) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Short) Update ¶
func (s *Short) Update() *ShortUpdateOne
Update returns a builder for updating this Short. Note that, you need to call Short.Unwrap() before calling this method, if this Short was returned from a transaction, and the transaction was committed or rolled back.
type ShortClient ¶
type ShortClient struct {
// contains filtered or unexported fields
}
ShortClient is a client for the Short schema.
func NewShortClient ¶
func NewShortClient(c config) *ShortClient
NewShortClient returns a client for the Short from the given config.
func (*ShortClient) Create ¶
func (c *ShortClient) Create() *ShortCreate
Create returns a create builder for Short.
func (*ShortClient) Delete ¶
func (c *ShortClient) Delete() *ShortDelete
Delete returns a delete builder for Short.
func (*ShortClient) DeleteOne ¶
func (c *ShortClient) DeleteOne(s *Short) *ShortDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ShortClient) DeleteOneID ¶
func (c *ShortClient) DeleteOneID(id int) *ShortDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ShortClient) GetX ¶
func (c *ShortClient) GetX(ctx context.Context, id int) *Short
GetX is like Get, but panics if an error occurs.
func (*ShortClient) Query ¶
func (c *ShortClient) Query() *ShortQuery
Create returns a query builder for Short.
func (*ShortClient) Update ¶
func (c *ShortClient) Update() *ShortUpdate
Update returns an update builder for Short.
func (*ShortClient) UpdateOne ¶
func (c *ShortClient) UpdateOne(s *Short) *ShortUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ShortClient) UpdateOneID ¶
func (c *ShortClient) UpdateOneID(id int) *ShortUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ShortClient) Use ¶
func (c *ShortClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `short.Hooks(f(g(h())))`.
type ShortCreate ¶
type ShortCreate struct {
// contains filtered or unexported fields
}
ShortCreate is the builder for creating a Short entity.
func (*ShortCreate) Save ¶
func (sc *ShortCreate) Save(ctx context.Context) (*Short, error)
Save creates the Short in the database.
func (*ShortCreate) SaveX ¶
func (sc *ShortCreate) SaveX(ctx context.Context) *Short
SaveX calls Save and panics if Save returns an error.
func (*ShortCreate) SetKey ¶
func (sc *ShortCreate) SetKey(s string) *ShortCreate
SetKey sets the key field.
func (*ShortCreate) SetValue ¶
func (sc *ShortCreate) SetValue(u uuid.UUID) *ShortCreate
SetValue sets the value field.
type ShortDelete ¶
type ShortDelete struct {
// contains filtered or unexported fields
}
ShortDelete is the builder for deleting a Short entity.
func (*ShortDelete) Exec ¶
func (sd *ShortDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ShortDelete) ExecX ¶
func (sd *ShortDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ShortDelete) Where ¶
func (sd *ShortDelete) Where(ps ...predicate.Short) *ShortDelete
Where adds a new predicate to the delete builder.
type ShortDeleteOne ¶
type ShortDeleteOne struct {
// contains filtered or unexported fields
}
ShortDeleteOne is the builder for deleting a single Short entity.
func (*ShortDeleteOne) Exec ¶
func (sdo *ShortDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ShortDeleteOne) ExecX ¶
func (sdo *ShortDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ShortGroupBy ¶
type ShortGroupBy struct {
// contains filtered or unexported fields
}
ShortGroupBy is the builder for group-by Short entities.
func (*ShortGroupBy) Aggregate ¶
func (sgb *ShortGroupBy) Aggregate(fns ...Aggregate) *ShortGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ShortGroupBy) Bools ¶
func (sgb *ShortGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*ShortGroupBy) BoolsX ¶
func (sgb *ShortGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ShortGroupBy) Float64s ¶
func (sgb *ShortGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*ShortGroupBy) Float64sX ¶
func (sgb *ShortGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ShortGroupBy) Ints ¶
func (sgb *ShortGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*ShortGroupBy) IntsX ¶
func (sgb *ShortGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ShortGroupBy) Scan ¶
func (sgb *ShortGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*ShortGroupBy) ScanX ¶
func (sgb *ShortGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type ShortMutation ¶
type ShortMutation struct {
// contains filtered or unexported fields
}
ShortMutation represents an operation that mutate the Shorts nodes in the graph.
func (*ShortMutation) AddField ¶
func (m *ShortMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*ShortMutation) AddedEdges ¶
func (m *ShortMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ShortMutation) AddedField ¶
func (m *ShortMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*ShortMutation) AddedFields ¶
func (m *ShortMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*ShortMutation) AddedIDs ¶
func (m *ShortMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*ShortMutation) ClearEdge ¶
func (m *ShortMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*ShortMutation) ClearField ¶
func (m *ShortMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*ShortMutation) ClearedEdges ¶
func (m *ShortMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ShortMutation) ClearedFields ¶
func (m *ShortMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ShortMutation) Client ¶
func (m ShortMutation) 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 (*ShortMutation) EdgeCleared ¶
func (m *ShortMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*ShortMutation) Field ¶
func (m *ShortMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*ShortMutation) FieldCleared ¶
func (m *ShortMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*ShortMutation) Fields ¶
func (m *ShortMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*ShortMutation) ID ¶
func (m *ShortMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*ShortMutation) Key ¶
func (m *ShortMutation) Key() (r string, exists bool)
Key returns the key value in the mutation.
func (*ShortMutation) RemovedEdges ¶
func (m *ShortMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ShortMutation) RemovedIDs ¶
func (m *ShortMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*ShortMutation) ResetEdge ¶
func (m *ShortMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*ShortMutation) ResetField ¶
func (m *ShortMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*ShortMutation) ResetKey ¶
func (m *ShortMutation) ResetKey()
ResetKey reset all changes of the key field.
func (*ShortMutation) ResetValue ¶
func (m *ShortMutation) ResetValue()
ResetValue reset all changes of the value field.
func (*ShortMutation) SetField ¶
func (m *ShortMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*ShortMutation) SetValue ¶
func (m *ShortMutation) SetValue(u uuid.UUID)
SetValue sets the value field.
func (ShortMutation) Tx ¶
func (m ShortMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ShortMutation) Type ¶
func (m *ShortMutation) Type() string
Type returns the node type of this mutation (Short).
type ShortQuery ¶
type ShortQuery struct {
// contains filtered or unexported fields
}
ShortQuery is the builder for querying Short entities.
func (*ShortQuery) All ¶
func (sq *ShortQuery) All(ctx context.Context) ([]*Short, error)
All executes the query and returns a list of Shorts.
func (*ShortQuery) AllX ¶
func (sq *ShortQuery) AllX(ctx context.Context) []*Short
AllX is like All, but panics if an error occurs.
func (*ShortQuery) Clone ¶
func (sq *ShortQuery) Clone() *ShortQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ShortQuery) Count ¶
func (sq *ShortQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ShortQuery) CountX ¶
func (sq *ShortQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ShortQuery) Exist ¶
func (sq *ShortQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ShortQuery) ExistX ¶
func (sq *ShortQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ShortQuery) First ¶
func (sq *ShortQuery) First(ctx context.Context) (*Short, error)
First returns the first Short entity in the query. Returns *NotFoundError when no short was found.
func (*ShortQuery) FirstID ¶
func (sq *ShortQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Short id in the query. Returns *NotFoundError when no id was found.
func (*ShortQuery) FirstX ¶
func (sq *ShortQuery) FirstX(ctx context.Context) *Short
FirstX is like First, but panics if an error occurs.
func (*ShortQuery) FirstXID ¶
func (sq *ShortQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*ShortQuery) GroupBy ¶
func (sq *ShortQuery) GroupBy(field string, fields ...string) *ShortGroupBy
GroupBy 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 { Key string `json:"key,omitempty"` Count int `json:"count,omitempty"` } client.Short.Query(). GroupBy(short.FieldKey). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ShortQuery) IDs ¶
func (sq *ShortQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Short ids.
func (*ShortQuery) IDsX ¶
func (sq *ShortQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ShortQuery) Limit ¶
func (sq *ShortQuery) Limit(limit int) *ShortQuery
Limit adds a limit step to the query.
func (*ShortQuery) Offset ¶
func (sq *ShortQuery) Offset(offset int) *ShortQuery
Offset adds an offset step to the query.
func (*ShortQuery) Only ¶
func (sq *ShortQuery) Only(ctx context.Context) (*Short, error)
Only returns the only Short entity in the query, returns an error if not exactly one entity was returned.
func (*ShortQuery) OnlyID ¶
func (sq *ShortQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Short id in the query, returns an error if not exactly one id was returned.
func (*ShortQuery) OnlyX ¶
func (sq *ShortQuery) OnlyX(ctx context.Context) *Short
OnlyX is like Only, but panics if an error occurs.
func (*ShortQuery) OnlyXID ¶
func (sq *ShortQuery) OnlyXID(ctx context.Context) int
OnlyXID is like OnlyID, but panics if an error occurs.
func (*ShortQuery) Order ¶
func (sq *ShortQuery) Order(o ...Order) *ShortQuery
Order adds an order step to the query.
func (*ShortQuery) Select ¶
func (sq *ShortQuery) Select(field string, fields ...string) *ShortSelect
Select one or more fields from the given query.
Example:
var v []struct { Key string `json:"key,omitempty"` } client.Short.Query(). Select(short.FieldKey). Scan(ctx, &v)
func (*ShortQuery) Where ¶
func (sq *ShortQuery) Where(ps ...predicate.Short) *ShortQuery
Where adds a new predicate for the builder.
type ShortSelect ¶
type ShortSelect struct {
// contains filtered or unexported fields
}
ShortSelect is the builder for select fields of Short entities.
func (*ShortSelect) Bools ¶
func (ss *ShortSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*ShortSelect) BoolsX ¶
func (ss *ShortSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ShortSelect) Float64s ¶
func (ss *ShortSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*ShortSelect) Float64sX ¶
func (ss *ShortSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ShortSelect) Ints ¶
func (ss *ShortSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*ShortSelect) IntsX ¶
func (ss *ShortSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ShortSelect) Scan ¶
func (ss *ShortSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*ShortSelect) ScanX ¶
func (ss *ShortSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type ShortUpdate ¶
type ShortUpdate struct {
// contains filtered or unexported fields
}
ShortUpdate is the builder for updating Short entities.
func (*ShortUpdate) Exec ¶
func (su *ShortUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShortUpdate) ExecX ¶
func (su *ShortUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShortUpdate) Save ¶
func (su *ShortUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*ShortUpdate) SaveX ¶
func (su *ShortUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ShortUpdate) Where ¶
func (su *ShortUpdate) Where(ps ...predicate.Short) *ShortUpdate
Where adds a new predicate for the builder.
type ShortUpdateOne ¶
type ShortUpdateOne struct {
// contains filtered or unexported fields
}
ShortUpdateOne is the builder for updating a single Short entity.
func (*ShortUpdateOne) Exec ¶
func (suo *ShortUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ShortUpdateOne) ExecX ¶
func (suo *ShortUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type Survey ¶
type Survey struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Tags holds the value of the "tags" field. Tags []string `json:"tags,omitempty"` // LastInteraction holds the value of the "lastInteraction" field. LastInteraction time.Time `json:"lastInteraction,omitempty"` // DueDate holds the value of the "dueDate" field. DueDate time.Time `json:"dueDate,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Metadata holds the value of the "metadata" field. Metadata map[string]interface{} `json:"metadata,omitempty"` // Done holds the value of the "done" field. Done bool `json:"done,omitempty"` // IsPublic holds the value of the "isPublic" field. IsPublic bool `json:"isPublic,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SurveyQuery when eager-loading is set. Edges SurveyEdges `json:"edges"` // contains filtered or unexported fields }
Survey is the model entity for the Survey schema.
func (*Survey) QueryFor ¶
func (s *Survey) QueryFor() *PersonQuery
QueryFor queries the for edge of the Survey.
func (*Survey) QueryOwner ¶
func (s *Survey) QueryOwner() *DomainQuery
QueryOwner queries the owner edge of the Survey.
func (*Survey) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Survey) Update ¶
func (s *Survey) Update() *SurveyUpdateOne
Update returns a builder for updating this Survey. Note that, you need to call Survey.Unwrap() before calling this method, if this Survey was returned from a transaction, and the transaction was committed or rolled back.
type SurveyClient ¶
type SurveyClient struct {
// contains filtered or unexported fields
}
SurveyClient is a client for the Survey schema.
func NewSurveyClient ¶
func NewSurveyClient(c config) *SurveyClient
NewSurveyClient returns a client for the Survey from the given config.
func (*SurveyClient) Create ¶
func (c *SurveyClient) Create() *SurveyCreate
Create returns a create builder for Survey.
func (*SurveyClient) Delete ¶
func (c *SurveyClient) Delete() *SurveyDelete
Delete returns a delete builder for Survey.
func (*SurveyClient) DeleteOne ¶
func (c *SurveyClient) DeleteOne(s *Survey) *SurveyDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SurveyClient) DeleteOneID ¶
func (c *SurveyClient) DeleteOneID(id uuid.UUID) *SurveyDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SurveyClient) Query ¶
func (c *SurveyClient) Query() *SurveyQuery
Create returns a query builder for Survey.
func (*SurveyClient) QueryFlow ¶
func (c *SurveyClient) QueryFlow(s *Survey) *FlowQuery
QueryFlow queries the flow edge of a Survey.
func (*SurveyClient) QueryFor ¶
func (c *SurveyClient) QueryFor(s *Survey) *PersonQuery
QueryFor queries the for edge of a Survey.
func (*SurveyClient) QueryOwner ¶
func (c *SurveyClient) QueryOwner(s *Survey) *DomainQuery
QueryOwner queries the owner edge of a Survey.
func (*SurveyClient) Update ¶
func (c *SurveyClient) Update() *SurveyUpdate
Update returns an update builder for Survey.
func (*SurveyClient) UpdateOne ¶
func (c *SurveyClient) UpdateOne(s *Survey) *SurveyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SurveyClient) UpdateOneID ¶
func (c *SurveyClient) UpdateOneID(id uuid.UUID) *SurveyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SurveyClient) Use ¶
func (c *SurveyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `survey.Hooks(f(g(h())))`.
type SurveyCreate ¶
type SurveyCreate struct {
// contains filtered or unexported fields
}
SurveyCreate is the builder for creating a Survey entity.
func (*SurveyCreate) Save ¶
func (sc *SurveyCreate) Save(ctx context.Context) (*Survey, error)
Save creates the Survey in the database.
func (*SurveyCreate) SaveX ¶
func (sc *SurveyCreate) SaveX(ctx context.Context) *Survey
SaveX calls Save and panics if Save returns an error.
func (*SurveyCreate) SetDescription ¶
func (sc *SurveyCreate) SetDescription(s string) *SurveyCreate
SetDescription sets the description field.
func (*SurveyCreate) SetDone ¶
func (sc *SurveyCreate) SetDone(b bool) *SurveyCreate
SetDone sets the done field.
func (*SurveyCreate) SetDueDate ¶
func (sc *SurveyCreate) SetDueDate(t time.Time) *SurveyCreate
SetDueDate sets the dueDate field.
func (*SurveyCreate) SetFlow ¶
func (sc *SurveyCreate) SetFlow(f *Flow) *SurveyCreate
SetFlow sets the flow edge to Flow.
func (*SurveyCreate) SetFlowID ¶
func (sc *SurveyCreate) SetFlowID(id uuid.UUID) *SurveyCreate
SetFlowID sets the flow edge to Flow by id.
func (*SurveyCreate) SetFor ¶
func (sc *SurveyCreate) SetFor(p *Person) *SurveyCreate
SetFor sets the for edge to Person.
func (*SurveyCreate) SetForID ¶
func (sc *SurveyCreate) SetForID(id uuid.UUID) *SurveyCreate
SetForID sets the for edge to Person by id.
func (*SurveyCreate) SetID ¶
func (sc *SurveyCreate) SetID(u uuid.UUID) *SurveyCreate
SetID sets the id field.
func (*SurveyCreate) SetIsPublic ¶
func (sc *SurveyCreate) SetIsPublic(b bool) *SurveyCreate
SetIsPublic sets the isPublic field.
func (*SurveyCreate) SetLastInteraction ¶
func (sc *SurveyCreate) SetLastInteraction(t time.Time) *SurveyCreate
SetLastInteraction sets the lastInteraction field.
func (*SurveyCreate) SetMetadata ¶
func (sc *SurveyCreate) SetMetadata(m map[string]interface{}) *SurveyCreate
SetMetadata sets the metadata field.
func (*SurveyCreate) SetNillableDescription ¶
func (sc *SurveyCreate) SetNillableDescription(s *string) *SurveyCreate
SetNillableDescription sets the description field if the given value is not nil.
func (*SurveyCreate) SetNillableDone ¶
func (sc *SurveyCreate) SetNillableDone(b *bool) *SurveyCreate
SetNillableDone sets the done field if the given value is not nil.
func (*SurveyCreate) SetNillableDueDate ¶
func (sc *SurveyCreate) SetNillableDueDate(t *time.Time) *SurveyCreate
SetNillableDueDate sets the dueDate field if the given value is not nil.
func (*SurveyCreate) SetNillableIsPublic ¶
func (sc *SurveyCreate) SetNillableIsPublic(b *bool) *SurveyCreate
SetNillableIsPublic sets the isPublic field if the given value is not nil.
func (*SurveyCreate) SetNillableOwnerID ¶
func (sc *SurveyCreate) SetNillableOwnerID(id *uuid.UUID) *SurveyCreate
SetNillableOwnerID sets the owner edge to Domain by id if the given value is not nil.
func (*SurveyCreate) SetOwner ¶
func (sc *SurveyCreate) SetOwner(d *Domain) *SurveyCreate
SetOwner sets the owner edge to Domain.
func (*SurveyCreate) SetOwnerID ¶
func (sc *SurveyCreate) SetOwnerID(id uuid.UUID) *SurveyCreate
SetOwnerID sets the owner edge to Domain by id.
func (*SurveyCreate) SetTags ¶
func (sc *SurveyCreate) SetTags(s []string) *SurveyCreate
SetTags sets the tags field.
func (*SurveyCreate) SetTitle ¶
func (sc *SurveyCreate) SetTitle(s string) *SurveyCreate
SetTitle sets the title field.
type SurveyDelete ¶
type SurveyDelete struct {
// contains filtered or unexported fields
}
SurveyDelete is the builder for deleting a Survey entity.
func (*SurveyDelete) Exec ¶
func (sd *SurveyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SurveyDelete) ExecX ¶
func (sd *SurveyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SurveyDelete) Where ¶
func (sd *SurveyDelete) Where(ps ...predicate.Survey) *SurveyDelete
Where adds a new predicate to the delete builder.
type SurveyDeleteOne ¶
type SurveyDeleteOne struct {
// contains filtered or unexported fields
}
SurveyDeleteOne is the builder for deleting a single Survey entity.
func (*SurveyDeleteOne) Exec ¶
func (sdo *SurveyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SurveyDeleteOne) ExecX ¶
func (sdo *SurveyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SurveyEdges ¶
type SurveyEdges struct { // Flow holds the value of the flow edge. Flow *Flow // For holds the value of the for edge. For *Person // Owner holds the value of the owner edge. Owner *Domain // contains filtered or unexported fields }
SurveyEdges holds the relations/edges for other nodes in the graph.
func (SurveyEdges) FlowOrErr ¶
func (e SurveyEdges) FlowOrErr() (*Flow, error)
FlowOrErr returns the Flow value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SurveyEdges) ForOrErr ¶
func (e SurveyEdges) ForOrErr() (*Person, error)
ForOrErr returns the For value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SurveyEdges) OwnerOrErr ¶
func (e SurveyEdges) OwnerOrErr() (*Domain, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SurveyGroupBy ¶
type SurveyGroupBy struct {
// contains filtered or unexported fields
}
SurveyGroupBy is the builder for group-by Survey entities.
func (*SurveyGroupBy) Aggregate ¶
func (sgb *SurveyGroupBy) Aggregate(fns ...Aggregate) *SurveyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SurveyGroupBy) Bools ¶
func (sgb *SurveyGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*SurveyGroupBy) BoolsX ¶
func (sgb *SurveyGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SurveyGroupBy) Float64s ¶
func (sgb *SurveyGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*SurveyGroupBy) Float64sX ¶
func (sgb *SurveyGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SurveyGroupBy) Ints ¶
func (sgb *SurveyGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*SurveyGroupBy) IntsX ¶
func (sgb *SurveyGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SurveyGroupBy) Scan ¶
func (sgb *SurveyGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*SurveyGroupBy) ScanX ¶
func (sgb *SurveyGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type SurveyMutation ¶
type SurveyMutation struct {
// contains filtered or unexported fields
}
SurveyMutation represents an operation that mutate the Surveys nodes in the graph.
func (*SurveyMutation) AddField ¶
func (m *SurveyMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*SurveyMutation) AddedEdges ¶
func (m *SurveyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SurveyMutation) AddedField ¶
func (m *SurveyMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*SurveyMutation) AddedFields ¶
func (m *SurveyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*SurveyMutation) AddedIDs ¶
func (m *SurveyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*SurveyMutation) ClearDescription ¶
func (m *SurveyMutation) ClearDescription()
ClearDescription clears the value of description.
func (*SurveyMutation) ClearDone ¶
func (m *SurveyMutation) ClearDone()
ClearDone clears the value of done.
func (*SurveyMutation) ClearEdge ¶
func (m *SurveyMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*SurveyMutation) ClearField ¶
func (m *SurveyMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*SurveyMutation) ClearFlow ¶
func (m *SurveyMutation) ClearFlow()
ClearFlow clears the flow edge to Flow.
func (*SurveyMutation) ClearFor ¶
func (m *SurveyMutation) ClearFor()
ClearFor clears the for edge to Person.
func (*SurveyMutation) ClearIsPublic ¶
func (m *SurveyMutation) ClearIsPublic()
ClearIsPublic clears the value of isPublic.
func (*SurveyMutation) ClearMetadata ¶
func (m *SurveyMutation) ClearMetadata()
ClearMetadata clears the value of metadata.
func (*SurveyMutation) ClearOwner ¶
func (m *SurveyMutation) ClearOwner()
ClearOwner clears the owner edge to Domain.
func (*SurveyMutation) ClearedEdges ¶
func (m *SurveyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SurveyMutation) ClearedFields ¶
func (m *SurveyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SurveyMutation) Client ¶
func (m SurveyMutation) 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 (*SurveyMutation) Description ¶
func (m *SurveyMutation) Description() (r string, exists bool)
Description returns the description value in the mutation.
func (*SurveyMutation) DescriptionCleared ¶
func (m *SurveyMutation) DescriptionCleared() bool
DescriptionCleared returns if the field description was cleared in this mutation.
func (*SurveyMutation) Done ¶
func (m *SurveyMutation) Done() (r bool, exists bool)
Done returns the done value in the mutation.
func (*SurveyMutation) DoneCleared ¶
func (m *SurveyMutation) DoneCleared() bool
DoneCleared returns if the field done was cleared in this mutation.
func (*SurveyMutation) DueDate ¶
func (m *SurveyMutation) DueDate() (r time.Time, exists bool)
DueDate returns the dueDate value in the mutation.
func (*SurveyMutation) EdgeCleared ¶
func (m *SurveyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*SurveyMutation) Field ¶
func (m *SurveyMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*SurveyMutation) FieldCleared ¶
func (m *SurveyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*SurveyMutation) Fields ¶
func (m *SurveyMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*SurveyMutation) FlowCleared ¶
func (m *SurveyMutation) FlowCleared() bool
FlowCleared returns if the edge flow was cleared.
func (*SurveyMutation) FlowID ¶
func (m *SurveyMutation) FlowID() (id uuid.UUID, exists bool)
FlowID returns the flow id in the mutation.
func (*SurveyMutation) FlowIDs ¶
func (m *SurveyMutation) FlowIDs() (ids []uuid.UUID)
FlowIDs returns the flow ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use FlowID instead. It exists only for internal usage by the builders.
func (*SurveyMutation) ForCleared ¶
func (m *SurveyMutation) ForCleared() bool
ForCleared returns if the edge for was cleared.
func (*SurveyMutation) ForID ¶
func (m *SurveyMutation) ForID() (id uuid.UUID, exists bool)
ForID returns the for id in the mutation.
func (*SurveyMutation) ForIDs ¶
func (m *SurveyMutation) ForIDs() (ids []uuid.UUID)
ForIDs returns the for ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use ForID instead. It exists only for internal usage by the builders.
func (*SurveyMutation) ID ¶
func (m *SurveyMutation) ID() (id uuid.UUID, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*SurveyMutation) IsPublic ¶
func (m *SurveyMutation) IsPublic() (r bool, exists bool)
IsPublic returns the isPublic value in the mutation.
func (*SurveyMutation) IsPublicCleared ¶
func (m *SurveyMutation) IsPublicCleared() bool
IsPublicCleared returns if the field isPublic was cleared in this mutation.
func (*SurveyMutation) LastInteraction ¶
func (m *SurveyMutation) LastInteraction() (r time.Time, exists bool)
LastInteraction returns the lastInteraction value in the mutation.
func (*SurveyMutation) Metadata ¶
func (m *SurveyMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the metadata value in the mutation.
func (*SurveyMutation) MetadataCleared ¶
func (m *SurveyMutation) MetadataCleared() bool
MetadataCleared returns if the field metadata was cleared in this mutation.
func (*SurveyMutation) OwnerCleared ¶
func (m *SurveyMutation) OwnerCleared() bool
OwnerCleared returns if the edge owner was cleared.
func (*SurveyMutation) OwnerID ¶
func (m *SurveyMutation) OwnerID() (id uuid.UUID, exists bool)
OwnerID returns the owner id in the mutation.
func (*SurveyMutation) OwnerIDs ¶
func (m *SurveyMutation) OwnerIDs() (ids []uuid.UUID)
OwnerIDs returns the owner ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*SurveyMutation) RemovedEdges ¶
func (m *SurveyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SurveyMutation) RemovedIDs ¶
func (m *SurveyMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*SurveyMutation) ResetDescription ¶
func (m *SurveyMutation) ResetDescription()
ResetDescription reset all changes of the description field.
func (*SurveyMutation) ResetDone ¶
func (m *SurveyMutation) ResetDone()
ResetDone reset all changes of the done field.
func (*SurveyMutation) ResetDueDate ¶
func (m *SurveyMutation) ResetDueDate()
ResetDueDate reset all changes of the dueDate field.
func (*SurveyMutation) ResetEdge ¶
func (m *SurveyMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*SurveyMutation) ResetField ¶
func (m *SurveyMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*SurveyMutation) ResetFlow ¶
func (m *SurveyMutation) ResetFlow()
ResetFlow reset all changes of the flow edge.
func (*SurveyMutation) ResetFor ¶
func (m *SurveyMutation) ResetFor()
ResetFor reset all changes of the for edge.
func (*SurveyMutation) ResetIsPublic ¶
func (m *SurveyMutation) ResetIsPublic()
ResetIsPublic reset all changes of the isPublic field.
func (*SurveyMutation) ResetLastInteraction ¶
func (m *SurveyMutation) ResetLastInteraction()
ResetLastInteraction reset all changes of the lastInteraction field.
func (*SurveyMutation) ResetMetadata ¶
func (m *SurveyMutation) ResetMetadata()
ResetMetadata reset all changes of the metadata field.
func (*SurveyMutation) ResetOwner ¶
func (m *SurveyMutation) ResetOwner()
ResetOwner reset all changes of the owner edge.
func (*SurveyMutation) ResetTags ¶
func (m *SurveyMutation) ResetTags()
ResetTags reset all changes of the tags field.
func (*SurveyMutation) ResetTitle ¶
func (m *SurveyMutation) ResetTitle()
ResetTitle reset all changes of the title field.
func (*SurveyMutation) SetDescription ¶
func (m *SurveyMutation) SetDescription(s string)
SetDescription sets the description field.
func (*SurveyMutation) SetDone ¶
func (m *SurveyMutation) SetDone(b bool)
SetDone sets the done field.
func (*SurveyMutation) SetDueDate ¶
func (m *SurveyMutation) SetDueDate(t time.Time)
SetDueDate sets the dueDate field.
func (*SurveyMutation) SetField ¶
func (m *SurveyMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*SurveyMutation) SetFlowID ¶
func (m *SurveyMutation) SetFlowID(id uuid.UUID)
SetFlowID sets the flow edge to Flow by id.
func (*SurveyMutation) SetForID ¶
func (m *SurveyMutation) SetForID(id uuid.UUID)
SetForID sets the for edge to Person by id.
func (*SurveyMutation) SetID ¶
func (m *SurveyMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Survey creation.
func (*SurveyMutation) SetIsPublic ¶
func (m *SurveyMutation) SetIsPublic(b bool)
SetIsPublic sets the isPublic field.
func (*SurveyMutation) SetLastInteraction ¶
func (m *SurveyMutation) SetLastInteraction(t time.Time)
SetLastInteraction sets the lastInteraction field.
func (*SurveyMutation) SetMetadata ¶
func (m *SurveyMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the metadata field.
func (*SurveyMutation) SetOwnerID ¶
func (m *SurveyMutation) SetOwnerID(id uuid.UUID)
SetOwnerID sets the owner edge to Domain by id.
func (*SurveyMutation) SetTags ¶
func (m *SurveyMutation) SetTags(s []string)
SetTags sets the tags field.
func (*SurveyMutation) SetTitle ¶
func (m *SurveyMutation) SetTitle(s string)
SetTitle sets the title field.
func (*SurveyMutation) Tags ¶
func (m *SurveyMutation) Tags() (r []string, exists bool)
Tags returns the tags value in the mutation.
func (*SurveyMutation) Title ¶
func (m *SurveyMutation) Title() (r string, exists bool)
Title returns the title value in the mutation.
func (SurveyMutation) Tx ¶
func (m SurveyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SurveyMutation) Type ¶
func (m *SurveyMutation) Type() string
Type returns the node type of this mutation (Survey).
type SurveyQuery ¶
type SurveyQuery struct {
// contains filtered or unexported fields
}
SurveyQuery is the builder for querying Survey entities.
func (*SurveyQuery) All ¶
func (sq *SurveyQuery) All(ctx context.Context) ([]*Survey, error)
All executes the query and returns a list of Surveys.
func (*SurveyQuery) AllX ¶
func (sq *SurveyQuery) AllX(ctx context.Context) []*Survey
AllX is like All, but panics if an error occurs.
func (*SurveyQuery) Clone ¶
func (sq *SurveyQuery) Clone() *SurveyQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SurveyQuery) Count ¶
func (sq *SurveyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SurveyQuery) CountX ¶
func (sq *SurveyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SurveyQuery) Exist ¶
func (sq *SurveyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SurveyQuery) ExistX ¶
func (sq *SurveyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SurveyQuery) First ¶
func (sq *SurveyQuery) First(ctx context.Context) (*Survey, error)
First returns the first Survey entity in the query. Returns *NotFoundError when no survey was found.
func (*SurveyQuery) FirstID ¶
FirstID returns the first Survey id in the query. Returns *NotFoundError when no id was found.
func (*SurveyQuery) FirstX ¶
func (sq *SurveyQuery) FirstX(ctx context.Context) *Survey
FirstX is like First, but panics if an error occurs.
func (*SurveyQuery) FirstXID ¶
func (sq *SurveyQuery) FirstXID(ctx context.Context) uuid.UUID
FirstXID is like FirstID, but panics if an error occurs.
func (*SurveyQuery) GroupBy ¶
func (sq *SurveyQuery) GroupBy(field string, fields ...string) *SurveyGroupBy
GroupBy 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 { Tags []string `json:"tags,omitempty"` Count int `json:"count,omitempty"` } client.Survey.Query(). GroupBy(survey.FieldTags). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SurveyQuery) IDsX ¶
func (sq *SurveyQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SurveyQuery) Limit ¶
func (sq *SurveyQuery) Limit(limit int) *SurveyQuery
Limit adds a limit step to the query.
func (*SurveyQuery) Offset ¶
func (sq *SurveyQuery) Offset(offset int) *SurveyQuery
Offset adds an offset step to the query.
func (*SurveyQuery) Only ¶
func (sq *SurveyQuery) Only(ctx context.Context) (*Survey, error)
Only returns the only Survey entity in the query, returns an error if not exactly one entity was returned.
func (*SurveyQuery) OnlyID ¶
OnlyID returns the only Survey id in the query, returns an error if not exactly one id was returned.
func (*SurveyQuery) OnlyX ¶
func (sq *SurveyQuery) OnlyX(ctx context.Context) *Survey
OnlyX is like Only, but panics if an error occurs.
func (*SurveyQuery) OnlyXID ¶
func (sq *SurveyQuery) OnlyXID(ctx context.Context) uuid.UUID
OnlyXID is like OnlyID, but panics if an error occurs.
func (*SurveyQuery) Order ¶
func (sq *SurveyQuery) Order(o ...Order) *SurveyQuery
Order adds an order step to the query.
func (*SurveyQuery) QueryFlow ¶
func (sq *SurveyQuery) QueryFlow() *FlowQuery
QueryFlow chains the current query on the flow edge.
func (*SurveyQuery) QueryFor ¶
func (sq *SurveyQuery) QueryFor() *PersonQuery
QueryFor chains the current query on the for edge.
func (*SurveyQuery) QueryOwner ¶
func (sq *SurveyQuery) QueryOwner() *DomainQuery
QueryOwner chains the current query on the owner edge.
func (*SurveyQuery) Select ¶
func (sq *SurveyQuery) Select(field string, fields ...string) *SurveySelect
Select one or more fields from the given query.
Example:
var v []struct { Tags []string `json:"tags,omitempty"` } client.Survey.Query(). Select(survey.FieldTags). Scan(ctx, &v)
func (*SurveyQuery) Where ¶
func (sq *SurveyQuery) Where(ps ...predicate.Survey) *SurveyQuery
Where adds a new predicate for the builder.
func (*SurveyQuery) WithFlow ¶
func (sq *SurveyQuery) WithFlow(opts ...func(*FlowQuery)) *SurveyQuery
WithFlow tells the query-builder to eager-loads the nodes that are connected to
the "flow" edge. The optional arguments used to configure the query builder of the edge.
func (*SurveyQuery) WithFor ¶
func (sq *SurveyQuery) WithFor(opts ...func(*PersonQuery)) *SurveyQuery
WithFor tells the query-builder to eager-loads the nodes that are connected to
the "for" edge. The optional arguments used to configure the query builder of the edge.
func (*SurveyQuery) WithOwner ¶
func (sq *SurveyQuery) WithOwner(opts ...func(*DomainQuery)) *SurveyQuery
WithOwner tells the query-builder to eager-loads the nodes that are connected to
the "owner" edge. The optional arguments used to configure the query builder of the edge.
type SurveySelect ¶
type SurveySelect struct {
// contains filtered or unexported fields
}
SurveySelect is the builder for select fields of Survey entities.
func (*SurveySelect) Bools ¶
func (ss *SurveySelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*SurveySelect) BoolsX ¶
func (ss *SurveySelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SurveySelect) Float64s ¶
func (ss *SurveySelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*SurveySelect) Float64sX ¶
func (ss *SurveySelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SurveySelect) Ints ¶
func (ss *SurveySelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*SurveySelect) IntsX ¶
func (ss *SurveySelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SurveySelect) Scan ¶
func (ss *SurveySelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*SurveySelect) ScanX ¶
func (ss *SurveySelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type SurveyUpdate ¶
type SurveyUpdate struct {
// contains filtered or unexported fields
}
SurveyUpdate is the builder for updating Survey entities.
func (*SurveyUpdate) ClearDescription ¶
func (su *SurveyUpdate) ClearDescription() *SurveyUpdate
ClearDescription clears the value of description.
func (*SurveyUpdate) ClearDone ¶
func (su *SurveyUpdate) ClearDone() *SurveyUpdate
ClearDone clears the value of done.
func (*SurveyUpdate) ClearFlow ¶
func (su *SurveyUpdate) ClearFlow() *SurveyUpdate
ClearFlow clears the flow edge to Flow.
func (*SurveyUpdate) ClearFor ¶
func (su *SurveyUpdate) ClearFor() *SurveyUpdate
ClearFor clears the for edge to Person.
func (*SurveyUpdate) ClearIsPublic ¶
func (su *SurveyUpdate) ClearIsPublic() *SurveyUpdate
ClearIsPublic clears the value of isPublic.
func (*SurveyUpdate) ClearMetadata ¶
func (su *SurveyUpdate) ClearMetadata() *SurveyUpdate
ClearMetadata clears the value of metadata.
func (*SurveyUpdate) ClearOwner ¶
func (su *SurveyUpdate) ClearOwner() *SurveyUpdate
ClearOwner clears the owner edge to Domain.
func (*SurveyUpdate) Exec ¶
func (su *SurveyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SurveyUpdate) ExecX ¶
func (su *SurveyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SurveyUpdate) Save ¶
func (su *SurveyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*SurveyUpdate) SaveX ¶
func (su *SurveyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SurveyUpdate) SetDescription ¶
func (su *SurveyUpdate) SetDescription(s string) *SurveyUpdate
SetDescription sets the description field.
func (*SurveyUpdate) SetDone ¶
func (su *SurveyUpdate) SetDone(b bool) *SurveyUpdate
SetDone sets the done field.
func (*SurveyUpdate) SetFlow ¶
func (su *SurveyUpdate) SetFlow(f *Flow) *SurveyUpdate
SetFlow sets the flow edge to Flow.
func (*SurveyUpdate) SetFlowID ¶
func (su *SurveyUpdate) SetFlowID(id uuid.UUID) *SurveyUpdate
SetFlowID sets the flow edge to Flow by id.
func (*SurveyUpdate) SetFor ¶
func (su *SurveyUpdate) SetFor(p *Person) *SurveyUpdate
SetFor sets the for edge to Person.
func (*SurveyUpdate) SetForID ¶
func (su *SurveyUpdate) SetForID(id uuid.UUID) *SurveyUpdate
SetForID sets the for edge to Person by id.
func (*SurveyUpdate) SetIsPublic ¶
func (su *SurveyUpdate) SetIsPublic(b bool) *SurveyUpdate
SetIsPublic sets the isPublic field.
func (*SurveyUpdate) SetLastInteraction ¶
func (su *SurveyUpdate) SetLastInteraction(t time.Time) *SurveyUpdate
SetLastInteraction sets the lastInteraction field.
func (*SurveyUpdate) SetMetadata ¶
func (su *SurveyUpdate) SetMetadata(m map[string]interface{}) *SurveyUpdate
SetMetadata sets the metadata field.
func (*SurveyUpdate) SetNillableDescription ¶
func (su *SurveyUpdate) SetNillableDescription(s *string) *SurveyUpdate
SetNillableDescription sets the description field if the given value is not nil.
func (*SurveyUpdate) SetNillableDone ¶
func (su *SurveyUpdate) SetNillableDone(b *bool) *SurveyUpdate
SetNillableDone sets the done field if the given value is not nil.
func (*SurveyUpdate) SetNillableIsPublic ¶
func (su *SurveyUpdate) SetNillableIsPublic(b *bool) *SurveyUpdate
SetNillableIsPublic sets the isPublic field if the given value is not nil.
func (*SurveyUpdate) SetNillableOwnerID ¶
func (su *SurveyUpdate) SetNillableOwnerID(id *uuid.UUID) *SurveyUpdate
SetNillableOwnerID sets the owner edge to Domain by id if the given value is not nil.
func (*SurveyUpdate) SetOwner ¶
func (su *SurveyUpdate) SetOwner(d *Domain) *SurveyUpdate
SetOwner sets the owner edge to Domain.
func (*SurveyUpdate) SetOwnerID ¶
func (su *SurveyUpdate) SetOwnerID(id uuid.UUID) *SurveyUpdate
SetOwnerID sets the owner edge to Domain by id.
func (*SurveyUpdate) SetTags ¶
func (su *SurveyUpdate) SetTags(s []string) *SurveyUpdate
SetTags sets the tags field.
func (*SurveyUpdate) SetTitle ¶
func (su *SurveyUpdate) SetTitle(s string) *SurveyUpdate
SetTitle sets the title field.
func (*SurveyUpdate) Where ¶
func (su *SurveyUpdate) Where(ps ...predicate.Survey) *SurveyUpdate
Where adds a new predicate for the builder.
type SurveyUpdateOne ¶
type SurveyUpdateOne struct {
// contains filtered or unexported fields
}
SurveyUpdateOne is the builder for updating a single Survey entity.
func (*SurveyUpdateOne) ClearDescription ¶
func (suo *SurveyUpdateOne) ClearDescription() *SurveyUpdateOne
ClearDescription clears the value of description.
func (*SurveyUpdateOne) ClearDone ¶
func (suo *SurveyUpdateOne) ClearDone() *SurveyUpdateOne
ClearDone clears the value of done.
func (*SurveyUpdateOne) ClearFlow ¶
func (suo *SurveyUpdateOne) ClearFlow() *SurveyUpdateOne
ClearFlow clears the flow edge to Flow.
func (*SurveyUpdateOne) ClearFor ¶
func (suo *SurveyUpdateOne) ClearFor() *SurveyUpdateOne
ClearFor clears the for edge to Person.
func (*SurveyUpdateOne) ClearIsPublic ¶
func (suo *SurveyUpdateOne) ClearIsPublic() *SurveyUpdateOne
ClearIsPublic clears the value of isPublic.
func (*SurveyUpdateOne) ClearMetadata ¶
func (suo *SurveyUpdateOne) ClearMetadata() *SurveyUpdateOne
ClearMetadata clears the value of metadata.
func (*SurveyUpdateOne) ClearOwner ¶
func (suo *SurveyUpdateOne) ClearOwner() *SurveyUpdateOne
ClearOwner clears the owner edge to Domain.
func (*SurveyUpdateOne) Exec ¶
func (suo *SurveyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SurveyUpdateOne) ExecX ¶
func (suo *SurveyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SurveyUpdateOne) Save ¶
func (suo *SurveyUpdateOne) Save(ctx context.Context) (*Survey, error)
Save executes the query and returns the updated entity.
func (*SurveyUpdateOne) SaveX ¶
func (suo *SurveyUpdateOne) SaveX(ctx context.Context) *Survey
SaveX is like Save, but panics if an error occurs.
func (*SurveyUpdateOne) SetDescription ¶
func (suo *SurveyUpdateOne) SetDescription(s string) *SurveyUpdateOne
SetDescription sets the description field.
func (*SurveyUpdateOne) SetDone ¶
func (suo *SurveyUpdateOne) SetDone(b bool) *SurveyUpdateOne
SetDone sets the done field.
func (*SurveyUpdateOne) SetFlow ¶
func (suo *SurveyUpdateOne) SetFlow(f *Flow) *SurveyUpdateOne
SetFlow sets the flow edge to Flow.
func (*SurveyUpdateOne) SetFlowID ¶
func (suo *SurveyUpdateOne) SetFlowID(id uuid.UUID) *SurveyUpdateOne
SetFlowID sets the flow edge to Flow by id.
func (*SurveyUpdateOne) SetFor ¶
func (suo *SurveyUpdateOne) SetFor(p *Person) *SurveyUpdateOne
SetFor sets the for edge to Person.
func (*SurveyUpdateOne) SetForID ¶
func (suo *SurveyUpdateOne) SetForID(id uuid.UUID) *SurveyUpdateOne
SetForID sets the for edge to Person by id.
func (*SurveyUpdateOne) SetIsPublic ¶
func (suo *SurveyUpdateOne) SetIsPublic(b bool) *SurveyUpdateOne
SetIsPublic sets the isPublic field.
func (*SurveyUpdateOne) SetLastInteraction ¶
func (suo *SurveyUpdateOne) SetLastInteraction(t time.Time) *SurveyUpdateOne
SetLastInteraction sets the lastInteraction field.
func (*SurveyUpdateOne) SetMetadata ¶
func (suo *SurveyUpdateOne) SetMetadata(m map[string]interface{}) *SurveyUpdateOne
SetMetadata sets the metadata field.
func (*SurveyUpdateOne) SetNillableDescription ¶
func (suo *SurveyUpdateOne) SetNillableDescription(s *string) *SurveyUpdateOne
SetNillableDescription sets the description field if the given value is not nil.
func (*SurveyUpdateOne) SetNillableDone ¶
func (suo *SurveyUpdateOne) SetNillableDone(b *bool) *SurveyUpdateOne
SetNillableDone sets the done field if the given value is not nil.
func (*SurveyUpdateOne) SetNillableIsPublic ¶
func (suo *SurveyUpdateOne) SetNillableIsPublic(b *bool) *SurveyUpdateOne
SetNillableIsPublic sets the isPublic field if the given value is not nil.
func (*SurveyUpdateOne) SetNillableOwnerID ¶
func (suo *SurveyUpdateOne) SetNillableOwnerID(id *uuid.UUID) *SurveyUpdateOne
SetNillableOwnerID sets the owner edge to Domain by id if the given value is not nil.
func (*SurveyUpdateOne) SetOwner ¶
func (suo *SurveyUpdateOne) SetOwner(d *Domain) *SurveyUpdateOne
SetOwner sets the owner edge to Domain.
func (*SurveyUpdateOne) SetOwnerID ¶
func (suo *SurveyUpdateOne) SetOwnerID(id uuid.UUID) *SurveyUpdateOne
SetOwnerID sets the owner edge to Domain by id.
func (*SurveyUpdateOne) SetTags ¶
func (suo *SurveyUpdateOne) SetTags(s []string) *SurveyUpdateOne
SetTags sets the tags field.
func (*SurveyUpdateOne) SetTitle ¶
func (suo *SurveyUpdateOne) SetTitle(s string) *SurveyUpdateOne
SetTitle sets the title field.
type Tx ¶
type Tx struct { // Account is the client for interacting with the Account builders. Account *AccountClient // Answer is the client for interacting with the Answer builders. Answer *AnswerClient // Contact is the client for interacting with the Contact builders. Contact *ContactClient // Device is the client for interacting with the Device builders. Device *DeviceClient // Domain is the client for interacting with the Domain builders. Domain *DomainClient // Flow is the client for interacting with the Flow builders. Flow *FlowClient // IP is the client for interacting with the IP builders. IP *IPClient // Input is the client for interacting with the Input builders. Input *InputClient // Person is the client for interacting with the Person builders. Person *PersonClient // Question is the client for interacting with the Question builders. Question *QuestionClient // Short is the client for interacting with the Short builders. Short *ShortClient // Survey is the client for interacting with the Survey builders. Survey *SurveyClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns the Tx stored in a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
OnRollback adds a function to call on rollback.
Source Files
¶
- account.go
- account_create.go
- account_delete.go
- account_query.go
- account_update.go
- answer.go
- answer_create.go
- answer_delete.go
- answer_query.go
- answer_update.go
- client.go
- config.go
- contact.go
- contact_create.go
- contact_delete.go
- contact_query.go
- contact_update.go
- context.go
- device.go
- device_create.go
- device_delete.go
- device_query.go
- device_update.go
- domain.go
- domain_create.go
- domain_delete.go
- domain_query.go
- domain_update.go
- ent.go
- flow.go
- flow_create.go
- flow_delete.go
- flow_query.go
- flow_update.go
- generate.go
- input.go
- input_create.go
- input_delete.go
- input_query.go
- input_update.go
- ip.go
- ip_create.go
- ip_delete.go
- ip_query.go
- ip_update.go
- mutation.go
- person.go
- person_create.go
- person_delete.go
- person_query.go
- person_update.go
- question.go
- question_create.go
- question_delete.go
- question_query.go
- question_update.go
- runtime.go
- short.go
- short_create.go
- short_delete.go
- short_query.go
- short_update.go
- survey.go
- survey_create.go
- survey_delete.go
- survey_query.go
- survey_update.go
- tx.go