Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type 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) Intercept(interceptors ...Interceptor)
- func (c *AccountClient) Interceptors() []Interceptor
- func (c *AccountClient) MapCreateBulk(slice any, setFunc func(*AccountCreate, int)) *AccountCreateBulk
- func (c *AccountClient) Query() *AccountQuery
- func (c *AccountClient) QueryUsers(a *Account) *UsersQuery
- 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) Exec(ctx context.Context) error
- func (ac *AccountCreate) ExecX(ctx context.Context)
- 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) SetAvatar(s string) *AccountCreate
- func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetDeleted(b bool) *AccountCreate
- func (ac *AccountCreate) SetEmail(s string) *AccountCreate
- func (ac *AccountCreate) SetExternalID(u uuid.UUID) *AccountCreate
- func (ac *AccountCreate) SetFirstName(s string) *AccountCreate
- func (ac *AccountCreate) SetID(u uuid.UUID) *AccountCreate
- func (ac *AccountCreate) SetLastName(s string) *AccountCreate
- func (ac *AccountCreate) SetNillableAvatar(s *string) *AccountCreate
- func (ac *AccountCreate) SetNillableCreatedAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetNillableDeleted(b *bool) *AccountCreate
- func (ac *AccountCreate) SetNillableEmail(s *string) *AccountCreate
- func (ac *AccountCreate) SetNillableFirstName(s *string) *AccountCreate
- func (ac *AccountCreate) SetNillableID(u *uuid.UUID) *AccountCreate
- func (ac *AccountCreate) SetNillableLastName(s *string) *AccountCreate
- func (ac *AccountCreate) SetNillableUpdatedAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetUpdatedAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetUsername(s string) *AccountCreate
- func (ac *AccountCreate) SetUsers(u *Users) *AccountCreate
- func (ac *AccountCreate) SetUsersID(id uuid.UUID) *AccountCreate
- type AccountCreateBulk
- type AccountDelete
- type AccountDeleteOne
- type AccountEdges
- type AccountGroupBy
- func (agb *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy
- func (s *AccountGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountGroupBy) BoolX(ctx context.Context) bool
- func (s *AccountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AccountGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountGroupBy) Float64X(ctx context.Context) float64
- func (s *AccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AccountGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AccountGroupBy) IntX(ctx context.Context) int
- func (s *AccountGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AccountGroupBy) IntsX(ctx context.Context) []int
- func (agb *AccountGroupBy) Scan(ctx context.Context, v any) error
- func (s *AccountGroupBy) ScanX(ctx context.Context, v any)
- func (s *AccountGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AccountGroupBy) StringX(ctx context.Context) string
- func (s *AccountGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *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) Avatar() (r string, exists bool)
- func (m *AccountMutation) AvatarCleared() bool
- func (m *AccountMutation) ClearAvatar()
- func (m *AccountMutation) ClearEdge(name string) error
- func (m *AccountMutation) ClearEmail()
- func (m *AccountMutation) ClearField(name string) error
- func (m *AccountMutation) ClearFirstName()
- func (m *AccountMutation) ClearLastName()
- func (m *AccountMutation) ClearUsers()
- func (m *AccountMutation) ClearedEdges() []string
- func (m *AccountMutation) ClearedFields() []string
- func (m AccountMutation) Client() *Client
- func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AccountMutation) Deleted() (r bool, exists bool)
- func (m *AccountMutation) EdgeCleared(name string) bool
- func (m *AccountMutation) Email() (r string, exists bool)
- func (m *AccountMutation) EmailCleared() bool
- func (m *AccountMutation) ExternalID() (r uuid.UUID, exists 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) FirstName() (r string, exists bool)
- func (m *AccountMutation) FirstNameCleared() bool
- func (m *AccountMutation) ID() (id uuid.UUID, exists bool)
- func (m *AccountMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AccountMutation) LastName() (r string, exists bool)
- func (m *AccountMutation) LastNameCleared() bool
- func (m *AccountMutation) OldAvatar(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccountMutation) OldDeleted(ctx context.Context) (v bool, err error)
- func (m *AccountMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldExternalID(ctx context.Context) (v uuid.UUID, err error)
- func (m *AccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AccountMutation) OldFirstName(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldLastName(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccountMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *AccountMutation) Op() Op
- func (m *AccountMutation) RemovedEdges() []string
- func (m *AccountMutation) RemovedIDs(name string) []ent.Value
- func (m *AccountMutation) ResetAvatar()
- func (m *AccountMutation) ResetCreatedAt()
- func (m *AccountMutation) ResetDeleted()
- func (m *AccountMutation) ResetEdge(name string) error
- func (m *AccountMutation) ResetEmail()
- func (m *AccountMutation) ResetExternalID()
- func (m *AccountMutation) ResetField(name string) error
- func (m *AccountMutation) ResetFirstName()
- func (m *AccountMutation) ResetLastName()
- func (m *AccountMutation) ResetUpdatedAt()
- func (m *AccountMutation) ResetUsername()
- func (m *AccountMutation) ResetUsers()
- func (m *AccountMutation) SetAvatar(s string)
- func (m *AccountMutation) SetCreatedAt(t time.Time)
- func (m *AccountMutation) SetDeleted(b bool)
- func (m *AccountMutation) SetEmail(s string)
- func (m *AccountMutation) SetExternalID(u uuid.UUID)
- func (m *AccountMutation) SetField(name string, value ent.Value) error
- func (m *AccountMutation) SetFirstName(s string)
- func (m *AccountMutation) SetID(id uuid.UUID)
- func (m *AccountMutation) SetLastName(s string)
- func (m *AccountMutation) SetOp(op Op)
- func (m *AccountMutation) SetUpdatedAt(t time.Time)
- func (m *AccountMutation) SetUsername(s string)
- func (m *AccountMutation) SetUsersID(id uuid.UUID)
- func (m AccountMutation) Tx() (*Tx, error)
- func (m *AccountMutation) Type() string
- func (m *AccountMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AccountMutation) Username() (r string, exists bool)
- func (m *AccountMutation) UsersCleared() bool
- func (m *AccountMutation) UsersID() (id uuid.UUID, exists bool)
- func (m *AccountMutation) UsersIDs() (ids []uuid.UUID)
- func (m *AccountMutation) Where(ps ...predicate.Account)
- func (m *AccountMutation) WhereP(ps ...func(*sql.Selector))
- type AccountQuery
- func (aq *AccountQuery) Aggregate(fns ...AggregateFunc) *AccountSelect
- 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) (ids []uuid.UUID, err 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 ...account.OrderOption) *AccountQuery
- func (aq *AccountQuery) QueryUsers() *UsersQuery
- func (aq *AccountQuery) Select(fields ...string) *AccountSelect
- func (aq *AccountQuery) Unique(unique bool) *AccountQuery
- func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
- func (aq *AccountQuery) WithUsers(opts ...func(*UsersQuery)) *AccountQuery
- type AccountSelect
- func (as *AccountSelect) Aggregate(fns ...AggregateFunc) *AccountSelect
- func (s *AccountSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountSelect) BoolX(ctx context.Context) bool
- func (s *AccountSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountSelect) BoolsX(ctx context.Context) []bool
- func (s *AccountSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountSelect) Float64X(ctx context.Context) float64
- func (s *AccountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountSelect) Float64sX(ctx context.Context) []float64
- func (s *AccountSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AccountSelect) IntX(ctx context.Context) int
- func (s *AccountSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AccountSelect) IntsX(ctx context.Context) []int
- func (as *AccountSelect) Scan(ctx context.Context, v any) error
- func (s *AccountSelect) ScanX(ctx context.Context, v any)
- func (s *AccountSelect) String(ctx context.Context) (_ string, err error)
- func (s *AccountSelect) StringX(ctx context.Context) string
- func (s *AccountSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AccountSelect) StringsX(ctx context.Context) []string
- type AccountUpdate
- func (au *AccountUpdate) ClearAvatar() *AccountUpdate
- func (au *AccountUpdate) ClearEmail() *AccountUpdate
- func (au *AccountUpdate) ClearFirstName() *AccountUpdate
- func (au *AccountUpdate) ClearLastName() *AccountUpdate
- func (au *AccountUpdate) ClearUsers() *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) SetAvatar(s string) *AccountUpdate
- func (au *AccountUpdate) SetCreatedAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) SetDeleted(b bool) *AccountUpdate
- func (au *AccountUpdate) SetEmail(s string) *AccountUpdate
- func (au *AccountUpdate) SetExternalID(u uuid.UUID) *AccountUpdate
- func (au *AccountUpdate) SetFirstName(s string) *AccountUpdate
- func (au *AccountUpdate) SetLastName(s string) *AccountUpdate
- func (au *AccountUpdate) SetNillableAvatar(s *string) *AccountUpdate
- func (au *AccountUpdate) SetNillableCreatedAt(t *time.Time) *AccountUpdate
- func (au *AccountUpdate) SetNillableDeleted(b *bool) *AccountUpdate
- func (au *AccountUpdate) SetNillableEmail(s *string) *AccountUpdate
- func (au *AccountUpdate) SetNillableExternalID(u *uuid.UUID) *AccountUpdate
- func (au *AccountUpdate) SetNillableFirstName(s *string) *AccountUpdate
- func (au *AccountUpdate) SetNillableLastName(s *string) *AccountUpdate
- func (au *AccountUpdate) SetNillableUsername(s *string) *AccountUpdate
- func (au *AccountUpdate) SetUpdatedAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) SetUsername(s string) *AccountUpdate
- func (au *AccountUpdate) SetUsers(u *Users) *AccountUpdate
- func (au *AccountUpdate) SetUsersID(id uuid.UUID) *AccountUpdate
- func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
- type AccountUpdateOne
- func (auo *AccountUpdateOne) ClearAvatar() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearEmail() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearFirstName() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearLastName() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearUsers() *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) Select(field string, fields ...string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetAvatar(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetCreatedAt(t time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetDeleted(b bool) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetEmail(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetExternalID(u uuid.UUID) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetFirstName(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetLastName(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableAvatar(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableCreatedAt(t *time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableDeleted(b *bool) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableEmail(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableExternalID(u *uuid.UUID) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableFirstName(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableLastName(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableUsername(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetUpdatedAt(t time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetUsername(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetUsers(u *Users) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetUsersID(id uuid.UUID) *AccountUpdateOne
- func (auo *AccountUpdateOne) Where(ps ...predicate.Account) *AccountUpdateOne
- type Accounts
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type Links
- type LinksClient
- func (c *LinksClient) Create() *LinksCreate
- func (c *LinksClient) CreateBulk(builders ...*LinksCreate) *LinksCreateBulk
- func (c *LinksClient) Delete() *LinksDelete
- func (c *LinksClient) DeleteOne(l *Links) *LinksDeleteOne
- func (c *LinksClient) DeleteOneID(id uuid.UUID) *LinksDeleteOne
- func (c *LinksClient) Get(ctx context.Context, id uuid.UUID) (*Links, error)
- func (c *LinksClient) GetX(ctx context.Context, id uuid.UUID) *Links
- func (c *LinksClient) Hooks() []Hook
- func (c *LinksClient) Intercept(interceptors ...Interceptor)
- func (c *LinksClient) Interceptors() []Interceptor
- func (c *LinksClient) MapCreateBulk(slice any, setFunc func(*LinksCreate, int)) *LinksCreateBulk
- func (c *LinksClient) Query() *LinksQuery
- func (c *LinksClient) QueryUser(l *Links) *UsersQuery
- func (c *LinksClient) Update() *LinksUpdate
- func (c *LinksClient) UpdateOne(l *Links) *LinksUpdateOne
- func (c *LinksClient) UpdateOneID(id uuid.UUID) *LinksUpdateOne
- func (c *LinksClient) Use(hooks ...Hook)
- type LinksCreate
- func (lc *LinksCreate) Exec(ctx context.Context) error
- func (lc *LinksCreate) ExecX(ctx context.Context)
- func (lc *LinksCreate) Mutation() *LinksMutation
- func (lc *LinksCreate) Save(ctx context.Context) (*Links, error)
- func (lc *LinksCreate) SaveX(ctx context.Context) *Links
- func (lc *LinksCreate) SetCreatedAt(t time.Time) *LinksCreate
- func (lc *LinksCreate) SetDeleted(b bool) *LinksCreate
- func (lc *LinksCreate) SetDescription(s string) *LinksCreate
- func (lc *LinksCreate) SetID(u uuid.UUID) *LinksCreate
- func (lc *LinksCreate) SetImage(s string) *LinksCreate
- func (lc *LinksCreate) SetNillableCreatedAt(t *time.Time) *LinksCreate
- func (lc *LinksCreate) SetNillableDeleted(b *bool) *LinksCreate
- func (lc *LinksCreate) SetNillableDescription(s *string) *LinksCreate
- func (lc *LinksCreate) SetNillableID(u *uuid.UUID) *LinksCreate
- func (lc *LinksCreate) SetNillableImage(s *string) *LinksCreate
- func (lc *LinksCreate) SetNillableOrder(i *int) *LinksCreate
- func (lc *LinksCreate) SetNillableUpdatedAt(t *time.Time) *LinksCreate
- func (lc *LinksCreate) SetOrder(i int) *LinksCreate
- func (lc *LinksCreate) SetTitle(s string) *LinksCreate
- func (lc *LinksCreate) SetURL(s string) *LinksCreate
- func (lc *LinksCreate) SetUpdatedAt(t time.Time) *LinksCreate
- func (lc *LinksCreate) SetUser(u *Users) *LinksCreate
- func (lc *LinksCreate) SetUserID(u uuid.UUID) *LinksCreate
- type LinksCreateBulk
- type LinksDelete
- type LinksDeleteOne
- type LinksEdges
- type LinksGroupBy
- func (lgb *LinksGroupBy) Aggregate(fns ...AggregateFunc) *LinksGroupBy
- func (s *LinksGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LinksGroupBy) BoolX(ctx context.Context) bool
- func (s *LinksGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LinksGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LinksGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LinksGroupBy) Float64X(ctx context.Context) float64
- func (s *LinksGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LinksGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LinksGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LinksGroupBy) IntX(ctx context.Context) int
- func (s *LinksGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LinksGroupBy) IntsX(ctx context.Context) []int
- func (lgb *LinksGroupBy) Scan(ctx context.Context, v any) error
- func (s *LinksGroupBy) ScanX(ctx context.Context, v any)
- func (s *LinksGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LinksGroupBy) StringX(ctx context.Context) string
- func (s *LinksGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LinksGroupBy) StringsX(ctx context.Context) []string
- type LinksMutation
- func (m *LinksMutation) AddField(name string, value ent.Value) error
- func (m *LinksMutation) AddOrder(i int)
- func (m *LinksMutation) AddedEdges() []string
- func (m *LinksMutation) AddedField(name string) (ent.Value, bool)
- func (m *LinksMutation) AddedFields() []string
- func (m *LinksMutation) AddedIDs(name string) []ent.Value
- func (m *LinksMutation) AddedOrder() (r int, exists bool)
- func (m *LinksMutation) ClearDescription()
- func (m *LinksMutation) ClearEdge(name string) error
- func (m *LinksMutation) ClearField(name string) error
- func (m *LinksMutation) ClearImage()
- func (m *LinksMutation) ClearUser()
- func (m *LinksMutation) ClearedEdges() []string
- func (m *LinksMutation) ClearedFields() []string
- func (m LinksMutation) Client() *Client
- func (m *LinksMutation) CreatedAt() (r time.Time, exists bool)
- func (m *LinksMutation) Deleted() (r bool, exists bool)
- func (m *LinksMutation) Description() (r string, exists bool)
- func (m *LinksMutation) DescriptionCleared() bool
- func (m *LinksMutation) EdgeCleared(name string) bool
- func (m *LinksMutation) Field(name string) (ent.Value, bool)
- func (m *LinksMutation) FieldCleared(name string) bool
- func (m *LinksMutation) Fields() []string
- func (m *LinksMutation) ID() (id uuid.UUID, exists bool)
- func (m *LinksMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *LinksMutation) Image() (r string, exists bool)
- func (m *LinksMutation) ImageCleared() bool
- func (m *LinksMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LinksMutation) OldDeleted(ctx context.Context) (v bool, err error)
- func (m *LinksMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *LinksMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LinksMutation) OldImage(ctx context.Context) (v string, err error)
- func (m *LinksMutation) OldOrder(ctx context.Context) (v int, err error)
- func (m *LinksMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *LinksMutation) OldURL(ctx context.Context) (v string, err error)
- func (m *LinksMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LinksMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *LinksMutation) Op() Op
- func (m *LinksMutation) Order() (r int, exists bool)
- func (m *LinksMutation) RemovedEdges() []string
- func (m *LinksMutation) RemovedIDs(name string) []ent.Value
- func (m *LinksMutation) ResetCreatedAt()
- func (m *LinksMutation) ResetDeleted()
- func (m *LinksMutation) ResetDescription()
- func (m *LinksMutation) ResetEdge(name string) error
- func (m *LinksMutation) ResetField(name string) error
- func (m *LinksMutation) ResetImage()
- func (m *LinksMutation) ResetOrder()
- func (m *LinksMutation) ResetTitle()
- func (m *LinksMutation) ResetURL()
- func (m *LinksMutation) ResetUpdatedAt()
- func (m *LinksMutation) ResetUser()
- func (m *LinksMutation) ResetUserID()
- func (m *LinksMutation) SetCreatedAt(t time.Time)
- func (m *LinksMutation) SetDeleted(b bool)
- func (m *LinksMutation) SetDescription(s string)
- func (m *LinksMutation) SetField(name string, value ent.Value) error
- func (m *LinksMutation) SetID(id uuid.UUID)
- func (m *LinksMutation) SetImage(s string)
- func (m *LinksMutation) SetOp(op Op)
- func (m *LinksMutation) SetOrder(i int)
- func (m *LinksMutation) SetTitle(s string)
- func (m *LinksMutation) SetURL(s string)
- func (m *LinksMutation) SetUpdatedAt(t time.Time)
- func (m *LinksMutation) SetUserID(u uuid.UUID)
- func (m *LinksMutation) Title() (r string, exists bool)
- func (m LinksMutation) Tx() (*Tx, error)
- func (m *LinksMutation) Type() string
- func (m *LinksMutation) URL() (r string, exists bool)
- func (m *LinksMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *LinksMutation) UserCleared() bool
- func (m *LinksMutation) UserID() (r uuid.UUID, exists bool)
- func (m *LinksMutation) UserIDs() (ids []uuid.UUID)
- func (m *LinksMutation) Where(ps ...predicate.Links)
- func (m *LinksMutation) WhereP(ps ...func(*sql.Selector))
- type LinksQuery
- func (lq *LinksQuery) Aggregate(fns ...AggregateFunc) *LinksSelect
- func (lq *LinksQuery) All(ctx context.Context) ([]*Links, error)
- func (lq *LinksQuery) AllX(ctx context.Context) []*Links
- func (lq *LinksQuery) Clone() *LinksQuery
- func (lq *LinksQuery) Count(ctx context.Context) (int, error)
- func (lq *LinksQuery) CountX(ctx context.Context) int
- func (lq *LinksQuery) Exist(ctx context.Context) (bool, error)
- func (lq *LinksQuery) ExistX(ctx context.Context) bool
- func (lq *LinksQuery) First(ctx context.Context) (*Links, error)
- func (lq *LinksQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (lq *LinksQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (lq *LinksQuery) FirstX(ctx context.Context) *Links
- func (lq *LinksQuery) GroupBy(field string, fields ...string) *LinksGroupBy
- func (lq *LinksQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (lq *LinksQuery) IDsX(ctx context.Context) []uuid.UUID
- func (lq *LinksQuery) Limit(limit int) *LinksQuery
- func (lq *LinksQuery) Offset(offset int) *LinksQuery
- func (lq *LinksQuery) Only(ctx context.Context) (*Links, error)
- func (lq *LinksQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (lq *LinksQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (lq *LinksQuery) OnlyX(ctx context.Context) *Links
- func (lq *LinksQuery) Order(o ...links.OrderOption) *LinksQuery
- func (lq *LinksQuery) QueryUser() *UsersQuery
- func (lq *LinksQuery) Select(fields ...string) *LinksSelect
- func (lq *LinksQuery) Unique(unique bool) *LinksQuery
- func (lq *LinksQuery) Where(ps ...predicate.Links) *LinksQuery
- func (lq *LinksQuery) WithUser(opts ...func(*UsersQuery)) *LinksQuery
- type LinksSelect
- func (ls *LinksSelect) Aggregate(fns ...AggregateFunc) *LinksSelect
- func (s *LinksSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LinksSelect) BoolX(ctx context.Context) bool
- func (s *LinksSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LinksSelect) BoolsX(ctx context.Context) []bool
- func (s *LinksSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LinksSelect) Float64X(ctx context.Context) float64
- func (s *LinksSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LinksSelect) Float64sX(ctx context.Context) []float64
- func (s *LinksSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LinksSelect) IntX(ctx context.Context) int
- func (s *LinksSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LinksSelect) IntsX(ctx context.Context) []int
- func (ls *LinksSelect) Scan(ctx context.Context, v any) error
- func (s *LinksSelect) ScanX(ctx context.Context, v any)
- func (s *LinksSelect) String(ctx context.Context) (_ string, err error)
- func (s *LinksSelect) StringX(ctx context.Context) string
- func (s *LinksSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LinksSelect) StringsX(ctx context.Context) []string
- type LinksSlice
- type LinksUpdate
- func (lu *LinksUpdate) AddOrder(i int) *LinksUpdate
- func (lu *LinksUpdate) ClearDescription() *LinksUpdate
- func (lu *LinksUpdate) ClearImage() *LinksUpdate
- func (lu *LinksUpdate) ClearUser() *LinksUpdate
- func (lu *LinksUpdate) Exec(ctx context.Context) error
- func (lu *LinksUpdate) ExecX(ctx context.Context)
- func (lu *LinksUpdate) Mutation() *LinksMutation
- func (lu *LinksUpdate) Save(ctx context.Context) (int, error)
- func (lu *LinksUpdate) SaveX(ctx context.Context) int
- func (lu *LinksUpdate) SetCreatedAt(t time.Time) *LinksUpdate
- func (lu *LinksUpdate) SetDeleted(b bool) *LinksUpdate
- func (lu *LinksUpdate) SetDescription(s string) *LinksUpdate
- func (lu *LinksUpdate) SetImage(s string) *LinksUpdate
- func (lu *LinksUpdate) SetNillableCreatedAt(t *time.Time) *LinksUpdate
- func (lu *LinksUpdate) SetNillableDeleted(b *bool) *LinksUpdate
- func (lu *LinksUpdate) SetNillableDescription(s *string) *LinksUpdate
- func (lu *LinksUpdate) SetNillableImage(s *string) *LinksUpdate
- func (lu *LinksUpdate) SetNillableOrder(i *int) *LinksUpdate
- func (lu *LinksUpdate) SetNillableTitle(s *string) *LinksUpdate
- func (lu *LinksUpdate) SetNillableURL(s *string) *LinksUpdate
- func (lu *LinksUpdate) SetNillableUserID(u *uuid.UUID) *LinksUpdate
- func (lu *LinksUpdate) SetOrder(i int) *LinksUpdate
- func (lu *LinksUpdate) SetTitle(s string) *LinksUpdate
- func (lu *LinksUpdate) SetURL(s string) *LinksUpdate
- func (lu *LinksUpdate) SetUpdatedAt(t time.Time) *LinksUpdate
- func (lu *LinksUpdate) SetUser(u *Users) *LinksUpdate
- func (lu *LinksUpdate) SetUserID(u uuid.UUID) *LinksUpdate
- func (lu *LinksUpdate) Where(ps ...predicate.Links) *LinksUpdate
- type LinksUpdateOne
- func (luo *LinksUpdateOne) AddOrder(i int) *LinksUpdateOne
- func (luo *LinksUpdateOne) ClearDescription() *LinksUpdateOne
- func (luo *LinksUpdateOne) ClearImage() *LinksUpdateOne
- func (luo *LinksUpdateOne) ClearUser() *LinksUpdateOne
- func (luo *LinksUpdateOne) Exec(ctx context.Context) error
- func (luo *LinksUpdateOne) ExecX(ctx context.Context)
- func (luo *LinksUpdateOne) Mutation() *LinksMutation
- func (luo *LinksUpdateOne) Save(ctx context.Context) (*Links, error)
- func (luo *LinksUpdateOne) SaveX(ctx context.Context) *Links
- func (luo *LinksUpdateOne) Select(field string, fields ...string) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetCreatedAt(t time.Time) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetDeleted(b bool) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetDescription(s string) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetImage(s string) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetNillableCreatedAt(t *time.Time) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetNillableDeleted(b *bool) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetNillableDescription(s *string) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetNillableImage(s *string) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetNillableOrder(i *int) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetNillableTitle(s *string) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetNillableURL(s *string) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetNillableUserID(u *uuid.UUID) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetOrder(i int) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetTitle(s string) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetURL(s string) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetUpdatedAt(t time.Time) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetUser(u *Users) *LinksUpdateOne
- func (luo *LinksUpdateOne) SetUserID(u uuid.UUID) *LinksUpdateOne
- func (luo *LinksUpdateOne) Where(ps ...predicate.Links) *LinksUpdateOne
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- 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 uuid.UUID) *SessionDeleteOne
- func (c *SessionClient) Get(ctx context.Context, id uuid.UUID) (*Session, error)
- func (c *SessionClient) GetX(ctx context.Context, id uuid.UUID) *Session
- func (c *SessionClient) Hooks() []Hook
- func (c *SessionClient) Intercept(interceptors ...Interceptor)
- func (c *SessionClient) Interceptors() []Interceptor
- func (c *SessionClient) MapCreateBulk(slice any, setFunc func(*SessionCreate, int)) *SessionCreateBulk
- func (c *SessionClient) Query() *SessionQuery
- func (c *SessionClient) QueryUser(s *Session) *UsersQuery
- func (c *SessionClient) Update() *SessionUpdate
- func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne
- func (c *SessionClient) UpdateOneID(id uuid.UUID) *SessionUpdateOne
- func (c *SessionClient) Use(hooks ...Hook)
- type SessionCreate
- func (sc *SessionCreate) Exec(ctx context.Context) error
- func (sc *SessionCreate) ExecX(ctx context.Context)
- 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) SetDeleted(b bool) *SessionCreate
- func (sc *SessionCreate) SetExpiresAt(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetID(u uuid.UUID) *SessionCreate
- func (sc *SessionCreate) SetNillableCreatedAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetNillableDeleted(b *bool) *SessionCreate
- func (sc *SessionCreate) SetNillableID(u *uuid.UUID) *SessionCreate
- func (sc *SessionCreate) SetNillableUpdatedAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetSessionToken(s string) *SessionCreate
- func (sc *SessionCreate) SetUpdatedAt(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetUser(u *Users) *SessionCreate
- func (sc *SessionCreate) SetUserID(u uuid.UUID) *SessionCreate
- type SessionCreateBulk
- type SessionDelete
- type SessionDeleteOne
- type SessionEdges
- type SessionGroupBy
- func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
- func (s *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SessionGroupBy) BoolX(ctx context.Context) bool
- func (s *SessionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SessionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SessionGroupBy) Float64X(ctx context.Context) float64
- func (s *SessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SessionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SessionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SessionGroupBy) IntX(ctx context.Context) int
- func (s *SessionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SessionGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SessionGroupBy) Scan(ctx context.Context, v any) error
- func (s *SessionGroupBy) ScanX(ctx context.Context, v any)
- func (s *SessionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SessionGroupBy) StringX(ctx context.Context) string
- func (s *SessionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *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) ClearField(name string) error
- func (m *SessionMutation) ClearUser()
- 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) Deleted() (r bool, exists bool)
- func (m *SessionMutation) EdgeCleared(name string) bool
- func (m *SessionMutation) ExpiresAt() (r time.Time, exists 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 uuid.UUID, exists bool)
- func (m *SessionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *SessionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) OldDeleted(ctx context.Context) (v bool, 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) OldSessionToken(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) OldUserID(ctx context.Context) (v uuid.UUID, 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) ResetDeleted()
- func (m *SessionMutation) ResetEdge(name string) error
- func (m *SessionMutation) ResetExpiresAt()
- func (m *SessionMutation) ResetField(name string) error
- func (m *SessionMutation) ResetSessionToken()
- func (m *SessionMutation) ResetUpdatedAt()
- func (m *SessionMutation) ResetUser()
- func (m *SessionMutation) ResetUserID()
- func (m *SessionMutation) SessionToken() (r string, exists bool)
- func (m *SessionMutation) SetCreatedAt(t time.Time)
- func (m *SessionMutation) SetDeleted(b bool)
- func (m *SessionMutation) SetExpiresAt(t time.Time)
- func (m *SessionMutation) SetField(name string, value ent.Value) error
- func (m *SessionMutation) SetID(id uuid.UUID)
- func (m *SessionMutation) SetOp(op Op)
- func (m *SessionMutation) SetSessionToken(s string)
- func (m *SessionMutation) SetUpdatedAt(t time.Time)
- func (m *SessionMutation) SetUserID(u uuid.UUID)
- func (m SessionMutation) Tx() (*Tx, error)
- func (m *SessionMutation) Type() string
- func (m *SessionMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SessionMutation) UserCleared() bool
- func (m *SessionMutation) UserID() (r uuid.UUID, exists bool)
- func (m *SessionMutation) UserIDs() (ids []uuid.UUID)
- func (m *SessionMutation) Where(ps ...predicate.Session)
- func (m *SessionMutation) WhereP(ps ...func(*sql.Selector))
- type SessionQuery
- func (sq *SessionQuery) Aggregate(fns ...AggregateFunc) *SessionSelect
- 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 uuid.UUID, err error)
- func (sq *SessionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sq *SessionQuery) FirstX(ctx context.Context) *Session
- func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
- func (sq *SessionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (sq *SessionQuery) IDsX(ctx context.Context) []uuid.UUID
- 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 uuid.UUID, err error)
- func (sq *SessionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
- func (sq *SessionQuery) Order(o ...session.OrderOption) *SessionQuery
- func (sq *SessionQuery) QueryUser() *UsersQuery
- func (sq *SessionQuery) Select(fields ...string) *SessionSelect
- func (sq *SessionQuery) Unique(unique bool) *SessionQuery
- func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
- func (sq *SessionQuery) WithUser(opts ...func(*UsersQuery)) *SessionQuery
- type SessionSelect
- func (ss *SessionSelect) Aggregate(fns ...AggregateFunc) *SessionSelect
- func (s *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SessionSelect) BoolX(ctx context.Context) bool
- func (s *SessionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SessionSelect) BoolsX(ctx context.Context) []bool
- func (s *SessionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SessionSelect) Float64X(ctx context.Context) float64
- func (s *SessionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SessionSelect) Float64sX(ctx context.Context) []float64
- func (s *SessionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SessionSelect) IntX(ctx context.Context) int
- func (s *SessionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SessionSelect) IntsX(ctx context.Context) []int
- func (ss *SessionSelect) Scan(ctx context.Context, v any) error
- func (s *SessionSelect) ScanX(ctx context.Context, v any)
- func (s *SessionSelect) String(ctx context.Context) (_ string, err error)
- func (s *SessionSelect) StringX(ctx context.Context) string
- func (s *SessionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SessionSelect) StringsX(ctx context.Context) []string
- type SessionUpdate
- func (su *SessionUpdate) ClearUser() *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) SetCreatedAt(t time.Time) *SessionUpdate
- func (su *SessionUpdate) SetDeleted(b bool) *SessionUpdate
- func (su *SessionUpdate) SetExpiresAt(t time.Time) *SessionUpdate
- func (su *SessionUpdate) SetNillableCreatedAt(t *time.Time) *SessionUpdate
- func (su *SessionUpdate) SetNillableDeleted(b *bool) *SessionUpdate
- func (su *SessionUpdate) SetNillableExpiresAt(t *time.Time) *SessionUpdate
- func (su *SessionUpdate) SetNillableSessionToken(s *string) *SessionUpdate
- func (su *SessionUpdate) SetNillableUserID(u *uuid.UUID) *SessionUpdate
- func (su *SessionUpdate) SetSessionToken(s string) *SessionUpdate
- func (su *SessionUpdate) SetUpdatedAt(t time.Time) *SessionUpdate
- func (su *SessionUpdate) SetUser(u *Users) *SessionUpdate
- func (su *SessionUpdate) SetUserID(u uuid.UUID) *SessionUpdate
- func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
- type SessionUpdateOne
- func (suo *SessionUpdateOne) ClearUser() *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) Select(field string, fields ...string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetCreatedAt(t time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetDeleted(b bool) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetExpiresAt(t time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableCreatedAt(t *time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableDeleted(b *bool) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableExpiresAt(t *time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableSessionToken(s *string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableUserID(u *uuid.UUID) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetSessionToken(s string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetUpdatedAt(t time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetUser(u *Users) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetUserID(u uuid.UUID) *SessionUpdateOne
- func (suo *SessionUpdateOne) Where(ps ...predicate.Session) *SessionUpdateOne
- type Sessions
- type TraverseFunc
- type Traverser
- type Tx
- type Users
- func (u *Users) QueryUsersAccounts() *AccountQuery
- func (u *Users) QueryUsersLinks() *LinksQuery
- func (u *Users) QueryUsersSessions() *SessionQuery
- func (u *Users) String() string
- func (u *Users) Unwrap() *Users
- func (u *Users) Update() *UsersUpdateOne
- func (u *Users) Value(name string) (ent.Value, error)
- type UsersClient
- func (c *UsersClient) Create() *UsersCreate
- func (c *UsersClient) CreateBulk(builders ...*UsersCreate) *UsersCreateBulk
- func (c *UsersClient) Delete() *UsersDelete
- func (c *UsersClient) DeleteOne(u *Users) *UsersDeleteOne
- func (c *UsersClient) DeleteOneID(id uuid.UUID) *UsersDeleteOne
- func (c *UsersClient) Get(ctx context.Context, id uuid.UUID) (*Users, error)
- func (c *UsersClient) GetX(ctx context.Context, id uuid.UUID) *Users
- func (c *UsersClient) Hooks() []Hook
- func (c *UsersClient) Intercept(interceptors ...Interceptor)
- func (c *UsersClient) Interceptors() []Interceptor
- func (c *UsersClient) MapCreateBulk(slice any, setFunc func(*UsersCreate, int)) *UsersCreateBulk
- func (c *UsersClient) Query() *UsersQuery
- func (c *UsersClient) QueryUsersAccounts(u *Users) *AccountQuery
- func (c *UsersClient) QueryUsersLinks(u *Users) *LinksQuery
- func (c *UsersClient) QueryUsersSessions(u *Users) *SessionQuery
- func (c *UsersClient) Update() *UsersUpdate
- func (c *UsersClient) UpdateOne(u *Users) *UsersUpdateOne
- func (c *UsersClient) UpdateOneID(id uuid.UUID) *UsersUpdateOne
- func (c *UsersClient) Use(hooks ...Hook)
- type UsersCreate
- func (uc *UsersCreate) AddUsersAccountIDs(ids ...uuid.UUID) *UsersCreate
- func (uc *UsersCreate) AddUsersAccounts(a ...*Account) *UsersCreate
- func (uc *UsersCreate) AddUsersLinkIDs(ids ...uuid.UUID) *UsersCreate
- func (uc *UsersCreate) AddUsersLinks(l ...*Links) *UsersCreate
- func (uc *UsersCreate) AddUsersSessionIDs(ids ...uuid.UUID) *UsersCreate
- func (uc *UsersCreate) AddUsersSessions(s ...*Session) *UsersCreate
- func (uc *UsersCreate) Exec(ctx context.Context) error
- func (uc *UsersCreate) ExecX(ctx context.Context)
- func (uc *UsersCreate) Mutation() *UsersMutation
- func (uc *UsersCreate) Save(ctx context.Context) (*Users, error)
- func (uc *UsersCreate) SaveX(ctx context.Context) *Users
- func (uc *UsersCreate) SetAccessToken(s string) *UsersCreate
- func (uc *UsersCreate) SetAvatar(s string) *UsersCreate
- func (uc *UsersCreate) SetCreatedAt(t time.Time) *UsersCreate
- func (uc *UsersCreate) SetDeleted(b bool) *UsersCreate
- func (uc *UsersCreate) SetDescription(s string) *UsersCreate
- func (uc *UsersCreate) SetExpiresIn(f float64) *UsersCreate
- func (uc *UsersCreate) SetExternalID(s string) *UsersCreate
- func (uc *UsersCreate) SetGlobalName(s string) *UsersCreate
- func (uc *UsersCreate) SetID(u uuid.UUID) *UsersCreate
- func (uc *UsersCreate) SetNillableAccessToken(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillableAvatar(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillableCreatedAt(t *time.Time) *UsersCreate
- func (uc *UsersCreate) SetNillableDeleted(b *bool) *UsersCreate
- func (uc *UsersCreate) SetNillableDescription(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillableExpiresIn(f *float64) *UsersCreate
- func (uc *UsersCreate) SetNillableID(u *uuid.UUID) *UsersCreate
- func (uc *UsersCreate) SetNillableRefreshToken(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillableScope(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillableSessionState(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillableUpdatedAt(t *time.Time) *UsersCreate
- func (uc *UsersCreate) SetRefreshToken(s string) *UsersCreate
- func (uc *UsersCreate) SetScope(s string) *UsersCreate
- func (uc *UsersCreate) SetSessionState(s string) *UsersCreate
- func (uc *UsersCreate) SetSlug(s string) *UsersCreate
- func (uc *UsersCreate) SetUpdatedAt(t time.Time) *UsersCreate
- func (uc *UsersCreate) SetUsername(s string) *UsersCreate
- type UsersCreateBulk
- type UsersDelete
- type UsersDeleteOne
- type UsersEdges
- type UsersGroupBy
- func (ugb *UsersGroupBy) Aggregate(fns ...AggregateFunc) *UsersGroupBy
- func (s *UsersGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UsersGroupBy) BoolX(ctx context.Context) bool
- func (s *UsersGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UsersGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UsersGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UsersGroupBy) Float64X(ctx context.Context) float64
- func (s *UsersGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UsersGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UsersGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UsersGroupBy) IntX(ctx context.Context) int
- func (s *UsersGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UsersGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UsersGroupBy) Scan(ctx context.Context, v any) error
- func (s *UsersGroupBy) ScanX(ctx context.Context, v any)
- func (s *UsersGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UsersGroupBy) StringX(ctx context.Context) string
- func (s *UsersGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UsersGroupBy) StringsX(ctx context.Context) []string
- type UsersMutation
- func (m *UsersMutation) AccessToken() (r string, exists bool)
- func (m *UsersMutation) AccessTokenCleared() bool
- func (m *UsersMutation) AddExpiresIn(f float64)
- func (m *UsersMutation) AddField(name string, value ent.Value) error
- func (m *UsersMutation) AddUsersAccountIDs(ids ...uuid.UUID)
- func (m *UsersMutation) AddUsersLinkIDs(ids ...uuid.UUID)
- func (m *UsersMutation) AddUsersSessionIDs(ids ...uuid.UUID)
- func (m *UsersMutation) AddedEdges() []string
- func (m *UsersMutation) AddedExpiresIn() (r float64, exists bool)
- func (m *UsersMutation) AddedField(name string) (ent.Value, bool)
- func (m *UsersMutation) AddedFields() []string
- func (m *UsersMutation) AddedIDs(name string) []ent.Value
- func (m *UsersMutation) Avatar() (r string, exists bool)
- func (m *UsersMutation) AvatarCleared() bool
- func (m *UsersMutation) ClearAccessToken()
- func (m *UsersMutation) ClearAvatar()
- func (m *UsersMutation) ClearDescription()
- func (m *UsersMutation) ClearEdge(name string) error
- func (m *UsersMutation) ClearExpiresIn()
- func (m *UsersMutation) ClearField(name string) error
- func (m *UsersMutation) ClearRefreshToken()
- func (m *UsersMutation) ClearScope()
- func (m *UsersMutation) ClearSessionState()
- func (m *UsersMutation) ClearUsersAccounts()
- func (m *UsersMutation) ClearUsersLinks()
- func (m *UsersMutation) ClearUsersSessions()
- func (m *UsersMutation) ClearedEdges() []string
- func (m *UsersMutation) ClearedFields() []string
- func (m UsersMutation) Client() *Client
- func (m *UsersMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UsersMutation) Deleted() (r bool, exists bool)
- func (m *UsersMutation) Description() (r string, exists bool)
- func (m *UsersMutation) DescriptionCleared() bool
- func (m *UsersMutation) EdgeCleared(name string) bool
- func (m *UsersMutation) ExpiresIn() (r float64, exists bool)
- func (m *UsersMutation) ExpiresInCleared() bool
- func (m *UsersMutation) ExternalID() (r string, exists bool)
- func (m *UsersMutation) Field(name string) (ent.Value, bool)
- func (m *UsersMutation) FieldCleared(name string) bool
- func (m *UsersMutation) Fields() []string
- func (m *UsersMutation) GlobalName() (r string, exists bool)
- func (m *UsersMutation) ID() (id uuid.UUID, exists bool)
- func (m *UsersMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UsersMutation) OldAccessToken(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldAvatar(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UsersMutation) OldDeleted(ctx context.Context) (v bool, err error)
- func (m *UsersMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldExpiresIn(ctx context.Context) (v float64, err error)
- func (m *UsersMutation) OldExternalID(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UsersMutation) OldGlobalName(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldRefreshToken(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldScope(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldSessionState(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldSlug(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UsersMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UsersMutation) Op() Op
- func (m *UsersMutation) RefreshToken() (r string, exists bool)
- func (m *UsersMutation) RefreshTokenCleared() bool
- func (m *UsersMutation) RemoveUsersAccountIDs(ids ...uuid.UUID)
- func (m *UsersMutation) RemoveUsersLinkIDs(ids ...uuid.UUID)
- func (m *UsersMutation) RemoveUsersSessionIDs(ids ...uuid.UUID)
- func (m *UsersMutation) RemovedEdges() []string
- func (m *UsersMutation) RemovedIDs(name string) []ent.Value
- func (m *UsersMutation) RemovedUsersAccountsIDs() (ids []uuid.UUID)
- func (m *UsersMutation) RemovedUsersLinksIDs() (ids []uuid.UUID)
- func (m *UsersMutation) RemovedUsersSessionsIDs() (ids []uuid.UUID)
- func (m *UsersMutation) ResetAccessToken()
- func (m *UsersMutation) ResetAvatar()
- func (m *UsersMutation) ResetCreatedAt()
- func (m *UsersMutation) ResetDeleted()
- func (m *UsersMutation) ResetDescription()
- func (m *UsersMutation) ResetEdge(name string) error
- func (m *UsersMutation) ResetExpiresIn()
- func (m *UsersMutation) ResetExternalID()
- func (m *UsersMutation) ResetField(name string) error
- func (m *UsersMutation) ResetGlobalName()
- func (m *UsersMutation) ResetRefreshToken()
- func (m *UsersMutation) ResetScope()
- func (m *UsersMutation) ResetSessionState()
- func (m *UsersMutation) ResetSlug()
- func (m *UsersMutation) ResetUpdatedAt()
- func (m *UsersMutation) ResetUsername()
- func (m *UsersMutation) ResetUsersAccounts()
- func (m *UsersMutation) ResetUsersLinks()
- func (m *UsersMutation) ResetUsersSessions()
- func (m *UsersMutation) Scope() (r string, exists bool)
- func (m *UsersMutation) ScopeCleared() bool
- func (m *UsersMutation) SessionState() (r string, exists bool)
- func (m *UsersMutation) SessionStateCleared() bool
- func (m *UsersMutation) SetAccessToken(s string)
- func (m *UsersMutation) SetAvatar(s string)
- func (m *UsersMutation) SetCreatedAt(t time.Time)
- func (m *UsersMutation) SetDeleted(b bool)
- func (m *UsersMutation) SetDescription(s string)
- func (m *UsersMutation) SetExpiresIn(f float64)
- func (m *UsersMutation) SetExternalID(s string)
- func (m *UsersMutation) SetField(name string, value ent.Value) error
- func (m *UsersMutation) SetGlobalName(s string)
- func (m *UsersMutation) SetID(id uuid.UUID)
- func (m *UsersMutation) SetOp(op Op)
- func (m *UsersMutation) SetRefreshToken(s string)
- func (m *UsersMutation) SetScope(s string)
- func (m *UsersMutation) SetSessionState(s string)
- func (m *UsersMutation) SetSlug(s string)
- func (m *UsersMutation) SetUpdatedAt(t time.Time)
- func (m *UsersMutation) SetUsername(s string)
- func (m *UsersMutation) Slug() (r string, exists bool)
- func (m UsersMutation) Tx() (*Tx, error)
- func (m *UsersMutation) Type() string
- func (m *UsersMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UsersMutation) Username() (r string, exists bool)
- func (m *UsersMutation) UsersAccountsCleared() bool
- func (m *UsersMutation) UsersAccountsIDs() (ids []uuid.UUID)
- func (m *UsersMutation) UsersLinksCleared() bool
- func (m *UsersMutation) UsersLinksIDs() (ids []uuid.UUID)
- func (m *UsersMutation) UsersSessionsCleared() bool
- func (m *UsersMutation) UsersSessionsIDs() (ids []uuid.UUID)
- func (m *UsersMutation) Where(ps ...predicate.Users)
- func (m *UsersMutation) WhereP(ps ...func(*sql.Selector))
- type UsersQuery
- func (uq *UsersQuery) Aggregate(fns ...AggregateFunc) *UsersSelect
- func (uq *UsersQuery) All(ctx context.Context) ([]*Users, error)
- func (uq *UsersQuery) AllX(ctx context.Context) []*Users
- func (uq *UsersQuery) Clone() *UsersQuery
- func (uq *UsersQuery) Count(ctx context.Context) (int, error)
- func (uq *UsersQuery) CountX(ctx context.Context) int
- func (uq *UsersQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UsersQuery) ExistX(ctx context.Context) bool
- func (uq *UsersQuery) First(ctx context.Context) (*Users, error)
- func (uq *UsersQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UsersQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UsersQuery) FirstX(ctx context.Context) *Users
- func (uq *UsersQuery) GroupBy(field string, fields ...string) *UsersGroupBy
- func (uq *UsersQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (uq *UsersQuery) IDsX(ctx context.Context) []uuid.UUID
- func (uq *UsersQuery) Limit(limit int) *UsersQuery
- func (uq *UsersQuery) Offset(offset int) *UsersQuery
- func (uq *UsersQuery) Only(ctx context.Context) (*Users, error)
- func (uq *UsersQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UsersQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UsersQuery) OnlyX(ctx context.Context) *Users
- func (uq *UsersQuery) Order(o ...users.OrderOption) *UsersQuery
- func (uq *UsersQuery) QueryUsersAccounts() *AccountQuery
- func (uq *UsersQuery) QueryUsersLinks() *LinksQuery
- func (uq *UsersQuery) QueryUsersSessions() *SessionQuery
- func (uq *UsersQuery) Select(fields ...string) *UsersSelect
- func (uq *UsersQuery) Unique(unique bool) *UsersQuery
- func (uq *UsersQuery) Where(ps ...predicate.Users) *UsersQuery
- func (uq *UsersQuery) WithUsersAccounts(opts ...func(*AccountQuery)) *UsersQuery
- func (uq *UsersQuery) WithUsersLinks(opts ...func(*LinksQuery)) *UsersQuery
- func (uq *UsersQuery) WithUsersSessions(opts ...func(*SessionQuery)) *UsersQuery
- type UsersSelect
- func (us *UsersSelect) Aggregate(fns ...AggregateFunc) *UsersSelect
- func (s *UsersSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UsersSelect) BoolX(ctx context.Context) bool
- func (s *UsersSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UsersSelect) BoolsX(ctx context.Context) []bool
- func (s *UsersSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UsersSelect) Float64X(ctx context.Context) float64
- func (s *UsersSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UsersSelect) Float64sX(ctx context.Context) []float64
- func (s *UsersSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UsersSelect) IntX(ctx context.Context) int
- func (s *UsersSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UsersSelect) IntsX(ctx context.Context) []int
- func (us *UsersSelect) Scan(ctx context.Context, v any) error
- func (s *UsersSelect) ScanX(ctx context.Context, v any)
- func (s *UsersSelect) String(ctx context.Context) (_ string, err error)
- func (s *UsersSelect) StringX(ctx context.Context) string
- func (s *UsersSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UsersSelect) StringsX(ctx context.Context) []string
- type UsersSlice
- type UsersUpdate
- func (uu *UsersUpdate) AddExpiresIn(f float64) *UsersUpdate
- func (uu *UsersUpdate) AddUsersAccountIDs(ids ...uuid.UUID) *UsersUpdate
- func (uu *UsersUpdate) AddUsersAccounts(a ...*Account) *UsersUpdate
- func (uu *UsersUpdate) AddUsersLinkIDs(ids ...uuid.UUID) *UsersUpdate
- func (uu *UsersUpdate) AddUsersLinks(l ...*Links) *UsersUpdate
- func (uu *UsersUpdate) AddUsersSessionIDs(ids ...uuid.UUID) *UsersUpdate
- func (uu *UsersUpdate) AddUsersSessions(s ...*Session) *UsersUpdate
- func (uu *UsersUpdate) ClearAccessToken() *UsersUpdate
- func (uu *UsersUpdate) ClearAvatar() *UsersUpdate
- func (uu *UsersUpdate) ClearDescription() *UsersUpdate
- func (uu *UsersUpdate) ClearExpiresIn() *UsersUpdate
- func (uu *UsersUpdate) ClearRefreshToken() *UsersUpdate
- func (uu *UsersUpdate) ClearScope() *UsersUpdate
- func (uu *UsersUpdate) ClearSessionState() *UsersUpdate
- func (uu *UsersUpdate) ClearUsersAccounts() *UsersUpdate
- func (uu *UsersUpdate) ClearUsersLinks() *UsersUpdate
- func (uu *UsersUpdate) ClearUsersSessions() *UsersUpdate
- func (uu *UsersUpdate) Exec(ctx context.Context) error
- func (uu *UsersUpdate) ExecX(ctx context.Context)
- func (uu *UsersUpdate) Mutation() *UsersMutation
- func (uu *UsersUpdate) RemoveUsersAccountIDs(ids ...uuid.UUID) *UsersUpdate
- func (uu *UsersUpdate) RemoveUsersAccounts(a ...*Account) *UsersUpdate
- func (uu *UsersUpdate) RemoveUsersLinkIDs(ids ...uuid.UUID) *UsersUpdate
- func (uu *UsersUpdate) RemoveUsersLinks(l ...*Links) *UsersUpdate
- func (uu *UsersUpdate) RemoveUsersSessionIDs(ids ...uuid.UUID) *UsersUpdate
- func (uu *UsersUpdate) RemoveUsersSessions(s ...*Session) *UsersUpdate
- func (uu *UsersUpdate) Save(ctx context.Context) (int, error)
- func (uu *UsersUpdate) SaveX(ctx context.Context) int
- func (uu *UsersUpdate) SetAccessToken(s string) *UsersUpdate
- func (uu *UsersUpdate) SetAvatar(s string) *UsersUpdate
- func (uu *UsersUpdate) SetCreatedAt(t time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetDeleted(b bool) *UsersUpdate
- func (uu *UsersUpdate) SetDescription(s string) *UsersUpdate
- func (uu *UsersUpdate) SetExpiresIn(f float64) *UsersUpdate
- func (uu *UsersUpdate) SetExternalID(s string) *UsersUpdate
- func (uu *UsersUpdate) SetGlobalName(s string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableAccessToken(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableAvatar(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableCreatedAt(t *time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetNillableDeleted(b *bool) *UsersUpdate
- func (uu *UsersUpdate) SetNillableDescription(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableExpiresIn(f *float64) *UsersUpdate
- func (uu *UsersUpdate) SetNillableExternalID(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableGlobalName(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableRefreshToken(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableScope(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableSessionState(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableSlug(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableUsername(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetRefreshToken(s string) *UsersUpdate
- func (uu *UsersUpdate) SetScope(s string) *UsersUpdate
- func (uu *UsersUpdate) SetSessionState(s string) *UsersUpdate
- func (uu *UsersUpdate) SetSlug(s string) *UsersUpdate
- func (uu *UsersUpdate) SetUpdatedAt(t time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetUsername(s string) *UsersUpdate
- func (uu *UsersUpdate) Where(ps ...predicate.Users) *UsersUpdate
- type UsersUpdateOne
- func (uuo *UsersUpdateOne) AddExpiresIn(f float64) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddUsersAccountIDs(ids ...uuid.UUID) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddUsersAccounts(a ...*Account) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddUsersLinkIDs(ids ...uuid.UUID) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddUsersLinks(l ...*Links) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddUsersSessionIDs(ids ...uuid.UUID) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddUsersSessions(s ...*Session) *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearAccessToken() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearAvatar() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearDescription() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearExpiresIn() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearRefreshToken() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearScope() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearSessionState() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearUsersAccounts() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearUsersLinks() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearUsersSessions() *UsersUpdateOne
- func (uuo *UsersUpdateOne) Exec(ctx context.Context) error
- func (uuo *UsersUpdateOne) ExecX(ctx context.Context)
- func (uuo *UsersUpdateOne) Mutation() *UsersMutation
- func (uuo *UsersUpdateOne) RemoveUsersAccountIDs(ids ...uuid.UUID) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemoveUsersAccounts(a ...*Account) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemoveUsersLinkIDs(ids ...uuid.UUID) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemoveUsersLinks(l ...*Links) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemoveUsersSessionIDs(ids ...uuid.UUID) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemoveUsersSessions(s ...*Session) *UsersUpdateOne
- func (uuo *UsersUpdateOne) Save(ctx context.Context) (*Users, error)
- func (uuo *UsersUpdateOne) SaveX(ctx context.Context) *Users
- func (uuo *UsersUpdateOne) Select(field string, fields ...string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetAccessToken(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetAvatar(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetCreatedAt(t time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetDeleted(b bool) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetDescription(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetExpiresIn(f float64) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetExternalID(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetGlobalName(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableAccessToken(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableAvatar(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableCreatedAt(t *time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableDeleted(b *bool) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableDescription(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableExpiresIn(f *float64) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableExternalID(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableGlobalName(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableRefreshToken(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableScope(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableSessionState(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableSlug(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableUsername(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetRefreshToken(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetScope(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetSessionState(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetSlug(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetUpdatedAt(t time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetUsername(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) Where(ps ...predicate.Users) *UsersUpdateOne
- 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" TypeLinks = "Links" TypeSession = "Session" TypeUsers = "Users" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Account ¶
type Account struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // ExternalID holds the value of the "external_id" field. ExternalID uuid.UUID `json:"external_id,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // FirstName holds the value of the "first_name" field. FirstName string `json:"first_name,omitempty"` // LastName holds the value of the "last_name" field. LastName string `json:"last_name,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Avatar holds the value of the "avatar" field. Avatar string `json:"avatar,omitempty"` // Deleted holds the value of the "deleted" field. Deleted bool `json:"deleted,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"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AccountQuery when eager-loading is set. Edges AccountEdges `json:"edges"` // contains filtered or unexported fields }
Account is the model entity for the Account schema.
func (*Account) QueryUsers ¶
func (a *Account) QueryUsers() *UsersQuery
QueryUsers queries the "users" edge of the Account entity.
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 builder for creating a Account entity.
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 builder for deleting the given entity.
func (*AccountClient) DeleteOneID ¶
func (c *AccountClient) DeleteOneID(id uuid.UUID) *AccountDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AccountClient) Hooks ¶
func (c *AccountClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AccountClient) Intercept ¶
func (c *AccountClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `account.Intercept(f(g(h())))`.
func (*AccountClient) Interceptors ¶
func (c *AccountClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AccountClient) MapCreateBulk ¶
func (c *AccountClient) MapCreateBulk(slice any, setFunc func(*AccountCreate, int)) *AccountCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*AccountClient) Query ¶
func (c *AccountClient) Query() *AccountQuery
Query returns a query builder for Account.
func (*AccountClient) QueryUsers ¶
func (c *AccountClient) QueryUsers(a *Account) *UsersQuery
QueryUsers queries the users edge of a Account.
func (*AccountClient) Update ¶
func (c *AccountClient) Update() *AccountUpdate
Update returns an update builder for Account.
func (*AccountClient) UpdateOne ¶
func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AccountClient) UpdateOneID ¶
func (c *AccountClient) UpdateOneID(id uuid.UUID) *AccountUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AccountClient) Use ¶
func (c *AccountClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `account.Hooks(f(g(h())))`.
type AccountCreate ¶
type AccountCreate struct {
// contains filtered or unexported fields
}
AccountCreate is the builder for creating a Account entity.
func (*AccountCreate) Exec ¶
func (ac *AccountCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountCreate) ExecX ¶
func (ac *AccountCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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) SetAvatar ¶
func (ac *AccountCreate) SetAvatar(s string) *AccountCreate
SetAvatar sets the "avatar" field.
func (*AccountCreate) SetCreatedAt ¶
func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate
SetCreatedAt sets the "created_at" field.
func (*AccountCreate) SetDeleted ¶
func (ac *AccountCreate) SetDeleted(b bool) *AccountCreate
SetDeleted sets the "deleted" field.
func (*AccountCreate) SetEmail ¶
func (ac *AccountCreate) SetEmail(s string) *AccountCreate
SetEmail sets the "email" field.
func (*AccountCreate) SetExternalID ¶
func (ac *AccountCreate) SetExternalID(u uuid.UUID) *AccountCreate
SetExternalID sets the "external_id" field.
func (*AccountCreate) SetFirstName ¶
func (ac *AccountCreate) SetFirstName(s string) *AccountCreate
SetFirstName sets the "first_name" field.
func (*AccountCreate) SetID ¶
func (ac *AccountCreate) SetID(u uuid.UUID) *AccountCreate
SetID sets the "id" field.
func (*AccountCreate) SetLastName ¶
func (ac *AccountCreate) SetLastName(s string) *AccountCreate
SetLastName sets the "last_name" field.
func (*AccountCreate) SetNillableAvatar ¶
func (ac *AccountCreate) SetNillableAvatar(s *string) *AccountCreate
SetNillableAvatar sets the "avatar" 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) SetNillableDeleted ¶
func (ac *AccountCreate) SetNillableDeleted(b *bool) *AccountCreate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*AccountCreate) SetNillableEmail ¶
func (ac *AccountCreate) SetNillableEmail(s *string) *AccountCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*AccountCreate) SetNillableFirstName ¶
func (ac *AccountCreate) SetNillableFirstName(s *string) *AccountCreate
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*AccountCreate) SetNillableID ¶
func (ac *AccountCreate) SetNillableID(u *uuid.UUID) *AccountCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AccountCreate) SetNillableLastName ¶
func (ac *AccountCreate) SetNillableLastName(s *string) *AccountCreate
SetNillableLastName sets the "last_name" 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) SetUpdatedAt ¶
func (ac *AccountCreate) SetUpdatedAt(t time.Time) *AccountCreate
SetUpdatedAt sets the "updated_at" field.
func (*AccountCreate) SetUsername ¶
func (ac *AccountCreate) SetUsername(s string) *AccountCreate
SetUsername sets the "username" field.
func (*AccountCreate) SetUsers ¶
func (ac *AccountCreate) SetUsers(u *Users) *AccountCreate
SetUsers sets the "users" edge to the Users entity.
func (*AccountCreate) SetUsersID ¶
func (ac *AccountCreate) SetUsersID(id uuid.UUID) *AccountCreate
SetUsersID sets the "users" edge to the Users entity by ID.
type AccountCreateBulk ¶
type AccountCreateBulk struct {
// contains filtered or unexported fields
}
AccountCreateBulk is the builder for creating many Account entities in bulk.
func (*AccountCreateBulk) Exec ¶
func (acb *AccountCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountCreateBulk) ExecX ¶
func (acb *AccountCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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 appends a list predicates 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.
func (*AccountDeleteOne) Where ¶
func (ado *AccountDeleteOne) Where(ps ...predicate.Account) *AccountDeleteOne
Where appends a list predicates to the AccountDelete builder.
type AccountEdges ¶
type AccountEdges struct { // Users holds the value of the users edge. Users *Users `json:"users,omitempty"` // contains filtered or unexported fields }
AccountEdges holds the relations/edges for other nodes in the graph.
func (AccountEdges) UsersOrErr ¶
func (e AccountEdges) UsersOrErr() (*Users, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AccountGroupBy ¶
type AccountGroupBy struct {
// contains filtered or unexported fields
}
AccountGroupBy is the 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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Scan ¶
func (agb *AccountGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccountGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
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) Avatar ¶
func (m *AccountMutation) Avatar() (r string, exists bool)
Avatar returns the value of the "avatar" field in the mutation.
func (*AccountMutation) AvatarCleared ¶
func (m *AccountMutation) AvatarCleared() bool
AvatarCleared returns if the "avatar" field was cleared in this mutation.
func (*AccountMutation) ClearAvatar ¶
func (m *AccountMutation) ClearAvatar()
ClearAvatar clears the value of the "avatar" 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) ClearEmail ¶
func (m *AccountMutation) ClearEmail()
ClearEmail clears the value of the "email" 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) ClearFirstName ¶
func (m *AccountMutation) ClearFirstName()
ClearFirstName clears the value of the "first_name" field.
func (*AccountMutation) ClearLastName ¶
func (m *AccountMutation) ClearLastName()
ClearLastName clears the value of the "last_name" field.
func (*AccountMutation) ClearUsers ¶
func (m *AccountMutation) ClearUsers()
ClearUsers clears the "users" edge to the Users entity.
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) CreatedAt ¶
func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AccountMutation) Deleted ¶
func (m *AccountMutation) Deleted() (r bool, exists bool)
Deleted returns the value of the "deleted" 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) EmailCleared ¶
func (m *AccountMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*AccountMutation) ExternalID ¶
func (m *AccountMutation) ExternalID() (r uuid.UUID, exists bool)
ExternalID returns the value of the "external_id" field in the 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) FirstName ¶
func (m *AccountMutation) FirstName() (r string, exists bool)
FirstName returns the value of the "first_name" field in the mutation.
func (*AccountMutation) FirstNameCleared ¶
func (m *AccountMutation) FirstNameCleared() bool
FirstNameCleared returns if the "first_name" field was cleared in this mutation.
func (*AccountMutation) ID ¶
func (m *AccountMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AccountMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AccountMutation) LastName ¶
func (m *AccountMutation) LastName() (r string, exists bool)
LastName returns the value of the "last_name" field in the mutation.
func (*AccountMutation) LastNameCleared ¶
func (m *AccountMutation) LastNameCleared() bool
LastNameCleared returns if the "last_name" field was cleared in this mutation.
func (*AccountMutation) OldAvatar ¶
func (m *AccountMutation) OldAvatar(ctx context.Context) (v string, err error)
OldAvatar returns the old "avatar" 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) OldDeleted ¶
func (m *AccountMutation) OldDeleted(ctx context.Context) (v bool, err error)
OldDeleted returns the old "deleted" 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) OldExternalID ¶
OldExternalID returns the old "external_id" 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) OldFirstName ¶
func (m *AccountMutation) OldFirstName(ctx context.Context) (v string, err error)
OldFirstName returns the old "first_name" 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) OldLastName ¶
func (m *AccountMutation) OldLastName(ctx context.Context) (v string, err error)
OldLastName returns the old "last_name" 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) OldUsername ¶
func (m *AccountMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" 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) 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) ResetAvatar ¶
func (m *AccountMutation) ResetAvatar()
ResetAvatar resets all changes to the "avatar" field.
func (*AccountMutation) ResetCreatedAt ¶
func (m *AccountMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AccountMutation) ResetDeleted ¶
func (m *AccountMutation) ResetDeleted()
ResetDeleted resets all changes to the "deleted" 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) ResetExternalID ¶
func (m *AccountMutation) ResetExternalID()
ResetExternalID resets all changes to the "external_id" 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) ResetFirstName ¶
func (m *AccountMutation) ResetFirstName()
ResetFirstName resets all changes to the "first_name" field.
func (*AccountMutation) ResetLastName ¶
func (m *AccountMutation) ResetLastName()
ResetLastName resets all changes to the "last_name" field.
func (*AccountMutation) ResetUpdatedAt ¶
func (m *AccountMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AccountMutation) ResetUsername ¶
func (m *AccountMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*AccountMutation) ResetUsers ¶
func (m *AccountMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*AccountMutation) SetAvatar ¶
func (m *AccountMutation) SetAvatar(s string)
SetAvatar sets the "avatar" field.
func (*AccountMutation) SetCreatedAt ¶
func (m *AccountMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AccountMutation) SetDeleted ¶
func (m *AccountMutation) SetDeleted(b bool)
SetDeleted sets the "deleted" field.
func (*AccountMutation) SetEmail ¶
func (m *AccountMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*AccountMutation) SetExternalID ¶
func (m *AccountMutation) SetExternalID(u uuid.UUID)
SetExternalID sets the "external_id" 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) SetFirstName ¶
func (m *AccountMutation) SetFirstName(s string)
SetFirstName sets the "first_name" field.
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) SetLastName ¶
func (m *AccountMutation) SetLastName(s string)
SetLastName sets the "last_name" field.
func (*AccountMutation) SetOp ¶
func (m *AccountMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AccountMutation) SetUpdatedAt ¶
func (m *AccountMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*AccountMutation) SetUsername ¶
func (m *AccountMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*AccountMutation) SetUsersID ¶
func (m *AccountMutation) SetUsersID(id uuid.UUID)
SetUsersID sets the "users" edge to the Users entity by id.
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).
func (*AccountMutation) UpdatedAt ¶
func (m *AccountMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AccountMutation) Username ¶
func (m *AccountMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*AccountMutation) UsersCleared ¶
func (m *AccountMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the Users entity was cleared.
func (*AccountMutation) UsersID ¶
func (m *AccountMutation) UsersID() (id uuid.UUID, exists bool)
UsersID returns the "users" edge ID in the mutation.
func (*AccountMutation) UsersIDs ¶
func (m *AccountMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the "users" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UsersID instead. It exists only for internal usage by the builders.
func (*AccountMutation) Where ¶
func (m *AccountMutation) Where(ps ...predicate.Account)
Where appends a list predicates to the AccountMutation builder.
func (*AccountMutation) WhereP ¶
func (m *AccountMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AccountMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AccountQuery ¶
type AccountQuery struct {
// contains filtered or unexported fields
}
AccountQuery is the builder for querying Account entities.
func (*AccountQuery) Aggregate ¶
func (aq *AccountQuery) Aggregate(fns ...AggregateFunc) *AccountSelect
Aggregate returns a AccountSelect configured with the given aggregations.
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 { ExternalID uuid.UUID `json:"external_id,omitempty"` Count int `json:"count,omitempty"` } client.Account.Query(). GroupBy(account.FieldExternalID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AccountQuery) IDsX ¶
func (aq *AccountQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AccountQuery) Limit ¶
func (aq *AccountQuery) Limit(limit int) *AccountQuery
Limit the number of records to be returned by this query.
func (*AccountQuery) Offset ¶
func (aq *AccountQuery) Offset(offset int) *AccountQuery
Offset to start from.
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 more than one Account entity is 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 more than one Account ID is 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 ...account.OrderOption) *AccountQuery
Order specifies how the records should be ordered.
func (*AccountQuery) QueryUsers ¶
func (aq *AccountQuery) QueryUsers() *UsersQuery
QueryUsers chains the current query on the "users" edge.
func (*AccountQuery) Select ¶
func (aq *AccountQuery) Select(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 { ExternalID uuid.UUID `json:"external_id,omitempty"` } client.Account.Query(). Select(account.FieldExternalID). Scan(ctx, &v)
func (*AccountQuery) Unique ¶
func (aq *AccountQuery) Unique(unique bool) *AccountQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*AccountQuery) Where ¶
func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
Where adds a new predicate for the AccountQuery builder.
func (*AccountQuery) WithUsers ¶
func (aq *AccountQuery) WithUsers(opts ...func(*UsersQuery)) *AccountQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type AccountSelect ¶
type AccountSelect struct { *AccountQuery // contains filtered or unexported fields }
AccountSelect is the builder for selecting fields of Account entities.
func (*AccountSelect) Aggregate ¶
func (as *AccountSelect) Aggregate(fns ...AggregateFunc) *AccountSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AccountSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Scan ¶
func (as *AccountSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccountSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccountUpdate ¶
type AccountUpdate struct {
// contains filtered or unexported fields
}
AccountUpdate is the builder for updating Account entities.
func (*AccountUpdate) ClearAvatar ¶
func (au *AccountUpdate) ClearAvatar() *AccountUpdate
ClearAvatar clears the value of the "avatar" field.
func (*AccountUpdate) ClearEmail ¶
func (au *AccountUpdate) ClearEmail() *AccountUpdate
ClearEmail clears the value of the "email" field.
func (*AccountUpdate) ClearFirstName ¶
func (au *AccountUpdate) ClearFirstName() *AccountUpdate
ClearFirstName clears the value of the "first_name" field.
func (*AccountUpdate) ClearLastName ¶
func (au *AccountUpdate) ClearLastName() *AccountUpdate
ClearLastName clears the value of the "last_name" field.
func (*AccountUpdate) ClearUsers ¶
func (au *AccountUpdate) ClearUsers() *AccountUpdate
ClearUsers clears the "users" edge to the Users entity.
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) SetAvatar ¶
func (au *AccountUpdate) SetAvatar(s string) *AccountUpdate
SetAvatar sets the "avatar" field.
func (*AccountUpdate) SetCreatedAt ¶
func (au *AccountUpdate) SetCreatedAt(t time.Time) *AccountUpdate
SetCreatedAt sets the "created_at" field.
func (*AccountUpdate) SetDeleted ¶
func (au *AccountUpdate) SetDeleted(b bool) *AccountUpdate
SetDeleted sets the "deleted" field.
func (*AccountUpdate) SetEmail ¶
func (au *AccountUpdate) SetEmail(s string) *AccountUpdate
SetEmail sets the "email" field.
func (*AccountUpdate) SetExternalID ¶
func (au *AccountUpdate) SetExternalID(u uuid.UUID) *AccountUpdate
SetExternalID sets the "external_id" field.
func (*AccountUpdate) SetFirstName ¶
func (au *AccountUpdate) SetFirstName(s string) *AccountUpdate
SetFirstName sets the "first_name" field.
func (*AccountUpdate) SetLastName ¶
func (au *AccountUpdate) SetLastName(s string) *AccountUpdate
SetLastName sets the "last_name" field.
func (*AccountUpdate) SetNillableAvatar ¶
func (au *AccountUpdate) SetNillableAvatar(s *string) *AccountUpdate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*AccountUpdate) SetNillableCreatedAt ¶
func (au *AccountUpdate) SetNillableCreatedAt(t *time.Time) *AccountUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccountUpdate) SetNillableDeleted ¶
func (au *AccountUpdate) SetNillableDeleted(b *bool) *AccountUpdate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*AccountUpdate) SetNillableEmail ¶
func (au *AccountUpdate) SetNillableEmail(s *string) *AccountUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*AccountUpdate) SetNillableExternalID ¶
func (au *AccountUpdate) SetNillableExternalID(u *uuid.UUID) *AccountUpdate
SetNillableExternalID sets the "external_id" field if the given value is not nil.
func (*AccountUpdate) SetNillableFirstName ¶
func (au *AccountUpdate) SetNillableFirstName(s *string) *AccountUpdate
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*AccountUpdate) SetNillableLastName ¶
func (au *AccountUpdate) SetNillableLastName(s *string) *AccountUpdate
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*AccountUpdate) SetNillableUsername ¶
func (au *AccountUpdate) SetNillableUsername(s *string) *AccountUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*AccountUpdate) SetUpdatedAt ¶
func (au *AccountUpdate) SetUpdatedAt(t time.Time) *AccountUpdate
SetUpdatedAt sets the "updated_at" field.
func (*AccountUpdate) SetUsername ¶
func (au *AccountUpdate) SetUsername(s string) *AccountUpdate
SetUsername sets the "username" field.
func (*AccountUpdate) SetUsers ¶
func (au *AccountUpdate) SetUsers(u *Users) *AccountUpdate
SetUsers sets the "users" edge to the Users entity.
func (*AccountUpdate) SetUsersID ¶
func (au *AccountUpdate) SetUsersID(id uuid.UUID) *AccountUpdate
SetUsersID sets the "users" edge to the Users entity by ID.
func (*AccountUpdate) Where ¶
func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
Where appends a list predicates to 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) ClearAvatar ¶
func (auo *AccountUpdateOne) ClearAvatar() *AccountUpdateOne
ClearAvatar clears the value of the "avatar" field.
func (*AccountUpdateOne) ClearEmail ¶
func (auo *AccountUpdateOne) ClearEmail() *AccountUpdateOne
ClearEmail clears the value of the "email" field.
func (*AccountUpdateOne) ClearFirstName ¶
func (auo *AccountUpdateOne) ClearFirstName() *AccountUpdateOne
ClearFirstName clears the value of the "first_name" field.
func (*AccountUpdateOne) ClearLastName ¶
func (auo *AccountUpdateOne) ClearLastName() *AccountUpdateOne
ClearLastName clears the value of the "last_name" field.
func (*AccountUpdateOne) ClearUsers ¶
func (auo *AccountUpdateOne) ClearUsers() *AccountUpdateOne
ClearUsers clears the "users" edge to the Users entity.
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) Select ¶
func (auo *AccountUpdateOne) Select(field string, fields ...string) *AccountUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AccountUpdateOne) SetAvatar ¶
func (auo *AccountUpdateOne) SetAvatar(s string) *AccountUpdateOne
SetAvatar sets the "avatar" field.
func (*AccountUpdateOne) SetCreatedAt ¶
func (auo *AccountUpdateOne) SetCreatedAt(t time.Time) *AccountUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AccountUpdateOne) SetDeleted ¶
func (auo *AccountUpdateOne) SetDeleted(b bool) *AccountUpdateOne
SetDeleted sets the "deleted" field.
func (*AccountUpdateOne) SetEmail ¶
func (auo *AccountUpdateOne) SetEmail(s string) *AccountUpdateOne
SetEmail sets the "email" field.
func (*AccountUpdateOne) SetExternalID ¶
func (auo *AccountUpdateOne) SetExternalID(u uuid.UUID) *AccountUpdateOne
SetExternalID sets the "external_id" field.
func (*AccountUpdateOne) SetFirstName ¶
func (auo *AccountUpdateOne) SetFirstName(s string) *AccountUpdateOne
SetFirstName sets the "first_name" field.
func (*AccountUpdateOne) SetLastName ¶
func (auo *AccountUpdateOne) SetLastName(s string) *AccountUpdateOne
SetLastName sets the "last_name" field.
func (*AccountUpdateOne) SetNillableAvatar ¶
func (auo *AccountUpdateOne) SetNillableAvatar(s *string) *AccountUpdateOne
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableCreatedAt ¶
func (auo *AccountUpdateOne) SetNillableCreatedAt(t *time.Time) *AccountUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableDeleted ¶
func (auo *AccountUpdateOne) SetNillableDeleted(b *bool) *AccountUpdateOne
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableEmail ¶
func (auo *AccountUpdateOne) SetNillableEmail(s *string) *AccountUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableExternalID ¶
func (auo *AccountUpdateOne) SetNillableExternalID(u *uuid.UUID) *AccountUpdateOne
SetNillableExternalID sets the "external_id" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableFirstName ¶
func (auo *AccountUpdateOne) SetNillableFirstName(s *string) *AccountUpdateOne
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableLastName ¶
func (auo *AccountUpdateOne) SetNillableLastName(s *string) *AccountUpdateOne
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableUsername ¶
func (auo *AccountUpdateOne) SetNillableUsername(s *string) *AccountUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*AccountUpdateOne) SetUpdatedAt ¶
func (auo *AccountUpdateOne) SetUpdatedAt(t time.Time) *AccountUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*AccountUpdateOne) SetUsername ¶
func (auo *AccountUpdateOne) SetUsername(s string) *AccountUpdateOne
SetUsername sets the "username" field.
func (*AccountUpdateOne) SetUsers ¶
func (auo *AccountUpdateOne) SetUsers(u *Users) *AccountUpdateOne
SetUsers sets the "users" edge to the Users entity.
func (*AccountUpdateOne) SetUsersID ¶
func (auo *AccountUpdateOne) SetUsersID(id uuid.UUID) *AccountUpdateOne
SetUsersID sets the "users" edge to the Users entity by ID.
func (*AccountUpdateOne) Where ¶
func (auo *AccountUpdateOne) Where(ps ...predicate.Account) *AccountUpdateOne
Where appends a list predicates to the AccountUpdate builder.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Account is the client for interacting with the Account builders. Account *AccountClient // Links is the client for interacting with the Links builders. Links *LinksClient // Session is the client for interacting with the Session builders. Session *SessionClient // Users is the client for interacting with the Users builders. Users *UsersClient // 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)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type Links ¶
type Links struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID uuid.UUID `json:"user_id,omitempty"` // URL holds the value of the "url" field. URL string `json:"url,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Image holds the value of the "image" field. Image string `json:"image,omitempty"` // Order holds the value of the "order" field. Order int `json:"order,omitempty"` // Deleted holds the value of the "deleted" field. Deleted bool `json:"deleted,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"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the LinksQuery when eager-loading is set. Edges LinksEdges `json:"edges"` // contains filtered or unexported fields }
Links is the model entity for the Links schema.
func (*Links) QueryUser ¶
func (l *Links) QueryUser() *UsersQuery
QueryUser queries the "user" edge of the Links entity.
func (*Links) Unwrap ¶
Unwrap unwraps the Links 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 (*Links) Update ¶
func (l *Links) Update() *LinksUpdateOne
Update returns a builder for updating this Links. Note that you need to call Links.Unwrap() before calling this method if this Links was returned from a transaction, and the transaction was committed or rolled back.
type LinksClient ¶
type LinksClient struct {
// contains filtered or unexported fields
}
LinksClient is a client for the Links schema.
func NewLinksClient ¶
func NewLinksClient(c config) *LinksClient
NewLinksClient returns a client for the Links from the given config.
func (*LinksClient) Create ¶
func (c *LinksClient) Create() *LinksCreate
Create returns a builder for creating a Links entity.
func (*LinksClient) CreateBulk ¶
func (c *LinksClient) CreateBulk(builders ...*LinksCreate) *LinksCreateBulk
CreateBulk returns a builder for creating a bulk of Links entities.
func (*LinksClient) Delete ¶
func (c *LinksClient) Delete() *LinksDelete
Delete returns a delete builder for Links.
func (*LinksClient) DeleteOne ¶
func (c *LinksClient) DeleteOne(l *Links) *LinksDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LinksClient) DeleteOneID ¶
func (c *LinksClient) DeleteOneID(id uuid.UUID) *LinksDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LinksClient) Intercept ¶
func (c *LinksClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `links.Intercept(f(g(h())))`.
func (*LinksClient) Interceptors ¶
func (c *LinksClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LinksClient) MapCreateBulk ¶
func (c *LinksClient) MapCreateBulk(slice any, setFunc func(*LinksCreate, int)) *LinksCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*LinksClient) Query ¶
func (c *LinksClient) Query() *LinksQuery
Query returns a query builder for Links.
func (*LinksClient) QueryUser ¶
func (c *LinksClient) QueryUser(l *Links) *UsersQuery
QueryUser queries the user edge of a Links.
func (*LinksClient) Update ¶
func (c *LinksClient) Update() *LinksUpdate
Update returns an update builder for Links.
func (*LinksClient) UpdateOne ¶
func (c *LinksClient) UpdateOne(l *Links) *LinksUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LinksClient) UpdateOneID ¶
func (c *LinksClient) UpdateOneID(id uuid.UUID) *LinksUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LinksClient) Use ¶
func (c *LinksClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `links.Hooks(f(g(h())))`.
type LinksCreate ¶
type LinksCreate struct {
// contains filtered or unexported fields
}
LinksCreate is the builder for creating a Links entity.
func (*LinksCreate) Exec ¶
func (lc *LinksCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LinksCreate) ExecX ¶
func (lc *LinksCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LinksCreate) Mutation ¶
func (lc *LinksCreate) Mutation() *LinksMutation
Mutation returns the LinksMutation object of the builder.
func (*LinksCreate) Save ¶
func (lc *LinksCreate) Save(ctx context.Context) (*Links, error)
Save creates the Links in the database.
func (*LinksCreate) SaveX ¶
func (lc *LinksCreate) SaveX(ctx context.Context) *Links
SaveX calls Save and panics if Save returns an error.
func (*LinksCreate) SetCreatedAt ¶
func (lc *LinksCreate) SetCreatedAt(t time.Time) *LinksCreate
SetCreatedAt sets the "created_at" field.
func (*LinksCreate) SetDeleted ¶
func (lc *LinksCreate) SetDeleted(b bool) *LinksCreate
SetDeleted sets the "deleted" field.
func (*LinksCreate) SetDescription ¶
func (lc *LinksCreate) SetDescription(s string) *LinksCreate
SetDescription sets the "description" field.
func (*LinksCreate) SetID ¶
func (lc *LinksCreate) SetID(u uuid.UUID) *LinksCreate
SetID sets the "id" field.
func (*LinksCreate) SetImage ¶
func (lc *LinksCreate) SetImage(s string) *LinksCreate
SetImage sets the "image" field.
func (*LinksCreate) SetNillableCreatedAt ¶
func (lc *LinksCreate) SetNillableCreatedAt(t *time.Time) *LinksCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LinksCreate) SetNillableDeleted ¶
func (lc *LinksCreate) SetNillableDeleted(b *bool) *LinksCreate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*LinksCreate) SetNillableDescription ¶
func (lc *LinksCreate) SetNillableDescription(s *string) *LinksCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LinksCreate) SetNillableID ¶
func (lc *LinksCreate) SetNillableID(u *uuid.UUID) *LinksCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*LinksCreate) SetNillableImage ¶
func (lc *LinksCreate) SetNillableImage(s *string) *LinksCreate
SetNillableImage sets the "image" field if the given value is not nil.
func (*LinksCreate) SetNillableOrder ¶
func (lc *LinksCreate) SetNillableOrder(i *int) *LinksCreate
SetNillableOrder sets the "order" field if the given value is not nil.
func (*LinksCreate) SetNillableUpdatedAt ¶
func (lc *LinksCreate) SetNillableUpdatedAt(t *time.Time) *LinksCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*LinksCreate) SetOrder ¶
func (lc *LinksCreate) SetOrder(i int) *LinksCreate
SetOrder sets the "order" field.
func (*LinksCreate) SetTitle ¶
func (lc *LinksCreate) SetTitle(s string) *LinksCreate
SetTitle sets the "title" field.
func (*LinksCreate) SetURL ¶
func (lc *LinksCreate) SetURL(s string) *LinksCreate
SetURL sets the "url" field.
func (*LinksCreate) SetUpdatedAt ¶
func (lc *LinksCreate) SetUpdatedAt(t time.Time) *LinksCreate
SetUpdatedAt sets the "updated_at" field.
func (*LinksCreate) SetUser ¶
func (lc *LinksCreate) SetUser(u *Users) *LinksCreate
SetUser sets the "user" edge to the Users entity.
func (*LinksCreate) SetUserID ¶
func (lc *LinksCreate) SetUserID(u uuid.UUID) *LinksCreate
SetUserID sets the "user_id" field.
type LinksCreateBulk ¶
type LinksCreateBulk struct {
// contains filtered or unexported fields
}
LinksCreateBulk is the builder for creating many Links entities in bulk.
func (*LinksCreateBulk) Exec ¶
func (lcb *LinksCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LinksCreateBulk) ExecX ¶
func (lcb *LinksCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LinksDelete ¶
type LinksDelete struct {
// contains filtered or unexported fields
}
LinksDelete is the builder for deleting a Links entity.
func (*LinksDelete) Exec ¶
func (ld *LinksDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LinksDelete) ExecX ¶
func (ld *LinksDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LinksDelete) Where ¶
func (ld *LinksDelete) Where(ps ...predicate.Links) *LinksDelete
Where appends a list predicates to the LinksDelete builder.
type LinksDeleteOne ¶
type LinksDeleteOne struct {
// contains filtered or unexported fields
}
LinksDeleteOne is the builder for deleting a single Links entity.
func (*LinksDeleteOne) Exec ¶
func (ldo *LinksDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LinksDeleteOne) ExecX ¶
func (ldo *LinksDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LinksDeleteOne) Where ¶
func (ldo *LinksDeleteOne) Where(ps ...predicate.Links) *LinksDeleteOne
Where appends a list predicates to the LinksDelete builder.
type LinksEdges ¶
type LinksEdges struct { // User holds the value of the user edge. User *Users `json:"user,omitempty"` // contains filtered or unexported fields }
LinksEdges holds the relations/edges for other nodes in the graph.
func (LinksEdges) UserOrErr ¶
func (e LinksEdges) UserOrErr() (*Users, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type LinksGroupBy ¶
type LinksGroupBy struct {
// contains filtered or unexported fields
}
LinksGroupBy is the group-by builder for Links entities.
func (*LinksGroupBy) Aggregate ¶
func (lgb *LinksGroupBy) Aggregate(fns ...AggregateFunc) *LinksGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LinksGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LinksGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LinksGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LinksGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LinksGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LinksGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LinksGroupBy) Scan ¶
func (lgb *LinksGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LinksGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LinksMutation ¶
type LinksMutation struct {
// contains filtered or unexported fields
}
LinksMutation represents an operation that mutates the Links nodes in the graph.
func (*LinksMutation) AddField ¶
func (m *LinksMutation) 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 (*LinksMutation) AddOrder ¶
func (m *LinksMutation) AddOrder(i int)
AddOrder adds i to the "order" field.
func (*LinksMutation) AddedEdges ¶
func (m *LinksMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LinksMutation) AddedField ¶
func (m *LinksMutation) 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 (*LinksMutation) AddedFields ¶
func (m *LinksMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LinksMutation) AddedIDs ¶
func (m *LinksMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LinksMutation) AddedOrder ¶
func (m *LinksMutation) AddedOrder() (r int, exists bool)
AddedOrder returns the value that was added to the "order" field in this mutation.
func (*LinksMutation) ClearDescription ¶
func (m *LinksMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*LinksMutation) ClearEdge ¶
func (m *LinksMutation) 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 (*LinksMutation) ClearField ¶
func (m *LinksMutation) 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 (*LinksMutation) ClearImage ¶
func (m *LinksMutation) ClearImage()
ClearImage clears the value of the "image" field.
func (*LinksMutation) ClearUser ¶
func (m *LinksMutation) ClearUser()
ClearUser clears the "user" edge to the Users entity.
func (*LinksMutation) ClearedEdges ¶
func (m *LinksMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LinksMutation) ClearedFields ¶
func (m *LinksMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LinksMutation) Client ¶
func (m LinksMutation) 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 (*LinksMutation) CreatedAt ¶
func (m *LinksMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*LinksMutation) Deleted ¶
func (m *LinksMutation) Deleted() (r bool, exists bool)
Deleted returns the value of the "deleted" field in the mutation.
func (*LinksMutation) Description ¶
func (m *LinksMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*LinksMutation) DescriptionCleared ¶
func (m *LinksMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*LinksMutation) EdgeCleared ¶
func (m *LinksMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LinksMutation) Field ¶
func (m *LinksMutation) 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 (*LinksMutation) FieldCleared ¶
func (m *LinksMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LinksMutation) Fields ¶
func (m *LinksMutation) 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 (*LinksMutation) ID ¶
func (m *LinksMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*LinksMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*LinksMutation) Image ¶
func (m *LinksMutation) Image() (r string, exists bool)
Image returns the value of the "image" field in the mutation.
func (*LinksMutation) ImageCleared ¶
func (m *LinksMutation) ImageCleared() bool
ImageCleared returns if the "image" field was cleared in this mutation.
func (*LinksMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Links entity. If the Links 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 (*LinksMutation) OldDeleted ¶
func (m *LinksMutation) OldDeleted(ctx context.Context) (v bool, err error)
OldDeleted returns the old "deleted" field's value of the Links entity. If the Links 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 (*LinksMutation) OldDescription ¶
func (m *LinksMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Links entity. If the Links 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 (*LinksMutation) 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 (*LinksMutation) OldImage ¶
func (m *LinksMutation) OldImage(ctx context.Context) (v string, err error)
OldImage returns the old "image" field's value of the Links entity. If the Links 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 (*LinksMutation) OldOrder ¶
func (m *LinksMutation) OldOrder(ctx context.Context) (v int, err error)
OldOrder returns the old "order" field's value of the Links entity. If the Links 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 (*LinksMutation) OldTitle ¶
func (m *LinksMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Links entity. If the Links 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 (*LinksMutation) OldURL ¶
func (m *LinksMutation) OldURL(ctx context.Context) (v string, err error)
OldURL returns the old "url" field's value of the Links entity. If the Links 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 (*LinksMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Links entity. If the Links 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 (*LinksMutation) OldUserID ¶
OldUserID returns the old "user_id" field's value of the Links entity. If the Links 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 (*LinksMutation) Order ¶
func (m *LinksMutation) Order() (r int, exists bool)
Order returns the value of the "order" field in the mutation.
func (*LinksMutation) RemovedEdges ¶
func (m *LinksMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LinksMutation) RemovedIDs ¶
func (m *LinksMutation) 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 (*LinksMutation) ResetCreatedAt ¶
func (m *LinksMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*LinksMutation) ResetDeleted ¶
func (m *LinksMutation) ResetDeleted()
ResetDeleted resets all changes to the "deleted" field.
func (*LinksMutation) ResetDescription ¶
func (m *LinksMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*LinksMutation) ResetEdge ¶
func (m *LinksMutation) 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 (*LinksMutation) ResetField ¶
func (m *LinksMutation) 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 (*LinksMutation) ResetImage ¶
func (m *LinksMutation) ResetImage()
ResetImage resets all changes to the "image" field.
func (*LinksMutation) ResetOrder ¶
func (m *LinksMutation) ResetOrder()
ResetOrder resets all changes to the "order" field.
func (*LinksMutation) ResetTitle ¶
func (m *LinksMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*LinksMutation) ResetURL ¶
func (m *LinksMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*LinksMutation) ResetUpdatedAt ¶
func (m *LinksMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*LinksMutation) ResetUser ¶
func (m *LinksMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*LinksMutation) ResetUserID ¶
func (m *LinksMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*LinksMutation) SetCreatedAt ¶
func (m *LinksMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*LinksMutation) SetDeleted ¶
func (m *LinksMutation) SetDeleted(b bool)
SetDeleted sets the "deleted" field.
func (*LinksMutation) SetDescription ¶
func (m *LinksMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*LinksMutation) SetField ¶
func (m *LinksMutation) 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 (*LinksMutation) SetID ¶
func (m *LinksMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Links entities.
func (*LinksMutation) SetImage ¶
func (m *LinksMutation) SetImage(s string)
SetImage sets the "image" field.
func (*LinksMutation) SetOp ¶
func (m *LinksMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LinksMutation) SetOrder ¶
func (m *LinksMutation) SetOrder(i int)
SetOrder sets the "order" field.
func (*LinksMutation) SetTitle ¶
func (m *LinksMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*LinksMutation) SetURL ¶
func (m *LinksMutation) SetURL(s string)
SetURL sets the "url" field.
func (*LinksMutation) SetUpdatedAt ¶
func (m *LinksMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*LinksMutation) SetUserID ¶
func (m *LinksMutation) SetUserID(u uuid.UUID)
SetUserID sets the "user_id" field.
func (*LinksMutation) Title ¶
func (m *LinksMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (LinksMutation) Tx ¶
func (m LinksMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LinksMutation) Type ¶
func (m *LinksMutation) Type() string
Type returns the node type of this mutation (Links).
func (*LinksMutation) URL ¶
func (m *LinksMutation) URL() (r string, exists bool)
URL returns the value of the "url" field in the mutation.
func (*LinksMutation) UpdatedAt ¶
func (m *LinksMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*LinksMutation) UserCleared ¶
func (m *LinksMutation) UserCleared() bool
UserCleared reports if the "user" edge to the Users entity was cleared.
func (*LinksMutation) UserID ¶
func (m *LinksMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*LinksMutation) UserIDs ¶
func (m *LinksMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*LinksMutation) Where ¶
func (m *LinksMutation) Where(ps ...predicate.Links)
Where appends a list predicates to the LinksMutation builder.
func (*LinksMutation) WhereP ¶
func (m *LinksMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LinksMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LinksQuery ¶
type LinksQuery struct {
// contains filtered or unexported fields
}
LinksQuery is the builder for querying Links entities.
func (*LinksQuery) Aggregate ¶
func (lq *LinksQuery) Aggregate(fns ...AggregateFunc) *LinksSelect
Aggregate returns a LinksSelect configured with the given aggregations.
func (*LinksQuery) All ¶
func (lq *LinksQuery) All(ctx context.Context) ([]*Links, error)
All executes the query and returns a list of LinksSlice.
func (*LinksQuery) AllX ¶
func (lq *LinksQuery) AllX(ctx context.Context) []*Links
AllX is like All, but panics if an error occurs.
func (*LinksQuery) Clone ¶
func (lq *LinksQuery) Clone() *LinksQuery
Clone returns a duplicate of the LinksQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LinksQuery) Count ¶
func (lq *LinksQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LinksQuery) CountX ¶
func (lq *LinksQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LinksQuery) Exist ¶
func (lq *LinksQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LinksQuery) ExistX ¶
func (lq *LinksQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LinksQuery) First ¶
func (lq *LinksQuery) First(ctx context.Context) (*Links, error)
First returns the first Links entity from the query. Returns a *NotFoundError when no Links was found.
func (*LinksQuery) FirstID ¶
FirstID returns the first Links ID from the query. Returns a *NotFoundError when no Links ID was found.
func (*LinksQuery) FirstIDX ¶
func (lq *LinksQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*LinksQuery) FirstX ¶
func (lq *LinksQuery) FirstX(ctx context.Context) *Links
FirstX is like First, but panics if an error occurs.
func (*LinksQuery) GroupBy ¶
func (lq *LinksQuery) GroupBy(field string, fields ...string) *LinksGroupBy
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 { UserID uuid.UUID `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.Links.Query(). GroupBy(links.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LinksQuery) IDsX ¶
func (lq *LinksQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*LinksQuery) Limit ¶
func (lq *LinksQuery) Limit(limit int) *LinksQuery
Limit the number of records to be returned by this query.
func (*LinksQuery) Offset ¶
func (lq *LinksQuery) Offset(offset int) *LinksQuery
Offset to start from.
func (*LinksQuery) Only ¶
func (lq *LinksQuery) Only(ctx context.Context) (*Links, error)
Only returns a single Links entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Links entity is found. Returns a *NotFoundError when no Links entities are found.
func (*LinksQuery) OnlyID ¶
OnlyID is like Only, but returns the only Links ID in the query. Returns a *NotSingularError when more than one Links ID is found. Returns a *NotFoundError when no entities are found.
func (*LinksQuery) OnlyIDX ¶
func (lq *LinksQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LinksQuery) OnlyX ¶
func (lq *LinksQuery) OnlyX(ctx context.Context) *Links
OnlyX is like Only, but panics if an error occurs.
func (*LinksQuery) Order ¶
func (lq *LinksQuery) Order(o ...links.OrderOption) *LinksQuery
Order specifies how the records should be ordered.
func (*LinksQuery) QueryUser ¶
func (lq *LinksQuery) QueryUser() *UsersQuery
QueryUser chains the current query on the "user" edge.
func (*LinksQuery) Select ¶
func (lq *LinksQuery) Select(fields ...string) *LinksSelect
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 { UserID uuid.UUID `json:"user_id,omitempty"` } client.Links.Query(). Select(links.FieldUserID). Scan(ctx, &v)
func (*LinksQuery) Unique ¶
func (lq *LinksQuery) Unique(unique bool) *LinksQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*LinksQuery) Where ¶
func (lq *LinksQuery) Where(ps ...predicate.Links) *LinksQuery
Where adds a new predicate for the LinksQuery builder.
func (*LinksQuery) WithUser ¶
func (lq *LinksQuery) WithUser(opts ...func(*UsersQuery)) *LinksQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type LinksSelect ¶
type LinksSelect struct { *LinksQuery // contains filtered or unexported fields }
LinksSelect is the builder for selecting fields of Links entities.
func (*LinksSelect) Aggregate ¶
func (ls *LinksSelect) Aggregate(fns ...AggregateFunc) *LinksSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LinksSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LinksSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LinksSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LinksSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LinksSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LinksSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LinksSelect) Scan ¶
func (ls *LinksSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LinksSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LinksUpdate ¶
type LinksUpdate struct {
// contains filtered or unexported fields
}
LinksUpdate is the builder for updating Links entities.
func (*LinksUpdate) AddOrder ¶
func (lu *LinksUpdate) AddOrder(i int) *LinksUpdate
AddOrder adds i to the "order" field.
func (*LinksUpdate) ClearDescription ¶
func (lu *LinksUpdate) ClearDescription() *LinksUpdate
ClearDescription clears the value of the "description" field.
func (*LinksUpdate) ClearImage ¶
func (lu *LinksUpdate) ClearImage() *LinksUpdate
ClearImage clears the value of the "image" field.
func (*LinksUpdate) ClearUser ¶
func (lu *LinksUpdate) ClearUser() *LinksUpdate
ClearUser clears the "user" edge to the Users entity.
func (*LinksUpdate) Exec ¶
func (lu *LinksUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LinksUpdate) ExecX ¶
func (lu *LinksUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LinksUpdate) Mutation ¶
func (lu *LinksUpdate) Mutation() *LinksMutation
Mutation returns the LinksMutation object of the builder.
func (*LinksUpdate) Save ¶
func (lu *LinksUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LinksUpdate) SaveX ¶
func (lu *LinksUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LinksUpdate) SetCreatedAt ¶
func (lu *LinksUpdate) SetCreatedAt(t time.Time) *LinksUpdate
SetCreatedAt sets the "created_at" field.
func (*LinksUpdate) SetDeleted ¶
func (lu *LinksUpdate) SetDeleted(b bool) *LinksUpdate
SetDeleted sets the "deleted" field.
func (*LinksUpdate) SetDescription ¶
func (lu *LinksUpdate) SetDescription(s string) *LinksUpdate
SetDescription sets the "description" field.
func (*LinksUpdate) SetImage ¶
func (lu *LinksUpdate) SetImage(s string) *LinksUpdate
SetImage sets the "image" field.
func (*LinksUpdate) SetNillableCreatedAt ¶
func (lu *LinksUpdate) SetNillableCreatedAt(t *time.Time) *LinksUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LinksUpdate) SetNillableDeleted ¶
func (lu *LinksUpdate) SetNillableDeleted(b *bool) *LinksUpdate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*LinksUpdate) SetNillableDescription ¶
func (lu *LinksUpdate) SetNillableDescription(s *string) *LinksUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LinksUpdate) SetNillableImage ¶
func (lu *LinksUpdate) SetNillableImage(s *string) *LinksUpdate
SetNillableImage sets the "image" field if the given value is not nil.
func (*LinksUpdate) SetNillableOrder ¶
func (lu *LinksUpdate) SetNillableOrder(i *int) *LinksUpdate
SetNillableOrder sets the "order" field if the given value is not nil.
func (*LinksUpdate) SetNillableTitle ¶
func (lu *LinksUpdate) SetNillableTitle(s *string) *LinksUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*LinksUpdate) SetNillableURL ¶
func (lu *LinksUpdate) SetNillableURL(s *string) *LinksUpdate
SetNillableURL sets the "url" field if the given value is not nil.
func (*LinksUpdate) SetNillableUserID ¶
func (lu *LinksUpdate) SetNillableUserID(u *uuid.UUID) *LinksUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*LinksUpdate) SetOrder ¶
func (lu *LinksUpdate) SetOrder(i int) *LinksUpdate
SetOrder sets the "order" field.
func (*LinksUpdate) SetTitle ¶
func (lu *LinksUpdate) SetTitle(s string) *LinksUpdate
SetTitle sets the "title" field.
func (*LinksUpdate) SetURL ¶
func (lu *LinksUpdate) SetURL(s string) *LinksUpdate
SetURL sets the "url" field.
func (*LinksUpdate) SetUpdatedAt ¶
func (lu *LinksUpdate) SetUpdatedAt(t time.Time) *LinksUpdate
SetUpdatedAt sets the "updated_at" field.
func (*LinksUpdate) SetUser ¶
func (lu *LinksUpdate) SetUser(u *Users) *LinksUpdate
SetUser sets the "user" edge to the Users entity.
func (*LinksUpdate) SetUserID ¶
func (lu *LinksUpdate) SetUserID(u uuid.UUID) *LinksUpdate
SetUserID sets the "user_id" field.
func (*LinksUpdate) Where ¶
func (lu *LinksUpdate) Where(ps ...predicate.Links) *LinksUpdate
Where appends a list predicates to the LinksUpdate builder.
type LinksUpdateOne ¶
type LinksUpdateOne struct {
// contains filtered or unexported fields
}
LinksUpdateOne is the builder for updating a single Links entity.
func (*LinksUpdateOne) AddOrder ¶
func (luo *LinksUpdateOne) AddOrder(i int) *LinksUpdateOne
AddOrder adds i to the "order" field.
func (*LinksUpdateOne) ClearDescription ¶
func (luo *LinksUpdateOne) ClearDescription() *LinksUpdateOne
ClearDescription clears the value of the "description" field.
func (*LinksUpdateOne) ClearImage ¶
func (luo *LinksUpdateOne) ClearImage() *LinksUpdateOne
ClearImage clears the value of the "image" field.
func (*LinksUpdateOne) ClearUser ¶
func (luo *LinksUpdateOne) ClearUser() *LinksUpdateOne
ClearUser clears the "user" edge to the Users entity.
func (*LinksUpdateOne) Exec ¶
func (luo *LinksUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LinksUpdateOne) ExecX ¶
func (luo *LinksUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LinksUpdateOne) Mutation ¶
func (luo *LinksUpdateOne) Mutation() *LinksMutation
Mutation returns the LinksMutation object of the builder.
func (*LinksUpdateOne) Save ¶
func (luo *LinksUpdateOne) Save(ctx context.Context) (*Links, error)
Save executes the query and returns the updated Links entity.
func (*LinksUpdateOne) SaveX ¶
func (luo *LinksUpdateOne) SaveX(ctx context.Context) *Links
SaveX is like Save, but panics if an error occurs.
func (*LinksUpdateOne) Select ¶
func (luo *LinksUpdateOne) Select(field string, fields ...string) *LinksUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LinksUpdateOne) SetCreatedAt ¶
func (luo *LinksUpdateOne) SetCreatedAt(t time.Time) *LinksUpdateOne
SetCreatedAt sets the "created_at" field.
func (*LinksUpdateOne) SetDeleted ¶
func (luo *LinksUpdateOne) SetDeleted(b bool) *LinksUpdateOne
SetDeleted sets the "deleted" field.
func (*LinksUpdateOne) SetDescription ¶
func (luo *LinksUpdateOne) SetDescription(s string) *LinksUpdateOne
SetDescription sets the "description" field.
func (*LinksUpdateOne) SetImage ¶
func (luo *LinksUpdateOne) SetImage(s string) *LinksUpdateOne
SetImage sets the "image" field.
func (*LinksUpdateOne) SetNillableCreatedAt ¶
func (luo *LinksUpdateOne) SetNillableCreatedAt(t *time.Time) *LinksUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LinksUpdateOne) SetNillableDeleted ¶
func (luo *LinksUpdateOne) SetNillableDeleted(b *bool) *LinksUpdateOne
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*LinksUpdateOne) SetNillableDescription ¶
func (luo *LinksUpdateOne) SetNillableDescription(s *string) *LinksUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LinksUpdateOne) SetNillableImage ¶
func (luo *LinksUpdateOne) SetNillableImage(s *string) *LinksUpdateOne
SetNillableImage sets the "image" field if the given value is not nil.
func (*LinksUpdateOne) SetNillableOrder ¶
func (luo *LinksUpdateOne) SetNillableOrder(i *int) *LinksUpdateOne
SetNillableOrder sets the "order" field if the given value is not nil.
func (*LinksUpdateOne) SetNillableTitle ¶
func (luo *LinksUpdateOne) SetNillableTitle(s *string) *LinksUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*LinksUpdateOne) SetNillableURL ¶
func (luo *LinksUpdateOne) SetNillableURL(s *string) *LinksUpdateOne
SetNillableURL sets the "url" field if the given value is not nil.
func (*LinksUpdateOne) SetNillableUserID ¶
func (luo *LinksUpdateOne) SetNillableUserID(u *uuid.UUID) *LinksUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*LinksUpdateOne) SetOrder ¶
func (luo *LinksUpdateOne) SetOrder(i int) *LinksUpdateOne
SetOrder sets the "order" field.
func (*LinksUpdateOne) SetTitle ¶
func (luo *LinksUpdateOne) SetTitle(s string) *LinksUpdateOne
SetTitle sets the "title" field.
func (*LinksUpdateOne) SetURL ¶
func (luo *LinksUpdateOne) SetURL(s string) *LinksUpdateOne
SetURL sets the "url" field.
func (*LinksUpdateOne) SetUpdatedAt ¶
func (luo *LinksUpdateOne) SetUpdatedAt(t time.Time) *LinksUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*LinksUpdateOne) SetUser ¶
func (luo *LinksUpdateOne) SetUser(u *Users) *LinksUpdateOne
SetUser sets the "user" edge to the Users entity.
func (*LinksUpdateOne) SetUserID ¶
func (luo *LinksUpdateOne) SetUserID(u uuid.UUID) *LinksUpdateOne
SetUserID sets the "user_id" field.
func (*LinksUpdateOne) Where ¶
func (luo *LinksUpdateOne) Where(ps ...predicate.Links) *LinksUpdateOne
Where appends a list predicates to the LinksUpdate builder.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Session ¶
type Session struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // SessionToken holds the value of the "session_token" field. SessionToken string `json:"session_token,omitempty"` // UserID holds the value of the "user_id" field. UserID uuid.UUID `json:"user_id,omitempty"` // ExpiresAt holds the value of the "expires_at" field. ExpiresAt time.Time `json:"expires_at,omitempty"` // Deleted holds the value of the "deleted" field. Deleted bool `json:"deleted,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"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SessionQuery when eager-loading is set. Edges SessionEdges `json:"edges"` // contains filtered or unexported fields }
Session is the model entity for the Session schema.
func (*Session) QueryUser ¶
func (s *Session) QueryUser() *UsersQuery
QueryUser queries the "user" edge of the Session entity.
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 builder for creating a Session entity.
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 builder for deleting the given entity.
func (*SessionClient) DeleteOneID ¶
func (c *SessionClient) DeleteOneID(id uuid.UUID) *SessionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SessionClient) Hooks ¶
func (c *SessionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SessionClient) Intercept ¶
func (c *SessionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `session.Intercept(f(g(h())))`.
func (*SessionClient) Interceptors ¶
func (c *SessionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SessionClient) MapCreateBulk ¶
func (c *SessionClient) MapCreateBulk(slice any, setFunc func(*SessionCreate, int)) *SessionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SessionClient) Query ¶
func (c *SessionClient) Query() *SessionQuery
Query returns a query builder for Session.
func (*SessionClient) QueryUser ¶
func (c *SessionClient) QueryUser(s *Session) *UsersQuery
QueryUser queries the user edge of a 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 uuid.UUID) *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) Exec ¶
func (sc *SessionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionCreate) ExecX ¶
func (sc *SessionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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) SetDeleted ¶
func (sc *SessionCreate) SetDeleted(b bool) *SessionCreate
SetDeleted sets the "deleted" 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(u uuid.UUID) *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) SetNillableDeleted ¶
func (sc *SessionCreate) SetNillableDeleted(b *bool) *SessionCreate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*SessionCreate) SetNillableID ¶
func (sc *SessionCreate) SetNillableID(u *uuid.UUID) *SessionCreate
SetNillableID sets the "id" 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) SetSessionToken ¶
func (sc *SessionCreate) SetSessionToken(s string) *SessionCreate
SetSessionToken sets the "session_token" field.
func (*SessionCreate) SetUpdatedAt ¶
func (sc *SessionCreate) SetUpdatedAt(t time.Time) *SessionCreate
SetUpdatedAt sets the "updated_at" field.
func (*SessionCreate) SetUser ¶
func (sc *SessionCreate) SetUser(u *Users) *SessionCreate
SetUser sets the "user" edge to the Users entity.
func (*SessionCreate) SetUserID ¶
func (sc *SessionCreate) SetUserID(u uuid.UUID) *SessionCreate
SetUserID sets the "user_id" field.
type SessionCreateBulk ¶
type SessionCreateBulk struct {
// contains filtered or unexported fields
}
SessionCreateBulk is the builder for creating many Session entities in bulk.
func (*SessionCreateBulk) Exec ¶
func (scb *SessionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionCreateBulk) ExecX ¶
func (scb *SessionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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 appends a list predicates 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.
func (*SessionDeleteOne) Where ¶
func (sdo *SessionDeleteOne) Where(ps ...predicate.Session) *SessionDeleteOne
Where appends a list predicates to the SessionDelete builder.
type SessionEdges ¶
type SessionEdges struct { // User holds the value of the user edge. User *Users `json:"user,omitempty"` // contains filtered or unexported fields }
SessionEdges holds the relations/edges for other nodes in the graph.
func (SessionEdges) UserOrErr ¶
func (e SessionEdges) UserOrErr() (*Users, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Scan ¶
func (sgb *SessionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SessionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
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) 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) ClearUser ¶
func (m *SessionMutation) ClearUser()
ClearUser clears the "user" edge to the Users entity.
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) Deleted ¶
func (m *SessionMutation) Deleted() (r bool, exists bool)
Deleted returns the value of the "deleted" 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) 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 uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SessionMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*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) OldDeleted ¶
func (m *SessionMutation) OldDeleted(ctx context.Context) (v bool, err error)
OldDeleted returns the old "deleted" 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) OldSessionToken ¶
func (m *SessionMutation) OldSessionToken(ctx context.Context) (v string, err error)
OldSessionToken returns the old "session_token" 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) 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) OldUserID ¶
OldUserID returns the old "user_id" 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) ResetDeleted ¶
func (m *SessionMutation) ResetDeleted()
ResetDeleted resets all changes to the "deleted" 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) ResetSessionToken ¶
func (m *SessionMutation) ResetSessionToken()
ResetSessionToken resets all changes to the "session_token" field.
func (*SessionMutation) ResetUpdatedAt ¶
func (m *SessionMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SessionMutation) ResetUser ¶
func (m *SessionMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*SessionMutation) ResetUserID ¶
func (m *SessionMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*SessionMutation) SessionToken ¶
func (m *SessionMutation) SessionToken() (r string, exists bool)
SessionToken returns the value of the "session_token" field in the mutation.
func (*SessionMutation) SetCreatedAt ¶
func (m *SessionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SessionMutation) SetDeleted ¶
func (m *SessionMutation) SetDeleted(b bool)
SetDeleted sets the "deleted" 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 uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Session entities.
func (*SessionMutation) SetOp ¶
func (m *SessionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SessionMutation) SetSessionToken ¶
func (m *SessionMutation) SetSessionToken(s string)
SetSessionToken sets the "session_token" field.
func (*SessionMutation) SetUpdatedAt ¶
func (m *SessionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*SessionMutation) SetUserID ¶
func (m *SessionMutation) SetUserID(u uuid.UUID)
SetUserID sets the "user_id" 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).
func (*SessionMutation) UpdatedAt ¶
func (m *SessionMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SessionMutation) UserCleared ¶
func (m *SessionMutation) UserCleared() bool
UserCleared reports if the "user" edge to the Users entity was cleared.
func (*SessionMutation) UserID ¶
func (m *SessionMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*SessionMutation) UserIDs ¶
func (m *SessionMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*SessionMutation) Where ¶
func (m *SessionMutation) Where(ps ...predicate.Session)
Where appends a list predicates to the SessionMutation builder.
func (*SessionMutation) WhereP ¶
func (m *SessionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SessionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SessionQuery ¶
type SessionQuery struct {
// contains filtered or unexported fields
}
SessionQuery is the builder for querying Session entities.
func (*SessionQuery) Aggregate ¶
func (sq *SessionQuery) Aggregate(fns ...AggregateFunc) *SessionSelect
Aggregate returns a SessionSelect configured with the given aggregations.
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 ¶
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) uuid.UUID
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 { SessionToken string `json:"session_token,omitempty"` Count int `json:"count,omitempty"` } client.Session.Query(). GroupBy(session.FieldSessionToken). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SessionQuery) IDsX ¶
func (sq *SessionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SessionQuery) Limit ¶
func (sq *SessionQuery) Limit(limit int) *SessionQuery
Limit the number of records to be returned by this query.
func (*SessionQuery) Offset ¶
func (sq *SessionQuery) Offset(offset int) *SessionQuery
Offset to start from.
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 more than one Session entity is found. Returns a *NotFoundError when no Session entities are found.
func (*SessionQuery) OnlyID ¶
OnlyID is like Only, but returns the only Session ID in the query. Returns a *NotSingularError when more than one Session ID is found. Returns a *NotFoundError when no entities are found.
func (*SessionQuery) OnlyIDX ¶
func (sq *SessionQuery) OnlyIDX(ctx context.Context) uuid.UUID
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 ...session.OrderOption) *SessionQuery
Order specifies how the records should be ordered.
func (*SessionQuery) QueryUser ¶
func (sq *SessionQuery) QueryUser() *UsersQuery
QueryUser chains the current query on the "user" edge.
func (*SessionQuery) Select ¶
func (sq *SessionQuery) Select(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 { SessionToken string `json:"session_token,omitempty"` } client.Session.Query(). Select(session.FieldSessionToken). Scan(ctx, &v)
func (*SessionQuery) Unique ¶
func (sq *SessionQuery) Unique(unique bool) *SessionQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*SessionQuery) Where ¶
func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
Where adds a new predicate for the SessionQuery builder.
func (*SessionQuery) WithUser ¶
func (sq *SessionQuery) WithUser(opts ...func(*UsersQuery)) *SessionQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type SessionSelect ¶
type SessionSelect struct { *SessionQuery // contains filtered or unexported fields }
SessionSelect is the builder for selecting fields of Session entities.
func (*SessionSelect) Aggregate ¶
func (ss *SessionSelect) Aggregate(fns ...AggregateFunc) *SessionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SessionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Scan ¶
func (ss *SessionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SessionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SessionUpdate ¶
type SessionUpdate struct {
// contains filtered or unexported fields
}
SessionUpdate is the builder for updating Session entities.
func (*SessionUpdate) ClearUser ¶
func (su *SessionUpdate) ClearUser() *SessionUpdate
ClearUser clears the "user" edge to the Users entity.
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) SetCreatedAt ¶
func (su *SessionUpdate) SetCreatedAt(t time.Time) *SessionUpdate
SetCreatedAt sets the "created_at" field.
func (*SessionUpdate) SetDeleted ¶
func (su *SessionUpdate) SetDeleted(b bool) *SessionUpdate
SetDeleted sets the "deleted" field.
func (*SessionUpdate) SetExpiresAt ¶
func (su *SessionUpdate) SetExpiresAt(t time.Time) *SessionUpdate
SetExpiresAt sets the "expires_at" field.
func (*SessionUpdate) SetNillableCreatedAt ¶
func (su *SessionUpdate) SetNillableCreatedAt(t *time.Time) *SessionUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SessionUpdate) SetNillableDeleted ¶
func (su *SessionUpdate) SetNillableDeleted(b *bool) *SessionUpdate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
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) SetNillableSessionToken ¶
func (su *SessionUpdate) SetNillableSessionToken(s *string) *SessionUpdate
SetNillableSessionToken sets the "session_token" field if the given value is not nil.
func (*SessionUpdate) SetNillableUserID ¶
func (su *SessionUpdate) SetNillableUserID(u *uuid.UUID) *SessionUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*SessionUpdate) SetSessionToken ¶
func (su *SessionUpdate) SetSessionToken(s string) *SessionUpdate
SetSessionToken sets the "session_token" field.
func (*SessionUpdate) SetUpdatedAt ¶
func (su *SessionUpdate) SetUpdatedAt(t time.Time) *SessionUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SessionUpdate) SetUser ¶
func (su *SessionUpdate) SetUser(u *Users) *SessionUpdate
SetUser sets the "user" edge to the Users entity.
func (*SessionUpdate) SetUserID ¶
func (su *SessionUpdate) SetUserID(u uuid.UUID) *SessionUpdate
SetUserID sets the "user_id" field.
func (*SessionUpdate) Where ¶
func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
Where appends a list predicates to 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) ClearUser ¶
func (suo *SessionUpdateOne) ClearUser() *SessionUpdateOne
ClearUser clears the "user" edge to the Users entity.
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) Select ¶
func (suo *SessionUpdateOne) Select(field string, fields ...string) *SessionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SessionUpdateOne) SetCreatedAt ¶
func (suo *SessionUpdateOne) SetCreatedAt(t time.Time) *SessionUpdateOne
SetCreatedAt sets the "created_at" field.
func (*SessionUpdateOne) SetDeleted ¶
func (suo *SessionUpdateOne) SetDeleted(b bool) *SessionUpdateOne
SetDeleted sets the "deleted" field.
func (*SessionUpdateOne) SetExpiresAt ¶
func (suo *SessionUpdateOne) SetExpiresAt(t time.Time) *SessionUpdateOne
SetExpiresAt sets the "expires_at" field.
func (*SessionUpdateOne) SetNillableCreatedAt ¶
func (suo *SessionUpdateOne) SetNillableCreatedAt(t *time.Time) *SessionUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SessionUpdateOne) SetNillableDeleted ¶
func (suo *SessionUpdateOne) SetNillableDeleted(b *bool) *SessionUpdateOne
SetNillableDeleted sets the "deleted" field if the given value is not nil.
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) SetNillableSessionToken ¶
func (suo *SessionUpdateOne) SetNillableSessionToken(s *string) *SessionUpdateOne
SetNillableSessionToken sets the "session_token" field if the given value is not nil.
func (*SessionUpdateOne) SetNillableUserID ¶
func (suo *SessionUpdateOne) SetNillableUserID(u *uuid.UUID) *SessionUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*SessionUpdateOne) SetSessionToken ¶
func (suo *SessionUpdateOne) SetSessionToken(s string) *SessionUpdateOne
SetSessionToken sets the "session_token" field.
func (*SessionUpdateOne) SetUpdatedAt ¶
func (suo *SessionUpdateOne) SetUpdatedAt(t time.Time) *SessionUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SessionUpdateOne) SetUser ¶
func (suo *SessionUpdateOne) SetUser(u *Users) *SessionUpdateOne
SetUser sets the "user" edge to the Users entity.
func (*SessionUpdateOne) SetUserID ¶
func (suo *SessionUpdateOne) SetUserID(u uuid.UUID) *SessionUpdateOne
SetUserID sets the "user_id" field.
func (*SessionUpdateOne) Where ¶
func (suo *SessionUpdateOne) Where(ps ...predicate.Session) *SessionUpdateOne
Where appends a list predicates to the SessionUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Account is the client for interacting with the Account builders. Account *AccountClient // Links is the client for interacting with the Links builders. Links *LinksClient // Session is the client for interacting with the Session builders. Session *SessionClient // Users is the client for interacting with the Users builders. Users *UsersClient // 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 Users ¶
type Users struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // ExternalID holds the value of the "external_id" field. ExternalID string `json:"external_id,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // GlobalName holds the value of the "global_name" field. GlobalName string `json:"global_name,omitempty"` // Slug holds the value of the "slug" field. Slug string `json:"slug,omitempty"` // Avatar holds the value of the "avatar" field. Avatar string `json:"avatar,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // AccessToken holds the value of the "access_token" field. AccessToken string `json:"access_token,omitempty"` // RefreshToken holds the value of the "refresh_token" field. RefreshToken string `json:"refresh_token,omitempty"` // Scope holds the value of the "scope" field. Scope string `json:"scope,omitempty"` // ExpiresIn holds the value of the "expires_in" field. ExpiresIn float64 `json:"expires_in,omitempty"` // SessionState holds the value of the "session_state" field. SessionState string `json:"session_state,omitempty"` // Deleted holds the value of the "deleted" field. Deleted bool `json:"deleted,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"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UsersQuery when eager-loading is set. Edges UsersEdges `json:"edges"` // contains filtered or unexported fields }
Users is the model entity for the Users schema.
func (*Users) QueryUsersAccounts ¶
func (u *Users) QueryUsersAccounts() *AccountQuery
QueryUsersAccounts queries the "users_accounts" edge of the Users entity.
func (*Users) QueryUsersLinks ¶
func (u *Users) QueryUsersLinks() *LinksQuery
QueryUsersLinks queries the "users_links" edge of the Users entity.
func (*Users) QueryUsersSessions ¶
func (u *Users) QueryUsersSessions() *SessionQuery
QueryUsersSessions queries the "users_sessions" edge of the Users entity.
func (*Users) Unwrap ¶
Unwrap unwraps the Users 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 (*Users) Update ¶
func (u *Users) Update() *UsersUpdateOne
Update returns a builder for updating this Users. Note that you need to call Users.Unwrap() before calling this method if this Users was returned from a transaction, and the transaction was committed or rolled back.
type UsersClient ¶
type UsersClient struct {
// contains filtered or unexported fields
}
UsersClient is a client for the Users schema.
func NewUsersClient ¶
func NewUsersClient(c config) *UsersClient
NewUsersClient returns a client for the Users from the given config.
func (*UsersClient) Create ¶
func (c *UsersClient) Create() *UsersCreate
Create returns a builder for creating a Users entity.
func (*UsersClient) CreateBulk ¶
func (c *UsersClient) CreateBulk(builders ...*UsersCreate) *UsersCreateBulk
CreateBulk returns a builder for creating a bulk of Users entities.
func (*UsersClient) Delete ¶
func (c *UsersClient) Delete() *UsersDelete
Delete returns a delete builder for Users.
func (*UsersClient) DeleteOne ¶
func (c *UsersClient) DeleteOne(u *Users) *UsersDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UsersClient) DeleteOneID ¶
func (c *UsersClient) DeleteOneID(id uuid.UUID) *UsersDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UsersClient) Intercept ¶
func (c *UsersClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `users.Intercept(f(g(h())))`.
func (*UsersClient) Interceptors ¶
func (c *UsersClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UsersClient) MapCreateBulk ¶
func (c *UsersClient) MapCreateBulk(slice any, setFunc func(*UsersCreate, int)) *UsersCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UsersClient) Query ¶
func (c *UsersClient) Query() *UsersQuery
Query returns a query builder for Users.
func (*UsersClient) QueryUsersAccounts ¶
func (c *UsersClient) QueryUsersAccounts(u *Users) *AccountQuery
QueryUsersAccounts queries the users_accounts edge of a Users.
func (*UsersClient) QueryUsersLinks ¶
func (c *UsersClient) QueryUsersLinks(u *Users) *LinksQuery
QueryUsersLinks queries the users_links edge of a Users.
func (*UsersClient) QueryUsersSessions ¶
func (c *UsersClient) QueryUsersSessions(u *Users) *SessionQuery
QueryUsersSessions queries the users_sessions edge of a Users.
func (*UsersClient) Update ¶
func (c *UsersClient) Update() *UsersUpdate
Update returns an update builder for Users.
func (*UsersClient) UpdateOne ¶
func (c *UsersClient) UpdateOne(u *Users) *UsersUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UsersClient) UpdateOneID ¶
func (c *UsersClient) UpdateOneID(id uuid.UUID) *UsersUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UsersClient) Use ¶
func (c *UsersClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `users.Hooks(f(g(h())))`.
type UsersCreate ¶
type UsersCreate struct {
// contains filtered or unexported fields
}
UsersCreate is the builder for creating a Users entity.
func (*UsersCreate) AddUsersAccountIDs ¶
func (uc *UsersCreate) AddUsersAccountIDs(ids ...uuid.UUID) *UsersCreate
AddUsersAccountIDs adds the "users_accounts" edge to the Account entity by IDs.
func (*UsersCreate) AddUsersAccounts ¶
func (uc *UsersCreate) AddUsersAccounts(a ...*Account) *UsersCreate
AddUsersAccounts adds the "users_accounts" edges to the Account entity.
func (*UsersCreate) AddUsersLinkIDs ¶
func (uc *UsersCreate) AddUsersLinkIDs(ids ...uuid.UUID) *UsersCreate
AddUsersLinkIDs adds the "users_links" edge to the Links entity by IDs.
func (*UsersCreate) AddUsersLinks ¶
func (uc *UsersCreate) AddUsersLinks(l ...*Links) *UsersCreate
AddUsersLinks adds the "users_links" edges to the Links entity.
func (*UsersCreate) AddUsersSessionIDs ¶
func (uc *UsersCreate) AddUsersSessionIDs(ids ...uuid.UUID) *UsersCreate
AddUsersSessionIDs adds the "users_sessions" edge to the Session entity by IDs.
func (*UsersCreate) AddUsersSessions ¶
func (uc *UsersCreate) AddUsersSessions(s ...*Session) *UsersCreate
AddUsersSessions adds the "users_sessions" edges to the Session entity.
func (*UsersCreate) Exec ¶
func (uc *UsersCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UsersCreate) ExecX ¶
func (uc *UsersCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsersCreate) Mutation ¶
func (uc *UsersCreate) Mutation() *UsersMutation
Mutation returns the UsersMutation object of the builder.
func (*UsersCreate) Save ¶
func (uc *UsersCreate) Save(ctx context.Context) (*Users, error)
Save creates the Users in the database.
func (*UsersCreate) SaveX ¶
func (uc *UsersCreate) SaveX(ctx context.Context) *Users
SaveX calls Save and panics if Save returns an error.
func (*UsersCreate) SetAccessToken ¶
func (uc *UsersCreate) SetAccessToken(s string) *UsersCreate
SetAccessToken sets the "access_token" field.
func (*UsersCreate) SetAvatar ¶
func (uc *UsersCreate) SetAvatar(s string) *UsersCreate
SetAvatar sets the "avatar" field.
func (*UsersCreate) SetCreatedAt ¶
func (uc *UsersCreate) SetCreatedAt(t time.Time) *UsersCreate
SetCreatedAt sets the "created_at" field.
func (*UsersCreate) SetDeleted ¶
func (uc *UsersCreate) SetDeleted(b bool) *UsersCreate
SetDeleted sets the "deleted" field.
func (*UsersCreate) SetDescription ¶
func (uc *UsersCreate) SetDescription(s string) *UsersCreate
SetDescription sets the "description" field.
func (*UsersCreate) SetExpiresIn ¶
func (uc *UsersCreate) SetExpiresIn(f float64) *UsersCreate
SetExpiresIn sets the "expires_in" field.
func (*UsersCreate) SetExternalID ¶
func (uc *UsersCreate) SetExternalID(s string) *UsersCreate
SetExternalID sets the "external_id" field.
func (*UsersCreate) SetGlobalName ¶
func (uc *UsersCreate) SetGlobalName(s string) *UsersCreate
SetGlobalName sets the "global_name" field.
func (*UsersCreate) SetID ¶
func (uc *UsersCreate) SetID(u uuid.UUID) *UsersCreate
SetID sets the "id" field.
func (*UsersCreate) SetNillableAccessToken ¶
func (uc *UsersCreate) SetNillableAccessToken(s *string) *UsersCreate
SetNillableAccessToken sets the "access_token" field if the given value is not nil.
func (*UsersCreate) SetNillableAvatar ¶
func (uc *UsersCreate) SetNillableAvatar(s *string) *UsersCreate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UsersCreate) SetNillableCreatedAt ¶
func (uc *UsersCreate) SetNillableCreatedAt(t *time.Time) *UsersCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UsersCreate) SetNillableDeleted ¶
func (uc *UsersCreate) SetNillableDeleted(b *bool) *UsersCreate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*UsersCreate) SetNillableDescription ¶
func (uc *UsersCreate) SetNillableDescription(s *string) *UsersCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*UsersCreate) SetNillableExpiresIn ¶
func (uc *UsersCreate) SetNillableExpiresIn(f *float64) *UsersCreate
SetNillableExpiresIn sets the "expires_in" field if the given value is not nil.
func (*UsersCreate) SetNillableID ¶
func (uc *UsersCreate) SetNillableID(u *uuid.UUID) *UsersCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UsersCreate) SetNillableRefreshToken ¶
func (uc *UsersCreate) SetNillableRefreshToken(s *string) *UsersCreate
SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.
func (*UsersCreate) SetNillableScope ¶
func (uc *UsersCreate) SetNillableScope(s *string) *UsersCreate
SetNillableScope sets the "scope" field if the given value is not nil.
func (*UsersCreate) SetNillableSessionState ¶
func (uc *UsersCreate) SetNillableSessionState(s *string) *UsersCreate
SetNillableSessionState sets the "session_state" field if the given value is not nil.
func (*UsersCreate) SetNillableUpdatedAt ¶
func (uc *UsersCreate) SetNillableUpdatedAt(t *time.Time) *UsersCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UsersCreate) SetRefreshToken ¶
func (uc *UsersCreate) SetRefreshToken(s string) *UsersCreate
SetRefreshToken sets the "refresh_token" field.
func (*UsersCreate) SetScope ¶
func (uc *UsersCreate) SetScope(s string) *UsersCreate
SetScope sets the "scope" field.
func (*UsersCreate) SetSessionState ¶
func (uc *UsersCreate) SetSessionState(s string) *UsersCreate
SetSessionState sets the "session_state" field.
func (*UsersCreate) SetSlug ¶
func (uc *UsersCreate) SetSlug(s string) *UsersCreate
SetSlug sets the "slug" field.
func (*UsersCreate) SetUpdatedAt ¶
func (uc *UsersCreate) SetUpdatedAt(t time.Time) *UsersCreate
SetUpdatedAt sets the "updated_at" field.
func (*UsersCreate) SetUsername ¶
func (uc *UsersCreate) SetUsername(s string) *UsersCreate
SetUsername sets the "username" field.
type UsersCreateBulk ¶
type UsersCreateBulk struct {
// contains filtered or unexported fields
}
UsersCreateBulk is the builder for creating many Users entities in bulk.
func (*UsersCreateBulk) Exec ¶
func (ucb *UsersCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UsersCreateBulk) ExecX ¶
func (ucb *UsersCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UsersDelete ¶
type UsersDelete struct {
// contains filtered or unexported fields
}
UsersDelete is the builder for deleting a Users entity.
func (*UsersDelete) Exec ¶
func (ud *UsersDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UsersDelete) ExecX ¶
func (ud *UsersDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UsersDelete) Where ¶
func (ud *UsersDelete) Where(ps ...predicate.Users) *UsersDelete
Where appends a list predicates to the UsersDelete builder.
type UsersDeleteOne ¶
type UsersDeleteOne struct {
// contains filtered or unexported fields
}
UsersDeleteOne is the builder for deleting a single Users entity.
func (*UsersDeleteOne) Exec ¶
func (udo *UsersDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UsersDeleteOne) ExecX ¶
func (udo *UsersDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsersDeleteOne) Where ¶
func (udo *UsersDeleteOne) Where(ps ...predicate.Users) *UsersDeleteOne
Where appends a list predicates to the UsersDelete builder.
type UsersEdges ¶
type UsersEdges struct { // UsersLinks holds the value of the users_links edge. UsersLinks []*Links `json:"users_links,omitempty"` // UsersSessions holds the value of the users_sessions edge. UsersSessions []*Session `json:"users_sessions,omitempty"` // UsersAccounts holds the value of the users_accounts edge. UsersAccounts []*Account `json:"users_accounts,omitempty"` // contains filtered or unexported fields }
UsersEdges holds the relations/edges for other nodes in the graph.
func (UsersEdges) UsersAccountsOrErr ¶
func (e UsersEdges) UsersAccountsOrErr() ([]*Account, error)
UsersAccountsOrErr returns the UsersAccounts value or an error if the edge was not loaded in eager-loading.
func (UsersEdges) UsersLinksOrErr ¶
func (e UsersEdges) UsersLinksOrErr() ([]*Links, error)
UsersLinksOrErr returns the UsersLinks value or an error if the edge was not loaded in eager-loading.
func (UsersEdges) UsersSessionsOrErr ¶
func (e UsersEdges) UsersSessionsOrErr() ([]*Session, error)
UsersSessionsOrErr returns the UsersSessions value or an error if the edge was not loaded in eager-loading.
type UsersGroupBy ¶
type UsersGroupBy struct {
// contains filtered or unexported fields
}
UsersGroupBy is the group-by builder for Users entities.
func (*UsersGroupBy) Aggregate ¶
func (ugb *UsersGroupBy) Aggregate(fns ...AggregateFunc) *UsersGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UsersGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Scan ¶
func (ugb *UsersGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UsersGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UsersMutation ¶
type UsersMutation struct {
// contains filtered or unexported fields
}
UsersMutation represents an operation that mutates the Users nodes in the graph.
func (*UsersMutation) AccessToken ¶
func (m *UsersMutation) AccessToken() (r string, exists bool)
AccessToken returns the value of the "access_token" field in the mutation.
func (*UsersMutation) AccessTokenCleared ¶
func (m *UsersMutation) AccessTokenCleared() bool
AccessTokenCleared returns if the "access_token" field was cleared in this mutation.
func (*UsersMutation) AddExpiresIn ¶
func (m *UsersMutation) AddExpiresIn(f float64)
AddExpiresIn adds f to the "expires_in" field.
func (*UsersMutation) AddField ¶
func (m *UsersMutation) 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 (*UsersMutation) AddUsersAccountIDs ¶
func (m *UsersMutation) AddUsersAccountIDs(ids ...uuid.UUID)
AddUsersAccountIDs adds the "users_accounts" edge to the Account entity by ids.
func (*UsersMutation) AddUsersLinkIDs ¶
func (m *UsersMutation) AddUsersLinkIDs(ids ...uuid.UUID)
AddUsersLinkIDs adds the "users_links" edge to the Links entity by ids.
func (*UsersMutation) AddUsersSessionIDs ¶
func (m *UsersMutation) AddUsersSessionIDs(ids ...uuid.UUID)
AddUsersSessionIDs adds the "users_sessions" edge to the Session entity by ids.
func (*UsersMutation) AddedEdges ¶
func (m *UsersMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UsersMutation) AddedExpiresIn ¶
func (m *UsersMutation) AddedExpiresIn() (r float64, exists bool)
AddedExpiresIn returns the value that was added to the "expires_in" field in this mutation.
func (*UsersMutation) AddedField ¶
func (m *UsersMutation) 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 (*UsersMutation) AddedFields ¶
func (m *UsersMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UsersMutation) AddedIDs ¶
func (m *UsersMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UsersMutation) Avatar ¶
func (m *UsersMutation) Avatar() (r string, exists bool)
Avatar returns the value of the "avatar" field in the mutation.
func (*UsersMutation) AvatarCleared ¶
func (m *UsersMutation) AvatarCleared() bool
AvatarCleared returns if the "avatar" field was cleared in this mutation.
func (*UsersMutation) ClearAccessToken ¶
func (m *UsersMutation) ClearAccessToken()
ClearAccessToken clears the value of the "access_token" field.
func (*UsersMutation) ClearAvatar ¶
func (m *UsersMutation) ClearAvatar()
ClearAvatar clears the value of the "avatar" field.
func (*UsersMutation) ClearDescription ¶
func (m *UsersMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*UsersMutation) ClearEdge ¶
func (m *UsersMutation) 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 (*UsersMutation) ClearExpiresIn ¶
func (m *UsersMutation) ClearExpiresIn()
ClearExpiresIn clears the value of the "expires_in" field.
func (*UsersMutation) ClearField ¶
func (m *UsersMutation) 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 (*UsersMutation) ClearRefreshToken ¶
func (m *UsersMutation) ClearRefreshToken()
ClearRefreshToken clears the value of the "refresh_token" field.
func (*UsersMutation) ClearScope ¶
func (m *UsersMutation) ClearScope()
ClearScope clears the value of the "scope" field.
func (*UsersMutation) ClearSessionState ¶
func (m *UsersMutation) ClearSessionState()
ClearSessionState clears the value of the "session_state" field.
func (*UsersMutation) ClearUsersAccounts ¶
func (m *UsersMutation) ClearUsersAccounts()
ClearUsersAccounts clears the "users_accounts" edge to the Account entity.
func (*UsersMutation) ClearUsersLinks ¶
func (m *UsersMutation) ClearUsersLinks()
ClearUsersLinks clears the "users_links" edge to the Links entity.
func (*UsersMutation) ClearUsersSessions ¶
func (m *UsersMutation) ClearUsersSessions()
ClearUsersSessions clears the "users_sessions" edge to the Session entity.
func (*UsersMutation) ClearedEdges ¶
func (m *UsersMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UsersMutation) ClearedFields ¶
func (m *UsersMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UsersMutation) Client ¶
func (m UsersMutation) 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 (*UsersMutation) CreatedAt ¶
func (m *UsersMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UsersMutation) Deleted ¶
func (m *UsersMutation) Deleted() (r bool, exists bool)
Deleted returns the value of the "deleted" field in the mutation.
func (*UsersMutation) Description ¶
func (m *UsersMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*UsersMutation) DescriptionCleared ¶
func (m *UsersMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*UsersMutation) EdgeCleared ¶
func (m *UsersMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UsersMutation) ExpiresIn ¶
func (m *UsersMutation) ExpiresIn() (r float64, exists bool)
ExpiresIn returns the value of the "expires_in" field in the mutation.
func (*UsersMutation) ExpiresInCleared ¶
func (m *UsersMutation) ExpiresInCleared() bool
ExpiresInCleared returns if the "expires_in" field was cleared in this mutation.
func (*UsersMutation) ExternalID ¶
func (m *UsersMutation) ExternalID() (r string, exists bool)
ExternalID returns the value of the "external_id" field in the mutation.
func (*UsersMutation) Field ¶
func (m *UsersMutation) 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 (*UsersMutation) FieldCleared ¶
func (m *UsersMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UsersMutation) Fields ¶
func (m *UsersMutation) 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 (*UsersMutation) GlobalName ¶
func (m *UsersMutation) GlobalName() (r string, exists bool)
GlobalName returns the value of the "global_name" field in the mutation.
func (*UsersMutation) ID ¶
func (m *UsersMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UsersMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UsersMutation) OldAccessToken ¶
func (m *UsersMutation) OldAccessToken(ctx context.Context) (v string, err error)
OldAccessToken returns the old "access_token" field's value of the Users entity. If the Users 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 (*UsersMutation) OldAvatar ¶
func (m *UsersMutation) OldAvatar(ctx context.Context) (v string, err error)
OldAvatar returns the old "avatar" field's value of the Users entity. If the Users 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 (*UsersMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Users entity. If the Users 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 (*UsersMutation) OldDeleted ¶
func (m *UsersMutation) OldDeleted(ctx context.Context) (v bool, err error)
OldDeleted returns the old "deleted" field's value of the Users entity. If the Users 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 (*UsersMutation) OldDescription ¶
func (m *UsersMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Users entity. If the Users 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 (*UsersMutation) OldExpiresIn ¶
func (m *UsersMutation) OldExpiresIn(ctx context.Context) (v float64, err error)
OldExpiresIn returns the old "expires_in" field's value of the Users entity. If the Users 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 (*UsersMutation) OldExternalID ¶
func (m *UsersMutation) OldExternalID(ctx context.Context) (v string, err error)
OldExternalID returns the old "external_id" field's value of the Users entity. If the Users 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 (*UsersMutation) 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 (*UsersMutation) OldGlobalName ¶
func (m *UsersMutation) OldGlobalName(ctx context.Context) (v string, err error)
OldGlobalName returns the old "global_name" field's value of the Users entity. If the Users 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 (*UsersMutation) OldRefreshToken ¶
func (m *UsersMutation) OldRefreshToken(ctx context.Context) (v string, err error)
OldRefreshToken returns the old "refresh_token" field's value of the Users entity. If the Users 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 (*UsersMutation) OldScope ¶
func (m *UsersMutation) OldScope(ctx context.Context) (v string, err error)
OldScope returns the old "scope" field's value of the Users entity. If the Users 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 (*UsersMutation) OldSessionState ¶
func (m *UsersMutation) OldSessionState(ctx context.Context) (v string, err error)
OldSessionState returns the old "session_state" field's value of the Users entity. If the Users 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 (*UsersMutation) OldSlug ¶
func (m *UsersMutation) OldSlug(ctx context.Context) (v string, err error)
OldSlug returns the old "slug" field's value of the Users entity. If the Users 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 (*UsersMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Users entity. If the Users 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 (*UsersMutation) OldUsername ¶
func (m *UsersMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the Users entity. If the Users 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 (*UsersMutation) RefreshToken ¶
func (m *UsersMutation) RefreshToken() (r string, exists bool)
RefreshToken returns the value of the "refresh_token" field in the mutation.
func (*UsersMutation) RefreshTokenCleared ¶
func (m *UsersMutation) RefreshTokenCleared() bool
RefreshTokenCleared returns if the "refresh_token" field was cleared in this mutation.
func (*UsersMutation) RemoveUsersAccountIDs ¶
func (m *UsersMutation) RemoveUsersAccountIDs(ids ...uuid.UUID)
RemoveUsersAccountIDs removes the "users_accounts" edge to the Account entity by IDs.
func (*UsersMutation) RemoveUsersLinkIDs ¶
func (m *UsersMutation) RemoveUsersLinkIDs(ids ...uuid.UUID)
RemoveUsersLinkIDs removes the "users_links" edge to the Links entity by IDs.
func (*UsersMutation) RemoveUsersSessionIDs ¶
func (m *UsersMutation) RemoveUsersSessionIDs(ids ...uuid.UUID)
RemoveUsersSessionIDs removes the "users_sessions" edge to the Session entity by IDs.
func (*UsersMutation) RemovedEdges ¶
func (m *UsersMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UsersMutation) RemovedIDs ¶
func (m *UsersMutation) 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 (*UsersMutation) RemovedUsersAccountsIDs ¶
func (m *UsersMutation) RemovedUsersAccountsIDs() (ids []uuid.UUID)
RemovedUsersAccounts returns the removed IDs of the "users_accounts" edge to the Account entity.
func (*UsersMutation) RemovedUsersLinksIDs ¶
func (m *UsersMutation) RemovedUsersLinksIDs() (ids []uuid.UUID)
RemovedUsersLinks returns the removed IDs of the "users_links" edge to the Links entity.
func (*UsersMutation) RemovedUsersSessionsIDs ¶
func (m *UsersMutation) RemovedUsersSessionsIDs() (ids []uuid.UUID)
RemovedUsersSessions returns the removed IDs of the "users_sessions" edge to the Session entity.
func (*UsersMutation) ResetAccessToken ¶
func (m *UsersMutation) ResetAccessToken()
ResetAccessToken resets all changes to the "access_token" field.
func (*UsersMutation) ResetAvatar ¶
func (m *UsersMutation) ResetAvatar()
ResetAvatar resets all changes to the "avatar" field.
func (*UsersMutation) ResetCreatedAt ¶
func (m *UsersMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UsersMutation) ResetDeleted ¶
func (m *UsersMutation) ResetDeleted()
ResetDeleted resets all changes to the "deleted" field.
func (*UsersMutation) ResetDescription ¶
func (m *UsersMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*UsersMutation) ResetEdge ¶
func (m *UsersMutation) 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 (*UsersMutation) ResetExpiresIn ¶
func (m *UsersMutation) ResetExpiresIn()
ResetExpiresIn resets all changes to the "expires_in" field.
func (*UsersMutation) ResetExternalID ¶
func (m *UsersMutation) ResetExternalID()
ResetExternalID resets all changes to the "external_id" field.
func (*UsersMutation) ResetField ¶
func (m *UsersMutation) 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 (*UsersMutation) ResetGlobalName ¶
func (m *UsersMutation) ResetGlobalName()
ResetGlobalName resets all changes to the "global_name" field.
func (*UsersMutation) ResetRefreshToken ¶
func (m *UsersMutation) ResetRefreshToken()
ResetRefreshToken resets all changes to the "refresh_token" field.
func (*UsersMutation) ResetScope ¶
func (m *UsersMutation) ResetScope()
ResetScope resets all changes to the "scope" field.
func (*UsersMutation) ResetSessionState ¶
func (m *UsersMutation) ResetSessionState()
ResetSessionState resets all changes to the "session_state" field.
func (*UsersMutation) ResetSlug ¶
func (m *UsersMutation) ResetSlug()
ResetSlug resets all changes to the "slug" field.
func (*UsersMutation) ResetUpdatedAt ¶
func (m *UsersMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UsersMutation) ResetUsername ¶
func (m *UsersMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UsersMutation) ResetUsersAccounts ¶
func (m *UsersMutation) ResetUsersAccounts()
ResetUsersAccounts resets all changes to the "users_accounts" edge.
func (*UsersMutation) ResetUsersLinks ¶
func (m *UsersMutation) ResetUsersLinks()
ResetUsersLinks resets all changes to the "users_links" edge.
func (*UsersMutation) ResetUsersSessions ¶
func (m *UsersMutation) ResetUsersSessions()
ResetUsersSessions resets all changes to the "users_sessions" edge.
func (*UsersMutation) Scope ¶
func (m *UsersMutation) Scope() (r string, exists bool)
Scope returns the value of the "scope" field in the mutation.
func (*UsersMutation) ScopeCleared ¶
func (m *UsersMutation) ScopeCleared() bool
ScopeCleared returns if the "scope" field was cleared in this mutation.
func (*UsersMutation) SessionState ¶
func (m *UsersMutation) SessionState() (r string, exists bool)
SessionState returns the value of the "session_state" field in the mutation.
func (*UsersMutation) SessionStateCleared ¶
func (m *UsersMutation) SessionStateCleared() bool
SessionStateCleared returns if the "session_state" field was cleared in this mutation.
func (*UsersMutation) SetAccessToken ¶
func (m *UsersMutation) SetAccessToken(s string)
SetAccessToken sets the "access_token" field.
func (*UsersMutation) SetAvatar ¶
func (m *UsersMutation) SetAvatar(s string)
SetAvatar sets the "avatar" field.
func (*UsersMutation) SetCreatedAt ¶
func (m *UsersMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UsersMutation) SetDeleted ¶
func (m *UsersMutation) SetDeleted(b bool)
SetDeleted sets the "deleted" field.
func (*UsersMutation) SetDescription ¶
func (m *UsersMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*UsersMutation) SetExpiresIn ¶
func (m *UsersMutation) SetExpiresIn(f float64)
SetExpiresIn sets the "expires_in" field.
func (*UsersMutation) SetExternalID ¶
func (m *UsersMutation) SetExternalID(s string)
SetExternalID sets the "external_id" field.
func (*UsersMutation) SetField ¶
func (m *UsersMutation) 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 (*UsersMutation) SetGlobalName ¶
func (m *UsersMutation) SetGlobalName(s string)
SetGlobalName sets the "global_name" field.
func (*UsersMutation) SetID ¶
func (m *UsersMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Users entities.
func (*UsersMutation) SetOp ¶
func (m *UsersMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UsersMutation) SetRefreshToken ¶
func (m *UsersMutation) SetRefreshToken(s string)
SetRefreshToken sets the "refresh_token" field.
func (*UsersMutation) SetScope ¶
func (m *UsersMutation) SetScope(s string)
SetScope sets the "scope" field.
func (*UsersMutation) SetSessionState ¶
func (m *UsersMutation) SetSessionState(s string)
SetSessionState sets the "session_state" field.
func (*UsersMutation) SetSlug ¶
func (m *UsersMutation) SetSlug(s string)
SetSlug sets the "slug" field.
func (*UsersMutation) SetUpdatedAt ¶
func (m *UsersMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UsersMutation) SetUsername ¶
func (m *UsersMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*UsersMutation) Slug ¶
func (m *UsersMutation) Slug() (r string, exists bool)
Slug returns the value of the "slug" field in the mutation.
func (UsersMutation) Tx ¶
func (m UsersMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UsersMutation) Type ¶
func (m *UsersMutation) Type() string
Type returns the node type of this mutation (Users).
func (*UsersMutation) UpdatedAt ¶
func (m *UsersMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UsersMutation) Username ¶
func (m *UsersMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UsersMutation) UsersAccountsCleared ¶
func (m *UsersMutation) UsersAccountsCleared() bool
UsersAccountsCleared reports if the "users_accounts" edge to the Account entity was cleared.
func (*UsersMutation) UsersAccountsIDs ¶
func (m *UsersMutation) UsersAccountsIDs() (ids []uuid.UUID)
UsersAccountsIDs returns the "users_accounts" edge IDs in the mutation.
func (*UsersMutation) UsersLinksCleared ¶
func (m *UsersMutation) UsersLinksCleared() bool
UsersLinksCleared reports if the "users_links" edge to the Links entity was cleared.
func (*UsersMutation) UsersLinksIDs ¶
func (m *UsersMutation) UsersLinksIDs() (ids []uuid.UUID)
UsersLinksIDs returns the "users_links" edge IDs in the mutation.
func (*UsersMutation) UsersSessionsCleared ¶
func (m *UsersMutation) UsersSessionsCleared() bool
UsersSessionsCleared reports if the "users_sessions" edge to the Session entity was cleared.
func (*UsersMutation) UsersSessionsIDs ¶
func (m *UsersMutation) UsersSessionsIDs() (ids []uuid.UUID)
UsersSessionsIDs returns the "users_sessions" edge IDs in the mutation.
func (*UsersMutation) Where ¶
func (m *UsersMutation) Where(ps ...predicate.Users)
Where appends a list predicates to the UsersMutation builder.
func (*UsersMutation) WhereP ¶
func (m *UsersMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UsersMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UsersQuery ¶
type UsersQuery struct {
// contains filtered or unexported fields
}
UsersQuery is the builder for querying Users entities.
func (*UsersQuery) Aggregate ¶
func (uq *UsersQuery) Aggregate(fns ...AggregateFunc) *UsersSelect
Aggregate returns a UsersSelect configured with the given aggregations.
func (*UsersQuery) All ¶
func (uq *UsersQuery) All(ctx context.Context) ([]*Users, error)
All executes the query and returns a list of UsersSlice.
func (*UsersQuery) AllX ¶
func (uq *UsersQuery) AllX(ctx context.Context) []*Users
AllX is like All, but panics if an error occurs.
func (*UsersQuery) Clone ¶
func (uq *UsersQuery) Clone() *UsersQuery
Clone returns a duplicate of the UsersQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UsersQuery) Count ¶
func (uq *UsersQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UsersQuery) CountX ¶
func (uq *UsersQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UsersQuery) Exist ¶
func (uq *UsersQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UsersQuery) ExistX ¶
func (uq *UsersQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UsersQuery) First ¶
func (uq *UsersQuery) First(ctx context.Context) (*Users, error)
First returns the first Users entity from the query. Returns a *NotFoundError when no Users was found.
func (*UsersQuery) FirstID ¶
FirstID returns the first Users ID from the query. Returns a *NotFoundError when no Users ID was found.
func (*UsersQuery) FirstIDX ¶
func (uq *UsersQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*UsersQuery) FirstX ¶
func (uq *UsersQuery) FirstX(ctx context.Context) *Users
FirstX is like First, but panics if an error occurs.
func (*UsersQuery) GroupBy ¶
func (uq *UsersQuery) GroupBy(field string, fields ...string) *UsersGroupBy
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 { ExternalID string `json:"external_id,omitempty"` Count int `json:"count,omitempty"` } client.Users.Query(). GroupBy(users.FieldExternalID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UsersQuery) IDsX ¶
func (uq *UsersQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*UsersQuery) Limit ¶
func (uq *UsersQuery) Limit(limit int) *UsersQuery
Limit the number of records to be returned by this query.
func (*UsersQuery) Offset ¶
func (uq *UsersQuery) Offset(offset int) *UsersQuery
Offset to start from.
func (*UsersQuery) Only ¶
func (uq *UsersQuery) Only(ctx context.Context) (*Users, error)
Only returns a single Users entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Users entity is found. Returns a *NotFoundError when no Users entities are found.
func (*UsersQuery) OnlyID ¶
OnlyID is like Only, but returns the only Users ID in the query. Returns a *NotSingularError when more than one Users ID is found. Returns a *NotFoundError when no entities are found.
func (*UsersQuery) OnlyIDX ¶
func (uq *UsersQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UsersQuery) OnlyX ¶
func (uq *UsersQuery) OnlyX(ctx context.Context) *Users
OnlyX is like Only, but panics if an error occurs.
func (*UsersQuery) Order ¶
func (uq *UsersQuery) Order(o ...users.OrderOption) *UsersQuery
Order specifies how the records should be ordered.
func (*UsersQuery) QueryUsersAccounts ¶
func (uq *UsersQuery) QueryUsersAccounts() *AccountQuery
QueryUsersAccounts chains the current query on the "users_accounts" edge.
func (*UsersQuery) QueryUsersLinks ¶
func (uq *UsersQuery) QueryUsersLinks() *LinksQuery
QueryUsersLinks chains the current query on the "users_links" edge.
func (*UsersQuery) QueryUsersSessions ¶
func (uq *UsersQuery) QueryUsersSessions() *SessionQuery
QueryUsersSessions chains the current query on the "users_sessions" edge.
func (*UsersQuery) Select ¶
func (uq *UsersQuery) Select(fields ...string) *UsersSelect
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 { ExternalID string `json:"external_id,omitempty"` } client.Users.Query(). Select(users.FieldExternalID). Scan(ctx, &v)
func (*UsersQuery) Unique ¶
func (uq *UsersQuery) Unique(unique bool) *UsersQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UsersQuery) Where ¶
func (uq *UsersQuery) Where(ps ...predicate.Users) *UsersQuery
Where adds a new predicate for the UsersQuery builder.
func (*UsersQuery) WithUsersAccounts ¶
func (uq *UsersQuery) WithUsersAccounts(opts ...func(*AccountQuery)) *UsersQuery
WithUsersAccounts tells the query-builder to eager-load the nodes that are connected to the "users_accounts" edge. The optional arguments are used to configure the query builder of the edge.
func (*UsersQuery) WithUsersLinks ¶
func (uq *UsersQuery) WithUsersLinks(opts ...func(*LinksQuery)) *UsersQuery
WithUsersLinks tells the query-builder to eager-load the nodes that are connected to the "users_links" edge. The optional arguments are used to configure the query builder of the edge.
func (*UsersQuery) WithUsersSessions ¶
func (uq *UsersQuery) WithUsersSessions(opts ...func(*SessionQuery)) *UsersQuery
WithUsersSessions tells the query-builder to eager-load the nodes that are connected to the "users_sessions" edge. The optional arguments are used to configure the query builder of the edge.
type UsersSelect ¶
type UsersSelect struct { *UsersQuery // contains filtered or unexported fields }
UsersSelect is the builder for selecting fields of Users entities.
func (*UsersSelect) Aggregate ¶
func (us *UsersSelect) Aggregate(fns ...AggregateFunc) *UsersSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UsersSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Scan ¶
func (us *UsersSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UsersSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UsersUpdate ¶
type UsersUpdate struct {
// contains filtered or unexported fields
}
UsersUpdate is the builder for updating Users entities.
func (*UsersUpdate) AddExpiresIn ¶
func (uu *UsersUpdate) AddExpiresIn(f float64) *UsersUpdate
AddExpiresIn adds f to the "expires_in" field.
func (*UsersUpdate) AddUsersAccountIDs ¶
func (uu *UsersUpdate) AddUsersAccountIDs(ids ...uuid.UUID) *UsersUpdate
AddUsersAccountIDs adds the "users_accounts" edge to the Account entity by IDs.
func (*UsersUpdate) AddUsersAccounts ¶
func (uu *UsersUpdate) AddUsersAccounts(a ...*Account) *UsersUpdate
AddUsersAccounts adds the "users_accounts" edges to the Account entity.
func (*UsersUpdate) AddUsersLinkIDs ¶
func (uu *UsersUpdate) AddUsersLinkIDs(ids ...uuid.UUID) *UsersUpdate
AddUsersLinkIDs adds the "users_links" edge to the Links entity by IDs.
func (*UsersUpdate) AddUsersLinks ¶
func (uu *UsersUpdate) AddUsersLinks(l ...*Links) *UsersUpdate
AddUsersLinks adds the "users_links" edges to the Links entity.
func (*UsersUpdate) AddUsersSessionIDs ¶
func (uu *UsersUpdate) AddUsersSessionIDs(ids ...uuid.UUID) *UsersUpdate
AddUsersSessionIDs adds the "users_sessions" edge to the Session entity by IDs.
func (*UsersUpdate) AddUsersSessions ¶
func (uu *UsersUpdate) AddUsersSessions(s ...*Session) *UsersUpdate
AddUsersSessions adds the "users_sessions" edges to the Session entity.
func (*UsersUpdate) ClearAccessToken ¶
func (uu *UsersUpdate) ClearAccessToken() *UsersUpdate
ClearAccessToken clears the value of the "access_token" field.
func (*UsersUpdate) ClearAvatar ¶
func (uu *UsersUpdate) ClearAvatar() *UsersUpdate
ClearAvatar clears the value of the "avatar" field.
func (*UsersUpdate) ClearDescription ¶
func (uu *UsersUpdate) ClearDescription() *UsersUpdate
ClearDescription clears the value of the "description" field.
func (*UsersUpdate) ClearExpiresIn ¶
func (uu *UsersUpdate) ClearExpiresIn() *UsersUpdate
ClearExpiresIn clears the value of the "expires_in" field.
func (*UsersUpdate) ClearRefreshToken ¶
func (uu *UsersUpdate) ClearRefreshToken() *UsersUpdate
ClearRefreshToken clears the value of the "refresh_token" field.
func (*UsersUpdate) ClearScope ¶
func (uu *UsersUpdate) ClearScope() *UsersUpdate
ClearScope clears the value of the "scope" field.
func (*UsersUpdate) ClearSessionState ¶
func (uu *UsersUpdate) ClearSessionState() *UsersUpdate
ClearSessionState clears the value of the "session_state" field.
func (*UsersUpdate) ClearUsersAccounts ¶
func (uu *UsersUpdate) ClearUsersAccounts() *UsersUpdate
ClearUsersAccounts clears all "users_accounts" edges to the Account entity.
func (*UsersUpdate) ClearUsersLinks ¶
func (uu *UsersUpdate) ClearUsersLinks() *UsersUpdate
ClearUsersLinks clears all "users_links" edges to the Links entity.
func (*UsersUpdate) ClearUsersSessions ¶
func (uu *UsersUpdate) ClearUsersSessions() *UsersUpdate
ClearUsersSessions clears all "users_sessions" edges to the Session entity.
func (*UsersUpdate) Exec ¶
func (uu *UsersUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UsersUpdate) ExecX ¶
func (uu *UsersUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsersUpdate) Mutation ¶
func (uu *UsersUpdate) Mutation() *UsersMutation
Mutation returns the UsersMutation object of the builder.
func (*UsersUpdate) RemoveUsersAccountIDs ¶
func (uu *UsersUpdate) RemoveUsersAccountIDs(ids ...uuid.UUID) *UsersUpdate
RemoveUsersAccountIDs removes the "users_accounts" edge to Account entities by IDs.
func (*UsersUpdate) RemoveUsersAccounts ¶
func (uu *UsersUpdate) RemoveUsersAccounts(a ...*Account) *UsersUpdate
RemoveUsersAccounts removes "users_accounts" edges to Account entities.
func (*UsersUpdate) RemoveUsersLinkIDs ¶
func (uu *UsersUpdate) RemoveUsersLinkIDs(ids ...uuid.UUID) *UsersUpdate
RemoveUsersLinkIDs removes the "users_links" edge to Links entities by IDs.
func (*UsersUpdate) RemoveUsersLinks ¶
func (uu *UsersUpdate) RemoveUsersLinks(l ...*Links) *UsersUpdate
RemoveUsersLinks removes "users_links" edges to Links entities.
func (*UsersUpdate) RemoveUsersSessionIDs ¶
func (uu *UsersUpdate) RemoveUsersSessionIDs(ids ...uuid.UUID) *UsersUpdate
RemoveUsersSessionIDs removes the "users_sessions" edge to Session entities by IDs.
func (*UsersUpdate) RemoveUsersSessions ¶
func (uu *UsersUpdate) RemoveUsersSessions(s ...*Session) *UsersUpdate
RemoveUsersSessions removes "users_sessions" edges to Session entities.
func (*UsersUpdate) Save ¶
func (uu *UsersUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UsersUpdate) SaveX ¶
func (uu *UsersUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UsersUpdate) SetAccessToken ¶
func (uu *UsersUpdate) SetAccessToken(s string) *UsersUpdate
SetAccessToken sets the "access_token" field.
func (*UsersUpdate) SetAvatar ¶
func (uu *UsersUpdate) SetAvatar(s string) *UsersUpdate
SetAvatar sets the "avatar" field.
func (*UsersUpdate) SetCreatedAt ¶
func (uu *UsersUpdate) SetCreatedAt(t time.Time) *UsersUpdate
SetCreatedAt sets the "created_at" field.
func (*UsersUpdate) SetDeleted ¶
func (uu *UsersUpdate) SetDeleted(b bool) *UsersUpdate
SetDeleted sets the "deleted" field.
func (*UsersUpdate) SetDescription ¶
func (uu *UsersUpdate) SetDescription(s string) *UsersUpdate
SetDescription sets the "description" field.
func (*UsersUpdate) SetExpiresIn ¶
func (uu *UsersUpdate) SetExpiresIn(f float64) *UsersUpdate
SetExpiresIn sets the "expires_in" field.
func (*UsersUpdate) SetExternalID ¶
func (uu *UsersUpdate) SetExternalID(s string) *UsersUpdate
SetExternalID sets the "external_id" field.
func (*UsersUpdate) SetGlobalName ¶
func (uu *UsersUpdate) SetGlobalName(s string) *UsersUpdate
SetGlobalName sets the "global_name" field.
func (*UsersUpdate) SetNillableAccessToken ¶
func (uu *UsersUpdate) SetNillableAccessToken(s *string) *UsersUpdate
SetNillableAccessToken sets the "access_token" field if the given value is not nil.
func (*UsersUpdate) SetNillableAvatar ¶
func (uu *UsersUpdate) SetNillableAvatar(s *string) *UsersUpdate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UsersUpdate) SetNillableCreatedAt ¶
func (uu *UsersUpdate) SetNillableCreatedAt(t *time.Time) *UsersUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UsersUpdate) SetNillableDeleted ¶
func (uu *UsersUpdate) SetNillableDeleted(b *bool) *UsersUpdate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*UsersUpdate) SetNillableDescription ¶
func (uu *UsersUpdate) SetNillableDescription(s *string) *UsersUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*UsersUpdate) SetNillableExpiresIn ¶
func (uu *UsersUpdate) SetNillableExpiresIn(f *float64) *UsersUpdate
SetNillableExpiresIn sets the "expires_in" field if the given value is not nil.
func (*UsersUpdate) SetNillableExternalID ¶
func (uu *UsersUpdate) SetNillableExternalID(s *string) *UsersUpdate
SetNillableExternalID sets the "external_id" field if the given value is not nil.
func (*UsersUpdate) SetNillableGlobalName ¶
func (uu *UsersUpdate) SetNillableGlobalName(s *string) *UsersUpdate
SetNillableGlobalName sets the "global_name" field if the given value is not nil.
func (*UsersUpdate) SetNillableRefreshToken ¶
func (uu *UsersUpdate) SetNillableRefreshToken(s *string) *UsersUpdate
SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.
func (*UsersUpdate) SetNillableScope ¶
func (uu *UsersUpdate) SetNillableScope(s *string) *UsersUpdate
SetNillableScope sets the "scope" field if the given value is not nil.
func (*UsersUpdate) SetNillableSessionState ¶
func (uu *UsersUpdate) SetNillableSessionState(s *string) *UsersUpdate
SetNillableSessionState sets the "session_state" field if the given value is not nil.
func (*UsersUpdate) SetNillableSlug ¶
func (uu *UsersUpdate) SetNillableSlug(s *string) *UsersUpdate
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*UsersUpdate) SetNillableUsername ¶
func (uu *UsersUpdate) SetNillableUsername(s *string) *UsersUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UsersUpdate) SetRefreshToken ¶
func (uu *UsersUpdate) SetRefreshToken(s string) *UsersUpdate
SetRefreshToken sets the "refresh_token" field.
func (*UsersUpdate) SetScope ¶
func (uu *UsersUpdate) SetScope(s string) *UsersUpdate
SetScope sets the "scope" field.
func (*UsersUpdate) SetSessionState ¶
func (uu *UsersUpdate) SetSessionState(s string) *UsersUpdate
SetSessionState sets the "session_state" field.
func (*UsersUpdate) SetSlug ¶
func (uu *UsersUpdate) SetSlug(s string) *UsersUpdate
SetSlug sets the "slug" field.
func (*UsersUpdate) SetUpdatedAt ¶
func (uu *UsersUpdate) SetUpdatedAt(t time.Time) *UsersUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UsersUpdate) SetUsername ¶
func (uu *UsersUpdate) SetUsername(s string) *UsersUpdate
SetUsername sets the "username" field.
func (*UsersUpdate) Where ¶
func (uu *UsersUpdate) Where(ps ...predicate.Users) *UsersUpdate
Where appends a list predicates to the UsersUpdate builder.
type UsersUpdateOne ¶
type UsersUpdateOne struct {
// contains filtered or unexported fields
}
UsersUpdateOne is the builder for updating a single Users entity.
func (*UsersUpdateOne) AddExpiresIn ¶
func (uuo *UsersUpdateOne) AddExpiresIn(f float64) *UsersUpdateOne
AddExpiresIn adds f to the "expires_in" field.
func (*UsersUpdateOne) AddUsersAccountIDs ¶
func (uuo *UsersUpdateOne) AddUsersAccountIDs(ids ...uuid.UUID) *UsersUpdateOne
AddUsersAccountIDs adds the "users_accounts" edge to the Account entity by IDs.
func (*UsersUpdateOne) AddUsersAccounts ¶
func (uuo *UsersUpdateOne) AddUsersAccounts(a ...*Account) *UsersUpdateOne
AddUsersAccounts adds the "users_accounts" edges to the Account entity.
func (*UsersUpdateOne) AddUsersLinkIDs ¶
func (uuo *UsersUpdateOne) AddUsersLinkIDs(ids ...uuid.UUID) *UsersUpdateOne
AddUsersLinkIDs adds the "users_links" edge to the Links entity by IDs.
func (*UsersUpdateOne) AddUsersLinks ¶
func (uuo *UsersUpdateOne) AddUsersLinks(l ...*Links) *UsersUpdateOne
AddUsersLinks adds the "users_links" edges to the Links entity.
func (*UsersUpdateOne) AddUsersSessionIDs ¶
func (uuo *UsersUpdateOne) AddUsersSessionIDs(ids ...uuid.UUID) *UsersUpdateOne
AddUsersSessionIDs adds the "users_sessions" edge to the Session entity by IDs.
func (*UsersUpdateOne) AddUsersSessions ¶
func (uuo *UsersUpdateOne) AddUsersSessions(s ...*Session) *UsersUpdateOne
AddUsersSessions adds the "users_sessions" edges to the Session entity.
func (*UsersUpdateOne) ClearAccessToken ¶
func (uuo *UsersUpdateOne) ClearAccessToken() *UsersUpdateOne
ClearAccessToken clears the value of the "access_token" field.
func (*UsersUpdateOne) ClearAvatar ¶
func (uuo *UsersUpdateOne) ClearAvatar() *UsersUpdateOne
ClearAvatar clears the value of the "avatar" field.
func (*UsersUpdateOne) ClearDescription ¶
func (uuo *UsersUpdateOne) ClearDescription() *UsersUpdateOne
ClearDescription clears the value of the "description" field.
func (*UsersUpdateOne) ClearExpiresIn ¶
func (uuo *UsersUpdateOne) ClearExpiresIn() *UsersUpdateOne
ClearExpiresIn clears the value of the "expires_in" field.
func (*UsersUpdateOne) ClearRefreshToken ¶
func (uuo *UsersUpdateOne) ClearRefreshToken() *UsersUpdateOne
ClearRefreshToken clears the value of the "refresh_token" field.
func (*UsersUpdateOne) ClearScope ¶
func (uuo *UsersUpdateOne) ClearScope() *UsersUpdateOne
ClearScope clears the value of the "scope" field.
func (*UsersUpdateOne) ClearSessionState ¶
func (uuo *UsersUpdateOne) ClearSessionState() *UsersUpdateOne
ClearSessionState clears the value of the "session_state" field.
func (*UsersUpdateOne) ClearUsersAccounts ¶
func (uuo *UsersUpdateOne) ClearUsersAccounts() *UsersUpdateOne
ClearUsersAccounts clears all "users_accounts" edges to the Account entity.
func (*UsersUpdateOne) ClearUsersLinks ¶
func (uuo *UsersUpdateOne) ClearUsersLinks() *UsersUpdateOne
ClearUsersLinks clears all "users_links" edges to the Links entity.
func (*UsersUpdateOne) ClearUsersSessions ¶
func (uuo *UsersUpdateOne) ClearUsersSessions() *UsersUpdateOne
ClearUsersSessions clears all "users_sessions" edges to the Session entity.
func (*UsersUpdateOne) Exec ¶
func (uuo *UsersUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UsersUpdateOne) ExecX ¶
func (uuo *UsersUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsersUpdateOne) Mutation ¶
func (uuo *UsersUpdateOne) Mutation() *UsersMutation
Mutation returns the UsersMutation object of the builder.
func (*UsersUpdateOne) RemoveUsersAccountIDs ¶
func (uuo *UsersUpdateOne) RemoveUsersAccountIDs(ids ...uuid.UUID) *UsersUpdateOne
RemoveUsersAccountIDs removes the "users_accounts" edge to Account entities by IDs.
func (*UsersUpdateOne) RemoveUsersAccounts ¶
func (uuo *UsersUpdateOne) RemoveUsersAccounts(a ...*Account) *UsersUpdateOne
RemoveUsersAccounts removes "users_accounts" edges to Account entities.
func (*UsersUpdateOne) RemoveUsersLinkIDs ¶
func (uuo *UsersUpdateOne) RemoveUsersLinkIDs(ids ...uuid.UUID) *UsersUpdateOne
RemoveUsersLinkIDs removes the "users_links" edge to Links entities by IDs.
func (*UsersUpdateOne) RemoveUsersLinks ¶
func (uuo *UsersUpdateOne) RemoveUsersLinks(l ...*Links) *UsersUpdateOne
RemoveUsersLinks removes "users_links" edges to Links entities.
func (*UsersUpdateOne) RemoveUsersSessionIDs ¶
func (uuo *UsersUpdateOne) RemoveUsersSessionIDs(ids ...uuid.UUID) *UsersUpdateOne
RemoveUsersSessionIDs removes the "users_sessions" edge to Session entities by IDs.
func (*UsersUpdateOne) RemoveUsersSessions ¶
func (uuo *UsersUpdateOne) RemoveUsersSessions(s ...*Session) *UsersUpdateOne
RemoveUsersSessions removes "users_sessions" edges to Session entities.
func (*UsersUpdateOne) Save ¶
func (uuo *UsersUpdateOne) Save(ctx context.Context) (*Users, error)
Save executes the query and returns the updated Users entity.
func (*UsersUpdateOne) SaveX ¶
func (uuo *UsersUpdateOne) SaveX(ctx context.Context) *Users
SaveX is like Save, but panics if an error occurs.
func (*UsersUpdateOne) Select ¶
func (uuo *UsersUpdateOne) Select(field string, fields ...string) *UsersUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UsersUpdateOne) SetAccessToken ¶
func (uuo *UsersUpdateOne) SetAccessToken(s string) *UsersUpdateOne
SetAccessToken sets the "access_token" field.
func (*UsersUpdateOne) SetAvatar ¶
func (uuo *UsersUpdateOne) SetAvatar(s string) *UsersUpdateOne
SetAvatar sets the "avatar" field.
func (*UsersUpdateOne) SetCreatedAt ¶
func (uuo *UsersUpdateOne) SetCreatedAt(t time.Time) *UsersUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UsersUpdateOne) SetDeleted ¶
func (uuo *UsersUpdateOne) SetDeleted(b bool) *UsersUpdateOne
SetDeleted sets the "deleted" field.
func (*UsersUpdateOne) SetDescription ¶
func (uuo *UsersUpdateOne) SetDescription(s string) *UsersUpdateOne
SetDescription sets the "description" field.
func (*UsersUpdateOne) SetExpiresIn ¶
func (uuo *UsersUpdateOne) SetExpiresIn(f float64) *UsersUpdateOne
SetExpiresIn sets the "expires_in" field.
func (*UsersUpdateOne) SetExternalID ¶
func (uuo *UsersUpdateOne) SetExternalID(s string) *UsersUpdateOne
SetExternalID sets the "external_id" field.
func (*UsersUpdateOne) SetGlobalName ¶
func (uuo *UsersUpdateOne) SetGlobalName(s string) *UsersUpdateOne
SetGlobalName sets the "global_name" field.
func (*UsersUpdateOne) SetNillableAccessToken ¶
func (uuo *UsersUpdateOne) SetNillableAccessToken(s *string) *UsersUpdateOne
SetNillableAccessToken sets the "access_token" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableAvatar ¶
func (uuo *UsersUpdateOne) SetNillableAvatar(s *string) *UsersUpdateOne
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableCreatedAt ¶
func (uuo *UsersUpdateOne) SetNillableCreatedAt(t *time.Time) *UsersUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableDeleted ¶
func (uuo *UsersUpdateOne) SetNillableDeleted(b *bool) *UsersUpdateOne
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableDescription ¶
func (uuo *UsersUpdateOne) SetNillableDescription(s *string) *UsersUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableExpiresIn ¶
func (uuo *UsersUpdateOne) SetNillableExpiresIn(f *float64) *UsersUpdateOne
SetNillableExpiresIn sets the "expires_in" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableExternalID ¶
func (uuo *UsersUpdateOne) SetNillableExternalID(s *string) *UsersUpdateOne
SetNillableExternalID sets the "external_id" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableGlobalName ¶
func (uuo *UsersUpdateOne) SetNillableGlobalName(s *string) *UsersUpdateOne
SetNillableGlobalName sets the "global_name" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableRefreshToken ¶
func (uuo *UsersUpdateOne) SetNillableRefreshToken(s *string) *UsersUpdateOne
SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableScope ¶
func (uuo *UsersUpdateOne) SetNillableScope(s *string) *UsersUpdateOne
SetNillableScope sets the "scope" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableSessionState ¶
func (uuo *UsersUpdateOne) SetNillableSessionState(s *string) *UsersUpdateOne
SetNillableSessionState sets the "session_state" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableSlug ¶
func (uuo *UsersUpdateOne) SetNillableSlug(s *string) *UsersUpdateOne
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableUsername ¶
func (uuo *UsersUpdateOne) SetNillableUsername(s *string) *UsersUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UsersUpdateOne) SetRefreshToken ¶
func (uuo *UsersUpdateOne) SetRefreshToken(s string) *UsersUpdateOne
SetRefreshToken sets the "refresh_token" field.
func (*UsersUpdateOne) SetScope ¶
func (uuo *UsersUpdateOne) SetScope(s string) *UsersUpdateOne
SetScope sets the "scope" field.
func (*UsersUpdateOne) SetSessionState ¶
func (uuo *UsersUpdateOne) SetSessionState(s string) *UsersUpdateOne
SetSessionState sets the "session_state" field.
func (*UsersUpdateOne) SetSlug ¶
func (uuo *UsersUpdateOne) SetSlug(s string) *UsersUpdateOne
SetSlug sets the "slug" field.
func (*UsersUpdateOne) SetUpdatedAt ¶
func (uuo *UsersUpdateOne) SetUpdatedAt(t time.Time) *UsersUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UsersUpdateOne) SetUsername ¶
func (uuo *UsersUpdateOne) SetUsername(s string) *UsersUpdateOne
SetUsername sets the "username" field.
func (*UsersUpdateOne) Where ¶
func (uuo *UsersUpdateOne) Where(ps ...predicate.Users) *UsersUpdateOne
Where appends a list predicates to the UsersUpdate builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- account.go
- account_create.go
- account_delete.go
- account_query.go
- account_update.go
- client.go
- ent.go
- generate.go
- links.go
- links_create.go
- links_delete.go
- links_query.go
- links_update.go
- mutation.go
- runtime.go
- session.go
- session_create.go
- session_delete.go
- session_query.go
- session_update.go
- tx.go
- users.go
- users_create.go
- users_delete.go
- users_query.go
- users_update.go