Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Account
- type AccountClient
- func (c *AccountClient) Create() *AccountCreate
- func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk
- func (c *AccountClient) Delete() *AccountDelete
- func (c *AccountClient) DeleteOne(a *Account) *AccountDeleteOne
- func (c *AccountClient) DeleteOneID(id int64) *AccountDeleteOne
- func (c *AccountClient) Get(ctx context.Context, id int64) (*Account, error)
- func (c *AccountClient) GetX(ctx context.Context, id int64) *Account
- func (c *AccountClient) Hooks() []Hook
- func (c *AccountClient) Query() *AccountQuery
- func (c *AccountClient) Update() *AccountUpdate
- func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne
- func (c *AccountClient) UpdateOneID(id int64) *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) SetCreatedAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetFollower(i int64) *AccountCreate
- func (ac *AccountCreate) SetFollowing(i int64) *AccountCreate
- func (ac *AccountCreate) SetID(i int64) *AccountCreate
- func (ac *AccountCreate) SetIsPrivate(b bool) *AccountCreate
- func (ac *AccountCreate) SetNillableCreatedAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetNillableFollower(i *int64) *AccountCreate
- func (ac *AccountCreate) SetNillableFollowing(i *int64) *AccountCreate
- func (ac *AccountCreate) SetNillableIsPrivate(b *bool) *AccountCreate
- func (ac *AccountCreate) SetNillablePhotoDir(s *string) *AccountCreate
- func (ac *AccountCreate) SetOwner(s string) *AccountCreate
- func (ac *AccountCreate) SetPhotoDir(s string) *AccountCreate
- type AccountCreateBulk
- type AccountDelete
- type AccountDeleteOne
- 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) AddFollower(i int64)
- func (m *AccountMutation) AddFollowing(i int64)
- func (m *AccountMutation) AddedEdges() []string
- func (m *AccountMutation) AddedField(name string) (ent.Value, bool)
- func (m *AccountMutation) AddedFields() []string
- func (m *AccountMutation) AddedFollower() (r int64, exists bool)
- func (m *AccountMutation) AddedFollowing() (r int64, exists bool)
- func (m *AccountMutation) AddedIDs(name string) []ent.Value
- func (m *AccountMutation) ClearEdge(name string) error
- func (m *AccountMutation) ClearField(name string) error
- func (m *AccountMutation) ClearPhotoDir()
- 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) EdgeCleared(name string) bool
- func (m *AccountMutation) Field(name string) (ent.Value, bool)
- func (m *AccountMutation) FieldCleared(name string) bool
- func (m *AccountMutation) Fields() []string
- func (m *AccountMutation) Follower() (r int64, exists bool)
- func (m *AccountMutation) Following() (r int64, exists bool)
- func (m *AccountMutation) ID() (id int64, exists bool)
- func (m *AccountMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *AccountMutation) IsPrivate() (r bool, exists bool)
- func (m *AccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AccountMutation) OldFollower(ctx context.Context) (v int64, err error)
- func (m *AccountMutation) OldFollowing(ctx context.Context) (v int64, err error)
- func (m *AccountMutation) OldIsPrivate(ctx context.Context) (v bool, err error)
- func (m *AccountMutation) OldOwner(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldPhotoDir(ctx context.Context) (v *string, err error)
- func (m *AccountMutation) Op() Op
- func (m *AccountMutation) Owner() (r string, exists bool)
- func (m *AccountMutation) PhotoDir() (r string, exists bool)
- func (m *AccountMutation) PhotoDirCleared() bool
- func (m *AccountMutation) RemovedEdges() []string
- func (m *AccountMutation) RemovedIDs(name string) []ent.Value
- func (m *AccountMutation) ResetCreatedAt()
- func (m *AccountMutation) ResetEdge(name string) error
- func (m *AccountMutation) ResetField(name string) error
- func (m *AccountMutation) ResetFollower()
- func (m *AccountMutation) ResetFollowing()
- func (m *AccountMutation) ResetIsPrivate()
- func (m *AccountMutation) ResetOwner()
- func (m *AccountMutation) ResetPhotoDir()
- func (m *AccountMutation) SetCreatedAt(t time.Time)
- func (m *AccountMutation) SetField(name string, value ent.Value) error
- func (m *AccountMutation) SetFollower(i int64)
- func (m *AccountMutation) SetFollowing(i int64)
- func (m *AccountMutation) SetID(id int64)
- func (m *AccountMutation) SetIsPrivate(b bool)
- func (m *AccountMutation) SetOwner(s string)
- func (m *AccountMutation) SetPhotoDir(s string)
- func (m AccountMutation) Tx() (*Tx, error)
- func (m *AccountMutation) Type() string
- func (m *AccountMutation) Where(ps ...predicate.Account)
- type AccountNotifs
- type AccountNotifsClient
- func (c *AccountNotifsClient) Create() *AccountNotifsCreate
- func (c *AccountNotifsClient) CreateBulk(builders ...*AccountNotifsCreate) *AccountNotifsCreateBulk
- func (c *AccountNotifsClient) Delete() *AccountNotifsDelete
- func (c *AccountNotifsClient) DeleteOne(an *AccountNotifs) *AccountNotifsDeleteOne
- func (c *AccountNotifsClient) DeleteOneID(id uuid.UUID) *AccountNotifsDeleteOne
- func (c *AccountNotifsClient) Get(ctx context.Context, id uuid.UUID) (*AccountNotifs, error)
- func (c *AccountNotifsClient) GetX(ctx context.Context, id uuid.UUID) *AccountNotifs
- func (c *AccountNotifsClient) Hooks() []Hook
- func (c *AccountNotifsClient) Query() *AccountNotifsQuery
- func (c *AccountNotifsClient) Update() *AccountNotifsUpdate
- func (c *AccountNotifsClient) UpdateOne(an *AccountNotifs) *AccountNotifsUpdateOne
- func (c *AccountNotifsClient) UpdateOneID(id uuid.UUID) *AccountNotifsUpdateOne
- func (c *AccountNotifsClient) Use(hooks ...Hook)
- type AccountNotifsCreate
- func (anc *AccountNotifsCreate) Exec(ctx context.Context) error
- func (anc *AccountNotifsCreate) ExecX(ctx context.Context)
- func (anc *AccountNotifsCreate) Mutation() *AccountNotifsMutation
- func (anc *AccountNotifsCreate) Save(ctx context.Context) (*AccountNotifs, error)
- func (anc *AccountNotifsCreate) SaveX(ctx context.Context) *AccountNotifs
- func (anc *AccountNotifsCreate) SetAccountID(i int64) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetCreatedAt(t time.Time) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetID(u uuid.UUID) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetNillableAccountID(i *int64) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetNillableCreatedAt(t *time.Time) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetNillableID(u *uuid.UUID) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetNillableNotifContent(s *string) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetNillableNotifTime(t *time.Time) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetNillableNotifTitle(s *string) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetNillableUsername(s *string) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetNotifContent(s string) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetNotifTime(t time.Time) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetNotifTitle(s string) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetNotifType(s string) *AccountNotifsCreate
- func (anc *AccountNotifsCreate) SetUsername(s string) *AccountNotifsCreate
- type AccountNotifsCreateBulk
- func (ancb *AccountNotifsCreateBulk) Exec(ctx context.Context) error
- func (ancb *AccountNotifsCreateBulk) ExecX(ctx context.Context)
- func (ancb *AccountNotifsCreateBulk) Save(ctx context.Context) ([]*AccountNotifs, error)
- func (ancb *AccountNotifsCreateBulk) SaveX(ctx context.Context) []*AccountNotifs
- type AccountNotifsDelete
- type AccountNotifsDeleteOne
- type AccountNotifsGroupBy
- func (angb *AccountNotifsGroupBy) Aggregate(fns ...AggregateFunc) *AccountNotifsGroupBy
- func (s *AccountNotifsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountNotifsGroupBy) BoolX(ctx context.Context) bool
- func (s *AccountNotifsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountNotifsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AccountNotifsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountNotifsGroupBy) Float64X(ctx context.Context) float64
- func (s *AccountNotifsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountNotifsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AccountNotifsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AccountNotifsGroupBy) IntX(ctx context.Context) int
- func (s *AccountNotifsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AccountNotifsGroupBy) IntsX(ctx context.Context) []int
- func (angb *AccountNotifsGroupBy) Scan(ctx context.Context, v any) error
- func (s *AccountNotifsGroupBy) ScanX(ctx context.Context, v any)
- func (s *AccountNotifsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AccountNotifsGroupBy) StringX(ctx context.Context) string
- func (s *AccountNotifsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AccountNotifsGroupBy) StringsX(ctx context.Context) []string
- type AccountNotifsMutation
- func (m *AccountNotifsMutation) AccountID() (r int64, exists bool)
- func (m *AccountNotifsMutation) AccountIDCleared() bool
- func (m *AccountNotifsMutation) AddAccountID(i int64)
- func (m *AccountNotifsMutation) AddField(name string, value ent.Value) error
- func (m *AccountNotifsMutation) AddedAccountID() (r int64, exists bool)
- func (m *AccountNotifsMutation) AddedEdges() []string
- func (m *AccountNotifsMutation) AddedField(name string) (ent.Value, bool)
- func (m *AccountNotifsMutation) AddedFields() []string
- func (m *AccountNotifsMutation) AddedIDs(name string) []ent.Value
- func (m *AccountNotifsMutation) ClearAccountID()
- func (m *AccountNotifsMutation) ClearEdge(name string) error
- func (m *AccountNotifsMutation) ClearField(name string) error
- func (m *AccountNotifsMutation) ClearNotifContent()
- func (m *AccountNotifsMutation) ClearNotifTime()
- func (m *AccountNotifsMutation) ClearNotifTitle()
- func (m *AccountNotifsMutation) ClearUsername()
- func (m *AccountNotifsMutation) ClearedEdges() []string
- func (m *AccountNotifsMutation) ClearedFields() []string
- func (m AccountNotifsMutation) Client() *Client
- func (m *AccountNotifsMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AccountNotifsMutation) EdgeCleared(name string) bool
- func (m *AccountNotifsMutation) Field(name string) (ent.Value, bool)
- func (m *AccountNotifsMutation) FieldCleared(name string) bool
- func (m *AccountNotifsMutation) Fields() []string
- func (m *AccountNotifsMutation) ID() (id uuid.UUID, exists bool)
- func (m *AccountNotifsMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AccountNotifsMutation) NotifContent() (r string, exists bool)
- func (m *AccountNotifsMutation) NotifContentCleared() bool
- func (m *AccountNotifsMutation) NotifTime() (r time.Time, exists bool)
- func (m *AccountNotifsMutation) NotifTimeCleared() bool
- func (m *AccountNotifsMutation) NotifTitle() (r string, exists bool)
- func (m *AccountNotifsMutation) NotifTitleCleared() bool
- func (m *AccountNotifsMutation) NotifType() (r string, exists bool)
- func (m *AccountNotifsMutation) OldAccountID(ctx context.Context) (v *int64, err error)
- func (m *AccountNotifsMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccountNotifsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AccountNotifsMutation) OldNotifContent(ctx context.Context) (v string, err error)
- func (m *AccountNotifsMutation) OldNotifTime(ctx context.Context) (v *time.Time, err error)
- func (m *AccountNotifsMutation) OldNotifTitle(ctx context.Context) (v string, err error)
- func (m *AccountNotifsMutation) OldNotifType(ctx context.Context) (v string, err error)
- func (m *AccountNotifsMutation) OldUsername(ctx context.Context) (v *string, err error)
- func (m *AccountNotifsMutation) Op() Op
- func (m *AccountNotifsMutation) RemovedEdges() []string
- func (m *AccountNotifsMutation) RemovedIDs(name string) []ent.Value
- func (m *AccountNotifsMutation) ResetAccountID()
- func (m *AccountNotifsMutation) ResetCreatedAt()
- func (m *AccountNotifsMutation) ResetEdge(name string) error
- func (m *AccountNotifsMutation) ResetField(name string) error
- func (m *AccountNotifsMutation) ResetNotifContent()
- func (m *AccountNotifsMutation) ResetNotifTime()
- func (m *AccountNotifsMutation) ResetNotifTitle()
- func (m *AccountNotifsMutation) ResetNotifType()
- func (m *AccountNotifsMutation) ResetUsername()
- func (m *AccountNotifsMutation) SetAccountID(i int64)
- func (m *AccountNotifsMutation) SetCreatedAt(t time.Time)
- func (m *AccountNotifsMutation) SetField(name string, value ent.Value) error
- func (m *AccountNotifsMutation) SetID(id uuid.UUID)
- func (m *AccountNotifsMutation) SetNotifContent(s string)
- func (m *AccountNotifsMutation) SetNotifTime(t time.Time)
- func (m *AccountNotifsMutation) SetNotifTitle(s string)
- func (m *AccountNotifsMutation) SetNotifType(s string)
- func (m *AccountNotifsMutation) SetUsername(s string)
- func (m AccountNotifsMutation) Tx() (*Tx, error)
- func (m *AccountNotifsMutation) Type() string
- func (m *AccountNotifsMutation) Username() (r string, exists bool)
- func (m *AccountNotifsMutation) UsernameCleared() bool
- func (m *AccountNotifsMutation) Where(ps ...predicate.AccountNotifs)
- type AccountNotifsQuery
- func (anq *AccountNotifsQuery) Aggregate(fns ...AggregateFunc) *AccountNotifsSelect
- func (anq *AccountNotifsQuery) All(ctx context.Context) ([]*AccountNotifs, error)
- func (anq *AccountNotifsQuery) AllX(ctx context.Context) []*AccountNotifs
- func (anq *AccountNotifsQuery) Clone() *AccountNotifsQuery
- func (anq *AccountNotifsQuery) Count(ctx context.Context) (int, error)
- func (anq *AccountNotifsQuery) CountX(ctx context.Context) int
- func (anq *AccountNotifsQuery) Exist(ctx context.Context) (bool, error)
- func (anq *AccountNotifsQuery) ExistX(ctx context.Context) bool
- func (anq *AccountNotifsQuery) First(ctx context.Context) (*AccountNotifs, error)
- func (anq *AccountNotifsQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (anq *AccountNotifsQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (anq *AccountNotifsQuery) FirstX(ctx context.Context) *AccountNotifs
- func (anq *AccountNotifsQuery) GroupBy(field string, fields ...string) *AccountNotifsGroupBy
- func (anq *AccountNotifsQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (anq *AccountNotifsQuery) IDsX(ctx context.Context) []uuid.UUID
- func (anq *AccountNotifsQuery) Limit(limit int) *AccountNotifsQuery
- func (anq *AccountNotifsQuery) Offset(offset int) *AccountNotifsQuery
- func (anq *AccountNotifsQuery) Only(ctx context.Context) (*AccountNotifs, error)
- func (anq *AccountNotifsQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (anq *AccountNotifsQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (anq *AccountNotifsQuery) OnlyX(ctx context.Context) *AccountNotifs
- func (anq *AccountNotifsQuery) Order(o ...OrderFunc) *AccountNotifsQuery
- func (anq *AccountNotifsQuery) Select(fields ...string) *AccountNotifsSelect
- func (anq *AccountNotifsQuery) Unique(unique bool) *AccountNotifsQuery
- func (anq *AccountNotifsQuery) Where(ps ...predicate.AccountNotifs) *AccountNotifsQuery
- type AccountNotifsSelect
- func (ans *AccountNotifsSelect) Aggregate(fns ...AggregateFunc) *AccountNotifsSelect
- func (s *AccountNotifsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountNotifsSelect) BoolX(ctx context.Context) bool
- func (s *AccountNotifsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountNotifsSelect) BoolsX(ctx context.Context) []bool
- func (s *AccountNotifsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountNotifsSelect) Float64X(ctx context.Context) float64
- func (s *AccountNotifsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountNotifsSelect) Float64sX(ctx context.Context) []float64
- func (s *AccountNotifsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AccountNotifsSelect) IntX(ctx context.Context) int
- func (s *AccountNotifsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AccountNotifsSelect) IntsX(ctx context.Context) []int
- func (ans *AccountNotifsSelect) Scan(ctx context.Context, v any) error
- func (s *AccountNotifsSelect) ScanX(ctx context.Context, v any)
- func (s *AccountNotifsSelect) String(ctx context.Context) (_ string, err error)
- func (s *AccountNotifsSelect) StringX(ctx context.Context) string
- func (s *AccountNotifsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AccountNotifsSelect) StringsX(ctx context.Context) []string
- type AccountNotifsSlice
- type AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) AddAccountID(i int64) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) ClearAccountID() *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) ClearNotifContent() *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) ClearNotifTime() *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) ClearNotifTitle() *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) ClearUsername() *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) Exec(ctx context.Context) error
- func (anu *AccountNotifsUpdate) ExecX(ctx context.Context)
- func (anu *AccountNotifsUpdate) Mutation() *AccountNotifsMutation
- func (anu *AccountNotifsUpdate) Save(ctx context.Context) (int, error)
- func (anu *AccountNotifsUpdate) SaveX(ctx context.Context) int
- func (anu *AccountNotifsUpdate) SetAccountID(i int64) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetCreatedAt(t time.Time) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetNillableAccountID(i *int64) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetNillableCreatedAt(t *time.Time) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetNillableNotifContent(s *string) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetNillableNotifTime(t *time.Time) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetNillableNotifTitle(s *string) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetNillableUsername(s *string) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetNotifContent(s string) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetNotifTime(t time.Time) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetNotifTitle(s string) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetNotifType(s string) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) SetUsername(s string) *AccountNotifsUpdate
- func (anu *AccountNotifsUpdate) Where(ps ...predicate.AccountNotifs) *AccountNotifsUpdate
- type AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) AddAccountID(i int64) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) ClearAccountID() *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) ClearNotifContent() *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) ClearNotifTime() *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) ClearNotifTitle() *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) ClearUsername() *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) Exec(ctx context.Context) error
- func (anuo *AccountNotifsUpdateOne) ExecX(ctx context.Context)
- func (anuo *AccountNotifsUpdateOne) Mutation() *AccountNotifsMutation
- func (anuo *AccountNotifsUpdateOne) Save(ctx context.Context) (*AccountNotifs, error)
- func (anuo *AccountNotifsUpdateOne) SaveX(ctx context.Context) *AccountNotifs
- func (anuo *AccountNotifsUpdateOne) Select(field string, fields ...string) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetAccountID(i int64) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetCreatedAt(t time.Time) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetNillableAccountID(i *int64) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetNillableCreatedAt(t *time.Time) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetNillableNotifContent(s *string) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetNillableNotifTime(t *time.Time) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetNillableNotifTitle(s *string) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetNillableUsername(s *string) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetNotifContent(s string) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetNotifTime(t time.Time) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetNotifTitle(s string) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetNotifType(s string) *AccountNotifsUpdateOne
- func (anuo *AccountNotifsUpdateOne) SetUsername(s string) *AccountNotifsUpdateOne
- 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 int64, err error)
- func (aq *AccountQuery) FirstIDX(ctx context.Context) int64
- func (aq *AccountQuery) FirstX(ctx context.Context) *Account
- func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy
- func (aq *AccountQuery) IDs(ctx context.Context) ([]int64, error)
- func (aq *AccountQuery) IDsX(ctx context.Context) []int64
- 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 int64, err error)
- func (aq *AccountQuery) OnlyIDX(ctx context.Context) int64
- func (aq *AccountQuery) OnlyX(ctx context.Context) *Account
- func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery
- func (aq *AccountQuery) Select(fields ...string) *AccountSelect
- func (aq *AccountQuery) Unique(unique bool) *AccountQuery
- func (aq *AccountQuery) Where(ps ...predicate.Account) *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) AddFollower(i int64) *AccountUpdate
- func (au *AccountUpdate) AddFollowing(i int64) *AccountUpdate
- func (au *AccountUpdate) ClearPhotoDir() *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) SetCreatedAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) SetFollower(i int64) *AccountUpdate
- func (au *AccountUpdate) SetFollowing(i int64) *AccountUpdate
- func (au *AccountUpdate) SetIsPrivate(b bool) *AccountUpdate
- func (au *AccountUpdate) SetNillableCreatedAt(t *time.Time) *AccountUpdate
- func (au *AccountUpdate) SetNillableFollower(i *int64) *AccountUpdate
- func (au *AccountUpdate) SetNillableFollowing(i *int64) *AccountUpdate
- func (au *AccountUpdate) SetNillableIsPrivate(b *bool) *AccountUpdate
- func (au *AccountUpdate) SetNillablePhotoDir(s *string) *AccountUpdate
- func (au *AccountUpdate) SetOwner(s string) *AccountUpdate
- func (au *AccountUpdate) SetPhotoDir(s string) *AccountUpdate
- func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
- type AccountUpdateOne
- func (auo *AccountUpdateOne) AddFollower(i int64) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddFollowing(i int64) *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearPhotoDir() *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) SetCreatedAt(t time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetFollower(i int64) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetFollowing(i int64) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetIsPrivate(b bool) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableCreatedAt(t *time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableFollower(i *int64) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableFollowing(i *int64) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableIsPrivate(b *bool) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillablePhotoDir(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetOwner(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetPhotoDir(s string) *AccountUpdateOne
- type Accounts
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type LikeFeature
- type LikeFeatureClient
- func (c *LikeFeatureClient) Create() *LikeFeatureCreate
- func (c *LikeFeatureClient) CreateBulk(builders ...*LikeFeatureCreate) *LikeFeatureCreateBulk
- func (c *LikeFeatureClient) Delete() *LikeFeatureDelete
- func (c *LikeFeatureClient) DeleteOne(lf *LikeFeature) *LikeFeatureDeleteOne
- func (c *LikeFeatureClient) DeleteOneID(id int) *LikeFeatureDeleteOne
- func (c *LikeFeatureClient) Get(ctx context.Context, id int) (*LikeFeature, error)
- func (c *LikeFeatureClient) GetX(ctx context.Context, id int) *LikeFeature
- func (c *LikeFeatureClient) Hooks() []Hook
- func (c *LikeFeatureClient) Query() *LikeFeatureQuery
- func (c *LikeFeatureClient) Update() *LikeFeatureUpdate
- func (c *LikeFeatureClient) UpdateOne(lf *LikeFeature) *LikeFeatureUpdateOne
- func (c *LikeFeatureClient) UpdateOneID(id int) *LikeFeatureUpdateOne
- func (c *LikeFeatureClient) Use(hooks ...Hook)
- type LikeFeatureCreate
- func (lfc *LikeFeatureCreate) Exec(ctx context.Context) error
- func (lfc *LikeFeatureCreate) ExecX(ctx context.Context)
- func (lfc *LikeFeatureCreate) Mutation() *LikeFeatureMutation
- func (lfc *LikeFeatureCreate) Save(ctx context.Context) (*LikeFeature, error)
- func (lfc *LikeFeatureCreate) SaveX(ctx context.Context) *LikeFeature
- func (lfc *LikeFeatureCreate) SetCreatedAt(t time.Time) *LikeFeatureCreate
- func (lfc *LikeFeatureCreate) SetFromAccountID(i int64) *LikeFeatureCreate
- func (lfc *LikeFeatureCreate) SetIsLike(b bool) *LikeFeatureCreate
- func (lfc *LikeFeatureCreate) SetNillableCreatedAt(t *time.Time) *LikeFeatureCreate
- func (lfc *LikeFeatureCreate) SetNillableIsLike(b *bool) *LikeFeatureCreate
- func (lfc *LikeFeatureCreate) SetPostID(u uuid.UUID) *LikeFeatureCreate
- type LikeFeatureCreateBulk
- type LikeFeatureDelete
- type LikeFeatureDeleteOne
- type LikeFeatureGroupBy
- func (lfgb *LikeFeatureGroupBy) Aggregate(fns ...AggregateFunc) *LikeFeatureGroupBy
- func (s *LikeFeatureGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LikeFeatureGroupBy) BoolX(ctx context.Context) bool
- func (s *LikeFeatureGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LikeFeatureGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LikeFeatureGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LikeFeatureGroupBy) Float64X(ctx context.Context) float64
- func (s *LikeFeatureGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LikeFeatureGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LikeFeatureGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LikeFeatureGroupBy) IntX(ctx context.Context) int
- func (s *LikeFeatureGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LikeFeatureGroupBy) IntsX(ctx context.Context) []int
- func (lfgb *LikeFeatureGroupBy) Scan(ctx context.Context, v any) error
- func (s *LikeFeatureGroupBy) ScanX(ctx context.Context, v any)
- func (s *LikeFeatureGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LikeFeatureGroupBy) StringX(ctx context.Context) string
- func (s *LikeFeatureGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LikeFeatureGroupBy) StringsX(ctx context.Context) []string
- type LikeFeatureMutation
- func (m *LikeFeatureMutation) AddField(name string, value ent.Value) error
- func (m *LikeFeatureMutation) AddFromAccountID(i int64)
- func (m *LikeFeatureMutation) AddedEdges() []string
- func (m *LikeFeatureMutation) AddedField(name string) (ent.Value, bool)
- func (m *LikeFeatureMutation) AddedFields() []string
- func (m *LikeFeatureMutation) AddedFromAccountID() (r int64, exists bool)
- func (m *LikeFeatureMutation) AddedIDs(name string) []ent.Value
- func (m *LikeFeatureMutation) ClearEdge(name string) error
- func (m *LikeFeatureMutation) ClearField(name string) error
- func (m *LikeFeatureMutation) ClearedEdges() []string
- func (m *LikeFeatureMutation) ClearedFields() []string
- func (m LikeFeatureMutation) Client() *Client
- func (m *LikeFeatureMutation) CreatedAt() (r time.Time, exists bool)
- func (m *LikeFeatureMutation) EdgeCleared(name string) bool
- func (m *LikeFeatureMutation) Field(name string) (ent.Value, bool)
- func (m *LikeFeatureMutation) FieldCleared(name string) bool
- func (m *LikeFeatureMutation) Fields() []string
- func (m *LikeFeatureMutation) FromAccountID() (r int64, exists bool)
- func (m *LikeFeatureMutation) ID() (id int, exists bool)
- func (m *LikeFeatureMutation) IDs(ctx context.Context) ([]int, error)
- func (m *LikeFeatureMutation) IsLike() (r bool, exists bool)
- func (m *LikeFeatureMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LikeFeatureMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LikeFeatureMutation) OldFromAccountID(ctx context.Context) (v int64, err error)
- func (m *LikeFeatureMutation) OldIsLike(ctx context.Context) (v bool, err error)
- func (m *LikeFeatureMutation) OldPostID(ctx context.Context) (v uuid.UUID, err error)
- func (m *LikeFeatureMutation) Op() Op
- func (m *LikeFeatureMutation) PostID() (r uuid.UUID, exists bool)
- func (m *LikeFeatureMutation) RemovedEdges() []string
- func (m *LikeFeatureMutation) RemovedIDs(name string) []ent.Value
- func (m *LikeFeatureMutation) ResetCreatedAt()
- func (m *LikeFeatureMutation) ResetEdge(name string) error
- func (m *LikeFeatureMutation) ResetField(name string) error
- func (m *LikeFeatureMutation) ResetFromAccountID()
- func (m *LikeFeatureMutation) ResetIsLike()
- func (m *LikeFeatureMutation) ResetPostID()
- func (m *LikeFeatureMutation) SetCreatedAt(t time.Time)
- func (m *LikeFeatureMutation) SetField(name string, value ent.Value) error
- func (m *LikeFeatureMutation) SetFromAccountID(i int64)
- func (m *LikeFeatureMutation) SetIsLike(b bool)
- func (m *LikeFeatureMutation) SetPostID(u uuid.UUID)
- func (m LikeFeatureMutation) Tx() (*Tx, error)
- func (m *LikeFeatureMutation) Type() string
- func (m *LikeFeatureMutation) Where(ps ...predicate.LikeFeature)
- type LikeFeatureQuery
- func (lfq *LikeFeatureQuery) Aggregate(fns ...AggregateFunc) *LikeFeatureSelect
- func (lfq *LikeFeatureQuery) All(ctx context.Context) ([]*LikeFeature, error)
- func (lfq *LikeFeatureQuery) AllX(ctx context.Context) []*LikeFeature
- func (lfq *LikeFeatureQuery) Clone() *LikeFeatureQuery
- func (lfq *LikeFeatureQuery) Count(ctx context.Context) (int, error)
- func (lfq *LikeFeatureQuery) CountX(ctx context.Context) int
- func (lfq *LikeFeatureQuery) Exist(ctx context.Context) (bool, error)
- func (lfq *LikeFeatureQuery) ExistX(ctx context.Context) bool
- func (lfq *LikeFeatureQuery) First(ctx context.Context) (*LikeFeature, error)
- func (lfq *LikeFeatureQuery) FirstID(ctx context.Context) (id int, err error)
- func (lfq *LikeFeatureQuery) FirstIDX(ctx context.Context) int
- func (lfq *LikeFeatureQuery) FirstX(ctx context.Context) *LikeFeature
- func (lfq *LikeFeatureQuery) GroupBy(field string, fields ...string) *LikeFeatureGroupBy
- func (lfq *LikeFeatureQuery) IDs(ctx context.Context) ([]int, error)
- func (lfq *LikeFeatureQuery) IDsX(ctx context.Context) []int
- func (lfq *LikeFeatureQuery) Limit(limit int) *LikeFeatureQuery
- func (lfq *LikeFeatureQuery) Offset(offset int) *LikeFeatureQuery
- func (lfq *LikeFeatureQuery) Only(ctx context.Context) (*LikeFeature, error)
- func (lfq *LikeFeatureQuery) OnlyID(ctx context.Context) (id int, err error)
- func (lfq *LikeFeatureQuery) OnlyIDX(ctx context.Context) int
- func (lfq *LikeFeatureQuery) OnlyX(ctx context.Context) *LikeFeature
- func (lfq *LikeFeatureQuery) Order(o ...OrderFunc) *LikeFeatureQuery
- func (lfq *LikeFeatureQuery) Select(fields ...string) *LikeFeatureSelect
- func (lfq *LikeFeatureQuery) Unique(unique bool) *LikeFeatureQuery
- func (lfq *LikeFeatureQuery) Where(ps ...predicate.LikeFeature) *LikeFeatureQuery
- type LikeFeatureSelect
- func (lfs *LikeFeatureSelect) Aggregate(fns ...AggregateFunc) *LikeFeatureSelect
- func (s *LikeFeatureSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LikeFeatureSelect) BoolX(ctx context.Context) bool
- func (s *LikeFeatureSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LikeFeatureSelect) BoolsX(ctx context.Context) []bool
- func (s *LikeFeatureSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LikeFeatureSelect) Float64X(ctx context.Context) float64
- func (s *LikeFeatureSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LikeFeatureSelect) Float64sX(ctx context.Context) []float64
- func (s *LikeFeatureSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LikeFeatureSelect) IntX(ctx context.Context) int
- func (s *LikeFeatureSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LikeFeatureSelect) IntsX(ctx context.Context) []int
- func (lfs *LikeFeatureSelect) Scan(ctx context.Context, v any) error
- func (s *LikeFeatureSelect) ScanX(ctx context.Context, v any)
- func (s *LikeFeatureSelect) String(ctx context.Context) (_ string, err error)
- func (s *LikeFeatureSelect) StringX(ctx context.Context) string
- func (s *LikeFeatureSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LikeFeatureSelect) StringsX(ctx context.Context) []string
- type LikeFeatureUpdate
- func (lfu *LikeFeatureUpdate) AddFromAccountID(i int64) *LikeFeatureUpdate
- func (lfu *LikeFeatureUpdate) Exec(ctx context.Context) error
- func (lfu *LikeFeatureUpdate) ExecX(ctx context.Context)
- func (lfu *LikeFeatureUpdate) Mutation() *LikeFeatureMutation
- func (lfu *LikeFeatureUpdate) Save(ctx context.Context) (int, error)
- func (lfu *LikeFeatureUpdate) SaveX(ctx context.Context) int
- func (lfu *LikeFeatureUpdate) SetCreatedAt(t time.Time) *LikeFeatureUpdate
- func (lfu *LikeFeatureUpdate) SetFromAccountID(i int64) *LikeFeatureUpdate
- func (lfu *LikeFeatureUpdate) SetIsLike(b bool) *LikeFeatureUpdate
- func (lfu *LikeFeatureUpdate) SetNillableCreatedAt(t *time.Time) *LikeFeatureUpdate
- func (lfu *LikeFeatureUpdate) SetNillableIsLike(b *bool) *LikeFeatureUpdate
- func (lfu *LikeFeatureUpdate) SetPostID(u uuid.UUID) *LikeFeatureUpdate
- func (lfu *LikeFeatureUpdate) Where(ps ...predicate.LikeFeature) *LikeFeatureUpdate
- type LikeFeatureUpdateOne
- func (lfuo *LikeFeatureUpdateOne) AddFromAccountID(i int64) *LikeFeatureUpdateOne
- func (lfuo *LikeFeatureUpdateOne) Exec(ctx context.Context) error
- func (lfuo *LikeFeatureUpdateOne) ExecX(ctx context.Context)
- func (lfuo *LikeFeatureUpdateOne) Mutation() *LikeFeatureMutation
- func (lfuo *LikeFeatureUpdateOne) Save(ctx context.Context) (*LikeFeature, error)
- func (lfuo *LikeFeatureUpdateOne) SaveX(ctx context.Context) *LikeFeature
- func (lfuo *LikeFeatureUpdateOne) Select(field string, fields ...string) *LikeFeatureUpdateOne
- func (lfuo *LikeFeatureUpdateOne) SetCreatedAt(t time.Time) *LikeFeatureUpdateOne
- func (lfuo *LikeFeatureUpdateOne) SetFromAccountID(i int64) *LikeFeatureUpdateOne
- func (lfuo *LikeFeatureUpdateOne) SetIsLike(b bool) *LikeFeatureUpdateOne
- func (lfuo *LikeFeatureUpdateOne) SetNillableCreatedAt(t *time.Time) *LikeFeatureUpdateOne
- func (lfuo *LikeFeatureUpdateOne) SetNillableIsLike(b *bool) *LikeFeatureUpdateOne
- func (lfuo *LikeFeatureUpdateOne) SetPostID(u uuid.UUID) *LikeFeatureUpdateOne
- type LikeFeatures
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Post
- type PostClient
- func (c *PostClient) Create() *PostCreate
- func (c *PostClient) CreateBulk(builders ...*PostCreate) *PostCreateBulk
- func (c *PostClient) Delete() *PostDelete
- func (c *PostClient) DeleteOne(po *Post) *PostDeleteOne
- func (c *PostClient) DeleteOneID(id uuid.UUID) *PostDeleteOne
- func (c *PostClient) Get(ctx context.Context, id uuid.UUID) (*Post, error)
- func (c *PostClient) GetX(ctx context.Context, id uuid.UUID) *Post
- func (c *PostClient) Hooks() []Hook
- func (c *PostClient) Query() *PostQuery
- func (c *PostClient) Update() *PostUpdate
- func (c *PostClient) UpdateOne(po *Post) *PostUpdateOne
- func (c *PostClient) UpdateOneID(id uuid.UUID) *PostUpdateOne
- func (c *PostClient) Use(hooks ...Hook)
- type PostCreate
- func (pc *PostCreate) Exec(ctx context.Context) error
- func (pc *PostCreate) ExecX(ctx context.Context)
- func (pc *PostCreate) Mutation() *PostMutation
- func (pc *PostCreate) Save(ctx context.Context) (*Post, error)
- func (pc *PostCreate) SaveX(ctx context.Context) *Post
- func (pc *PostCreate) SetCreatedAt(t time.Time) *PostCreate
- func (pc *PostCreate) SetFollower(i int64) *PostCreate
- func (pc *PostCreate) SetFollowing(i int64) *PostCreate
- func (pc *PostCreate) SetID(u uuid.UUID) *PostCreate
- func (pc *PostCreate) SetIsPrivate(b bool) *PostCreate
- func (pc *PostCreate) SetNillableCreatedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetNillableFollower(i *int64) *PostCreate
- func (pc *PostCreate) SetNillableFollowing(i *int64) *PostCreate
- func (pc *PostCreate) SetNillableID(u *uuid.UUID) *PostCreate
- func (pc *PostCreate) SetNillableIsPrivate(b *bool) *PostCreate
- func (pc *PostCreate) SetNillablePhotoDir(s *string) *PostCreate
- func (pc *PostCreate) SetOwner(s string) *PostCreate
- func (pc *PostCreate) SetPhotoDir(s string) *PostCreate
- type PostCreateBulk
- type PostDelete
- type PostDeleteOne
- type PostGroupBy
- func (pgb *PostGroupBy) Aggregate(fns ...AggregateFunc) *PostGroupBy
- func (s *PostGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PostGroupBy) BoolX(ctx context.Context) bool
- func (s *PostGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PostGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PostGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PostGroupBy) Float64X(ctx context.Context) float64
- func (s *PostGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PostGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PostGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PostGroupBy) IntX(ctx context.Context) int
- func (s *PostGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PostGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PostGroupBy) Scan(ctx context.Context, v any) error
- func (s *PostGroupBy) ScanX(ctx context.Context, v any)
- func (s *PostGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PostGroupBy) StringX(ctx context.Context) string
- func (s *PostGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PostGroupBy) StringsX(ctx context.Context) []string
- type PostMutation
- func (m *PostMutation) AddField(name string, value ent.Value) error
- func (m *PostMutation) AddFollower(i int64)
- func (m *PostMutation) AddFollowing(i int64)
- func (m *PostMutation) AddedEdges() []string
- func (m *PostMutation) AddedField(name string) (ent.Value, bool)
- func (m *PostMutation) AddedFields() []string
- func (m *PostMutation) AddedFollower() (r int64, exists bool)
- func (m *PostMutation) AddedFollowing() (r int64, exists bool)
- func (m *PostMutation) AddedIDs(name string) []ent.Value
- func (m *PostMutation) ClearEdge(name string) error
- func (m *PostMutation) ClearField(name string) error
- func (m *PostMutation) ClearPhotoDir()
- func (m *PostMutation) ClearedEdges() []string
- func (m *PostMutation) ClearedFields() []string
- func (m PostMutation) Client() *Client
- func (m *PostMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PostMutation) EdgeCleared(name string) bool
- func (m *PostMutation) Field(name string) (ent.Value, bool)
- func (m *PostMutation) FieldCleared(name string) bool
- func (m *PostMutation) Fields() []string
- func (m *PostMutation) Follower() (r int64, exists bool)
- func (m *PostMutation) Following() (r int64, exists bool)
- func (m *PostMutation) ID() (id uuid.UUID, exists bool)
- func (m *PostMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *PostMutation) IsPrivate() (r bool, exists bool)
- func (m *PostMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PostMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PostMutation) OldFollower(ctx context.Context) (v int64, err error)
- func (m *PostMutation) OldFollowing(ctx context.Context) (v int64, err error)
- func (m *PostMutation) OldIsPrivate(ctx context.Context) (v bool, err error)
- func (m *PostMutation) OldOwner(ctx context.Context) (v string, err error)
- func (m *PostMutation) OldPhotoDir(ctx context.Context) (v string, err error)
- func (m *PostMutation) Op() Op
- func (m *PostMutation) Owner() (r string, exists bool)
- func (m *PostMutation) PhotoDir() (r string, exists bool)
- func (m *PostMutation) PhotoDirCleared() bool
- func (m *PostMutation) RemovedEdges() []string
- func (m *PostMutation) RemovedIDs(name string) []ent.Value
- func (m *PostMutation) ResetCreatedAt()
- func (m *PostMutation) ResetEdge(name string) error
- func (m *PostMutation) ResetField(name string) error
- func (m *PostMutation) ResetFollower()
- func (m *PostMutation) ResetFollowing()
- func (m *PostMutation) ResetIsPrivate()
- func (m *PostMutation) ResetOwner()
- func (m *PostMutation) ResetPhotoDir()
- func (m *PostMutation) SetCreatedAt(t time.Time)
- func (m *PostMutation) SetField(name string, value ent.Value) error
- func (m *PostMutation) SetFollower(i int64)
- func (m *PostMutation) SetFollowing(i int64)
- func (m *PostMutation) SetID(id uuid.UUID)
- func (m *PostMutation) SetIsPrivate(b bool)
- func (m *PostMutation) SetOwner(s string)
- func (m *PostMutation) SetPhotoDir(s string)
- func (m PostMutation) Tx() (*Tx, error)
- func (m *PostMutation) Type() string
- func (m *PostMutation) Where(ps ...predicate.Post)
- type PostQuery
- func (pq *PostQuery) Aggregate(fns ...AggregateFunc) *PostSelect
- func (pq *PostQuery) All(ctx context.Context) ([]*Post, error)
- func (pq *PostQuery) AllX(ctx context.Context) []*Post
- func (pq *PostQuery) Clone() *PostQuery
- func (pq *PostQuery) Count(ctx context.Context) (int, error)
- func (pq *PostQuery) CountX(ctx context.Context) int
- func (pq *PostQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PostQuery) ExistX(ctx context.Context) bool
- func (pq *PostQuery) First(ctx context.Context) (*Post, error)
- func (pq *PostQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PostQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (pq *PostQuery) FirstX(ctx context.Context) *Post
- func (pq *PostQuery) GroupBy(field string, fields ...string) *PostGroupBy
- func (pq *PostQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (pq *PostQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pq *PostQuery) Limit(limit int) *PostQuery
- func (pq *PostQuery) Offset(offset int) *PostQuery
- func (pq *PostQuery) Only(ctx context.Context) (*Post, error)
- func (pq *PostQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PostQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (pq *PostQuery) OnlyX(ctx context.Context) *Post
- func (pq *PostQuery) Order(o ...OrderFunc) *PostQuery
- func (pq *PostQuery) Select(fields ...string) *PostSelect
- func (pq *PostQuery) Unique(unique bool) *PostQuery
- func (pq *PostQuery) Where(ps ...predicate.Post) *PostQuery
- type PostSelect
- func (ps *PostSelect) Aggregate(fns ...AggregateFunc) *PostSelect
- func (s *PostSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PostSelect) BoolX(ctx context.Context) bool
- func (s *PostSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PostSelect) BoolsX(ctx context.Context) []bool
- func (s *PostSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PostSelect) Float64X(ctx context.Context) float64
- func (s *PostSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PostSelect) Float64sX(ctx context.Context) []float64
- func (s *PostSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PostSelect) IntX(ctx context.Context) int
- func (s *PostSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PostSelect) IntsX(ctx context.Context) []int
- func (ps *PostSelect) Scan(ctx context.Context, v any) error
- func (s *PostSelect) ScanX(ctx context.Context, v any)
- func (s *PostSelect) String(ctx context.Context) (_ string, err error)
- func (s *PostSelect) StringX(ctx context.Context) string
- func (s *PostSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PostSelect) StringsX(ctx context.Context) []string
- type PostUpdate
- func (pu *PostUpdate) AddFollower(i int64) *PostUpdate
- func (pu *PostUpdate) AddFollowing(i int64) *PostUpdate
- func (pu *PostUpdate) ClearPhotoDir() *PostUpdate
- func (pu *PostUpdate) Exec(ctx context.Context) error
- func (pu *PostUpdate) ExecX(ctx context.Context)
- func (pu *PostUpdate) Mutation() *PostMutation
- func (pu *PostUpdate) Save(ctx context.Context) (int, error)
- func (pu *PostUpdate) SaveX(ctx context.Context) int
- func (pu *PostUpdate) SetCreatedAt(t time.Time) *PostUpdate
- func (pu *PostUpdate) SetFollower(i int64) *PostUpdate
- func (pu *PostUpdate) SetFollowing(i int64) *PostUpdate
- func (pu *PostUpdate) SetIsPrivate(b bool) *PostUpdate
- func (pu *PostUpdate) SetNillableCreatedAt(t *time.Time) *PostUpdate
- func (pu *PostUpdate) SetNillableFollower(i *int64) *PostUpdate
- func (pu *PostUpdate) SetNillableFollowing(i *int64) *PostUpdate
- func (pu *PostUpdate) SetNillableIsPrivate(b *bool) *PostUpdate
- func (pu *PostUpdate) SetNillablePhotoDir(s *string) *PostUpdate
- func (pu *PostUpdate) SetOwner(s string) *PostUpdate
- func (pu *PostUpdate) SetPhotoDir(s string) *PostUpdate
- func (pu *PostUpdate) Where(ps ...predicate.Post) *PostUpdate
- type PostUpdateOne
- func (puo *PostUpdateOne) AddFollower(i int64) *PostUpdateOne
- func (puo *PostUpdateOne) AddFollowing(i int64) *PostUpdateOne
- func (puo *PostUpdateOne) ClearPhotoDir() *PostUpdateOne
- func (puo *PostUpdateOne) Exec(ctx context.Context) error
- func (puo *PostUpdateOne) ExecX(ctx context.Context)
- func (puo *PostUpdateOne) Mutation() *PostMutation
- func (puo *PostUpdateOne) Save(ctx context.Context) (*Post, error)
- func (puo *PostUpdateOne) SaveX(ctx context.Context) *Post
- func (puo *PostUpdateOne) Select(field string, fields ...string) *PostUpdateOne
- func (puo *PostUpdateOne) SetCreatedAt(t time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetFollower(i int64) *PostUpdateOne
- func (puo *PostUpdateOne) SetFollowing(i int64) *PostUpdateOne
- func (puo *PostUpdateOne) SetIsPrivate(b bool) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableCreatedAt(t *time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableFollower(i *int64) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableFollowing(i *int64) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableIsPrivate(b *bool) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillablePhotoDir(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetOwner(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetPhotoDir(s string) *PostUpdateOne
- type Posts
- type QouteRetweetFeatureCreate
- func (qrfc *QouteRetweetFeatureCreate) Exec(ctx context.Context) error
- func (qrfc *QouteRetweetFeatureCreate) ExecX(ctx context.Context)
- func (qrfc *QouteRetweetFeatureCreate) Mutation() *QouteRetweetFeatureMutation
- func (qrfc *QouteRetweetFeatureCreate) Save(ctx context.Context) (*Qoute_retweet_feature, error)
- func (qrfc *QouteRetweetFeatureCreate) SaveX(ctx context.Context) *Qoute_retweet_feature
- func (qrfc *QouteRetweetFeatureCreate) SetCreatedAt(t time.Time) *QouteRetweetFeatureCreate
- func (qrfc *QouteRetweetFeatureCreate) SetFromAccountID(i int64) *QouteRetweetFeatureCreate
- func (qrfc *QouteRetweetFeatureCreate) SetNillableQouteRetweet(b *bool) *QouteRetweetFeatureCreate
- func (qrfc *QouteRetweetFeatureCreate) SetPostID(u uuid.UUID) *QouteRetweetFeatureCreate
- func (qrfc *QouteRetweetFeatureCreate) SetQoute(s string) *QouteRetweetFeatureCreate
- func (qrfc *QouteRetweetFeatureCreate) SetQouteRetweet(b bool) *QouteRetweetFeatureCreate
- type QouteRetweetFeatureCreateBulk
- func (qrfcb *QouteRetweetFeatureCreateBulk) Exec(ctx context.Context) error
- func (qrfcb *QouteRetweetFeatureCreateBulk) ExecX(ctx context.Context)
- func (qrfcb *QouteRetweetFeatureCreateBulk) Save(ctx context.Context) ([]*Qoute_retweet_feature, error)
- func (qrfcb *QouteRetweetFeatureCreateBulk) SaveX(ctx context.Context) []*Qoute_retweet_feature
- type QouteRetweetFeatureDelete
- type QouteRetweetFeatureDeleteOne
- type QouteRetweetFeatureGroupBy
- func (qrfgb *QouteRetweetFeatureGroupBy) Aggregate(fns ...AggregateFunc) *QouteRetweetFeatureGroupBy
- func (s *QouteRetweetFeatureGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *QouteRetweetFeatureGroupBy) BoolX(ctx context.Context) bool
- func (s *QouteRetweetFeatureGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *QouteRetweetFeatureGroupBy) BoolsX(ctx context.Context) []bool
- func (s *QouteRetweetFeatureGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *QouteRetweetFeatureGroupBy) Float64X(ctx context.Context) float64
- func (s *QouteRetweetFeatureGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *QouteRetweetFeatureGroupBy) Float64sX(ctx context.Context) []float64
- func (s *QouteRetweetFeatureGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *QouteRetweetFeatureGroupBy) IntX(ctx context.Context) int
- func (s *QouteRetweetFeatureGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *QouteRetweetFeatureGroupBy) IntsX(ctx context.Context) []int
- func (qrfgb *QouteRetweetFeatureGroupBy) Scan(ctx context.Context, v any) error
- func (s *QouteRetweetFeatureGroupBy) ScanX(ctx context.Context, v any)
- func (s *QouteRetweetFeatureGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *QouteRetweetFeatureGroupBy) StringX(ctx context.Context) string
- func (s *QouteRetweetFeatureGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *QouteRetweetFeatureGroupBy) StringsX(ctx context.Context) []string
- type QouteRetweetFeatureMutation
- func (m *QouteRetweetFeatureMutation) AddField(name string, value ent.Value) error
- func (m *QouteRetweetFeatureMutation) AddFromAccountID(i int64)
- func (m *QouteRetweetFeatureMutation) AddedEdges() []string
- func (m *QouteRetweetFeatureMutation) AddedField(name string) (ent.Value, bool)
- func (m *QouteRetweetFeatureMutation) AddedFields() []string
- func (m *QouteRetweetFeatureMutation) AddedFromAccountID() (r int64, exists bool)
- func (m *QouteRetweetFeatureMutation) AddedIDs(name string) []ent.Value
- func (m *QouteRetweetFeatureMutation) ClearEdge(name string) error
- func (m *QouteRetweetFeatureMutation) ClearField(name string) error
- func (m *QouteRetweetFeatureMutation) ClearedEdges() []string
- func (m *QouteRetweetFeatureMutation) ClearedFields() []string
- func (m QouteRetweetFeatureMutation) Client() *Client
- func (m *QouteRetweetFeatureMutation) CreatedAt() (r time.Time, exists bool)
- func (m *QouteRetweetFeatureMutation) EdgeCleared(name string) bool
- func (m *QouteRetweetFeatureMutation) Field(name string) (ent.Value, bool)
- func (m *QouteRetweetFeatureMutation) FieldCleared(name string) bool
- func (m *QouteRetweetFeatureMutation) Fields() []string
- func (m *QouteRetweetFeatureMutation) FromAccountID() (r int64, exists bool)
- func (m *QouteRetweetFeatureMutation) ID() (id int, exists bool)
- func (m *QouteRetweetFeatureMutation) IDs(ctx context.Context) ([]int, error)
- func (m *QouteRetweetFeatureMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *QouteRetweetFeatureMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *QouteRetweetFeatureMutation) OldFromAccountID(ctx context.Context) (v int64, err error)
- func (m *QouteRetweetFeatureMutation) OldPostID(ctx context.Context) (v uuid.UUID, err error)
- func (m *QouteRetweetFeatureMutation) OldQoute(ctx context.Context) (v string, err error)
- func (m *QouteRetweetFeatureMutation) OldQouteRetweet(ctx context.Context) (v bool, err error)
- func (m *QouteRetweetFeatureMutation) Op() Op
- func (m *QouteRetweetFeatureMutation) PostID() (r uuid.UUID, exists bool)
- func (m *QouteRetweetFeatureMutation) Qoute() (r string, exists bool)
- func (m *QouteRetweetFeatureMutation) QouteRetweet() (r bool, exists bool)
- func (m *QouteRetweetFeatureMutation) RemovedEdges() []string
- func (m *QouteRetweetFeatureMutation) RemovedIDs(name string) []ent.Value
- func (m *QouteRetweetFeatureMutation) ResetCreatedAt()
- func (m *QouteRetweetFeatureMutation) ResetEdge(name string) error
- func (m *QouteRetweetFeatureMutation) ResetField(name string) error
- func (m *QouteRetweetFeatureMutation) ResetFromAccountID()
- func (m *QouteRetweetFeatureMutation) ResetPostID()
- func (m *QouteRetweetFeatureMutation) ResetQoute()
- func (m *QouteRetweetFeatureMutation) ResetQouteRetweet()
- func (m *QouteRetweetFeatureMutation) SetCreatedAt(t time.Time)
- func (m *QouteRetweetFeatureMutation) SetField(name string, value ent.Value) error
- func (m *QouteRetweetFeatureMutation) SetFromAccountID(i int64)
- func (m *QouteRetweetFeatureMutation) SetPostID(u uuid.UUID)
- func (m *QouteRetweetFeatureMutation) SetQoute(s string)
- func (m *QouteRetweetFeatureMutation) SetQouteRetweet(b bool)
- func (m QouteRetweetFeatureMutation) Tx() (*Tx, error)
- func (m *QouteRetweetFeatureMutation) Type() string
- func (m *QouteRetweetFeatureMutation) Where(ps ...predicate.Qoute_retweet_feature)
- type QouteRetweetFeatureQuery
- func (qrfq *QouteRetweetFeatureQuery) Aggregate(fns ...AggregateFunc) *QouteRetweetFeatureSelect
- func (qrfq *QouteRetweetFeatureQuery) All(ctx context.Context) ([]*Qoute_retweet_feature, error)
- func (qrfq *QouteRetweetFeatureQuery) AllX(ctx context.Context) []*Qoute_retweet_feature
- func (qrfq *QouteRetweetFeatureQuery) Clone() *QouteRetweetFeatureQuery
- func (qrfq *QouteRetweetFeatureQuery) Count(ctx context.Context) (int, error)
- func (qrfq *QouteRetweetFeatureQuery) CountX(ctx context.Context) int
- func (qrfq *QouteRetweetFeatureQuery) Exist(ctx context.Context) (bool, error)
- func (qrfq *QouteRetweetFeatureQuery) ExistX(ctx context.Context) bool
- func (qrfq *QouteRetweetFeatureQuery) First(ctx context.Context) (*Qoute_retweet_feature, error)
- func (qrfq *QouteRetweetFeatureQuery) FirstID(ctx context.Context) (id int, err error)
- func (qrfq *QouteRetweetFeatureQuery) FirstIDX(ctx context.Context) int
- func (qrfq *QouteRetweetFeatureQuery) FirstX(ctx context.Context) *Qoute_retweet_feature
- func (qrfq *QouteRetweetFeatureQuery) GroupBy(field string, fields ...string) *QouteRetweetFeatureGroupBy
- func (qrfq *QouteRetweetFeatureQuery) IDs(ctx context.Context) ([]int, error)
- func (qrfq *QouteRetweetFeatureQuery) IDsX(ctx context.Context) []int
- func (qrfq *QouteRetweetFeatureQuery) Limit(limit int) *QouteRetweetFeatureQuery
- func (qrfq *QouteRetweetFeatureQuery) Offset(offset int) *QouteRetweetFeatureQuery
- func (qrfq *QouteRetweetFeatureQuery) Only(ctx context.Context) (*Qoute_retweet_feature, error)
- func (qrfq *QouteRetweetFeatureQuery) OnlyID(ctx context.Context) (id int, err error)
- func (qrfq *QouteRetweetFeatureQuery) OnlyIDX(ctx context.Context) int
- func (qrfq *QouteRetweetFeatureQuery) OnlyX(ctx context.Context) *Qoute_retweet_feature
- func (qrfq *QouteRetweetFeatureQuery) Order(o ...OrderFunc) *QouteRetweetFeatureQuery
- func (qrfq *QouteRetweetFeatureQuery) Select(fields ...string) *QouteRetweetFeatureSelect
- func (qrfq *QouteRetweetFeatureQuery) Unique(unique bool) *QouteRetweetFeatureQuery
- func (qrfq *QouteRetweetFeatureQuery) Where(ps ...predicate.Qoute_retweet_feature) *QouteRetweetFeatureQuery
- type QouteRetweetFeatureSelect
- func (qrfs *QouteRetweetFeatureSelect) Aggregate(fns ...AggregateFunc) *QouteRetweetFeatureSelect
- func (s *QouteRetweetFeatureSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *QouteRetweetFeatureSelect) BoolX(ctx context.Context) bool
- func (s *QouteRetweetFeatureSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *QouteRetweetFeatureSelect) BoolsX(ctx context.Context) []bool
- func (s *QouteRetweetFeatureSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *QouteRetweetFeatureSelect) Float64X(ctx context.Context) float64
- func (s *QouteRetweetFeatureSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *QouteRetweetFeatureSelect) Float64sX(ctx context.Context) []float64
- func (s *QouteRetweetFeatureSelect) Int(ctx context.Context) (_ int, err error)
- func (s *QouteRetweetFeatureSelect) IntX(ctx context.Context) int
- func (s *QouteRetweetFeatureSelect) Ints(ctx context.Context) ([]int, error)
- func (s *QouteRetweetFeatureSelect) IntsX(ctx context.Context) []int
- func (qrfs *QouteRetweetFeatureSelect) Scan(ctx context.Context, v any) error
- func (s *QouteRetweetFeatureSelect) ScanX(ctx context.Context, v any)
- func (s *QouteRetweetFeatureSelect) String(ctx context.Context) (_ string, err error)
- func (s *QouteRetweetFeatureSelect) StringX(ctx context.Context) string
- func (s *QouteRetweetFeatureSelect) Strings(ctx context.Context) ([]string, error)
- func (s *QouteRetweetFeatureSelect) StringsX(ctx context.Context) []string
- type QouteRetweetFeatureUpdate
- func (qrfu *QouteRetweetFeatureUpdate) AddFromAccountID(i int64) *QouteRetweetFeatureUpdate
- func (qrfu *QouteRetweetFeatureUpdate) Exec(ctx context.Context) error
- func (qrfu *QouteRetweetFeatureUpdate) ExecX(ctx context.Context)
- func (qrfu *QouteRetweetFeatureUpdate) Mutation() *QouteRetweetFeatureMutation
- func (qrfu *QouteRetweetFeatureUpdate) Save(ctx context.Context) (int, error)
- func (qrfu *QouteRetweetFeatureUpdate) SaveX(ctx context.Context) int
- func (qrfu *QouteRetweetFeatureUpdate) SetCreatedAt(t time.Time) *QouteRetweetFeatureUpdate
- func (qrfu *QouteRetweetFeatureUpdate) SetFromAccountID(i int64) *QouteRetweetFeatureUpdate
- func (qrfu *QouteRetweetFeatureUpdate) SetNillableQouteRetweet(b *bool) *QouteRetweetFeatureUpdate
- func (qrfu *QouteRetweetFeatureUpdate) SetPostID(u uuid.UUID) *QouteRetweetFeatureUpdate
- func (qrfu *QouteRetweetFeatureUpdate) SetQoute(s string) *QouteRetweetFeatureUpdate
- func (qrfu *QouteRetweetFeatureUpdate) SetQouteRetweet(b bool) *QouteRetweetFeatureUpdate
- func (qrfu *QouteRetweetFeatureUpdate) Where(ps ...predicate.Qoute_retweet_feature) *QouteRetweetFeatureUpdate
- type QouteRetweetFeatureUpdateOne
- func (qrfuo *QouteRetweetFeatureUpdateOne) AddFromAccountID(i int64) *QouteRetweetFeatureUpdateOne
- func (qrfuo *QouteRetweetFeatureUpdateOne) Exec(ctx context.Context) error
- func (qrfuo *QouteRetweetFeatureUpdateOne) ExecX(ctx context.Context)
- func (qrfuo *QouteRetweetFeatureUpdateOne) Mutation() *QouteRetweetFeatureMutation
- func (qrfuo *QouteRetweetFeatureUpdateOne) Save(ctx context.Context) (*Qoute_retweet_feature, error)
- func (qrfuo *QouteRetweetFeatureUpdateOne) SaveX(ctx context.Context) *Qoute_retweet_feature
- func (qrfuo *QouteRetweetFeatureUpdateOne) Select(field string, fields ...string) *QouteRetweetFeatureUpdateOne
- func (qrfuo *QouteRetweetFeatureUpdateOne) SetCreatedAt(t time.Time) *QouteRetweetFeatureUpdateOne
- func (qrfuo *QouteRetweetFeatureUpdateOne) SetFromAccountID(i int64) *QouteRetweetFeatureUpdateOne
- func (qrfuo *QouteRetweetFeatureUpdateOne) SetNillableQouteRetweet(b *bool) *QouteRetweetFeatureUpdateOne
- func (qrfuo *QouteRetweetFeatureUpdateOne) SetPostID(u uuid.UUID) *QouteRetweetFeatureUpdateOne
- func (qrfuo *QouteRetweetFeatureUpdateOne) SetQoute(s string) *QouteRetweetFeatureUpdateOne
- func (qrfuo *QouteRetweetFeatureUpdateOne) SetQouteRetweet(b bool) *QouteRetweetFeatureUpdateOne
- type Qoute_retweet_feature
- type Qoute_retweet_featureClient
- func (c *Qoute_retweet_featureClient) Create() *QouteRetweetFeatureCreate
- func (c *Qoute_retweet_featureClient) CreateBulk(builders ...*QouteRetweetFeatureCreate) *QouteRetweetFeatureCreateBulk
- func (c *Qoute_retweet_featureClient) Delete() *QouteRetweetFeatureDelete
- func (c *Qoute_retweet_featureClient) DeleteOne(qrf *Qoute_retweet_feature) *QouteRetweetFeatureDeleteOne
- func (c *Qoute_retweet_featureClient) DeleteOneID(id int) *QouteRetweetFeatureDeleteOne
- func (c *Qoute_retweet_featureClient) Get(ctx context.Context, id int) (*Qoute_retweet_feature, error)
- func (c *Qoute_retweet_featureClient) GetX(ctx context.Context, id int) *Qoute_retweet_feature
- func (c *Qoute_retweet_featureClient) Hooks() []Hook
- func (c *Qoute_retweet_featureClient) Query() *QouteRetweetFeatureQuery
- func (c *Qoute_retweet_featureClient) Update() *QouteRetweetFeatureUpdate
- func (c *Qoute_retweet_featureClient) UpdateOne(qrf *Qoute_retweet_feature) *QouteRetweetFeatureUpdateOne
- func (c *Qoute_retweet_featureClient) UpdateOneID(id int) *QouteRetweetFeatureUpdateOne
- func (c *Qoute_retweet_featureClient) Use(hooks ...Hook)
- type Qoute_retweet_features
- type Query
- type RetweetFeatureCreate
- func (rfc *RetweetFeatureCreate) Exec(ctx context.Context) error
- func (rfc *RetweetFeatureCreate) ExecX(ctx context.Context)
- func (rfc *RetweetFeatureCreate) Mutation() *RetweetFeatureMutation
- func (rfc *RetweetFeatureCreate) Save(ctx context.Context) (*Retweet_feature, error)
- func (rfc *RetweetFeatureCreate) SaveX(ctx context.Context) *Retweet_feature
- func (rfc *RetweetFeatureCreate) SetCreatedAt(t time.Time) *RetweetFeatureCreate
- func (rfc *RetweetFeatureCreate) SetFromAccountID(i int64) *RetweetFeatureCreate
- func (rfc *RetweetFeatureCreate) SetNillableCreatedAt(t *time.Time) *RetweetFeatureCreate
- func (rfc *RetweetFeatureCreate) SetNillableRetweet(b *bool) *RetweetFeatureCreate
- func (rfc *RetweetFeatureCreate) SetPostID(u uuid.UUID) *RetweetFeatureCreate
- func (rfc *RetweetFeatureCreate) SetRetweet(b bool) *RetweetFeatureCreate
- type RetweetFeatureCreateBulk
- func (rfcb *RetweetFeatureCreateBulk) Exec(ctx context.Context) error
- func (rfcb *RetweetFeatureCreateBulk) ExecX(ctx context.Context)
- func (rfcb *RetweetFeatureCreateBulk) Save(ctx context.Context) ([]*Retweet_feature, error)
- func (rfcb *RetweetFeatureCreateBulk) SaveX(ctx context.Context) []*Retweet_feature
- type RetweetFeatureDelete
- type RetweetFeatureDeleteOne
- type RetweetFeatureGroupBy
- func (rfgb *RetweetFeatureGroupBy) Aggregate(fns ...AggregateFunc) *RetweetFeatureGroupBy
- func (s *RetweetFeatureGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RetweetFeatureGroupBy) BoolX(ctx context.Context) bool
- func (s *RetweetFeatureGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RetweetFeatureGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RetweetFeatureGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RetweetFeatureGroupBy) Float64X(ctx context.Context) float64
- func (s *RetweetFeatureGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RetweetFeatureGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RetweetFeatureGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RetweetFeatureGroupBy) IntX(ctx context.Context) int
- func (s *RetweetFeatureGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RetweetFeatureGroupBy) IntsX(ctx context.Context) []int
- func (rfgb *RetweetFeatureGroupBy) Scan(ctx context.Context, v any) error
- func (s *RetweetFeatureGroupBy) ScanX(ctx context.Context, v any)
- func (s *RetweetFeatureGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RetweetFeatureGroupBy) StringX(ctx context.Context) string
- func (s *RetweetFeatureGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RetweetFeatureGroupBy) StringsX(ctx context.Context) []string
- type RetweetFeatureMutation
- func (m *RetweetFeatureMutation) AddField(name string, value ent.Value) error
- func (m *RetweetFeatureMutation) AddFromAccountID(i int64)
- func (m *RetweetFeatureMutation) AddedEdges() []string
- func (m *RetweetFeatureMutation) AddedField(name string) (ent.Value, bool)
- func (m *RetweetFeatureMutation) AddedFields() []string
- func (m *RetweetFeatureMutation) AddedFromAccountID() (r int64, exists bool)
- func (m *RetweetFeatureMutation) AddedIDs(name string) []ent.Value
- func (m *RetweetFeatureMutation) ClearEdge(name string) error
- func (m *RetweetFeatureMutation) ClearField(name string) error
- func (m *RetweetFeatureMutation) ClearedEdges() []string
- func (m *RetweetFeatureMutation) ClearedFields() []string
- func (m RetweetFeatureMutation) Client() *Client
- func (m *RetweetFeatureMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RetweetFeatureMutation) EdgeCleared(name string) bool
- func (m *RetweetFeatureMutation) Field(name string) (ent.Value, bool)
- func (m *RetweetFeatureMutation) FieldCleared(name string) bool
- func (m *RetweetFeatureMutation) Fields() []string
- func (m *RetweetFeatureMutation) FromAccountID() (r int64, exists bool)
- func (m *RetweetFeatureMutation) ID() (id int, exists bool)
- func (m *RetweetFeatureMutation) IDs(ctx context.Context) ([]int, error)
- func (m *RetweetFeatureMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RetweetFeatureMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RetweetFeatureMutation) OldFromAccountID(ctx context.Context) (v int64, err error)
- func (m *RetweetFeatureMutation) OldPostID(ctx context.Context) (v uuid.UUID, err error)
- func (m *RetweetFeatureMutation) OldRetweet(ctx context.Context) (v bool, err error)
- func (m *RetweetFeatureMutation) Op() Op
- func (m *RetweetFeatureMutation) PostID() (r uuid.UUID, exists bool)
- func (m *RetweetFeatureMutation) RemovedEdges() []string
- func (m *RetweetFeatureMutation) RemovedIDs(name string) []ent.Value
- func (m *RetweetFeatureMutation) ResetCreatedAt()
- func (m *RetweetFeatureMutation) ResetEdge(name string) error
- func (m *RetweetFeatureMutation) ResetField(name string) error
- func (m *RetweetFeatureMutation) ResetFromAccountID()
- func (m *RetweetFeatureMutation) ResetPostID()
- func (m *RetweetFeatureMutation) ResetRetweet()
- func (m *RetweetFeatureMutation) Retweet() (r bool, exists bool)
- func (m *RetweetFeatureMutation) SetCreatedAt(t time.Time)
- func (m *RetweetFeatureMutation) SetField(name string, value ent.Value) error
- func (m *RetweetFeatureMutation) SetFromAccountID(i int64)
- func (m *RetweetFeatureMutation) SetPostID(u uuid.UUID)
- func (m *RetweetFeatureMutation) SetRetweet(b bool)
- func (m RetweetFeatureMutation) Tx() (*Tx, error)
- func (m *RetweetFeatureMutation) Type() string
- func (m *RetweetFeatureMutation) Where(ps ...predicate.Retweet_feature)
- type RetweetFeatureQuery
- func (rfq *RetweetFeatureQuery) Aggregate(fns ...AggregateFunc) *RetweetFeatureSelect
- func (rfq *RetweetFeatureQuery) All(ctx context.Context) ([]*Retweet_feature, error)
- func (rfq *RetweetFeatureQuery) AllX(ctx context.Context) []*Retweet_feature
- func (rfq *RetweetFeatureQuery) Clone() *RetweetFeatureQuery
- func (rfq *RetweetFeatureQuery) Count(ctx context.Context) (int, error)
- func (rfq *RetweetFeatureQuery) CountX(ctx context.Context) int
- func (rfq *RetweetFeatureQuery) Exist(ctx context.Context) (bool, error)
- func (rfq *RetweetFeatureQuery) ExistX(ctx context.Context) bool
- func (rfq *RetweetFeatureQuery) First(ctx context.Context) (*Retweet_feature, error)
- func (rfq *RetweetFeatureQuery) FirstID(ctx context.Context) (id int, err error)
- func (rfq *RetweetFeatureQuery) FirstIDX(ctx context.Context) int
- func (rfq *RetweetFeatureQuery) FirstX(ctx context.Context) *Retweet_feature
- func (rfq *RetweetFeatureQuery) GroupBy(field string, fields ...string) *RetweetFeatureGroupBy
- func (rfq *RetweetFeatureQuery) IDs(ctx context.Context) ([]int, error)
- func (rfq *RetweetFeatureQuery) IDsX(ctx context.Context) []int
- func (rfq *RetweetFeatureQuery) Limit(limit int) *RetweetFeatureQuery
- func (rfq *RetweetFeatureQuery) Offset(offset int) *RetweetFeatureQuery
- func (rfq *RetweetFeatureQuery) Only(ctx context.Context) (*Retweet_feature, error)
- func (rfq *RetweetFeatureQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rfq *RetweetFeatureQuery) OnlyIDX(ctx context.Context) int
- func (rfq *RetweetFeatureQuery) OnlyX(ctx context.Context) *Retweet_feature
- func (rfq *RetweetFeatureQuery) Order(o ...OrderFunc) *RetweetFeatureQuery
- func (rfq *RetweetFeatureQuery) Select(fields ...string) *RetweetFeatureSelect
- func (rfq *RetweetFeatureQuery) Unique(unique bool) *RetweetFeatureQuery
- func (rfq *RetweetFeatureQuery) Where(ps ...predicate.Retweet_feature) *RetweetFeatureQuery
- type RetweetFeatureSelect
- func (rfs *RetweetFeatureSelect) Aggregate(fns ...AggregateFunc) *RetweetFeatureSelect
- func (s *RetweetFeatureSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RetweetFeatureSelect) BoolX(ctx context.Context) bool
- func (s *RetweetFeatureSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RetweetFeatureSelect) BoolsX(ctx context.Context) []bool
- func (s *RetweetFeatureSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RetweetFeatureSelect) Float64X(ctx context.Context) float64
- func (s *RetweetFeatureSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RetweetFeatureSelect) Float64sX(ctx context.Context) []float64
- func (s *RetweetFeatureSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RetweetFeatureSelect) IntX(ctx context.Context) int
- func (s *RetweetFeatureSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RetweetFeatureSelect) IntsX(ctx context.Context) []int
- func (rfs *RetweetFeatureSelect) Scan(ctx context.Context, v any) error
- func (s *RetweetFeatureSelect) ScanX(ctx context.Context, v any)
- func (s *RetweetFeatureSelect) String(ctx context.Context) (_ string, err error)
- func (s *RetweetFeatureSelect) StringX(ctx context.Context) string
- func (s *RetweetFeatureSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RetweetFeatureSelect) StringsX(ctx context.Context) []string
- type RetweetFeatureUpdate
- func (rfu *RetweetFeatureUpdate) AddFromAccountID(i int64) *RetweetFeatureUpdate
- func (rfu *RetweetFeatureUpdate) Exec(ctx context.Context) error
- func (rfu *RetweetFeatureUpdate) ExecX(ctx context.Context)
- func (rfu *RetweetFeatureUpdate) Mutation() *RetweetFeatureMutation
- func (rfu *RetweetFeatureUpdate) Save(ctx context.Context) (int, error)
- func (rfu *RetweetFeatureUpdate) SaveX(ctx context.Context) int
- func (rfu *RetweetFeatureUpdate) SetCreatedAt(t time.Time) *RetweetFeatureUpdate
- func (rfu *RetweetFeatureUpdate) SetFromAccountID(i int64) *RetweetFeatureUpdate
- func (rfu *RetweetFeatureUpdate) SetNillableCreatedAt(t *time.Time) *RetweetFeatureUpdate
- func (rfu *RetweetFeatureUpdate) SetNillableRetweet(b *bool) *RetweetFeatureUpdate
- func (rfu *RetweetFeatureUpdate) SetPostID(u uuid.UUID) *RetweetFeatureUpdate
- func (rfu *RetweetFeatureUpdate) SetRetweet(b bool) *RetweetFeatureUpdate
- func (rfu *RetweetFeatureUpdate) Where(ps ...predicate.Retweet_feature) *RetweetFeatureUpdate
- type RetweetFeatureUpdateOne
- func (rfuo *RetweetFeatureUpdateOne) AddFromAccountID(i int64) *RetweetFeatureUpdateOne
- func (rfuo *RetweetFeatureUpdateOne) Exec(ctx context.Context) error
- func (rfuo *RetweetFeatureUpdateOne) ExecX(ctx context.Context)
- func (rfuo *RetweetFeatureUpdateOne) Mutation() *RetweetFeatureMutation
- func (rfuo *RetweetFeatureUpdateOne) Save(ctx context.Context) (*Retweet_feature, error)
- func (rfuo *RetweetFeatureUpdateOne) SaveX(ctx context.Context) *Retweet_feature
- func (rfuo *RetweetFeatureUpdateOne) Select(field string, fields ...string) *RetweetFeatureUpdateOne
- func (rfuo *RetweetFeatureUpdateOne) SetCreatedAt(t time.Time) *RetweetFeatureUpdateOne
- func (rfuo *RetweetFeatureUpdateOne) SetFromAccountID(i int64) *RetweetFeatureUpdateOne
- func (rfuo *RetweetFeatureUpdateOne) SetNillableCreatedAt(t *time.Time) *RetweetFeatureUpdateOne
- func (rfuo *RetweetFeatureUpdateOne) SetNillableRetweet(b *bool) *RetweetFeatureUpdateOne
- func (rfuo *RetweetFeatureUpdateOne) SetPostID(u uuid.UUID) *RetweetFeatureUpdateOne
- func (rfuo *RetweetFeatureUpdateOne) SetRetweet(b bool) *RetweetFeatureUpdateOne
- type Retweet_feature
- type Retweet_featureClient
- func (c *Retweet_featureClient) Create() *RetweetFeatureCreate
- func (c *Retweet_featureClient) CreateBulk(builders ...*RetweetFeatureCreate) *RetweetFeatureCreateBulk
- func (c *Retweet_featureClient) Delete() *RetweetFeatureDelete
- func (c *Retweet_featureClient) DeleteOne(rf *Retweet_feature) *RetweetFeatureDeleteOne
- func (c *Retweet_featureClient) DeleteOneID(id int) *RetweetFeatureDeleteOne
- func (c *Retweet_featureClient) Get(ctx context.Context, id int) (*Retweet_feature, error)
- func (c *Retweet_featureClient) GetX(ctx context.Context, id int) *Retweet_feature
- func (c *Retweet_featureClient) Hooks() []Hook
- func (c *Retweet_featureClient) Query() *RetweetFeatureQuery
- func (c *Retweet_featureClient) Update() *RetweetFeatureUpdate
- func (c *Retweet_featureClient) UpdateOne(rf *Retweet_feature) *RetweetFeatureUpdateOne
- func (c *Retweet_featureClient) UpdateOneID(id int) *RetweetFeatureUpdateOne
- func (c *Retweet_featureClient) Use(hooks ...Hook)
- type Retweet_features
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tokens
- type TokensClient
- func (c *TokensClient) Create() *TokensCreate
- func (c *TokensClient) CreateBulk(builders ...*TokensCreate) *TokensCreateBulk
- func (c *TokensClient) Delete() *TokensDelete
- func (c *TokensClient) DeleteOne(t *Tokens) *TokensDeleteOne
- func (c *TokensClient) DeleteOneID(id uuid.UUID) *TokensDeleteOne
- func (c *TokensClient) Get(ctx context.Context, id uuid.UUID) (*Tokens, error)
- func (c *TokensClient) GetX(ctx context.Context, id uuid.UUID) *Tokens
- func (c *TokensClient) Hooks() []Hook
- func (c *TokensClient) Query() *TokensQuery
- func (c *TokensClient) Update() *TokensUpdate
- func (c *TokensClient) UpdateOne(t *Tokens) *TokensUpdateOne
- func (c *TokensClient) UpdateOneID(id uuid.UUID) *TokensUpdateOne
- func (c *TokensClient) Use(hooks ...Hook)
- type TokensCreate
- func (tc *TokensCreate) Exec(ctx context.Context) error
- func (tc *TokensCreate) ExecX(ctx context.Context)
- func (tc *TokensCreate) Mutation() *TokensMutation
- func (tc *TokensCreate) Save(ctx context.Context) (*Tokens, error)
- func (tc *TokensCreate) SaveX(ctx context.Context) *Tokens
- func (tc *TokensCreate) SetAccessToken(s string) *TokensCreate
- func (tc *TokensCreate) SetEmail(s string) *TokensCreate
- func (tc *TokensCreate) SetExpiry(t time.Time) *TokensCreate
- func (tc *TokensCreate) SetID(u uuid.UUID) *TokensCreate
- func (tc *TokensCreate) SetNillableID(u *uuid.UUID) *TokensCreate
- func (tc *TokensCreate) SetRaw(m map[string]interface{}) *TokensCreate
- func (tc *TokensCreate) SetRefreshToken(s string) *TokensCreate
- func (tc *TokensCreate) SetTokenType(s string) *TokensCreate
- type TokensCreateBulk
- type TokensDelete
- type TokensDeleteOne
- type TokensGroupBy
- func (tgb *TokensGroupBy) Aggregate(fns ...AggregateFunc) *TokensGroupBy
- func (s *TokensGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TokensGroupBy) BoolX(ctx context.Context) bool
- func (s *TokensGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TokensGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TokensGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TokensGroupBy) Float64X(ctx context.Context) float64
- func (s *TokensGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TokensGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TokensGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TokensGroupBy) IntX(ctx context.Context) int
- func (s *TokensGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TokensGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TokensGroupBy) Scan(ctx context.Context, v any) error
- func (s *TokensGroupBy) ScanX(ctx context.Context, v any)
- func (s *TokensGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TokensGroupBy) StringX(ctx context.Context) string
- func (s *TokensGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TokensGroupBy) StringsX(ctx context.Context) []string
- type TokensMutation
- func (m *TokensMutation) AccessToken() (r string, exists bool)
- func (m *TokensMutation) AddField(name string, value ent.Value) error
- func (m *TokensMutation) AddedEdges() []string
- func (m *TokensMutation) AddedField(name string) (ent.Value, bool)
- func (m *TokensMutation) AddedFields() []string
- func (m *TokensMutation) AddedIDs(name string) []ent.Value
- func (m *TokensMutation) ClearEdge(name string) error
- func (m *TokensMutation) ClearField(name string) error
- func (m *TokensMutation) ClearedEdges() []string
- func (m *TokensMutation) ClearedFields() []string
- func (m TokensMutation) Client() *Client
- func (m *TokensMutation) EdgeCleared(name string) bool
- func (m *TokensMutation) Email() (r string, exists bool)
- func (m *TokensMutation) Expiry() (r time.Time, exists bool)
- func (m *TokensMutation) Field(name string) (ent.Value, bool)
- func (m *TokensMutation) FieldCleared(name string) bool
- func (m *TokensMutation) Fields() []string
- func (m *TokensMutation) ID() (id uuid.UUID, exists bool)
- func (m *TokensMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TokensMutation) OldAccessToken(ctx context.Context) (v string, err error)
- func (m *TokensMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *TokensMutation) OldExpiry(ctx context.Context) (v time.Time, err error)
- func (m *TokensMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TokensMutation) OldRaw(ctx context.Context) (v map[string]interface{}, err error)
- func (m *TokensMutation) OldRefreshToken(ctx context.Context) (v string, err error)
- func (m *TokensMutation) OldTokenType(ctx context.Context) (v string, err error)
- func (m *TokensMutation) Op() Op
- func (m *TokensMutation) Raw() (r map[string]interface{}, exists bool)
- func (m *TokensMutation) RefreshToken() (r string, exists bool)
- func (m *TokensMutation) RemovedEdges() []string
- func (m *TokensMutation) RemovedIDs(name string) []ent.Value
- func (m *TokensMutation) ResetAccessToken()
- func (m *TokensMutation) ResetEdge(name string) error
- func (m *TokensMutation) ResetEmail()
- func (m *TokensMutation) ResetExpiry()
- func (m *TokensMutation) ResetField(name string) error
- func (m *TokensMutation) ResetRaw()
- func (m *TokensMutation) ResetRefreshToken()
- func (m *TokensMutation) ResetTokenType()
- func (m *TokensMutation) SetAccessToken(s string)
- func (m *TokensMutation) SetEmail(s string)
- func (m *TokensMutation) SetExpiry(t time.Time)
- func (m *TokensMutation) SetField(name string, value ent.Value) error
- func (m *TokensMutation) SetID(id uuid.UUID)
- func (m *TokensMutation) SetRaw(value map[string]interface{})
- func (m *TokensMutation) SetRefreshToken(s string)
- func (m *TokensMutation) SetTokenType(s string)
- func (m *TokensMutation) TokenType() (r string, exists bool)
- func (m TokensMutation) Tx() (*Tx, error)
- func (m *TokensMutation) Type() string
- func (m *TokensMutation) Where(ps ...predicate.Tokens)
- type TokensQuery
- func (tq *TokensQuery) Aggregate(fns ...AggregateFunc) *TokensSelect
- func (tq *TokensQuery) All(ctx context.Context) ([]*Tokens, error)
- func (tq *TokensQuery) AllX(ctx context.Context) []*Tokens
- func (tq *TokensQuery) Clone() *TokensQuery
- func (tq *TokensQuery) Count(ctx context.Context) (int, error)
- func (tq *TokensQuery) CountX(ctx context.Context) int
- func (tq *TokensQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TokensQuery) ExistX(ctx context.Context) bool
- func (tq *TokensQuery) First(ctx context.Context) (*Tokens, error)
- func (tq *TokensQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TokensQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (tq *TokensQuery) FirstX(ctx context.Context) *Tokens
- func (tq *TokensQuery) GroupBy(field string, fields ...string) *TokensGroupBy
- func (tq *TokensQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (tq *TokensQuery) IDsX(ctx context.Context) []uuid.UUID
- func (tq *TokensQuery) Limit(limit int) *TokensQuery
- func (tq *TokensQuery) Offset(offset int) *TokensQuery
- func (tq *TokensQuery) Only(ctx context.Context) (*Tokens, error)
- func (tq *TokensQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TokensQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (tq *TokensQuery) OnlyX(ctx context.Context) *Tokens
- func (tq *TokensQuery) Order(o ...OrderFunc) *TokensQuery
- func (tq *TokensQuery) Select(fields ...string) *TokensSelect
- func (tq *TokensQuery) Unique(unique bool) *TokensQuery
- func (tq *TokensQuery) Where(ps ...predicate.Tokens) *TokensQuery
- type TokensSelect
- func (ts *TokensSelect) Aggregate(fns ...AggregateFunc) *TokensSelect
- func (s *TokensSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TokensSelect) BoolX(ctx context.Context) bool
- func (s *TokensSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TokensSelect) BoolsX(ctx context.Context) []bool
- func (s *TokensSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TokensSelect) Float64X(ctx context.Context) float64
- func (s *TokensSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TokensSelect) Float64sX(ctx context.Context) []float64
- func (s *TokensSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TokensSelect) IntX(ctx context.Context) int
- func (s *TokensSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TokensSelect) IntsX(ctx context.Context) []int
- func (ts *TokensSelect) Scan(ctx context.Context, v any) error
- func (s *TokensSelect) ScanX(ctx context.Context, v any)
- func (s *TokensSelect) String(ctx context.Context) (_ string, err error)
- func (s *TokensSelect) StringX(ctx context.Context) string
- func (s *TokensSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TokensSelect) StringsX(ctx context.Context) []string
- type TokensSlice
- type TokensUpdate
- func (tu *TokensUpdate) Exec(ctx context.Context) error
- func (tu *TokensUpdate) ExecX(ctx context.Context)
- func (tu *TokensUpdate) Mutation() *TokensMutation
- func (tu *TokensUpdate) Save(ctx context.Context) (int, error)
- func (tu *TokensUpdate) SaveX(ctx context.Context) int
- func (tu *TokensUpdate) SetAccessToken(s string) *TokensUpdate
- func (tu *TokensUpdate) SetEmail(s string) *TokensUpdate
- func (tu *TokensUpdate) SetExpiry(t time.Time) *TokensUpdate
- func (tu *TokensUpdate) SetRaw(m map[string]interface{}) *TokensUpdate
- func (tu *TokensUpdate) SetRefreshToken(s string) *TokensUpdate
- func (tu *TokensUpdate) SetTokenType(s string) *TokensUpdate
- func (tu *TokensUpdate) Where(ps ...predicate.Tokens) *TokensUpdate
- type TokensUpdateOne
- func (tuo *TokensUpdateOne) Exec(ctx context.Context) error
- func (tuo *TokensUpdateOne) ExecX(ctx context.Context)
- func (tuo *TokensUpdateOne) Mutation() *TokensMutation
- func (tuo *TokensUpdateOne) Save(ctx context.Context) (*Tokens, error)
- func (tuo *TokensUpdateOne) SaveX(ctx context.Context) *Tokens
- func (tuo *TokensUpdateOne) Select(field string, fields ...string) *TokensUpdateOne
- func (tuo *TokensUpdateOne) SetAccessToken(s string) *TokensUpdateOne
- func (tuo *TokensUpdateOne) SetEmail(s string) *TokensUpdateOne
- func (tuo *TokensUpdateOne) SetExpiry(t time.Time) *TokensUpdateOne
- func (tuo *TokensUpdateOne) SetRaw(m map[string]interface{}) *TokensUpdateOne
- func (tuo *TokensUpdateOne) SetRefreshToken(s string) *TokensUpdateOne
- func (tuo *TokensUpdateOne) SetTokenType(s string) *TokensUpdateOne
- type Tx
- type Users
- 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) Query() *UsersQuery
- 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) 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) SetCreatedAt(t time.Time) *UsersCreate
- func (uc *UsersCreate) SetEmail(s string) *UsersCreate
- func (uc *UsersCreate) SetFullName(s string) *UsersCreate
- func (uc *UsersCreate) SetHashedPassword(s string) *UsersCreate
- func (uc *UsersCreate) SetID(u uuid.UUID) *UsersCreate
- func (uc *UsersCreate) SetNillableCreatedAt(t *time.Time) *UsersCreate
- func (uc *UsersCreate) SetNillableHashedPassword(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillablePasswordChangedAt(t *time.Time) *UsersCreate
- func (uc *UsersCreate) SetPasswordChangedAt(t time.Time) *UsersCreate
- func (uc *UsersCreate) SetUsername(s string) *UsersCreate
- type UsersCreateBulk
- type UsersDelete
- type UsersDeleteOne
- 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) AddField(name string, value ent.Value) error
- func (m *UsersMutation) AddedEdges() []string
- 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) ClearEdge(name string) error
- func (m *UsersMutation) ClearField(name string) error
- func (m *UsersMutation) ClearHashedPassword()
- func (m *UsersMutation) ClearPasswordChangedAt()
- 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) EdgeCleared(name string) bool
- func (m *UsersMutation) Email() (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) FullName() (r string, exists bool)
- func (m *UsersMutation) HashedPassword() (r string, exists bool)
- func (m *UsersMutation) HashedPasswordCleared() bool
- func (m *UsersMutation) ID() (id uuid.UUID, exists bool)
- func (m *UsersMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UsersMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UsersMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UsersMutation) OldFullName(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldHashedPassword(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldPasswordChangedAt(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) PasswordChangedAt() (r time.Time, exists bool)
- func (m *UsersMutation) PasswordChangedAtCleared() bool
- func (m *UsersMutation) RemovedEdges() []string
- func (m *UsersMutation) RemovedIDs(name string) []ent.Value
- func (m *UsersMutation) ResetCreatedAt()
- func (m *UsersMutation) ResetEdge(name string) error
- func (m *UsersMutation) ResetEmail()
- func (m *UsersMutation) ResetField(name string) error
- func (m *UsersMutation) ResetFullName()
- func (m *UsersMutation) ResetHashedPassword()
- func (m *UsersMutation) ResetPasswordChangedAt()
- func (m *UsersMutation) ResetUsername()
- func (m *UsersMutation) SetCreatedAt(t time.Time)
- func (m *UsersMutation) SetEmail(s string)
- func (m *UsersMutation) SetField(name string, value ent.Value) error
- func (m *UsersMutation) SetFullName(s string)
- func (m *UsersMutation) SetHashedPassword(s string)
- func (m *UsersMutation) SetID(id uuid.UUID)
- func (m *UsersMutation) SetPasswordChangedAt(t time.Time)
- func (m *UsersMutation) SetUsername(s string)
- func (m UsersMutation) Tx() (*Tx, error)
- func (m *UsersMutation) Type() string
- func (m *UsersMutation) Username() (r string, exists bool)
- func (m *UsersMutation) Where(ps ...predicate.Users)
- 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) ([]uuid.UUID, 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 ...OrderFunc) *UsersQuery
- func (uq *UsersQuery) Select(fields ...string) *UsersSelect
- func (uq *UsersQuery) Unique(unique bool) *UsersQuery
- func (uq *UsersQuery) Where(ps ...predicate.Users) *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) ClearHashedPassword() *UsersUpdate
- func (uu *UsersUpdate) ClearPasswordChangedAt() *UsersUpdate
- func (uu *UsersUpdate) Exec(ctx context.Context) error
- func (uu *UsersUpdate) ExecX(ctx context.Context)
- func (uu *UsersUpdate) Mutation() *UsersMutation
- func (uu *UsersUpdate) Save(ctx context.Context) (int, error)
- func (uu *UsersUpdate) SaveX(ctx context.Context) int
- func (uu *UsersUpdate) SetCreatedAt(t time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetEmail(s string) *UsersUpdate
- func (uu *UsersUpdate) SetFullName(s string) *UsersUpdate
- func (uu *UsersUpdate) SetHashedPassword(s string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableCreatedAt(t *time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetNillableHashedPassword(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillablePasswordChangedAt(t *time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetPasswordChangedAt(t time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetUsername(s string) *UsersUpdate
- func (uu *UsersUpdate) Where(ps ...predicate.Users) *UsersUpdate
- type UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearHashedPassword() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearPasswordChangedAt() *UsersUpdateOne
- func (uuo *UsersUpdateOne) Exec(ctx context.Context) error
- func (uuo *UsersUpdateOne) ExecX(ctx context.Context)
- func (uuo *UsersUpdateOne) Mutation() *UsersMutation
- 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) SetCreatedAt(t time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetEmail(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetFullName(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetHashedPassword(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableCreatedAt(t *time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableHashedPassword(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillablePasswordChangedAt(t *time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetPasswordChangedAt(t time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetUsername(s string) *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" TypeAccountNotifs = "AccountNotifs" TypeLikeFeature = "LikeFeature" TypePost = "Post" TypeQoute_retweet_feature = "Qoute_retweet_feature" TypeRetweet_feature = "Retweet_feature" TypeTokens = "Tokens" TypeUsers = "Users" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Account ¶
type Account struct { // ID of the ent. ID int64 `json:"id,omitempty"` // Owner holds the value of the "owner" field. Owner string `json:"owner,omitempty"` // IsPrivate holds the value of the "is_private" field. IsPrivate bool `json:"is_private,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Follower holds the value of the "follower" field. Follower int64 `json:"follower,omitempty"` // Following holds the value of the "following" field. Following int64 `json:"following,omitempty"` // PhotoDir holds the value of the "photo_dir" field. PhotoDir *string `json:"photo_dir,omitempty"` // contains filtered or unexported fields }
Account is the model entity for the Account schema.
func (*Account) Unwrap ¶
Unwrap unwraps the Account entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Account) Update ¶
func (a *Account) Update() *AccountUpdateOne
Update returns a builder for updating this Account. Note that you need to call Account.Unwrap() before calling this method if this Account was returned from a transaction, and the transaction was committed or rolled back.
type AccountClient ¶
type AccountClient struct {
// contains filtered or unexported fields
}
AccountClient is a client for the Account schema.
func NewAccountClient ¶
func NewAccountClient(c config) *AccountClient
NewAccountClient returns a client for the Account from the given config.
func (*AccountClient) Create ¶
func (c *AccountClient) Create() *AccountCreate
Create returns a 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 int64) *AccountDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AccountClient) GetX ¶
func (c *AccountClient) GetX(ctx context.Context, id int64) *Account
GetX is like Get, but panics if an error occurs.
func (*AccountClient) Hooks ¶
func (c *AccountClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AccountClient) Query ¶
func (c *AccountClient) Query() *AccountQuery
Query returns a query builder for Account.
func (*AccountClient) Update ¶
func (c *AccountClient) Update() *AccountUpdate
Update returns an update builder for Account.
func (*AccountClient) UpdateOne ¶
func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AccountClient) UpdateOneID ¶
func (c *AccountClient) UpdateOneID(id int64) *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) SetCreatedAt ¶
func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate
SetCreatedAt sets the "created_at" field.
func (*AccountCreate) SetFollower ¶
func (ac *AccountCreate) SetFollower(i int64) *AccountCreate
SetFollower sets the "follower" field.
func (*AccountCreate) SetFollowing ¶
func (ac *AccountCreate) SetFollowing(i int64) *AccountCreate
SetFollowing sets the "following" field.
func (*AccountCreate) SetID ¶
func (ac *AccountCreate) SetID(i int64) *AccountCreate
SetID sets the "id" field.
func (*AccountCreate) SetIsPrivate ¶
func (ac *AccountCreate) SetIsPrivate(b bool) *AccountCreate
SetIsPrivate sets the "is_private" field.
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) SetNillableFollower ¶
func (ac *AccountCreate) SetNillableFollower(i *int64) *AccountCreate
SetNillableFollower sets the "follower" field if the given value is not nil.
func (*AccountCreate) SetNillableFollowing ¶
func (ac *AccountCreate) SetNillableFollowing(i *int64) *AccountCreate
SetNillableFollowing sets the "following" field if the given value is not nil.
func (*AccountCreate) SetNillableIsPrivate ¶
func (ac *AccountCreate) SetNillableIsPrivate(b *bool) *AccountCreate
SetNillableIsPrivate sets the "is_private" field if the given value is not nil.
func (*AccountCreate) SetNillablePhotoDir ¶
func (ac *AccountCreate) SetNillablePhotoDir(s *string) *AccountCreate
SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.
func (*AccountCreate) SetOwner ¶
func (ac *AccountCreate) SetOwner(s string) *AccountCreate
SetOwner sets the "owner" field.
func (*AccountCreate) SetPhotoDir ¶
func (ac *AccountCreate) SetPhotoDir(s string) *AccountCreate
SetPhotoDir sets the "photo_dir" field.
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.
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 group-by 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) AddFollower ¶
func (m *AccountMutation) AddFollower(i int64)
AddFollower adds i to the "follower" field.
func (*AccountMutation) AddFollowing ¶
func (m *AccountMutation) AddFollowing(i int64)
AddFollowing adds i to the "following" field.
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) AddedFollower ¶
func (m *AccountMutation) AddedFollower() (r int64, exists bool)
AddedFollower returns the value that was added to the "follower" field in this mutation.
func (*AccountMutation) AddedFollowing ¶
func (m *AccountMutation) AddedFollowing() (r int64, exists bool)
AddedFollowing returns the value that was added to the "following" field in 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) 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) 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) ClearPhotoDir ¶
func (m *AccountMutation) ClearPhotoDir()
ClearPhotoDir clears the value of the "photo_dir" field.
func (*AccountMutation) ClearedEdges ¶
func (m *AccountMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AccountMutation) ClearedFields ¶
func (m *AccountMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AccountMutation) Client ¶
func (m AccountMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*AccountMutation) CreatedAt ¶
func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AccountMutation) EdgeCleared ¶
func (m *AccountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AccountMutation) 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) Follower ¶
func (m *AccountMutation) Follower() (r int64, exists bool)
Follower returns the value of the "follower" field in the mutation.
func (*AccountMutation) Following ¶
func (m *AccountMutation) Following() (r int64, exists bool)
Following returns the value of the "following" field in the mutation.
func (*AccountMutation) ID ¶
func (m *AccountMutation) ID() (id int64, 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 ¶
func (m *AccountMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AccountMutation) IsPrivate ¶
func (m *AccountMutation) IsPrivate() (r bool, exists bool)
IsPrivate returns the value of the "is_private" field in the mutation.
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) 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) OldFollower ¶
func (m *AccountMutation) OldFollower(ctx context.Context) (v int64, err error)
OldFollower returns the old "follower" 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) OldFollowing ¶
func (m *AccountMutation) OldFollowing(ctx context.Context) (v int64, err error)
OldFollowing returns the old "following" 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) OldIsPrivate ¶
func (m *AccountMutation) OldIsPrivate(ctx context.Context) (v bool, err error)
OldIsPrivate returns the old "is_private" 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) OldOwner ¶
func (m *AccountMutation) OldOwner(ctx context.Context) (v string, err error)
OldOwner returns the old "owner" 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) OldPhotoDir ¶
func (m *AccountMutation) OldPhotoDir(ctx context.Context) (v *string, err error)
OldPhotoDir returns the old "photo_dir" 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) Owner ¶
func (m *AccountMutation) Owner() (r string, exists bool)
Owner returns the value of the "owner" field in the mutation.
func (*AccountMutation) PhotoDir ¶
func (m *AccountMutation) PhotoDir() (r string, exists bool)
PhotoDir returns the value of the "photo_dir" field in the mutation.
func (*AccountMutation) PhotoDirCleared ¶
func (m *AccountMutation) PhotoDirCleared() bool
PhotoDirCleared returns if the "photo_dir" field was cleared in this mutation.
func (*AccountMutation) RemovedEdges ¶
func (m *AccountMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AccountMutation) RemovedIDs ¶
func (m *AccountMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*AccountMutation) ResetCreatedAt ¶
func (m *AccountMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AccountMutation) ResetEdge ¶
func (m *AccountMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*AccountMutation) 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) ResetFollower ¶
func (m *AccountMutation) ResetFollower()
ResetFollower resets all changes to the "follower" field.
func (*AccountMutation) ResetFollowing ¶
func (m *AccountMutation) ResetFollowing()
ResetFollowing resets all changes to the "following" field.
func (*AccountMutation) ResetIsPrivate ¶
func (m *AccountMutation) ResetIsPrivate()
ResetIsPrivate resets all changes to the "is_private" field.
func (*AccountMutation) ResetOwner ¶
func (m *AccountMutation) ResetOwner()
ResetOwner resets all changes to the "owner" field.
func (*AccountMutation) ResetPhotoDir ¶
func (m *AccountMutation) ResetPhotoDir()
ResetPhotoDir resets all changes to the "photo_dir" field.
func (*AccountMutation) SetCreatedAt ¶
func (m *AccountMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" 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) SetFollower ¶
func (m *AccountMutation) SetFollower(i int64)
SetFollower sets the "follower" field.
func (*AccountMutation) SetFollowing ¶
func (m *AccountMutation) SetFollowing(i int64)
SetFollowing sets the "following" field.
func (*AccountMutation) SetID ¶
func (m *AccountMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Account entities.
func (*AccountMutation) SetIsPrivate ¶
func (m *AccountMutation) SetIsPrivate(b bool)
SetIsPrivate sets the "is_private" field.
func (*AccountMutation) SetOwner ¶
func (m *AccountMutation) SetOwner(s string)
SetOwner sets the "owner" field.
func (*AccountMutation) SetPhotoDir ¶
func (m *AccountMutation) SetPhotoDir(s string)
SetPhotoDir sets the "photo_dir" field.
func (AccountMutation) Tx ¶
func (m AccountMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AccountMutation) Type ¶
func (m *AccountMutation) Type() string
Type returns the node type of this mutation (Account).
func (*AccountMutation) Where ¶
func (m *AccountMutation) Where(ps ...predicate.Account)
Where appends a list predicates to the AccountMutation builder.
type AccountNotifs ¶
type AccountNotifs struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // for deploy purpose AccountID *int64 `json:"account_id,omitempty"` // NotifType holds the value of the "notif_type" field. NotifType string `json:"notif_type,omitempty"` // NotifTitle holds the value of the "notif_title" field. NotifTitle string `json:"notif_title,omitempty"` // NotifContent holds the value of the "notif_content" field. NotifContent string `json:"notif_content,omitempty"` // for deploy purpose NotifTime *time.Time `json:"notif_time,omitempty"` // for deploy purpose Username *string `json:"username,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
AccountNotifs is the model entity for the AccountNotifs schema.
func (*AccountNotifs) String ¶
func (an *AccountNotifs) String() string
String implements the fmt.Stringer.
func (*AccountNotifs) Unwrap ¶
func (an *AccountNotifs) Unwrap() *AccountNotifs
Unwrap unwraps the AccountNotifs 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 (*AccountNotifs) Update ¶
func (an *AccountNotifs) Update() *AccountNotifsUpdateOne
Update returns a builder for updating this AccountNotifs. Note that you need to call AccountNotifs.Unwrap() before calling this method if this AccountNotifs was returned from a transaction, and the transaction was committed or rolled back.
type AccountNotifsClient ¶
type AccountNotifsClient struct {
// contains filtered or unexported fields
}
AccountNotifsClient is a client for the AccountNotifs schema.
func NewAccountNotifsClient ¶
func NewAccountNotifsClient(c config) *AccountNotifsClient
NewAccountNotifsClient returns a client for the AccountNotifs from the given config.
func (*AccountNotifsClient) Create ¶
func (c *AccountNotifsClient) Create() *AccountNotifsCreate
Create returns a builder for creating a AccountNotifs entity.
func (*AccountNotifsClient) CreateBulk ¶
func (c *AccountNotifsClient) CreateBulk(builders ...*AccountNotifsCreate) *AccountNotifsCreateBulk
CreateBulk returns a builder for creating a bulk of AccountNotifs entities.
func (*AccountNotifsClient) Delete ¶
func (c *AccountNotifsClient) Delete() *AccountNotifsDelete
Delete returns a delete builder for AccountNotifs.
func (*AccountNotifsClient) DeleteOne ¶
func (c *AccountNotifsClient) DeleteOne(an *AccountNotifs) *AccountNotifsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AccountNotifsClient) DeleteOneID ¶
func (c *AccountNotifsClient) DeleteOneID(id uuid.UUID) *AccountNotifsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AccountNotifsClient) Get ¶
func (c *AccountNotifsClient) Get(ctx context.Context, id uuid.UUID) (*AccountNotifs, error)
Get returns a AccountNotifs entity by its id.
func (*AccountNotifsClient) GetX ¶
func (c *AccountNotifsClient) GetX(ctx context.Context, id uuid.UUID) *AccountNotifs
GetX is like Get, but panics if an error occurs.
func (*AccountNotifsClient) Hooks ¶
func (c *AccountNotifsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AccountNotifsClient) Query ¶
func (c *AccountNotifsClient) Query() *AccountNotifsQuery
Query returns a query builder for AccountNotifs.
func (*AccountNotifsClient) Update ¶
func (c *AccountNotifsClient) Update() *AccountNotifsUpdate
Update returns an update builder for AccountNotifs.
func (*AccountNotifsClient) UpdateOne ¶
func (c *AccountNotifsClient) UpdateOne(an *AccountNotifs) *AccountNotifsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AccountNotifsClient) UpdateOneID ¶
func (c *AccountNotifsClient) UpdateOneID(id uuid.UUID) *AccountNotifsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AccountNotifsClient) Use ¶
func (c *AccountNotifsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `accountnotifs.Hooks(f(g(h())))`.
type AccountNotifsCreate ¶
type AccountNotifsCreate struct {
// contains filtered or unexported fields
}
AccountNotifsCreate is the builder for creating a AccountNotifs entity.
func (*AccountNotifsCreate) Exec ¶
func (anc *AccountNotifsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountNotifsCreate) ExecX ¶
func (anc *AccountNotifsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountNotifsCreate) Mutation ¶
func (anc *AccountNotifsCreate) Mutation() *AccountNotifsMutation
Mutation returns the AccountNotifsMutation object of the builder.
func (*AccountNotifsCreate) Save ¶
func (anc *AccountNotifsCreate) Save(ctx context.Context) (*AccountNotifs, error)
Save creates the AccountNotifs in the database.
func (*AccountNotifsCreate) SaveX ¶
func (anc *AccountNotifsCreate) SaveX(ctx context.Context) *AccountNotifs
SaveX calls Save and panics if Save returns an error.
func (*AccountNotifsCreate) SetAccountID ¶
func (anc *AccountNotifsCreate) SetAccountID(i int64) *AccountNotifsCreate
SetAccountID sets the "account_id" field.
func (*AccountNotifsCreate) SetCreatedAt ¶
func (anc *AccountNotifsCreate) SetCreatedAt(t time.Time) *AccountNotifsCreate
SetCreatedAt sets the "created_at" field.
func (*AccountNotifsCreate) SetID ¶
func (anc *AccountNotifsCreate) SetID(u uuid.UUID) *AccountNotifsCreate
SetID sets the "id" field.
func (*AccountNotifsCreate) SetNillableAccountID ¶
func (anc *AccountNotifsCreate) SetNillableAccountID(i *int64) *AccountNotifsCreate
SetNillableAccountID sets the "account_id" field if the given value is not nil.
func (*AccountNotifsCreate) SetNillableCreatedAt ¶
func (anc *AccountNotifsCreate) SetNillableCreatedAt(t *time.Time) *AccountNotifsCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccountNotifsCreate) SetNillableID ¶
func (anc *AccountNotifsCreate) SetNillableID(u *uuid.UUID) *AccountNotifsCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AccountNotifsCreate) SetNillableNotifContent ¶
func (anc *AccountNotifsCreate) SetNillableNotifContent(s *string) *AccountNotifsCreate
SetNillableNotifContent sets the "notif_content" field if the given value is not nil.
func (*AccountNotifsCreate) SetNillableNotifTime ¶
func (anc *AccountNotifsCreate) SetNillableNotifTime(t *time.Time) *AccountNotifsCreate
SetNillableNotifTime sets the "notif_time" field if the given value is not nil.
func (*AccountNotifsCreate) SetNillableNotifTitle ¶
func (anc *AccountNotifsCreate) SetNillableNotifTitle(s *string) *AccountNotifsCreate
SetNillableNotifTitle sets the "notif_title" field if the given value is not nil.
func (*AccountNotifsCreate) SetNillableUsername ¶
func (anc *AccountNotifsCreate) SetNillableUsername(s *string) *AccountNotifsCreate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*AccountNotifsCreate) SetNotifContent ¶
func (anc *AccountNotifsCreate) SetNotifContent(s string) *AccountNotifsCreate
SetNotifContent sets the "notif_content" field.
func (*AccountNotifsCreate) SetNotifTime ¶
func (anc *AccountNotifsCreate) SetNotifTime(t time.Time) *AccountNotifsCreate
SetNotifTime sets the "notif_time" field.
func (*AccountNotifsCreate) SetNotifTitle ¶
func (anc *AccountNotifsCreate) SetNotifTitle(s string) *AccountNotifsCreate
SetNotifTitle sets the "notif_title" field.
func (*AccountNotifsCreate) SetNotifType ¶
func (anc *AccountNotifsCreate) SetNotifType(s string) *AccountNotifsCreate
SetNotifType sets the "notif_type" field.
func (*AccountNotifsCreate) SetUsername ¶
func (anc *AccountNotifsCreate) SetUsername(s string) *AccountNotifsCreate
SetUsername sets the "username" field.
type AccountNotifsCreateBulk ¶
type AccountNotifsCreateBulk struct {
// contains filtered or unexported fields
}
AccountNotifsCreateBulk is the builder for creating many AccountNotifs entities in bulk.
func (*AccountNotifsCreateBulk) Exec ¶
func (ancb *AccountNotifsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountNotifsCreateBulk) ExecX ¶
func (ancb *AccountNotifsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountNotifsCreateBulk) Save ¶
func (ancb *AccountNotifsCreateBulk) Save(ctx context.Context) ([]*AccountNotifs, error)
Save creates the AccountNotifs entities in the database.
func (*AccountNotifsCreateBulk) SaveX ¶
func (ancb *AccountNotifsCreateBulk) SaveX(ctx context.Context) []*AccountNotifs
SaveX is like Save, but panics if an error occurs.
type AccountNotifsDelete ¶
type AccountNotifsDelete struct {
// contains filtered or unexported fields
}
AccountNotifsDelete is the builder for deleting a AccountNotifs entity.
func (*AccountNotifsDelete) Exec ¶
func (and *AccountNotifsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AccountNotifsDelete) ExecX ¶
func (and *AccountNotifsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AccountNotifsDelete) Where ¶
func (and *AccountNotifsDelete) Where(ps ...predicate.AccountNotifs) *AccountNotifsDelete
Where appends a list predicates to the AccountNotifsDelete builder.
type AccountNotifsDeleteOne ¶
type AccountNotifsDeleteOne struct {
// contains filtered or unexported fields
}
AccountNotifsDeleteOne is the builder for deleting a single AccountNotifs entity.
func (*AccountNotifsDeleteOne) Exec ¶
func (ando *AccountNotifsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AccountNotifsDeleteOne) ExecX ¶
func (ando *AccountNotifsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AccountNotifsGroupBy ¶
type AccountNotifsGroupBy struct {
// contains filtered or unexported fields
}
AccountNotifsGroupBy is the group-by builder for AccountNotifs entities.
func (*AccountNotifsGroupBy) Aggregate ¶
func (angb *AccountNotifsGroupBy) Aggregate(fns ...AggregateFunc) *AccountNotifsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AccountNotifsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountNotifsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccountNotifsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountNotifsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountNotifsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountNotifsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountNotifsGroupBy) Scan ¶
func (angb *AccountNotifsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*AccountNotifsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccountNotifsMutation ¶
type AccountNotifsMutation struct {
// contains filtered or unexported fields
}
AccountNotifsMutation represents an operation that mutates the AccountNotifs nodes in the graph.
func (*AccountNotifsMutation) AccountID ¶
func (m *AccountNotifsMutation) AccountID() (r int64, exists bool)
AccountID returns the value of the "account_id" field in the mutation.
func (*AccountNotifsMutation) AccountIDCleared ¶
func (m *AccountNotifsMutation) AccountIDCleared() bool
AccountIDCleared returns if the "account_id" field was cleared in this mutation.
func (*AccountNotifsMutation) AddAccountID ¶
func (m *AccountNotifsMutation) AddAccountID(i int64)
AddAccountID adds i to the "account_id" field.
func (*AccountNotifsMutation) AddField ¶
func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) AddedAccountID ¶
func (m *AccountNotifsMutation) AddedAccountID() (r int64, exists bool)
AddedAccountID returns the value that was added to the "account_id" field in this mutation.
func (*AccountNotifsMutation) AddedEdges ¶
func (m *AccountNotifsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AccountNotifsMutation) AddedField ¶
func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) AddedFields ¶
func (m *AccountNotifsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AccountNotifsMutation) AddedIDs ¶
func (m *AccountNotifsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AccountNotifsMutation) ClearAccountID ¶
func (m *AccountNotifsMutation) ClearAccountID()
ClearAccountID clears the value of the "account_id" field.
func (*AccountNotifsMutation) ClearEdge ¶
func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) ClearField ¶
func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) ClearNotifContent ¶
func (m *AccountNotifsMutation) ClearNotifContent()
ClearNotifContent clears the value of the "notif_content" field.
func (*AccountNotifsMutation) ClearNotifTime ¶
func (m *AccountNotifsMutation) ClearNotifTime()
ClearNotifTime clears the value of the "notif_time" field.
func (*AccountNotifsMutation) ClearNotifTitle ¶
func (m *AccountNotifsMutation) ClearNotifTitle()
ClearNotifTitle clears the value of the "notif_title" field.
func (*AccountNotifsMutation) ClearUsername ¶
func (m *AccountNotifsMutation) ClearUsername()
ClearUsername clears the value of the "username" field.
func (*AccountNotifsMutation) ClearedEdges ¶
func (m *AccountNotifsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AccountNotifsMutation) ClearedFields ¶
func (m *AccountNotifsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AccountNotifsMutation) Client ¶
func (m AccountNotifsMutation) 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 (*AccountNotifsMutation) CreatedAt ¶
func (m *AccountNotifsMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AccountNotifsMutation) EdgeCleared ¶
func (m *AccountNotifsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AccountNotifsMutation) Field ¶
func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) FieldCleared ¶
func (m *AccountNotifsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AccountNotifsMutation) Fields ¶
func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) ID ¶
func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) 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 (*AccountNotifsMutation) NotifContent ¶
func (m *AccountNotifsMutation) NotifContent() (r string, exists bool)
NotifContent returns the value of the "notif_content" field in the mutation.
func (*AccountNotifsMutation) NotifContentCleared ¶
func (m *AccountNotifsMutation) NotifContentCleared() bool
NotifContentCleared returns if the "notif_content" field was cleared in this mutation.
func (*AccountNotifsMutation) NotifTime ¶
func (m *AccountNotifsMutation) NotifTime() (r time.Time, exists bool)
NotifTime returns the value of the "notif_time" field in the mutation.
func (*AccountNotifsMutation) NotifTimeCleared ¶
func (m *AccountNotifsMutation) NotifTimeCleared() bool
NotifTimeCleared returns if the "notif_time" field was cleared in this mutation.
func (*AccountNotifsMutation) NotifTitle ¶
func (m *AccountNotifsMutation) NotifTitle() (r string, exists bool)
NotifTitle returns the value of the "notif_title" field in the mutation.
func (*AccountNotifsMutation) NotifTitleCleared ¶
func (m *AccountNotifsMutation) NotifTitleCleared() bool
NotifTitleCleared returns if the "notif_title" field was cleared in this mutation.
func (*AccountNotifsMutation) NotifType ¶
func (m *AccountNotifsMutation) NotifType() (r string, exists bool)
NotifType returns the value of the "notif_type" field in the mutation.
func (*AccountNotifsMutation) OldAccountID ¶
func (m *AccountNotifsMutation) OldAccountID(ctx context.Context) (v *int64, err error)
OldAccountID returns the old "account_id" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) 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 (*AccountNotifsMutation) OldNotifContent ¶
func (m *AccountNotifsMutation) OldNotifContent(ctx context.Context) (v string, err error)
OldNotifContent returns the old "notif_content" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) OldNotifTime ¶
OldNotifTime returns the old "notif_time" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) OldNotifTitle ¶
func (m *AccountNotifsMutation) OldNotifTitle(ctx context.Context) (v string, err error)
OldNotifTitle returns the old "notif_title" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) OldNotifType ¶
func (m *AccountNotifsMutation) OldNotifType(ctx context.Context) (v string, err error)
OldNotifType returns the old "notif_type" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) OldUsername ¶
func (m *AccountNotifsMutation) OldUsername(ctx context.Context) (v *string, err error)
OldUsername returns the old "username" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) Op ¶
func (m *AccountNotifsMutation) Op() Op
Op returns the operation name.
func (*AccountNotifsMutation) RemovedEdges ¶
func (m *AccountNotifsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AccountNotifsMutation) RemovedIDs ¶
func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) ResetAccountID ¶
func (m *AccountNotifsMutation) ResetAccountID()
ResetAccountID resets all changes to the "account_id" field.
func (*AccountNotifsMutation) ResetCreatedAt ¶
func (m *AccountNotifsMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AccountNotifsMutation) ResetEdge ¶
func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) ResetField ¶
func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) ResetNotifContent ¶
func (m *AccountNotifsMutation) ResetNotifContent()
ResetNotifContent resets all changes to the "notif_content" field.
func (*AccountNotifsMutation) ResetNotifTime ¶
func (m *AccountNotifsMutation) ResetNotifTime()
ResetNotifTime resets all changes to the "notif_time" field.
func (*AccountNotifsMutation) ResetNotifTitle ¶
func (m *AccountNotifsMutation) ResetNotifTitle()
ResetNotifTitle resets all changes to the "notif_title" field.
func (*AccountNotifsMutation) ResetNotifType ¶
func (m *AccountNotifsMutation) ResetNotifType()
ResetNotifType resets all changes to the "notif_type" field.
func (*AccountNotifsMutation) ResetUsername ¶
func (m *AccountNotifsMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*AccountNotifsMutation) SetAccountID ¶
func (m *AccountNotifsMutation) SetAccountID(i int64)
SetAccountID sets the "account_id" field.
func (*AccountNotifsMutation) SetCreatedAt ¶
func (m *AccountNotifsMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AccountNotifsMutation) SetField ¶
func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) SetID ¶
func (m *AccountNotifsMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of AccountNotifs entities.
func (*AccountNotifsMutation) SetNotifContent ¶
func (m *AccountNotifsMutation) SetNotifContent(s string)
SetNotifContent sets the "notif_content" field.
func (*AccountNotifsMutation) SetNotifTime ¶
func (m *AccountNotifsMutation) SetNotifTime(t time.Time)
SetNotifTime sets the "notif_time" field.
func (*AccountNotifsMutation) SetNotifTitle ¶
func (m *AccountNotifsMutation) SetNotifTitle(s string)
SetNotifTitle sets the "notif_title" field.
func (*AccountNotifsMutation) SetNotifType ¶
func (m *AccountNotifsMutation) SetNotifType(s string)
SetNotifType sets the "notif_type" field.
func (*AccountNotifsMutation) SetUsername ¶
func (m *AccountNotifsMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (AccountNotifsMutation) Tx ¶
func (m AccountNotifsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AccountNotifsMutation) Type ¶
func (m *AccountNotifsMutation) Type() string
Type returns the node type of this mutation (AccountNotifs).
func (*AccountNotifsMutation) Username ¶
func (m *AccountNotifsMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*AccountNotifsMutation) UsernameCleared ¶
func (m *AccountNotifsMutation) UsernameCleared() bool
UsernameCleared returns if the "username" field was cleared in this mutation.
func (*AccountNotifsMutation) Where ¶
func (m *AccountNotifsMutation) Where(ps ...predicate.AccountNotifs)
Where appends a list predicates to the AccountNotifsMutation builder.
type AccountNotifsQuery ¶
type AccountNotifsQuery struct {
// contains filtered or unexported fields
}
AccountNotifsQuery is the builder for querying AccountNotifs entities.
func (*AccountNotifsQuery) Aggregate ¶
func (anq *AccountNotifsQuery) Aggregate(fns ...AggregateFunc) *AccountNotifsSelect
Aggregate returns a AccountNotifsSelect configured with the given aggregations.
func (*AccountNotifsQuery) All ¶
func (anq *AccountNotifsQuery) All(ctx context.Context) ([]*AccountNotifs, error)
All executes the query and returns a list of AccountNotifsSlice.
func (*AccountNotifsQuery) AllX ¶
func (anq *AccountNotifsQuery) AllX(ctx context.Context) []*AccountNotifs
AllX is like All, but panics if an error occurs.
func (*AccountNotifsQuery) Clone ¶
func (anq *AccountNotifsQuery) Clone() *AccountNotifsQuery
Clone returns a duplicate of the AccountNotifsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AccountNotifsQuery) Count ¶
func (anq *AccountNotifsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AccountNotifsQuery) CountX ¶
func (anq *AccountNotifsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AccountNotifsQuery) Exist ¶
func (anq *AccountNotifsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AccountNotifsQuery) ExistX ¶
func (anq *AccountNotifsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AccountNotifsQuery) First ¶
func (anq *AccountNotifsQuery) First(ctx context.Context) (*AccountNotifs, error)
First returns the first AccountNotifs entity from the query. Returns a *NotFoundError when no AccountNotifs was found.
func (*AccountNotifsQuery) FirstID ¶
FirstID returns the first AccountNotifs ID from the query. Returns a *NotFoundError when no AccountNotifs ID was found.
func (*AccountNotifsQuery) FirstIDX ¶
func (anq *AccountNotifsQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AccountNotifsQuery) FirstX ¶
func (anq *AccountNotifsQuery) FirstX(ctx context.Context) *AccountNotifs
FirstX is like First, but panics if an error occurs.
func (*AccountNotifsQuery) GroupBy ¶
func (anq *AccountNotifsQuery) GroupBy(field string, fields ...string) *AccountNotifsGroupBy
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 { AccountID int64 `json:"account_id,omitempty"` Count int `json:"count,omitempty"` } client.AccountNotifs.Query(). GroupBy(accountnotifs.FieldAccountID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AccountNotifsQuery) IDsX ¶
func (anq *AccountNotifsQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AccountNotifsQuery) Limit ¶
func (anq *AccountNotifsQuery) Limit(limit int) *AccountNotifsQuery
Limit adds a limit step to the query.
func (*AccountNotifsQuery) Offset ¶
func (anq *AccountNotifsQuery) Offset(offset int) *AccountNotifsQuery
Offset adds an offset step to the query.
func (*AccountNotifsQuery) Only ¶
func (anq *AccountNotifsQuery) Only(ctx context.Context) (*AccountNotifs, error)
Only returns a single AccountNotifs entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AccountNotifs entity is found. Returns a *NotFoundError when no AccountNotifs entities are found.
func (*AccountNotifsQuery) OnlyID ¶
OnlyID is like Only, but returns the only AccountNotifs ID in the query. Returns a *NotSingularError when more than one AccountNotifs ID is found. Returns a *NotFoundError when no entities are found.
func (*AccountNotifsQuery) OnlyIDX ¶
func (anq *AccountNotifsQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AccountNotifsQuery) OnlyX ¶
func (anq *AccountNotifsQuery) OnlyX(ctx context.Context) *AccountNotifs
OnlyX is like Only, but panics if an error occurs.
func (*AccountNotifsQuery) Order ¶
func (anq *AccountNotifsQuery) Order(o ...OrderFunc) *AccountNotifsQuery
Order adds an order step to the query.
func (*AccountNotifsQuery) Select ¶
func (anq *AccountNotifsQuery) Select(fields ...string) *AccountNotifsSelect
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 { AccountID int64 `json:"account_id,omitempty"` } client.AccountNotifs.Query(). Select(accountnotifs.FieldAccountID). Scan(ctx, &v)
func (*AccountNotifsQuery) Unique ¶
func (anq *AccountNotifsQuery) Unique(unique bool) *AccountNotifsQuery
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 (*AccountNotifsQuery) Where ¶
func (anq *AccountNotifsQuery) Where(ps ...predicate.AccountNotifs) *AccountNotifsQuery
Where adds a new predicate for the AccountNotifsQuery builder.
type AccountNotifsSelect ¶
type AccountNotifsSelect struct { *AccountNotifsQuery // contains filtered or unexported fields }
AccountNotifsSelect is the builder for selecting fields of AccountNotifs entities.
func (*AccountNotifsSelect) Aggregate ¶
func (ans *AccountNotifsSelect) Aggregate(fns ...AggregateFunc) *AccountNotifsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AccountNotifsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountNotifsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccountNotifsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountNotifsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountNotifsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountNotifsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountNotifsSelect) Scan ¶
func (ans *AccountNotifsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccountNotifsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccountNotifsSlice ¶
type AccountNotifsSlice []*AccountNotifs
AccountNotifsSlice is a parsable slice of AccountNotifs.
type AccountNotifsUpdate ¶
type AccountNotifsUpdate struct {
// contains filtered or unexported fields
}
AccountNotifsUpdate is the builder for updating AccountNotifs entities.
func (*AccountNotifsUpdate) AddAccountID ¶
func (anu *AccountNotifsUpdate) AddAccountID(i int64) *AccountNotifsUpdate
AddAccountID adds i to the "account_id" field.
func (*AccountNotifsUpdate) ClearAccountID ¶
func (anu *AccountNotifsUpdate) ClearAccountID() *AccountNotifsUpdate
ClearAccountID clears the value of the "account_id" field.
func (*AccountNotifsUpdate) ClearNotifContent ¶
func (anu *AccountNotifsUpdate) ClearNotifContent() *AccountNotifsUpdate
ClearNotifContent clears the value of the "notif_content" field.
func (*AccountNotifsUpdate) ClearNotifTime ¶
func (anu *AccountNotifsUpdate) ClearNotifTime() *AccountNotifsUpdate
ClearNotifTime clears the value of the "notif_time" field.
func (*AccountNotifsUpdate) ClearNotifTitle ¶
func (anu *AccountNotifsUpdate) ClearNotifTitle() *AccountNotifsUpdate
ClearNotifTitle clears the value of the "notif_title" field.
func (*AccountNotifsUpdate) ClearUsername ¶
func (anu *AccountNotifsUpdate) ClearUsername() *AccountNotifsUpdate
ClearUsername clears the value of the "username" field.
func (*AccountNotifsUpdate) Exec ¶
func (anu *AccountNotifsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountNotifsUpdate) ExecX ¶
func (anu *AccountNotifsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountNotifsUpdate) Mutation ¶
func (anu *AccountNotifsUpdate) Mutation() *AccountNotifsMutation
Mutation returns the AccountNotifsMutation object of the builder.
func (*AccountNotifsUpdate) Save ¶
func (anu *AccountNotifsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AccountNotifsUpdate) SaveX ¶
func (anu *AccountNotifsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AccountNotifsUpdate) SetAccountID ¶
func (anu *AccountNotifsUpdate) SetAccountID(i int64) *AccountNotifsUpdate
SetAccountID sets the "account_id" field.
func (*AccountNotifsUpdate) SetCreatedAt ¶
func (anu *AccountNotifsUpdate) SetCreatedAt(t time.Time) *AccountNotifsUpdate
SetCreatedAt sets the "created_at" field.
func (*AccountNotifsUpdate) SetNillableAccountID ¶
func (anu *AccountNotifsUpdate) SetNillableAccountID(i *int64) *AccountNotifsUpdate
SetNillableAccountID sets the "account_id" field if the given value is not nil.
func (*AccountNotifsUpdate) SetNillableCreatedAt ¶
func (anu *AccountNotifsUpdate) SetNillableCreatedAt(t *time.Time) *AccountNotifsUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccountNotifsUpdate) SetNillableNotifContent ¶
func (anu *AccountNotifsUpdate) SetNillableNotifContent(s *string) *AccountNotifsUpdate
SetNillableNotifContent sets the "notif_content" field if the given value is not nil.
func (*AccountNotifsUpdate) SetNillableNotifTime ¶
func (anu *AccountNotifsUpdate) SetNillableNotifTime(t *time.Time) *AccountNotifsUpdate
SetNillableNotifTime sets the "notif_time" field if the given value is not nil.
func (*AccountNotifsUpdate) SetNillableNotifTitle ¶
func (anu *AccountNotifsUpdate) SetNillableNotifTitle(s *string) *AccountNotifsUpdate
SetNillableNotifTitle sets the "notif_title" field if the given value is not nil.
func (*AccountNotifsUpdate) SetNillableUsername ¶
func (anu *AccountNotifsUpdate) SetNillableUsername(s *string) *AccountNotifsUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*AccountNotifsUpdate) SetNotifContent ¶
func (anu *AccountNotifsUpdate) SetNotifContent(s string) *AccountNotifsUpdate
SetNotifContent sets the "notif_content" field.
func (*AccountNotifsUpdate) SetNotifTime ¶
func (anu *AccountNotifsUpdate) SetNotifTime(t time.Time) *AccountNotifsUpdate
SetNotifTime sets the "notif_time" field.
func (*AccountNotifsUpdate) SetNotifTitle ¶
func (anu *AccountNotifsUpdate) SetNotifTitle(s string) *AccountNotifsUpdate
SetNotifTitle sets the "notif_title" field.
func (*AccountNotifsUpdate) SetNotifType ¶
func (anu *AccountNotifsUpdate) SetNotifType(s string) *AccountNotifsUpdate
SetNotifType sets the "notif_type" field.
func (*AccountNotifsUpdate) SetUsername ¶
func (anu *AccountNotifsUpdate) SetUsername(s string) *AccountNotifsUpdate
SetUsername sets the "username" field.
func (*AccountNotifsUpdate) Where ¶
func (anu *AccountNotifsUpdate) Where(ps ...predicate.AccountNotifs) *AccountNotifsUpdate
Where appends a list predicates to the AccountNotifsUpdate builder.
type AccountNotifsUpdateOne ¶
type AccountNotifsUpdateOne struct {
// contains filtered or unexported fields
}
AccountNotifsUpdateOne is the builder for updating a single AccountNotifs entity.
func (*AccountNotifsUpdateOne) AddAccountID ¶
func (anuo *AccountNotifsUpdateOne) AddAccountID(i int64) *AccountNotifsUpdateOne
AddAccountID adds i to the "account_id" field.
func (*AccountNotifsUpdateOne) ClearAccountID ¶
func (anuo *AccountNotifsUpdateOne) ClearAccountID() *AccountNotifsUpdateOne
ClearAccountID clears the value of the "account_id" field.
func (*AccountNotifsUpdateOne) ClearNotifContent ¶
func (anuo *AccountNotifsUpdateOne) ClearNotifContent() *AccountNotifsUpdateOne
ClearNotifContent clears the value of the "notif_content" field.
func (*AccountNotifsUpdateOne) ClearNotifTime ¶
func (anuo *AccountNotifsUpdateOne) ClearNotifTime() *AccountNotifsUpdateOne
ClearNotifTime clears the value of the "notif_time" field.
func (*AccountNotifsUpdateOne) ClearNotifTitle ¶
func (anuo *AccountNotifsUpdateOne) ClearNotifTitle() *AccountNotifsUpdateOne
ClearNotifTitle clears the value of the "notif_title" field.
func (*AccountNotifsUpdateOne) ClearUsername ¶
func (anuo *AccountNotifsUpdateOne) ClearUsername() *AccountNotifsUpdateOne
ClearUsername clears the value of the "username" field.
func (*AccountNotifsUpdateOne) Exec ¶
func (anuo *AccountNotifsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AccountNotifsUpdateOne) ExecX ¶
func (anuo *AccountNotifsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountNotifsUpdateOne) Mutation ¶
func (anuo *AccountNotifsUpdateOne) Mutation() *AccountNotifsMutation
Mutation returns the AccountNotifsMutation object of the builder.
func (*AccountNotifsUpdateOne) Save ¶
func (anuo *AccountNotifsUpdateOne) Save(ctx context.Context) (*AccountNotifs, error)
Save executes the query and returns the updated AccountNotifs entity.
func (*AccountNotifsUpdateOne) SaveX ¶
func (anuo *AccountNotifsUpdateOne) SaveX(ctx context.Context) *AccountNotifs
SaveX is like Save, but panics if an error occurs.
func (*AccountNotifsUpdateOne) Select ¶
func (anuo *AccountNotifsUpdateOne) Select(field string, fields ...string) *AccountNotifsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AccountNotifsUpdateOne) SetAccountID ¶
func (anuo *AccountNotifsUpdateOne) SetAccountID(i int64) *AccountNotifsUpdateOne
SetAccountID sets the "account_id" field.
func (*AccountNotifsUpdateOne) SetCreatedAt ¶
func (anuo *AccountNotifsUpdateOne) SetCreatedAt(t time.Time) *AccountNotifsUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AccountNotifsUpdateOne) SetNillableAccountID ¶
func (anuo *AccountNotifsUpdateOne) SetNillableAccountID(i *int64) *AccountNotifsUpdateOne
SetNillableAccountID sets the "account_id" field if the given value is not nil.
func (*AccountNotifsUpdateOne) SetNillableCreatedAt ¶
func (anuo *AccountNotifsUpdateOne) SetNillableCreatedAt(t *time.Time) *AccountNotifsUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccountNotifsUpdateOne) SetNillableNotifContent ¶
func (anuo *AccountNotifsUpdateOne) SetNillableNotifContent(s *string) *AccountNotifsUpdateOne
SetNillableNotifContent sets the "notif_content" field if the given value is not nil.
func (*AccountNotifsUpdateOne) SetNillableNotifTime ¶
func (anuo *AccountNotifsUpdateOne) SetNillableNotifTime(t *time.Time) *AccountNotifsUpdateOne
SetNillableNotifTime sets the "notif_time" field if the given value is not nil.
func (*AccountNotifsUpdateOne) SetNillableNotifTitle ¶
func (anuo *AccountNotifsUpdateOne) SetNillableNotifTitle(s *string) *AccountNotifsUpdateOne
SetNillableNotifTitle sets the "notif_title" field if the given value is not nil.
func (*AccountNotifsUpdateOne) SetNillableUsername ¶
func (anuo *AccountNotifsUpdateOne) SetNillableUsername(s *string) *AccountNotifsUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*AccountNotifsUpdateOne) SetNotifContent ¶
func (anuo *AccountNotifsUpdateOne) SetNotifContent(s string) *AccountNotifsUpdateOne
SetNotifContent sets the "notif_content" field.
func (*AccountNotifsUpdateOne) SetNotifTime ¶
func (anuo *AccountNotifsUpdateOne) SetNotifTime(t time.Time) *AccountNotifsUpdateOne
SetNotifTime sets the "notif_time" field.
func (*AccountNotifsUpdateOne) SetNotifTitle ¶
func (anuo *AccountNotifsUpdateOne) SetNotifTitle(s string) *AccountNotifsUpdateOne
SetNotifTitle sets the "notif_title" field.
func (*AccountNotifsUpdateOne) SetNotifType ¶
func (anuo *AccountNotifsUpdateOne) SetNotifType(s string) *AccountNotifsUpdateOne
SetNotifType sets the "notif_type" field.
func (*AccountNotifsUpdateOne) SetUsername ¶
func (anuo *AccountNotifsUpdateOne) SetUsername(s string) *AccountNotifsUpdateOne
SetUsername sets the "username" field.
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 ¶
func (aq *AccountQuery) FirstID(ctx context.Context) (id int64, err error)
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) int64
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 { Owner string `json:"owner,omitempty"` Count int `json:"count,omitempty"` } client.Account.Query(). GroupBy(account.FieldOwner). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AccountQuery) IDs ¶
func (aq *AccountQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of Account IDs.
func (*AccountQuery) IDsX ¶
func (aq *AccountQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*AccountQuery) Limit ¶
func (aq *AccountQuery) Limit(limit int) *AccountQuery
Limit adds a limit step to the query.
func (*AccountQuery) Offset ¶
func (aq *AccountQuery) Offset(offset int) *AccountQuery
Offset adds an offset step to the query.
func (*AccountQuery) Only ¶
func (aq *AccountQuery) Only(ctx context.Context) (*Account, error)
Only returns a single Account entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Account entity is found. Returns a *NotFoundError when no Account entities are found.
func (*AccountQuery) OnlyID ¶
func (aq *AccountQuery) OnlyID(ctx context.Context) (id int64, err error)
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) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AccountQuery) OnlyX ¶
func (aq *AccountQuery) OnlyX(ctx context.Context) *Account
OnlyX is like Only, but panics if an error occurs.
func (*AccountQuery) Order ¶
func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery
Order adds an order step to the query.
func (*AccountQuery) Select ¶
func (aq *AccountQuery) Select(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 { Owner string `json:"owner,omitempty"` } client.Account.Query(). Select(account.FieldOwner). 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.
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) AddFollower ¶
func (au *AccountUpdate) AddFollower(i int64) *AccountUpdate
AddFollower adds i to the "follower" field.
func (*AccountUpdate) AddFollowing ¶
func (au *AccountUpdate) AddFollowing(i int64) *AccountUpdate
AddFollowing adds i to the "following" field.
func (*AccountUpdate) ClearPhotoDir ¶
func (au *AccountUpdate) ClearPhotoDir() *AccountUpdate
ClearPhotoDir clears the value of the "photo_dir" field.
func (*AccountUpdate) Exec ¶
func (au *AccountUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUpdate) ExecX ¶
func (au *AccountUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpdate) Mutation ¶
func (au *AccountUpdate) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountUpdate) Save ¶
func (au *AccountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AccountUpdate) SaveX ¶
func (au *AccountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdate) SetCreatedAt ¶
func (au *AccountUpdate) SetCreatedAt(t time.Time) *AccountUpdate
SetCreatedAt sets the "created_at" field.
func (*AccountUpdate) SetFollower ¶
func (au *AccountUpdate) SetFollower(i int64) *AccountUpdate
SetFollower sets the "follower" field.
func (*AccountUpdate) SetFollowing ¶
func (au *AccountUpdate) SetFollowing(i int64) *AccountUpdate
SetFollowing sets the "following" field.
func (*AccountUpdate) SetIsPrivate ¶
func (au *AccountUpdate) SetIsPrivate(b bool) *AccountUpdate
SetIsPrivate sets the "is_private" field.
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) SetNillableFollower ¶
func (au *AccountUpdate) SetNillableFollower(i *int64) *AccountUpdate
SetNillableFollower sets the "follower" field if the given value is not nil.
func (*AccountUpdate) SetNillableFollowing ¶
func (au *AccountUpdate) SetNillableFollowing(i *int64) *AccountUpdate
SetNillableFollowing sets the "following" field if the given value is not nil.
func (*AccountUpdate) SetNillableIsPrivate ¶
func (au *AccountUpdate) SetNillableIsPrivate(b *bool) *AccountUpdate
SetNillableIsPrivate sets the "is_private" field if the given value is not nil.
func (*AccountUpdate) SetNillablePhotoDir ¶
func (au *AccountUpdate) SetNillablePhotoDir(s *string) *AccountUpdate
SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.
func (*AccountUpdate) SetOwner ¶
func (au *AccountUpdate) SetOwner(s string) *AccountUpdate
SetOwner sets the "owner" field.
func (*AccountUpdate) SetPhotoDir ¶
func (au *AccountUpdate) SetPhotoDir(s string) *AccountUpdate
SetPhotoDir sets the "photo_dir" field.
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) AddFollower ¶
func (auo *AccountUpdateOne) AddFollower(i int64) *AccountUpdateOne
AddFollower adds i to the "follower" field.
func (*AccountUpdateOne) AddFollowing ¶
func (auo *AccountUpdateOne) AddFollowing(i int64) *AccountUpdateOne
AddFollowing adds i to the "following" field.
func (*AccountUpdateOne) ClearPhotoDir ¶
func (auo *AccountUpdateOne) ClearPhotoDir() *AccountUpdateOne
ClearPhotoDir clears the value of the "photo_dir" field.
func (*AccountUpdateOne) Exec ¶
func (auo *AccountUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AccountUpdateOne) ExecX ¶
func (auo *AccountUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpdateOne) Mutation ¶
func (auo *AccountUpdateOne) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountUpdateOne) Save ¶
func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)
Save executes the query and returns the updated Account entity.
func (*AccountUpdateOne) SaveX ¶
func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdateOne) 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) SetCreatedAt ¶
func (auo *AccountUpdateOne) SetCreatedAt(t time.Time) *AccountUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AccountUpdateOne) SetFollower ¶
func (auo *AccountUpdateOne) SetFollower(i int64) *AccountUpdateOne
SetFollower sets the "follower" field.
func (*AccountUpdateOne) SetFollowing ¶
func (auo *AccountUpdateOne) SetFollowing(i int64) *AccountUpdateOne
SetFollowing sets the "following" field.
func (*AccountUpdateOne) SetIsPrivate ¶
func (auo *AccountUpdateOne) SetIsPrivate(b bool) *AccountUpdateOne
SetIsPrivate sets the "is_private" field.
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) SetNillableFollower ¶
func (auo *AccountUpdateOne) SetNillableFollower(i *int64) *AccountUpdateOne
SetNillableFollower sets the "follower" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableFollowing ¶
func (auo *AccountUpdateOne) SetNillableFollowing(i *int64) *AccountUpdateOne
SetNillableFollowing sets the "following" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableIsPrivate ¶
func (auo *AccountUpdateOne) SetNillableIsPrivate(b *bool) *AccountUpdateOne
SetNillableIsPrivate sets the "is_private" field if the given value is not nil.
func (*AccountUpdateOne) SetNillablePhotoDir ¶
func (auo *AccountUpdateOne) SetNillablePhotoDir(s *string) *AccountUpdateOne
SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.
func (*AccountUpdateOne) SetOwner ¶
func (auo *AccountUpdateOne) SetOwner(s string) *AccountUpdateOne
SetOwner sets the "owner" field.
func (*AccountUpdateOne) SetPhotoDir ¶
func (auo *AccountUpdateOne) SetPhotoDir(s string) *AccountUpdateOne
SetPhotoDir sets the "photo_dir" field.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(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 // AccountNotifs is the client for interacting with the AccountNotifs builders. AccountNotifs *AccountNotifsClient // LikeFeature is the client for interacting with the LikeFeature builders. LikeFeature *LikeFeatureClient // Post is the client for interacting with the Post builders. Post *PostClient // Qoute_retweet_feature is the client for interacting with the Qoute_retweet_feature builders. Qoute_retweet_feature *Qoute_retweet_featureClient // Retweet_feature is the client for interacting with the Retweet_feature builders. Retweet_feature *Retweet_featureClient // Tokens is the client for interacting with the Tokens builders. Tokens *TokensClient // 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)
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 LikeFeature ¶
type LikeFeature struct { // ID of the ent. ID int `json:"id,omitempty"` // FromAccountID holds the value of the "from_account_id" field. FromAccountID int64 `json:"from_account_id,omitempty"` // IsLike holds the value of the "is_like" field. IsLike bool `json:"is_like,omitempty"` // PostID holds the value of the "post_id" field. PostID uuid.UUID `json:"post_id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
LikeFeature is the model entity for the LikeFeature schema.
func (*LikeFeature) String ¶
func (lf *LikeFeature) String() string
String implements the fmt.Stringer.
func (*LikeFeature) Unwrap ¶
func (lf *LikeFeature) Unwrap() *LikeFeature
Unwrap unwraps the LikeFeature 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 (*LikeFeature) Update ¶
func (lf *LikeFeature) Update() *LikeFeatureUpdateOne
Update returns a builder for updating this LikeFeature. Note that you need to call LikeFeature.Unwrap() before calling this method if this LikeFeature was returned from a transaction, and the transaction was committed or rolled back.
type LikeFeatureClient ¶
type LikeFeatureClient struct {
// contains filtered or unexported fields
}
LikeFeatureClient is a client for the LikeFeature schema.
func NewLikeFeatureClient ¶
func NewLikeFeatureClient(c config) *LikeFeatureClient
NewLikeFeatureClient returns a client for the LikeFeature from the given config.
func (*LikeFeatureClient) Create ¶
func (c *LikeFeatureClient) Create() *LikeFeatureCreate
Create returns a builder for creating a LikeFeature entity.
func (*LikeFeatureClient) CreateBulk ¶
func (c *LikeFeatureClient) CreateBulk(builders ...*LikeFeatureCreate) *LikeFeatureCreateBulk
CreateBulk returns a builder for creating a bulk of LikeFeature entities.
func (*LikeFeatureClient) Delete ¶
func (c *LikeFeatureClient) Delete() *LikeFeatureDelete
Delete returns a delete builder for LikeFeature.
func (*LikeFeatureClient) DeleteOne ¶
func (c *LikeFeatureClient) DeleteOne(lf *LikeFeature) *LikeFeatureDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LikeFeatureClient) DeleteOneID ¶
func (c *LikeFeatureClient) DeleteOneID(id int) *LikeFeatureDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LikeFeatureClient) Get ¶
func (c *LikeFeatureClient) Get(ctx context.Context, id int) (*LikeFeature, error)
Get returns a LikeFeature entity by its id.
func (*LikeFeatureClient) GetX ¶
func (c *LikeFeatureClient) GetX(ctx context.Context, id int) *LikeFeature
GetX is like Get, but panics if an error occurs.
func (*LikeFeatureClient) Hooks ¶
func (c *LikeFeatureClient) Hooks() []Hook
Hooks returns the client hooks.
func (*LikeFeatureClient) Query ¶
func (c *LikeFeatureClient) Query() *LikeFeatureQuery
Query returns a query builder for LikeFeature.
func (*LikeFeatureClient) Update ¶
func (c *LikeFeatureClient) Update() *LikeFeatureUpdate
Update returns an update builder for LikeFeature.
func (*LikeFeatureClient) UpdateOne ¶
func (c *LikeFeatureClient) UpdateOne(lf *LikeFeature) *LikeFeatureUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LikeFeatureClient) UpdateOneID ¶
func (c *LikeFeatureClient) UpdateOneID(id int) *LikeFeatureUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LikeFeatureClient) Use ¶
func (c *LikeFeatureClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `likefeature.Hooks(f(g(h())))`.
type LikeFeatureCreate ¶
type LikeFeatureCreate struct {
// contains filtered or unexported fields
}
LikeFeatureCreate is the builder for creating a LikeFeature entity.
func (*LikeFeatureCreate) Exec ¶
func (lfc *LikeFeatureCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LikeFeatureCreate) ExecX ¶
func (lfc *LikeFeatureCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LikeFeatureCreate) Mutation ¶
func (lfc *LikeFeatureCreate) Mutation() *LikeFeatureMutation
Mutation returns the LikeFeatureMutation object of the builder.
func (*LikeFeatureCreate) Save ¶
func (lfc *LikeFeatureCreate) Save(ctx context.Context) (*LikeFeature, error)
Save creates the LikeFeature in the database.
func (*LikeFeatureCreate) SaveX ¶
func (lfc *LikeFeatureCreate) SaveX(ctx context.Context) *LikeFeature
SaveX calls Save and panics if Save returns an error.
func (*LikeFeatureCreate) SetCreatedAt ¶
func (lfc *LikeFeatureCreate) SetCreatedAt(t time.Time) *LikeFeatureCreate
SetCreatedAt sets the "created_at" field.
func (*LikeFeatureCreate) SetFromAccountID ¶
func (lfc *LikeFeatureCreate) SetFromAccountID(i int64) *LikeFeatureCreate
SetFromAccountID sets the "from_account_id" field.
func (*LikeFeatureCreate) SetIsLike ¶
func (lfc *LikeFeatureCreate) SetIsLike(b bool) *LikeFeatureCreate
SetIsLike sets the "is_like" field.
func (*LikeFeatureCreate) SetNillableCreatedAt ¶
func (lfc *LikeFeatureCreate) SetNillableCreatedAt(t *time.Time) *LikeFeatureCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LikeFeatureCreate) SetNillableIsLike ¶
func (lfc *LikeFeatureCreate) SetNillableIsLike(b *bool) *LikeFeatureCreate
SetNillableIsLike sets the "is_like" field if the given value is not nil.
func (*LikeFeatureCreate) SetPostID ¶
func (lfc *LikeFeatureCreate) SetPostID(u uuid.UUID) *LikeFeatureCreate
SetPostID sets the "post_id" field.
type LikeFeatureCreateBulk ¶
type LikeFeatureCreateBulk struct {
// contains filtered or unexported fields
}
LikeFeatureCreateBulk is the builder for creating many LikeFeature entities in bulk.
func (*LikeFeatureCreateBulk) Exec ¶
func (lfcb *LikeFeatureCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LikeFeatureCreateBulk) ExecX ¶
func (lfcb *LikeFeatureCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LikeFeatureCreateBulk) Save ¶
func (lfcb *LikeFeatureCreateBulk) Save(ctx context.Context) ([]*LikeFeature, error)
Save creates the LikeFeature entities in the database.
func (*LikeFeatureCreateBulk) SaveX ¶
func (lfcb *LikeFeatureCreateBulk) SaveX(ctx context.Context) []*LikeFeature
SaveX is like Save, but panics if an error occurs.
type LikeFeatureDelete ¶
type LikeFeatureDelete struct {
// contains filtered or unexported fields
}
LikeFeatureDelete is the builder for deleting a LikeFeature entity.
func (*LikeFeatureDelete) Exec ¶
func (lfd *LikeFeatureDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LikeFeatureDelete) ExecX ¶
func (lfd *LikeFeatureDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LikeFeatureDelete) Where ¶
func (lfd *LikeFeatureDelete) Where(ps ...predicate.LikeFeature) *LikeFeatureDelete
Where appends a list predicates to the LikeFeatureDelete builder.
type LikeFeatureDeleteOne ¶
type LikeFeatureDeleteOne struct {
// contains filtered or unexported fields
}
LikeFeatureDeleteOne is the builder for deleting a single LikeFeature entity.
func (*LikeFeatureDeleteOne) Exec ¶
func (lfdo *LikeFeatureDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LikeFeatureDeleteOne) ExecX ¶
func (lfdo *LikeFeatureDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LikeFeatureGroupBy ¶
type LikeFeatureGroupBy struct {
// contains filtered or unexported fields
}
LikeFeatureGroupBy is the group-by builder for LikeFeature entities.
func (*LikeFeatureGroupBy) Aggregate ¶
func (lfgb *LikeFeatureGroupBy) Aggregate(fns ...AggregateFunc) *LikeFeatureGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LikeFeatureGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LikeFeatureGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LikeFeatureGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LikeFeatureGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LikeFeatureGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LikeFeatureGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LikeFeatureGroupBy) Scan ¶
func (lfgb *LikeFeatureGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*LikeFeatureGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LikeFeatureMutation ¶
type LikeFeatureMutation struct {
// contains filtered or unexported fields
}
LikeFeatureMutation represents an operation that mutates the LikeFeature nodes in the graph.
func (*LikeFeatureMutation) AddField ¶
func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) AddFromAccountID ¶
func (m *LikeFeatureMutation) AddFromAccountID(i int64)
AddFromAccountID adds i to the "from_account_id" field.
func (*LikeFeatureMutation) AddedEdges ¶
func (m *LikeFeatureMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LikeFeatureMutation) AddedField ¶
func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) AddedFields ¶
func (m *LikeFeatureMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LikeFeatureMutation) AddedFromAccountID ¶
func (m *LikeFeatureMutation) AddedFromAccountID() (r int64, exists bool)
AddedFromAccountID returns the value that was added to the "from_account_id" field in this mutation.
func (*LikeFeatureMutation) AddedIDs ¶
func (m *LikeFeatureMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LikeFeatureMutation) ClearEdge ¶
func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) ClearField ¶
func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) ClearedEdges ¶
func (m *LikeFeatureMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LikeFeatureMutation) ClearedFields ¶
func (m *LikeFeatureMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LikeFeatureMutation) Client ¶
func (m LikeFeatureMutation) 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 (*LikeFeatureMutation) CreatedAt ¶
func (m *LikeFeatureMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*LikeFeatureMutation) EdgeCleared ¶
func (m *LikeFeatureMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LikeFeatureMutation) Field ¶
func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) FieldCleared ¶
func (m *LikeFeatureMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LikeFeatureMutation) Fields ¶
func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) FromAccountID ¶
func (m *LikeFeatureMutation) FromAccountID() (r int64, exists bool)
FromAccountID returns the value of the "from_account_id" field in the mutation.
func (*LikeFeatureMutation) ID ¶
func (m *LikeFeatureMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*LikeFeatureMutation) IDs ¶
func (m *LikeFeatureMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*LikeFeatureMutation) IsLike ¶
func (m *LikeFeatureMutation) IsLike() (r bool, exists bool)
IsLike returns the value of the "is_like" field in the mutation.
func (*LikeFeatureMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the LikeFeature entity. If the LikeFeature 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 (*LikeFeatureMutation) 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 (*LikeFeatureMutation) OldFromAccountID ¶
func (m *LikeFeatureMutation) OldFromAccountID(ctx context.Context) (v int64, err error)
OldFromAccountID returns the old "from_account_id" field's value of the LikeFeature entity. If the LikeFeature 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 (*LikeFeatureMutation) OldIsLike ¶
func (m *LikeFeatureMutation) OldIsLike(ctx context.Context) (v bool, err error)
OldIsLike returns the old "is_like" field's value of the LikeFeature entity. If the LikeFeature 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 (*LikeFeatureMutation) OldPostID ¶
OldPostID returns the old "post_id" field's value of the LikeFeature entity. If the LikeFeature 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 (*LikeFeatureMutation) Op ¶
func (m *LikeFeatureMutation) Op() Op
Op returns the operation name.
func (*LikeFeatureMutation) PostID ¶
func (m *LikeFeatureMutation) PostID() (r uuid.UUID, exists bool)
PostID returns the value of the "post_id" field in the mutation.
func (*LikeFeatureMutation) RemovedEdges ¶
func (m *LikeFeatureMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LikeFeatureMutation) RemovedIDs ¶
func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) ResetCreatedAt ¶
func (m *LikeFeatureMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*LikeFeatureMutation) ResetEdge ¶
func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) ResetField ¶
func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) ResetFromAccountID ¶
func (m *LikeFeatureMutation) ResetFromAccountID()
ResetFromAccountID resets all changes to the "from_account_id" field.
func (*LikeFeatureMutation) ResetIsLike ¶
func (m *LikeFeatureMutation) ResetIsLike()
ResetIsLike resets all changes to the "is_like" field.
func (*LikeFeatureMutation) ResetPostID ¶
func (m *LikeFeatureMutation) ResetPostID()
ResetPostID resets all changes to the "post_id" field.
func (*LikeFeatureMutation) SetCreatedAt ¶
func (m *LikeFeatureMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*LikeFeatureMutation) SetField ¶
func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) SetFromAccountID ¶
func (m *LikeFeatureMutation) SetFromAccountID(i int64)
SetFromAccountID sets the "from_account_id" field.
func (*LikeFeatureMutation) SetIsLike ¶
func (m *LikeFeatureMutation) SetIsLike(b bool)
SetIsLike sets the "is_like" field.
func (*LikeFeatureMutation) SetPostID ¶
func (m *LikeFeatureMutation) SetPostID(u uuid.UUID)
SetPostID sets the "post_id" field.
func (LikeFeatureMutation) Tx ¶
func (m LikeFeatureMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LikeFeatureMutation) Type ¶
func (m *LikeFeatureMutation) Type() string
Type returns the node type of this mutation (LikeFeature).
func (*LikeFeatureMutation) Where ¶
func (m *LikeFeatureMutation) Where(ps ...predicate.LikeFeature)
Where appends a list predicates to the LikeFeatureMutation builder.
type LikeFeatureQuery ¶
type LikeFeatureQuery struct {
// contains filtered or unexported fields
}
LikeFeatureQuery is the builder for querying LikeFeature entities.
func (*LikeFeatureQuery) Aggregate ¶
func (lfq *LikeFeatureQuery) Aggregate(fns ...AggregateFunc) *LikeFeatureSelect
Aggregate returns a LikeFeatureSelect configured with the given aggregations.
func (*LikeFeatureQuery) All ¶
func (lfq *LikeFeatureQuery) All(ctx context.Context) ([]*LikeFeature, error)
All executes the query and returns a list of LikeFeatures.
func (*LikeFeatureQuery) AllX ¶
func (lfq *LikeFeatureQuery) AllX(ctx context.Context) []*LikeFeature
AllX is like All, but panics if an error occurs.
func (*LikeFeatureQuery) Clone ¶
func (lfq *LikeFeatureQuery) Clone() *LikeFeatureQuery
Clone returns a duplicate of the LikeFeatureQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LikeFeatureQuery) Count ¶
func (lfq *LikeFeatureQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LikeFeatureQuery) CountX ¶
func (lfq *LikeFeatureQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LikeFeatureQuery) Exist ¶
func (lfq *LikeFeatureQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LikeFeatureQuery) ExistX ¶
func (lfq *LikeFeatureQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LikeFeatureQuery) First ¶
func (lfq *LikeFeatureQuery) First(ctx context.Context) (*LikeFeature, error)
First returns the first LikeFeature entity from the query. Returns a *NotFoundError when no LikeFeature was found.
func (*LikeFeatureQuery) FirstID ¶
func (lfq *LikeFeatureQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first LikeFeature ID from the query. Returns a *NotFoundError when no LikeFeature ID was found.
func (*LikeFeatureQuery) FirstIDX ¶
func (lfq *LikeFeatureQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*LikeFeatureQuery) FirstX ¶
func (lfq *LikeFeatureQuery) FirstX(ctx context.Context) *LikeFeature
FirstX is like First, but panics if an error occurs.
func (*LikeFeatureQuery) GroupBy ¶
func (lfq *LikeFeatureQuery) GroupBy(field string, fields ...string) *LikeFeatureGroupBy
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 { FromAccountID int64 `json:"from_account_id,omitempty"` Count int `json:"count,omitempty"` } client.LikeFeature.Query(). GroupBy(likefeature.FieldFromAccountID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LikeFeatureQuery) IDs ¶
func (lfq *LikeFeatureQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of LikeFeature IDs.
func (*LikeFeatureQuery) IDsX ¶
func (lfq *LikeFeatureQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*LikeFeatureQuery) Limit ¶
func (lfq *LikeFeatureQuery) Limit(limit int) *LikeFeatureQuery
Limit adds a limit step to the query.
func (*LikeFeatureQuery) Offset ¶
func (lfq *LikeFeatureQuery) Offset(offset int) *LikeFeatureQuery
Offset adds an offset step to the query.
func (*LikeFeatureQuery) Only ¶
func (lfq *LikeFeatureQuery) Only(ctx context.Context) (*LikeFeature, error)
Only returns a single LikeFeature entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one LikeFeature entity is found. Returns a *NotFoundError when no LikeFeature entities are found.
func (*LikeFeatureQuery) OnlyID ¶
func (lfq *LikeFeatureQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only LikeFeature ID in the query. Returns a *NotSingularError when more than one LikeFeature ID is found. Returns a *NotFoundError when no entities are found.
func (*LikeFeatureQuery) OnlyIDX ¶
func (lfq *LikeFeatureQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LikeFeatureQuery) OnlyX ¶
func (lfq *LikeFeatureQuery) OnlyX(ctx context.Context) *LikeFeature
OnlyX is like Only, but panics if an error occurs.
func (*LikeFeatureQuery) Order ¶
func (lfq *LikeFeatureQuery) Order(o ...OrderFunc) *LikeFeatureQuery
Order adds an order step to the query.
func (*LikeFeatureQuery) Select ¶
func (lfq *LikeFeatureQuery) Select(fields ...string) *LikeFeatureSelect
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 { FromAccountID int64 `json:"from_account_id,omitempty"` } client.LikeFeature.Query(). Select(likefeature.FieldFromAccountID). Scan(ctx, &v)
func (*LikeFeatureQuery) Unique ¶
func (lfq *LikeFeatureQuery) Unique(unique bool) *LikeFeatureQuery
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 (*LikeFeatureQuery) Where ¶
func (lfq *LikeFeatureQuery) Where(ps ...predicate.LikeFeature) *LikeFeatureQuery
Where adds a new predicate for the LikeFeatureQuery builder.
type LikeFeatureSelect ¶
type LikeFeatureSelect struct { *LikeFeatureQuery // contains filtered or unexported fields }
LikeFeatureSelect is the builder for selecting fields of LikeFeature entities.
func (*LikeFeatureSelect) Aggregate ¶
func (lfs *LikeFeatureSelect) Aggregate(fns ...AggregateFunc) *LikeFeatureSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LikeFeatureSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LikeFeatureSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LikeFeatureSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LikeFeatureSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LikeFeatureSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LikeFeatureSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LikeFeatureSelect) Scan ¶
func (lfs *LikeFeatureSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LikeFeatureSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LikeFeatureUpdate ¶
type LikeFeatureUpdate struct {
// contains filtered or unexported fields
}
LikeFeatureUpdate is the builder for updating LikeFeature entities.
func (*LikeFeatureUpdate) AddFromAccountID ¶
func (lfu *LikeFeatureUpdate) AddFromAccountID(i int64) *LikeFeatureUpdate
AddFromAccountID adds i to the "from_account_id" field.
func (*LikeFeatureUpdate) Exec ¶
func (lfu *LikeFeatureUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LikeFeatureUpdate) ExecX ¶
func (lfu *LikeFeatureUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LikeFeatureUpdate) Mutation ¶
func (lfu *LikeFeatureUpdate) Mutation() *LikeFeatureMutation
Mutation returns the LikeFeatureMutation object of the builder.
func (*LikeFeatureUpdate) Save ¶
func (lfu *LikeFeatureUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LikeFeatureUpdate) SaveX ¶
func (lfu *LikeFeatureUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LikeFeatureUpdate) SetCreatedAt ¶
func (lfu *LikeFeatureUpdate) SetCreatedAt(t time.Time) *LikeFeatureUpdate
SetCreatedAt sets the "created_at" field.
func (*LikeFeatureUpdate) SetFromAccountID ¶
func (lfu *LikeFeatureUpdate) SetFromAccountID(i int64) *LikeFeatureUpdate
SetFromAccountID sets the "from_account_id" field.
func (*LikeFeatureUpdate) SetIsLike ¶
func (lfu *LikeFeatureUpdate) SetIsLike(b bool) *LikeFeatureUpdate
SetIsLike sets the "is_like" field.
func (*LikeFeatureUpdate) SetNillableCreatedAt ¶
func (lfu *LikeFeatureUpdate) SetNillableCreatedAt(t *time.Time) *LikeFeatureUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LikeFeatureUpdate) SetNillableIsLike ¶
func (lfu *LikeFeatureUpdate) SetNillableIsLike(b *bool) *LikeFeatureUpdate
SetNillableIsLike sets the "is_like" field if the given value is not nil.
func (*LikeFeatureUpdate) SetPostID ¶
func (lfu *LikeFeatureUpdate) SetPostID(u uuid.UUID) *LikeFeatureUpdate
SetPostID sets the "post_id" field.
func (*LikeFeatureUpdate) Where ¶
func (lfu *LikeFeatureUpdate) Where(ps ...predicate.LikeFeature) *LikeFeatureUpdate
Where appends a list predicates to the LikeFeatureUpdate builder.
type LikeFeatureUpdateOne ¶
type LikeFeatureUpdateOne struct {
// contains filtered or unexported fields
}
LikeFeatureUpdateOne is the builder for updating a single LikeFeature entity.
func (*LikeFeatureUpdateOne) AddFromAccountID ¶
func (lfuo *LikeFeatureUpdateOne) AddFromAccountID(i int64) *LikeFeatureUpdateOne
AddFromAccountID adds i to the "from_account_id" field.
func (*LikeFeatureUpdateOne) Exec ¶
func (lfuo *LikeFeatureUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LikeFeatureUpdateOne) ExecX ¶
func (lfuo *LikeFeatureUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LikeFeatureUpdateOne) Mutation ¶
func (lfuo *LikeFeatureUpdateOne) Mutation() *LikeFeatureMutation
Mutation returns the LikeFeatureMutation object of the builder.
func (*LikeFeatureUpdateOne) Save ¶
func (lfuo *LikeFeatureUpdateOne) Save(ctx context.Context) (*LikeFeature, error)
Save executes the query and returns the updated LikeFeature entity.
func (*LikeFeatureUpdateOne) SaveX ¶
func (lfuo *LikeFeatureUpdateOne) SaveX(ctx context.Context) *LikeFeature
SaveX is like Save, but panics if an error occurs.
func (*LikeFeatureUpdateOne) Select ¶
func (lfuo *LikeFeatureUpdateOne) Select(field string, fields ...string) *LikeFeatureUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LikeFeatureUpdateOne) SetCreatedAt ¶
func (lfuo *LikeFeatureUpdateOne) SetCreatedAt(t time.Time) *LikeFeatureUpdateOne
SetCreatedAt sets the "created_at" field.
func (*LikeFeatureUpdateOne) SetFromAccountID ¶
func (lfuo *LikeFeatureUpdateOne) SetFromAccountID(i int64) *LikeFeatureUpdateOne
SetFromAccountID sets the "from_account_id" field.
func (*LikeFeatureUpdateOne) SetIsLike ¶
func (lfuo *LikeFeatureUpdateOne) SetIsLike(b bool) *LikeFeatureUpdateOne
SetIsLike sets the "is_like" field.
func (*LikeFeatureUpdateOne) SetNillableCreatedAt ¶
func (lfuo *LikeFeatureUpdateOne) SetNillableCreatedAt(t *time.Time) *LikeFeatureUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LikeFeatureUpdateOne) SetNillableIsLike ¶
func (lfuo *LikeFeatureUpdateOne) SetNillableIsLike(b *bool) *LikeFeatureUpdateOne
SetNillableIsLike sets the "is_like" field if the given value is not nil.
func (*LikeFeatureUpdateOne) SetPostID ¶
func (lfuo *LikeFeatureUpdateOne) SetPostID(u uuid.UUID) *LikeFeatureUpdateOne
SetPostID sets the "post_id" field.
type LikeFeatures ¶
type LikeFeatures []*LikeFeature
LikeFeatures is a parsable slice of LikeFeature.
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 Post ¶
type Post struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Owner holds the value of the "owner" field. Owner string `json:"owner,omitempty"` // IsPrivate holds the value of the "is_private" field. IsPrivate bool `json:"is_private,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Follower holds the value of the "follower" field. Follower int64 `json:"follower,omitempty"` // Following holds the value of the "following" field. Following int64 `json:"following,omitempty"` // PhotoDir holds the value of the "photo_dir" field. PhotoDir string `json:"photo_dir,omitempty"` // contains filtered or unexported fields }
Post is the model entity for the Post schema.
func (*Post) Unwrap ¶
Unwrap unwraps the Post 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 (*Post) Update ¶
func (po *Post) Update() *PostUpdateOne
Update returns a builder for updating this Post. Note that you need to call Post.Unwrap() before calling this method if this Post was returned from a transaction, and the transaction was committed or rolled back.
type PostClient ¶
type PostClient struct {
// contains filtered or unexported fields
}
PostClient is a client for the Post schema.
func NewPostClient ¶
func NewPostClient(c config) *PostClient
NewPostClient returns a client for the Post from the given config.
func (*PostClient) Create ¶
func (c *PostClient) Create() *PostCreate
Create returns a builder for creating a Post entity.
func (*PostClient) CreateBulk ¶
func (c *PostClient) CreateBulk(builders ...*PostCreate) *PostCreateBulk
CreateBulk returns a builder for creating a bulk of Post entities.
func (*PostClient) Delete ¶
func (c *PostClient) Delete() *PostDelete
Delete returns a delete builder for Post.
func (*PostClient) DeleteOne ¶
func (c *PostClient) DeleteOne(po *Post) *PostDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PostClient) DeleteOneID ¶
func (c *PostClient) DeleteOneID(id uuid.UUID) *PostDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PostClient) Query ¶
func (c *PostClient) Query() *PostQuery
Query returns a query builder for Post.
func (*PostClient) Update ¶
func (c *PostClient) Update() *PostUpdate
Update returns an update builder for Post.
func (*PostClient) UpdateOne ¶
func (c *PostClient) UpdateOne(po *Post) *PostUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PostClient) UpdateOneID ¶
func (c *PostClient) UpdateOneID(id uuid.UUID) *PostUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PostClient) Use ¶
func (c *PostClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `post.Hooks(f(g(h())))`.
type PostCreate ¶
type PostCreate struct {
// contains filtered or unexported fields
}
PostCreate is the builder for creating a Post entity.
func (*PostCreate) Exec ¶
func (pc *PostCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PostCreate) ExecX ¶
func (pc *PostCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostCreate) Mutation ¶
func (pc *PostCreate) Mutation() *PostMutation
Mutation returns the PostMutation object of the builder.
func (*PostCreate) Save ¶
func (pc *PostCreate) Save(ctx context.Context) (*Post, error)
Save creates the Post in the database.
func (*PostCreate) SaveX ¶
func (pc *PostCreate) SaveX(ctx context.Context) *Post
SaveX calls Save and panics if Save returns an error.
func (*PostCreate) SetCreatedAt ¶
func (pc *PostCreate) SetCreatedAt(t time.Time) *PostCreate
SetCreatedAt sets the "created_at" field.
func (*PostCreate) SetFollower ¶
func (pc *PostCreate) SetFollower(i int64) *PostCreate
SetFollower sets the "follower" field.
func (*PostCreate) SetFollowing ¶
func (pc *PostCreate) SetFollowing(i int64) *PostCreate
SetFollowing sets the "following" field.
func (*PostCreate) SetID ¶
func (pc *PostCreate) SetID(u uuid.UUID) *PostCreate
SetID sets the "id" field.
func (*PostCreate) SetIsPrivate ¶
func (pc *PostCreate) SetIsPrivate(b bool) *PostCreate
SetIsPrivate sets the "is_private" field.
func (*PostCreate) SetNillableCreatedAt ¶
func (pc *PostCreate) SetNillableCreatedAt(t *time.Time) *PostCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PostCreate) SetNillableFollower ¶
func (pc *PostCreate) SetNillableFollower(i *int64) *PostCreate
SetNillableFollower sets the "follower" field if the given value is not nil.
func (*PostCreate) SetNillableFollowing ¶
func (pc *PostCreate) SetNillableFollowing(i *int64) *PostCreate
SetNillableFollowing sets the "following" field if the given value is not nil.
func (*PostCreate) SetNillableID ¶
func (pc *PostCreate) SetNillableID(u *uuid.UUID) *PostCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*PostCreate) SetNillableIsPrivate ¶
func (pc *PostCreate) SetNillableIsPrivate(b *bool) *PostCreate
SetNillableIsPrivate sets the "is_private" field if the given value is not nil.
func (*PostCreate) SetNillablePhotoDir ¶
func (pc *PostCreate) SetNillablePhotoDir(s *string) *PostCreate
SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.
func (*PostCreate) SetOwner ¶
func (pc *PostCreate) SetOwner(s string) *PostCreate
SetOwner sets the "owner" field.
func (*PostCreate) SetPhotoDir ¶
func (pc *PostCreate) SetPhotoDir(s string) *PostCreate
SetPhotoDir sets the "photo_dir" field.
type PostCreateBulk ¶
type PostCreateBulk struct {
// contains filtered or unexported fields
}
PostCreateBulk is the builder for creating many Post entities in bulk.
func (*PostCreateBulk) Exec ¶
func (pcb *PostCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PostCreateBulk) ExecX ¶
func (pcb *PostCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PostDelete ¶
type PostDelete struct {
// contains filtered or unexported fields
}
PostDelete is the builder for deleting a Post entity.
func (*PostDelete) Exec ¶
func (pd *PostDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PostDelete) ExecX ¶
func (pd *PostDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PostDelete) Where ¶
func (pd *PostDelete) Where(ps ...predicate.Post) *PostDelete
Where appends a list predicates to the PostDelete builder.
type PostDeleteOne ¶
type PostDeleteOne struct {
// contains filtered or unexported fields
}
PostDeleteOne is the builder for deleting a single Post entity.
func (*PostDeleteOne) Exec ¶
func (pdo *PostDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PostDeleteOne) ExecX ¶
func (pdo *PostDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PostGroupBy ¶
type PostGroupBy struct {
// contains filtered or unexported fields
}
PostGroupBy is the group-by builder for Post entities.
func (*PostGroupBy) Aggregate ¶
func (pgb *PostGroupBy) Aggregate(fns ...AggregateFunc) *PostGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PostGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Scan ¶
func (pgb *PostGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*PostGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PostMutation ¶
type PostMutation struct {
// contains filtered or unexported fields
}
PostMutation represents an operation that mutates the Post nodes in the graph.
func (*PostMutation) AddField ¶
func (m *PostMutation) 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 (*PostMutation) AddFollower ¶
func (m *PostMutation) AddFollower(i int64)
AddFollower adds i to the "follower" field.
func (*PostMutation) AddFollowing ¶
func (m *PostMutation) AddFollowing(i int64)
AddFollowing adds i to the "following" field.
func (*PostMutation) AddedEdges ¶
func (m *PostMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PostMutation) AddedField ¶
func (m *PostMutation) 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 (*PostMutation) AddedFields ¶
func (m *PostMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PostMutation) AddedFollower ¶
func (m *PostMutation) AddedFollower() (r int64, exists bool)
AddedFollower returns the value that was added to the "follower" field in this mutation.
func (*PostMutation) AddedFollowing ¶
func (m *PostMutation) AddedFollowing() (r int64, exists bool)
AddedFollowing returns the value that was added to the "following" field in this mutation.
func (*PostMutation) AddedIDs ¶
func (m *PostMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PostMutation) ClearEdge ¶
func (m *PostMutation) 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 (*PostMutation) ClearField ¶
func (m *PostMutation) 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 (*PostMutation) ClearPhotoDir ¶
func (m *PostMutation) ClearPhotoDir()
ClearPhotoDir clears the value of the "photo_dir" field.
func (*PostMutation) ClearedEdges ¶
func (m *PostMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PostMutation) ClearedFields ¶
func (m *PostMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PostMutation) Client ¶
func (m PostMutation) 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 (*PostMutation) CreatedAt ¶
func (m *PostMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PostMutation) EdgeCleared ¶
func (m *PostMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PostMutation) Field ¶
func (m *PostMutation) 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 (*PostMutation) FieldCleared ¶
func (m *PostMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PostMutation) Fields ¶
func (m *PostMutation) 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 (*PostMutation) Follower ¶
func (m *PostMutation) Follower() (r int64, exists bool)
Follower returns the value of the "follower" field in the mutation.
func (*PostMutation) Following ¶
func (m *PostMutation) Following() (r int64, exists bool)
Following returns the value of the "following" field in the mutation.
func (*PostMutation) ID ¶
func (m *PostMutation) 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 (*PostMutation) 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 (*PostMutation) IsPrivate ¶
func (m *PostMutation) IsPrivate() (r bool, exists bool)
IsPrivate returns the value of the "is_private" field in the mutation.
func (*PostMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Post entity. If the Post 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 (*PostMutation) 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 (*PostMutation) OldFollower ¶
func (m *PostMutation) OldFollower(ctx context.Context) (v int64, err error)
OldFollower returns the old "follower" field's value of the Post entity. If the Post 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 (*PostMutation) OldFollowing ¶
func (m *PostMutation) OldFollowing(ctx context.Context) (v int64, err error)
OldFollowing returns the old "following" field's value of the Post entity. If the Post 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 (*PostMutation) OldIsPrivate ¶
func (m *PostMutation) OldIsPrivate(ctx context.Context) (v bool, err error)
OldIsPrivate returns the old "is_private" field's value of the Post entity. If the Post 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 (*PostMutation) OldOwner ¶
func (m *PostMutation) OldOwner(ctx context.Context) (v string, err error)
OldOwner returns the old "owner" field's value of the Post entity. If the Post 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 (*PostMutation) OldPhotoDir ¶
func (m *PostMutation) OldPhotoDir(ctx context.Context) (v string, err error)
OldPhotoDir returns the old "photo_dir" field's value of the Post entity. If the Post 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 (*PostMutation) Owner ¶
func (m *PostMutation) Owner() (r string, exists bool)
Owner returns the value of the "owner" field in the mutation.
func (*PostMutation) PhotoDir ¶
func (m *PostMutation) PhotoDir() (r string, exists bool)
PhotoDir returns the value of the "photo_dir" field in the mutation.
func (*PostMutation) PhotoDirCleared ¶
func (m *PostMutation) PhotoDirCleared() bool
PhotoDirCleared returns if the "photo_dir" field was cleared in this mutation.
func (*PostMutation) RemovedEdges ¶
func (m *PostMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PostMutation) RemovedIDs ¶
func (m *PostMutation) 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 (*PostMutation) ResetCreatedAt ¶
func (m *PostMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PostMutation) ResetEdge ¶
func (m *PostMutation) 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 (*PostMutation) ResetField ¶
func (m *PostMutation) 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 (*PostMutation) ResetFollower ¶
func (m *PostMutation) ResetFollower()
ResetFollower resets all changes to the "follower" field.
func (*PostMutation) ResetFollowing ¶
func (m *PostMutation) ResetFollowing()
ResetFollowing resets all changes to the "following" field.
func (*PostMutation) ResetIsPrivate ¶
func (m *PostMutation) ResetIsPrivate()
ResetIsPrivate resets all changes to the "is_private" field.
func (*PostMutation) ResetOwner ¶
func (m *PostMutation) ResetOwner()
ResetOwner resets all changes to the "owner" field.
func (*PostMutation) ResetPhotoDir ¶
func (m *PostMutation) ResetPhotoDir()
ResetPhotoDir resets all changes to the "photo_dir" field.
func (*PostMutation) SetCreatedAt ¶
func (m *PostMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PostMutation) SetField ¶
func (m *PostMutation) 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 (*PostMutation) SetFollower ¶
func (m *PostMutation) SetFollower(i int64)
SetFollower sets the "follower" field.
func (*PostMutation) SetFollowing ¶
func (m *PostMutation) SetFollowing(i int64)
SetFollowing sets the "following" field.
func (*PostMutation) SetID ¶
func (m *PostMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Post entities.
func (*PostMutation) SetIsPrivate ¶
func (m *PostMutation) SetIsPrivate(b bool)
SetIsPrivate sets the "is_private" field.
func (*PostMutation) SetOwner ¶
func (m *PostMutation) SetOwner(s string)
SetOwner sets the "owner" field.
func (*PostMutation) SetPhotoDir ¶
func (m *PostMutation) SetPhotoDir(s string)
SetPhotoDir sets the "photo_dir" field.
func (PostMutation) Tx ¶
func (m PostMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PostMutation) Type ¶
func (m *PostMutation) Type() string
Type returns the node type of this mutation (Post).
func (*PostMutation) Where ¶
func (m *PostMutation) Where(ps ...predicate.Post)
Where appends a list predicates to the PostMutation builder.
type PostQuery ¶
type PostQuery struct {
// contains filtered or unexported fields
}
PostQuery is the builder for querying Post entities.
func (*PostQuery) Aggregate ¶
func (pq *PostQuery) Aggregate(fns ...AggregateFunc) *PostSelect
Aggregate returns a PostSelect configured with the given aggregations.
func (*PostQuery) Clone ¶
Clone returns a duplicate of the PostQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PostQuery) First ¶
First returns the first Post entity from the query. Returns a *NotFoundError when no Post was found.
func (*PostQuery) FirstID ¶
FirstID returns the first Post ID from the query. Returns a *NotFoundError when no Post ID was found.
func (*PostQuery) GroupBy ¶
func (pq *PostQuery) GroupBy(field string, fields ...string) *PostGroupBy
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 { Owner string `json:"owner,omitempty"` Count int `json:"count,omitempty"` } client.Post.Query(). GroupBy(post.FieldOwner). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PostQuery) Only ¶
Only returns a single Post entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Post entity is found. Returns a *NotFoundError when no Post entities are found.
func (*PostQuery) OnlyID ¶
OnlyID is like Only, but returns the only Post ID in the query. Returns a *NotSingularError when more than one Post ID is found. Returns a *NotFoundError when no entities are found.
func (*PostQuery) Select ¶
func (pq *PostQuery) Select(fields ...string) *PostSelect
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 { Owner string `json:"owner,omitempty"` } client.Post.Query(). Select(post.FieldOwner). Scan(ctx, &v)
type PostSelect ¶
type PostSelect struct { *PostQuery // contains filtered or unexported fields }
PostSelect is the builder for selecting fields of Post entities.
func (*PostSelect) Aggregate ¶
func (ps *PostSelect) Aggregate(fns ...AggregateFunc) *PostSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PostSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PostSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PostSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PostSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PostSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PostSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PostSelect) Scan ¶
func (ps *PostSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PostSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PostUpdate ¶
type PostUpdate struct {
// contains filtered or unexported fields
}
PostUpdate is the builder for updating Post entities.
func (*PostUpdate) AddFollower ¶
func (pu *PostUpdate) AddFollower(i int64) *PostUpdate
AddFollower adds i to the "follower" field.
func (*PostUpdate) AddFollowing ¶
func (pu *PostUpdate) AddFollowing(i int64) *PostUpdate
AddFollowing adds i to the "following" field.
func (*PostUpdate) ClearPhotoDir ¶
func (pu *PostUpdate) ClearPhotoDir() *PostUpdate
ClearPhotoDir clears the value of the "photo_dir" field.
func (*PostUpdate) Exec ¶
func (pu *PostUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PostUpdate) ExecX ¶
func (pu *PostUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostUpdate) Mutation ¶
func (pu *PostUpdate) Mutation() *PostMutation
Mutation returns the PostMutation object of the builder.
func (*PostUpdate) Save ¶
func (pu *PostUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PostUpdate) SaveX ¶
func (pu *PostUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PostUpdate) SetCreatedAt ¶
func (pu *PostUpdate) SetCreatedAt(t time.Time) *PostUpdate
SetCreatedAt sets the "created_at" field.
func (*PostUpdate) SetFollower ¶
func (pu *PostUpdate) SetFollower(i int64) *PostUpdate
SetFollower sets the "follower" field.
func (*PostUpdate) SetFollowing ¶
func (pu *PostUpdate) SetFollowing(i int64) *PostUpdate
SetFollowing sets the "following" field.
func (*PostUpdate) SetIsPrivate ¶
func (pu *PostUpdate) SetIsPrivate(b bool) *PostUpdate
SetIsPrivate sets the "is_private" field.
func (*PostUpdate) SetNillableCreatedAt ¶
func (pu *PostUpdate) SetNillableCreatedAt(t *time.Time) *PostUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PostUpdate) SetNillableFollower ¶
func (pu *PostUpdate) SetNillableFollower(i *int64) *PostUpdate
SetNillableFollower sets the "follower" field if the given value is not nil.
func (*PostUpdate) SetNillableFollowing ¶
func (pu *PostUpdate) SetNillableFollowing(i *int64) *PostUpdate
SetNillableFollowing sets the "following" field if the given value is not nil.
func (*PostUpdate) SetNillableIsPrivate ¶
func (pu *PostUpdate) SetNillableIsPrivate(b *bool) *PostUpdate
SetNillableIsPrivate sets the "is_private" field if the given value is not nil.
func (*PostUpdate) SetNillablePhotoDir ¶
func (pu *PostUpdate) SetNillablePhotoDir(s *string) *PostUpdate
SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.
func (*PostUpdate) SetOwner ¶
func (pu *PostUpdate) SetOwner(s string) *PostUpdate
SetOwner sets the "owner" field.
func (*PostUpdate) SetPhotoDir ¶
func (pu *PostUpdate) SetPhotoDir(s string) *PostUpdate
SetPhotoDir sets the "photo_dir" field.
func (*PostUpdate) Where ¶
func (pu *PostUpdate) Where(ps ...predicate.Post) *PostUpdate
Where appends a list predicates to the PostUpdate builder.
type PostUpdateOne ¶
type PostUpdateOne struct {
// contains filtered or unexported fields
}
PostUpdateOne is the builder for updating a single Post entity.
func (*PostUpdateOne) AddFollower ¶
func (puo *PostUpdateOne) AddFollower(i int64) *PostUpdateOne
AddFollower adds i to the "follower" field.
func (*PostUpdateOne) AddFollowing ¶
func (puo *PostUpdateOne) AddFollowing(i int64) *PostUpdateOne
AddFollowing adds i to the "following" field.
func (*PostUpdateOne) ClearPhotoDir ¶
func (puo *PostUpdateOne) ClearPhotoDir() *PostUpdateOne
ClearPhotoDir clears the value of the "photo_dir" field.
func (*PostUpdateOne) Exec ¶
func (puo *PostUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PostUpdateOne) ExecX ¶
func (puo *PostUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostUpdateOne) Mutation ¶
func (puo *PostUpdateOne) Mutation() *PostMutation
Mutation returns the PostMutation object of the builder.
func (*PostUpdateOne) Save ¶
func (puo *PostUpdateOne) Save(ctx context.Context) (*Post, error)
Save executes the query and returns the updated Post entity.
func (*PostUpdateOne) SaveX ¶
func (puo *PostUpdateOne) SaveX(ctx context.Context) *Post
SaveX is like Save, but panics if an error occurs.
func (*PostUpdateOne) Select ¶
func (puo *PostUpdateOne) Select(field string, fields ...string) *PostUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PostUpdateOne) SetCreatedAt ¶
func (puo *PostUpdateOne) SetCreatedAt(t time.Time) *PostUpdateOne
SetCreatedAt sets the "created_at" field.
func (*PostUpdateOne) SetFollower ¶
func (puo *PostUpdateOne) SetFollower(i int64) *PostUpdateOne
SetFollower sets the "follower" field.
func (*PostUpdateOne) SetFollowing ¶
func (puo *PostUpdateOne) SetFollowing(i int64) *PostUpdateOne
SetFollowing sets the "following" field.
func (*PostUpdateOne) SetIsPrivate ¶
func (puo *PostUpdateOne) SetIsPrivate(b bool) *PostUpdateOne
SetIsPrivate sets the "is_private" field.
func (*PostUpdateOne) SetNillableCreatedAt ¶
func (puo *PostUpdateOne) SetNillableCreatedAt(t *time.Time) *PostUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PostUpdateOne) SetNillableFollower ¶
func (puo *PostUpdateOne) SetNillableFollower(i *int64) *PostUpdateOne
SetNillableFollower sets the "follower" field if the given value is not nil.
func (*PostUpdateOne) SetNillableFollowing ¶
func (puo *PostUpdateOne) SetNillableFollowing(i *int64) *PostUpdateOne
SetNillableFollowing sets the "following" field if the given value is not nil.
func (*PostUpdateOne) SetNillableIsPrivate ¶
func (puo *PostUpdateOne) SetNillableIsPrivate(b *bool) *PostUpdateOne
SetNillableIsPrivate sets the "is_private" field if the given value is not nil.
func (*PostUpdateOne) SetNillablePhotoDir ¶
func (puo *PostUpdateOne) SetNillablePhotoDir(s *string) *PostUpdateOne
SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.
func (*PostUpdateOne) SetOwner ¶
func (puo *PostUpdateOne) SetOwner(s string) *PostUpdateOne
SetOwner sets the "owner" field.
func (*PostUpdateOne) SetPhotoDir ¶
func (puo *PostUpdateOne) SetPhotoDir(s string) *PostUpdateOne
SetPhotoDir sets the "photo_dir" field.
type QouteRetweetFeatureCreate ¶
type QouteRetweetFeatureCreate struct {
// contains filtered or unexported fields
}
QouteRetweetFeatureCreate is the builder for creating a Qoute_retweet_feature entity.
func (*QouteRetweetFeatureCreate) Exec ¶
func (qrfc *QouteRetweetFeatureCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*QouteRetweetFeatureCreate) ExecX ¶
func (qrfc *QouteRetweetFeatureCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QouteRetweetFeatureCreate) Mutation ¶
func (qrfc *QouteRetweetFeatureCreate) Mutation() *QouteRetweetFeatureMutation
Mutation returns the QouteRetweetFeatureMutation object of the builder.
func (*QouteRetweetFeatureCreate) Save ¶
func (qrfc *QouteRetweetFeatureCreate) Save(ctx context.Context) (*Qoute_retweet_feature, error)
Save creates the Qoute_retweet_feature in the database.
func (*QouteRetweetFeatureCreate) SaveX ¶
func (qrfc *QouteRetweetFeatureCreate) SaveX(ctx context.Context) *Qoute_retweet_feature
SaveX calls Save and panics if Save returns an error.
func (*QouteRetweetFeatureCreate) SetCreatedAt ¶
func (qrfc *QouteRetweetFeatureCreate) SetCreatedAt(t time.Time) *QouteRetweetFeatureCreate
SetCreatedAt sets the "created_at" field.
func (*QouteRetweetFeatureCreate) SetFromAccountID ¶
func (qrfc *QouteRetweetFeatureCreate) SetFromAccountID(i int64) *QouteRetweetFeatureCreate
SetFromAccountID sets the "from_account_id" field.
func (*QouteRetweetFeatureCreate) SetNillableQouteRetweet ¶
func (qrfc *QouteRetweetFeatureCreate) SetNillableQouteRetweet(b *bool) *QouteRetweetFeatureCreate
SetNillableQouteRetweet sets the "qoute_retweet" field if the given value is not nil.
func (*QouteRetweetFeatureCreate) SetPostID ¶
func (qrfc *QouteRetweetFeatureCreate) SetPostID(u uuid.UUID) *QouteRetweetFeatureCreate
SetPostID sets the "post_id" field.
func (*QouteRetweetFeatureCreate) SetQoute ¶
func (qrfc *QouteRetweetFeatureCreate) SetQoute(s string) *QouteRetweetFeatureCreate
SetQoute sets the "qoute" field.
func (*QouteRetweetFeatureCreate) SetQouteRetweet ¶
func (qrfc *QouteRetweetFeatureCreate) SetQouteRetweet(b bool) *QouteRetweetFeatureCreate
SetQouteRetweet sets the "qoute_retweet" field.
type QouteRetweetFeatureCreateBulk ¶
type QouteRetweetFeatureCreateBulk struct {
// contains filtered or unexported fields
}
QouteRetweetFeatureCreateBulk is the builder for creating many Qoute_retweet_feature entities in bulk.
func (*QouteRetweetFeatureCreateBulk) Exec ¶
func (qrfcb *QouteRetweetFeatureCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*QouteRetweetFeatureCreateBulk) ExecX ¶
func (qrfcb *QouteRetweetFeatureCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QouteRetweetFeatureCreateBulk) Save ¶
func (qrfcb *QouteRetweetFeatureCreateBulk) Save(ctx context.Context) ([]*Qoute_retweet_feature, error)
Save creates the Qoute_retweet_feature entities in the database.
func (*QouteRetweetFeatureCreateBulk) SaveX ¶
func (qrfcb *QouteRetweetFeatureCreateBulk) SaveX(ctx context.Context) []*Qoute_retweet_feature
SaveX is like Save, but panics if an error occurs.
type QouteRetweetFeatureDelete ¶
type QouteRetweetFeatureDelete struct {
// contains filtered or unexported fields
}
QouteRetweetFeatureDelete is the builder for deleting a Qoute_retweet_feature entity.
func (*QouteRetweetFeatureDelete) Exec ¶
func (qrfd *QouteRetweetFeatureDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*QouteRetweetFeatureDelete) ExecX ¶
func (qrfd *QouteRetweetFeatureDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*QouteRetweetFeatureDelete) Where ¶
func (qrfd *QouteRetweetFeatureDelete) Where(ps ...predicate.Qoute_retweet_feature) *QouteRetweetFeatureDelete
Where appends a list predicates to the QouteRetweetFeatureDelete builder.
type QouteRetweetFeatureDeleteOne ¶
type QouteRetweetFeatureDeleteOne struct {
// contains filtered or unexported fields
}
QouteRetweetFeatureDeleteOne is the builder for deleting a single Qoute_retweet_feature entity.
func (*QouteRetweetFeatureDeleteOne) Exec ¶
func (qrfdo *QouteRetweetFeatureDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*QouteRetweetFeatureDeleteOne) ExecX ¶
func (qrfdo *QouteRetweetFeatureDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type QouteRetweetFeatureGroupBy ¶
type QouteRetweetFeatureGroupBy struct {
// contains filtered or unexported fields
}
QouteRetweetFeatureGroupBy is the group-by builder for Qoute_retweet_feature entities.
func (*QouteRetweetFeatureGroupBy) Aggregate ¶
func (qrfgb *QouteRetweetFeatureGroupBy) Aggregate(fns ...AggregateFunc) *QouteRetweetFeatureGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*QouteRetweetFeatureGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*QouteRetweetFeatureGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*QouteRetweetFeatureGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureGroupBy) Scan ¶
func (qrfgb *QouteRetweetFeatureGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*QouteRetweetFeatureGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type QouteRetweetFeatureMutation ¶
type QouteRetweetFeatureMutation struct {
// contains filtered or unexported fields
}
QouteRetweetFeatureMutation represents an operation that mutates the Qoute_retweet_feature nodes in the graph.
func (*QouteRetweetFeatureMutation) AddField ¶
func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) AddFromAccountID ¶
func (m *QouteRetweetFeatureMutation) AddFromAccountID(i int64)
AddFromAccountID adds i to the "from_account_id" field.
func (*QouteRetweetFeatureMutation) AddedEdges ¶
func (m *QouteRetweetFeatureMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*QouteRetweetFeatureMutation) AddedField ¶
func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) AddedFields ¶
func (m *QouteRetweetFeatureMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*QouteRetweetFeatureMutation) AddedFromAccountID ¶
func (m *QouteRetweetFeatureMutation) AddedFromAccountID() (r int64, exists bool)
AddedFromAccountID returns the value that was added to the "from_account_id" field in this mutation.
func (*QouteRetweetFeatureMutation) AddedIDs ¶
func (m *QouteRetweetFeatureMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*QouteRetweetFeatureMutation) ClearEdge ¶
func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) ClearField ¶
func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) ClearedEdges ¶
func (m *QouteRetweetFeatureMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*QouteRetweetFeatureMutation) ClearedFields ¶
func (m *QouteRetweetFeatureMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (QouteRetweetFeatureMutation) Client ¶
func (m QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) CreatedAt ¶
func (m *QouteRetweetFeatureMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*QouteRetweetFeatureMutation) EdgeCleared ¶
func (m *QouteRetweetFeatureMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*QouteRetweetFeatureMutation) Field ¶
func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) FieldCleared ¶
func (m *QouteRetweetFeatureMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*QouteRetweetFeatureMutation) Fields ¶
func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) FromAccountID ¶
func (m *QouteRetweetFeatureMutation) FromAccountID() (r int64, exists bool)
FromAccountID returns the value of the "from_account_id" field in the mutation.
func (*QouteRetweetFeatureMutation) ID ¶
func (m *QouteRetweetFeatureMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*QouteRetweetFeatureMutation) IDs ¶
func (m *QouteRetweetFeatureMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*QouteRetweetFeatureMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Qoute_retweet_feature entity. If the Qoute_retweet_feature 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 (*QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) OldFromAccountID ¶
func (m *QouteRetweetFeatureMutation) OldFromAccountID(ctx context.Context) (v int64, err error)
OldFromAccountID returns the old "from_account_id" field's value of the Qoute_retweet_feature entity. If the Qoute_retweet_feature 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 (*QouteRetweetFeatureMutation) OldPostID ¶
OldPostID returns the old "post_id" field's value of the Qoute_retweet_feature entity. If the Qoute_retweet_feature 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 (*QouteRetweetFeatureMutation) OldQoute ¶
func (m *QouteRetweetFeatureMutation) OldQoute(ctx context.Context) (v string, err error)
OldQoute returns the old "qoute" field's value of the Qoute_retweet_feature entity. If the Qoute_retweet_feature 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 (*QouteRetweetFeatureMutation) OldQouteRetweet ¶
func (m *QouteRetweetFeatureMutation) OldQouteRetweet(ctx context.Context) (v bool, err error)
OldQouteRetweet returns the old "qoute_retweet" field's value of the Qoute_retweet_feature entity. If the Qoute_retweet_feature 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 (*QouteRetweetFeatureMutation) Op ¶
func (m *QouteRetweetFeatureMutation) Op() Op
Op returns the operation name.
func (*QouteRetweetFeatureMutation) PostID ¶
func (m *QouteRetweetFeatureMutation) PostID() (r uuid.UUID, exists bool)
PostID returns the value of the "post_id" field in the mutation.
func (*QouteRetweetFeatureMutation) Qoute ¶
func (m *QouteRetweetFeatureMutation) Qoute() (r string, exists bool)
Qoute returns the value of the "qoute" field in the mutation.
func (*QouteRetweetFeatureMutation) QouteRetweet ¶
func (m *QouteRetweetFeatureMutation) QouteRetweet() (r bool, exists bool)
QouteRetweet returns the value of the "qoute_retweet" field in the mutation.
func (*QouteRetweetFeatureMutation) RemovedEdges ¶
func (m *QouteRetweetFeatureMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*QouteRetweetFeatureMutation) RemovedIDs ¶
func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) ResetCreatedAt ¶
func (m *QouteRetweetFeatureMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*QouteRetweetFeatureMutation) ResetEdge ¶
func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) ResetField ¶
func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) ResetFromAccountID ¶
func (m *QouteRetweetFeatureMutation) ResetFromAccountID()
ResetFromAccountID resets all changes to the "from_account_id" field.
func (*QouteRetweetFeatureMutation) ResetPostID ¶
func (m *QouteRetweetFeatureMutation) ResetPostID()
ResetPostID resets all changes to the "post_id" field.
func (*QouteRetweetFeatureMutation) ResetQoute ¶
func (m *QouteRetweetFeatureMutation) ResetQoute()
ResetQoute resets all changes to the "qoute" field.
func (*QouteRetweetFeatureMutation) ResetQouteRetweet ¶
func (m *QouteRetweetFeatureMutation) ResetQouteRetweet()
ResetQouteRetweet resets all changes to the "qoute_retweet" field.
func (*QouteRetweetFeatureMutation) SetCreatedAt ¶
func (m *QouteRetweetFeatureMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*QouteRetweetFeatureMutation) SetField ¶
func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) SetFromAccountID ¶
func (m *QouteRetweetFeatureMutation) SetFromAccountID(i int64)
SetFromAccountID sets the "from_account_id" field.
func (*QouteRetweetFeatureMutation) SetPostID ¶
func (m *QouteRetweetFeatureMutation) SetPostID(u uuid.UUID)
SetPostID sets the "post_id" field.
func (*QouteRetweetFeatureMutation) SetQoute ¶
func (m *QouteRetweetFeatureMutation) SetQoute(s string)
SetQoute sets the "qoute" field.
func (*QouteRetweetFeatureMutation) SetQouteRetweet ¶
func (m *QouteRetweetFeatureMutation) SetQouteRetweet(b bool)
SetQouteRetweet sets the "qoute_retweet" field.
func (QouteRetweetFeatureMutation) Tx ¶
func (m QouteRetweetFeatureMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*QouteRetweetFeatureMutation) Type ¶
func (m *QouteRetweetFeatureMutation) Type() string
Type returns the node type of this mutation (Qoute_retweet_feature).
func (*QouteRetweetFeatureMutation) Where ¶
func (m *QouteRetweetFeatureMutation) Where(ps ...predicate.Qoute_retweet_feature)
Where appends a list predicates to the QouteRetweetFeatureMutation builder.
type QouteRetweetFeatureQuery ¶
type QouteRetweetFeatureQuery struct {
// contains filtered or unexported fields
}
QouteRetweetFeatureQuery is the builder for querying Qoute_retweet_feature entities.
func (*QouteRetweetFeatureQuery) Aggregate ¶
func (qrfq *QouteRetweetFeatureQuery) Aggregate(fns ...AggregateFunc) *QouteRetweetFeatureSelect
Aggregate returns a QouteRetweetFeatureSelect configured with the given aggregations.
func (*QouteRetweetFeatureQuery) All ¶
func (qrfq *QouteRetweetFeatureQuery) All(ctx context.Context) ([]*Qoute_retweet_feature, error)
All executes the query and returns a list of Qoute_retweet_features.
func (*QouteRetweetFeatureQuery) AllX ¶
func (qrfq *QouteRetweetFeatureQuery) AllX(ctx context.Context) []*Qoute_retweet_feature
AllX is like All, but panics if an error occurs.
func (*QouteRetweetFeatureQuery) Clone ¶
func (qrfq *QouteRetweetFeatureQuery) Clone() *QouteRetweetFeatureQuery
Clone returns a duplicate of the QouteRetweetFeatureQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*QouteRetweetFeatureQuery) Count ¶
func (qrfq *QouteRetweetFeatureQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*QouteRetweetFeatureQuery) CountX ¶
func (qrfq *QouteRetweetFeatureQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*QouteRetweetFeatureQuery) Exist ¶
func (qrfq *QouteRetweetFeatureQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*QouteRetweetFeatureQuery) ExistX ¶
func (qrfq *QouteRetweetFeatureQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*QouteRetweetFeatureQuery) First ¶
func (qrfq *QouteRetweetFeatureQuery) First(ctx context.Context) (*Qoute_retweet_feature, error)
First returns the first Qoute_retweet_feature entity from the query. Returns a *NotFoundError when no Qoute_retweet_feature was found.
func (*QouteRetweetFeatureQuery) FirstID ¶
func (qrfq *QouteRetweetFeatureQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Qoute_retweet_feature ID from the query. Returns a *NotFoundError when no Qoute_retweet_feature ID was found.
func (*QouteRetweetFeatureQuery) FirstIDX ¶
func (qrfq *QouteRetweetFeatureQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*QouteRetweetFeatureQuery) FirstX ¶
func (qrfq *QouteRetweetFeatureQuery) FirstX(ctx context.Context) *Qoute_retweet_feature
FirstX is like First, but panics if an error occurs.
func (*QouteRetweetFeatureQuery) GroupBy ¶
func (qrfq *QouteRetweetFeatureQuery) GroupBy(field string, fields ...string) *QouteRetweetFeatureGroupBy
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 { FromAccountID int64 `json:"from_account_id,omitempty"` Count int `json:"count,omitempty"` } client.QouteRetweetFeature.Query(). GroupBy(qoute_retweet_feature.FieldFromAccountID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*QouteRetweetFeatureQuery) IDs ¶
func (qrfq *QouteRetweetFeatureQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Qoute_retweet_feature IDs.
func (*QouteRetweetFeatureQuery) IDsX ¶
func (qrfq *QouteRetweetFeatureQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*QouteRetweetFeatureQuery) Limit ¶
func (qrfq *QouteRetweetFeatureQuery) Limit(limit int) *QouteRetweetFeatureQuery
Limit adds a limit step to the query.
func (*QouteRetweetFeatureQuery) Offset ¶
func (qrfq *QouteRetweetFeatureQuery) Offset(offset int) *QouteRetweetFeatureQuery
Offset adds an offset step to the query.
func (*QouteRetweetFeatureQuery) Only ¶
func (qrfq *QouteRetweetFeatureQuery) Only(ctx context.Context) (*Qoute_retweet_feature, error)
Only returns a single Qoute_retweet_feature entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Qoute_retweet_feature entity is found. Returns a *NotFoundError when no Qoute_retweet_feature entities are found.
func (*QouteRetweetFeatureQuery) OnlyID ¶
func (qrfq *QouteRetweetFeatureQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Qoute_retweet_feature ID in the query. Returns a *NotSingularError when more than one Qoute_retweet_feature ID is found. Returns a *NotFoundError when no entities are found.
func (*QouteRetweetFeatureQuery) OnlyIDX ¶
func (qrfq *QouteRetweetFeatureQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*QouteRetweetFeatureQuery) OnlyX ¶
func (qrfq *QouteRetweetFeatureQuery) OnlyX(ctx context.Context) *Qoute_retweet_feature
OnlyX is like Only, but panics if an error occurs.
func (*QouteRetweetFeatureQuery) Order ¶
func (qrfq *QouteRetweetFeatureQuery) Order(o ...OrderFunc) *QouteRetweetFeatureQuery
Order adds an order step to the query.
func (*QouteRetweetFeatureQuery) Select ¶
func (qrfq *QouteRetweetFeatureQuery) Select(fields ...string) *QouteRetweetFeatureSelect
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 { FromAccountID int64 `json:"from_account_id,omitempty"` } client.QouteRetweetFeature.Query(). Select(qoute_retweet_feature.FieldFromAccountID). Scan(ctx, &v)
func (*QouteRetweetFeatureQuery) Unique ¶
func (qrfq *QouteRetweetFeatureQuery) Unique(unique bool) *QouteRetweetFeatureQuery
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 (*QouteRetweetFeatureQuery) Where ¶
func (qrfq *QouteRetweetFeatureQuery) Where(ps ...predicate.Qoute_retweet_feature) *QouteRetweetFeatureQuery
Where adds a new predicate for the QouteRetweetFeatureQuery builder.
type QouteRetweetFeatureSelect ¶
type QouteRetweetFeatureSelect struct { *QouteRetweetFeatureQuery // contains filtered or unexported fields }
QouteRetweetFeatureSelect is the builder for selecting fields of QouteRetweetFeature entities.
func (*QouteRetweetFeatureSelect) Aggregate ¶
func (qrfs *QouteRetweetFeatureSelect) Aggregate(fns ...AggregateFunc) *QouteRetweetFeatureSelect
Aggregate adds the given aggregation functions to the selector query.
func (*QouteRetweetFeatureSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*QouteRetweetFeatureSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*QouteRetweetFeatureSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*QouteRetweetFeatureSelect) Scan ¶
func (qrfs *QouteRetweetFeatureSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*QouteRetweetFeatureSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type QouteRetweetFeatureUpdate ¶
type QouteRetweetFeatureUpdate struct {
// contains filtered or unexported fields
}
QouteRetweetFeatureUpdate is the builder for updating Qoute_retweet_feature entities.
func (*QouteRetweetFeatureUpdate) AddFromAccountID ¶
func (qrfu *QouteRetweetFeatureUpdate) AddFromAccountID(i int64) *QouteRetweetFeatureUpdate
AddFromAccountID adds i to the "from_account_id" field.
func (*QouteRetweetFeatureUpdate) Exec ¶
func (qrfu *QouteRetweetFeatureUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*QouteRetweetFeatureUpdate) ExecX ¶
func (qrfu *QouteRetweetFeatureUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QouteRetweetFeatureUpdate) Mutation ¶
func (qrfu *QouteRetweetFeatureUpdate) Mutation() *QouteRetweetFeatureMutation
Mutation returns the QouteRetweetFeatureMutation object of the builder.
func (*QouteRetweetFeatureUpdate) Save ¶
func (qrfu *QouteRetweetFeatureUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*QouteRetweetFeatureUpdate) SaveX ¶
func (qrfu *QouteRetweetFeatureUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*QouteRetweetFeatureUpdate) SetCreatedAt ¶
func (qrfu *QouteRetweetFeatureUpdate) SetCreatedAt(t time.Time) *QouteRetweetFeatureUpdate
SetCreatedAt sets the "created_at" field.
func (*QouteRetweetFeatureUpdate) SetFromAccountID ¶
func (qrfu *QouteRetweetFeatureUpdate) SetFromAccountID(i int64) *QouteRetweetFeatureUpdate
SetFromAccountID sets the "from_account_id" field.
func (*QouteRetweetFeatureUpdate) SetNillableQouteRetweet ¶
func (qrfu *QouteRetweetFeatureUpdate) SetNillableQouteRetweet(b *bool) *QouteRetweetFeatureUpdate
SetNillableQouteRetweet sets the "qoute_retweet" field if the given value is not nil.
func (*QouteRetweetFeatureUpdate) SetPostID ¶
func (qrfu *QouteRetweetFeatureUpdate) SetPostID(u uuid.UUID) *QouteRetweetFeatureUpdate
SetPostID sets the "post_id" field.
func (*QouteRetweetFeatureUpdate) SetQoute ¶
func (qrfu *QouteRetweetFeatureUpdate) SetQoute(s string) *QouteRetweetFeatureUpdate
SetQoute sets the "qoute" field.
func (*QouteRetweetFeatureUpdate) SetQouteRetweet ¶
func (qrfu *QouteRetweetFeatureUpdate) SetQouteRetweet(b bool) *QouteRetweetFeatureUpdate
SetQouteRetweet sets the "qoute_retweet" field.
func (*QouteRetweetFeatureUpdate) Where ¶
func (qrfu *QouteRetweetFeatureUpdate) Where(ps ...predicate.Qoute_retweet_feature) *QouteRetweetFeatureUpdate
Where appends a list predicates to the QouteRetweetFeatureUpdate builder.
type QouteRetweetFeatureUpdateOne ¶
type QouteRetweetFeatureUpdateOne struct {
// contains filtered or unexported fields
}
QouteRetweetFeatureUpdateOne is the builder for updating a single Qoute_retweet_feature entity.
func (*QouteRetweetFeatureUpdateOne) AddFromAccountID ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) AddFromAccountID(i int64) *QouteRetweetFeatureUpdateOne
AddFromAccountID adds i to the "from_account_id" field.
func (*QouteRetweetFeatureUpdateOne) Exec ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*QouteRetweetFeatureUpdateOne) ExecX ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QouteRetweetFeatureUpdateOne) Mutation ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) Mutation() *QouteRetweetFeatureMutation
Mutation returns the QouteRetweetFeatureMutation object of the builder.
func (*QouteRetweetFeatureUpdateOne) Save ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) Save(ctx context.Context) (*Qoute_retweet_feature, error)
Save executes the query and returns the updated Qoute_retweet_feature entity.
func (*QouteRetweetFeatureUpdateOne) SaveX ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) SaveX(ctx context.Context) *Qoute_retweet_feature
SaveX is like Save, but panics if an error occurs.
func (*QouteRetweetFeatureUpdateOne) Select ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) Select(field string, fields ...string) *QouteRetweetFeatureUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*QouteRetweetFeatureUpdateOne) SetCreatedAt ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) SetCreatedAt(t time.Time) *QouteRetweetFeatureUpdateOne
SetCreatedAt sets the "created_at" field.
func (*QouteRetweetFeatureUpdateOne) SetFromAccountID ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) SetFromAccountID(i int64) *QouteRetweetFeatureUpdateOne
SetFromAccountID sets the "from_account_id" field.
func (*QouteRetweetFeatureUpdateOne) SetNillableQouteRetweet ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) SetNillableQouteRetweet(b *bool) *QouteRetweetFeatureUpdateOne
SetNillableQouteRetweet sets the "qoute_retweet" field if the given value is not nil.
func (*QouteRetweetFeatureUpdateOne) SetPostID ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) SetPostID(u uuid.UUID) *QouteRetweetFeatureUpdateOne
SetPostID sets the "post_id" field.
func (*QouteRetweetFeatureUpdateOne) SetQoute ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) SetQoute(s string) *QouteRetweetFeatureUpdateOne
SetQoute sets the "qoute" field.
func (*QouteRetweetFeatureUpdateOne) SetQouteRetweet ¶
func (qrfuo *QouteRetweetFeatureUpdateOne) SetQouteRetweet(b bool) *QouteRetweetFeatureUpdateOne
SetQouteRetweet sets the "qoute_retweet" field.
type Qoute_retweet_feature ¶
type Qoute_retweet_feature struct { // ID of the ent. ID int `json:"id,omitempty"` // FromAccountID holds the value of the "from_account_id" field. FromAccountID int64 `json:"from_account_id,omitempty"` // QouteRetweet holds the value of the "qoute_retweet" field. QouteRetweet bool `json:"qoute_retweet,omitempty"` // Qoute holds the value of the "qoute" field. Qoute string `json:"qoute,omitempty"` // PostID holds the value of the "post_id" field. PostID uuid.UUID `json:"post_id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
Qoute_retweet_feature is the model entity for the Qoute_retweet_feature schema.
func (*Qoute_retweet_feature) String ¶
func (qrf *Qoute_retweet_feature) String() string
String implements the fmt.Stringer.
func (*Qoute_retweet_feature) Unwrap ¶
func (qrf *Qoute_retweet_feature) Unwrap() *Qoute_retweet_feature
Unwrap unwraps the Qoute_retweet_feature 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 (*Qoute_retweet_feature) Update ¶
func (qrf *Qoute_retweet_feature) Update() *QouteRetweetFeatureUpdateOne
Update returns a builder for updating this Qoute_retweet_feature. Note that you need to call Qoute_retweet_feature.Unwrap() before calling this method if this Qoute_retweet_feature was returned from a transaction, and the transaction was committed or rolled back.
type Qoute_retweet_featureClient ¶
type Qoute_retweet_featureClient struct {
// contains filtered or unexported fields
}
Qoute_retweet_featureClient is a client for the Qoute_retweet_feature schema.
func NewQoute_retweet_featureClient ¶
func NewQoute_retweet_featureClient(c config) *Qoute_retweet_featureClient
NewQoute_retweet_featureClient returns a client for the Qoute_retweet_feature from the given config.
func (*Qoute_retweet_featureClient) Create ¶
func (c *Qoute_retweet_featureClient) Create() *QouteRetweetFeatureCreate
Create returns a builder for creating a Qoute_retweet_feature entity.
func (*Qoute_retweet_featureClient) CreateBulk ¶
func (c *Qoute_retweet_featureClient) CreateBulk(builders ...*QouteRetweetFeatureCreate) *QouteRetweetFeatureCreateBulk
CreateBulk returns a builder for creating a bulk of Qoute_retweet_feature entities.
func (*Qoute_retweet_featureClient) Delete ¶
func (c *Qoute_retweet_featureClient) Delete() *QouteRetweetFeatureDelete
Delete returns a delete builder for Qoute_retweet_feature.
func (*Qoute_retweet_featureClient) DeleteOne ¶
func (c *Qoute_retweet_featureClient) DeleteOne(qrf *Qoute_retweet_feature) *QouteRetweetFeatureDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*Qoute_retweet_featureClient) DeleteOneID ¶
func (c *Qoute_retweet_featureClient) DeleteOneID(id int) *QouteRetweetFeatureDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*Qoute_retweet_featureClient) Get ¶
func (c *Qoute_retweet_featureClient) Get(ctx context.Context, id int) (*Qoute_retweet_feature, error)
Get returns a Qoute_retweet_feature entity by its id.
func (*Qoute_retweet_featureClient) GetX ¶
func (c *Qoute_retweet_featureClient) GetX(ctx context.Context, id int) *Qoute_retweet_feature
GetX is like Get, but panics if an error occurs.
func (*Qoute_retweet_featureClient) Hooks ¶
func (c *Qoute_retweet_featureClient) Hooks() []Hook
Hooks returns the client hooks.
func (*Qoute_retweet_featureClient) Query ¶
func (c *Qoute_retweet_featureClient) Query() *QouteRetweetFeatureQuery
Query returns a query builder for Qoute_retweet_feature.
func (*Qoute_retweet_featureClient) Update ¶
func (c *Qoute_retweet_featureClient) Update() *QouteRetweetFeatureUpdate
Update returns an update builder for Qoute_retweet_feature.
func (*Qoute_retweet_featureClient) UpdateOne ¶
func (c *Qoute_retweet_featureClient) UpdateOne(qrf *Qoute_retweet_feature) *QouteRetweetFeatureUpdateOne
UpdateOne returns an update builder for the given entity.
func (*Qoute_retweet_featureClient) UpdateOneID ¶
func (c *Qoute_retweet_featureClient) UpdateOneID(id int) *QouteRetweetFeatureUpdateOne
UpdateOneID returns an update builder for the given id.
func (*Qoute_retweet_featureClient) Use ¶
func (c *Qoute_retweet_featureClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `qoute_retweet_feature.Hooks(f(g(h())))`.
type Qoute_retweet_features ¶
type Qoute_retweet_features []*Qoute_retweet_feature
Qoute_retweet_features is a parsable slice of Qoute_retweet_feature.
type RetweetFeatureCreate ¶
type RetweetFeatureCreate struct {
// contains filtered or unexported fields
}
RetweetFeatureCreate is the builder for creating a Retweet_feature entity.
func (*RetweetFeatureCreate) Exec ¶
func (rfc *RetweetFeatureCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RetweetFeatureCreate) ExecX ¶
func (rfc *RetweetFeatureCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RetweetFeatureCreate) Mutation ¶
func (rfc *RetweetFeatureCreate) Mutation() *RetweetFeatureMutation
Mutation returns the RetweetFeatureMutation object of the builder.
func (*RetweetFeatureCreate) Save ¶
func (rfc *RetweetFeatureCreate) Save(ctx context.Context) (*Retweet_feature, error)
Save creates the Retweet_feature in the database.
func (*RetweetFeatureCreate) SaveX ¶
func (rfc *RetweetFeatureCreate) SaveX(ctx context.Context) *Retweet_feature
SaveX calls Save and panics if Save returns an error.
func (*RetweetFeatureCreate) SetCreatedAt ¶
func (rfc *RetweetFeatureCreate) SetCreatedAt(t time.Time) *RetweetFeatureCreate
SetCreatedAt sets the "created_at" field.
func (*RetweetFeatureCreate) SetFromAccountID ¶
func (rfc *RetweetFeatureCreate) SetFromAccountID(i int64) *RetweetFeatureCreate
SetFromAccountID sets the "from_account_id" field.
func (*RetweetFeatureCreate) SetNillableCreatedAt ¶
func (rfc *RetweetFeatureCreate) SetNillableCreatedAt(t *time.Time) *RetweetFeatureCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RetweetFeatureCreate) SetNillableRetweet ¶
func (rfc *RetweetFeatureCreate) SetNillableRetweet(b *bool) *RetweetFeatureCreate
SetNillableRetweet sets the "retweet" field if the given value is not nil.
func (*RetweetFeatureCreate) SetPostID ¶
func (rfc *RetweetFeatureCreate) SetPostID(u uuid.UUID) *RetweetFeatureCreate
SetPostID sets the "post_id" field.
func (*RetweetFeatureCreate) SetRetweet ¶
func (rfc *RetweetFeatureCreate) SetRetweet(b bool) *RetweetFeatureCreate
SetRetweet sets the "retweet" field.
type RetweetFeatureCreateBulk ¶
type RetweetFeatureCreateBulk struct {
// contains filtered or unexported fields
}
RetweetFeatureCreateBulk is the builder for creating many Retweet_feature entities in bulk.
func (*RetweetFeatureCreateBulk) Exec ¶
func (rfcb *RetweetFeatureCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RetweetFeatureCreateBulk) ExecX ¶
func (rfcb *RetweetFeatureCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RetweetFeatureCreateBulk) Save ¶
func (rfcb *RetweetFeatureCreateBulk) Save(ctx context.Context) ([]*Retweet_feature, error)
Save creates the Retweet_feature entities in the database.
func (*RetweetFeatureCreateBulk) SaveX ¶
func (rfcb *RetweetFeatureCreateBulk) SaveX(ctx context.Context) []*Retweet_feature
SaveX is like Save, but panics if an error occurs.
type RetweetFeatureDelete ¶
type RetweetFeatureDelete struct {
// contains filtered or unexported fields
}
RetweetFeatureDelete is the builder for deleting a Retweet_feature entity.
func (*RetweetFeatureDelete) Exec ¶
func (rfd *RetweetFeatureDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RetweetFeatureDelete) ExecX ¶
func (rfd *RetweetFeatureDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RetweetFeatureDelete) Where ¶
func (rfd *RetweetFeatureDelete) Where(ps ...predicate.Retweet_feature) *RetweetFeatureDelete
Where appends a list predicates to the RetweetFeatureDelete builder.
type RetweetFeatureDeleteOne ¶
type RetweetFeatureDeleteOne struct {
// contains filtered or unexported fields
}
RetweetFeatureDeleteOne is the builder for deleting a single Retweet_feature entity.
func (*RetweetFeatureDeleteOne) Exec ¶
func (rfdo *RetweetFeatureDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RetweetFeatureDeleteOne) ExecX ¶
func (rfdo *RetweetFeatureDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RetweetFeatureGroupBy ¶
type RetweetFeatureGroupBy struct {
// contains filtered or unexported fields
}
RetweetFeatureGroupBy is the group-by builder for Retweet_feature entities.
func (*RetweetFeatureGroupBy) Aggregate ¶
func (rfgb *RetweetFeatureGroupBy) Aggregate(fns ...AggregateFunc) *RetweetFeatureGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RetweetFeatureGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*RetweetFeatureGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureGroupBy) Scan ¶
func (rfgb *RetweetFeatureGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*RetweetFeatureGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RetweetFeatureMutation ¶
type RetweetFeatureMutation struct {
// contains filtered or unexported fields
}
RetweetFeatureMutation represents an operation that mutates the Retweet_feature nodes in the graph.
func (*RetweetFeatureMutation) AddField ¶
func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) AddFromAccountID ¶
func (m *RetweetFeatureMutation) AddFromAccountID(i int64)
AddFromAccountID adds i to the "from_account_id" field.
func (*RetweetFeatureMutation) AddedEdges ¶
func (m *RetweetFeatureMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RetweetFeatureMutation) AddedField ¶
func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) AddedFields ¶
func (m *RetweetFeatureMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RetweetFeatureMutation) AddedFromAccountID ¶
func (m *RetweetFeatureMutation) AddedFromAccountID() (r int64, exists bool)
AddedFromAccountID returns the value that was added to the "from_account_id" field in this mutation.
func (*RetweetFeatureMutation) AddedIDs ¶
func (m *RetweetFeatureMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RetweetFeatureMutation) ClearEdge ¶
func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) ClearField ¶
func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) ClearedEdges ¶
func (m *RetweetFeatureMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RetweetFeatureMutation) ClearedFields ¶
func (m *RetweetFeatureMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RetweetFeatureMutation) Client ¶
func (m RetweetFeatureMutation) 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 (*RetweetFeatureMutation) CreatedAt ¶
func (m *RetweetFeatureMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RetweetFeatureMutation) EdgeCleared ¶
func (m *RetweetFeatureMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RetweetFeatureMutation) Field ¶
func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) FieldCleared ¶
func (m *RetweetFeatureMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RetweetFeatureMutation) Fields ¶
func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) FromAccountID ¶
func (m *RetweetFeatureMutation) FromAccountID() (r int64, exists bool)
FromAccountID returns the value of the "from_account_id" field in the mutation.
func (*RetweetFeatureMutation) ID ¶
func (m *RetweetFeatureMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RetweetFeatureMutation) IDs ¶
func (m *RetweetFeatureMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RetweetFeatureMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Retweet_feature entity. If the Retweet_feature 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 (*RetweetFeatureMutation) 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 (*RetweetFeatureMutation) OldFromAccountID ¶
func (m *RetweetFeatureMutation) OldFromAccountID(ctx context.Context) (v int64, err error)
OldFromAccountID returns the old "from_account_id" field's value of the Retweet_feature entity. If the Retweet_feature 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 (*RetweetFeatureMutation) OldPostID ¶
OldPostID returns the old "post_id" field's value of the Retweet_feature entity. If the Retweet_feature 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 (*RetweetFeatureMutation) OldRetweet ¶
func (m *RetweetFeatureMutation) OldRetweet(ctx context.Context) (v bool, err error)
OldRetweet returns the old "retweet" field's value of the Retweet_feature entity. If the Retweet_feature 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 (*RetweetFeatureMutation) Op ¶
func (m *RetweetFeatureMutation) Op() Op
Op returns the operation name.
func (*RetweetFeatureMutation) PostID ¶
func (m *RetweetFeatureMutation) PostID() (r uuid.UUID, exists bool)
PostID returns the value of the "post_id" field in the mutation.
func (*RetweetFeatureMutation) RemovedEdges ¶
func (m *RetweetFeatureMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RetweetFeatureMutation) RemovedIDs ¶
func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) ResetCreatedAt ¶
func (m *RetweetFeatureMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RetweetFeatureMutation) ResetEdge ¶
func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) ResetField ¶
func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) ResetFromAccountID ¶
func (m *RetweetFeatureMutation) ResetFromAccountID()
ResetFromAccountID resets all changes to the "from_account_id" field.
func (*RetweetFeatureMutation) ResetPostID ¶
func (m *RetweetFeatureMutation) ResetPostID()
ResetPostID resets all changes to the "post_id" field.
func (*RetweetFeatureMutation) ResetRetweet ¶
func (m *RetweetFeatureMutation) ResetRetweet()
ResetRetweet resets all changes to the "retweet" field.
func (*RetweetFeatureMutation) Retweet ¶
func (m *RetweetFeatureMutation) Retweet() (r bool, exists bool)
Retweet returns the value of the "retweet" field in the mutation.
func (*RetweetFeatureMutation) SetCreatedAt ¶
func (m *RetweetFeatureMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RetweetFeatureMutation) SetField ¶
func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) SetFromAccountID ¶
func (m *RetweetFeatureMutation) SetFromAccountID(i int64)
SetFromAccountID sets the "from_account_id" field.
func (*RetweetFeatureMutation) SetPostID ¶
func (m *RetweetFeatureMutation) SetPostID(u uuid.UUID)
SetPostID sets the "post_id" field.
func (*RetweetFeatureMutation) SetRetweet ¶
func (m *RetweetFeatureMutation) SetRetweet(b bool)
SetRetweet sets the "retweet" field.
func (RetweetFeatureMutation) Tx ¶
func (m RetweetFeatureMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RetweetFeatureMutation) Type ¶
func (m *RetweetFeatureMutation) Type() string
Type returns the node type of this mutation (Retweet_feature).
func (*RetweetFeatureMutation) Where ¶
func (m *RetweetFeatureMutation) Where(ps ...predicate.Retweet_feature)
Where appends a list predicates to the RetweetFeatureMutation builder.
type RetweetFeatureQuery ¶
type RetweetFeatureQuery struct {
// contains filtered or unexported fields
}
RetweetFeatureQuery is the builder for querying Retweet_feature entities.
func (*RetweetFeatureQuery) Aggregate ¶
func (rfq *RetweetFeatureQuery) Aggregate(fns ...AggregateFunc) *RetweetFeatureSelect
Aggregate returns a RetweetFeatureSelect configured with the given aggregations.
func (*RetweetFeatureQuery) All ¶
func (rfq *RetweetFeatureQuery) All(ctx context.Context) ([]*Retweet_feature, error)
All executes the query and returns a list of Retweet_features.
func (*RetweetFeatureQuery) AllX ¶
func (rfq *RetweetFeatureQuery) AllX(ctx context.Context) []*Retweet_feature
AllX is like All, but panics if an error occurs.
func (*RetweetFeatureQuery) Clone ¶
func (rfq *RetweetFeatureQuery) Clone() *RetweetFeatureQuery
Clone returns a duplicate of the RetweetFeatureQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RetweetFeatureQuery) Count ¶
func (rfq *RetweetFeatureQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RetweetFeatureQuery) CountX ¶
func (rfq *RetweetFeatureQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RetweetFeatureQuery) Exist ¶
func (rfq *RetweetFeatureQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RetweetFeatureQuery) ExistX ¶
func (rfq *RetweetFeatureQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RetweetFeatureQuery) First ¶
func (rfq *RetweetFeatureQuery) First(ctx context.Context) (*Retweet_feature, error)
First returns the first Retweet_feature entity from the query. Returns a *NotFoundError when no Retweet_feature was found.
func (*RetweetFeatureQuery) FirstID ¶
func (rfq *RetweetFeatureQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Retweet_feature ID from the query. Returns a *NotFoundError when no Retweet_feature ID was found.
func (*RetweetFeatureQuery) FirstIDX ¶
func (rfq *RetweetFeatureQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*RetweetFeatureQuery) FirstX ¶
func (rfq *RetweetFeatureQuery) FirstX(ctx context.Context) *Retweet_feature
FirstX is like First, but panics if an error occurs.
func (*RetweetFeatureQuery) GroupBy ¶
func (rfq *RetweetFeatureQuery) GroupBy(field string, fields ...string) *RetweetFeatureGroupBy
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 { FromAccountID int64 `json:"from_account_id,omitempty"` Count int `json:"count,omitempty"` } client.RetweetFeature.Query(). GroupBy(retweet_feature.FieldFromAccountID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RetweetFeatureQuery) IDs ¶
func (rfq *RetweetFeatureQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Retweet_feature IDs.
func (*RetweetFeatureQuery) IDsX ¶
func (rfq *RetweetFeatureQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*RetweetFeatureQuery) Limit ¶
func (rfq *RetweetFeatureQuery) Limit(limit int) *RetweetFeatureQuery
Limit adds a limit step to the query.
func (*RetweetFeatureQuery) Offset ¶
func (rfq *RetweetFeatureQuery) Offset(offset int) *RetweetFeatureQuery
Offset adds an offset step to the query.
func (*RetweetFeatureQuery) Only ¶
func (rfq *RetweetFeatureQuery) Only(ctx context.Context) (*Retweet_feature, error)
Only returns a single Retweet_feature entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Retweet_feature entity is found. Returns a *NotFoundError when no Retweet_feature entities are found.
func (*RetweetFeatureQuery) OnlyID ¶
func (rfq *RetweetFeatureQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Retweet_feature ID in the query. Returns a *NotSingularError when more than one Retweet_feature ID is found. Returns a *NotFoundError when no entities are found.
func (*RetweetFeatureQuery) OnlyIDX ¶
func (rfq *RetweetFeatureQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RetweetFeatureQuery) OnlyX ¶
func (rfq *RetweetFeatureQuery) OnlyX(ctx context.Context) *Retweet_feature
OnlyX is like Only, but panics if an error occurs.
func (*RetweetFeatureQuery) Order ¶
func (rfq *RetweetFeatureQuery) Order(o ...OrderFunc) *RetweetFeatureQuery
Order adds an order step to the query.
func (*RetweetFeatureQuery) Select ¶
func (rfq *RetweetFeatureQuery) Select(fields ...string) *RetweetFeatureSelect
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 { FromAccountID int64 `json:"from_account_id,omitempty"` } client.RetweetFeature.Query(). Select(retweet_feature.FieldFromAccountID). Scan(ctx, &v)
func (*RetweetFeatureQuery) Unique ¶
func (rfq *RetweetFeatureQuery) Unique(unique bool) *RetweetFeatureQuery
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 (*RetweetFeatureQuery) Where ¶
func (rfq *RetweetFeatureQuery) Where(ps ...predicate.Retweet_feature) *RetweetFeatureQuery
Where adds a new predicate for the RetweetFeatureQuery builder.
type RetweetFeatureSelect ¶
type RetweetFeatureSelect struct { *RetweetFeatureQuery // contains filtered or unexported fields }
RetweetFeatureSelect is the builder for selecting fields of RetweetFeature entities.
func (*RetweetFeatureSelect) Aggregate ¶
func (rfs *RetweetFeatureSelect) Aggregate(fns ...AggregateFunc) *RetweetFeatureSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RetweetFeatureSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RetweetFeatureSelect) Scan ¶
func (rfs *RetweetFeatureSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RetweetFeatureSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RetweetFeatureUpdate ¶
type RetweetFeatureUpdate struct {
// contains filtered or unexported fields
}
RetweetFeatureUpdate is the builder for updating Retweet_feature entities.
func (*RetweetFeatureUpdate) AddFromAccountID ¶
func (rfu *RetweetFeatureUpdate) AddFromAccountID(i int64) *RetweetFeatureUpdate
AddFromAccountID adds i to the "from_account_id" field.
func (*RetweetFeatureUpdate) Exec ¶
func (rfu *RetweetFeatureUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RetweetFeatureUpdate) ExecX ¶
func (rfu *RetweetFeatureUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RetweetFeatureUpdate) Mutation ¶
func (rfu *RetweetFeatureUpdate) Mutation() *RetweetFeatureMutation
Mutation returns the RetweetFeatureMutation object of the builder.
func (*RetweetFeatureUpdate) Save ¶
func (rfu *RetweetFeatureUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RetweetFeatureUpdate) SaveX ¶
func (rfu *RetweetFeatureUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RetweetFeatureUpdate) SetCreatedAt ¶
func (rfu *RetweetFeatureUpdate) SetCreatedAt(t time.Time) *RetweetFeatureUpdate
SetCreatedAt sets the "created_at" field.
func (*RetweetFeatureUpdate) SetFromAccountID ¶
func (rfu *RetweetFeatureUpdate) SetFromAccountID(i int64) *RetweetFeatureUpdate
SetFromAccountID sets the "from_account_id" field.
func (*RetweetFeatureUpdate) SetNillableCreatedAt ¶
func (rfu *RetweetFeatureUpdate) SetNillableCreatedAt(t *time.Time) *RetweetFeatureUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RetweetFeatureUpdate) SetNillableRetweet ¶
func (rfu *RetweetFeatureUpdate) SetNillableRetweet(b *bool) *RetweetFeatureUpdate
SetNillableRetweet sets the "retweet" field if the given value is not nil.
func (*RetweetFeatureUpdate) SetPostID ¶
func (rfu *RetweetFeatureUpdate) SetPostID(u uuid.UUID) *RetweetFeatureUpdate
SetPostID sets the "post_id" field.
func (*RetweetFeatureUpdate) SetRetweet ¶
func (rfu *RetweetFeatureUpdate) SetRetweet(b bool) *RetweetFeatureUpdate
SetRetweet sets the "retweet" field.
func (*RetweetFeatureUpdate) Where ¶
func (rfu *RetweetFeatureUpdate) Where(ps ...predicate.Retweet_feature) *RetweetFeatureUpdate
Where appends a list predicates to the RetweetFeatureUpdate builder.
type RetweetFeatureUpdateOne ¶
type RetweetFeatureUpdateOne struct {
// contains filtered or unexported fields
}
RetweetFeatureUpdateOne is the builder for updating a single Retweet_feature entity.
func (*RetweetFeatureUpdateOne) AddFromAccountID ¶
func (rfuo *RetweetFeatureUpdateOne) AddFromAccountID(i int64) *RetweetFeatureUpdateOne
AddFromAccountID adds i to the "from_account_id" field.
func (*RetweetFeatureUpdateOne) Exec ¶
func (rfuo *RetweetFeatureUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RetweetFeatureUpdateOne) ExecX ¶
func (rfuo *RetweetFeatureUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RetweetFeatureUpdateOne) Mutation ¶
func (rfuo *RetweetFeatureUpdateOne) Mutation() *RetweetFeatureMutation
Mutation returns the RetweetFeatureMutation object of the builder.
func (*RetweetFeatureUpdateOne) Save ¶
func (rfuo *RetweetFeatureUpdateOne) Save(ctx context.Context) (*Retweet_feature, error)
Save executes the query and returns the updated Retweet_feature entity.
func (*RetweetFeatureUpdateOne) SaveX ¶
func (rfuo *RetweetFeatureUpdateOne) SaveX(ctx context.Context) *Retweet_feature
SaveX is like Save, but panics if an error occurs.
func (*RetweetFeatureUpdateOne) Select ¶
func (rfuo *RetweetFeatureUpdateOne) Select(field string, fields ...string) *RetweetFeatureUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RetweetFeatureUpdateOne) SetCreatedAt ¶
func (rfuo *RetweetFeatureUpdateOne) SetCreatedAt(t time.Time) *RetweetFeatureUpdateOne
SetCreatedAt sets the "created_at" field.
func (*RetweetFeatureUpdateOne) SetFromAccountID ¶
func (rfuo *RetweetFeatureUpdateOne) SetFromAccountID(i int64) *RetweetFeatureUpdateOne
SetFromAccountID sets the "from_account_id" field.
func (*RetweetFeatureUpdateOne) SetNillableCreatedAt ¶
func (rfuo *RetweetFeatureUpdateOne) SetNillableCreatedAt(t *time.Time) *RetweetFeatureUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RetweetFeatureUpdateOne) SetNillableRetweet ¶
func (rfuo *RetweetFeatureUpdateOne) SetNillableRetweet(b *bool) *RetweetFeatureUpdateOne
SetNillableRetweet sets the "retweet" field if the given value is not nil.
func (*RetweetFeatureUpdateOne) SetPostID ¶
func (rfuo *RetweetFeatureUpdateOne) SetPostID(u uuid.UUID) *RetweetFeatureUpdateOne
SetPostID sets the "post_id" field.
func (*RetweetFeatureUpdateOne) SetRetweet ¶
func (rfuo *RetweetFeatureUpdateOne) SetRetweet(b bool) *RetweetFeatureUpdateOne
SetRetweet sets the "retweet" field.
type Retweet_feature ¶
type Retweet_feature struct { // ID of the ent. ID int `json:"id,omitempty"` // FromAccountID holds the value of the "from_account_id" field. FromAccountID int64 `json:"from_account_id,omitempty"` // Retweet holds the value of the "retweet" field. Retweet bool `json:"retweet,omitempty"` // PostID holds the value of the "post_id" field. PostID uuid.UUID `json:"post_id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
Retweet_feature is the model entity for the Retweet_feature schema.
func (*Retweet_feature) String ¶
func (rf *Retweet_feature) String() string
String implements the fmt.Stringer.
func (*Retweet_feature) Unwrap ¶
func (rf *Retweet_feature) Unwrap() *Retweet_feature
Unwrap unwraps the Retweet_feature 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 (*Retweet_feature) Update ¶
func (rf *Retweet_feature) Update() *RetweetFeatureUpdateOne
Update returns a builder for updating this Retweet_feature. Note that you need to call Retweet_feature.Unwrap() before calling this method if this Retweet_feature was returned from a transaction, and the transaction was committed or rolled back.
type Retweet_featureClient ¶
type Retweet_featureClient struct {
// contains filtered or unexported fields
}
Retweet_featureClient is a client for the Retweet_feature schema.
func NewRetweet_featureClient ¶
func NewRetweet_featureClient(c config) *Retweet_featureClient
NewRetweet_featureClient returns a client for the Retweet_feature from the given config.
func (*Retweet_featureClient) Create ¶
func (c *Retweet_featureClient) Create() *RetweetFeatureCreate
Create returns a builder for creating a Retweet_feature entity.
func (*Retweet_featureClient) CreateBulk ¶
func (c *Retweet_featureClient) CreateBulk(builders ...*RetweetFeatureCreate) *RetweetFeatureCreateBulk
CreateBulk returns a builder for creating a bulk of Retweet_feature entities.
func (*Retweet_featureClient) Delete ¶
func (c *Retweet_featureClient) Delete() *RetweetFeatureDelete
Delete returns a delete builder for Retweet_feature.
func (*Retweet_featureClient) DeleteOne ¶
func (c *Retweet_featureClient) DeleteOne(rf *Retweet_feature) *RetweetFeatureDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*Retweet_featureClient) DeleteOneID ¶
func (c *Retweet_featureClient) DeleteOneID(id int) *RetweetFeatureDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*Retweet_featureClient) Get ¶
func (c *Retweet_featureClient) Get(ctx context.Context, id int) (*Retweet_feature, error)
Get returns a Retweet_feature entity by its id.
func (*Retweet_featureClient) GetX ¶
func (c *Retweet_featureClient) GetX(ctx context.Context, id int) *Retweet_feature
GetX is like Get, but panics if an error occurs.
func (*Retweet_featureClient) Hooks ¶
func (c *Retweet_featureClient) Hooks() []Hook
Hooks returns the client hooks.
func (*Retweet_featureClient) Query ¶
func (c *Retweet_featureClient) Query() *RetweetFeatureQuery
Query returns a query builder for Retweet_feature.
func (*Retweet_featureClient) Update ¶
func (c *Retweet_featureClient) Update() *RetweetFeatureUpdate
Update returns an update builder for Retweet_feature.
func (*Retweet_featureClient) UpdateOne ¶
func (c *Retweet_featureClient) UpdateOne(rf *Retweet_feature) *RetweetFeatureUpdateOne
UpdateOne returns an update builder for the given entity.
func (*Retweet_featureClient) UpdateOneID ¶
func (c *Retweet_featureClient) UpdateOneID(id int) *RetweetFeatureUpdateOne
UpdateOneID returns an update builder for the given id.
func (*Retweet_featureClient) Use ¶
func (c *Retweet_featureClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `retweet_feature.Hooks(f(g(h())))`.
type Retweet_features ¶
type Retweet_features []*Retweet_feature
Retweet_features is a parsable slice of Retweet_feature.
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 Tokens ¶
type Tokens struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,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"` // TokenType holds the value of the "token_type" field. TokenType string `json:"token_type,omitempty"` // Expiry holds the value of the "expiry" field. Expiry time.Time `json:"expiry,omitempty"` // Raw holds the value of the "raw" field. Raw map[string]interface{} `json:"raw,omitempty"` // contains filtered or unexported fields }
Tokens is the model entity for the Tokens schema.
func (*Tokens) Unwrap ¶
Unwrap unwraps the Tokens 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 (*Tokens) Update ¶
func (t *Tokens) Update() *TokensUpdateOne
Update returns a builder for updating this Tokens. Note that you need to call Tokens.Unwrap() before calling this method if this Tokens was returned from a transaction, and the transaction was committed or rolled back.
type TokensClient ¶
type TokensClient struct {
// contains filtered or unexported fields
}
TokensClient is a client for the Tokens schema.
func NewTokensClient ¶
func NewTokensClient(c config) *TokensClient
NewTokensClient returns a client for the Tokens from the given config.
func (*TokensClient) Create ¶
func (c *TokensClient) Create() *TokensCreate
Create returns a builder for creating a Tokens entity.
func (*TokensClient) CreateBulk ¶
func (c *TokensClient) CreateBulk(builders ...*TokensCreate) *TokensCreateBulk
CreateBulk returns a builder for creating a bulk of Tokens entities.
func (*TokensClient) Delete ¶
func (c *TokensClient) Delete() *TokensDelete
Delete returns a delete builder for Tokens.
func (*TokensClient) DeleteOne ¶
func (c *TokensClient) DeleteOne(t *Tokens) *TokensDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TokensClient) DeleteOneID ¶
func (c *TokensClient) DeleteOneID(id uuid.UUID) *TokensDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TokensClient) Query ¶
func (c *TokensClient) Query() *TokensQuery
Query returns a query builder for Tokens.
func (*TokensClient) Update ¶
func (c *TokensClient) Update() *TokensUpdate
Update returns an update builder for Tokens.
func (*TokensClient) UpdateOne ¶
func (c *TokensClient) UpdateOne(t *Tokens) *TokensUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TokensClient) UpdateOneID ¶
func (c *TokensClient) UpdateOneID(id uuid.UUID) *TokensUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TokensClient) Use ¶
func (c *TokensClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tokens.Hooks(f(g(h())))`.
type TokensCreate ¶
type TokensCreate struct {
// contains filtered or unexported fields
}
TokensCreate is the builder for creating a Tokens entity.
func (*TokensCreate) Exec ¶
func (tc *TokensCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TokensCreate) ExecX ¶
func (tc *TokensCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokensCreate) Mutation ¶
func (tc *TokensCreate) Mutation() *TokensMutation
Mutation returns the TokensMutation object of the builder.
func (*TokensCreate) Save ¶
func (tc *TokensCreate) Save(ctx context.Context) (*Tokens, error)
Save creates the Tokens in the database.
func (*TokensCreate) SaveX ¶
func (tc *TokensCreate) SaveX(ctx context.Context) *Tokens
SaveX calls Save and panics if Save returns an error.
func (*TokensCreate) SetAccessToken ¶
func (tc *TokensCreate) SetAccessToken(s string) *TokensCreate
SetAccessToken sets the "access_token" field.
func (*TokensCreate) SetEmail ¶
func (tc *TokensCreate) SetEmail(s string) *TokensCreate
SetEmail sets the "email" field.
func (*TokensCreate) SetExpiry ¶
func (tc *TokensCreate) SetExpiry(t time.Time) *TokensCreate
SetExpiry sets the "expiry" field.
func (*TokensCreate) SetID ¶
func (tc *TokensCreate) SetID(u uuid.UUID) *TokensCreate
SetID sets the "id" field.
func (*TokensCreate) SetNillableID ¶
func (tc *TokensCreate) SetNillableID(u *uuid.UUID) *TokensCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TokensCreate) SetRaw ¶
func (tc *TokensCreate) SetRaw(m map[string]interface{}) *TokensCreate
SetRaw sets the "raw" field.
func (*TokensCreate) SetRefreshToken ¶
func (tc *TokensCreate) SetRefreshToken(s string) *TokensCreate
SetRefreshToken sets the "refresh_token" field.
func (*TokensCreate) SetTokenType ¶
func (tc *TokensCreate) SetTokenType(s string) *TokensCreate
SetTokenType sets the "token_type" field.
type TokensCreateBulk ¶
type TokensCreateBulk struct {
// contains filtered or unexported fields
}
TokensCreateBulk is the builder for creating many Tokens entities in bulk.
func (*TokensCreateBulk) Exec ¶
func (tcb *TokensCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TokensCreateBulk) ExecX ¶
func (tcb *TokensCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TokensDelete ¶
type TokensDelete struct {
// contains filtered or unexported fields
}
TokensDelete is the builder for deleting a Tokens entity.
func (*TokensDelete) Exec ¶
func (td *TokensDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TokensDelete) ExecX ¶
func (td *TokensDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TokensDelete) Where ¶
func (td *TokensDelete) Where(ps ...predicate.Tokens) *TokensDelete
Where appends a list predicates to the TokensDelete builder.
type TokensDeleteOne ¶
type TokensDeleteOne struct {
// contains filtered or unexported fields
}
TokensDeleteOne is the builder for deleting a single Tokens entity.
func (*TokensDeleteOne) Exec ¶
func (tdo *TokensDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TokensDeleteOne) ExecX ¶
func (tdo *TokensDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TokensGroupBy ¶
type TokensGroupBy struct {
// contains filtered or unexported fields
}
TokensGroupBy is the group-by builder for Tokens entities.
func (*TokensGroupBy) Aggregate ¶
func (tgb *TokensGroupBy) Aggregate(fns ...AggregateFunc) *TokensGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TokensGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TokensGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TokensGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TokensGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TokensGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TokensGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TokensGroupBy) Scan ¶
func (tgb *TokensGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*TokensGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TokensMutation ¶
type TokensMutation struct {
// contains filtered or unexported fields
}
TokensMutation represents an operation that mutates the Tokens nodes in the graph.
func (*TokensMutation) AccessToken ¶
func (m *TokensMutation) AccessToken() (r string, exists bool)
AccessToken returns the value of the "access_token" field in the mutation.
func (*TokensMutation) AddField ¶
func (m *TokensMutation) 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 (*TokensMutation) AddedEdges ¶
func (m *TokensMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TokensMutation) AddedField ¶
func (m *TokensMutation) 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 (*TokensMutation) AddedFields ¶
func (m *TokensMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TokensMutation) AddedIDs ¶
func (m *TokensMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TokensMutation) ClearEdge ¶
func (m *TokensMutation) 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 (*TokensMutation) ClearField ¶
func (m *TokensMutation) 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 (*TokensMutation) ClearedEdges ¶
func (m *TokensMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TokensMutation) ClearedFields ¶
func (m *TokensMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TokensMutation) Client ¶
func (m TokensMutation) 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 (*TokensMutation) EdgeCleared ¶
func (m *TokensMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TokensMutation) Email ¶
func (m *TokensMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*TokensMutation) Expiry ¶
func (m *TokensMutation) Expiry() (r time.Time, exists bool)
Expiry returns the value of the "expiry" field in the mutation.
func (*TokensMutation) Field ¶
func (m *TokensMutation) 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 (*TokensMutation) FieldCleared ¶
func (m *TokensMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TokensMutation) Fields ¶
func (m *TokensMutation) 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 (*TokensMutation) ID ¶
func (m *TokensMutation) 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 (*TokensMutation) 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 (*TokensMutation) OldAccessToken ¶
func (m *TokensMutation) OldAccessToken(ctx context.Context) (v string, err error)
OldAccessToken returns the old "access_token" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) OldEmail ¶
func (m *TokensMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) OldExpiry ¶
OldExpiry returns the old "expiry" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) 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 (*TokensMutation) OldRaw ¶
func (m *TokensMutation) OldRaw(ctx context.Context) (v map[string]interface{}, err error)
OldRaw returns the old "raw" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) OldRefreshToken ¶
func (m *TokensMutation) OldRefreshToken(ctx context.Context) (v string, err error)
OldRefreshToken returns the old "refresh_token" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) OldTokenType ¶
func (m *TokensMutation) OldTokenType(ctx context.Context) (v string, err error)
OldTokenType returns the old "token_type" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) Raw ¶
func (m *TokensMutation) Raw() (r map[string]interface{}, exists bool)
Raw returns the value of the "raw" field in the mutation.
func (*TokensMutation) RefreshToken ¶
func (m *TokensMutation) RefreshToken() (r string, exists bool)
RefreshToken returns the value of the "refresh_token" field in the mutation.
func (*TokensMutation) RemovedEdges ¶
func (m *TokensMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TokensMutation) RemovedIDs ¶
func (m *TokensMutation) 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 (*TokensMutation) ResetAccessToken ¶
func (m *TokensMutation) ResetAccessToken()
ResetAccessToken resets all changes to the "access_token" field.
func (*TokensMutation) ResetEdge ¶
func (m *TokensMutation) 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 (*TokensMutation) ResetEmail ¶
func (m *TokensMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*TokensMutation) ResetExpiry ¶
func (m *TokensMutation) ResetExpiry()
ResetExpiry resets all changes to the "expiry" field.
func (*TokensMutation) ResetField ¶
func (m *TokensMutation) 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 (*TokensMutation) ResetRaw ¶
func (m *TokensMutation) ResetRaw()
ResetRaw resets all changes to the "raw" field.
func (*TokensMutation) ResetRefreshToken ¶
func (m *TokensMutation) ResetRefreshToken()
ResetRefreshToken resets all changes to the "refresh_token" field.
func (*TokensMutation) ResetTokenType ¶
func (m *TokensMutation) ResetTokenType()
ResetTokenType resets all changes to the "token_type" field.
func (*TokensMutation) SetAccessToken ¶
func (m *TokensMutation) SetAccessToken(s string)
SetAccessToken sets the "access_token" field.
func (*TokensMutation) SetEmail ¶
func (m *TokensMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*TokensMutation) SetExpiry ¶
func (m *TokensMutation) SetExpiry(t time.Time)
SetExpiry sets the "expiry" field.
func (*TokensMutation) SetField ¶
func (m *TokensMutation) 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 (*TokensMutation) SetID ¶
func (m *TokensMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Tokens entities.
func (*TokensMutation) SetRaw ¶
func (m *TokensMutation) SetRaw(value map[string]interface{})
SetRaw sets the "raw" field.
func (*TokensMutation) SetRefreshToken ¶
func (m *TokensMutation) SetRefreshToken(s string)
SetRefreshToken sets the "refresh_token" field.
func (*TokensMutation) SetTokenType ¶
func (m *TokensMutation) SetTokenType(s string)
SetTokenType sets the "token_type" field.
func (*TokensMutation) TokenType ¶
func (m *TokensMutation) TokenType() (r string, exists bool)
TokenType returns the value of the "token_type" field in the mutation.
func (TokensMutation) Tx ¶
func (m TokensMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TokensMutation) Type ¶
func (m *TokensMutation) Type() string
Type returns the node type of this mutation (Tokens).
func (*TokensMutation) Where ¶
func (m *TokensMutation) Where(ps ...predicate.Tokens)
Where appends a list predicates to the TokensMutation builder.
type TokensQuery ¶
type TokensQuery struct {
// contains filtered or unexported fields
}
TokensQuery is the builder for querying Tokens entities.
func (*TokensQuery) Aggregate ¶
func (tq *TokensQuery) Aggregate(fns ...AggregateFunc) *TokensSelect
Aggregate returns a TokensSelect configured with the given aggregations.
func (*TokensQuery) All ¶
func (tq *TokensQuery) All(ctx context.Context) ([]*Tokens, error)
All executes the query and returns a list of TokensSlice.
func (*TokensQuery) AllX ¶
func (tq *TokensQuery) AllX(ctx context.Context) []*Tokens
AllX is like All, but panics if an error occurs.
func (*TokensQuery) Clone ¶
func (tq *TokensQuery) Clone() *TokensQuery
Clone returns a duplicate of the TokensQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TokensQuery) Count ¶
func (tq *TokensQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TokensQuery) CountX ¶
func (tq *TokensQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TokensQuery) Exist ¶
func (tq *TokensQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TokensQuery) ExistX ¶
func (tq *TokensQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TokensQuery) First ¶
func (tq *TokensQuery) First(ctx context.Context) (*Tokens, error)
First returns the first Tokens entity from the query. Returns a *NotFoundError when no Tokens was found.
func (*TokensQuery) FirstID ¶
FirstID returns the first Tokens ID from the query. Returns a *NotFoundError when no Tokens ID was found.
func (*TokensQuery) FirstIDX ¶
func (tq *TokensQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*TokensQuery) FirstX ¶
func (tq *TokensQuery) FirstX(ctx context.Context) *Tokens
FirstX is like First, but panics if an error occurs.
func (*TokensQuery) GroupBy ¶
func (tq *TokensQuery) GroupBy(field string, fields ...string) *TokensGroupBy
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 { Email string `json:"email,omitempty"` Count int `json:"count,omitempty"` } client.Tokens.Query(). GroupBy(tokens.FieldEmail). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TokensQuery) IDsX ¶
func (tq *TokensQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*TokensQuery) Limit ¶
func (tq *TokensQuery) Limit(limit int) *TokensQuery
Limit adds a limit step to the query.
func (*TokensQuery) Offset ¶
func (tq *TokensQuery) Offset(offset int) *TokensQuery
Offset adds an offset step to the query.
func (*TokensQuery) Only ¶
func (tq *TokensQuery) Only(ctx context.Context) (*Tokens, error)
Only returns a single Tokens entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tokens entity is found. Returns a *NotFoundError when no Tokens entities are found.
func (*TokensQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tokens ID in the query. Returns a *NotSingularError when more than one Tokens ID is found. Returns a *NotFoundError when no entities are found.
func (*TokensQuery) OnlyIDX ¶
func (tq *TokensQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TokensQuery) OnlyX ¶
func (tq *TokensQuery) OnlyX(ctx context.Context) *Tokens
OnlyX is like Only, but panics if an error occurs.
func (*TokensQuery) Order ¶
func (tq *TokensQuery) Order(o ...OrderFunc) *TokensQuery
Order adds an order step to the query.
func (*TokensQuery) Select ¶
func (tq *TokensQuery) Select(fields ...string) *TokensSelect
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 { Email string `json:"email,omitempty"` } client.Tokens.Query(). Select(tokens.FieldEmail). Scan(ctx, &v)
func (*TokensQuery) Unique ¶
func (tq *TokensQuery) Unique(unique bool) *TokensQuery
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 (*TokensQuery) Where ¶
func (tq *TokensQuery) Where(ps ...predicate.Tokens) *TokensQuery
Where adds a new predicate for the TokensQuery builder.
type TokensSelect ¶
type TokensSelect struct { *TokensQuery // contains filtered or unexported fields }
TokensSelect is the builder for selecting fields of Tokens entities.
func (*TokensSelect) Aggregate ¶
func (ts *TokensSelect) Aggregate(fns ...AggregateFunc) *TokensSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TokensSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TokensSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TokensSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TokensSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TokensSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TokensSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TokensSelect) Scan ¶
func (ts *TokensSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TokensSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TokensUpdate ¶
type TokensUpdate struct {
// contains filtered or unexported fields
}
TokensUpdate is the builder for updating Tokens entities.
func (*TokensUpdate) Exec ¶
func (tu *TokensUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TokensUpdate) ExecX ¶
func (tu *TokensUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokensUpdate) Mutation ¶
func (tu *TokensUpdate) Mutation() *TokensMutation
Mutation returns the TokensMutation object of the builder.
func (*TokensUpdate) Save ¶
func (tu *TokensUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TokensUpdate) SaveX ¶
func (tu *TokensUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TokensUpdate) SetAccessToken ¶
func (tu *TokensUpdate) SetAccessToken(s string) *TokensUpdate
SetAccessToken sets the "access_token" field.
func (*TokensUpdate) SetEmail ¶
func (tu *TokensUpdate) SetEmail(s string) *TokensUpdate
SetEmail sets the "email" field.
func (*TokensUpdate) SetExpiry ¶
func (tu *TokensUpdate) SetExpiry(t time.Time) *TokensUpdate
SetExpiry sets the "expiry" field.
func (*TokensUpdate) SetRaw ¶
func (tu *TokensUpdate) SetRaw(m map[string]interface{}) *TokensUpdate
SetRaw sets the "raw" field.
func (*TokensUpdate) SetRefreshToken ¶
func (tu *TokensUpdate) SetRefreshToken(s string) *TokensUpdate
SetRefreshToken sets the "refresh_token" field.
func (*TokensUpdate) SetTokenType ¶
func (tu *TokensUpdate) SetTokenType(s string) *TokensUpdate
SetTokenType sets the "token_type" field.
func (*TokensUpdate) Where ¶
func (tu *TokensUpdate) Where(ps ...predicate.Tokens) *TokensUpdate
Where appends a list predicates to the TokensUpdate builder.
type TokensUpdateOne ¶
type TokensUpdateOne struct {
// contains filtered or unexported fields
}
TokensUpdateOne is the builder for updating a single Tokens entity.
func (*TokensUpdateOne) Exec ¶
func (tuo *TokensUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TokensUpdateOne) ExecX ¶
func (tuo *TokensUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokensUpdateOne) Mutation ¶
func (tuo *TokensUpdateOne) Mutation() *TokensMutation
Mutation returns the TokensMutation object of the builder.
func (*TokensUpdateOne) Save ¶
func (tuo *TokensUpdateOne) Save(ctx context.Context) (*Tokens, error)
Save executes the query and returns the updated Tokens entity.
func (*TokensUpdateOne) SaveX ¶
func (tuo *TokensUpdateOne) SaveX(ctx context.Context) *Tokens
SaveX is like Save, but panics if an error occurs.
func (*TokensUpdateOne) Select ¶
func (tuo *TokensUpdateOne) Select(field string, fields ...string) *TokensUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TokensUpdateOne) SetAccessToken ¶
func (tuo *TokensUpdateOne) SetAccessToken(s string) *TokensUpdateOne
SetAccessToken sets the "access_token" field.
func (*TokensUpdateOne) SetEmail ¶
func (tuo *TokensUpdateOne) SetEmail(s string) *TokensUpdateOne
SetEmail sets the "email" field.
func (*TokensUpdateOne) SetExpiry ¶
func (tuo *TokensUpdateOne) SetExpiry(t time.Time) *TokensUpdateOne
SetExpiry sets the "expiry" field.
func (*TokensUpdateOne) SetRaw ¶
func (tuo *TokensUpdateOne) SetRaw(m map[string]interface{}) *TokensUpdateOne
SetRaw sets the "raw" field.
func (*TokensUpdateOne) SetRefreshToken ¶
func (tuo *TokensUpdateOne) SetRefreshToken(s string) *TokensUpdateOne
SetRefreshToken sets the "refresh_token" field.
func (*TokensUpdateOne) SetTokenType ¶
func (tuo *TokensUpdateOne) SetTokenType(s string) *TokensUpdateOne
SetTokenType sets the "token_type" field.
type Tx ¶
type Tx struct { // Account is the client for interacting with the Account builders. Account *AccountClient // AccountNotifs is the client for interacting with the AccountNotifs builders. AccountNotifs *AccountNotifsClient // LikeFeature is the client for interacting with the LikeFeature builders. LikeFeature *LikeFeatureClient // Post is the client for interacting with the Post builders. Post *PostClient // Qoute_retweet_feature is the client for interacting with the Qoute_retweet_feature builders. Qoute_retweet_feature *Qoute_retweet_featureClient // Retweet_feature is the client for interacting with the Retweet_feature builders. Retweet_feature *Retweet_featureClient // Tokens is the client for interacting with the Tokens builders. Tokens *TokensClient // 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"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // HashedPassword holds the value of the "hashed_password" field. HashedPassword string `json:"hashed_password,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // FullName holds the value of the "full_name" field. FullName string `json:"full_name,omitempty"` // PasswordChangedAt holds the value of the "password_changed_at" field. PasswordChangedAt time.Time `json:"password_changed_at,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
Users is the model entity for the Users schema.
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) Query ¶
func (c *UsersClient) Query() *UsersQuery
Query returns a query builder for 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) 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) SetCreatedAt ¶
func (uc *UsersCreate) SetCreatedAt(t time.Time) *UsersCreate
SetCreatedAt sets the "created_at" field.
func (*UsersCreate) SetEmail ¶
func (uc *UsersCreate) SetEmail(s string) *UsersCreate
SetEmail sets the "email" field.
func (*UsersCreate) SetFullName ¶
func (uc *UsersCreate) SetFullName(s string) *UsersCreate
SetFullName sets the "full_name" field.
func (*UsersCreate) SetHashedPassword ¶
func (uc *UsersCreate) SetHashedPassword(s string) *UsersCreate
SetHashedPassword sets the "hashed_password" field.
func (*UsersCreate) SetID ¶
func (uc *UsersCreate) SetID(u uuid.UUID) *UsersCreate
SetID sets the "id" field.
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) SetNillableHashedPassword ¶
func (uc *UsersCreate) SetNillableHashedPassword(s *string) *UsersCreate
SetNillableHashedPassword sets the "hashed_password" field if the given value is not nil.
func (*UsersCreate) SetNillablePasswordChangedAt ¶
func (uc *UsersCreate) SetNillablePasswordChangedAt(t *time.Time) *UsersCreate
SetNillablePasswordChangedAt sets the "password_changed_at" field if the given value is not nil.
func (*UsersCreate) SetPasswordChangedAt ¶
func (uc *UsersCreate) SetPasswordChangedAt(t time.Time) *UsersCreate
SetPasswordChangedAt sets the "password_changed_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.
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 group-by 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) 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) AddedEdges ¶
func (m *UsersMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added 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) 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) 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) ClearHashedPassword ¶
func (m *UsersMutation) ClearHashedPassword()
ClearHashedPassword clears the value of the "hashed_password" field.
func (*UsersMutation) ClearPasswordChangedAt ¶
func (m *UsersMutation) ClearPasswordChangedAt()
ClearPasswordChangedAt clears the value of the "password_changed_at" field.
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) 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) Email ¶
func (m *UsersMutation) Email() (r string, exists bool)
Email returns the value of the "email" 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) FullName ¶
func (m *UsersMutation) FullName() (r string, exists bool)
FullName returns the value of the "full_name" field in the mutation.
func (*UsersMutation) HashedPassword ¶
func (m *UsersMutation) HashedPassword() (r string, exists bool)
HashedPassword returns the value of the "hashed_password" field in the mutation.
func (*UsersMutation) HashedPasswordCleared ¶
func (m *UsersMutation) HashedPasswordCleared() bool
HashedPasswordCleared returns if the "hashed_password" field was cleared in this 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) 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) OldEmail ¶
func (m *UsersMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" 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) OldFullName ¶
func (m *UsersMutation) OldFullName(ctx context.Context) (v string, err error)
OldFullName returns the old "full_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) OldHashedPassword ¶
func (m *UsersMutation) OldHashedPassword(ctx context.Context) (v string, err error)
OldHashedPassword returns the old "hashed_password" 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) OldPasswordChangedAt ¶
OldPasswordChangedAt returns the old "password_changed_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) PasswordChangedAt ¶
func (m *UsersMutation) PasswordChangedAt() (r time.Time, exists bool)
PasswordChangedAt returns the value of the "password_changed_at" field in the mutation.
func (*UsersMutation) PasswordChangedAtCleared ¶
func (m *UsersMutation) PasswordChangedAtCleared() bool
PasswordChangedAtCleared returns if the "password_changed_at" field was cleared in this mutation.
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) ResetCreatedAt ¶
func (m *UsersMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" 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) ResetEmail ¶
func (m *UsersMutation) ResetEmail()
ResetEmail resets all changes to the "email" 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) ResetFullName ¶
func (m *UsersMutation) ResetFullName()
ResetFullName resets all changes to the "full_name" field.
func (*UsersMutation) ResetHashedPassword ¶
func (m *UsersMutation) ResetHashedPassword()
ResetHashedPassword resets all changes to the "hashed_password" field.
func (*UsersMutation) ResetPasswordChangedAt ¶
func (m *UsersMutation) ResetPasswordChangedAt()
ResetPasswordChangedAt resets all changes to the "password_changed_at" field.
func (*UsersMutation) ResetUsername ¶
func (m *UsersMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UsersMutation) SetCreatedAt ¶
func (m *UsersMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UsersMutation) SetEmail ¶
func (m *UsersMutation) SetEmail(s string)
SetEmail sets the "email" 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) SetFullName ¶
func (m *UsersMutation) SetFullName(s string)
SetFullName sets the "full_name" field.
func (*UsersMutation) SetHashedPassword ¶
func (m *UsersMutation) SetHashedPassword(s string)
SetHashedPassword sets the "hashed_password" 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) SetPasswordChangedAt ¶
func (m *UsersMutation) SetPasswordChangedAt(t time.Time)
SetPasswordChangedAt sets the "password_changed_at" field.
func (*UsersMutation) SetUsername ¶
func (m *UsersMutation) SetUsername(s string)
SetUsername sets the "username" field.
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) Username ¶
func (m *UsersMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UsersMutation) Where ¶
func (m *UsersMutation) Where(ps ...predicate.Users)
Where appends a list predicates to the UsersMutation builder.
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 { Username string `json:"username,omitempty"` Count int `json:"count,omitempty"` } client.Users.Query(). GroupBy(users.FieldUsername). 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 adds a limit step to the query.
func (*UsersQuery) Offset ¶
func (uq *UsersQuery) Offset(offset int) *UsersQuery
Offset adds an offset step to the query.
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 ...OrderFunc) *UsersQuery
Order adds an order step to the query.
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 { Username string `json:"username,omitempty"` } client.Users.Query(). Select(users.FieldUsername). 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.
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) ClearHashedPassword ¶
func (uu *UsersUpdate) ClearHashedPassword() *UsersUpdate
ClearHashedPassword clears the value of the "hashed_password" field.
func (*UsersUpdate) ClearPasswordChangedAt ¶
func (uu *UsersUpdate) ClearPasswordChangedAt() *UsersUpdate
ClearPasswordChangedAt clears the value of the "password_changed_at" field.
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) 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) SetCreatedAt ¶
func (uu *UsersUpdate) SetCreatedAt(t time.Time) *UsersUpdate
SetCreatedAt sets the "created_at" field.
func (*UsersUpdate) SetEmail ¶
func (uu *UsersUpdate) SetEmail(s string) *UsersUpdate
SetEmail sets the "email" field.
func (*UsersUpdate) SetFullName ¶
func (uu *UsersUpdate) SetFullName(s string) *UsersUpdate
SetFullName sets the "full_name" field.
func (*UsersUpdate) SetHashedPassword ¶
func (uu *UsersUpdate) SetHashedPassword(s string) *UsersUpdate
SetHashedPassword sets the "hashed_password" field.
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) SetNillableHashedPassword ¶
func (uu *UsersUpdate) SetNillableHashedPassword(s *string) *UsersUpdate
SetNillableHashedPassword sets the "hashed_password" field if the given value is not nil.
func (*UsersUpdate) SetNillablePasswordChangedAt ¶
func (uu *UsersUpdate) SetNillablePasswordChangedAt(t *time.Time) *UsersUpdate
SetNillablePasswordChangedAt sets the "password_changed_at" field if the given value is not nil.
func (*UsersUpdate) SetPasswordChangedAt ¶
func (uu *UsersUpdate) SetPasswordChangedAt(t time.Time) *UsersUpdate
SetPasswordChangedAt sets the "password_changed_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) ClearHashedPassword ¶
func (uuo *UsersUpdateOne) ClearHashedPassword() *UsersUpdateOne
ClearHashedPassword clears the value of the "hashed_password" field.
func (*UsersUpdateOne) ClearPasswordChangedAt ¶
func (uuo *UsersUpdateOne) ClearPasswordChangedAt() *UsersUpdateOne
ClearPasswordChangedAt clears the value of the "password_changed_at" field.
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) 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) SetCreatedAt ¶
func (uuo *UsersUpdateOne) SetCreatedAt(t time.Time) *UsersUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UsersUpdateOne) SetEmail ¶
func (uuo *UsersUpdateOne) SetEmail(s string) *UsersUpdateOne
SetEmail sets the "email" field.
func (*UsersUpdateOne) SetFullName ¶
func (uuo *UsersUpdateOne) SetFullName(s string) *UsersUpdateOne
SetFullName sets the "full_name" field.
func (*UsersUpdateOne) SetHashedPassword ¶
func (uuo *UsersUpdateOne) SetHashedPassword(s string) *UsersUpdateOne
SetHashedPassword sets the "hashed_password" field.
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) SetNillableHashedPassword ¶
func (uuo *UsersUpdateOne) SetNillableHashedPassword(s *string) *UsersUpdateOne
SetNillableHashedPassword sets the "hashed_password" field if the given value is not nil.
func (*UsersUpdateOne) SetNillablePasswordChangedAt ¶
func (uuo *UsersUpdateOne) SetNillablePasswordChangedAt(t *time.Time) *UsersUpdateOne
SetNillablePasswordChangedAt sets the "password_changed_at" field if the given value is not nil.
func (*UsersUpdateOne) SetPasswordChangedAt ¶
func (uuo *UsersUpdateOne) SetPasswordChangedAt(t time.Time) *UsersUpdateOne
SetPasswordChangedAt sets the "password_changed_at" field.
func (*UsersUpdateOne) SetUsername ¶
func (uuo *UsersUpdateOne) SetUsername(s string) *UsersUpdateOne
SetUsername sets the "username" field.
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
- accountnotifs.go
- accountnotifs_create.go
- accountnotifs_delete.go
- accountnotifs_query.go
- accountnotifs_update.go
- client.go
- config.go
- context.go
- ent.go
- generate.go
- likefeature.go
- likefeature_create.go
- likefeature_delete.go
- likefeature_query.go
- likefeature_update.go
- mutation.go
- post.go
- post_create.go
- post_delete.go
- post_query.go
- post_update.go
- qoute_retweet_feature.go
- qoute_retweet_feature_create.go
- qoute_retweet_feature_delete.go
- qoute_retweet_feature_query.go
- qoute_retweet_feature_update.go
- retweet_feature.go
- retweet_feature_create.go
- retweet_feature_delete.go
- retweet_feature_query.go
- retweet_feature_update.go
- runtime.go
- tokens.go
- tokens_create.go
- tokens_delete.go
- tokens_query.go
- tokens_update.go
- tx.go
- users.go
- users_create.go
- users_delete.go
- users_query.go
- users_update.go