Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Account
- type AccountClient
- func (c *AccountClient) Create() *AccountCreate
- func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk
- 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) 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) Mutation() *AccountMutation
- func (ac *AccountCreate) Save(ctx context.Context) (*Account, error)
- func (ac *AccountCreate) SaveX(ctx context.Context) *Account
- func (ac *AccountCreate) SetAttributeBytes(b []byte) *AccountCreate
- func (ac *AccountCreate) SetAttributes(m map[string]interface{}) *AccountCreate
- func (ac *AccountCreate) SetConfirmationSentAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetConfirmationToken(s string) *AccountCreate
- func (ac *AccountCreate) SetConfirmed(b bool) *AccountCreate
- func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetEmail(s string) *AccountCreate
- func (ac *AccountCreate) SetEmailChange(s string) *AccountCreate
- func (ac *AccountCreate) SetEmailChangeSentAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetEmailChangeToken(s string) *AccountCreate
- func (ac *AccountCreate) SetID(u uuid.UUID) *AccountCreate
- func (ac *AccountCreate) SetLastSigninAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetLocked(b bool) *AccountCreate
- func (ac *AccountCreate) SetNillableConfirmationSentAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetNillableConfirmationToken(s *string) *AccountCreate
- func (ac *AccountCreate) SetNillableConfirmed(b *bool) *AccountCreate
- func (ac *AccountCreate) SetNillableCreatedAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetNillableEmailChange(s *string) *AccountCreate
- func (ac *AccountCreate) SetNillableEmailChangeSentAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetNillableEmailChangeToken(s *string) *AccountCreate
- func (ac *AccountCreate) SetNillableLastSigninAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetNillableLocked(b *bool) *AccountCreate
- func (ac *AccountCreate) SetNillableOtp(s *string) *AccountCreate
- func (ac *AccountCreate) SetNillableOtpSentAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetNillableRecoverySentAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetNillableRecoveryToken(s *string) *AccountCreate
- func (ac *AccountCreate) SetNillableUpdatedAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetOtp(s string) *AccountCreate
- func (ac *AccountCreate) SetOtpSentAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetPassword(s string) *AccountCreate
- func (ac *AccountCreate) SetProvider(s string) *AccountCreate
- func (ac *AccountCreate) SetRecoverySentAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetRecoveryToken(s string) *AccountCreate
- func (ac *AccountCreate) SetSensitiveAttributes(m map[string]string) *AccountCreate
- func (ac *AccountCreate) SetUpdatedAt(t time.Time) *AccountCreate
- type AccountCreateBulk
- type AccountDelete
- type AccountDeleteOne
- type AccountGroupBy
- func (agb *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy
- func (agb *AccountGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (agb *AccountGroupBy) BoolX(ctx context.Context) bool
- func (agb *AccountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (agb *AccountGroupBy) BoolsX(ctx context.Context) []bool
- func (agb *AccountGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (agb *AccountGroupBy) Float64X(ctx context.Context) float64
- func (agb *AccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (agb *AccountGroupBy) Float64sX(ctx context.Context) []float64
- func (agb *AccountGroupBy) Int(ctx context.Context) (_ int, err error)
- func (agb *AccountGroupBy) IntX(ctx context.Context) int
- 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) String(ctx context.Context) (_ string, err error)
- func (agb *AccountGroupBy) StringX(ctx context.Context) string
- 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) AttributeBytes() (r []byte, exists bool)
- func (m *AccountMutation) AttributeBytesCleared() bool
- func (m *AccountMutation) Attributes() (r map[string]interface{}, exists bool)
- func (m *AccountMutation) AttributesCleared() bool
- func (m *AccountMutation) ClearAttributeBytes()
- func (m *AccountMutation) ClearAttributes()
- func (m *AccountMutation) ClearConfirmationSentAt()
- func (m *AccountMutation) ClearConfirmationToken()
- func (m *AccountMutation) ClearConfirmed()
- func (m *AccountMutation) ClearEdge(name string) error
- func (m *AccountMutation) ClearEmailChange()
- func (m *AccountMutation) ClearEmailChangeSentAt()
- func (m *AccountMutation) ClearEmailChangeToken()
- func (m *AccountMutation) ClearField(name string) error
- func (m *AccountMutation) ClearLastSigninAt()
- func (m *AccountMutation) ClearOtp()
- func (m *AccountMutation) ClearOtpSentAt()
- func (m *AccountMutation) ClearRecoverySentAt()
- func (m *AccountMutation) ClearRecoveryToken()
- func (m *AccountMutation) ClearSensitiveAttributes()
- func (m *AccountMutation) ClearedEdges() []string
- func (m *AccountMutation) ClearedFields() []string
- func (m AccountMutation) Client() *Client
- func (m *AccountMutation) ConfirmationSentAt() (r time.Time, exists bool)
- func (m *AccountMutation) ConfirmationSentAtCleared() bool
- func (m *AccountMutation) ConfirmationToken() (r string, exists bool)
- func (m *AccountMutation) ConfirmationTokenCleared() bool
- func (m *AccountMutation) Confirmed() (r bool, exists bool)
- func (m *AccountMutation) ConfirmedCleared() bool
- func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AccountMutation) EdgeCleared(name string) bool
- func (m *AccountMutation) Email() (r string, exists bool)
- func (m *AccountMutation) EmailChange() (r string, exists bool)
- func (m *AccountMutation) EmailChangeCleared() bool
- func (m *AccountMutation) EmailChangeSentAt() (r time.Time, exists bool)
- func (m *AccountMutation) EmailChangeSentAtCleared() bool
- func (m *AccountMutation) EmailChangeToken() (r string, exists bool)
- func (m *AccountMutation) EmailChangeTokenCleared() 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) ID() (id uuid.UUID, exists bool)
- func (m *AccountMutation) LastSigninAt() (r time.Time, exists bool)
- func (m *AccountMutation) LastSigninAtCleared() bool
- func (m *AccountMutation) Locked() (r bool, exists bool)
- func (m *AccountMutation) OldAttributeBytes(ctx context.Context) (v []byte, err error)
- func (m *AccountMutation) OldAttributes(ctx context.Context) (v map[string]interface{}, err error)
- func (m *AccountMutation) OldConfirmationSentAt(ctx context.Context) (v *time.Time, err error)
- func (m *AccountMutation) OldConfirmationToken(ctx context.Context) (v *string, err error)
- func (m *AccountMutation) OldConfirmed(ctx context.Context) (v bool, err error)
- func (m *AccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccountMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldEmailChange(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldEmailChangeSentAt(ctx context.Context) (v *time.Time, err error)
- func (m *AccountMutation) OldEmailChangeToken(ctx context.Context) (v *string, err error)
- func (m *AccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AccountMutation) OldLastSigninAt(ctx context.Context) (v *time.Time, err error)
- func (m *AccountMutation) OldLocked(ctx context.Context) (v bool, err error)
- func (m *AccountMutation) OldOtp(ctx context.Context) (v *string, err error)
- func (m *AccountMutation) OldOtpSentAt(ctx context.Context) (v *time.Time, err error)
- func (m *AccountMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldProvider(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldRecoverySentAt(ctx context.Context) (v *time.Time, err error)
- func (m *AccountMutation) OldRecoveryToken(ctx context.Context) (v *string, err error)
- func (m *AccountMutation) OldSensitiveAttributes(ctx context.Context) (v map[string]string, err error)
- func (m *AccountMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccountMutation) Op() Op
- func (m *AccountMutation) Otp() (r string, exists bool)
- func (m *AccountMutation) OtpCleared() bool
- func (m *AccountMutation) OtpSentAt() (r time.Time, exists bool)
- func (m *AccountMutation) OtpSentAtCleared() bool
- func (m *AccountMutation) Password() (r string, exists bool)
- func (m *AccountMutation) Provider() (r string, exists bool)
- func (m *AccountMutation) RecoverySentAt() (r time.Time, exists bool)
- func (m *AccountMutation) RecoverySentAtCleared() bool
- func (m *AccountMutation) RecoveryToken() (r string, exists bool)
- func (m *AccountMutation) RecoveryTokenCleared() bool
- func (m *AccountMutation) RemovedEdges() []string
- func (m *AccountMutation) RemovedIDs(name string) []ent.Value
- func (m *AccountMutation) ResetAttributeBytes()
- func (m *AccountMutation) ResetAttributes()
- func (m *AccountMutation) ResetConfirmationSentAt()
- func (m *AccountMutation) ResetConfirmationToken()
- func (m *AccountMutation) ResetConfirmed()
- func (m *AccountMutation) ResetCreatedAt()
- func (m *AccountMutation) ResetEdge(name string) error
- func (m *AccountMutation) ResetEmail()
- func (m *AccountMutation) ResetEmailChange()
- func (m *AccountMutation) ResetEmailChangeSentAt()
- func (m *AccountMutation) ResetEmailChangeToken()
- func (m *AccountMutation) ResetField(name string) error
- func (m *AccountMutation) ResetLastSigninAt()
- func (m *AccountMutation) ResetLocked()
- func (m *AccountMutation) ResetOtp()
- func (m *AccountMutation) ResetOtpSentAt()
- func (m *AccountMutation) ResetPassword()
- func (m *AccountMutation) ResetProvider()
- func (m *AccountMutation) ResetRecoverySentAt()
- func (m *AccountMutation) ResetRecoveryToken()
- func (m *AccountMutation) ResetSensitiveAttributes()
- func (m *AccountMutation) ResetUpdatedAt()
- func (m *AccountMutation) SensitiveAttributes() (r map[string]string, exists bool)
- func (m *AccountMutation) SensitiveAttributesCleared() bool
- func (m *AccountMutation) SetAttributeBytes(b []byte)
- func (m *AccountMutation) SetAttributes(value map[string]interface{})
- func (m *AccountMutation) SetConfirmationSentAt(t time.Time)
- func (m *AccountMutation) SetConfirmationToken(s string)
- func (m *AccountMutation) SetConfirmed(b bool)
- func (m *AccountMutation) SetCreatedAt(t time.Time)
- func (m *AccountMutation) SetEmail(s string)
- func (m *AccountMutation) SetEmailChange(s string)
- func (m *AccountMutation) SetEmailChangeSentAt(t time.Time)
- func (m *AccountMutation) SetEmailChangeToken(s string)
- func (m *AccountMutation) SetField(name string, value ent.Value) error
- func (m *AccountMutation) SetID(id uuid.UUID)
- func (m *AccountMutation) SetLastSigninAt(t time.Time)
- func (m *AccountMutation) SetLocked(b bool)
- func (m *AccountMutation) SetOtp(s string)
- func (m *AccountMutation) SetOtpSentAt(t time.Time)
- func (m *AccountMutation) SetPassword(s string)
- func (m *AccountMutation) SetProvider(s string)
- func (m *AccountMutation) SetRecoverySentAt(t time.Time)
- func (m *AccountMutation) SetRecoveryToken(s string)
- func (m *AccountMutation) SetSensitiveAttributes(value map[string]string)
- func (m *AccountMutation) SetUpdatedAt(t time.Time)
- func (m AccountMutation) Tx() (*Tx, error)
- func (m *AccountMutation) Type() string
- func (m *AccountMutation) UpdatedAt() (r time.Time, exists bool)
- 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) FirstIDX(ctx context.Context) uuid.UUID
- func (aq *AccountQuery) FirstX(ctx context.Context) *Account
- 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) OnlyIDX(ctx context.Context) uuid.UUID
- func (aq *AccountQuery) OnlyX(ctx context.Context) *Account
- func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery
- func (aq *AccountQuery) Select(field string, fields ...string) *AccountSelect
- func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
- type AccountSelect
- func (as *AccountSelect) Bool(ctx context.Context) (_ bool, err error)
- func (as *AccountSelect) BoolX(ctx context.Context) bool
- func (as *AccountSelect) Bools(ctx context.Context) ([]bool, error)
- func (as *AccountSelect) BoolsX(ctx context.Context) []bool
- func (as *AccountSelect) Float64(ctx context.Context) (_ float64, err error)
- func (as *AccountSelect) Float64X(ctx context.Context) float64
- func (as *AccountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (as *AccountSelect) Float64sX(ctx context.Context) []float64
- func (as *AccountSelect) Int(ctx context.Context) (_ int, err error)
- func (as *AccountSelect) IntX(ctx context.Context) int
- 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) String(ctx context.Context) (_ string, err error)
- func (as *AccountSelect) StringX(ctx context.Context) string
- func (as *AccountSelect) Strings(ctx context.Context) ([]string, error)
- func (as *AccountSelect) StringsX(ctx context.Context) []string
- type AccountUpdate
- func (au *AccountUpdate) ClearAttributeBytes() *AccountUpdate
- func (au *AccountUpdate) ClearAttributes() *AccountUpdate
- func (au *AccountUpdate) ClearConfirmationSentAt() *AccountUpdate
- func (au *AccountUpdate) ClearConfirmationToken() *AccountUpdate
- func (au *AccountUpdate) ClearConfirmed() *AccountUpdate
- func (au *AccountUpdate) ClearEmailChange() *AccountUpdate
- func (au *AccountUpdate) ClearEmailChangeSentAt() *AccountUpdate
- func (au *AccountUpdate) ClearEmailChangeToken() *AccountUpdate
- func (au *AccountUpdate) ClearLastSigninAt() *AccountUpdate
- func (au *AccountUpdate) ClearOtp() *AccountUpdate
- func (au *AccountUpdate) ClearOtpSentAt() *AccountUpdate
- func (au *AccountUpdate) ClearRecoverySentAt() *AccountUpdate
- func (au *AccountUpdate) ClearRecoveryToken() *AccountUpdate
- func (au *AccountUpdate) ClearSensitiveAttributes() *AccountUpdate
- func (au *AccountUpdate) Exec(ctx context.Context) error
- func (au *AccountUpdate) ExecX(ctx context.Context)
- func (au *AccountUpdate) Mutation() *AccountMutation
- func (au *AccountUpdate) Save(ctx context.Context) (int, error)
- func (au *AccountUpdate) SaveX(ctx context.Context) int
- func (au *AccountUpdate) SetAttributeBytes(b []byte) *AccountUpdate
- func (au *AccountUpdate) SetAttributes(m map[string]interface{}) *AccountUpdate
- func (au *AccountUpdate) SetConfirmationSentAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) SetConfirmationToken(s string) *AccountUpdate
- func (au *AccountUpdate) SetConfirmed(b bool) *AccountUpdate
- func (au *AccountUpdate) SetEmail(s string) *AccountUpdate
- func (au *AccountUpdate) SetEmailChange(s string) *AccountUpdate
- func (au *AccountUpdate) SetEmailChangeSentAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) SetEmailChangeToken(s string) *AccountUpdate
- func (au *AccountUpdate) SetLastSigninAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) SetLocked(b bool) *AccountUpdate
- func (au *AccountUpdate) SetNillableConfirmationSentAt(t *time.Time) *AccountUpdate
- func (au *AccountUpdate) SetNillableConfirmationToken(s *string) *AccountUpdate
- func (au *AccountUpdate) SetNillableConfirmed(b *bool) *AccountUpdate
- func (au *AccountUpdate) SetNillableEmailChange(s *string) *AccountUpdate
- func (au *AccountUpdate) SetNillableEmailChangeSentAt(t *time.Time) *AccountUpdate
- func (au *AccountUpdate) SetNillableEmailChangeToken(s *string) *AccountUpdate
- func (au *AccountUpdate) SetNillableLastSigninAt(t *time.Time) *AccountUpdate
- func (au *AccountUpdate) SetNillableLocked(b *bool) *AccountUpdate
- func (au *AccountUpdate) SetNillableOtp(s *string) *AccountUpdate
- func (au *AccountUpdate) SetNillableOtpSentAt(t *time.Time) *AccountUpdate
- func (au *AccountUpdate) SetNillableRecoverySentAt(t *time.Time) *AccountUpdate
- func (au *AccountUpdate) SetNillableRecoveryToken(s *string) *AccountUpdate
- func (au *AccountUpdate) SetOtp(s string) *AccountUpdate
- func (au *AccountUpdate) SetOtpSentAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) SetPassword(s string) *AccountUpdate
- func (au *AccountUpdate) SetProvider(s string) *AccountUpdate
- func (au *AccountUpdate) SetRecoverySentAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) SetRecoveryToken(s string) *AccountUpdate
- func (au *AccountUpdate) SetSensitiveAttributes(m map[string]string) *AccountUpdate
- func (au *AccountUpdate) SetUpdatedAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
- type AccountUpdateOne
- func (auo *AccountUpdateOne) ClearAttributeBytes() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearAttributes() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearConfirmationSentAt() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearConfirmationToken() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearConfirmed() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearEmailChange() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearEmailChangeSentAt() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearEmailChangeToken() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearLastSigninAt() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearOtp() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearOtpSentAt() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearRecoverySentAt() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearRecoveryToken() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearSensitiveAttributes() *AccountUpdateOne
- func (auo *AccountUpdateOne) Exec(ctx context.Context) error
- func (auo *AccountUpdateOne) ExecX(ctx context.Context)
- func (auo *AccountUpdateOne) Mutation() *AccountMutation
- func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)
- func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account
- func (auo *AccountUpdateOne) SetAttributeBytes(b []byte) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetAttributes(m map[string]interface{}) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetConfirmationSentAt(t time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetConfirmationToken(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetConfirmed(b bool) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetEmail(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetEmailChange(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetEmailChangeSentAt(t time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetEmailChangeToken(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetLastSigninAt(t time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetLocked(b bool) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableConfirmationSentAt(t *time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableConfirmationToken(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableConfirmed(b *bool) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableEmailChange(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableEmailChangeSentAt(t *time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableEmailChangeToken(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableLastSigninAt(t *time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableLocked(b *bool) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableOtp(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableOtpSentAt(t *time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableRecoverySentAt(t *time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableRecoveryToken(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetOtp(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetOtpSentAt(t time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetPassword(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetProvider(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetRecoverySentAt(t time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetRecoveryToken(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetSensitiveAttributes(m map[string]string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetUpdatedAt(t time.Time) *AccountUpdateOne
- type Accounts
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Session
- type SessionClient
- func (c *SessionClient) Create() *SessionCreate
- func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
- func (c *SessionClient) Delete() *SessionDelete
- func (c *SessionClient) DeleteOne(s *Session) *SessionDeleteOne
- func (c *SessionClient) DeleteOneID(id string) *SessionDeleteOne
- func (c *SessionClient) Get(ctx context.Context, id string) (*Session, error)
- func (c *SessionClient) GetX(ctx context.Context, id string) *Session
- func (c *SessionClient) Hooks() []Hook
- func (c *SessionClient) Query() *SessionQuery
- func (c *SessionClient) Update() *SessionUpdate
- func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne
- func (c *SessionClient) UpdateOneID(id string) *SessionUpdateOne
- func (c *SessionClient) Use(hooks ...Hook)
- type SessionCreate
- func (sc *SessionCreate) Mutation() *SessionMutation
- func (sc *SessionCreate) Save(ctx context.Context) (*Session, error)
- func (sc *SessionCreate) SaveX(ctx context.Context) *Session
- func (sc *SessionCreate) SetCreatedAt(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetData(s string) *SessionCreate
- func (sc *SessionCreate) SetExpiresAt(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetID(s string) *SessionCreate
- func (sc *SessionCreate) SetNillableCreatedAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetNillableExpiresAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetNillableUpdatedAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetUpdatedAt(t time.Time) *SessionCreate
- type SessionCreateBulk
- type SessionDelete
- type SessionDeleteOne
- type SessionGroupBy
- func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
- func (sgb *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (sgb *SessionGroupBy) BoolX(ctx context.Context) bool
- func (sgb *SessionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sgb *SessionGroupBy) BoolsX(ctx context.Context) []bool
- func (sgb *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (sgb *SessionGroupBy) Float64X(ctx context.Context) float64
- func (sgb *SessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sgb *SessionGroupBy) Float64sX(ctx context.Context) []float64
- func (sgb *SessionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (sgb *SessionGroupBy) IntX(ctx context.Context) int
- func (sgb *SessionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sgb *SessionGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SessionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sgb *SessionGroupBy) ScanX(ctx context.Context, v interface{})
- func (sgb *SessionGroupBy) String(ctx context.Context) (_ string, err error)
- func (sgb *SessionGroupBy) StringX(ctx context.Context) string
- func (sgb *SessionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sgb *SessionGroupBy) StringsX(ctx context.Context) []string
- type SessionMutation
- func (m *SessionMutation) AddField(name string, value ent.Value) error
- func (m *SessionMutation) AddedEdges() []string
- func (m *SessionMutation) AddedField(name string) (ent.Value, bool)
- func (m *SessionMutation) AddedFields() []string
- func (m *SessionMutation) AddedIDs(name string) []ent.Value
- func (m *SessionMutation) ClearEdge(name string) error
- func (m *SessionMutation) ClearExpiresAt()
- func (m *SessionMutation) ClearField(name string) error
- func (m *SessionMutation) ClearedEdges() []string
- func (m *SessionMutation) ClearedFields() []string
- func (m SessionMutation) Client() *Client
- func (m *SessionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SessionMutation) Data() (r string, exists bool)
- func (m *SessionMutation) EdgeCleared(name string) bool
- func (m *SessionMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *SessionMutation) ExpiresAtCleared() bool
- func (m *SessionMutation) Field(name string) (ent.Value, bool)
- func (m *SessionMutation) FieldCleared(name string) bool
- func (m *SessionMutation) Fields() []string
- func (m *SessionMutation) ID() (id string, exists bool)
- func (m *SessionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) OldData(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)
- func (m *SessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SessionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) Op() Op
- func (m *SessionMutation) RemovedEdges() []string
- func (m *SessionMutation) RemovedIDs(name string) []ent.Value
- func (m *SessionMutation) ResetCreatedAt()
- func (m *SessionMutation) ResetData()
- func (m *SessionMutation) ResetEdge(name string) error
- func (m *SessionMutation) ResetExpiresAt()
- func (m *SessionMutation) ResetField(name string) error
- func (m *SessionMutation) ResetUpdatedAt()
- func (m *SessionMutation) SetCreatedAt(t time.Time)
- func (m *SessionMutation) SetData(s string)
- func (m *SessionMutation) SetExpiresAt(t time.Time)
- func (m *SessionMutation) SetField(name string, value ent.Value) error
- func (m *SessionMutation) SetID(id string)
- func (m *SessionMutation) SetUpdatedAt(t time.Time)
- func (m SessionMutation) Tx() (*Tx, error)
- func (m *SessionMutation) Type() string
- func (m *SessionMutation) UpdatedAt() (r time.Time, exists bool)
- type SessionQuery
- func (sq *SessionQuery) All(ctx context.Context) ([]*Session, error)
- func (sq *SessionQuery) AllX(ctx context.Context) []*Session
- func (sq *SessionQuery) Clone() *SessionQuery
- func (sq *SessionQuery) Count(ctx context.Context) (int, error)
- func (sq *SessionQuery) CountX(ctx context.Context) int
- func (sq *SessionQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SessionQuery) ExistX(ctx context.Context) bool
- func (sq *SessionQuery) First(ctx context.Context) (*Session, error)
- func (sq *SessionQuery) FirstID(ctx context.Context) (id string, err error)
- func (sq *SessionQuery) FirstIDX(ctx context.Context) string
- func (sq *SessionQuery) FirstX(ctx context.Context) *Session
- func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
- func (sq *SessionQuery) IDs(ctx context.Context) ([]string, error)
- func (sq *SessionQuery) IDsX(ctx context.Context) []string
- func (sq *SessionQuery) Limit(limit int) *SessionQuery
- func (sq *SessionQuery) Offset(offset int) *SessionQuery
- func (sq *SessionQuery) Only(ctx context.Context) (*Session, error)
- func (sq *SessionQuery) OnlyID(ctx context.Context) (id string, err error)
- func (sq *SessionQuery) OnlyIDX(ctx context.Context) string
- func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
- func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery
- func (sq *SessionQuery) Select(field string, fields ...string) *SessionSelect
- func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
- type SessionSelect
- func (ss *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ss *SessionSelect) BoolX(ctx context.Context) bool
- func (ss *SessionSelect) Bools(ctx context.Context) ([]bool, error)
- func (ss *SessionSelect) BoolsX(ctx context.Context) []bool
- func (ss *SessionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ss *SessionSelect) Float64X(ctx context.Context) float64
- func (ss *SessionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ss *SessionSelect) Float64sX(ctx context.Context) []float64
- func (ss *SessionSelect) Int(ctx context.Context) (_ int, err error)
- func (ss *SessionSelect) IntX(ctx context.Context) int
- func (ss *SessionSelect) Ints(ctx context.Context) ([]int, error)
- func (ss *SessionSelect) IntsX(ctx context.Context) []int
- func (ss *SessionSelect) Scan(ctx context.Context, v interface{}) error
- func (ss *SessionSelect) ScanX(ctx context.Context, v interface{})
- func (ss *SessionSelect) String(ctx context.Context) (_ string, err error)
- func (ss *SessionSelect) StringX(ctx context.Context) string
- func (ss *SessionSelect) Strings(ctx context.Context) ([]string, error)
- func (ss *SessionSelect) StringsX(ctx context.Context) []string
- type SessionUpdate
- func (su *SessionUpdate) ClearExpiresAt() *SessionUpdate
- func (su *SessionUpdate) Exec(ctx context.Context) error
- func (su *SessionUpdate) ExecX(ctx context.Context)
- func (su *SessionUpdate) Mutation() *SessionMutation
- func (su *SessionUpdate) Save(ctx context.Context) (int, error)
- func (su *SessionUpdate) SaveX(ctx context.Context) int
- func (su *SessionUpdate) SetData(s string) *SessionUpdate
- func (su *SessionUpdate) SetExpiresAt(t time.Time) *SessionUpdate
- func (su *SessionUpdate) SetNillableExpiresAt(t *time.Time) *SessionUpdate
- func (su *SessionUpdate) SetUpdatedAt(t time.Time) *SessionUpdate
- func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
- type SessionUpdateOne
- func (suo *SessionUpdateOne) ClearExpiresAt() *SessionUpdateOne
- func (suo *SessionUpdateOne) Exec(ctx context.Context) error
- func (suo *SessionUpdateOne) ExecX(ctx context.Context)
- func (suo *SessionUpdateOne) Mutation() *SessionMutation
- func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
- func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session
- func (suo *SessionUpdateOne) SetData(s string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetExpiresAt(t time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableExpiresAt(t *time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetUpdatedAt(t time.Time) *SessionUpdateOne
- type Sessions
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAccount = "Account" TypeSession = "Session" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validaton 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"` // Provider holds the value of the "provider" field. Provider string `json:"provider,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Password holds the value of the "password" field. Password string `json:"-"` // Locked holds the value of the "locked" field. Locked bool `json:"locked,omitempty"` // Confirmed holds the value of the "confirmed" field. Confirmed bool `json:"confirmed,omitempty"` // ConfirmationSentAt holds the value of the "confirmation_sent_at" field. ConfirmationSentAt *time.Time `json:"confirmation_sent_at,omitempty"` // ConfirmationToken holds the value of the "confirmation_token" field. ConfirmationToken *string `json:"confirmation_token,omitempty"` // RecoverySentAt holds the value of the "recovery_sent_at" field. RecoverySentAt *time.Time `json:"recovery_sent_at,omitempty"` // RecoveryToken holds the value of the "recovery_token" field. RecoveryToken *string `json:"recovery_token,omitempty"` // OtpSentAt holds the value of the "otp_sent_at" field. OtpSentAt *time.Time `json:"otp_sent_at,omitempty"` // Otp holds the value of the "otp" field. Otp *string `json:"otp,omitempty"` // EmailChange holds the value of the "email_change" field. EmailChange string `json:"email_change,omitempty"` // EmailChangeSentAt holds the value of the "email_change_sent_at" field. EmailChangeSentAt *time.Time `json:"email_change_sent_at,omitempty"` // EmailChangeToken holds the value of the "email_change_token" field. EmailChangeToken *string `json:"email_change_token,omitempty"` // Attributes holds the value of the "attributes" field. Attributes map[string]interface{} `json:"attributes,omitempty"` // SensitiveAttributes holds the value of the "sensitive_attributes" field. SensitiveAttributes map[string]string `json:"sensitive_attributes,omitempty"` // AttributeBytes holds the value of the "attribute_bytes" field. AttributeBytes []byte `json:"attribute_bytes,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // LastSigninAt holds the value of the "last_signin_at" field. LastSigninAt *time.Time `json:"last_signin_at,omitempty"` // contains filtered or unexported fields }
Account is the model entity for the Account schema.
func (*Account) Unwrap ¶
Unwrap unwraps the Account entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*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) CreateBulk ¶
func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk
CreateBulk returns a builder for creating a bulk of Account entities.
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
Query returns a query builder for 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) Mutation ¶
func (ac *AccountCreate) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
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) SetAttributeBytes ¶
func (ac *AccountCreate) SetAttributeBytes(b []byte) *AccountCreate
SetAttributeBytes sets the "attribute_bytes" field.
func (*AccountCreate) SetAttributes ¶
func (ac *AccountCreate) SetAttributes(m map[string]interface{}) *AccountCreate
SetAttributes sets the "attributes" field.
func (*AccountCreate) SetConfirmationSentAt ¶
func (ac *AccountCreate) SetConfirmationSentAt(t time.Time) *AccountCreate
SetConfirmationSentAt sets the "confirmation_sent_at" field.
func (*AccountCreate) SetConfirmationToken ¶
func (ac *AccountCreate) SetConfirmationToken(s string) *AccountCreate
SetConfirmationToken sets the "confirmation_token" field.
func (*AccountCreate) SetConfirmed ¶
func (ac *AccountCreate) SetConfirmed(b bool) *AccountCreate
SetConfirmed sets the "confirmed" field.
func (*AccountCreate) SetCreatedAt ¶
func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate
SetCreatedAt sets the "created_at" field.
func (*AccountCreate) SetEmail ¶
func (ac *AccountCreate) SetEmail(s string) *AccountCreate
SetEmail sets the "email" field.
func (*AccountCreate) SetEmailChange ¶
func (ac *AccountCreate) SetEmailChange(s string) *AccountCreate
SetEmailChange sets the "email_change" field.
func (*AccountCreate) SetEmailChangeSentAt ¶
func (ac *AccountCreate) SetEmailChangeSentAt(t time.Time) *AccountCreate
SetEmailChangeSentAt sets the "email_change_sent_at" field.
func (*AccountCreate) SetEmailChangeToken ¶
func (ac *AccountCreate) SetEmailChangeToken(s string) *AccountCreate
SetEmailChangeToken sets the "email_change_token" field.
func (*AccountCreate) SetID ¶
func (ac *AccountCreate) SetID(u uuid.UUID) *AccountCreate
SetID sets the "id" field.
func (*AccountCreate) SetLastSigninAt ¶
func (ac *AccountCreate) SetLastSigninAt(t time.Time) *AccountCreate
SetLastSigninAt sets the "last_signin_at" field.
func (*AccountCreate) SetLocked ¶
func (ac *AccountCreate) SetLocked(b bool) *AccountCreate
SetLocked sets the "locked" field.
func (*AccountCreate) SetNillableConfirmationSentAt ¶
func (ac *AccountCreate) SetNillableConfirmationSentAt(t *time.Time) *AccountCreate
SetNillableConfirmationSentAt sets the "confirmation_sent_at" field if the given value is not nil.
func (*AccountCreate) SetNillableConfirmationToken ¶
func (ac *AccountCreate) SetNillableConfirmationToken(s *string) *AccountCreate
SetNillableConfirmationToken sets the "confirmation_token" field if the given value is not nil.
func (*AccountCreate) SetNillableConfirmed ¶
func (ac *AccountCreate) SetNillableConfirmed(b *bool) *AccountCreate
SetNillableConfirmed sets the "confirmed" field if the given value is not nil.
func (*AccountCreate) SetNillableCreatedAt ¶
func (ac *AccountCreate) SetNillableCreatedAt(t *time.Time) *AccountCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccountCreate) SetNillableEmailChange ¶
func (ac *AccountCreate) SetNillableEmailChange(s *string) *AccountCreate
SetNillableEmailChange sets the "email_change" field if the given value is not nil.
func (*AccountCreate) SetNillableEmailChangeSentAt ¶
func (ac *AccountCreate) SetNillableEmailChangeSentAt(t *time.Time) *AccountCreate
SetNillableEmailChangeSentAt sets the "email_change_sent_at" field if the given value is not nil.
func (*AccountCreate) SetNillableEmailChangeToken ¶
func (ac *AccountCreate) SetNillableEmailChangeToken(s *string) *AccountCreate
SetNillableEmailChangeToken sets the "email_change_token" field if the given value is not nil.
func (*AccountCreate) SetNillableLastSigninAt ¶
func (ac *AccountCreate) SetNillableLastSigninAt(t *time.Time) *AccountCreate
SetNillableLastSigninAt sets the "last_signin_at" field if the given value is not nil.
func (*AccountCreate) SetNillableLocked ¶
func (ac *AccountCreate) SetNillableLocked(b *bool) *AccountCreate
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*AccountCreate) SetNillableOtp ¶
func (ac *AccountCreate) SetNillableOtp(s *string) *AccountCreate
SetNillableOtp sets the "otp" field if the given value is not nil.
func (*AccountCreate) SetNillableOtpSentAt ¶
func (ac *AccountCreate) SetNillableOtpSentAt(t *time.Time) *AccountCreate
SetNillableOtpSentAt sets the "otp_sent_at" field if the given value is not nil.
func (*AccountCreate) SetNillableRecoverySentAt ¶
func (ac *AccountCreate) SetNillableRecoverySentAt(t *time.Time) *AccountCreate
SetNillableRecoverySentAt sets the "recovery_sent_at" field if the given value is not nil.
func (*AccountCreate) SetNillableRecoveryToken ¶
func (ac *AccountCreate) SetNillableRecoveryToken(s *string) *AccountCreate
SetNillableRecoveryToken sets the "recovery_token" field if the given value is not nil.
func (*AccountCreate) SetNillableUpdatedAt ¶
func (ac *AccountCreate) SetNillableUpdatedAt(t *time.Time) *AccountCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*AccountCreate) SetOtp ¶
func (ac *AccountCreate) SetOtp(s string) *AccountCreate
SetOtp sets the "otp" field.
func (*AccountCreate) SetOtpSentAt ¶
func (ac *AccountCreate) SetOtpSentAt(t time.Time) *AccountCreate
SetOtpSentAt sets the "otp_sent_at" field.
func (*AccountCreate) SetPassword ¶
func (ac *AccountCreate) SetPassword(s string) *AccountCreate
SetPassword sets the "password" field.
func (*AccountCreate) SetProvider ¶
func (ac *AccountCreate) SetProvider(s string) *AccountCreate
SetProvider sets the "provider" field.
func (*AccountCreate) SetRecoverySentAt ¶
func (ac *AccountCreate) SetRecoverySentAt(t time.Time) *AccountCreate
SetRecoverySentAt sets the "recovery_sent_at" field.
func (*AccountCreate) SetRecoveryToken ¶
func (ac *AccountCreate) SetRecoveryToken(s string) *AccountCreate
SetRecoveryToken sets the "recovery_token" field.
func (*AccountCreate) SetSensitiveAttributes ¶
func (ac *AccountCreate) SetSensitiveAttributes(m map[string]string) *AccountCreate
SetSensitiveAttributes sets the "sensitive_attributes" field.
func (*AccountCreate) SetUpdatedAt ¶
func (ac *AccountCreate) SetUpdatedAt(t time.Time) *AccountCreate
SetUpdatedAt sets the "updated_at" field.
type AccountCreateBulk ¶
type AccountCreateBulk struct {
// contains filtered or unexported fields
}
AccountCreateBulk is the builder for creating many Account entities in bulk.
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 AccountDelete 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 AccountGroupBy ¶
type AccountGroupBy struct {
// contains filtered or unexported fields
}
AccountGroupBy is the group-by builder for Account entities.
func (*AccountGroupBy) Aggregate ¶
func (agb *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AccountGroupBy) Bool ¶
func (agb *AccountGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AccountGroupBy) BoolX ¶
func (agb *AccountGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
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 executing a group-by query 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) Float64 ¶
func (agb *AccountGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AccountGroupBy) Float64X ¶
func (agb *AccountGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, 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 executing a group-by query 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) Int ¶
func (agb *AccountGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AccountGroupBy) IntX ¶
func (agb *AccountGroupBy) IntX(ctx context.Context) int
IntX is like Int, 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 executing a group-by query 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 scans 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.
func (*AccountGroupBy) String ¶
func (agb *AccountGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AccountGroupBy) StringX ¶
func (agb *AccountGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AccountMutation ¶
type AccountMutation struct {
// contains filtered or unexported fields
}
AccountMutation represents an operation that mutates the Account nodes in the graph.
func (*AccountMutation) AddField ¶
func (m *AccountMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*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 incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AccountMutation) AddedFields ¶
func (m *AccountMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/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 in this mutation.
func (*AccountMutation) AttributeBytes ¶
func (m *AccountMutation) AttributeBytes() (r []byte, exists bool)
AttributeBytes returns the value of the "attribute_bytes" field in the mutation.
func (*AccountMutation) AttributeBytesCleared ¶
func (m *AccountMutation) AttributeBytesCleared() bool
AttributeBytesCleared returns if the "attribute_bytes" field was cleared in this mutation.
func (*AccountMutation) Attributes ¶
func (m *AccountMutation) Attributes() (r map[string]interface{}, exists bool)
Attributes returns the value of the "attributes" field in the mutation.
func (*AccountMutation) AttributesCleared ¶
func (m *AccountMutation) AttributesCleared() bool
AttributesCleared returns if the "attributes" field was cleared in this mutation.
func (*AccountMutation) ClearAttributeBytes ¶
func (m *AccountMutation) ClearAttributeBytes()
ClearAttributeBytes clears the value of the "attribute_bytes" field.
func (*AccountMutation) ClearAttributes ¶
func (m *AccountMutation) ClearAttributes()
ClearAttributes clears the value of the "attributes" field.
func (*AccountMutation) ClearConfirmationSentAt ¶
func (m *AccountMutation) ClearConfirmationSentAt()
ClearConfirmationSentAt clears the value of the "confirmation_sent_at" field.
func (*AccountMutation) ClearConfirmationToken ¶
func (m *AccountMutation) ClearConfirmationToken()
ClearConfirmationToken clears the value of the "confirmation_token" field.
func (*AccountMutation) ClearConfirmed ¶
func (m *AccountMutation) ClearConfirmed()
ClearConfirmed clears the value of the "confirmed" field.
func (*AccountMutation) ClearEdge ¶
func (m *AccountMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*AccountMutation) ClearEmailChange ¶
func (m *AccountMutation) ClearEmailChange()
ClearEmailChange clears the value of the "email_change" field.
func (*AccountMutation) ClearEmailChangeSentAt ¶
func (m *AccountMutation) ClearEmailChangeSentAt()
ClearEmailChangeSentAt clears the value of the "email_change_sent_at" field.
func (*AccountMutation) ClearEmailChangeToken ¶
func (m *AccountMutation) ClearEmailChangeToken()
ClearEmailChangeToken clears the value of the "email_change_token" field.
func (*AccountMutation) ClearField ¶
func (m *AccountMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*AccountMutation) ClearLastSigninAt ¶
func (m *AccountMutation) ClearLastSigninAt()
ClearLastSigninAt clears the value of the "last_signin_at" field.
func (*AccountMutation) ClearOtp ¶
func (m *AccountMutation) ClearOtp()
ClearOtp clears the value of the "otp" field.
func (*AccountMutation) ClearOtpSentAt ¶
func (m *AccountMutation) ClearOtpSentAt()
ClearOtpSentAt clears the value of the "otp_sent_at" field.
func (*AccountMutation) ClearRecoverySentAt ¶
func (m *AccountMutation) ClearRecoverySentAt()
ClearRecoverySentAt clears the value of the "recovery_sent_at" field.
func (*AccountMutation) ClearRecoveryToken ¶
func (m *AccountMutation) ClearRecoveryToken()
ClearRecoveryToken clears the value of the "recovery_token" field.
func (*AccountMutation) ClearSensitiveAttributes ¶
func (m *AccountMutation) ClearSensitiveAttributes()
ClearSensitiveAttributes clears the value of the "sensitive_attributes" field.
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) ConfirmationSentAt ¶
func (m *AccountMutation) ConfirmationSentAt() (r time.Time, exists bool)
ConfirmationSentAt returns the value of the "confirmation_sent_at" field in the mutation.
func (*AccountMutation) ConfirmationSentAtCleared ¶
func (m *AccountMutation) ConfirmationSentAtCleared() bool
ConfirmationSentAtCleared returns if the "confirmation_sent_at" field was cleared in this mutation.
func (*AccountMutation) ConfirmationToken ¶
func (m *AccountMutation) ConfirmationToken() (r string, exists bool)
ConfirmationToken returns the value of the "confirmation_token" field in the mutation.
func (*AccountMutation) ConfirmationTokenCleared ¶
func (m *AccountMutation) ConfirmationTokenCleared() bool
ConfirmationTokenCleared returns if the "confirmation_token" field was cleared in this mutation.
func (*AccountMutation) Confirmed ¶
func (m *AccountMutation) Confirmed() (r bool, exists bool)
Confirmed returns the value of the "confirmed" field in the mutation.
func (*AccountMutation) ConfirmedCleared ¶
func (m *AccountMutation) ConfirmedCleared() bool
ConfirmedCleared returns if the "confirmed" field was cleared in this mutation.
func (*AccountMutation) CreatedAt ¶
func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AccountMutation) EdgeCleared ¶
func (m *AccountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AccountMutation) Email ¶
func (m *AccountMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*AccountMutation) EmailChange ¶
func (m *AccountMutation) EmailChange() (r string, exists bool)
EmailChange returns the value of the "email_change" field in the mutation.
func (*AccountMutation) EmailChangeCleared ¶
func (m *AccountMutation) EmailChangeCleared() bool
EmailChangeCleared returns if the "email_change" field was cleared in this mutation.
func (*AccountMutation) EmailChangeSentAt ¶
func (m *AccountMutation) EmailChangeSentAt() (r time.Time, exists bool)
EmailChangeSentAt returns the value of the "email_change_sent_at" field in the mutation.
func (*AccountMutation) EmailChangeSentAtCleared ¶
func (m *AccountMutation) EmailChangeSentAtCleared() bool
EmailChangeSentAtCleared returns if the "email_change_sent_at" field was cleared in this mutation.
func (*AccountMutation) EmailChangeToken ¶
func (m *AccountMutation) EmailChangeToken() (r string, exists bool)
EmailChangeToken returns the value of the "email_change_token" field in the mutation.
func (*AccountMutation) EmailChangeTokenCleared ¶
func (m *AccountMutation) EmailChangeTokenCleared() bool
EmailChangeTokenCleared returns if the "email_change_token" field 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 return value indicates that this field was not set, or was not defined in the schema.
func (*AccountMutation) FieldCleared ¶
func (m *AccountMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name 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 incremented/decremented, call AddedFields().
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 only available if it was provided to the builder.
func (*AccountMutation) LastSigninAt ¶
func (m *AccountMutation) LastSigninAt() (r time.Time, exists bool)
LastSigninAt returns the value of the "last_signin_at" field in the mutation.
func (*AccountMutation) LastSigninAtCleared ¶
func (m *AccountMutation) LastSigninAtCleared() bool
LastSigninAtCleared returns if the "last_signin_at" field was cleared in this mutation.
func (*AccountMutation) Locked ¶
func (m *AccountMutation) Locked() (r bool, exists bool)
Locked returns the value of the "locked" field in the mutation.
func (*AccountMutation) OldAttributeBytes ¶
func (m *AccountMutation) OldAttributeBytes(ctx context.Context) (v []byte, err error)
OldAttributeBytes returns the old "attribute_bytes" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldAttributes ¶
func (m *AccountMutation) OldAttributes(ctx context.Context) (v map[string]interface{}, err error)
OldAttributes returns the old "attributes" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldConfirmationSentAt ¶
OldConfirmationSentAt returns the old "confirmation_sent_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldConfirmationToken ¶
func (m *AccountMutation) OldConfirmationToken(ctx context.Context) (v *string, err error)
OldConfirmationToken returns the old "confirmation_token" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldConfirmed ¶
func (m *AccountMutation) OldConfirmed(ctx context.Context) (v bool, err error)
OldConfirmed returns the old "confirmed" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldEmail ¶
func (m *AccountMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldEmailChange ¶
func (m *AccountMutation) OldEmailChange(ctx context.Context) (v string, err error)
OldEmailChange returns the old "email_change" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldEmailChangeSentAt ¶
OldEmailChangeSentAt returns the old "email_change_sent_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldEmailChangeToken ¶
func (m *AccountMutation) OldEmailChangeToken(ctx context.Context) (v *string, err error)
OldEmailChangeToken returns the old "email_change_token" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*AccountMutation) OldLastSigninAt ¶
OldLastSigninAt returns the old "last_signin_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldLocked ¶
func (m *AccountMutation) OldLocked(ctx context.Context) (v bool, err error)
OldLocked returns the old "locked" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldOtp ¶
func (m *AccountMutation) OldOtp(ctx context.Context) (v *string, err error)
OldOtp returns the old "otp" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldOtpSentAt ¶
OldOtpSentAt returns the old "otp_sent_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldPassword ¶
func (m *AccountMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldProvider ¶
func (m *AccountMutation) OldProvider(ctx context.Context) (v string, err error)
OldProvider returns the old "provider" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldRecoverySentAt ¶
OldRecoverySentAt returns the old "recovery_sent_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldRecoveryToken ¶
func (m *AccountMutation) OldRecoveryToken(ctx context.Context) (v *string, err error)
OldRecoveryToken returns the old "recovery_token" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldSensitiveAttributes ¶
func (m *AccountMutation) OldSensitiveAttributes(ctx context.Context) (v map[string]string, err error)
OldSensitiveAttributes returns the old "sensitive_attributes" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) Otp ¶
func (m *AccountMutation) Otp() (r string, exists bool)
Otp returns the value of the "otp" field in the mutation.
func (*AccountMutation) OtpCleared ¶
func (m *AccountMutation) OtpCleared() bool
OtpCleared returns if the "otp" field was cleared in this mutation.
func (*AccountMutation) OtpSentAt ¶
func (m *AccountMutation) OtpSentAt() (r time.Time, exists bool)
OtpSentAt returns the value of the "otp_sent_at" field in the mutation.
func (*AccountMutation) OtpSentAtCleared ¶
func (m *AccountMutation) OtpSentAtCleared() bool
OtpSentAtCleared returns if the "otp_sent_at" field was cleared in this mutation.
func (*AccountMutation) Password ¶
func (m *AccountMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*AccountMutation) Provider ¶
func (m *AccountMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*AccountMutation) RecoverySentAt ¶
func (m *AccountMutation) RecoverySentAt() (r time.Time, exists bool)
RecoverySentAt returns the value of the "recovery_sent_at" field in the mutation.
func (*AccountMutation) RecoverySentAtCleared ¶
func (m *AccountMutation) RecoverySentAtCleared() bool
RecoverySentAtCleared returns if the "recovery_sent_at" field was cleared in this mutation.
func (*AccountMutation) RecoveryToken ¶
func (m *AccountMutation) RecoveryToken() (r string, exists bool)
RecoveryToken returns the value of the "recovery_token" field in the mutation.
func (*AccountMutation) RecoveryTokenCleared ¶
func (m *AccountMutation) RecoveryTokenCleared() bool
RecoveryTokenCleared returns if the "recovery_token" field was cleared in this 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 edge with the given name in this mutation.
func (*AccountMutation) ResetAttributeBytes ¶
func (m *AccountMutation) ResetAttributeBytes()
ResetAttributeBytes resets all changes to the "attribute_bytes" field.
func (*AccountMutation) ResetAttributes ¶
func (m *AccountMutation) ResetAttributes()
ResetAttributes resets all changes to the "attributes" field.
func (*AccountMutation) ResetConfirmationSentAt ¶
func (m *AccountMutation) ResetConfirmationSentAt()
ResetConfirmationSentAt resets all changes to the "confirmation_sent_at" field.
func (*AccountMutation) ResetConfirmationToken ¶
func (m *AccountMutation) ResetConfirmationToken()
ResetConfirmationToken resets all changes to the "confirmation_token" field.
func (*AccountMutation) ResetConfirmed ¶
func (m *AccountMutation) ResetConfirmed()
ResetConfirmed resets all changes to the "confirmed" field.
func (*AccountMutation) ResetCreatedAt ¶
func (m *AccountMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AccountMutation) ResetEdge ¶
func (m *AccountMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*AccountMutation) ResetEmail ¶
func (m *AccountMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*AccountMutation) ResetEmailChange ¶
func (m *AccountMutation) ResetEmailChange()
ResetEmailChange resets all changes to the "email_change" field.
func (*AccountMutation) ResetEmailChangeSentAt ¶
func (m *AccountMutation) ResetEmailChangeSentAt()
ResetEmailChangeSentAt resets all changes to the "email_change_sent_at" field.
func (*AccountMutation) ResetEmailChangeToken ¶
func (m *AccountMutation) ResetEmailChangeToken()
ResetEmailChangeToken resets all changes to the "email_change_token" field.
func (*AccountMutation) ResetField ¶
func (m *AccountMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*AccountMutation) ResetLastSigninAt ¶
func (m *AccountMutation) ResetLastSigninAt()
ResetLastSigninAt resets all changes to the "last_signin_at" field.
func (*AccountMutation) ResetLocked ¶
func (m *AccountMutation) ResetLocked()
ResetLocked resets all changes to the "locked" field.
func (*AccountMutation) ResetOtp ¶
func (m *AccountMutation) ResetOtp()
ResetOtp resets all changes to the "otp" field.
func (*AccountMutation) ResetOtpSentAt ¶
func (m *AccountMutation) ResetOtpSentAt()
ResetOtpSentAt resets all changes to the "otp_sent_at" field.
func (*AccountMutation) ResetPassword ¶
func (m *AccountMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*AccountMutation) ResetProvider ¶
func (m *AccountMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*AccountMutation) ResetRecoverySentAt ¶
func (m *AccountMutation) ResetRecoverySentAt()
ResetRecoverySentAt resets all changes to the "recovery_sent_at" field.
func (*AccountMutation) ResetRecoveryToken ¶
func (m *AccountMutation) ResetRecoveryToken()
ResetRecoveryToken resets all changes to the "recovery_token" field.
func (*AccountMutation) ResetSensitiveAttributes ¶
func (m *AccountMutation) ResetSensitiveAttributes()
ResetSensitiveAttributes resets all changes to the "sensitive_attributes" field.
func (*AccountMutation) ResetUpdatedAt ¶
func (m *AccountMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AccountMutation) SensitiveAttributes ¶
func (m *AccountMutation) SensitiveAttributes() (r map[string]string, exists bool)
SensitiveAttributes returns the value of the "sensitive_attributes" field in the mutation.
func (*AccountMutation) SensitiveAttributesCleared ¶
func (m *AccountMutation) SensitiveAttributesCleared() bool
SensitiveAttributesCleared returns if the "sensitive_attributes" field was cleared in this mutation.
func (*AccountMutation) SetAttributeBytes ¶
func (m *AccountMutation) SetAttributeBytes(b []byte)
SetAttributeBytes sets the "attribute_bytes" field.
func (*AccountMutation) SetAttributes ¶
func (m *AccountMutation) SetAttributes(value map[string]interface{})
SetAttributes sets the "attributes" field.
func (*AccountMutation) SetConfirmationSentAt ¶
func (m *AccountMutation) SetConfirmationSentAt(t time.Time)
SetConfirmationSentAt sets the "confirmation_sent_at" field.
func (*AccountMutation) SetConfirmationToken ¶
func (m *AccountMutation) SetConfirmationToken(s string)
SetConfirmationToken sets the "confirmation_token" field.
func (*AccountMutation) SetConfirmed ¶
func (m *AccountMutation) SetConfirmed(b bool)
SetConfirmed sets the "confirmed" field.
func (*AccountMutation) SetCreatedAt ¶
func (m *AccountMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AccountMutation) SetEmail ¶
func (m *AccountMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*AccountMutation) SetEmailChange ¶
func (m *AccountMutation) SetEmailChange(s string)
SetEmailChange sets the "email_change" field.
func (*AccountMutation) SetEmailChangeSentAt ¶
func (m *AccountMutation) SetEmailChangeSentAt(t time.Time)
SetEmailChangeSentAt sets the "email_change_sent_at" field.
func (*AccountMutation) SetEmailChangeToken ¶
func (m *AccountMutation) SetEmailChangeToken(s string)
SetEmailChangeToken sets the "email_change_token" field.
func (*AccountMutation) SetField ¶
func (m *AccountMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AccountMutation) SetID ¶
func (m *AccountMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Account entities.
func (*AccountMutation) SetLastSigninAt ¶
func (m *AccountMutation) SetLastSigninAt(t time.Time)
SetLastSigninAt sets the "last_signin_at" field.
func (*AccountMutation) SetLocked ¶
func (m *AccountMutation) SetLocked(b bool)
SetLocked sets the "locked" field.
func (*AccountMutation) SetOtp ¶
func (m *AccountMutation) SetOtp(s string)
SetOtp sets the "otp" field.
func (*AccountMutation) SetOtpSentAt ¶
func (m *AccountMutation) SetOtpSentAt(t time.Time)
SetOtpSentAt sets the "otp_sent_at" field.
func (*AccountMutation) SetPassword ¶
func (m *AccountMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*AccountMutation) SetProvider ¶
func (m *AccountMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*AccountMutation) SetRecoverySentAt ¶
func (m *AccountMutation) SetRecoverySentAt(t time.Time)
SetRecoverySentAt sets the "recovery_sent_at" field.
func (*AccountMutation) SetRecoveryToken ¶
func (m *AccountMutation) SetRecoveryToken(s string)
SetRecoveryToken sets the "recovery_token" field.
func (*AccountMutation) SetSensitiveAttributes ¶
func (m *AccountMutation) SetSensitiveAttributes(value map[string]string)
SetSensitiveAttributes sets the "sensitive_attributes" field.
func (*AccountMutation) SetUpdatedAt ¶
func (m *AccountMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
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 AccountQuery 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 from the query. Returns a *NotFoundError when no Account was found.
func (*AccountQuery) FirstID ¶
FirstID returns the first Account ID from the query. Returns a *NotFoundError when no Account ID was found.
func (*AccountQuery) FirstIDX ¶
func (aq *AccountQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AccountQuery) FirstX ¶
func (aq *AccountQuery) FirstX(ctx context.Context) *Account
FirstX is like First, but panics if an error occurs.
func (*AccountQuery) GroupBy ¶
func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Provider string `json:"provider,omitempty"` Count int `json:"count,omitempty"` } client.Account.Query(). GroupBy(account.FieldProvider). Aggregate(models.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 a single Account entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Account entity is not found. Returns a *NotFoundError when no Account entities are found.
func (*AccountQuery) OnlyID ¶
OnlyID is like Only, but returns the only Account ID in the query. Returns a *NotSingularError when exactly one Account ID is not found. Returns a *NotFoundError when no entities are found.
func (*AccountQuery) OnlyIDX ¶
func (aq *AccountQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AccountQuery) OnlyX ¶
func (aq *AccountQuery) OnlyX(ctx context.Context) *Account
OnlyX is like Only, but panics if an error occurs.
func (*AccountQuery) Order ¶
func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery
Order adds an order step to the query.
func (*AccountQuery) Select ¶
func (aq *AccountQuery) Select(field string, fields ...string) *AccountSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Provider string `json:"provider,omitempty"` } client.Account.Query(). Select(account.FieldProvider). Scan(ctx, &v)
func (*AccountQuery) Where ¶
func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
Where adds a new predicate for the AccountQuery builder.
type AccountSelect ¶
type AccountSelect struct { *AccountQuery // contains filtered or unexported fields }
AccountSelect is the builder for selecting fields of Account entities.
func (*AccountSelect) Bool ¶
func (as *AccountSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountSelect) BoolX ¶
func (as *AccountSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AccountSelect) Bools ¶
func (as *AccountSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a 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) Float64 ¶
func (as *AccountSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Float64X ¶
func (as *AccountSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AccountSelect) Float64s ¶
func (as *AccountSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a 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) Int ¶
func (as *AccountSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountSelect) IntX ¶
func (as *AccountSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AccountSelect) Ints ¶
func (as *AccountSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a 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 scans 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.
func (*AccountSelect) String ¶
func (as *AccountSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*AccountSelect) StringX ¶
func (as *AccountSelect) StringX(ctx context.Context) string
StringX is like String, 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) ClearAttributeBytes ¶
func (au *AccountUpdate) ClearAttributeBytes() *AccountUpdate
ClearAttributeBytes clears the value of the "attribute_bytes" field.
func (*AccountUpdate) ClearAttributes ¶
func (au *AccountUpdate) ClearAttributes() *AccountUpdate
ClearAttributes clears the value of the "attributes" field.
func (*AccountUpdate) ClearConfirmationSentAt ¶
func (au *AccountUpdate) ClearConfirmationSentAt() *AccountUpdate
ClearConfirmationSentAt clears the value of the "confirmation_sent_at" field.
func (*AccountUpdate) ClearConfirmationToken ¶
func (au *AccountUpdate) ClearConfirmationToken() *AccountUpdate
ClearConfirmationToken clears the value of the "confirmation_token" field.
func (*AccountUpdate) ClearConfirmed ¶
func (au *AccountUpdate) ClearConfirmed() *AccountUpdate
ClearConfirmed clears the value of the "confirmed" field.
func (*AccountUpdate) ClearEmailChange ¶
func (au *AccountUpdate) ClearEmailChange() *AccountUpdate
ClearEmailChange clears the value of the "email_change" field.
func (*AccountUpdate) ClearEmailChangeSentAt ¶
func (au *AccountUpdate) ClearEmailChangeSentAt() *AccountUpdate
ClearEmailChangeSentAt clears the value of the "email_change_sent_at" field.
func (*AccountUpdate) ClearEmailChangeToken ¶
func (au *AccountUpdate) ClearEmailChangeToken() *AccountUpdate
ClearEmailChangeToken clears the value of the "email_change_token" field.
func (*AccountUpdate) ClearLastSigninAt ¶
func (au *AccountUpdate) ClearLastSigninAt() *AccountUpdate
ClearLastSigninAt clears the value of the "last_signin_at" field.
func (*AccountUpdate) ClearOtp ¶
func (au *AccountUpdate) ClearOtp() *AccountUpdate
ClearOtp clears the value of the "otp" field.
func (*AccountUpdate) ClearOtpSentAt ¶
func (au *AccountUpdate) ClearOtpSentAt() *AccountUpdate
ClearOtpSentAt clears the value of the "otp_sent_at" field.
func (*AccountUpdate) ClearRecoverySentAt ¶
func (au *AccountUpdate) ClearRecoverySentAt() *AccountUpdate
ClearRecoverySentAt clears the value of the "recovery_sent_at" field.
func (*AccountUpdate) ClearRecoveryToken ¶
func (au *AccountUpdate) ClearRecoveryToken() *AccountUpdate
ClearRecoveryToken clears the value of the "recovery_token" field.
func (*AccountUpdate) ClearSensitiveAttributes ¶
func (au *AccountUpdate) ClearSensitiveAttributes() *AccountUpdate
ClearSensitiveAttributes clears the value of the "sensitive_attributes" field.
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) Mutation ¶
func (au *AccountUpdate) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountUpdate) Save ¶
func (au *AccountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AccountUpdate) SaveX ¶
func (au *AccountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdate) SetAttributeBytes ¶
func (au *AccountUpdate) SetAttributeBytes(b []byte) *AccountUpdate
SetAttributeBytes sets the "attribute_bytes" field.
func (*AccountUpdate) SetAttributes ¶
func (au *AccountUpdate) SetAttributes(m map[string]interface{}) *AccountUpdate
SetAttributes sets the "attributes" field.
func (*AccountUpdate) SetConfirmationSentAt ¶
func (au *AccountUpdate) SetConfirmationSentAt(t time.Time) *AccountUpdate
SetConfirmationSentAt sets the "confirmation_sent_at" field.
func (*AccountUpdate) SetConfirmationToken ¶
func (au *AccountUpdate) SetConfirmationToken(s string) *AccountUpdate
SetConfirmationToken sets the "confirmation_token" field.
func (*AccountUpdate) SetConfirmed ¶
func (au *AccountUpdate) SetConfirmed(b bool) *AccountUpdate
SetConfirmed sets the "confirmed" field.
func (*AccountUpdate) SetEmail ¶
func (au *AccountUpdate) SetEmail(s string) *AccountUpdate
SetEmail sets the "email" field.
func (*AccountUpdate) SetEmailChange ¶
func (au *AccountUpdate) SetEmailChange(s string) *AccountUpdate
SetEmailChange sets the "email_change" field.
func (*AccountUpdate) SetEmailChangeSentAt ¶
func (au *AccountUpdate) SetEmailChangeSentAt(t time.Time) *AccountUpdate
SetEmailChangeSentAt sets the "email_change_sent_at" field.
func (*AccountUpdate) SetEmailChangeToken ¶
func (au *AccountUpdate) SetEmailChangeToken(s string) *AccountUpdate
SetEmailChangeToken sets the "email_change_token" field.
func (*AccountUpdate) SetLastSigninAt ¶
func (au *AccountUpdate) SetLastSigninAt(t time.Time) *AccountUpdate
SetLastSigninAt sets the "last_signin_at" field.
func (*AccountUpdate) SetLocked ¶
func (au *AccountUpdate) SetLocked(b bool) *AccountUpdate
SetLocked sets the "locked" field.
func (*AccountUpdate) SetNillableConfirmationSentAt ¶
func (au *AccountUpdate) SetNillableConfirmationSentAt(t *time.Time) *AccountUpdate
SetNillableConfirmationSentAt sets the "confirmation_sent_at" field if the given value is not nil.
func (*AccountUpdate) SetNillableConfirmationToken ¶
func (au *AccountUpdate) SetNillableConfirmationToken(s *string) *AccountUpdate
SetNillableConfirmationToken sets the "confirmation_token" field if the given value is not nil.
func (*AccountUpdate) SetNillableConfirmed ¶
func (au *AccountUpdate) SetNillableConfirmed(b *bool) *AccountUpdate
SetNillableConfirmed sets the "confirmed" field if the given value is not nil.
func (*AccountUpdate) SetNillableEmailChange ¶
func (au *AccountUpdate) SetNillableEmailChange(s *string) *AccountUpdate
SetNillableEmailChange sets the "email_change" field if the given value is not nil.
func (*AccountUpdate) SetNillableEmailChangeSentAt ¶
func (au *AccountUpdate) SetNillableEmailChangeSentAt(t *time.Time) *AccountUpdate
SetNillableEmailChangeSentAt sets the "email_change_sent_at" field if the given value is not nil.
func (*AccountUpdate) SetNillableEmailChangeToken ¶
func (au *AccountUpdate) SetNillableEmailChangeToken(s *string) *AccountUpdate
SetNillableEmailChangeToken sets the "email_change_token" field if the given value is not nil.
func (*AccountUpdate) SetNillableLastSigninAt ¶
func (au *AccountUpdate) SetNillableLastSigninAt(t *time.Time) *AccountUpdate
SetNillableLastSigninAt sets the "last_signin_at" field if the given value is not nil.
func (*AccountUpdate) SetNillableLocked ¶
func (au *AccountUpdate) SetNillableLocked(b *bool) *AccountUpdate
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*AccountUpdate) SetNillableOtp ¶
func (au *AccountUpdate) SetNillableOtp(s *string) *AccountUpdate
SetNillableOtp sets the "otp" field if the given value is not nil.
func (*AccountUpdate) SetNillableOtpSentAt ¶
func (au *AccountUpdate) SetNillableOtpSentAt(t *time.Time) *AccountUpdate
SetNillableOtpSentAt sets the "otp_sent_at" field if the given value is not nil.
func (*AccountUpdate) SetNillableRecoverySentAt ¶
func (au *AccountUpdate) SetNillableRecoverySentAt(t *time.Time) *AccountUpdate
SetNillableRecoverySentAt sets the "recovery_sent_at" field if the given value is not nil.
func (*AccountUpdate) SetNillableRecoveryToken ¶
func (au *AccountUpdate) SetNillableRecoveryToken(s *string) *AccountUpdate
SetNillableRecoveryToken sets the "recovery_token" field if the given value is not nil.
func (*AccountUpdate) SetOtp ¶
func (au *AccountUpdate) SetOtp(s string) *AccountUpdate
SetOtp sets the "otp" field.
func (*AccountUpdate) SetOtpSentAt ¶
func (au *AccountUpdate) SetOtpSentAt(t time.Time) *AccountUpdate
SetOtpSentAt sets the "otp_sent_at" field.
func (*AccountUpdate) SetPassword ¶
func (au *AccountUpdate) SetPassword(s string) *AccountUpdate
SetPassword sets the "password" field.
func (*AccountUpdate) SetProvider ¶
func (au *AccountUpdate) SetProvider(s string) *AccountUpdate
SetProvider sets the "provider" field.
func (*AccountUpdate) SetRecoverySentAt ¶
func (au *AccountUpdate) SetRecoverySentAt(t time.Time) *AccountUpdate
SetRecoverySentAt sets the "recovery_sent_at" field.
func (*AccountUpdate) SetRecoveryToken ¶
func (au *AccountUpdate) SetRecoveryToken(s string) *AccountUpdate
SetRecoveryToken sets the "recovery_token" field.
func (*AccountUpdate) SetSensitiveAttributes ¶
func (au *AccountUpdate) SetSensitiveAttributes(m map[string]string) *AccountUpdate
SetSensitiveAttributes sets the "sensitive_attributes" field.
func (*AccountUpdate) SetUpdatedAt ¶
func (au *AccountUpdate) SetUpdatedAt(t time.Time) *AccountUpdate
SetUpdatedAt sets the "updated_at" field.
func (*AccountUpdate) Where ¶
func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
Where adds a new predicate for the AccountUpdate builder.
type AccountUpdateOne ¶
type AccountUpdateOne struct {
// contains filtered or unexported fields
}
AccountUpdateOne is the builder for updating a single Account entity.
func (*AccountUpdateOne) ClearAttributeBytes ¶
func (auo *AccountUpdateOne) ClearAttributeBytes() *AccountUpdateOne
ClearAttributeBytes clears the value of the "attribute_bytes" field.
func (*AccountUpdateOne) ClearAttributes ¶
func (auo *AccountUpdateOne) ClearAttributes() *AccountUpdateOne
ClearAttributes clears the value of the "attributes" field.
func (*AccountUpdateOne) ClearConfirmationSentAt ¶
func (auo *AccountUpdateOne) ClearConfirmationSentAt() *AccountUpdateOne
ClearConfirmationSentAt clears the value of the "confirmation_sent_at" field.
func (*AccountUpdateOne) ClearConfirmationToken ¶
func (auo *AccountUpdateOne) ClearConfirmationToken() *AccountUpdateOne
ClearConfirmationToken clears the value of the "confirmation_token" field.
func (*AccountUpdateOne) ClearConfirmed ¶
func (auo *AccountUpdateOne) ClearConfirmed() *AccountUpdateOne
ClearConfirmed clears the value of the "confirmed" field.
func (*AccountUpdateOne) ClearEmailChange ¶
func (auo *AccountUpdateOne) ClearEmailChange() *AccountUpdateOne
ClearEmailChange clears the value of the "email_change" field.
func (*AccountUpdateOne) ClearEmailChangeSentAt ¶
func (auo *AccountUpdateOne) ClearEmailChangeSentAt() *AccountUpdateOne
ClearEmailChangeSentAt clears the value of the "email_change_sent_at" field.
func (*AccountUpdateOne) ClearEmailChangeToken ¶
func (auo *AccountUpdateOne) ClearEmailChangeToken() *AccountUpdateOne
ClearEmailChangeToken clears the value of the "email_change_token" field.
func (*AccountUpdateOne) ClearLastSigninAt ¶
func (auo *AccountUpdateOne) ClearLastSigninAt() *AccountUpdateOne
ClearLastSigninAt clears the value of the "last_signin_at" field.
func (*AccountUpdateOne) ClearOtp ¶
func (auo *AccountUpdateOne) ClearOtp() *AccountUpdateOne
ClearOtp clears the value of the "otp" field.
func (*AccountUpdateOne) ClearOtpSentAt ¶
func (auo *AccountUpdateOne) ClearOtpSentAt() *AccountUpdateOne
ClearOtpSentAt clears the value of the "otp_sent_at" field.
func (*AccountUpdateOne) ClearRecoverySentAt ¶
func (auo *AccountUpdateOne) ClearRecoverySentAt() *AccountUpdateOne
ClearRecoverySentAt clears the value of the "recovery_sent_at" field.
func (*AccountUpdateOne) ClearRecoveryToken ¶
func (auo *AccountUpdateOne) ClearRecoveryToken() *AccountUpdateOne
ClearRecoveryToken clears the value of the "recovery_token" field.
func (*AccountUpdateOne) ClearSensitiveAttributes ¶
func (auo *AccountUpdateOne) ClearSensitiveAttributes() *AccountUpdateOne
ClearSensitiveAttributes clears the value of the "sensitive_attributes" field.
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) Mutation ¶
func (auo *AccountUpdateOne) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountUpdateOne) Save ¶
func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)
Save executes the query and returns the updated Account entity.
func (*AccountUpdateOne) SaveX ¶
func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdateOne) SetAttributeBytes ¶
func (auo *AccountUpdateOne) SetAttributeBytes(b []byte) *AccountUpdateOne
SetAttributeBytes sets the "attribute_bytes" field.
func (*AccountUpdateOne) SetAttributes ¶
func (auo *AccountUpdateOne) SetAttributes(m map[string]interface{}) *AccountUpdateOne
SetAttributes sets the "attributes" field.
func (*AccountUpdateOne) SetConfirmationSentAt ¶
func (auo *AccountUpdateOne) SetConfirmationSentAt(t time.Time) *AccountUpdateOne
SetConfirmationSentAt sets the "confirmation_sent_at" field.
func (*AccountUpdateOne) SetConfirmationToken ¶
func (auo *AccountUpdateOne) SetConfirmationToken(s string) *AccountUpdateOne
SetConfirmationToken sets the "confirmation_token" field.
func (*AccountUpdateOne) SetConfirmed ¶
func (auo *AccountUpdateOne) SetConfirmed(b bool) *AccountUpdateOne
SetConfirmed sets the "confirmed" field.
func (*AccountUpdateOne) SetEmail ¶
func (auo *AccountUpdateOne) SetEmail(s string) *AccountUpdateOne
SetEmail sets the "email" field.
func (*AccountUpdateOne) SetEmailChange ¶
func (auo *AccountUpdateOne) SetEmailChange(s string) *AccountUpdateOne
SetEmailChange sets the "email_change" field.
func (*AccountUpdateOne) SetEmailChangeSentAt ¶
func (auo *AccountUpdateOne) SetEmailChangeSentAt(t time.Time) *AccountUpdateOne
SetEmailChangeSentAt sets the "email_change_sent_at" field.
func (*AccountUpdateOne) SetEmailChangeToken ¶
func (auo *AccountUpdateOne) SetEmailChangeToken(s string) *AccountUpdateOne
SetEmailChangeToken sets the "email_change_token" field.
func (*AccountUpdateOne) SetLastSigninAt ¶
func (auo *AccountUpdateOne) SetLastSigninAt(t time.Time) *AccountUpdateOne
SetLastSigninAt sets the "last_signin_at" field.
func (*AccountUpdateOne) SetLocked ¶
func (auo *AccountUpdateOne) SetLocked(b bool) *AccountUpdateOne
SetLocked sets the "locked" field.
func (*AccountUpdateOne) SetNillableConfirmationSentAt ¶
func (auo *AccountUpdateOne) SetNillableConfirmationSentAt(t *time.Time) *AccountUpdateOne
SetNillableConfirmationSentAt sets the "confirmation_sent_at" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableConfirmationToken ¶
func (auo *AccountUpdateOne) SetNillableConfirmationToken(s *string) *AccountUpdateOne
SetNillableConfirmationToken sets the "confirmation_token" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableConfirmed ¶
func (auo *AccountUpdateOne) SetNillableConfirmed(b *bool) *AccountUpdateOne
SetNillableConfirmed sets the "confirmed" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableEmailChange ¶
func (auo *AccountUpdateOne) SetNillableEmailChange(s *string) *AccountUpdateOne
SetNillableEmailChange sets the "email_change" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableEmailChangeSentAt ¶
func (auo *AccountUpdateOne) SetNillableEmailChangeSentAt(t *time.Time) *AccountUpdateOne
SetNillableEmailChangeSentAt sets the "email_change_sent_at" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableEmailChangeToken ¶
func (auo *AccountUpdateOne) SetNillableEmailChangeToken(s *string) *AccountUpdateOne
SetNillableEmailChangeToken sets the "email_change_token" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableLastSigninAt ¶
func (auo *AccountUpdateOne) SetNillableLastSigninAt(t *time.Time) *AccountUpdateOne
SetNillableLastSigninAt sets the "last_signin_at" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableLocked ¶
func (auo *AccountUpdateOne) SetNillableLocked(b *bool) *AccountUpdateOne
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableOtp ¶
func (auo *AccountUpdateOne) SetNillableOtp(s *string) *AccountUpdateOne
SetNillableOtp sets the "otp" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableOtpSentAt ¶
func (auo *AccountUpdateOne) SetNillableOtpSentAt(t *time.Time) *AccountUpdateOne
SetNillableOtpSentAt sets the "otp_sent_at" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableRecoverySentAt ¶
func (auo *AccountUpdateOne) SetNillableRecoverySentAt(t *time.Time) *AccountUpdateOne
SetNillableRecoverySentAt sets the "recovery_sent_at" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableRecoveryToken ¶
func (auo *AccountUpdateOne) SetNillableRecoveryToken(s *string) *AccountUpdateOne
SetNillableRecoveryToken sets the "recovery_token" field if the given value is not nil.
func (*AccountUpdateOne) SetOtp ¶
func (auo *AccountUpdateOne) SetOtp(s string) *AccountUpdateOne
SetOtp sets the "otp" field.
func (*AccountUpdateOne) SetOtpSentAt ¶
func (auo *AccountUpdateOne) SetOtpSentAt(t time.Time) *AccountUpdateOne
SetOtpSentAt sets the "otp_sent_at" field.
func (*AccountUpdateOne) SetPassword ¶
func (auo *AccountUpdateOne) SetPassword(s string) *AccountUpdateOne
SetPassword sets the "password" field.
func (*AccountUpdateOne) SetProvider ¶
func (auo *AccountUpdateOne) SetProvider(s string) *AccountUpdateOne
SetProvider sets the "provider" field.
func (*AccountUpdateOne) SetRecoverySentAt ¶
func (auo *AccountUpdateOne) SetRecoverySentAt(t time.Time) *AccountUpdateOne
SetRecoverySentAt sets the "recovery_sent_at" field.
func (*AccountUpdateOne) SetRecoveryToken ¶
func (auo *AccountUpdateOne) SetRecoveryToken(s string) *AccountUpdateOne
SetRecoveryToken sets the "recovery_token" field.
func (*AccountUpdateOne) SetSensitiveAttributes ¶
func (auo *AccountUpdateOne) SetSensitiveAttributes(m map[string]string) *AccountUpdateOne
SetSensitiveAttributes sets the "sensitive_attributes" field.
func (*AccountUpdateOne) SetUpdatedAt ¶
func (auo *AccountUpdateOne) SetUpdatedAt(t time.Time) *AccountUpdateOne
SetUpdatedAt sets the "updated_at" field.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(models.As(models.Sum(field1), "sum_field1"), (models.As(models.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Account is the client for interacting with the Account builders. Account *AccountClient // Session is the client for interacting with the Session builders. Session *SessionClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Account. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollbacker method.
type Session ¶
type Session struct { // ID of the ent. ID string `json:"id,omitempty"` // Data holds the value of the "data" field. Data string `json:"data,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // ExpiresAt holds the value of the "expires_at" field. ExpiresAt *time.Time `json:"expires_at,omitempty"` // contains filtered or unexported fields }
Session is the model entity for the Session schema.
func (*Session) Unwrap ¶
Unwrap unwraps the Session entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Session) Update ¶
func (s *Session) Update() *SessionUpdateOne
Update returns a builder for updating this Session. Note that you need to call Session.Unwrap() before calling this method if this Session was returned from a transaction, and the transaction was committed or rolled back.
type SessionClient ¶
type SessionClient struct {
// contains filtered or unexported fields
}
SessionClient is a client for the Session schema.
func NewSessionClient ¶
func NewSessionClient(c config) *SessionClient
NewSessionClient returns a client for the Session from the given config.
func (*SessionClient) Create ¶
func (c *SessionClient) Create() *SessionCreate
Create returns a create builder for Session.
func (*SessionClient) CreateBulk ¶
func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
CreateBulk returns a builder for creating a bulk of Session entities.
func (*SessionClient) Delete ¶
func (c *SessionClient) Delete() *SessionDelete
Delete returns a delete builder for Session.
func (*SessionClient) DeleteOne ¶
func (c *SessionClient) DeleteOne(s *Session) *SessionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SessionClient) DeleteOneID ¶
func (c *SessionClient) DeleteOneID(id string) *SessionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SessionClient) GetX ¶
func (c *SessionClient) GetX(ctx context.Context, id string) *Session
GetX is like Get, but panics if an error occurs.
func (*SessionClient) Hooks ¶
func (c *SessionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SessionClient) Query ¶
func (c *SessionClient) Query() *SessionQuery
Query returns a query builder for Session.
func (*SessionClient) Update ¶
func (c *SessionClient) Update() *SessionUpdate
Update returns an update builder for Session.
func (*SessionClient) UpdateOne ¶
func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SessionClient) UpdateOneID ¶
func (c *SessionClient) UpdateOneID(id string) *SessionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SessionClient) Use ¶
func (c *SessionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `session.Hooks(f(g(h())))`.
type SessionCreate ¶
type SessionCreate struct {
// contains filtered or unexported fields
}
SessionCreate is the builder for creating a Session entity.
func (*SessionCreate) Mutation ¶
func (sc *SessionCreate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionCreate) Save ¶
func (sc *SessionCreate) Save(ctx context.Context) (*Session, error)
Save creates the Session in the database.
func (*SessionCreate) SaveX ¶
func (sc *SessionCreate) SaveX(ctx context.Context) *Session
SaveX calls Save and panics if Save returns an error.
func (*SessionCreate) SetCreatedAt ¶
func (sc *SessionCreate) SetCreatedAt(t time.Time) *SessionCreate
SetCreatedAt sets the "created_at" field.
func (*SessionCreate) SetData ¶
func (sc *SessionCreate) SetData(s string) *SessionCreate
SetData sets the "data" field.
func (*SessionCreate) SetExpiresAt ¶
func (sc *SessionCreate) SetExpiresAt(t time.Time) *SessionCreate
SetExpiresAt sets the "expires_at" field.
func (*SessionCreate) SetID ¶
func (sc *SessionCreate) SetID(s string) *SessionCreate
SetID sets the "id" field.
func (*SessionCreate) SetNillableCreatedAt ¶
func (sc *SessionCreate) SetNillableCreatedAt(t *time.Time) *SessionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SessionCreate) SetNillableExpiresAt ¶
func (sc *SessionCreate) SetNillableExpiresAt(t *time.Time) *SessionCreate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*SessionCreate) SetNillableUpdatedAt ¶
func (sc *SessionCreate) SetNillableUpdatedAt(t *time.Time) *SessionCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SessionCreate) SetUpdatedAt ¶
func (sc *SessionCreate) SetUpdatedAt(t time.Time) *SessionCreate
SetUpdatedAt sets the "updated_at" field.
type SessionCreateBulk ¶
type SessionCreateBulk struct {
// contains filtered or unexported fields
}
SessionCreateBulk is the builder for creating many Session entities in bulk.
type SessionDelete ¶
type SessionDelete struct {
// contains filtered or unexported fields
}
SessionDelete is the builder for deleting a Session entity.
func (*SessionDelete) Exec ¶
func (sd *SessionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SessionDelete) ExecX ¶
func (sd *SessionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SessionDelete) Where ¶
func (sd *SessionDelete) Where(ps ...predicate.Session) *SessionDelete
Where adds a new predicate to the SessionDelete builder.
type SessionDeleteOne ¶
type SessionDeleteOne struct {
// contains filtered or unexported fields
}
SessionDeleteOne is the builder for deleting a single Session entity.
func (*SessionDeleteOne) Exec ¶
func (sdo *SessionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SessionDeleteOne) ExecX ¶
func (sdo *SessionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SessionGroupBy ¶
type SessionGroupBy struct {
// contains filtered or unexported fields
}
SessionGroupBy is the group-by builder for Session entities.
func (*SessionGroupBy) Aggregate ¶
func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SessionGroupBy) Bool ¶
func (sgb *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SessionGroupBy) BoolX ¶
func (sgb *SessionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SessionGroupBy) Bools ¶
func (sgb *SessionGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*SessionGroupBy) BoolsX ¶
func (sgb *SessionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SessionGroupBy) Float64 ¶
func (sgb *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SessionGroupBy) Float64X ¶
func (sgb *SessionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SessionGroupBy) Float64s ¶
func (sgb *SessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*SessionGroupBy) Float64sX ¶
func (sgb *SessionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SessionGroupBy) Int ¶
func (sgb *SessionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SessionGroupBy) IntX ¶
func (sgb *SessionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SessionGroupBy) Ints ¶
func (sgb *SessionGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*SessionGroupBy) IntsX ¶
func (sgb *SessionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SessionGroupBy) Scan ¶
func (sgb *SessionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SessionGroupBy) ScanX ¶
func (sgb *SessionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SessionGroupBy) String ¶
func (sgb *SessionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SessionGroupBy) StringX ¶
func (sgb *SessionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SessionMutation ¶
type SessionMutation struct {
// contains filtered or unexported fields
}
SessionMutation represents an operation that mutates the Session nodes in the graph.
func (*SessionMutation) AddField ¶
func (m *SessionMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SessionMutation) AddedEdges ¶
func (m *SessionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SessionMutation) AddedField ¶
func (m *SessionMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SessionMutation) AddedFields ¶
func (m *SessionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SessionMutation) AddedIDs ¶
func (m *SessionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SessionMutation) ClearEdge ¶
func (m *SessionMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*SessionMutation) ClearExpiresAt ¶
func (m *SessionMutation) ClearExpiresAt()
ClearExpiresAt clears the value of the "expires_at" field.
func (*SessionMutation) ClearField ¶
func (m *SessionMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*SessionMutation) ClearedEdges ¶
func (m *SessionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SessionMutation) ClearedFields ¶
func (m *SessionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SessionMutation) Client ¶
func (m SessionMutation) 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 (*SessionMutation) CreatedAt ¶
func (m *SessionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SessionMutation) Data ¶
func (m *SessionMutation) Data() (r string, exists bool)
Data returns the value of the "data" field in the mutation.
func (*SessionMutation) EdgeCleared ¶
func (m *SessionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SessionMutation) ExpiresAt ¶
func (m *SessionMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the value of the "expires_at" field in the mutation.
func (*SessionMutation) ExpiresAtCleared ¶
func (m *SessionMutation) ExpiresAtCleared() bool
ExpiresAtCleared returns if the "expires_at" field was cleared in this mutation.
func (*SessionMutation) Field ¶
func (m *SessionMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SessionMutation) FieldCleared ¶
func (m *SessionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SessionMutation) Fields ¶
func (m *SessionMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*SessionMutation) ID ¶
func (m *SessionMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*SessionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SessionMutation) OldData ¶
func (m *SessionMutation) OldData(ctx context.Context) (v string, err error)
OldData returns the old "data" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SessionMutation) OldExpiresAt ¶
OldExpiresAt returns the old "expires_at" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SessionMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*SessionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SessionMutation) RemovedEdges ¶
func (m *SessionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SessionMutation) RemovedIDs ¶
func (m *SessionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*SessionMutation) ResetCreatedAt ¶
func (m *SessionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SessionMutation) ResetData ¶
func (m *SessionMutation) ResetData()
ResetData resets all changes to the "data" field.
func (*SessionMutation) ResetEdge ¶
func (m *SessionMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*SessionMutation) ResetExpiresAt ¶
func (m *SessionMutation) ResetExpiresAt()
ResetExpiresAt resets all changes to the "expires_at" field.
func (*SessionMutation) ResetField ¶
func (m *SessionMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*SessionMutation) ResetUpdatedAt ¶
func (m *SessionMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SessionMutation) SetCreatedAt ¶
func (m *SessionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SessionMutation) SetData ¶
func (m *SessionMutation) SetData(s string)
SetData sets the "data" field.
func (*SessionMutation) SetExpiresAt ¶
func (m *SessionMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the "expires_at" field.
func (*SessionMutation) SetField ¶
func (m *SessionMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SessionMutation) SetID ¶
func (m *SessionMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Session entities.
func (*SessionMutation) SetUpdatedAt ¶
func (m *SessionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (SessionMutation) Tx ¶
func (m SessionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SessionMutation) Type ¶
func (m *SessionMutation) Type() string
Type returns the node type of this mutation (Session).
type SessionQuery ¶
type SessionQuery struct {
// contains filtered or unexported fields
}
SessionQuery is the builder for querying Session entities.
func (*SessionQuery) All ¶
func (sq *SessionQuery) All(ctx context.Context) ([]*Session, error)
All executes the query and returns a list of Sessions.
func (*SessionQuery) AllX ¶
func (sq *SessionQuery) AllX(ctx context.Context) []*Session
AllX is like All, but panics if an error occurs.
func (*SessionQuery) Clone ¶
func (sq *SessionQuery) Clone() *SessionQuery
Clone returns a duplicate of the SessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SessionQuery) Count ¶
func (sq *SessionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SessionQuery) CountX ¶
func (sq *SessionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SessionQuery) Exist ¶
func (sq *SessionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SessionQuery) ExistX ¶
func (sq *SessionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SessionQuery) First ¶
func (sq *SessionQuery) First(ctx context.Context) (*Session, error)
First returns the first Session entity from the query. Returns a *NotFoundError when no Session was found.
func (*SessionQuery) FirstID ¶
func (sq *SessionQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Session ID from the query. Returns a *NotFoundError when no Session ID was found.
func (*SessionQuery) FirstIDX ¶
func (sq *SessionQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*SessionQuery) FirstX ¶
func (sq *SessionQuery) FirstX(ctx context.Context) *Session
FirstX is like First, but panics if an error occurs.
func (*SessionQuery) GroupBy ¶
func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Data string `json:"data,omitempty"` Count int `json:"count,omitempty"` } client.Session.Query(). GroupBy(session.FieldData). Aggregate(models.Count()). Scan(ctx, &v)
func (*SessionQuery) IDs ¶
func (sq *SessionQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of Session IDs.
func (*SessionQuery) IDsX ¶
func (sq *SessionQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*SessionQuery) Limit ¶
func (sq *SessionQuery) Limit(limit int) *SessionQuery
Limit adds a limit step to the query.
func (*SessionQuery) Offset ¶
func (sq *SessionQuery) Offset(offset int) *SessionQuery
Offset adds an offset step to the query.
func (*SessionQuery) Only ¶
func (sq *SessionQuery) Only(ctx context.Context) (*Session, error)
Only returns a single Session entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Session entity is not found. Returns a *NotFoundError when no Session entities are found.
func (*SessionQuery) OnlyID ¶
func (sq *SessionQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Session ID in the query. Returns a *NotSingularError when exactly one Session ID is not found. Returns a *NotFoundError when no entities are found.
func (*SessionQuery) OnlyIDX ¶
func (sq *SessionQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SessionQuery) OnlyX ¶
func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
OnlyX is like Only, but panics if an error occurs.
func (*SessionQuery) Order ¶
func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery
Order adds an order step to the query.
func (*SessionQuery) Select ¶
func (sq *SessionQuery) Select(field string, fields ...string) *SessionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Data string `json:"data,omitempty"` } client.Session.Query(). Select(session.FieldData). Scan(ctx, &v)
func (*SessionQuery) Where ¶
func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
Where adds a new predicate for the SessionQuery builder.
type SessionSelect ¶
type SessionSelect struct { *SessionQuery // contains filtered or unexported fields }
SessionSelect is the builder for selecting fields of Session entities.
func (*SessionSelect) Bool ¶
func (ss *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SessionSelect) BoolX ¶
func (ss *SessionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SessionSelect) Bools ¶
func (ss *SessionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SessionSelect) BoolsX ¶
func (ss *SessionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SessionSelect) Float64 ¶
func (ss *SessionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64X ¶
func (ss *SessionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SessionSelect) Float64s ¶
func (ss *SessionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64sX ¶
func (ss *SessionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SessionSelect) Int ¶
func (ss *SessionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SessionSelect) IntX ¶
func (ss *SessionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SessionSelect) Ints ¶
func (ss *SessionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SessionSelect) IntsX ¶
func (ss *SessionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SessionSelect) Scan ¶
func (ss *SessionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SessionSelect) ScanX ¶
func (ss *SessionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SessionSelect) String ¶
func (ss *SessionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*SessionSelect) StringX ¶
func (ss *SessionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SessionUpdate ¶
type SessionUpdate struct {
// contains filtered or unexported fields
}
SessionUpdate is the builder for updating Session entities.
func (*SessionUpdate) ClearExpiresAt ¶
func (su *SessionUpdate) ClearExpiresAt() *SessionUpdate
ClearExpiresAt clears the value of the "expires_at" field.
func (*SessionUpdate) Exec ¶
func (su *SessionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionUpdate) ExecX ¶
func (su *SessionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdate) Mutation ¶
func (su *SessionUpdate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdate) Save ¶
func (su *SessionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SessionUpdate) SaveX ¶
func (su *SessionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdate) SetData ¶
func (su *SessionUpdate) SetData(s string) *SessionUpdate
SetData sets the "data" field.
func (*SessionUpdate) SetExpiresAt ¶
func (su *SessionUpdate) SetExpiresAt(t time.Time) *SessionUpdate
SetExpiresAt sets the "expires_at" field.
func (*SessionUpdate) SetNillableExpiresAt ¶
func (su *SessionUpdate) SetNillableExpiresAt(t *time.Time) *SessionUpdate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*SessionUpdate) SetUpdatedAt ¶
func (su *SessionUpdate) SetUpdatedAt(t time.Time) *SessionUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SessionUpdate) Where ¶
func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
Where adds a new predicate for the SessionUpdate builder.
type SessionUpdateOne ¶
type SessionUpdateOne struct {
// contains filtered or unexported fields
}
SessionUpdateOne is the builder for updating a single Session entity.
func (*SessionUpdateOne) ClearExpiresAt ¶
func (suo *SessionUpdateOne) ClearExpiresAt() *SessionUpdateOne
ClearExpiresAt clears the value of the "expires_at" field.
func (*SessionUpdateOne) Exec ¶
func (suo *SessionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SessionUpdateOne) ExecX ¶
func (suo *SessionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdateOne) Mutation ¶
func (suo *SessionUpdateOne) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdateOne) Save ¶
func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
Save executes the query and returns the updated Session entity.
func (*SessionUpdateOne) SaveX ¶
func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdateOne) SetData ¶
func (suo *SessionUpdateOne) SetData(s string) *SessionUpdateOne
SetData sets the "data" field.
func (*SessionUpdateOne) SetExpiresAt ¶
func (suo *SessionUpdateOne) SetExpiresAt(t time.Time) *SessionUpdateOne
SetExpiresAt sets the "expires_at" field.
func (*SessionUpdateOne) SetNillableExpiresAt ¶
func (suo *SessionUpdateOne) SetNillableExpiresAt(t *time.Time) *SessionUpdateOne
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*SessionUpdateOne) SetUpdatedAt ¶
func (suo *SessionUpdateOne) SetUpdatedAt(t time.Time) *SessionUpdateOne
SetUpdatedAt sets the "updated_at" field.
type Tx ¶
type Tx struct { // Account is the client for interacting with the Account builders. Account *AccountClient // Session is the client for interacting with the Session builders. Session *SessionClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.