Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Chat
- func (c *Chat) QueryImage() *FileQuery
- func (c *Chat) QueryMessages() *MessageQuery
- func (c *Chat) QueryOwner() *UserQuery
- func (c *Chat) QueryUsers() *UserQuery
- func (c *Chat) String() string
- func (c *Chat) Unwrap() *Chat
- func (c *Chat) Update() *ChatUpdateOne
- func (c *Chat) Value(name string) (ent.Value, error)
- type ChatClient
- func (c *ChatClient) Create() *ChatCreate
- func (c *ChatClient) CreateBulk(builders ...*ChatCreate) *ChatCreateBulk
- func (c *ChatClient) Delete() *ChatDelete
- func (c *ChatClient) DeleteOne(ch *Chat) *ChatDeleteOne
- func (c *ChatClient) DeleteOneID(id uuid.UUID) *ChatDeleteOne
- func (c *ChatClient) Get(ctx context.Context, id uuid.UUID) (*Chat, error)
- func (c *ChatClient) GetX(ctx context.Context, id uuid.UUID) *Chat
- func (c *ChatClient) Hooks() []Hook
- func (c *ChatClient) Intercept(interceptors ...Interceptor)
- func (c *ChatClient) Interceptors() []Interceptor
- func (c *ChatClient) MapCreateBulk(slice any, setFunc func(*ChatCreate, int)) *ChatCreateBulk
- func (c *ChatClient) Query() *ChatQuery
- func (c *ChatClient) QueryImage(ch *Chat) *FileQuery
- func (c *ChatClient) QueryMessages(ch *Chat) *MessageQuery
- func (c *ChatClient) QueryOwner(ch *Chat) *UserQuery
- func (c *ChatClient) QueryUsers(ch *Chat) *UserQuery
- func (c *ChatClient) Update() *ChatUpdate
- func (c *ChatClient) UpdateOne(ch *Chat) *ChatUpdateOne
- func (c *ChatClient) UpdateOneID(id uuid.UUID) *ChatUpdateOne
- func (c *ChatClient) Use(hooks ...Hook)
- type ChatCreate
- func (cc *ChatCreate) AddMessageIDs(ids ...uuid.UUID) *ChatCreate
- func (cc *ChatCreate) AddMessages(m ...*Message) *ChatCreate
- func (cc *ChatCreate) AddUserIDs(ids ...uuid.UUID) *ChatCreate
- func (cc *ChatCreate) AddUsers(u ...*User) *ChatCreate
- func (cc *ChatCreate) Exec(ctx context.Context) error
- func (cc *ChatCreate) ExecX(ctx context.Context)
- func (cc *ChatCreate) Mutation() *ChatMutation
- func (cc *ChatCreate) Save(ctx context.Context) (*Chat, error)
- func (cc *ChatCreate) SaveX(ctx context.Context) *Chat
- func (cc *ChatCreate) SetCreatedAt(t time.Time) *ChatCreate
- func (cc *ChatCreate) SetCtype(c chat.Ctype) *ChatCreate
- func (cc *ChatCreate) SetDescription(s string) *ChatCreate
- func (cc *ChatCreate) SetID(u uuid.UUID) *ChatCreate
- func (cc *ChatCreate) SetImage(f *File) *ChatCreate
- func (cc *ChatCreate) SetImageID(u uuid.UUID) *ChatCreate
- func (cc *ChatCreate) SetName(s string) *ChatCreate
- func (cc *ChatCreate) SetNillableCreatedAt(t *time.Time) *ChatCreate
- func (cc *ChatCreate) SetNillableDescription(s *string) *ChatCreate
- func (cc *ChatCreate) SetNillableID(u *uuid.UUID) *ChatCreate
- func (cc *ChatCreate) SetNillableImageID(u *uuid.UUID) *ChatCreate
- func (cc *ChatCreate) SetNillableName(s *string) *ChatCreate
- func (cc *ChatCreate) SetNillableUpdatedAt(t *time.Time) *ChatCreate
- func (cc *ChatCreate) SetOwner(u *User) *ChatCreate
- func (cc *ChatCreate) SetOwnerID(u uuid.UUID) *ChatCreate
- func (cc *ChatCreate) SetUpdatedAt(t time.Time) *ChatCreate
- type ChatCreateBulk
- type ChatDelete
- type ChatDeleteOne
- type ChatEdges
- type ChatGroupBy
- func (cgb *ChatGroupBy) Aggregate(fns ...AggregateFunc) *ChatGroupBy
- func (s *ChatGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatGroupBy) BoolX(ctx context.Context) bool
- func (s *ChatGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ChatGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatGroupBy) Float64X(ctx context.Context) float64
- func (s *ChatGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ChatGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ChatGroupBy) IntX(ctx context.Context) int
- func (s *ChatGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ChatGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ChatGroupBy) Scan(ctx context.Context, v any) error
- func (s *ChatGroupBy) ScanX(ctx context.Context, v any)
- func (s *ChatGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ChatGroupBy) StringX(ctx context.Context) string
- func (s *ChatGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ChatGroupBy) StringsX(ctx context.Context) []string
- type ChatMutation
- func (m *ChatMutation) AddField(name string, value ent.Value) error
- func (m *ChatMutation) AddMessageIDs(ids ...uuid.UUID)
- func (m *ChatMutation) AddUserIDs(ids ...uuid.UUID)
- func (m *ChatMutation) AddedEdges() []string
- func (m *ChatMutation) AddedField(name string) (ent.Value, bool)
- func (m *ChatMutation) AddedFields() []string
- func (m *ChatMutation) AddedIDs(name string) []ent.Value
- func (m *ChatMutation) ClearDescription()
- func (m *ChatMutation) ClearEdge(name string) error
- func (m *ChatMutation) ClearField(name string) error
- func (m *ChatMutation) ClearImage()
- func (m *ChatMutation) ClearImageID()
- func (m *ChatMutation) ClearMessages()
- func (m *ChatMutation) ClearName()
- func (m *ChatMutation) ClearOwner()
- func (m *ChatMutation) ClearUsers()
- func (m *ChatMutation) ClearedEdges() []string
- func (m *ChatMutation) ClearedFields() []string
- func (m ChatMutation) Client() *Client
- func (m *ChatMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ChatMutation) Ctype() (r chat.Ctype, exists bool)
- func (m *ChatMutation) Description() (r string, exists bool)
- func (m *ChatMutation) DescriptionCleared() bool
- func (m *ChatMutation) EdgeCleared(name string) bool
- func (m *ChatMutation) Field(name string) (ent.Value, bool)
- func (m *ChatMutation) FieldCleared(name string) bool
- func (m *ChatMutation) Fields() []string
- func (m *ChatMutation) ID() (id uuid.UUID, exists bool)
- func (m *ChatMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ChatMutation) ImageCleared() bool
- func (m *ChatMutation) ImageID() (r uuid.UUID, exists bool)
- func (m *ChatMutation) ImageIDCleared() bool
- func (m *ChatMutation) ImageIDs() (ids []uuid.UUID)
- func (m *ChatMutation) MessagesCleared() bool
- func (m *ChatMutation) MessagesIDs() (ids []uuid.UUID)
- func (m *ChatMutation) Name() (r string, exists bool)
- func (m *ChatMutation) NameCleared() bool
- func (m *ChatMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ChatMutation) OldCtype(ctx context.Context) (v chat.Ctype, err error)
- func (m *ChatMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *ChatMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ChatMutation) OldImageID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *ChatMutation) OldName(ctx context.Context) (v *string, err error)
- func (m *ChatMutation) OldOwnerID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ChatMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ChatMutation) Op() Op
- func (m *ChatMutation) OwnerCleared() bool
- func (m *ChatMutation) OwnerID() (r uuid.UUID, exists bool)
- func (m *ChatMutation) OwnerIDs() (ids []uuid.UUID)
- func (m *ChatMutation) RemoveMessageIDs(ids ...uuid.UUID)
- func (m *ChatMutation) RemoveUserIDs(ids ...uuid.UUID)
- func (m *ChatMutation) RemovedEdges() []string
- func (m *ChatMutation) RemovedIDs(name string) []ent.Value
- func (m *ChatMutation) RemovedMessagesIDs() (ids []uuid.UUID)
- func (m *ChatMutation) RemovedUsersIDs() (ids []uuid.UUID)
- func (m *ChatMutation) ResetCreatedAt()
- func (m *ChatMutation) ResetCtype()
- func (m *ChatMutation) ResetDescription()
- func (m *ChatMutation) ResetEdge(name string) error
- func (m *ChatMutation) ResetField(name string) error
- func (m *ChatMutation) ResetImage()
- func (m *ChatMutation) ResetImageID()
- func (m *ChatMutation) ResetMessages()
- func (m *ChatMutation) ResetName()
- func (m *ChatMutation) ResetOwner()
- func (m *ChatMutation) ResetOwnerID()
- func (m *ChatMutation) ResetUpdatedAt()
- func (m *ChatMutation) ResetUsers()
- func (m *ChatMutation) SetCreatedAt(t time.Time)
- func (m *ChatMutation) SetCtype(c chat.Ctype)
- func (m *ChatMutation) SetDescription(s string)
- func (m *ChatMutation) SetField(name string, value ent.Value) error
- func (m *ChatMutation) SetID(id uuid.UUID)
- func (m *ChatMutation) SetImageID(u uuid.UUID)
- func (m *ChatMutation) SetName(s string)
- func (m *ChatMutation) SetOp(op Op)
- func (m *ChatMutation) SetOwnerID(u uuid.UUID)
- func (m *ChatMutation) SetUpdatedAt(t time.Time)
- func (m ChatMutation) Tx() (*Tx, error)
- func (m *ChatMutation) Type() string
- func (m *ChatMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ChatMutation) UsersCleared() bool
- func (m *ChatMutation) UsersIDs() (ids []uuid.UUID)
- func (m *ChatMutation) Where(ps ...predicate.Chat)
- func (m *ChatMutation) WhereP(ps ...func(*sql.Selector))
- type ChatQuery
- func (cq *ChatQuery) Aggregate(fns ...AggregateFunc) *ChatSelect
- func (cq *ChatQuery) All(ctx context.Context) ([]*Chat, error)
- func (cq *ChatQuery) AllX(ctx context.Context) []*Chat
- func (cq *ChatQuery) Clone() *ChatQuery
- func (cq *ChatQuery) Count(ctx context.Context) (int, error)
- func (cq *ChatQuery) CountX(ctx context.Context) int
- func (cq *ChatQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ChatQuery) ExistX(ctx context.Context) bool
- func (cq *ChatQuery) First(ctx context.Context) (*Chat, error)
- func (cq *ChatQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *ChatQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (cq *ChatQuery) FirstX(ctx context.Context) *Chat
- func (cq *ChatQuery) GroupBy(field string, fields ...string) *ChatGroupBy
- func (cq *ChatQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (cq *ChatQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cq *ChatQuery) Limit(limit int) *ChatQuery
- func (cq *ChatQuery) Offset(offset int) *ChatQuery
- func (cq *ChatQuery) Only(ctx context.Context) (*Chat, error)
- func (cq *ChatQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *ChatQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (cq *ChatQuery) OnlyX(ctx context.Context) *Chat
- func (cq *ChatQuery) Order(o ...chat.OrderOption) *ChatQuery
- func (cq *ChatQuery) QueryImage() *FileQuery
- func (cq *ChatQuery) QueryMessages() *MessageQuery
- func (cq *ChatQuery) QueryOwner() *UserQuery
- func (cq *ChatQuery) QueryUsers() *UserQuery
- func (cq *ChatQuery) Select(fields ...string) *ChatSelect
- func (cq *ChatQuery) Unique(unique bool) *ChatQuery
- func (cq *ChatQuery) Where(ps ...predicate.Chat) *ChatQuery
- func (cq *ChatQuery) WithImage(opts ...func(*FileQuery)) *ChatQuery
- func (cq *ChatQuery) WithMessages(opts ...func(*MessageQuery)) *ChatQuery
- func (cq *ChatQuery) WithOwner(opts ...func(*UserQuery)) *ChatQuery
- func (cq *ChatQuery) WithUsers(opts ...func(*UserQuery)) *ChatQuery
- type ChatSelect
- func (cs *ChatSelect) Aggregate(fns ...AggregateFunc) *ChatSelect
- func (s *ChatSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatSelect) BoolX(ctx context.Context) bool
- func (s *ChatSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatSelect) BoolsX(ctx context.Context) []bool
- func (s *ChatSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatSelect) Float64X(ctx context.Context) float64
- func (s *ChatSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatSelect) Float64sX(ctx context.Context) []float64
- func (s *ChatSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ChatSelect) IntX(ctx context.Context) int
- func (s *ChatSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ChatSelect) IntsX(ctx context.Context) []int
- func (cs *ChatSelect) Scan(ctx context.Context, v any) error
- func (s *ChatSelect) ScanX(ctx context.Context, v any)
- func (s *ChatSelect) String(ctx context.Context) (_ string, err error)
- func (s *ChatSelect) StringX(ctx context.Context) string
- func (s *ChatSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ChatSelect) StringsX(ctx context.Context) []string
- type ChatUpdate
- func (cu *ChatUpdate) AddMessageIDs(ids ...uuid.UUID) *ChatUpdate
- func (cu *ChatUpdate) AddMessages(m ...*Message) *ChatUpdate
- func (cu *ChatUpdate) AddUserIDs(ids ...uuid.UUID) *ChatUpdate
- func (cu *ChatUpdate) AddUsers(u ...*User) *ChatUpdate
- func (cu *ChatUpdate) ClearDescription() *ChatUpdate
- func (cu *ChatUpdate) ClearImage() *ChatUpdate
- func (cu *ChatUpdate) ClearImageID() *ChatUpdate
- func (cu *ChatUpdate) ClearMessages() *ChatUpdate
- func (cu *ChatUpdate) ClearName() *ChatUpdate
- func (cu *ChatUpdate) ClearOwner() *ChatUpdate
- func (cu *ChatUpdate) ClearUsers() *ChatUpdate
- func (cu *ChatUpdate) Exec(ctx context.Context) error
- func (cu *ChatUpdate) ExecX(ctx context.Context)
- func (cu *ChatUpdate) Mutation() *ChatMutation
- func (cu *ChatUpdate) RemoveMessageIDs(ids ...uuid.UUID) *ChatUpdate
- func (cu *ChatUpdate) RemoveMessages(m ...*Message) *ChatUpdate
- func (cu *ChatUpdate) RemoveUserIDs(ids ...uuid.UUID) *ChatUpdate
- func (cu *ChatUpdate) RemoveUsers(u ...*User) *ChatUpdate
- func (cu *ChatUpdate) Save(ctx context.Context) (int, error)
- func (cu *ChatUpdate) SaveX(ctx context.Context) int
- func (cu *ChatUpdate) SetCreatedAt(t time.Time) *ChatUpdate
- func (cu *ChatUpdate) SetCtype(c chat.Ctype) *ChatUpdate
- func (cu *ChatUpdate) SetDescription(s string) *ChatUpdate
- func (cu *ChatUpdate) SetImage(f *File) *ChatUpdate
- func (cu *ChatUpdate) SetImageID(u uuid.UUID) *ChatUpdate
- func (cu *ChatUpdate) SetName(s string) *ChatUpdate
- func (cu *ChatUpdate) SetNillableCreatedAt(t *time.Time) *ChatUpdate
- func (cu *ChatUpdate) SetNillableCtype(c *chat.Ctype) *ChatUpdate
- func (cu *ChatUpdate) SetNillableDescription(s *string) *ChatUpdate
- func (cu *ChatUpdate) SetNillableImageID(u *uuid.UUID) *ChatUpdate
- func (cu *ChatUpdate) SetNillableName(s *string) *ChatUpdate
- func (cu *ChatUpdate) SetNillableOwnerID(u *uuid.UUID) *ChatUpdate
- func (cu *ChatUpdate) SetOwner(u *User) *ChatUpdate
- func (cu *ChatUpdate) SetOwnerID(u uuid.UUID) *ChatUpdate
- func (cu *ChatUpdate) SetUpdatedAt(t time.Time) *ChatUpdate
- func (cu *ChatUpdate) Where(ps ...predicate.Chat) *ChatUpdate
- type ChatUpdateOne
- func (cuo *ChatUpdateOne) AddMessageIDs(ids ...uuid.UUID) *ChatUpdateOne
- func (cuo *ChatUpdateOne) AddMessages(m ...*Message) *ChatUpdateOne
- func (cuo *ChatUpdateOne) AddUserIDs(ids ...uuid.UUID) *ChatUpdateOne
- func (cuo *ChatUpdateOne) AddUsers(u ...*User) *ChatUpdateOne
- func (cuo *ChatUpdateOne) ClearDescription() *ChatUpdateOne
- func (cuo *ChatUpdateOne) ClearImage() *ChatUpdateOne
- func (cuo *ChatUpdateOne) ClearImageID() *ChatUpdateOne
- func (cuo *ChatUpdateOne) ClearMessages() *ChatUpdateOne
- func (cuo *ChatUpdateOne) ClearName() *ChatUpdateOne
- func (cuo *ChatUpdateOne) ClearOwner() *ChatUpdateOne
- func (cuo *ChatUpdateOne) ClearUsers() *ChatUpdateOne
- func (cuo *ChatUpdateOne) Exec(ctx context.Context) error
- func (cuo *ChatUpdateOne) ExecX(ctx context.Context)
- func (cuo *ChatUpdateOne) Mutation() *ChatMutation
- func (cuo *ChatUpdateOne) RemoveMessageIDs(ids ...uuid.UUID) *ChatUpdateOne
- func (cuo *ChatUpdateOne) RemoveMessages(m ...*Message) *ChatUpdateOne
- func (cuo *ChatUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *ChatUpdateOne
- func (cuo *ChatUpdateOne) RemoveUsers(u ...*User) *ChatUpdateOne
- func (cuo *ChatUpdateOne) Save(ctx context.Context) (*Chat, error)
- func (cuo *ChatUpdateOne) SaveX(ctx context.Context) *Chat
- func (cuo *ChatUpdateOne) Select(field string, fields ...string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetCreatedAt(t time.Time) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetCtype(c chat.Ctype) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetDescription(s string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetImage(f *File) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetImageID(u uuid.UUID) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetName(s string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableCreatedAt(t *time.Time) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableCtype(c *chat.Ctype) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableDescription(s *string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableImageID(u *uuid.UUID) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableName(s *string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableOwnerID(u *uuid.UUID) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetOwner(u *User) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetOwnerID(u uuid.UUID) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetUpdatedAt(t time.Time) *ChatUpdateOne
- func (cuo *ChatUpdateOne) Where(ps ...predicate.Chat) *ChatUpdateOne
- type Chats
- type Cities
- type City
- type CityClient
- func (c *CityClient) Create() *CityCreate
- func (c *CityClient) CreateBulk(builders ...*CityCreate) *CityCreateBulk
- func (c *CityClient) Delete() *CityDelete
- func (c *CityClient) DeleteOne(ci *City) *CityDeleteOne
- func (c *CityClient) DeleteOneID(id uuid.UUID) *CityDeleteOne
- func (c *CityClient) Get(ctx context.Context, id uuid.UUID) (*City, error)
- func (c *CityClient) GetX(ctx context.Context, id uuid.UUID) *City
- func (c *CityClient) Hooks() []Hook
- func (c *CityClient) Intercept(interceptors ...Interceptor)
- func (c *CityClient) Interceptors() []Interceptor
- func (c *CityClient) MapCreateBulk(slice any, setFunc func(*CityCreate, int)) *CityCreateBulk
- func (c *CityClient) Query() *CityQuery
- func (c *CityClient) QueryCountry(ci *City) *CountryQuery
- func (c *CityClient) QueryRegion(ci *City) *RegionQuery
- func (c *CityClient) QueryUsers(ci *City) *UserQuery
- func (c *CityClient) Update() *CityUpdate
- func (c *CityClient) UpdateOne(ci *City) *CityUpdateOne
- func (c *CityClient) UpdateOneID(id uuid.UUID) *CityUpdateOne
- func (c *CityClient) Use(hooks ...Hook)
- type CityCreate
- func (cc *CityCreate) AddUserIDs(ids ...uuid.UUID) *CityCreate
- func (cc *CityCreate) AddUsers(u ...*User) *CityCreate
- func (cc *CityCreate) Exec(ctx context.Context) error
- func (cc *CityCreate) ExecX(ctx context.Context)
- func (cc *CityCreate) Mutation() *CityMutation
- func (cc *CityCreate) Save(ctx context.Context) (*City, error)
- func (cc *CityCreate) SaveX(ctx context.Context) *City
- func (cc *CityCreate) SetCountry(c *Country) *CityCreate
- func (cc *CityCreate) SetCountryID(u uuid.UUID) *CityCreate
- func (cc *CityCreate) SetCreatedAt(t time.Time) *CityCreate
- func (cc *CityCreate) SetID(u uuid.UUID) *CityCreate
- func (cc *CityCreate) SetName(s string) *CityCreate
- func (cc *CityCreate) SetNillableCreatedAt(t *time.Time) *CityCreate
- func (cc *CityCreate) SetNillableID(u *uuid.UUID) *CityCreate
- func (cc *CityCreate) SetNillableRegionID(u *uuid.UUID) *CityCreate
- func (cc *CityCreate) SetNillableUpdatedAt(t *time.Time) *CityCreate
- func (cc *CityCreate) SetRegion(r *Region) *CityCreate
- func (cc *CityCreate) SetRegionID(u uuid.UUID) *CityCreate
- func (cc *CityCreate) SetUpdatedAt(t time.Time) *CityCreate
- type CityCreateBulk
- type CityDelete
- type CityDeleteOne
- type CityEdges
- type CityGroupBy
- func (cgb *CityGroupBy) Aggregate(fns ...AggregateFunc) *CityGroupBy
- func (s *CityGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CityGroupBy) BoolX(ctx context.Context) bool
- func (s *CityGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CityGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CityGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CityGroupBy) Float64X(ctx context.Context) float64
- func (s *CityGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CityGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CityGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CityGroupBy) IntX(ctx context.Context) int
- func (s *CityGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CityGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CityGroupBy) Scan(ctx context.Context, v any) error
- func (s *CityGroupBy) ScanX(ctx context.Context, v any)
- func (s *CityGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CityGroupBy) StringX(ctx context.Context) string
- func (s *CityGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CityGroupBy) StringsX(ctx context.Context) []string
- type CityMutation
- func (m *CityMutation) AddField(name string, value ent.Value) error
- func (m *CityMutation) AddUserIDs(ids ...uuid.UUID)
- func (m *CityMutation) AddedEdges() []string
- func (m *CityMutation) AddedField(name string) (ent.Value, bool)
- func (m *CityMutation) AddedFields() []string
- func (m *CityMutation) AddedIDs(name string) []ent.Value
- func (m *CityMutation) ClearCountry()
- func (m *CityMutation) ClearEdge(name string) error
- func (m *CityMutation) ClearField(name string) error
- func (m *CityMutation) ClearRegion()
- func (m *CityMutation) ClearRegionID()
- func (m *CityMutation) ClearUsers()
- func (m *CityMutation) ClearedEdges() []string
- func (m *CityMutation) ClearedFields() []string
- func (m CityMutation) Client() *Client
- func (m *CityMutation) CountryCleared() bool
- func (m *CityMutation) CountryID() (r uuid.UUID, exists bool)
- func (m *CityMutation) CountryIDs() (ids []uuid.UUID)
- func (m *CityMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CityMutation) EdgeCleared(name string) bool
- func (m *CityMutation) Field(name string) (ent.Value, bool)
- func (m *CityMutation) FieldCleared(name string) bool
- func (m *CityMutation) Fields() []string
- func (m *CityMutation) ID() (id uuid.UUID, exists bool)
- func (m *CityMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CityMutation) Name() (r string, exists bool)
- func (m *CityMutation) OldCountryID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CityMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CityMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CityMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CityMutation) OldRegionID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *CityMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CityMutation) Op() Op
- func (m *CityMutation) RegionCleared() bool
- func (m *CityMutation) RegionID() (r uuid.UUID, exists bool)
- func (m *CityMutation) RegionIDCleared() bool
- func (m *CityMutation) RegionIDs() (ids []uuid.UUID)
- func (m *CityMutation) RemoveUserIDs(ids ...uuid.UUID)
- func (m *CityMutation) RemovedEdges() []string
- func (m *CityMutation) RemovedIDs(name string) []ent.Value
- func (m *CityMutation) RemovedUsersIDs() (ids []uuid.UUID)
- func (m *CityMutation) ResetCountry()
- func (m *CityMutation) ResetCountryID()
- func (m *CityMutation) ResetCreatedAt()
- func (m *CityMutation) ResetEdge(name string) error
- func (m *CityMutation) ResetField(name string) error
- func (m *CityMutation) ResetName()
- func (m *CityMutation) ResetRegion()
- func (m *CityMutation) ResetRegionID()
- func (m *CityMutation) ResetUpdatedAt()
- func (m *CityMutation) ResetUsers()
- func (m *CityMutation) SetCountryID(u uuid.UUID)
- func (m *CityMutation) SetCreatedAt(t time.Time)
- func (m *CityMutation) SetField(name string, value ent.Value) error
- func (m *CityMutation) SetID(id uuid.UUID)
- func (m *CityMutation) SetName(s string)
- func (m *CityMutation) SetOp(op Op)
- func (m *CityMutation) SetRegionID(u uuid.UUID)
- func (m *CityMutation) SetUpdatedAt(t time.Time)
- func (m CityMutation) Tx() (*Tx, error)
- func (m *CityMutation) Type() string
- func (m *CityMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CityMutation) UsersCleared() bool
- func (m *CityMutation) UsersIDs() (ids []uuid.UUID)
- func (m *CityMutation) Where(ps ...predicate.City)
- func (m *CityMutation) WhereP(ps ...func(*sql.Selector))
- type CityQuery
- func (cq *CityQuery) Aggregate(fns ...AggregateFunc) *CitySelect
- func (cq *CityQuery) All(ctx context.Context) ([]*City, error)
- func (cq *CityQuery) AllX(ctx context.Context) []*City
- func (cq *CityQuery) Clone() *CityQuery
- func (cq *CityQuery) Count(ctx context.Context) (int, error)
- func (cq *CityQuery) CountX(ctx context.Context) int
- func (cq *CityQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CityQuery) ExistX(ctx context.Context) bool
- func (cq *CityQuery) First(ctx context.Context) (*City, error)
- func (cq *CityQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *CityQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (cq *CityQuery) FirstX(ctx context.Context) *City
- func (cq *CityQuery) GroupBy(field string, fields ...string) *CityGroupBy
- func (cq *CityQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (cq *CityQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cq *CityQuery) Limit(limit int) *CityQuery
- func (cq *CityQuery) Offset(offset int) *CityQuery
- func (cq *CityQuery) Only(ctx context.Context) (*City, error)
- func (cq *CityQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *CityQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (cq *CityQuery) OnlyX(ctx context.Context) *City
- func (cq *CityQuery) Order(o ...city.OrderOption) *CityQuery
- func (cq *CityQuery) QueryCountry() *CountryQuery
- func (cq *CityQuery) QueryRegion() *RegionQuery
- func (cq *CityQuery) QueryUsers() *UserQuery
- func (cq *CityQuery) Select(fields ...string) *CitySelect
- func (cq *CityQuery) Unique(unique bool) *CityQuery
- func (cq *CityQuery) Where(ps ...predicate.City) *CityQuery
- func (cq *CityQuery) WithCountry(opts ...func(*CountryQuery)) *CityQuery
- func (cq *CityQuery) WithRegion(opts ...func(*RegionQuery)) *CityQuery
- func (cq *CityQuery) WithUsers(opts ...func(*UserQuery)) *CityQuery
- type CitySelect
- func (cs *CitySelect) Aggregate(fns ...AggregateFunc) *CitySelect
- func (s *CitySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CitySelect) BoolX(ctx context.Context) bool
- func (s *CitySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CitySelect) BoolsX(ctx context.Context) []bool
- func (s *CitySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CitySelect) Float64X(ctx context.Context) float64
- func (s *CitySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CitySelect) Float64sX(ctx context.Context) []float64
- func (s *CitySelect) Int(ctx context.Context) (_ int, err error)
- func (s *CitySelect) IntX(ctx context.Context) int
- func (s *CitySelect) Ints(ctx context.Context) ([]int, error)
- func (s *CitySelect) IntsX(ctx context.Context) []int
- func (cs *CitySelect) Scan(ctx context.Context, v any) error
- func (s *CitySelect) ScanX(ctx context.Context, v any)
- func (s *CitySelect) String(ctx context.Context) (_ string, err error)
- func (s *CitySelect) StringX(ctx context.Context) string
- func (s *CitySelect) Strings(ctx context.Context) ([]string, error)
- func (s *CitySelect) StringsX(ctx context.Context) []string
- type CityUpdate
- func (cu *CityUpdate) AddUserIDs(ids ...uuid.UUID) *CityUpdate
- func (cu *CityUpdate) AddUsers(u ...*User) *CityUpdate
- func (cu *CityUpdate) ClearCountry() *CityUpdate
- func (cu *CityUpdate) ClearRegion() *CityUpdate
- func (cu *CityUpdate) ClearRegionID() *CityUpdate
- func (cu *CityUpdate) ClearUsers() *CityUpdate
- func (cu *CityUpdate) Exec(ctx context.Context) error
- func (cu *CityUpdate) ExecX(ctx context.Context)
- func (cu *CityUpdate) Mutation() *CityMutation
- func (cu *CityUpdate) RemoveUserIDs(ids ...uuid.UUID) *CityUpdate
- func (cu *CityUpdate) RemoveUsers(u ...*User) *CityUpdate
- func (cu *CityUpdate) Save(ctx context.Context) (int, error)
- func (cu *CityUpdate) SaveX(ctx context.Context) int
- func (cu *CityUpdate) SetCountry(c *Country) *CityUpdate
- func (cu *CityUpdate) SetCountryID(u uuid.UUID) *CityUpdate
- func (cu *CityUpdate) SetCreatedAt(t time.Time) *CityUpdate
- func (cu *CityUpdate) SetName(s string) *CityUpdate
- func (cu *CityUpdate) SetNillableCountryID(u *uuid.UUID) *CityUpdate
- func (cu *CityUpdate) SetNillableCreatedAt(t *time.Time) *CityUpdate
- func (cu *CityUpdate) SetNillableName(s *string) *CityUpdate
- func (cu *CityUpdate) SetNillableRegionID(u *uuid.UUID) *CityUpdate
- func (cu *CityUpdate) SetRegion(r *Region) *CityUpdate
- func (cu *CityUpdate) SetRegionID(u uuid.UUID) *CityUpdate
- func (cu *CityUpdate) SetUpdatedAt(t time.Time) *CityUpdate
- func (cu *CityUpdate) Where(ps ...predicate.City) *CityUpdate
- type CityUpdateOne
- func (cuo *CityUpdateOne) AddUserIDs(ids ...uuid.UUID) *CityUpdateOne
- func (cuo *CityUpdateOne) AddUsers(u ...*User) *CityUpdateOne
- func (cuo *CityUpdateOne) ClearCountry() *CityUpdateOne
- func (cuo *CityUpdateOne) ClearRegion() *CityUpdateOne
- func (cuo *CityUpdateOne) ClearRegionID() *CityUpdateOne
- func (cuo *CityUpdateOne) ClearUsers() *CityUpdateOne
- func (cuo *CityUpdateOne) Exec(ctx context.Context) error
- func (cuo *CityUpdateOne) ExecX(ctx context.Context)
- func (cuo *CityUpdateOne) Mutation() *CityMutation
- func (cuo *CityUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *CityUpdateOne
- func (cuo *CityUpdateOne) RemoveUsers(u ...*User) *CityUpdateOne
- func (cuo *CityUpdateOne) Save(ctx context.Context) (*City, error)
- func (cuo *CityUpdateOne) SaveX(ctx context.Context) *City
- func (cuo *CityUpdateOne) Select(field string, fields ...string) *CityUpdateOne
- func (cuo *CityUpdateOne) SetCountry(c *Country) *CityUpdateOne
- func (cuo *CityUpdateOne) SetCountryID(u uuid.UUID) *CityUpdateOne
- func (cuo *CityUpdateOne) SetCreatedAt(t time.Time) *CityUpdateOne
- func (cuo *CityUpdateOne) SetName(s string) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableCountryID(u *uuid.UUID) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableCreatedAt(t *time.Time) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableName(s *string) *CityUpdateOne
- func (cuo *CityUpdateOne) SetNillableRegionID(u *uuid.UUID) *CityUpdateOne
- func (cuo *CityUpdateOne) SetRegion(r *Region) *CityUpdateOne
- func (cuo *CityUpdateOne) SetRegionID(u uuid.UUID) *CityUpdateOne
- func (cuo *CityUpdateOne) SetUpdatedAt(t time.Time) *CityUpdateOne
- func (cuo *CityUpdateOne) Where(ps ...predicate.City) *CityUpdateOne
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type Comment
- func (c *Comment) QueryAuthor() *UserQuery
- func (c *Comment) QueryNotifications() *NotificationQuery
- func (c *Comment) QueryPost() *PostQuery
- func (c *Comment) QueryReactions() *ReactionQuery
- func (c *Comment) QueryReplies() *ReplyQuery
- func (c *Comment) String() string
- func (c *Comment) Unwrap() *Comment
- func (c *Comment) Update() *CommentUpdateOne
- func (c *Comment) Value(name string) (ent.Value, error)
- type CommentClient
- func (c *CommentClient) Create() *CommentCreate
- func (c *CommentClient) CreateBulk(builders ...*CommentCreate) *CommentCreateBulk
- func (c *CommentClient) Delete() *CommentDelete
- func (c *CommentClient) DeleteOne(co *Comment) *CommentDeleteOne
- func (c *CommentClient) DeleteOneID(id uuid.UUID) *CommentDeleteOne
- func (c *CommentClient) Get(ctx context.Context, id uuid.UUID) (*Comment, error)
- func (c *CommentClient) GetX(ctx context.Context, id uuid.UUID) *Comment
- func (c *CommentClient) Hooks() []Hook
- func (c *CommentClient) Intercept(interceptors ...Interceptor)
- func (c *CommentClient) Interceptors() []Interceptor
- func (c *CommentClient) MapCreateBulk(slice any, setFunc func(*CommentCreate, int)) *CommentCreateBulk
- func (c *CommentClient) Query() *CommentQuery
- func (c *CommentClient) QueryAuthor(co *Comment) *UserQuery
- func (c *CommentClient) QueryNotifications(co *Comment) *NotificationQuery
- func (c *CommentClient) QueryPost(co *Comment) *PostQuery
- func (c *CommentClient) QueryReactions(co *Comment) *ReactionQuery
- func (c *CommentClient) QueryReplies(co *Comment) *ReplyQuery
- func (c *CommentClient) Update() *CommentUpdate
- func (c *CommentClient) UpdateOne(co *Comment) *CommentUpdateOne
- func (c *CommentClient) UpdateOneID(id uuid.UUID) *CommentUpdateOne
- func (c *CommentClient) Use(hooks ...Hook)
- type CommentCreate
- func (cc *CommentCreate) AddNotificationIDs(ids ...uuid.UUID) *CommentCreate
- func (cc *CommentCreate) AddNotifications(n ...*Notification) *CommentCreate
- func (cc *CommentCreate) AddReactionIDs(ids ...uuid.UUID) *CommentCreate
- func (cc *CommentCreate) AddReactions(r ...*Reaction) *CommentCreate
- func (cc *CommentCreate) AddReplies(r ...*Reply) *CommentCreate
- func (cc *CommentCreate) AddReplyIDs(ids ...uuid.UUID) *CommentCreate
- func (cc *CommentCreate) Exec(ctx context.Context) error
- func (cc *CommentCreate) ExecX(ctx context.Context)
- func (cc *CommentCreate) Mutation() *CommentMutation
- func (cc *CommentCreate) Save(ctx context.Context) (*Comment, error)
- func (cc *CommentCreate) SaveX(ctx context.Context) *Comment
- func (cc *CommentCreate) SetAuthor(u *User) *CommentCreate
- func (cc *CommentCreate) SetAuthorID(u uuid.UUID) *CommentCreate
- func (cc *CommentCreate) SetCreatedAt(t time.Time) *CommentCreate
- func (cc *CommentCreate) SetID(u uuid.UUID) *CommentCreate
- func (cc *CommentCreate) SetNillableCreatedAt(t *time.Time) *CommentCreate
- func (cc *CommentCreate) SetNillableID(u *uuid.UUID) *CommentCreate
- func (cc *CommentCreate) SetNillableUpdatedAt(t *time.Time) *CommentCreate
- func (cc *CommentCreate) SetPost(p *Post) *CommentCreate
- func (cc *CommentCreate) SetPostID(u uuid.UUID) *CommentCreate
- func (cc *CommentCreate) SetSlug(s string) *CommentCreate
- func (cc *CommentCreate) SetText(s string) *CommentCreate
- func (cc *CommentCreate) SetUpdatedAt(t time.Time) *CommentCreate
- type CommentCreateBulk
- type CommentDelete
- type CommentDeleteOne
- type CommentEdges
- type CommentGroupBy
- func (cgb *CommentGroupBy) Aggregate(fns ...AggregateFunc) *CommentGroupBy
- func (s *CommentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CommentGroupBy) BoolX(ctx context.Context) bool
- func (s *CommentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CommentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CommentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CommentGroupBy) Float64X(ctx context.Context) float64
- func (s *CommentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CommentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CommentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CommentGroupBy) IntX(ctx context.Context) int
- func (s *CommentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CommentGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CommentGroupBy) Scan(ctx context.Context, v any) error
- func (s *CommentGroupBy) ScanX(ctx context.Context, v any)
- func (s *CommentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CommentGroupBy) StringX(ctx context.Context) string
- func (s *CommentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CommentGroupBy) StringsX(ctx context.Context) []string
- type CommentMutation
- func (m *CommentMutation) AddField(name string, value ent.Value) error
- func (m *CommentMutation) AddNotificationIDs(ids ...uuid.UUID)
- func (m *CommentMutation) AddReactionIDs(ids ...uuid.UUID)
- func (m *CommentMutation) AddReplyIDs(ids ...uuid.UUID)
- func (m *CommentMutation) AddedEdges() []string
- func (m *CommentMutation) AddedField(name string) (ent.Value, bool)
- func (m *CommentMutation) AddedFields() []string
- func (m *CommentMutation) AddedIDs(name string) []ent.Value
- func (m *CommentMutation) AuthorCleared() bool
- func (m *CommentMutation) AuthorID() (r uuid.UUID, exists bool)
- func (m *CommentMutation) AuthorIDs() (ids []uuid.UUID)
- func (m *CommentMutation) ClearAuthor()
- func (m *CommentMutation) ClearEdge(name string) error
- func (m *CommentMutation) ClearField(name string) error
- func (m *CommentMutation) ClearNotifications()
- func (m *CommentMutation) ClearPost()
- func (m *CommentMutation) ClearReactions()
- func (m *CommentMutation) ClearReplies()
- func (m *CommentMutation) ClearedEdges() []string
- func (m *CommentMutation) ClearedFields() []string
- func (m CommentMutation) Client() *Client
- func (m *CommentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CommentMutation) EdgeCleared(name string) bool
- func (m *CommentMutation) Field(name string) (ent.Value, bool)
- func (m *CommentMutation) FieldCleared(name string) bool
- func (m *CommentMutation) Fields() []string
- func (m *CommentMutation) ID() (id uuid.UUID, exists bool)
- func (m *CommentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CommentMutation) NotificationsCleared() bool
- func (m *CommentMutation) NotificationsIDs() (ids []uuid.UUID)
- func (m *CommentMutation) OldAuthorID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CommentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CommentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CommentMutation) OldPostID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CommentMutation) OldSlug(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldText(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CommentMutation) Op() Op
- func (m *CommentMutation) PostCleared() bool
- func (m *CommentMutation) PostID() (r uuid.UUID, exists bool)
- func (m *CommentMutation) PostIDs() (ids []uuid.UUID)
- func (m *CommentMutation) ReactionsCleared() bool
- func (m *CommentMutation) ReactionsIDs() (ids []uuid.UUID)
- func (m *CommentMutation) RemoveNotificationIDs(ids ...uuid.UUID)
- func (m *CommentMutation) RemoveReactionIDs(ids ...uuid.UUID)
- func (m *CommentMutation) RemoveReplyIDs(ids ...uuid.UUID)
- func (m *CommentMutation) RemovedEdges() []string
- func (m *CommentMutation) RemovedIDs(name string) []ent.Value
- func (m *CommentMutation) RemovedNotificationsIDs() (ids []uuid.UUID)
- func (m *CommentMutation) RemovedReactionsIDs() (ids []uuid.UUID)
- func (m *CommentMutation) RemovedRepliesIDs() (ids []uuid.UUID)
- func (m *CommentMutation) RepliesCleared() bool
- func (m *CommentMutation) RepliesIDs() (ids []uuid.UUID)
- func (m *CommentMutation) ResetAuthor()
- func (m *CommentMutation) ResetAuthorID()
- func (m *CommentMutation) ResetCreatedAt()
- func (m *CommentMutation) ResetEdge(name string) error
- func (m *CommentMutation) ResetField(name string) error
- func (m *CommentMutation) ResetNotifications()
- func (m *CommentMutation) ResetPost()
- func (m *CommentMutation) ResetPostID()
- func (m *CommentMutation) ResetReactions()
- func (m *CommentMutation) ResetReplies()
- func (m *CommentMutation) ResetSlug()
- func (m *CommentMutation) ResetText()
- func (m *CommentMutation) ResetUpdatedAt()
- func (m *CommentMutation) SetAuthorID(u uuid.UUID)
- func (m *CommentMutation) SetCreatedAt(t time.Time)
- func (m *CommentMutation) SetField(name string, value ent.Value) error
- func (m *CommentMutation) SetID(id uuid.UUID)
- func (m *CommentMutation) SetOp(op Op)
- func (m *CommentMutation) SetPostID(u uuid.UUID)
- func (m *CommentMutation) SetSlug(s string)
- func (m *CommentMutation) SetText(s string)
- func (m *CommentMutation) SetUpdatedAt(t time.Time)
- func (m *CommentMutation) Slug() (r string, exists bool)
- func (m *CommentMutation) Text() (r string, exists bool)
- func (m CommentMutation) Tx() (*Tx, error)
- func (m *CommentMutation) Type() string
- func (m *CommentMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CommentMutation) Where(ps ...predicate.Comment)
- func (m *CommentMutation) WhereP(ps ...func(*sql.Selector))
- type CommentQuery
- func (cq *CommentQuery) Aggregate(fns ...AggregateFunc) *CommentSelect
- func (cq *CommentQuery) All(ctx context.Context) ([]*Comment, error)
- func (cq *CommentQuery) AllX(ctx context.Context) []*Comment
- func (cq *CommentQuery) Clone() *CommentQuery
- func (cq *CommentQuery) Count(ctx context.Context) (int, error)
- func (cq *CommentQuery) CountX(ctx context.Context) int
- func (cq *CommentQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CommentQuery) ExistX(ctx context.Context) bool
- func (cq *CommentQuery) First(ctx context.Context) (*Comment, error)
- func (cq *CommentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *CommentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (cq *CommentQuery) FirstX(ctx context.Context) *Comment
- func (cq *CommentQuery) GroupBy(field string, fields ...string) *CommentGroupBy
- func (cq *CommentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (cq *CommentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cq *CommentQuery) Limit(limit int) *CommentQuery
- func (cq *CommentQuery) Offset(offset int) *CommentQuery
- func (cq *CommentQuery) Only(ctx context.Context) (*Comment, error)
- func (cq *CommentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *CommentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (cq *CommentQuery) OnlyX(ctx context.Context) *Comment
- func (cq *CommentQuery) Order(o ...comment.OrderOption) *CommentQuery
- func (cq *CommentQuery) QueryAuthor() *UserQuery
- func (cq *CommentQuery) QueryNotifications() *NotificationQuery
- func (cq *CommentQuery) QueryPost() *PostQuery
- func (cq *CommentQuery) QueryReactions() *ReactionQuery
- func (cq *CommentQuery) QueryReplies() *ReplyQuery
- func (cq *CommentQuery) Select(fields ...string) *CommentSelect
- func (cq *CommentQuery) Unique(unique bool) *CommentQuery
- func (cq *CommentQuery) Where(ps ...predicate.Comment) *CommentQuery
- func (cq *CommentQuery) WithAuthor(opts ...func(*UserQuery)) *CommentQuery
- func (cq *CommentQuery) WithNotifications(opts ...func(*NotificationQuery)) *CommentQuery
- func (cq *CommentQuery) WithPost(opts ...func(*PostQuery)) *CommentQuery
- func (cq *CommentQuery) WithReactions(opts ...func(*ReactionQuery)) *CommentQuery
- func (cq *CommentQuery) WithReplies(opts ...func(*ReplyQuery)) *CommentQuery
- type CommentSelect
- func (cs *CommentSelect) Aggregate(fns ...AggregateFunc) *CommentSelect
- func (s *CommentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CommentSelect) BoolX(ctx context.Context) bool
- func (s *CommentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CommentSelect) BoolsX(ctx context.Context) []bool
- func (s *CommentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CommentSelect) Float64X(ctx context.Context) float64
- func (s *CommentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CommentSelect) Float64sX(ctx context.Context) []float64
- func (s *CommentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CommentSelect) IntX(ctx context.Context) int
- func (s *CommentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CommentSelect) IntsX(ctx context.Context) []int
- func (cs *CommentSelect) Scan(ctx context.Context, v any) error
- func (s *CommentSelect) ScanX(ctx context.Context, v any)
- func (s *CommentSelect) String(ctx context.Context) (_ string, err error)
- func (s *CommentSelect) StringX(ctx context.Context) string
- func (s *CommentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CommentSelect) StringsX(ctx context.Context) []string
- type CommentUpdate
- func (cu *CommentUpdate) AddNotificationIDs(ids ...uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) AddNotifications(n ...*Notification) *CommentUpdate
- func (cu *CommentUpdate) AddReactionIDs(ids ...uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) AddReactions(r ...*Reaction) *CommentUpdate
- func (cu *CommentUpdate) AddReplies(r ...*Reply) *CommentUpdate
- func (cu *CommentUpdate) AddReplyIDs(ids ...uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) ClearAuthor() *CommentUpdate
- func (cu *CommentUpdate) ClearNotifications() *CommentUpdate
- func (cu *CommentUpdate) ClearPost() *CommentUpdate
- func (cu *CommentUpdate) ClearReactions() *CommentUpdate
- func (cu *CommentUpdate) ClearReplies() *CommentUpdate
- func (cu *CommentUpdate) Exec(ctx context.Context) error
- func (cu *CommentUpdate) ExecX(ctx context.Context)
- func (cu *CommentUpdate) Mutation() *CommentMutation
- func (cu *CommentUpdate) RemoveNotificationIDs(ids ...uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) RemoveNotifications(n ...*Notification) *CommentUpdate
- func (cu *CommentUpdate) RemoveReactionIDs(ids ...uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) RemoveReactions(r ...*Reaction) *CommentUpdate
- func (cu *CommentUpdate) RemoveReplies(r ...*Reply) *CommentUpdate
- func (cu *CommentUpdate) RemoveReplyIDs(ids ...uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) Save(ctx context.Context) (int, error)
- func (cu *CommentUpdate) SaveX(ctx context.Context) int
- func (cu *CommentUpdate) SetAuthor(u *User) *CommentUpdate
- func (cu *CommentUpdate) SetAuthorID(u uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) SetCreatedAt(t time.Time) *CommentUpdate
- func (cu *CommentUpdate) SetNillableAuthorID(u *uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) SetNillableCreatedAt(t *time.Time) *CommentUpdate
- func (cu *CommentUpdate) SetNillablePostID(u *uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) SetNillableSlug(s *string) *CommentUpdate
- func (cu *CommentUpdate) SetNillableText(s *string) *CommentUpdate
- func (cu *CommentUpdate) SetPost(p *Post) *CommentUpdate
- func (cu *CommentUpdate) SetPostID(u uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) SetSlug(s string) *CommentUpdate
- func (cu *CommentUpdate) SetText(s string) *CommentUpdate
- func (cu *CommentUpdate) SetUpdatedAt(t time.Time) *CommentUpdate
- func (cu *CommentUpdate) Where(ps ...predicate.Comment) *CommentUpdate
- type CommentUpdateOne
- func (cuo *CommentUpdateOne) AddNotificationIDs(ids ...uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddNotifications(n ...*Notification) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddReactionIDs(ids ...uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddReactions(r ...*Reaction) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddReplies(r ...*Reply) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddReplyIDs(ids ...uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearAuthor() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearNotifications() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearPost() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearReactions() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearReplies() *CommentUpdateOne
- func (cuo *CommentUpdateOne) Exec(ctx context.Context) error
- func (cuo *CommentUpdateOne) ExecX(ctx context.Context)
- func (cuo *CommentUpdateOne) Mutation() *CommentMutation
- func (cuo *CommentUpdateOne) RemoveNotificationIDs(ids ...uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) RemoveNotifications(n ...*Notification) *CommentUpdateOne
- func (cuo *CommentUpdateOne) RemoveReactionIDs(ids ...uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) RemoveReactions(r ...*Reaction) *CommentUpdateOne
- func (cuo *CommentUpdateOne) RemoveReplies(r ...*Reply) *CommentUpdateOne
- func (cuo *CommentUpdateOne) RemoveReplyIDs(ids ...uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) Save(ctx context.Context) (*Comment, error)
- func (cuo *CommentUpdateOne) SaveX(ctx context.Context) *Comment
- func (cuo *CommentUpdateOne) Select(field string, fields ...string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetAuthor(u *User) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetAuthorID(u uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetCreatedAt(t time.Time) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableAuthorID(u *uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableCreatedAt(t *time.Time) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillablePostID(u *uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableSlug(s *string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableText(s *string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetPost(p *Post) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetPostID(u uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetSlug(s string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetText(s string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetUpdatedAt(t time.Time) *CommentUpdateOne
- func (cuo *CommentUpdateOne) Where(ps ...predicate.Comment) *CommentUpdateOne
- type Comments
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Countries
- type Country
- type CountryClient
- func (c *CountryClient) Create() *CountryCreate
- func (c *CountryClient) CreateBulk(builders ...*CountryCreate) *CountryCreateBulk
- func (c *CountryClient) Delete() *CountryDelete
- func (c *CountryClient) DeleteOne(co *Country) *CountryDeleteOne
- func (c *CountryClient) DeleteOneID(id uuid.UUID) *CountryDeleteOne
- func (c *CountryClient) Get(ctx context.Context, id uuid.UUID) (*Country, error)
- func (c *CountryClient) GetX(ctx context.Context, id uuid.UUID) *Country
- func (c *CountryClient) Hooks() []Hook
- func (c *CountryClient) Intercept(interceptors ...Interceptor)
- func (c *CountryClient) Interceptors() []Interceptor
- func (c *CountryClient) MapCreateBulk(slice any, setFunc func(*CountryCreate, int)) *CountryCreateBulk
- func (c *CountryClient) Query() *CountryQuery
- func (c *CountryClient) QueryCities(co *Country) *CityQuery
- func (c *CountryClient) QueryRegions(co *Country) *RegionQuery
- func (c *CountryClient) Update() *CountryUpdate
- func (c *CountryClient) UpdateOne(co *Country) *CountryUpdateOne
- func (c *CountryClient) UpdateOneID(id uuid.UUID) *CountryUpdateOne
- func (c *CountryClient) Use(hooks ...Hook)
- type CountryCreate
- func (cc *CountryCreate) AddCities(c ...*City) *CountryCreate
- func (cc *CountryCreate) AddCityIDs(ids ...uuid.UUID) *CountryCreate
- func (cc *CountryCreate) AddRegionIDs(ids ...uuid.UUID) *CountryCreate
- func (cc *CountryCreate) AddRegions(r ...*Region) *CountryCreate
- func (cc *CountryCreate) Exec(ctx context.Context) error
- func (cc *CountryCreate) ExecX(ctx context.Context)
- func (cc *CountryCreate) Mutation() *CountryMutation
- func (cc *CountryCreate) Save(ctx context.Context) (*Country, error)
- func (cc *CountryCreate) SaveX(ctx context.Context) *Country
- func (cc *CountryCreate) SetCode(s string) *CountryCreate
- func (cc *CountryCreate) SetCreatedAt(t time.Time) *CountryCreate
- func (cc *CountryCreate) SetID(u uuid.UUID) *CountryCreate
- func (cc *CountryCreate) SetName(s string) *CountryCreate
- func (cc *CountryCreate) SetNillableCreatedAt(t *time.Time) *CountryCreate
- func (cc *CountryCreate) SetNillableID(u *uuid.UUID) *CountryCreate
- func (cc *CountryCreate) SetNillableUpdatedAt(t *time.Time) *CountryCreate
- func (cc *CountryCreate) SetUpdatedAt(t time.Time) *CountryCreate
- type CountryCreateBulk
- type CountryDelete
- type CountryDeleteOne
- type CountryEdges
- type CountryGroupBy
- func (cgb *CountryGroupBy) Aggregate(fns ...AggregateFunc) *CountryGroupBy
- func (s *CountryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CountryGroupBy) BoolX(ctx context.Context) bool
- func (s *CountryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CountryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CountryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CountryGroupBy) Float64X(ctx context.Context) float64
- func (s *CountryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CountryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CountryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CountryGroupBy) IntX(ctx context.Context) int
- func (s *CountryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CountryGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CountryGroupBy) Scan(ctx context.Context, v any) error
- func (s *CountryGroupBy) ScanX(ctx context.Context, v any)
- func (s *CountryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CountryGroupBy) StringX(ctx context.Context) string
- func (s *CountryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CountryGroupBy) StringsX(ctx context.Context) []string
- type CountryMutation
- func (m *CountryMutation) AddCityIDs(ids ...uuid.UUID)
- func (m *CountryMutation) AddField(name string, value ent.Value) error
- func (m *CountryMutation) AddRegionIDs(ids ...uuid.UUID)
- func (m *CountryMutation) AddedEdges() []string
- func (m *CountryMutation) AddedField(name string) (ent.Value, bool)
- func (m *CountryMutation) AddedFields() []string
- func (m *CountryMutation) AddedIDs(name string) []ent.Value
- func (m *CountryMutation) CitiesCleared() bool
- func (m *CountryMutation) CitiesIDs() (ids []uuid.UUID)
- func (m *CountryMutation) ClearCities()
- func (m *CountryMutation) ClearEdge(name string) error
- func (m *CountryMutation) ClearField(name string) error
- func (m *CountryMutation) ClearRegions()
- func (m *CountryMutation) ClearedEdges() []string
- func (m *CountryMutation) ClearedFields() []string
- func (m CountryMutation) Client() *Client
- func (m *CountryMutation) Code() (r string, exists bool)
- func (m *CountryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CountryMutation) EdgeCleared(name string) bool
- func (m *CountryMutation) Field(name string) (ent.Value, bool)
- func (m *CountryMutation) FieldCleared(name string) bool
- func (m *CountryMutation) Fields() []string
- func (m *CountryMutation) ID() (id uuid.UUID, exists bool)
- func (m *CountryMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CountryMutation) Name() (r string, exists bool)
- func (m *CountryMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *CountryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CountryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CountryMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CountryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CountryMutation) Op() Op
- func (m *CountryMutation) RegionsCleared() bool
- func (m *CountryMutation) RegionsIDs() (ids []uuid.UUID)
- func (m *CountryMutation) RemoveCityIDs(ids ...uuid.UUID)
- func (m *CountryMutation) RemoveRegionIDs(ids ...uuid.UUID)
- func (m *CountryMutation) RemovedCitiesIDs() (ids []uuid.UUID)
- func (m *CountryMutation) RemovedEdges() []string
- func (m *CountryMutation) RemovedIDs(name string) []ent.Value
- func (m *CountryMutation) RemovedRegionsIDs() (ids []uuid.UUID)
- func (m *CountryMutation) ResetCities()
- func (m *CountryMutation) ResetCode()
- func (m *CountryMutation) ResetCreatedAt()
- func (m *CountryMutation) ResetEdge(name string) error
- func (m *CountryMutation) ResetField(name string) error
- func (m *CountryMutation) ResetName()
- func (m *CountryMutation) ResetRegions()
- func (m *CountryMutation) ResetUpdatedAt()
- func (m *CountryMutation) SetCode(s string)
- func (m *CountryMutation) SetCreatedAt(t time.Time)
- func (m *CountryMutation) SetField(name string, value ent.Value) error
- func (m *CountryMutation) SetID(id uuid.UUID)
- func (m *CountryMutation) SetName(s string)
- func (m *CountryMutation) SetOp(op Op)
- func (m *CountryMutation) SetUpdatedAt(t time.Time)
- func (m CountryMutation) Tx() (*Tx, error)
- func (m *CountryMutation) Type() string
- func (m *CountryMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CountryMutation) Where(ps ...predicate.Country)
- func (m *CountryMutation) WhereP(ps ...func(*sql.Selector))
- type CountryQuery
- func (cq *CountryQuery) Aggregate(fns ...AggregateFunc) *CountrySelect
- func (cq *CountryQuery) All(ctx context.Context) ([]*Country, error)
- func (cq *CountryQuery) AllX(ctx context.Context) []*Country
- func (cq *CountryQuery) Clone() *CountryQuery
- func (cq *CountryQuery) Count(ctx context.Context) (int, error)
- func (cq *CountryQuery) CountX(ctx context.Context) int
- func (cq *CountryQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CountryQuery) ExistX(ctx context.Context) bool
- func (cq *CountryQuery) First(ctx context.Context) (*Country, error)
- func (cq *CountryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *CountryQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (cq *CountryQuery) FirstX(ctx context.Context) *Country
- func (cq *CountryQuery) GroupBy(field string, fields ...string) *CountryGroupBy
- func (cq *CountryQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (cq *CountryQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cq *CountryQuery) Limit(limit int) *CountryQuery
- func (cq *CountryQuery) Offset(offset int) *CountryQuery
- func (cq *CountryQuery) Only(ctx context.Context) (*Country, error)
- func (cq *CountryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *CountryQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (cq *CountryQuery) OnlyX(ctx context.Context) *Country
- func (cq *CountryQuery) Order(o ...country.OrderOption) *CountryQuery
- func (cq *CountryQuery) QueryCities() *CityQuery
- func (cq *CountryQuery) QueryRegions() *RegionQuery
- func (cq *CountryQuery) Select(fields ...string) *CountrySelect
- func (cq *CountryQuery) Unique(unique bool) *CountryQuery
- func (cq *CountryQuery) Where(ps ...predicate.Country) *CountryQuery
- func (cq *CountryQuery) WithCities(opts ...func(*CityQuery)) *CountryQuery
- func (cq *CountryQuery) WithRegions(opts ...func(*RegionQuery)) *CountryQuery
- type CountrySelect
- func (cs *CountrySelect) Aggregate(fns ...AggregateFunc) *CountrySelect
- func (s *CountrySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CountrySelect) BoolX(ctx context.Context) bool
- func (s *CountrySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CountrySelect) BoolsX(ctx context.Context) []bool
- func (s *CountrySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CountrySelect) Float64X(ctx context.Context) float64
- func (s *CountrySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CountrySelect) Float64sX(ctx context.Context) []float64
- func (s *CountrySelect) Int(ctx context.Context) (_ int, err error)
- func (s *CountrySelect) IntX(ctx context.Context) int
- func (s *CountrySelect) Ints(ctx context.Context) ([]int, error)
- func (s *CountrySelect) IntsX(ctx context.Context) []int
- func (cs *CountrySelect) Scan(ctx context.Context, v any) error
- func (s *CountrySelect) ScanX(ctx context.Context, v any)
- func (s *CountrySelect) String(ctx context.Context) (_ string, err error)
- func (s *CountrySelect) StringX(ctx context.Context) string
- func (s *CountrySelect) Strings(ctx context.Context) ([]string, error)
- func (s *CountrySelect) StringsX(ctx context.Context) []string
- type CountryUpdate
- func (cu *CountryUpdate) AddCities(c ...*City) *CountryUpdate
- func (cu *CountryUpdate) AddCityIDs(ids ...uuid.UUID) *CountryUpdate
- func (cu *CountryUpdate) AddRegionIDs(ids ...uuid.UUID) *CountryUpdate
- func (cu *CountryUpdate) AddRegions(r ...*Region) *CountryUpdate
- func (cu *CountryUpdate) ClearCities() *CountryUpdate
- func (cu *CountryUpdate) ClearRegions() *CountryUpdate
- func (cu *CountryUpdate) Exec(ctx context.Context) error
- func (cu *CountryUpdate) ExecX(ctx context.Context)
- func (cu *CountryUpdate) Mutation() *CountryMutation
- func (cu *CountryUpdate) RemoveCities(c ...*City) *CountryUpdate
- func (cu *CountryUpdate) RemoveCityIDs(ids ...uuid.UUID) *CountryUpdate
- func (cu *CountryUpdate) RemoveRegionIDs(ids ...uuid.UUID) *CountryUpdate
- func (cu *CountryUpdate) RemoveRegions(r ...*Region) *CountryUpdate
- func (cu *CountryUpdate) Save(ctx context.Context) (int, error)
- func (cu *CountryUpdate) SaveX(ctx context.Context) int
- func (cu *CountryUpdate) SetCode(s string) *CountryUpdate
- func (cu *CountryUpdate) SetCreatedAt(t time.Time) *CountryUpdate
- func (cu *CountryUpdate) SetName(s string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableCode(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableCreatedAt(t *time.Time) *CountryUpdate
- func (cu *CountryUpdate) SetNillableName(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetUpdatedAt(t time.Time) *CountryUpdate
- func (cu *CountryUpdate) Where(ps ...predicate.Country) *CountryUpdate
- type CountryUpdateOne
- func (cuo *CountryUpdateOne) AddCities(c ...*City) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddCityIDs(ids ...uuid.UUID) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddRegionIDs(ids ...uuid.UUID) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddRegions(r ...*Region) *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearCities() *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearRegions() *CountryUpdateOne
- func (cuo *CountryUpdateOne) Exec(ctx context.Context) error
- func (cuo *CountryUpdateOne) ExecX(ctx context.Context)
- func (cuo *CountryUpdateOne) Mutation() *CountryMutation
- func (cuo *CountryUpdateOne) RemoveCities(c ...*City) *CountryUpdateOne
- func (cuo *CountryUpdateOne) RemoveCityIDs(ids ...uuid.UUID) *CountryUpdateOne
- func (cuo *CountryUpdateOne) RemoveRegionIDs(ids ...uuid.UUID) *CountryUpdateOne
- func (cuo *CountryUpdateOne) RemoveRegions(r ...*Region) *CountryUpdateOne
- func (cuo *CountryUpdateOne) Save(ctx context.Context) (*Country, error)
- func (cuo *CountryUpdateOne) SaveX(ctx context.Context) *Country
- func (cuo *CountryUpdateOne) Select(field string, fields ...string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetCode(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetCreatedAt(t time.Time) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetName(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableCode(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableCreatedAt(t *time.Time) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableName(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetUpdatedAt(t time.Time) *CountryUpdateOne
- func (cuo *CountryUpdateOne) Where(ps ...predicate.Country) *CountryUpdateOne
- type File
- func (f *File) QueryChats() *ChatQuery
- func (f *File) QueryMessages() *MessageQuery
- func (f *File) QueryPosts() *PostQuery
- func (f *File) QueryUsers() *UserQuery
- func (f *File) String() string
- func (f *File) Unwrap() *File
- func (f *File) Update() *FileUpdateOne
- func (f *File) Value(name string) (ent.Value, error)
- type FileClient
- func (c *FileClient) Create() *FileCreate
- func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
- func (c *FileClient) Delete() *FileDelete
- func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
- func (c *FileClient) DeleteOneID(id uuid.UUID) *FileDeleteOne
- func (c *FileClient) Get(ctx context.Context, id uuid.UUID) (*File, error)
- func (c *FileClient) GetX(ctx context.Context, id uuid.UUID) *File
- func (c *FileClient) Hooks() []Hook
- func (c *FileClient) Intercept(interceptors ...Interceptor)
- func (c *FileClient) Interceptors() []Interceptor
- func (c *FileClient) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk
- func (c *FileClient) Query() *FileQuery
- func (c *FileClient) QueryChats(f *File) *ChatQuery
- func (c *FileClient) QueryMessages(f *File) *MessageQuery
- func (c *FileClient) QueryPosts(f *File) *PostQuery
- func (c *FileClient) QueryUsers(f *File) *UserQuery
- func (c *FileClient) Update() *FileUpdate
- func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
- func (c *FileClient) UpdateOneID(id uuid.UUID) *FileUpdateOne
- func (c *FileClient) Use(hooks ...Hook)
- type FileCreate
- func (fc *FileCreate) AddChatIDs(ids ...uuid.UUID) *FileCreate
- func (fc *FileCreate) AddChats(c ...*Chat) *FileCreate
- func (fc *FileCreate) AddMessageIDs(ids ...uuid.UUID) *FileCreate
- func (fc *FileCreate) AddMessages(m ...*Message) *FileCreate
- func (fc *FileCreate) AddPostIDs(ids ...uuid.UUID) *FileCreate
- func (fc *FileCreate) AddPosts(p ...*Post) *FileCreate
- func (fc *FileCreate) AddUserIDs(ids ...uuid.UUID) *FileCreate
- func (fc *FileCreate) AddUsers(u ...*User) *FileCreate
- func (fc *FileCreate) Exec(ctx context.Context) error
- func (fc *FileCreate) ExecX(ctx context.Context)
- func (fc *FileCreate) Mutation() *FileMutation
- func (fc *FileCreate) Save(ctx context.Context) (*File, error)
- func (fc *FileCreate) SaveX(ctx context.Context) *File
- func (fc *FileCreate) SetCreatedAt(t time.Time) *FileCreate
- func (fc *FileCreate) SetID(u uuid.UUID) *FileCreate
- func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate
- func (fc *FileCreate) SetNillableID(u *uuid.UUID) *FileCreate
- func (fc *FileCreate) SetNillableUpdatedAt(t *time.Time) *FileCreate
- func (fc *FileCreate) SetResourceType(s string) *FileCreate
- func (fc *FileCreate) SetUpdatedAt(t time.Time) *FileCreate
- type FileCreateBulk
- type FileDelete
- type FileDeleteOne
- type FileEdges
- type FileGroupBy
- func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
- func (s *FileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileGroupBy) BoolX(ctx context.Context) bool
- func (s *FileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileGroupBy) Float64X(ctx context.Context) float64
- func (s *FileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FileGroupBy) IntX(ctx context.Context) int
- func (s *FileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FileGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
- func (s *FileGroupBy) ScanX(ctx context.Context, v any)
- func (s *FileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FileGroupBy) StringX(ctx context.Context) string
- func (s *FileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FileGroupBy) StringsX(ctx context.Context) []string
- type FileMutation
- func (m *FileMutation) AddChatIDs(ids ...uuid.UUID)
- func (m *FileMutation) AddField(name string, value ent.Value) error
- func (m *FileMutation) AddMessageIDs(ids ...uuid.UUID)
- func (m *FileMutation) AddPostIDs(ids ...uuid.UUID)
- func (m *FileMutation) AddUserIDs(ids ...uuid.UUID)
- func (m *FileMutation) AddedEdges() []string
- func (m *FileMutation) AddedField(name string) (ent.Value, bool)
- func (m *FileMutation) AddedFields() []string
- func (m *FileMutation) AddedIDs(name string) []ent.Value
- func (m *FileMutation) ChatsCleared() bool
- func (m *FileMutation) ChatsIDs() (ids []uuid.UUID)
- func (m *FileMutation) ClearChats()
- func (m *FileMutation) ClearEdge(name string) error
- func (m *FileMutation) ClearField(name string) error
- func (m *FileMutation) ClearMessages()
- func (m *FileMutation) ClearPosts()
- func (m *FileMutation) ClearUsers()
- func (m *FileMutation) ClearedEdges() []string
- func (m *FileMutation) ClearedFields() []string
- func (m FileMutation) Client() *Client
- func (m *FileMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FileMutation) EdgeCleared(name string) bool
- func (m *FileMutation) Field(name string) (ent.Value, bool)
- func (m *FileMutation) FieldCleared(name string) bool
- func (m *FileMutation) Fields() []string
- func (m *FileMutation) ID() (id uuid.UUID, exists bool)
- func (m *FileMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *FileMutation) MessagesCleared() bool
- func (m *FileMutation) MessagesIDs() (ids []uuid.UUID)
- func (m *FileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FileMutation) OldResourceType(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FileMutation) Op() Op
- func (m *FileMutation) PostsCleared() bool
- func (m *FileMutation) PostsIDs() (ids []uuid.UUID)
- func (m *FileMutation) RemoveChatIDs(ids ...uuid.UUID)
- func (m *FileMutation) RemoveMessageIDs(ids ...uuid.UUID)
- func (m *FileMutation) RemovePostIDs(ids ...uuid.UUID)
- func (m *FileMutation) RemoveUserIDs(ids ...uuid.UUID)
- func (m *FileMutation) RemovedChatsIDs() (ids []uuid.UUID)
- func (m *FileMutation) RemovedEdges() []string
- func (m *FileMutation) RemovedIDs(name string) []ent.Value
- func (m *FileMutation) RemovedMessagesIDs() (ids []uuid.UUID)
- func (m *FileMutation) RemovedPostsIDs() (ids []uuid.UUID)
- func (m *FileMutation) RemovedUsersIDs() (ids []uuid.UUID)
- func (m *FileMutation) ResetChats()
- func (m *FileMutation) ResetCreatedAt()
- func (m *FileMutation) ResetEdge(name string) error
- func (m *FileMutation) ResetField(name string) error
- func (m *FileMutation) ResetMessages()
- func (m *FileMutation) ResetPosts()
- func (m *FileMutation) ResetResourceType()
- func (m *FileMutation) ResetUpdatedAt()
- func (m *FileMutation) ResetUsers()
- func (m *FileMutation) ResourceType() (r string, exists bool)
- func (m *FileMutation) SetCreatedAt(t time.Time)
- func (m *FileMutation) SetField(name string, value ent.Value) error
- func (m *FileMutation) SetID(id uuid.UUID)
- func (m *FileMutation) SetOp(op Op)
- func (m *FileMutation) SetResourceType(s string)
- func (m *FileMutation) SetUpdatedAt(t time.Time)
- func (m FileMutation) Tx() (*Tx, error)
- func (m *FileMutation) Type() string
- func (m *FileMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FileMutation) UsersCleared() bool
- func (m *FileMutation) UsersIDs() (ids []uuid.UUID)
- func (m *FileMutation) Where(ps ...predicate.File)
- func (m *FileMutation) WhereP(ps ...func(*sql.Selector))
- type FileQuery
- func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
- func (fq *FileQuery) All(ctx context.Context) ([]*File, error)
- func (fq *FileQuery) AllX(ctx context.Context) []*File
- func (fq *FileQuery) Clone() *FileQuery
- func (fq *FileQuery) Count(ctx context.Context) (int, error)
- func (fq *FileQuery) CountX(ctx context.Context) int
- func (fq *FileQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FileQuery) ExistX(ctx context.Context) bool
- func (fq *FileQuery) First(ctx context.Context) (*File, error)
- func (fq *FileQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (fq *FileQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (fq *FileQuery) FirstX(ctx context.Context) *File
- func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
- func (fq *FileQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (fq *FileQuery) IDsX(ctx context.Context) []uuid.UUID
- func (fq *FileQuery) Limit(limit int) *FileQuery
- func (fq *FileQuery) Offset(offset int) *FileQuery
- func (fq *FileQuery) Only(ctx context.Context) (*File, error)
- func (fq *FileQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (fq *FileQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (fq *FileQuery) OnlyX(ctx context.Context) *File
- func (fq *FileQuery) Order(o ...file.OrderOption) *FileQuery
- func (fq *FileQuery) QueryChats() *ChatQuery
- func (fq *FileQuery) QueryMessages() *MessageQuery
- func (fq *FileQuery) QueryPosts() *PostQuery
- func (fq *FileQuery) QueryUsers() *UserQuery
- func (fq *FileQuery) Select(fields ...string) *FileSelect
- func (fq *FileQuery) Unique(unique bool) *FileQuery
- func (fq *FileQuery) Where(ps ...predicate.File) *FileQuery
- func (fq *FileQuery) WithChats(opts ...func(*ChatQuery)) *FileQuery
- func (fq *FileQuery) WithMessages(opts ...func(*MessageQuery)) *FileQuery
- func (fq *FileQuery) WithPosts(opts ...func(*PostQuery)) *FileQuery
- func (fq *FileQuery) WithUsers(opts ...func(*UserQuery)) *FileQuery
- type FileSelect
- func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect
- func (s *FileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileSelect) BoolX(ctx context.Context) bool
- func (s *FileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FileSelect) BoolsX(ctx context.Context) []bool
- func (s *FileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileSelect) Float64X(ctx context.Context) float64
- func (s *FileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileSelect) Float64sX(ctx context.Context) []float64
- func (s *FileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FileSelect) IntX(ctx context.Context) int
- func (s *FileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FileSelect) IntsX(ctx context.Context) []int
- func (fs *FileSelect) Scan(ctx context.Context, v any) error
- func (s *FileSelect) ScanX(ctx context.Context, v any)
- func (s *FileSelect) String(ctx context.Context) (_ string, err error)
- func (s *FileSelect) StringX(ctx context.Context) string
- func (s *FileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FileSelect) StringsX(ctx context.Context) []string
- type FileUpdate
- func (fu *FileUpdate) AddChatIDs(ids ...uuid.UUID) *FileUpdate
- func (fu *FileUpdate) AddChats(c ...*Chat) *FileUpdate
- func (fu *FileUpdate) AddMessageIDs(ids ...uuid.UUID) *FileUpdate
- func (fu *FileUpdate) AddMessages(m ...*Message) *FileUpdate
- func (fu *FileUpdate) AddPostIDs(ids ...uuid.UUID) *FileUpdate
- func (fu *FileUpdate) AddPosts(p ...*Post) *FileUpdate
- func (fu *FileUpdate) AddUserIDs(ids ...uuid.UUID) *FileUpdate
- func (fu *FileUpdate) AddUsers(u ...*User) *FileUpdate
- func (fu *FileUpdate) ClearChats() *FileUpdate
- func (fu *FileUpdate) ClearMessages() *FileUpdate
- func (fu *FileUpdate) ClearPosts() *FileUpdate
- func (fu *FileUpdate) ClearUsers() *FileUpdate
- func (fu *FileUpdate) Exec(ctx context.Context) error
- func (fu *FileUpdate) ExecX(ctx context.Context)
- func (fu *FileUpdate) Mutation() *FileMutation
- func (fu *FileUpdate) RemoveChatIDs(ids ...uuid.UUID) *FileUpdate
- func (fu *FileUpdate) RemoveChats(c ...*Chat) *FileUpdate
- func (fu *FileUpdate) RemoveMessageIDs(ids ...uuid.UUID) *FileUpdate
- func (fu *FileUpdate) RemoveMessages(m ...*Message) *FileUpdate
- func (fu *FileUpdate) RemovePostIDs(ids ...uuid.UUID) *FileUpdate
- func (fu *FileUpdate) RemovePosts(p ...*Post) *FileUpdate
- func (fu *FileUpdate) RemoveUserIDs(ids ...uuid.UUID) *FileUpdate
- func (fu *FileUpdate) RemoveUsers(u ...*User) *FileUpdate
- func (fu *FileUpdate) Save(ctx context.Context) (int, error)
- func (fu *FileUpdate) SaveX(ctx context.Context) int
- func (fu *FileUpdate) SetCreatedAt(t time.Time) *FileUpdate
- func (fu *FileUpdate) SetNillableCreatedAt(t *time.Time) *FileUpdate
- func (fu *FileUpdate) SetNillableResourceType(s *string) *FileUpdate
- func (fu *FileUpdate) SetResourceType(s string) *FileUpdate
- func (fu *FileUpdate) SetUpdatedAt(t time.Time) *FileUpdate
- func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
- type FileUpdateOne
- func (fuo *FileUpdateOne) AddChatIDs(ids ...uuid.UUID) *FileUpdateOne
- func (fuo *FileUpdateOne) AddChats(c ...*Chat) *FileUpdateOne
- func (fuo *FileUpdateOne) AddMessageIDs(ids ...uuid.UUID) *FileUpdateOne
- func (fuo *FileUpdateOne) AddMessages(m ...*Message) *FileUpdateOne
- func (fuo *FileUpdateOne) AddPostIDs(ids ...uuid.UUID) *FileUpdateOne
- func (fuo *FileUpdateOne) AddPosts(p ...*Post) *FileUpdateOne
- func (fuo *FileUpdateOne) AddUserIDs(ids ...uuid.UUID) *FileUpdateOne
- func (fuo *FileUpdateOne) AddUsers(u ...*User) *FileUpdateOne
- func (fuo *FileUpdateOne) ClearChats() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearMessages() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearPosts() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearUsers() *FileUpdateOne
- func (fuo *FileUpdateOne) Exec(ctx context.Context) error
- func (fuo *FileUpdateOne) ExecX(ctx context.Context)
- func (fuo *FileUpdateOne) Mutation() *FileMutation
- func (fuo *FileUpdateOne) RemoveChatIDs(ids ...uuid.UUID) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveChats(c ...*Chat) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveMessageIDs(ids ...uuid.UUID) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveMessages(m ...*Message) *FileUpdateOne
- func (fuo *FileUpdateOne) RemovePostIDs(ids ...uuid.UUID) *FileUpdateOne
- func (fuo *FileUpdateOne) RemovePosts(p ...*Post) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveUsers(u ...*User) *FileUpdateOne
- func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
- func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
- func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetCreatedAt(t time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableCreatedAt(t *time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableResourceType(s *string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetResourceType(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetUpdatedAt(t time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
- type Files
- type Friend
- type FriendClient
- func (c *FriendClient) Create() *FriendCreate
- func (c *FriendClient) CreateBulk(builders ...*FriendCreate) *FriendCreateBulk
- func (c *FriendClient) Delete() *FriendDelete
- func (c *FriendClient) DeleteOne(f *Friend) *FriendDeleteOne
- func (c *FriendClient) DeleteOneID(id uuid.UUID) *FriendDeleteOne
- func (c *FriendClient) Get(ctx context.Context, id uuid.UUID) (*Friend, error)
- func (c *FriendClient) GetX(ctx context.Context, id uuid.UUID) *Friend
- func (c *FriendClient) Hooks() []Hook
- func (c *FriendClient) Intercept(interceptors ...Interceptor)
- func (c *FriendClient) Interceptors() []Interceptor
- func (c *FriendClient) MapCreateBulk(slice any, setFunc func(*FriendCreate, int)) *FriendCreateBulk
- func (c *FriendClient) Query() *FriendQuery
- func (c *FriendClient) QueryRequestee(f *Friend) *UserQuery
- func (c *FriendClient) QueryRequester(f *Friend) *UserQuery
- func (c *FriendClient) Update() *FriendUpdate
- func (c *FriendClient) UpdateOne(f *Friend) *FriendUpdateOne
- func (c *FriendClient) UpdateOneID(id uuid.UUID) *FriendUpdateOne
- func (c *FriendClient) Use(hooks ...Hook)
- type FriendCreate
- func (fc *FriendCreate) Exec(ctx context.Context) error
- func (fc *FriendCreate) ExecX(ctx context.Context)
- func (fc *FriendCreate) Mutation() *FriendMutation
- func (fc *FriendCreate) Save(ctx context.Context) (*Friend, error)
- func (fc *FriendCreate) SaveX(ctx context.Context) *Friend
- func (fc *FriendCreate) SetCreatedAt(t time.Time) *FriendCreate
- func (fc *FriendCreate) SetID(u uuid.UUID) *FriendCreate
- func (fc *FriendCreate) SetNillableCreatedAt(t *time.Time) *FriendCreate
- func (fc *FriendCreate) SetNillableID(u *uuid.UUID) *FriendCreate
- func (fc *FriendCreate) SetNillableStatus(f *friend.Status) *FriendCreate
- func (fc *FriendCreate) SetNillableUpdatedAt(t *time.Time) *FriendCreate
- func (fc *FriendCreate) SetRequestee(u *User) *FriendCreate
- func (fc *FriendCreate) SetRequesteeID(u uuid.UUID) *FriendCreate
- func (fc *FriendCreate) SetRequester(u *User) *FriendCreate
- func (fc *FriendCreate) SetRequesterID(u uuid.UUID) *FriendCreate
- func (fc *FriendCreate) SetStatus(f friend.Status) *FriendCreate
- func (fc *FriendCreate) SetUpdatedAt(t time.Time) *FriendCreate
- type FriendCreateBulk
- type FriendDelete
- type FriendDeleteOne
- type FriendEdges
- type FriendGroupBy
- func (fgb *FriendGroupBy) Aggregate(fns ...AggregateFunc) *FriendGroupBy
- func (s *FriendGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FriendGroupBy) BoolX(ctx context.Context) bool
- func (s *FriendGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FriendGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FriendGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FriendGroupBy) Float64X(ctx context.Context) float64
- func (s *FriendGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FriendGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FriendGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FriendGroupBy) IntX(ctx context.Context) int
- func (s *FriendGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FriendGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FriendGroupBy) Scan(ctx context.Context, v any) error
- func (s *FriendGroupBy) ScanX(ctx context.Context, v any)
- func (s *FriendGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FriendGroupBy) StringX(ctx context.Context) string
- func (s *FriendGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FriendGroupBy) StringsX(ctx context.Context) []string
- type FriendMutation
- func (m *FriendMutation) AddField(name string, value ent.Value) error
- func (m *FriendMutation) AddedEdges() []string
- func (m *FriendMutation) AddedField(name string) (ent.Value, bool)
- func (m *FriendMutation) AddedFields() []string
- func (m *FriendMutation) AddedIDs(name string) []ent.Value
- func (m *FriendMutation) ClearEdge(name string) error
- func (m *FriendMutation) ClearField(name string) error
- func (m *FriendMutation) ClearRequestee()
- func (m *FriendMutation) ClearRequester()
- func (m *FriendMutation) ClearedEdges() []string
- func (m *FriendMutation) ClearedFields() []string
- func (m FriendMutation) Client() *Client
- func (m *FriendMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FriendMutation) EdgeCleared(name string) bool
- func (m *FriendMutation) Field(name string) (ent.Value, bool)
- func (m *FriendMutation) FieldCleared(name string) bool
- func (m *FriendMutation) Fields() []string
- func (m *FriendMutation) ID() (id uuid.UUID, exists bool)
- func (m *FriendMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *FriendMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FriendMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FriendMutation) OldRequesteeID(ctx context.Context) (v uuid.UUID, err error)
- func (m *FriendMutation) OldRequesterID(ctx context.Context) (v uuid.UUID, err error)
- func (m *FriendMutation) OldStatus(ctx context.Context) (v friend.Status, err error)
- func (m *FriendMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FriendMutation) Op() Op
- func (m *FriendMutation) RemovedEdges() []string
- func (m *FriendMutation) RemovedIDs(name string) []ent.Value
- func (m *FriendMutation) RequesteeCleared() bool
- func (m *FriendMutation) RequesteeID() (r uuid.UUID, exists bool)
- func (m *FriendMutation) RequesteeIDs() (ids []uuid.UUID)
- func (m *FriendMutation) RequesterCleared() bool
- func (m *FriendMutation) RequesterID() (r uuid.UUID, exists bool)
- func (m *FriendMutation) RequesterIDs() (ids []uuid.UUID)
- func (m *FriendMutation) ResetCreatedAt()
- func (m *FriendMutation) ResetEdge(name string) error
- func (m *FriendMutation) ResetField(name string) error
- func (m *FriendMutation) ResetRequestee()
- func (m *FriendMutation) ResetRequesteeID()
- func (m *FriendMutation) ResetRequester()
- func (m *FriendMutation) ResetRequesterID()
- func (m *FriendMutation) ResetStatus()
- func (m *FriendMutation) ResetUpdatedAt()
- func (m *FriendMutation) SetCreatedAt(t time.Time)
- func (m *FriendMutation) SetField(name string, value ent.Value) error
- func (m *FriendMutation) SetID(id uuid.UUID)
- func (m *FriendMutation) SetOp(op Op)
- func (m *FriendMutation) SetRequesteeID(u uuid.UUID)
- func (m *FriendMutation) SetRequesterID(u uuid.UUID)
- func (m *FriendMutation) SetStatus(f friend.Status)
- func (m *FriendMutation) SetUpdatedAt(t time.Time)
- func (m *FriendMutation) Status() (r friend.Status, exists bool)
- func (m FriendMutation) Tx() (*Tx, error)
- func (m *FriendMutation) Type() string
- func (m *FriendMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FriendMutation) Where(ps ...predicate.Friend)
- func (m *FriendMutation) WhereP(ps ...func(*sql.Selector))
- type FriendQuery
- func (fq *FriendQuery) Aggregate(fns ...AggregateFunc) *FriendSelect
- func (fq *FriendQuery) All(ctx context.Context) ([]*Friend, error)
- func (fq *FriendQuery) AllX(ctx context.Context) []*Friend
- func (fq *FriendQuery) Clone() *FriendQuery
- func (fq *FriendQuery) Count(ctx context.Context) (int, error)
- func (fq *FriendQuery) CountX(ctx context.Context) int
- func (fq *FriendQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FriendQuery) ExistX(ctx context.Context) bool
- func (fq *FriendQuery) First(ctx context.Context) (*Friend, error)
- func (fq *FriendQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (fq *FriendQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (fq *FriendQuery) FirstX(ctx context.Context) *Friend
- func (fq *FriendQuery) GroupBy(field string, fields ...string) *FriendGroupBy
- func (fq *FriendQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (fq *FriendQuery) IDsX(ctx context.Context) []uuid.UUID
- func (fq *FriendQuery) Limit(limit int) *FriendQuery
- func (fq *FriendQuery) Offset(offset int) *FriendQuery
- func (fq *FriendQuery) Only(ctx context.Context) (*Friend, error)
- func (fq *FriendQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (fq *FriendQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (fq *FriendQuery) OnlyX(ctx context.Context) *Friend
- func (fq *FriendQuery) Order(o ...friend.OrderOption) *FriendQuery
- func (fq *FriendQuery) QueryRequestee() *UserQuery
- func (fq *FriendQuery) QueryRequester() *UserQuery
- func (fq *FriendQuery) Select(fields ...string) *FriendSelect
- func (fq *FriendQuery) Unique(unique bool) *FriendQuery
- func (fq *FriendQuery) Where(ps ...predicate.Friend) *FriendQuery
- func (fq *FriendQuery) WithRequestee(opts ...func(*UserQuery)) *FriendQuery
- func (fq *FriendQuery) WithRequester(opts ...func(*UserQuery)) *FriendQuery
- type FriendSelect
- func (fs *FriendSelect) Aggregate(fns ...AggregateFunc) *FriendSelect
- func (s *FriendSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FriendSelect) BoolX(ctx context.Context) bool
- func (s *FriendSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FriendSelect) BoolsX(ctx context.Context) []bool
- func (s *FriendSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FriendSelect) Float64X(ctx context.Context) float64
- func (s *FriendSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FriendSelect) Float64sX(ctx context.Context) []float64
- func (s *FriendSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FriendSelect) IntX(ctx context.Context) int
- func (s *FriendSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FriendSelect) IntsX(ctx context.Context) []int
- func (fs *FriendSelect) Scan(ctx context.Context, v any) error
- func (s *FriendSelect) ScanX(ctx context.Context, v any)
- func (s *FriendSelect) String(ctx context.Context) (_ string, err error)
- func (s *FriendSelect) StringX(ctx context.Context) string
- func (s *FriendSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FriendSelect) StringsX(ctx context.Context) []string
- type FriendUpdate
- func (fu *FriendUpdate) ClearRequestee() *FriendUpdate
- func (fu *FriendUpdate) ClearRequester() *FriendUpdate
- func (fu *FriendUpdate) Exec(ctx context.Context) error
- func (fu *FriendUpdate) ExecX(ctx context.Context)
- func (fu *FriendUpdate) Mutation() *FriendMutation
- func (fu *FriendUpdate) Save(ctx context.Context) (int, error)
- func (fu *FriendUpdate) SaveX(ctx context.Context) int
- func (fu *FriendUpdate) SetCreatedAt(t time.Time) *FriendUpdate
- func (fu *FriendUpdate) SetNillableCreatedAt(t *time.Time) *FriendUpdate
- func (fu *FriendUpdate) SetNillableRequesteeID(u *uuid.UUID) *FriendUpdate
- func (fu *FriendUpdate) SetNillableRequesterID(u *uuid.UUID) *FriendUpdate
- func (fu *FriendUpdate) SetNillableStatus(f *friend.Status) *FriendUpdate
- func (fu *FriendUpdate) SetRequestee(u *User) *FriendUpdate
- func (fu *FriendUpdate) SetRequesteeID(u uuid.UUID) *FriendUpdate
- func (fu *FriendUpdate) SetRequester(u *User) *FriendUpdate
- func (fu *FriendUpdate) SetRequesterID(u uuid.UUID) *FriendUpdate
- func (fu *FriendUpdate) SetStatus(f friend.Status) *FriendUpdate
- func (fu *FriendUpdate) SetUpdatedAt(t time.Time) *FriendUpdate
- func (fu *FriendUpdate) Where(ps ...predicate.Friend) *FriendUpdate
- type FriendUpdateOne
- func (fuo *FriendUpdateOne) ClearRequestee() *FriendUpdateOne
- func (fuo *FriendUpdateOne) ClearRequester() *FriendUpdateOne
- func (fuo *FriendUpdateOne) Exec(ctx context.Context) error
- func (fuo *FriendUpdateOne) ExecX(ctx context.Context)
- func (fuo *FriendUpdateOne) Mutation() *FriendMutation
- func (fuo *FriendUpdateOne) Save(ctx context.Context) (*Friend, error)
- func (fuo *FriendUpdateOne) SaveX(ctx context.Context) *Friend
- func (fuo *FriendUpdateOne) Select(field string, fields ...string) *FriendUpdateOne
- func (fuo *FriendUpdateOne) SetCreatedAt(t time.Time) *FriendUpdateOne
- func (fuo *FriendUpdateOne) SetNillableCreatedAt(t *time.Time) *FriendUpdateOne
- func (fuo *FriendUpdateOne) SetNillableRequesteeID(u *uuid.UUID) *FriendUpdateOne
- func (fuo *FriendUpdateOne) SetNillableRequesterID(u *uuid.UUID) *FriendUpdateOne
- func (fuo *FriendUpdateOne) SetNillableStatus(f *friend.Status) *FriendUpdateOne
- func (fuo *FriendUpdateOne) SetRequestee(u *User) *FriendUpdateOne
- func (fuo *FriendUpdateOne) SetRequesteeID(u uuid.UUID) *FriendUpdateOne
- func (fuo *FriendUpdateOne) SetRequester(u *User) *FriendUpdateOne
- func (fuo *FriendUpdateOne) SetRequesterID(u uuid.UUID) *FriendUpdateOne
- func (fuo *FriendUpdateOne) SetStatus(f friend.Status) *FriendUpdateOne
- func (fuo *FriendUpdateOne) SetUpdatedAt(t time.Time) *FriendUpdateOne
- func (fuo *FriendUpdateOne) Where(ps ...predicate.Friend) *FriendUpdateOne
- type Friends
- type Hook
- type InterceptFunc
- type Interceptor
- type Message
- type MessageClient
- func (c *MessageClient) Create() *MessageCreate
- func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
- func (c *MessageClient) Delete() *MessageDelete
- func (c *MessageClient) DeleteOne(m *Message) *MessageDeleteOne
- func (c *MessageClient) DeleteOneID(id uuid.UUID) *MessageDeleteOne
- func (c *MessageClient) Get(ctx context.Context, id uuid.UUID) (*Message, error)
- func (c *MessageClient) GetX(ctx context.Context, id uuid.UUID) *Message
- func (c *MessageClient) Hooks() []Hook
- func (c *MessageClient) Intercept(interceptors ...Interceptor)
- func (c *MessageClient) Interceptors() []Interceptor
- func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
- func (c *MessageClient) Query() *MessageQuery
- func (c *MessageClient) QueryChat(m *Message) *ChatQuery
- func (c *MessageClient) QueryFile(m *Message) *FileQuery
- func (c *MessageClient) QuerySender(m *Message) *UserQuery
- func (c *MessageClient) Update() *MessageUpdate
- func (c *MessageClient) UpdateOne(m *Message) *MessageUpdateOne
- func (c *MessageClient) UpdateOneID(id uuid.UUID) *MessageUpdateOne
- func (c *MessageClient) Use(hooks ...Hook)
- type MessageCreate
- func (mc *MessageCreate) Exec(ctx context.Context) error
- func (mc *MessageCreate) ExecX(ctx context.Context)
- func (mc *MessageCreate) Mutation() *MessageMutation
- func (mc *MessageCreate) Save(ctx context.Context) (*Message, error)
- func (mc *MessageCreate) SaveX(ctx context.Context) *Message
- func (mc *MessageCreate) SetChat(c *Chat) *MessageCreate
- func (mc *MessageCreate) SetChatID(u uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetCreatedAt(t time.Time) *MessageCreate
- func (mc *MessageCreate) SetFile(f *File) *MessageCreate
- func (mc *MessageCreate) SetFileID(u uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetID(u uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetNillableCreatedAt(t *time.Time) *MessageCreate
- func (mc *MessageCreate) SetNillableFileID(u *uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetNillableID(u *uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetNillableText(s *string) *MessageCreate
- func (mc *MessageCreate) SetNillableUpdatedAt(t *time.Time) *MessageCreate
- func (mc *MessageCreate) SetSender(u *User) *MessageCreate
- func (mc *MessageCreate) SetSenderID(u uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetText(s string) *MessageCreate
- func (mc *MessageCreate) SetUpdatedAt(t time.Time) *MessageCreate
- type MessageCreateBulk
- type MessageDelete
- type MessageDeleteOne
- type MessageEdges
- type MessageGroupBy
- func (mgb *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
- func (s *MessageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageGroupBy) BoolX(ctx context.Context) bool
- func (s *MessageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MessageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageGroupBy) Float64X(ctx context.Context) float64
- func (s *MessageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MessageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MessageGroupBy) IntX(ctx context.Context) int
- func (s *MessageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MessageGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MessageGroupBy) Scan(ctx context.Context, v any) error
- func (s *MessageGroupBy) ScanX(ctx context.Context, v any)
- func (s *MessageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MessageGroupBy) StringX(ctx context.Context) string
- func (s *MessageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MessageGroupBy) StringsX(ctx context.Context) []string
- type MessageMutation
- func (m *MessageMutation) AddField(name string, value ent.Value) error
- func (m *MessageMutation) AddedEdges() []string
- func (m *MessageMutation) AddedField(name string) (ent.Value, bool)
- func (m *MessageMutation) AddedFields() []string
- func (m *MessageMutation) AddedIDs(name string) []ent.Value
- func (m *MessageMutation) ChatCleared() bool
- func (m *MessageMutation) ChatID() (r uuid.UUID, exists bool)
- func (m *MessageMutation) ChatIDs() (ids []uuid.UUID)
- func (m *MessageMutation) ClearChat()
- func (m *MessageMutation) ClearEdge(name string) error
- func (m *MessageMutation) ClearField(name string) error
- func (m *MessageMutation) ClearFile()
- func (m *MessageMutation) ClearFileID()
- func (m *MessageMutation) ClearSender()
- func (m *MessageMutation) ClearText()
- func (m *MessageMutation) ClearedEdges() []string
- func (m *MessageMutation) ClearedFields() []string
- func (m MessageMutation) Client() *Client
- func (m *MessageMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MessageMutation) EdgeCleared(name string) bool
- func (m *MessageMutation) Field(name string) (ent.Value, bool)
- func (m *MessageMutation) FieldCleared(name string) bool
- func (m *MessageMutation) Fields() []string
- func (m *MessageMutation) FileCleared() bool
- func (m *MessageMutation) FileID() (r uuid.UUID, exists bool)
- func (m *MessageMutation) FileIDCleared() bool
- func (m *MessageMutation) FileIDs() (ids []uuid.UUID)
- func (m *MessageMutation) ID() (id uuid.UUID, exists bool)
- func (m *MessageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *MessageMutation) OldChatID(ctx context.Context) (v uuid.UUID, err error)
- func (m *MessageMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MessageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MessageMutation) OldFileID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *MessageMutation) OldSenderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *MessageMutation) OldText(ctx context.Context) (v *string, err error)
- func (m *MessageMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MessageMutation) Op() Op
- func (m *MessageMutation) RemovedEdges() []string
- func (m *MessageMutation) RemovedIDs(name string) []ent.Value
- func (m *MessageMutation) ResetChat()
- func (m *MessageMutation) ResetChatID()
- func (m *MessageMutation) ResetCreatedAt()
- func (m *MessageMutation) ResetEdge(name string) error
- func (m *MessageMutation) ResetField(name string) error
- func (m *MessageMutation) ResetFile()
- func (m *MessageMutation) ResetFileID()
- func (m *MessageMutation) ResetSender()
- func (m *MessageMutation) ResetSenderID()
- func (m *MessageMutation) ResetText()
- func (m *MessageMutation) ResetUpdatedAt()
- func (m *MessageMutation) SenderCleared() bool
- func (m *MessageMutation) SenderID() (r uuid.UUID, exists bool)
- func (m *MessageMutation) SenderIDs() (ids []uuid.UUID)
- func (m *MessageMutation) SetChatID(u uuid.UUID)
- func (m *MessageMutation) SetCreatedAt(t time.Time)
- func (m *MessageMutation) SetField(name string, value ent.Value) error
- func (m *MessageMutation) SetFileID(u uuid.UUID)
- func (m *MessageMutation) SetID(id uuid.UUID)
- func (m *MessageMutation) SetOp(op Op)
- func (m *MessageMutation) SetSenderID(u uuid.UUID)
- func (m *MessageMutation) SetText(s string)
- func (m *MessageMutation) SetUpdatedAt(t time.Time)
- func (m *MessageMutation) Text() (r string, exists bool)
- func (m *MessageMutation) TextCleared() bool
- func (m MessageMutation) Tx() (*Tx, error)
- func (m *MessageMutation) Type() string
- func (m *MessageMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MessageMutation) Where(ps ...predicate.Message)
- func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
- type MessageQuery
- func (mq *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (mq *MessageQuery) All(ctx context.Context) ([]*Message, error)
- func (mq *MessageQuery) AllX(ctx context.Context) []*Message
- func (mq *MessageQuery) Clone() *MessageQuery
- func (mq *MessageQuery) Count(ctx context.Context) (int, error)
- func (mq *MessageQuery) CountX(ctx context.Context) int
- func (mq *MessageQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MessageQuery) ExistX(ctx context.Context) bool
- func (mq *MessageQuery) First(ctx context.Context) (*Message, error)
- func (mq *MessageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (mq *MessageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (mq *MessageQuery) FirstX(ctx context.Context) *Message
- func (mq *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
- func (mq *MessageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (mq *MessageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (mq *MessageQuery) Limit(limit int) *MessageQuery
- func (mq *MessageQuery) Offset(offset int) *MessageQuery
- func (mq *MessageQuery) Only(ctx context.Context) (*Message, error)
- func (mq *MessageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (mq *MessageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (mq *MessageQuery) OnlyX(ctx context.Context) *Message
- func (mq *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
- func (mq *MessageQuery) QueryChat() *ChatQuery
- func (mq *MessageQuery) QueryFile() *FileQuery
- func (mq *MessageQuery) QuerySender() *UserQuery
- func (mq *MessageQuery) Select(fields ...string) *MessageSelect
- func (mq *MessageQuery) Unique(unique bool) *MessageQuery
- func (mq *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
- func (mq *MessageQuery) WithChat(opts ...func(*ChatQuery)) *MessageQuery
- func (mq *MessageQuery) WithFile(opts ...func(*FileQuery)) *MessageQuery
- func (mq *MessageQuery) WithSender(opts ...func(*UserQuery)) *MessageQuery
- type MessageSelect
- func (ms *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (s *MessageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageSelect) BoolX(ctx context.Context) bool
- func (s *MessageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageSelect) BoolsX(ctx context.Context) []bool
- func (s *MessageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageSelect) Float64X(ctx context.Context) float64
- func (s *MessageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageSelect) Float64sX(ctx context.Context) []float64
- func (s *MessageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MessageSelect) IntX(ctx context.Context) int
- func (s *MessageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MessageSelect) IntsX(ctx context.Context) []int
- func (ms *MessageSelect) Scan(ctx context.Context, v any) error
- func (s *MessageSelect) ScanX(ctx context.Context, v any)
- func (s *MessageSelect) String(ctx context.Context) (_ string, err error)
- func (s *MessageSelect) StringX(ctx context.Context) string
- func (s *MessageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MessageSelect) StringsX(ctx context.Context) []string
- type MessageUpdate
- func (mu *MessageUpdate) ClearChat() *MessageUpdate
- func (mu *MessageUpdate) ClearFile() *MessageUpdate
- func (mu *MessageUpdate) ClearFileID() *MessageUpdate
- func (mu *MessageUpdate) ClearSender() *MessageUpdate
- func (mu *MessageUpdate) ClearText() *MessageUpdate
- func (mu *MessageUpdate) Exec(ctx context.Context) error
- func (mu *MessageUpdate) ExecX(ctx context.Context)
- func (mu *MessageUpdate) Mutation() *MessageMutation
- func (mu *MessageUpdate) Save(ctx context.Context) (int, error)
- func (mu *MessageUpdate) SaveX(ctx context.Context) int
- func (mu *MessageUpdate) SetChat(c *Chat) *MessageUpdate
- func (mu *MessageUpdate) SetChatID(u uuid.UUID) *MessageUpdate
- func (mu *MessageUpdate) SetCreatedAt(t time.Time) *MessageUpdate
- func (mu *MessageUpdate) SetFile(f *File) *MessageUpdate
- func (mu *MessageUpdate) SetFileID(u uuid.UUID) *MessageUpdate
- func (mu *MessageUpdate) SetNillableChatID(u *uuid.UUID) *MessageUpdate
- func (mu *MessageUpdate) SetNillableCreatedAt(t *time.Time) *MessageUpdate
- func (mu *MessageUpdate) SetNillableFileID(u *uuid.UUID) *MessageUpdate
- func (mu *MessageUpdate) SetNillableSenderID(u *uuid.UUID) *MessageUpdate
- func (mu *MessageUpdate) SetNillableText(s *string) *MessageUpdate
- func (mu *MessageUpdate) SetSender(u *User) *MessageUpdate
- func (mu *MessageUpdate) SetSenderID(u uuid.UUID) *MessageUpdate
- func (mu *MessageUpdate) SetText(s string) *MessageUpdate
- func (mu *MessageUpdate) SetUpdatedAt(t time.Time) *MessageUpdate
- func (mu *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
- type MessageUpdateOne
- func (muo *MessageUpdateOne) ClearChat() *MessageUpdateOne
- func (muo *MessageUpdateOne) ClearFile() *MessageUpdateOne
- func (muo *MessageUpdateOne) ClearFileID() *MessageUpdateOne
- func (muo *MessageUpdateOne) ClearSender() *MessageUpdateOne
- func (muo *MessageUpdateOne) ClearText() *MessageUpdateOne
- func (muo *MessageUpdateOne) Exec(ctx context.Context) error
- func (muo *MessageUpdateOne) ExecX(ctx context.Context)
- func (muo *MessageUpdateOne) Mutation() *MessageMutation
- func (muo *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
- func (muo *MessageUpdateOne) SaveX(ctx context.Context) *Message
- func (muo *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetChat(c *Chat) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetChatID(u uuid.UUID) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetCreatedAt(t time.Time) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetFile(f *File) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetFileID(u uuid.UUID) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetNillableChatID(u *uuid.UUID) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetNillableCreatedAt(t *time.Time) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetNillableFileID(u *uuid.UUID) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetNillableSenderID(u *uuid.UUID) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetNillableText(s *string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetSender(u *User) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetSenderID(u uuid.UUID) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetText(s string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetUpdatedAt(t time.Time) *MessageUpdateOne
- func (muo *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
- type Messages
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Notification
- func (n *Notification) QueryComment() *CommentQuery
- func (n *Notification) QueryPost() *PostQuery
- func (n *Notification) QueryReadBy() *UserQuery
- func (n *Notification) QueryReceivers() *UserQuery
- func (n *Notification) QueryReply() *ReplyQuery
- func (n *Notification) QuerySender() *UserQuery
- func (n *Notification) String() string
- func (n *Notification) Unwrap() *Notification
- func (n *Notification) Update() *NotificationUpdateOne
- func (n *Notification) Value(name string) (ent.Value, error)
- type NotificationClient
- func (c *NotificationClient) Create() *NotificationCreate
- func (c *NotificationClient) CreateBulk(builders ...*NotificationCreate) *NotificationCreateBulk
- func (c *NotificationClient) Delete() *NotificationDelete
- func (c *NotificationClient) DeleteOne(n *Notification) *NotificationDeleteOne
- func (c *NotificationClient) DeleteOneID(id uuid.UUID) *NotificationDeleteOne
- func (c *NotificationClient) Get(ctx context.Context, id uuid.UUID) (*Notification, error)
- func (c *NotificationClient) GetX(ctx context.Context, id uuid.UUID) *Notification
- func (c *NotificationClient) Hooks() []Hook
- func (c *NotificationClient) Intercept(interceptors ...Interceptor)
- func (c *NotificationClient) Interceptors() []Interceptor
- func (c *NotificationClient) MapCreateBulk(slice any, setFunc func(*NotificationCreate, int)) *NotificationCreateBulk
- func (c *NotificationClient) Query() *NotificationQuery
- func (c *NotificationClient) QueryComment(n *Notification) *CommentQuery
- func (c *NotificationClient) QueryPost(n *Notification) *PostQuery
- func (c *NotificationClient) QueryReadBy(n *Notification) *UserQuery
- func (c *NotificationClient) QueryReceivers(n *Notification) *UserQuery
- func (c *NotificationClient) QueryReply(n *Notification) *ReplyQuery
- func (c *NotificationClient) QuerySender(n *Notification) *UserQuery
- func (c *NotificationClient) Update() *NotificationUpdate
- func (c *NotificationClient) UpdateOne(n *Notification) *NotificationUpdateOne
- func (c *NotificationClient) UpdateOneID(id uuid.UUID) *NotificationUpdateOne
- func (c *NotificationClient) Use(hooks ...Hook)
- type NotificationCreate
- func (nc *NotificationCreate) AddReadBy(u ...*User) *NotificationCreate
- func (nc *NotificationCreate) AddReadByIDs(ids ...uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) AddReceiverIDs(ids ...uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) AddReceivers(u ...*User) *NotificationCreate
- func (nc *NotificationCreate) Exec(ctx context.Context) error
- func (nc *NotificationCreate) ExecX(ctx context.Context)
- func (nc *NotificationCreate) Mutation() *NotificationMutation
- func (nc *NotificationCreate) Save(ctx context.Context) (*Notification, error)
- func (nc *NotificationCreate) SaveX(ctx context.Context) *Notification
- func (nc *NotificationCreate) SetComment(c *Comment) *NotificationCreate
- func (nc *NotificationCreate) SetCommentID(u uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) SetCreatedAt(t time.Time) *NotificationCreate
- func (nc *NotificationCreate) SetID(u uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) SetNillableCommentID(u *uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) SetNillableCreatedAt(t *time.Time) *NotificationCreate
- func (nc *NotificationCreate) SetNillableID(u *uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) SetNillablePostID(u *uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) SetNillableReplyID(u *uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) SetNillableSenderID(u *uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) SetNillableText(s *string) *NotificationCreate
- func (nc *NotificationCreate) SetNillableUpdatedAt(t *time.Time) *NotificationCreate
- func (nc *NotificationCreate) SetNtype(n notification.Ntype) *NotificationCreate
- func (nc *NotificationCreate) SetPost(p *Post) *NotificationCreate
- func (nc *NotificationCreate) SetPostID(u uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) SetReply(r *Reply) *NotificationCreate
- func (nc *NotificationCreate) SetReplyID(u uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) SetSender(u *User) *NotificationCreate
- func (nc *NotificationCreate) SetSenderID(u uuid.UUID) *NotificationCreate
- func (nc *NotificationCreate) SetText(s string) *NotificationCreate
- func (nc *NotificationCreate) SetUpdatedAt(t time.Time) *NotificationCreate
- type NotificationCreateBulk
- type NotificationDelete
- type NotificationDeleteOne
- type NotificationEdges
- func (e NotificationEdges) CommentOrErr() (*Comment, error)
- func (e NotificationEdges) PostOrErr() (*Post, error)
- func (e NotificationEdges) ReadByOrErr() ([]*User, error)
- func (e NotificationEdges) ReceiversOrErr() ([]*User, error)
- func (e NotificationEdges) ReplyOrErr() (*Reply, error)
- func (e NotificationEdges) SenderOrErr() (*User, error)
- type NotificationGroupBy
- func (ngb *NotificationGroupBy) Aggregate(fns ...AggregateFunc) *NotificationGroupBy
- func (s *NotificationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NotificationGroupBy) BoolX(ctx context.Context) bool
- func (s *NotificationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NotificationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NotificationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NotificationGroupBy) Float64X(ctx context.Context) float64
- func (s *NotificationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NotificationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NotificationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NotificationGroupBy) IntX(ctx context.Context) int
- func (s *NotificationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NotificationGroupBy) IntsX(ctx context.Context) []int
- func (ngb *NotificationGroupBy) Scan(ctx context.Context, v any) error
- func (s *NotificationGroupBy) ScanX(ctx context.Context, v any)
- func (s *NotificationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NotificationGroupBy) StringX(ctx context.Context) string
- func (s *NotificationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NotificationGroupBy) StringsX(ctx context.Context) []string
- type NotificationMutation
- func (m *NotificationMutation) AddField(name string, value ent.Value) error
- func (m *NotificationMutation) AddReadByIDs(ids ...uuid.UUID)
- func (m *NotificationMutation) AddReceiverIDs(ids ...uuid.UUID)
- func (m *NotificationMutation) AddedEdges() []string
- func (m *NotificationMutation) AddedField(name string) (ent.Value, bool)
- func (m *NotificationMutation) AddedFields() []string
- func (m *NotificationMutation) AddedIDs(name string) []ent.Value
- func (m *NotificationMutation) ClearComment()
- func (m *NotificationMutation) ClearCommentID()
- func (m *NotificationMutation) ClearEdge(name string) error
- func (m *NotificationMutation) ClearField(name string) error
- func (m *NotificationMutation) ClearPost()
- func (m *NotificationMutation) ClearPostID()
- func (m *NotificationMutation) ClearReadBy()
- func (m *NotificationMutation) ClearReceivers()
- func (m *NotificationMutation) ClearReply()
- func (m *NotificationMutation) ClearReplyID()
- func (m *NotificationMutation) ClearSender()
- func (m *NotificationMutation) ClearSenderID()
- func (m *NotificationMutation) ClearText()
- func (m *NotificationMutation) ClearedEdges() []string
- func (m *NotificationMutation) ClearedFields() []string
- func (m NotificationMutation) Client() *Client
- func (m *NotificationMutation) CommentCleared() bool
- func (m *NotificationMutation) CommentID() (r uuid.UUID, exists bool)
- func (m *NotificationMutation) CommentIDCleared() bool
- func (m *NotificationMutation) CommentIDs() (ids []uuid.UUID)
- func (m *NotificationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *NotificationMutation) EdgeCleared(name string) bool
- func (m *NotificationMutation) Field(name string) (ent.Value, bool)
- func (m *NotificationMutation) FieldCleared(name string) bool
- func (m *NotificationMutation) Fields() []string
- func (m *NotificationMutation) ID() (id uuid.UUID, exists bool)
- func (m *NotificationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *NotificationMutation) Ntype() (r notification.Ntype, exists bool)
- func (m *NotificationMutation) OldCommentID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *NotificationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NotificationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NotificationMutation) OldNtype(ctx context.Context) (v notification.Ntype, err error)
- func (m *NotificationMutation) OldPostID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *NotificationMutation) OldReplyID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *NotificationMutation) OldSenderID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *NotificationMutation) OldText(ctx context.Context) (v *string, err error)
- func (m *NotificationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NotificationMutation) Op() Op
- func (m *NotificationMutation) PostCleared() bool
- func (m *NotificationMutation) PostID() (r uuid.UUID, exists bool)
- func (m *NotificationMutation) PostIDCleared() bool
- func (m *NotificationMutation) PostIDs() (ids []uuid.UUID)
- func (m *NotificationMutation) ReadByCleared() bool
- func (m *NotificationMutation) ReadByIDs() (ids []uuid.UUID)
- func (m *NotificationMutation) ReceiversCleared() bool
- func (m *NotificationMutation) ReceiversIDs() (ids []uuid.UUID)
- func (m *NotificationMutation) RemoveReadByIDs(ids ...uuid.UUID)
- func (m *NotificationMutation) RemoveReceiverIDs(ids ...uuid.UUID)
- func (m *NotificationMutation) RemovedEdges() []string
- func (m *NotificationMutation) RemovedIDs(name string) []ent.Value
- func (m *NotificationMutation) RemovedReadByIDs() (ids []uuid.UUID)
- func (m *NotificationMutation) RemovedReceiversIDs() (ids []uuid.UUID)
- func (m *NotificationMutation) ReplyCleared() bool
- func (m *NotificationMutation) ReplyID() (r uuid.UUID, exists bool)
- func (m *NotificationMutation) ReplyIDCleared() bool
- func (m *NotificationMutation) ReplyIDs() (ids []uuid.UUID)
- func (m *NotificationMutation) ResetComment()
- func (m *NotificationMutation) ResetCommentID()
- func (m *NotificationMutation) ResetCreatedAt()
- func (m *NotificationMutation) ResetEdge(name string) error
- func (m *NotificationMutation) ResetField(name string) error
- func (m *NotificationMutation) ResetNtype()
- func (m *NotificationMutation) ResetPost()
- func (m *NotificationMutation) ResetPostID()
- func (m *NotificationMutation) ResetReadBy()
- func (m *NotificationMutation) ResetReceivers()
- func (m *NotificationMutation) ResetReply()
- func (m *NotificationMutation) ResetReplyID()
- func (m *NotificationMutation) ResetSender()
- func (m *NotificationMutation) ResetSenderID()
- func (m *NotificationMutation) ResetText()
- func (m *NotificationMutation) ResetUpdatedAt()
- func (m *NotificationMutation) SenderCleared() bool
- func (m *NotificationMutation) SenderID() (r uuid.UUID, exists bool)
- func (m *NotificationMutation) SenderIDCleared() bool
- func (m *NotificationMutation) SenderIDs() (ids []uuid.UUID)
- func (m *NotificationMutation) SetCommentID(u uuid.UUID)
- func (m *NotificationMutation) SetCreatedAt(t time.Time)
- func (m *NotificationMutation) SetField(name string, value ent.Value) error
- func (m *NotificationMutation) SetID(id uuid.UUID)
- func (m *NotificationMutation) SetNtype(n notification.Ntype)
- func (m *NotificationMutation) SetOp(op Op)
- func (m *NotificationMutation) SetPostID(u uuid.UUID)
- func (m *NotificationMutation) SetReplyID(u uuid.UUID)
- func (m *NotificationMutation) SetSenderID(u uuid.UUID)
- func (m *NotificationMutation) SetText(s string)
- func (m *NotificationMutation) SetUpdatedAt(t time.Time)
- func (m *NotificationMutation) Text() (r string, exists bool)
- func (m *NotificationMutation) TextCleared() bool
- func (m NotificationMutation) Tx() (*Tx, error)
- func (m *NotificationMutation) Type() string
- func (m *NotificationMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *NotificationMutation) Where(ps ...predicate.Notification)
- func (m *NotificationMutation) WhereP(ps ...func(*sql.Selector))
- type NotificationQuery
- func (nq *NotificationQuery) Aggregate(fns ...AggregateFunc) *NotificationSelect
- func (nq *NotificationQuery) All(ctx context.Context) ([]*Notification, error)
- func (nq *NotificationQuery) AllX(ctx context.Context) []*Notification
- func (nq *NotificationQuery) Clone() *NotificationQuery
- func (nq *NotificationQuery) Count(ctx context.Context) (int, error)
- func (nq *NotificationQuery) CountX(ctx context.Context) int
- func (nq *NotificationQuery) Exist(ctx context.Context) (bool, error)
- func (nq *NotificationQuery) ExistX(ctx context.Context) bool
- func (nq *NotificationQuery) First(ctx context.Context) (*Notification, error)
- func (nq *NotificationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (nq *NotificationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (nq *NotificationQuery) FirstX(ctx context.Context) *Notification
- func (nq *NotificationQuery) GroupBy(field string, fields ...string) *NotificationGroupBy
- func (nq *NotificationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (nq *NotificationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (nq *NotificationQuery) Limit(limit int) *NotificationQuery
- func (nq *NotificationQuery) Offset(offset int) *NotificationQuery
- func (nq *NotificationQuery) Only(ctx context.Context) (*Notification, error)
- func (nq *NotificationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (nq *NotificationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (nq *NotificationQuery) OnlyX(ctx context.Context) *Notification
- func (nq *NotificationQuery) Order(o ...notification.OrderOption) *NotificationQuery
- func (nq *NotificationQuery) QueryComment() *CommentQuery
- func (nq *NotificationQuery) QueryPost() *PostQuery
- func (nq *NotificationQuery) QueryReadBy() *UserQuery
- func (nq *NotificationQuery) QueryReceivers() *UserQuery
- func (nq *NotificationQuery) QueryReply() *ReplyQuery
- func (nq *NotificationQuery) QuerySender() *UserQuery
- func (nq *NotificationQuery) Select(fields ...string) *NotificationSelect
- func (nq *NotificationQuery) Unique(unique bool) *NotificationQuery
- func (nq *NotificationQuery) Where(ps ...predicate.Notification) *NotificationQuery
- func (nq *NotificationQuery) WithComment(opts ...func(*CommentQuery)) *NotificationQuery
- func (nq *NotificationQuery) WithPost(opts ...func(*PostQuery)) *NotificationQuery
- func (nq *NotificationQuery) WithReadBy(opts ...func(*UserQuery)) *NotificationQuery
- func (nq *NotificationQuery) WithReceivers(opts ...func(*UserQuery)) *NotificationQuery
- func (nq *NotificationQuery) WithReply(opts ...func(*ReplyQuery)) *NotificationQuery
- func (nq *NotificationQuery) WithSender(opts ...func(*UserQuery)) *NotificationQuery
- type NotificationSelect
- func (ns *NotificationSelect) Aggregate(fns ...AggregateFunc) *NotificationSelect
- func (s *NotificationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NotificationSelect) BoolX(ctx context.Context) bool
- func (s *NotificationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NotificationSelect) BoolsX(ctx context.Context) []bool
- func (s *NotificationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NotificationSelect) Float64X(ctx context.Context) float64
- func (s *NotificationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NotificationSelect) Float64sX(ctx context.Context) []float64
- func (s *NotificationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NotificationSelect) IntX(ctx context.Context) int
- func (s *NotificationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NotificationSelect) IntsX(ctx context.Context) []int
- func (ns *NotificationSelect) Scan(ctx context.Context, v any) error
- func (s *NotificationSelect) ScanX(ctx context.Context, v any)
- func (s *NotificationSelect) String(ctx context.Context) (_ string, err error)
- func (s *NotificationSelect) StringX(ctx context.Context) string
- func (s *NotificationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NotificationSelect) StringsX(ctx context.Context) []string
- type NotificationUpdate
- func (nu *NotificationUpdate) AddReadBy(u ...*User) *NotificationUpdate
- func (nu *NotificationUpdate) AddReadByIDs(ids ...uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) AddReceiverIDs(ids ...uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) AddReceivers(u ...*User) *NotificationUpdate
- func (nu *NotificationUpdate) ClearComment() *NotificationUpdate
- func (nu *NotificationUpdate) ClearCommentID() *NotificationUpdate
- func (nu *NotificationUpdate) ClearPost() *NotificationUpdate
- func (nu *NotificationUpdate) ClearPostID() *NotificationUpdate
- func (nu *NotificationUpdate) ClearReadBy() *NotificationUpdate
- func (nu *NotificationUpdate) ClearReceivers() *NotificationUpdate
- func (nu *NotificationUpdate) ClearReply() *NotificationUpdate
- func (nu *NotificationUpdate) ClearReplyID() *NotificationUpdate
- func (nu *NotificationUpdate) ClearSender() *NotificationUpdate
- func (nu *NotificationUpdate) ClearSenderID() *NotificationUpdate
- func (nu *NotificationUpdate) ClearText() *NotificationUpdate
- func (nu *NotificationUpdate) Exec(ctx context.Context) error
- func (nu *NotificationUpdate) ExecX(ctx context.Context)
- func (nu *NotificationUpdate) Mutation() *NotificationMutation
- func (nu *NotificationUpdate) RemoveReadBy(u ...*User) *NotificationUpdate
- func (nu *NotificationUpdate) RemoveReadByIDs(ids ...uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) RemoveReceiverIDs(ids ...uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) RemoveReceivers(u ...*User) *NotificationUpdate
- func (nu *NotificationUpdate) Save(ctx context.Context) (int, error)
- func (nu *NotificationUpdate) SaveX(ctx context.Context) int
- func (nu *NotificationUpdate) SetComment(c *Comment) *NotificationUpdate
- func (nu *NotificationUpdate) SetCommentID(u uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) SetCreatedAt(t time.Time) *NotificationUpdate
- func (nu *NotificationUpdate) SetNillableCommentID(u *uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) SetNillableCreatedAt(t *time.Time) *NotificationUpdate
- func (nu *NotificationUpdate) SetNillableNtype(n *notification.Ntype) *NotificationUpdate
- func (nu *NotificationUpdate) SetNillablePostID(u *uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) SetNillableReplyID(u *uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) SetNillableSenderID(u *uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) SetNillableText(s *string) *NotificationUpdate
- func (nu *NotificationUpdate) SetNtype(n notification.Ntype) *NotificationUpdate
- func (nu *NotificationUpdate) SetPost(p *Post) *NotificationUpdate
- func (nu *NotificationUpdate) SetPostID(u uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) SetReply(r *Reply) *NotificationUpdate
- func (nu *NotificationUpdate) SetReplyID(u uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) SetSender(u *User) *NotificationUpdate
- func (nu *NotificationUpdate) SetSenderID(u uuid.UUID) *NotificationUpdate
- func (nu *NotificationUpdate) SetText(s string) *NotificationUpdate
- func (nu *NotificationUpdate) SetUpdatedAt(t time.Time) *NotificationUpdate
- func (nu *NotificationUpdate) Where(ps ...predicate.Notification) *NotificationUpdate
- type NotificationUpdateOne
- func (nuo *NotificationUpdateOne) AddReadBy(u ...*User) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) AddReadByIDs(ids ...uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) AddReceiverIDs(ids ...uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) AddReceivers(u ...*User) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearComment() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearCommentID() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearPost() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearPostID() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearReadBy() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearReceivers() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearReply() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearReplyID() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearSender() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearSenderID() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearText() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) Exec(ctx context.Context) error
- func (nuo *NotificationUpdateOne) ExecX(ctx context.Context)
- func (nuo *NotificationUpdateOne) Mutation() *NotificationMutation
- func (nuo *NotificationUpdateOne) RemoveReadBy(u ...*User) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) RemoveReadByIDs(ids ...uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) RemoveReceiverIDs(ids ...uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) RemoveReceivers(u ...*User) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) Save(ctx context.Context) (*Notification, error)
- func (nuo *NotificationUpdateOne) SaveX(ctx context.Context) *Notification
- func (nuo *NotificationUpdateOne) Select(field string, fields ...string) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetComment(c *Comment) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetCommentID(u uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetCreatedAt(t time.Time) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetNillableCommentID(u *uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetNillableCreatedAt(t *time.Time) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetNillableNtype(n *notification.Ntype) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetNillablePostID(u *uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetNillableReplyID(u *uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetNillableSenderID(u *uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetNillableText(s *string) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetNtype(n notification.Ntype) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetPost(p *Post) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetPostID(u uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetReply(r *Reply) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetReplyID(u uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetSender(u *User) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetSenderID(u uuid.UUID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetText(s string) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetUpdatedAt(t time.Time) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) Where(ps ...predicate.Notification) *NotificationUpdateOne
- type Notifications
- type Op
- type Option
- type OrderFunc
- type Otp
- type OtpClient
- func (c *OtpClient) Create() *OtpCreate
- func (c *OtpClient) CreateBulk(builders ...*OtpCreate) *OtpCreateBulk
- func (c *OtpClient) Delete() *OtpDelete
- func (c *OtpClient) DeleteOne(o *Otp) *OtpDeleteOne
- func (c *OtpClient) DeleteOneID(id uuid.UUID) *OtpDeleteOne
- func (c *OtpClient) Get(ctx context.Context, id uuid.UUID) (*Otp, error)
- func (c *OtpClient) GetX(ctx context.Context, id uuid.UUID) *Otp
- func (c *OtpClient) Hooks() []Hook
- func (c *OtpClient) Intercept(interceptors ...Interceptor)
- func (c *OtpClient) Interceptors() []Interceptor
- func (c *OtpClient) MapCreateBulk(slice any, setFunc func(*OtpCreate, int)) *OtpCreateBulk
- func (c *OtpClient) Query() *OtpQuery
- func (c *OtpClient) QueryUser(o *Otp) *UserQuery
- func (c *OtpClient) Update() *OtpUpdate
- func (c *OtpClient) UpdateOne(o *Otp) *OtpUpdateOne
- func (c *OtpClient) UpdateOneID(id uuid.UUID) *OtpUpdateOne
- func (c *OtpClient) Use(hooks ...Hook)
- type OtpCreate
- func (oc *OtpCreate) Exec(ctx context.Context) error
- func (oc *OtpCreate) ExecX(ctx context.Context)
- func (oc *OtpCreate) Mutation() *OtpMutation
- func (oc *OtpCreate) Save(ctx context.Context) (*Otp, error)
- func (oc *OtpCreate) SaveX(ctx context.Context) *Otp
- func (oc *OtpCreate) SetCode(u uint32) *OtpCreate
- func (oc *OtpCreate) SetCreatedAt(t time.Time) *OtpCreate
- func (oc *OtpCreate) SetID(u uuid.UUID) *OtpCreate
- func (oc *OtpCreate) SetNillableCreatedAt(t *time.Time) *OtpCreate
- func (oc *OtpCreate) SetNillableID(u *uuid.UUID) *OtpCreate
- func (oc *OtpCreate) SetNillableUpdatedAt(t *time.Time) *OtpCreate
- func (oc *OtpCreate) SetUpdatedAt(t time.Time) *OtpCreate
- func (oc *OtpCreate) SetUser(u *User) *OtpCreate
- func (oc *OtpCreate) SetUserID(u uuid.UUID) *OtpCreate
- type OtpCreateBulk
- type OtpDelete
- type OtpDeleteOne
- type OtpEdges
- type OtpGroupBy
- func (ogb *OtpGroupBy) Aggregate(fns ...AggregateFunc) *OtpGroupBy
- func (s *OtpGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OtpGroupBy) BoolX(ctx context.Context) bool
- func (s *OtpGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OtpGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OtpGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OtpGroupBy) Float64X(ctx context.Context) float64
- func (s *OtpGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OtpGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OtpGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OtpGroupBy) IntX(ctx context.Context) int
- func (s *OtpGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OtpGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OtpGroupBy) Scan(ctx context.Context, v any) error
- func (s *OtpGroupBy) ScanX(ctx context.Context, v any)
- func (s *OtpGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OtpGroupBy) StringX(ctx context.Context) string
- func (s *OtpGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OtpGroupBy) StringsX(ctx context.Context) []string
- type OtpMutation
- func (m *OtpMutation) AddCode(u int32)
- func (m *OtpMutation) AddField(name string, value ent.Value) error
- func (m *OtpMutation) AddedCode() (r int32, exists bool)
- func (m *OtpMutation) AddedEdges() []string
- func (m *OtpMutation) AddedField(name string) (ent.Value, bool)
- func (m *OtpMutation) AddedFields() []string
- func (m *OtpMutation) AddedIDs(name string) []ent.Value
- func (m *OtpMutation) ClearEdge(name string) error
- func (m *OtpMutation) ClearField(name string) error
- func (m *OtpMutation) ClearUser()
- func (m *OtpMutation) ClearedEdges() []string
- func (m *OtpMutation) ClearedFields() []string
- func (m OtpMutation) Client() *Client
- func (m *OtpMutation) Code() (r uint32, exists bool)
- func (m *OtpMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OtpMutation) EdgeCleared(name string) bool
- func (m *OtpMutation) Field(name string) (ent.Value, bool)
- func (m *OtpMutation) FieldCleared(name string) bool
- func (m *OtpMutation) Fields() []string
- func (m *OtpMutation) ID() (id uuid.UUID, exists bool)
- func (m *OtpMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *OtpMutation) OldCode(ctx context.Context) (v uint32, err error)
- func (m *OtpMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OtpMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OtpMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OtpMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OtpMutation) Op() Op
- func (m *OtpMutation) RemovedEdges() []string
- func (m *OtpMutation) RemovedIDs(name string) []ent.Value
- func (m *OtpMutation) ResetCode()
- func (m *OtpMutation) ResetCreatedAt()
- func (m *OtpMutation) ResetEdge(name string) error
- func (m *OtpMutation) ResetField(name string) error
- func (m *OtpMutation) ResetUpdatedAt()
- func (m *OtpMutation) ResetUser()
- func (m *OtpMutation) ResetUserID()
- func (m *OtpMutation) SetCode(u uint32)
- func (m *OtpMutation) SetCreatedAt(t time.Time)
- func (m *OtpMutation) SetField(name string, value ent.Value) error
- func (m *OtpMutation) SetID(id uuid.UUID)
- func (m *OtpMutation) SetOp(op Op)
- func (m *OtpMutation) SetUpdatedAt(t time.Time)
- func (m *OtpMutation) SetUserID(u uuid.UUID)
- func (m OtpMutation) Tx() (*Tx, error)
- func (m *OtpMutation) Type() string
- func (m *OtpMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OtpMutation) UserCleared() bool
- func (m *OtpMutation) UserID() (r uuid.UUID, exists bool)
- func (m *OtpMutation) UserIDs() (ids []uuid.UUID)
- func (m *OtpMutation) Where(ps ...predicate.Otp)
- func (m *OtpMutation) WhereP(ps ...func(*sql.Selector))
- type OtpQuery
- func (oq *OtpQuery) Aggregate(fns ...AggregateFunc) *OtpSelect
- func (oq *OtpQuery) All(ctx context.Context) ([]*Otp, error)
- func (oq *OtpQuery) AllX(ctx context.Context) []*Otp
- func (oq *OtpQuery) Clone() *OtpQuery
- func (oq *OtpQuery) Count(ctx context.Context) (int, error)
- func (oq *OtpQuery) CountX(ctx context.Context) int
- func (oq *OtpQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OtpQuery) ExistX(ctx context.Context) bool
- func (oq *OtpQuery) First(ctx context.Context) (*Otp, error)
- func (oq *OtpQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (oq *OtpQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (oq *OtpQuery) FirstX(ctx context.Context) *Otp
- func (oq *OtpQuery) GroupBy(field string, fields ...string) *OtpGroupBy
- func (oq *OtpQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (oq *OtpQuery) IDsX(ctx context.Context) []uuid.UUID
- func (oq *OtpQuery) Limit(limit int) *OtpQuery
- func (oq *OtpQuery) Offset(offset int) *OtpQuery
- func (oq *OtpQuery) Only(ctx context.Context) (*Otp, error)
- func (oq *OtpQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (oq *OtpQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (oq *OtpQuery) OnlyX(ctx context.Context) *Otp
- func (oq *OtpQuery) Order(o ...otp.OrderOption) *OtpQuery
- func (oq *OtpQuery) QueryUser() *UserQuery
- func (oq *OtpQuery) Select(fields ...string) *OtpSelect
- func (oq *OtpQuery) Unique(unique bool) *OtpQuery
- func (oq *OtpQuery) Where(ps ...predicate.Otp) *OtpQuery
- func (oq *OtpQuery) WithUser(opts ...func(*UserQuery)) *OtpQuery
- type OtpSelect
- func (os *OtpSelect) Aggregate(fns ...AggregateFunc) *OtpSelect
- func (s *OtpSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OtpSelect) BoolX(ctx context.Context) bool
- func (s *OtpSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OtpSelect) BoolsX(ctx context.Context) []bool
- func (s *OtpSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OtpSelect) Float64X(ctx context.Context) float64
- func (s *OtpSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OtpSelect) Float64sX(ctx context.Context) []float64
- func (s *OtpSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OtpSelect) IntX(ctx context.Context) int
- func (s *OtpSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OtpSelect) IntsX(ctx context.Context) []int
- func (os *OtpSelect) Scan(ctx context.Context, v any) error
- func (s *OtpSelect) ScanX(ctx context.Context, v any)
- func (s *OtpSelect) String(ctx context.Context) (_ string, err error)
- func (s *OtpSelect) StringX(ctx context.Context) string
- func (s *OtpSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OtpSelect) StringsX(ctx context.Context) []string
- type OtpUpdate
- func (ou *OtpUpdate) AddCode(u int32) *OtpUpdate
- func (ou *OtpUpdate) ClearUser() *OtpUpdate
- func (ou *OtpUpdate) Exec(ctx context.Context) error
- func (ou *OtpUpdate) ExecX(ctx context.Context)
- func (ou *OtpUpdate) Mutation() *OtpMutation
- func (ou *OtpUpdate) Save(ctx context.Context) (int, error)
- func (ou *OtpUpdate) SaveX(ctx context.Context) int
- func (ou *OtpUpdate) SetCode(u uint32) *OtpUpdate
- func (ou *OtpUpdate) SetCreatedAt(t time.Time) *OtpUpdate
- func (ou *OtpUpdate) SetNillableCode(u *uint32) *OtpUpdate
- func (ou *OtpUpdate) SetNillableCreatedAt(t *time.Time) *OtpUpdate
- func (ou *OtpUpdate) SetNillableUserID(u *uuid.UUID) *OtpUpdate
- func (ou *OtpUpdate) SetUpdatedAt(t time.Time) *OtpUpdate
- func (ou *OtpUpdate) SetUser(u *User) *OtpUpdate
- func (ou *OtpUpdate) SetUserID(u uuid.UUID) *OtpUpdate
- func (ou *OtpUpdate) Where(ps ...predicate.Otp) *OtpUpdate
- type OtpUpdateOne
- func (ouo *OtpUpdateOne) AddCode(u int32) *OtpUpdateOne
- func (ouo *OtpUpdateOne) ClearUser() *OtpUpdateOne
- func (ouo *OtpUpdateOne) Exec(ctx context.Context) error
- func (ouo *OtpUpdateOne) ExecX(ctx context.Context)
- func (ouo *OtpUpdateOne) Mutation() *OtpMutation
- func (ouo *OtpUpdateOne) Save(ctx context.Context) (*Otp, error)
- func (ouo *OtpUpdateOne) SaveX(ctx context.Context) *Otp
- func (ouo *OtpUpdateOne) Select(field string, fields ...string) *OtpUpdateOne
- func (ouo *OtpUpdateOne) SetCode(u uint32) *OtpUpdateOne
- func (ouo *OtpUpdateOne) SetCreatedAt(t time.Time) *OtpUpdateOne
- func (ouo *OtpUpdateOne) SetNillableCode(u *uint32) *OtpUpdateOne
- func (ouo *OtpUpdateOne) SetNillableCreatedAt(t *time.Time) *OtpUpdateOne
- func (ouo *OtpUpdateOne) SetNillableUserID(u *uuid.UUID) *OtpUpdateOne
- func (ouo *OtpUpdateOne) SetUpdatedAt(t time.Time) *OtpUpdateOne
- func (ouo *OtpUpdateOne) SetUser(u *User) *OtpUpdateOne
- func (ouo *OtpUpdateOne) SetUserID(u uuid.UUID) *OtpUpdateOne
- func (ouo *OtpUpdateOne) Where(ps ...predicate.Otp) *OtpUpdateOne
- type Otps
- type Policy
- type Post
- func (po *Post) QueryAuthor() *UserQuery
- func (po *Post) QueryComments() *CommentQuery
- func (po *Post) QueryImage() *FileQuery
- func (po *Post) QueryNotifications() *NotificationQuery
- func (po *Post) QueryReactions() *ReactionQuery
- func (po *Post) String() string
- func (po *Post) Unwrap() *Post
- func (po *Post) Update() *PostUpdateOne
- func (po *Post) Value(name string) (ent.Value, error)
- 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) Intercept(interceptors ...Interceptor)
- func (c *PostClient) Interceptors() []Interceptor
- func (c *PostClient) MapCreateBulk(slice any, setFunc func(*PostCreate, int)) *PostCreateBulk
- func (c *PostClient) Query() *PostQuery
- func (c *PostClient) QueryAuthor(po *Post) *UserQuery
- func (c *PostClient) QueryComments(po *Post) *CommentQuery
- func (c *PostClient) QueryImage(po *Post) *FileQuery
- func (c *PostClient) QueryNotifications(po *Post) *NotificationQuery
- func (c *PostClient) QueryReactions(po *Post) *ReactionQuery
- 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) AddCommentIDs(ids ...uuid.UUID) *PostCreate
- func (pc *PostCreate) AddComments(c ...*Comment) *PostCreate
- func (pc *PostCreate) AddNotificationIDs(ids ...uuid.UUID) *PostCreate
- func (pc *PostCreate) AddNotifications(n ...*Notification) *PostCreate
- func (pc *PostCreate) AddReactionIDs(ids ...uuid.UUID) *PostCreate
- func (pc *PostCreate) AddReactions(r ...*Reaction) *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) SetAuthor(u *User) *PostCreate
- func (pc *PostCreate) SetAuthorID(u uuid.UUID) *PostCreate
- func (pc *PostCreate) SetCreatedAt(t time.Time) *PostCreate
- func (pc *PostCreate) SetID(u uuid.UUID) *PostCreate
- func (pc *PostCreate) SetImage(f *File) *PostCreate
- func (pc *PostCreate) SetImageID(u uuid.UUID) *PostCreate
- func (pc *PostCreate) SetNillableCreatedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetNillableID(u *uuid.UUID) *PostCreate
- func (pc *PostCreate) SetNillableImageID(u *uuid.UUID) *PostCreate
- func (pc *PostCreate) SetNillableUpdatedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetSlug(s string) *PostCreate
- func (pc *PostCreate) SetText(s string) *PostCreate
- func (pc *PostCreate) SetUpdatedAt(t time.Time) *PostCreate
- type PostCreateBulk
- type PostDelete
- type PostDeleteOne
- type PostEdges
- 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) AddCommentIDs(ids ...uuid.UUID)
- func (m *PostMutation) AddField(name string, value ent.Value) error
- func (m *PostMutation) AddNotificationIDs(ids ...uuid.UUID)
- func (m *PostMutation) AddReactionIDs(ids ...uuid.UUID)
- func (m *PostMutation) AddedEdges() []string
- func (m *PostMutation) AddedField(name string) (ent.Value, bool)
- func (m *PostMutation) AddedFields() []string
- func (m *PostMutation) AddedIDs(name string) []ent.Value
- func (m *PostMutation) AuthorCleared() bool
- func (m *PostMutation) AuthorID() (r uuid.UUID, exists bool)
- func (m *PostMutation) AuthorIDs() (ids []uuid.UUID)
- func (m *PostMutation) ClearAuthor()
- func (m *PostMutation) ClearComments()
- func (m *PostMutation) ClearEdge(name string) error
- func (m *PostMutation) ClearField(name string) error
- func (m *PostMutation) ClearImage()
- func (m *PostMutation) ClearImageID()
- func (m *PostMutation) ClearNotifications()
- func (m *PostMutation) ClearReactions()
- func (m *PostMutation) ClearedEdges() []string
- func (m *PostMutation) ClearedFields() []string
- func (m PostMutation) Client() *Client
- func (m *PostMutation) CommentsCleared() bool
- func (m *PostMutation) CommentsIDs() (ids []uuid.UUID)
- 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) ID() (id uuid.UUID, exists bool)
- func (m *PostMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *PostMutation) ImageCleared() bool
- func (m *PostMutation) ImageID() (r uuid.UUID, exists bool)
- func (m *PostMutation) ImageIDCleared() bool
- func (m *PostMutation) ImageIDs() (ids []uuid.UUID)
- func (m *PostMutation) NotificationsCleared() bool
- func (m *PostMutation) NotificationsIDs() (ids []uuid.UUID)
- func (m *PostMutation) OldAuthorID(ctx context.Context) (v uuid.UUID, err error)
- 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) OldImageID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *PostMutation) OldSlug(ctx context.Context) (v string, err error)
- func (m *PostMutation) OldText(ctx context.Context) (v string, err error)
- func (m *PostMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PostMutation) Op() Op
- func (m *PostMutation) ReactionsCleared() bool
- func (m *PostMutation) ReactionsIDs() (ids []uuid.UUID)
- func (m *PostMutation) RemoveCommentIDs(ids ...uuid.UUID)
- func (m *PostMutation) RemoveNotificationIDs(ids ...uuid.UUID)
- func (m *PostMutation) RemoveReactionIDs(ids ...uuid.UUID)
- func (m *PostMutation) RemovedCommentsIDs() (ids []uuid.UUID)
- func (m *PostMutation) RemovedEdges() []string
- func (m *PostMutation) RemovedIDs(name string) []ent.Value
- func (m *PostMutation) RemovedNotificationsIDs() (ids []uuid.UUID)
- func (m *PostMutation) RemovedReactionsIDs() (ids []uuid.UUID)
- func (m *PostMutation) ResetAuthor()
- func (m *PostMutation) ResetAuthorID()
- func (m *PostMutation) ResetComments()
- func (m *PostMutation) ResetCreatedAt()
- func (m *PostMutation) ResetEdge(name string) error
- func (m *PostMutation) ResetField(name string) error
- func (m *PostMutation) ResetImage()
- func (m *PostMutation) ResetImageID()
- func (m *PostMutation) ResetNotifications()
- func (m *PostMutation) ResetReactions()
- func (m *PostMutation) ResetSlug()
- func (m *PostMutation) ResetText()
- func (m *PostMutation) ResetUpdatedAt()
- func (m *PostMutation) SetAuthorID(u uuid.UUID)
- func (m *PostMutation) SetCreatedAt(t time.Time)
- func (m *PostMutation) SetField(name string, value ent.Value) error
- func (m *PostMutation) SetID(id uuid.UUID)
- func (m *PostMutation) SetImageID(u uuid.UUID)
- func (m *PostMutation) SetOp(op Op)
- func (m *PostMutation) SetSlug(s string)
- func (m *PostMutation) SetText(s string)
- func (m *PostMutation) SetUpdatedAt(t time.Time)
- func (m *PostMutation) Slug() (r string, exists bool)
- func (m *PostMutation) Text() (r string, exists bool)
- func (m PostMutation) Tx() (*Tx, error)
- func (m *PostMutation) Type() string
- func (m *PostMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PostMutation) Where(ps ...predicate.Post)
- func (m *PostMutation) WhereP(ps ...func(*sql.Selector))
- 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) (ids []uuid.UUID, err 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 ...post.OrderOption) *PostQuery
- func (pq *PostQuery) QueryAuthor() *UserQuery
- func (pq *PostQuery) QueryComments() *CommentQuery
- func (pq *PostQuery) QueryImage() *FileQuery
- func (pq *PostQuery) QueryNotifications() *NotificationQuery
- func (pq *PostQuery) QueryReactions() *ReactionQuery
- func (pq *PostQuery) Select(fields ...string) *PostSelect
- func (pq *PostQuery) Unique(unique bool) *PostQuery
- func (pq *PostQuery) Where(ps ...predicate.Post) *PostQuery
- func (pq *PostQuery) WithAuthor(opts ...func(*UserQuery)) *PostQuery
- func (pq *PostQuery) WithComments(opts ...func(*CommentQuery)) *PostQuery
- func (pq *PostQuery) WithImage(opts ...func(*FileQuery)) *PostQuery
- func (pq *PostQuery) WithNotifications(opts ...func(*NotificationQuery)) *PostQuery
- func (pq *PostQuery) WithReactions(opts ...func(*ReactionQuery)) *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) AddCommentIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) AddComments(c ...*Comment) *PostUpdate
- func (pu *PostUpdate) AddNotificationIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) AddNotifications(n ...*Notification) *PostUpdate
- func (pu *PostUpdate) AddReactionIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) AddReactions(r ...*Reaction) *PostUpdate
- func (pu *PostUpdate) ClearAuthor() *PostUpdate
- func (pu *PostUpdate) ClearComments() *PostUpdate
- func (pu *PostUpdate) ClearImage() *PostUpdate
- func (pu *PostUpdate) ClearImageID() *PostUpdate
- func (pu *PostUpdate) ClearNotifications() *PostUpdate
- func (pu *PostUpdate) ClearReactions() *PostUpdate
- func (pu *PostUpdate) Exec(ctx context.Context) error
- func (pu *PostUpdate) ExecX(ctx context.Context)
- func (pu *PostUpdate) Mutation() *PostMutation
- func (pu *PostUpdate) RemoveCommentIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) RemoveComments(c ...*Comment) *PostUpdate
- func (pu *PostUpdate) RemoveNotificationIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) RemoveNotifications(n ...*Notification) *PostUpdate
- func (pu *PostUpdate) RemoveReactionIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) RemoveReactions(r ...*Reaction) *PostUpdate
- func (pu *PostUpdate) Save(ctx context.Context) (int, error)
- func (pu *PostUpdate) SaveX(ctx context.Context) int
- func (pu *PostUpdate) SetAuthor(u *User) *PostUpdate
- func (pu *PostUpdate) SetAuthorID(u uuid.UUID) *PostUpdate
- func (pu *PostUpdate) SetCreatedAt(t time.Time) *PostUpdate
- func (pu *PostUpdate) SetImage(f *File) *PostUpdate
- func (pu *PostUpdate) SetImageID(u uuid.UUID) *PostUpdate
- func (pu *PostUpdate) SetNillableAuthorID(u *uuid.UUID) *PostUpdate
- func (pu *PostUpdate) SetNillableCreatedAt(t *time.Time) *PostUpdate
- func (pu *PostUpdate) SetNillableImageID(u *uuid.UUID) *PostUpdate
- func (pu *PostUpdate) SetNillableSlug(s *string) *PostUpdate
- func (pu *PostUpdate) SetNillableText(s *string) *PostUpdate
- func (pu *PostUpdate) SetSlug(s string) *PostUpdate
- func (pu *PostUpdate) SetText(s string) *PostUpdate
- func (pu *PostUpdate) SetUpdatedAt(t time.Time) *PostUpdate
- func (pu *PostUpdate) Where(ps ...predicate.Post) *PostUpdate
- type PostUpdateOne
- func (puo *PostUpdateOne) AddCommentIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) AddComments(c ...*Comment) *PostUpdateOne
- func (puo *PostUpdateOne) AddNotificationIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) AddNotifications(n ...*Notification) *PostUpdateOne
- func (puo *PostUpdateOne) AddReactionIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) AddReactions(r ...*Reaction) *PostUpdateOne
- func (puo *PostUpdateOne) ClearAuthor() *PostUpdateOne
- func (puo *PostUpdateOne) ClearComments() *PostUpdateOne
- func (puo *PostUpdateOne) ClearImage() *PostUpdateOne
- func (puo *PostUpdateOne) ClearImageID() *PostUpdateOne
- func (puo *PostUpdateOne) ClearNotifications() *PostUpdateOne
- func (puo *PostUpdateOne) ClearReactions() *PostUpdateOne
- func (puo *PostUpdateOne) Exec(ctx context.Context) error
- func (puo *PostUpdateOne) ExecX(ctx context.Context)
- func (puo *PostUpdateOne) Mutation() *PostMutation
- func (puo *PostUpdateOne) RemoveCommentIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveComments(c ...*Comment) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveNotificationIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveNotifications(n ...*Notification) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveReactionIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveReactions(r ...*Reaction) *PostUpdateOne
- 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) SetAuthor(u *User) *PostUpdateOne
- func (puo *PostUpdateOne) SetAuthorID(u uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) SetCreatedAt(t time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetImage(f *File) *PostUpdateOne
- func (puo *PostUpdateOne) SetImageID(u uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableAuthorID(u *uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableCreatedAt(t *time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableImageID(u *uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableSlug(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableText(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetSlug(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetText(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetUpdatedAt(t time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) Where(ps ...predicate.Post) *PostUpdateOne
- type Posts
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Reaction
- func (r *Reaction) QueryComment() *CommentQuery
- func (r *Reaction) QueryPost() *PostQuery
- func (r *Reaction) QueryReply() *ReplyQuery
- func (r *Reaction) QueryUser() *UserQuery
- func (r *Reaction) String() string
- func (r *Reaction) Unwrap() *Reaction
- func (r *Reaction) Update() *ReactionUpdateOne
- func (r *Reaction) Value(name string) (ent.Value, error)
- type ReactionClient
- func (c *ReactionClient) Create() *ReactionCreate
- func (c *ReactionClient) CreateBulk(builders ...*ReactionCreate) *ReactionCreateBulk
- func (c *ReactionClient) Delete() *ReactionDelete
- func (c *ReactionClient) DeleteOne(r *Reaction) *ReactionDeleteOne
- func (c *ReactionClient) DeleteOneID(id uuid.UUID) *ReactionDeleteOne
- func (c *ReactionClient) Get(ctx context.Context, id uuid.UUID) (*Reaction, error)
- func (c *ReactionClient) GetX(ctx context.Context, id uuid.UUID) *Reaction
- func (c *ReactionClient) Hooks() []Hook
- func (c *ReactionClient) Intercept(interceptors ...Interceptor)
- func (c *ReactionClient) Interceptors() []Interceptor
- func (c *ReactionClient) MapCreateBulk(slice any, setFunc func(*ReactionCreate, int)) *ReactionCreateBulk
- func (c *ReactionClient) Query() *ReactionQuery
- func (c *ReactionClient) QueryComment(r *Reaction) *CommentQuery
- func (c *ReactionClient) QueryPost(r *Reaction) *PostQuery
- func (c *ReactionClient) QueryReply(r *Reaction) *ReplyQuery
- func (c *ReactionClient) QueryUser(r *Reaction) *UserQuery
- func (c *ReactionClient) Update() *ReactionUpdate
- func (c *ReactionClient) UpdateOne(r *Reaction) *ReactionUpdateOne
- func (c *ReactionClient) UpdateOneID(id uuid.UUID) *ReactionUpdateOne
- func (c *ReactionClient) Use(hooks ...Hook)
- type ReactionCreate
- func (rc *ReactionCreate) Exec(ctx context.Context) error
- func (rc *ReactionCreate) ExecX(ctx context.Context)
- func (rc *ReactionCreate) Mutation() *ReactionMutation
- func (rc *ReactionCreate) Save(ctx context.Context) (*Reaction, error)
- func (rc *ReactionCreate) SaveX(ctx context.Context) *Reaction
- func (rc *ReactionCreate) SetComment(c *Comment) *ReactionCreate
- func (rc *ReactionCreate) SetCommentID(u uuid.UUID) *ReactionCreate
- func (rc *ReactionCreate) SetCreatedAt(t time.Time) *ReactionCreate
- func (rc *ReactionCreate) SetID(u uuid.UUID) *ReactionCreate
- func (rc *ReactionCreate) SetNillableCommentID(u *uuid.UUID) *ReactionCreate
- func (rc *ReactionCreate) SetNillableCreatedAt(t *time.Time) *ReactionCreate
- func (rc *ReactionCreate) SetNillableID(u *uuid.UUID) *ReactionCreate
- func (rc *ReactionCreate) SetNillablePostID(u *uuid.UUID) *ReactionCreate
- func (rc *ReactionCreate) SetNillableReplyID(u *uuid.UUID) *ReactionCreate
- func (rc *ReactionCreate) SetNillableRtype(r *reaction.Rtype) *ReactionCreate
- func (rc *ReactionCreate) SetNillableUpdatedAt(t *time.Time) *ReactionCreate
- func (rc *ReactionCreate) SetPost(p *Post) *ReactionCreate
- func (rc *ReactionCreate) SetPostID(u uuid.UUID) *ReactionCreate
- func (rc *ReactionCreate) SetReply(r *Reply) *ReactionCreate
- func (rc *ReactionCreate) SetReplyID(u uuid.UUID) *ReactionCreate
- func (rc *ReactionCreate) SetRtype(r reaction.Rtype) *ReactionCreate
- func (rc *ReactionCreate) SetUpdatedAt(t time.Time) *ReactionCreate
- func (rc *ReactionCreate) SetUser(u *User) *ReactionCreate
- func (rc *ReactionCreate) SetUserID(u uuid.UUID) *ReactionCreate
- type ReactionCreateBulk
- type ReactionDelete
- type ReactionDeleteOne
- type ReactionEdges
- type ReactionGroupBy
- func (rgb *ReactionGroupBy) Aggregate(fns ...AggregateFunc) *ReactionGroupBy
- func (s *ReactionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReactionGroupBy) BoolX(ctx context.Context) bool
- func (s *ReactionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ReactionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ReactionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReactionGroupBy) Float64X(ctx context.Context) float64
- func (s *ReactionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReactionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ReactionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ReactionGroupBy) IntX(ctx context.Context) int
- func (s *ReactionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ReactionGroupBy) IntsX(ctx context.Context) []int
- func (rgb *ReactionGroupBy) Scan(ctx context.Context, v any) error
- func (s *ReactionGroupBy) ScanX(ctx context.Context, v any)
- func (s *ReactionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ReactionGroupBy) StringX(ctx context.Context) string
- func (s *ReactionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ReactionGroupBy) StringsX(ctx context.Context) []string
- type ReactionMutation
- func (m *ReactionMutation) AddField(name string, value ent.Value) error
- func (m *ReactionMutation) AddedEdges() []string
- func (m *ReactionMutation) AddedField(name string) (ent.Value, bool)
- func (m *ReactionMutation) AddedFields() []string
- func (m *ReactionMutation) AddedIDs(name string) []ent.Value
- func (m *ReactionMutation) ClearComment()
- func (m *ReactionMutation) ClearCommentID()
- func (m *ReactionMutation) ClearEdge(name string) error
- func (m *ReactionMutation) ClearField(name string) error
- func (m *ReactionMutation) ClearPost()
- func (m *ReactionMutation) ClearPostID()
- func (m *ReactionMutation) ClearReply()
- func (m *ReactionMutation) ClearReplyID()
- func (m *ReactionMutation) ClearUser()
- func (m *ReactionMutation) ClearedEdges() []string
- func (m *ReactionMutation) ClearedFields() []string
- func (m ReactionMutation) Client() *Client
- func (m *ReactionMutation) CommentCleared() bool
- func (m *ReactionMutation) CommentID() (r uuid.UUID, exists bool)
- func (m *ReactionMutation) CommentIDCleared() bool
- func (m *ReactionMutation) CommentIDs() (ids []uuid.UUID)
- func (m *ReactionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ReactionMutation) EdgeCleared(name string) bool
- func (m *ReactionMutation) Field(name string) (ent.Value, bool)
- func (m *ReactionMutation) FieldCleared(name string) bool
- func (m *ReactionMutation) Fields() []string
- func (m *ReactionMutation) ID() (id uuid.UUID, exists bool)
- func (m *ReactionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ReactionMutation) OldCommentID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *ReactionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ReactionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ReactionMutation) OldPostID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *ReactionMutation) OldReplyID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *ReactionMutation) OldRtype(ctx context.Context) (v reaction.Rtype, err error)
- func (m *ReactionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ReactionMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ReactionMutation) Op() Op
- func (m *ReactionMutation) PostCleared() bool
- func (m *ReactionMutation) PostID() (r uuid.UUID, exists bool)
- func (m *ReactionMutation) PostIDCleared() bool
- func (m *ReactionMutation) PostIDs() (ids []uuid.UUID)
- func (m *ReactionMutation) RemovedEdges() []string
- func (m *ReactionMutation) RemovedIDs(name string) []ent.Value
- func (m *ReactionMutation) ReplyCleared() bool
- func (m *ReactionMutation) ReplyID() (r uuid.UUID, exists bool)
- func (m *ReactionMutation) ReplyIDCleared() bool
- func (m *ReactionMutation) ReplyIDs() (ids []uuid.UUID)
- func (m *ReactionMutation) ResetComment()
- func (m *ReactionMutation) ResetCommentID()
- func (m *ReactionMutation) ResetCreatedAt()
- func (m *ReactionMutation) ResetEdge(name string) error
- func (m *ReactionMutation) ResetField(name string) error
- func (m *ReactionMutation) ResetPost()
- func (m *ReactionMutation) ResetPostID()
- func (m *ReactionMutation) ResetReply()
- func (m *ReactionMutation) ResetReplyID()
- func (m *ReactionMutation) ResetRtype()
- func (m *ReactionMutation) ResetUpdatedAt()
- func (m *ReactionMutation) ResetUser()
- func (m *ReactionMutation) ResetUserID()
- func (m *ReactionMutation) Rtype() (r reaction.Rtype, exists bool)
- func (m *ReactionMutation) SetCommentID(u uuid.UUID)
- func (m *ReactionMutation) SetCreatedAt(t time.Time)
- func (m *ReactionMutation) SetField(name string, value ent.Value) error
- func (m *ReactionMutation) SetID(id uuid.UUID)
- func (m *ReactionMutation) SetOp(op Op)
- func (m *ReactionMutation) SetPostID(u uuid.UUID)
- func (m *ReactionMutation) SetReplyID(u uuid.UUID)
- func (m *ReactionMutation) SetRtype(r reaction.Rtype)
- func (m *ReactionMutation) SetUpdatedAt(t time.Time)
- func (m *ReactionMutation) SetUserID(u uuid.UUID)
- func (m ReactionMutation) Tx() (*Tx, error)
- func (m *ReactionMutation) Type() string
- func (m *ReactionMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ReactionMutation) UserCleared() bool
- func (m *ReactionMutation) UserID() (r uuid.UUID, exists bool)
- func (m *ReactionMutation) UserIDs() (ids []uuid.UUID)
- func (m *ReactionMutation) Where(ps ...predicate.Reaction)
- func (m *ReactionMutation) WhereP(ps ...func(*sql.Selector))
- type ReactionQuery
- func (rq *ReactionQuery) Aggregate(fns ...AggregateFunc) *ReactionSelect
- func (rq *ReactionQuery) All(ctx context.Context) ([]*Reaction, error)
- func (rq *ReactionQuery) AllX(ctx context.Context) []*Reaction
- func (rq *ReactionQuery) Clone() *ReactionQuery
- func (rq *ReactionQuery) Count(ctx context.Context) (int, error)
- func (rq *ReactionQuery) CountX(ctx context.Context) int
- func (rq *ReactionQuery) Exist(ctx context.Context) (bool, error)
- func (rq *ReactionQuery) ExistX(ctx context.Context) bool
- func (rq *ReactionQuery) First(ctx context.Context) (*Reaction, error)
- func (rq *ReactionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ReactionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (rq *ReactionQuery) FirstX(ctx context.Context) *Reaction
- func (rq *ReactionQuery) GroupBy(field string, fields ...string) *ReactionGroupBy
- func (rq *ReactionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (rq *ReactionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (rq *ReactionQuery) Limit(limit int) *ReactionQuery
- func (rq *ReactionQuery) Offset(offset int) *ReactionQuery
- func (rq *ReactionQuery) Only(ctx context.Context) (*Reaction, error)
- func (rq *ReactionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ReactionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (rq *ReactionQuery) OnlyX(ctx context.Context) *Reaction
- func (rq *ReactionQuery) Order(o ...reaction.OrderOption) *ReactionQuery
- func (rq *ReactionQuery) QueryComment() *CommentQuery
- func (rq *ReactionQuery) QueryPost() *PostQuery
- func (rq *ReactionQuery) QueryReply() *ReplyQuery
- func (rq *ReactionQuery) QueryUser() *UserQuery
- func (rq *ReactionQuery) Select(fields ...string) *ReactionSelect
- func (rq *ReactionQuery) Unique(unique bool) *ReactionQuery
- func (rq *ReactionQuery) Where(ps ...predicate.Reaction) *ReactionQuery
- func (rq *ReactionQuery) WithComment(opts ...func(*CommentQuery)) *ReactionQuery
- func (rq *ReactionQuery) WithPost(opts ...func(*PostQuery)) *ReactionQuery
- func (rq *ReactionQuery) WithReply(opts ...func(*ReplyQuery)) *ReactionQuery
- func (rq *ReactionQuery) WithUser(opts ...func(*UserQuery)) *ReactionQuery
- type ReactionSelect
- func (rs *ReactionSelect) Aggregate(fns ...AggregateFunc) *ReactionSelect
- func (s *ReactionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReactionSelect) BoolX(ctx context.Context) bool
- func (s *ReactionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ReactionSelect) BoolsX(ctx context.Context) []bool
- func (s *ReactionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReactionSelect) Float64X(ctx context.Context) float64
- func (s *ReactionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReactionSelect) Float64sX(ctx context.Context) []float64
- func (s *ReactionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ReactionSelect) IntX(ctx context.Context) int
- func (s *ReactionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ReactionSelect) IntsX(ctx context.Context) []int
- func (rs *ReactionSelect) Scan(ctx context.Context, v any) error
- func (s *ReactionSelect) ScanX(ctx context.Context, v any)
- func (s *ReactionSelect) String(ctx context.Context) (_ string, err error)
- func (s *ReactionSelect) StringX(ctx context.Context) string
- func (s *ReactionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ReactionSelect) StringsX(ctx context.Context) []string
- type ReactionUpdate
- func (ru *ReactionUpdate) ClearComment() *ReactionUpdate
- func (ru *ReactionUpdate) ClearCommentID() *ReactionUpdate
- func (ru *ReactionUpdate) ClearPost() *ReactionUpdate
- func (ru *ReactionUpdate) ClearPostID() *ReactionUpdate
- func (ru *ReactionUpdate) ClearReply() *ReactionUpdate
- func (ru *ReactionUpdate) ClearReplyID() *ReactionUpdate
- func (ru *ReactionUpdate) ClearUser() *ReactionUpdate
- func (ru *ReactionUpdate) Exec(ctx context.Context) error
- func (ru *ReactionUpdate) ExecX(ctx context.Context)
- func (ru *ReactionUpdate) Mutation() *ReactionMutation
- func (ru *ReactionUpdate) Save(ctx context.Context) (int, error)
- func (ru *ReactionUpdate) SaveX(ctx context.Context) int
- func (ru *ReactionUpdate) SetComment(c *Comment) *ReactionUpdate
- func (ru *ReactionUpdate) SetCommentID(u uuid.UUID) *ReactionUpdate
- func (ru *ReactionUpdate) SetCreatedAt(t time.Time) *ReactionUpdate
- func (ru *ReactionUpdate) SetNillableCommentID(u *uuid.UUID) *ReactionUpdate
- func (ru *ReactionUpdate) SetNillableCreatedAt(t *time.Time) *ReactionUpdate
- func (ru *ReactionUpdate) SetNillablePostID(u *uuid.UUID) *ReactionUpdate
- func (ru *ReactionUpdate) SetNillableReplyID(u *uuid.UUID) *ReactionUpdate
- func (ru *ReactionUpdate) SetNillableRtype(r *reaction.Rtype) *ReactionUpdate
- func (ru *ReactionUpdate) SetNillableUserID(u *uuid.UUID) *ReactionUpdate
- func (ru *ReactionUpdate) SetPost(p *Post) *ReactionUpdate
- func (ru *ReactionUpdate) SetPostID(u uuid.UUID) *ReactionUpdate
- func (ru *ReactionUpdate) SetReply(r *Reply) *ReactionUpdate
- func (ru *ReactionUpdate) SetReplyID(u uuid.UUID) *ReactionUpdate
- func (ru *ReactionUpdate) SetRtype(r reaction.Rtype) *ReactionUpdate
- func (ru *ReactionUpdate) SetUpdatedAt(t time.Time) *ReactionUpdate
- func (ru *ReactionUpdate) SetUser(u *User) *ReactionUpdate
- func (ru *ReactionUpdate) SetUserID(u uuid.UUID) *ReactionUpdate
- func (ru *ReactionUpdate) Where(ps ...predicate.Reaction) *ReactionUpdate
- type ReactionUpdateOne
- func (ruo *ReactionUpdateOne) ClearComment() *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) ClearCommentID() *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) ClearPost() *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) ClearPostID() *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) ClearReply() *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) ClearReplyID() *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) ClearUser() *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) Exec(ctx context.Context) error
- func (ruo *ReactionUpdateOne) ExecX(ctx context.Context)
- func (ruo *ReactionUpdateOne) Mutation() *ReactionMutation
- func (ruo *ReactionUpdateOne) Save(ctx context.Context) (*Reaction, error)
- func (ruo *ReactionUpdateOne) SaveX(ctx context.Context) *Reaction
- func (ruo *ReactionUpdateOne) Select(field string, fields ...string) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetComment(c *Comment) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetCommentID(u uuid.UUID) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetCreatedAt(t time.Time) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetNillableCommentID(u *uuid.UUID) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetNillableCreatedAt(t *time.Time) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetNillablePostID(u *uuid.UUID) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetNillableReplyID(u *uuid.UUID) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetNillableRtype(r *reaction.Rtype) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetNillableUserID(u *uuid.UUID) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetPost(p *Post) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetPostID(u uuid.UUID) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetReply(r *Reply) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetReplyID(u uuid.UUID) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetRtype(r reaction.Rtype) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetUpdatedAt(t time.Time) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetUser(u *User) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetUserID(u uuid.UUID) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) Where(ps ...predicate.Reaction) *ReactionUpdateOne
- type Reactions
- type Region
- type RegionClient
- func (c *RegionClient) Create() *RegionCreate
- func (c *RegionClient) CreateBulk(builders ...*RegionCreate) *RegionCreateBulk
- func (c *RegionClient) Delete() *RegionDelete
- func (c *RegionClient) DeleteOne(r *Region) *RegionDeleteOne
- func (c *RegionClient) DeleteOneID(id uuid.UUID) *RegionDeleteOne
- func (c *RegionClient) Get(ctx context.Context, id uuid.UUID) (*Region, error)
- func (c *RegionClient) GetX(ctx context.Context, id uuid.UUID) *Region
- func (c *RegionClient) Hooks() []Hook
- func (c *RegionClient) Intercept(interceptors ...Interceptor)
- func (c *RegionClient) Interceptors() []Interceptor
- func (c *RegionClient) MapCreateBulk(slice any, setFunc func(*RegionCreate, int)) *RegionCreateBulk
- func (c *RegionClient) Query() *RegionQuery
- func (c *RegionClient) QueryCities(r *Region) *CityQuery
- func (c *RegionClient) QueryCountry(r *Region) *CountryQuery
- func (c *RegionClient) Update() *RegionUpdate
- func (c *RegionClient) UpdateOne(r *Region) *RegionUpdateOne
- func (c *RegionClient) UpdateOneID(id uuid.UUID) *RegionUpdateOne
- func (c *RegionClient) Use(hooks ...Hook)
- type RegionCreate
- func (rc *RegionCreate) AddCities(c ...*City) *RegionCreate
- func (rc *RegionCreate) AddCityIDs(ids ...uuid.UUID) *RegionCreate
- func (rc *RegionCreate) Exec(ctx context.Context) error
- func (rc *RegionCreate) ExecX(ctx context.Context)
- func (rc *RegionCreate) Mutation() *RegionMutation
- func (rc *RegionCreate) Save(ctx context.Context) (*Region, error)
- func (rc *RegionCreate) SaveX(ctx context.Context) *Region
- func (rc *RegionCreate) SetCountry(c *Country) *RegionCreate
- func (rc *RegionCreate) SetCountryID(u uuid.UUID) *RegionCreate
- func (rc *RegionCreate) SetCreatedAt(t time.Time) *RegionCreate
- func (rc *RegionCreate) SetID(u uuid.UUID) *RegionCreate
- func (rc *RegionCreate) SetName(s string) *RegionCreate
- func (rc *RegionCreate) SetNillableCreatedAt(t *time.Time) *RegionCreate
- func (rc *RegionCreate) SetNillableID(u *uuid.UUID) *RegionCreate
- func (rc *RegionCreate) SetNillableUpdatedAt(t *time.Time) *RegionCreate
- func (rc *RegionCreate) SetUpdatedAt(t time.Time) *RegionCreate
- type RegionCreateBulk
- type RegionDelete
- type RegionDeleteOne
- type RegionEdges
- type RegionGroupBy
- func (rgb *RegionGroupBy) Aggregate(fns ...AggregateFunc) *RegionGroupBy
- func (s *RegionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RegionGroupBy) BoolX(ctx context.Context) bool
- func (s *RegionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RegionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RegionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RegionGroupBy) Float64X(ctx context.Context) float64
- func (s *RegionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RegionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RegionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RegionGroupBy) IntX(ctx context.Context) int
- func (s *RegionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RegionGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RegionGroupBy) Scan(ctx context.Context, v any) error
- func (s *RegionGroupBy) ScanX(ctx context.Context, v any)
- func (s *RegionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RegionGroupBy) StringX(ctx context.Context) string
- func (s *RegionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RegionGroupBy) StringsX(ctx context.Context) []string
- type RegionMutation
- func (m *RegionMutation) AddCityIDs(ids ...uuid.UUID)
- func (m *RegionMutation) AddField(name string, value ent.Value) error
- func (m *RegionMutation) AddedEdges() []string
- func (m *RegionMutation) AddedField(name string) (ent.Value, bool)
- func (m *RegionMutation) AddedFields() []string
- func (m *RegionMutation) AddedIDs(name string) []ent.Value
- func (m *RegionMutation) CitiesCleared() bool
- func (m *RegionMutation) CitiesIDs() (ids []uuid.UUID)
- func (m *RegionMutation) ClearCities()
- func (m *RegionMutation) ClearCountry()
- func (m *RegionMutation) ClearEdge(name string) error
- func (m *RegionMutation) ClearField(name string) error
- func (m *RegionMutation) ClearedEdges() []string
- func (m *RegionMutation) ClearedFields() []string
- func (m RegionMutation) Client() *Client
- func (m *RegionMutation) CountryCleared() bool
- func (m *RegionMutation) CountryID() (r uuid.UUID, exists bool)
- func (m *RegionMutation) CountryIDs() (ids []uuid.UUID)
- func (m *RegionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RegionMutation) EdgeCleared(name string) bool
- func (m *RegionMutation) Field(name string) (ent.Value, bool)
- func (m *RegionMutation) FieldCleared(name string) bool
- func (m *RegionMutation) Fields() []string
- func (m *RegionMutation) ID() (id uuid.UUID, exists bool)
- func (m *RegionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *RegionMutation) Name() (r string, exists bool)
- func (m *RegionMutation) OldCountryID(ctx context.Context) (v uuid.UUID, err error)
- func (m *RegionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RegionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RegionMutation) OldName(ctx context.Context) (v string, err error)
- func (m *RegionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RegionMutation) Op() Op
- func (m *RegionMutation) RemoveCityIDs(ids ...uuid.UUID)
- func (m *RegionMutation) RemovedCitiesIDs() (ids []uuid.UUID)
- func (m *RegionMutation) RemovedEdges() []string
- func (m *RegionMutation) RemovedIDs(name string) []ent.Value
- func (m *RegionMutation) ResetCities()
- func (m *RegionMutation) ResetCountry()
- func (m *RegionMutation) ResetCountryID()
- func (m *RegionMutation) ResetCreatedAt()
- func (m *RegionMutation) ResetEdge(name string) error
- func (m *RegionMutation) ResetField(name string) error
- func (m *RegionMutation) ResetName()
- func (m *RegionMutation) ResetUpdatedAt()
- func (m *RegionMutation) SetCountryID(u uuid.UUID)
- func (m *RegionMutation) SetCreatedAt(t time.Time)
- func (m *RegionMutation) SetField(name string, value ent.Value) error
- func (m *RegionMutation) SetID(id uuid.UUID)
- func (m *RegionMutation) SetName(s string)
- func (m *RegionMutation) SetOp(op Op)
- func (m *RegionMutation) SetUpdatedAt(t time.Time)
- func (m RegionMutation) Tx() (*Tx, error)
- func (m *RegionMutation) Type() string
- func (m *RegionMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *RegionMutation) Where(ps ...predicate.Region)
- func (m *RegionMutation) WhereP(ps ...func(*sql.Selector))
- type RegionQuery
- func (rq *RegionQuery) Aggregate(fns ...AggregateFunc) *RegionSelect
- func (rq *RegionQuery) All(ctx context.Context) ([]*Region, error)
- func (rq *RegionQuery) AllX(ctx context.Context) []*Region
- func (rq *RegionQuery) Clone() *RegionQuery
- func (rq *RegionQuery) Count(ctx context.Context) (int, error)
- func (rq *RegionQuery) CountX(ctx context.Context) int
- func (rq *RegionQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RegionQuery) ExistX(ctx context.Context) bool
- func (rq *RegionQuery) First(ctx context.Context) (*Region, error)
- func (rq *RegionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *RegionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (rq *RegionQuery) FirstX(ctx context.Context) *Region
- func (rq *RegionQuery) GroupBy(field string, fields ...string) *RegionGroupBy
- func (rq *RegionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (rq *RegionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (rq *RegionQuery) Limit(limit int) *RegionQuery
- func (rq *RegionQuery) Offset(offset int) *RegionQuery
- func (rq *RegionQuery) Only(ctx context.Context) (*Region, error)
- func (rq *RegionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *RegionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (rq *RegionQuery) OnlyX(ctx context.Context) *Region
- func (rq *RegionQuery) Order(o ...region.OrderOption) *RegionQuery
- func (rq *RegionQuery) QueryCities() *CityQuery
- func (rq *RegionQuery) QueryCountry() *CountryQuery
- func (rq *RegionQuery) Select(fields ...string) *RegionSelect
- func (rq *RegionQuery) Unique(unique bool) *RegionQuery
- func (rq *RegionQuery) Where(ps ...predicate.Region) *RegionQuery
- func (rq *RegionQuery) WithCities(opts ...func(*CityQuery)) *RegionQuery
- func (rq *RegionQuery) WithCountry(opts ...func(*CountryQuery)) *RegionQuery
- type RegionSelect
- func (rs *RegionSelect) Aggregate(fns ...AggregateFunc) *RegionSelect
- func (s *RegionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RegionSelect) BoolX(ctx context.Context) bool
- func (s *RegionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RegionSelect) BoolsX(ctx context.Context) []bool
- func (s *RegionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RegionSelect) Float64X(ctx context.Context) float64
- func (s *RegionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RegionSelect) Float64sX(ctx context.Context) []float64
- func (s *RegionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RegionSelect) IntX(ctx context.Context) int
- func (s *RegionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RegionSelect) IntsX(ctx context.Context) []int
- func (rs *RegionSelect) Scan(ctx context.Context, v any) error
- func (s *RegionSelect) ScanX(ctx context.Context, v any)
- func (s *RegionSelect) String(ctx context.Context) (_ string, err error)
- func (s *RegionSelect) StringX(ctx context.Context) string
- func (s *RegionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RegionSelect) StringsX(ctx context.Context) []string
- type RegionUpdate
- func (ru *RegionUpdate) AddCities(c ...*City) *RegionUpdate
- func (ru *RegionUpdate) AddCityIDs(ids ...uuid.UUID) *RegionUpdate
- func (ru *RegionUpdate) ClearCities() *RegionUpdate
- func (ru *RegionUpdate) ClearCountry() *RegionUpdate
- func (ru *RegionUpdate) Exec(ctx context.Context) error
- func (ru *RegionUpdate) ExecX(ctx context.Context)
- func (ru *RegionUpdate) Mutation() *RegionMutation
- func (ru *RegionUpdate) RemoveCities(c ...*City) *RegionUpdate
- func (ru *RegionUpdate) RemoveCityIDs(ids ...uuid.UUID) *RegionUpdate
- func (ru *RegionUpdate) Save(ctx context.Context) (int, error)
- func (ru *RegionUpdate) SaveX(ctx context.Context) int
- func (ru *RegionUpdate) SetCountry(c *Country) *RegionUpdate
- func (ru *RegionUpdate) SetCountryID(u uuid.UUID) *RegionUpdate
- func (ru *RegionUpdate) SetCreatedAt(t time.Time) *RegionUpdate
- func (ru *RegionUpdate) SetName(s string) *RegionUpdate
- func (ru *RegionUpdate) SetNillableCountryID(u *uuid.UUID) *RegionUpdate
- func (ru *RegionUpdate) SetNillableCreatedAt(t *time.Time) *RegionUpdate
- func (ru *RegionUpdate) SetNillableName(s *string) *RegionUpdate
- func (ru *RegionUpdate) SetUpdatedAt(t time.Time) *RegionUpdate
- func (ru *RegionUpdate) Where(ps ...predicate.Region) *RegionUpdate
- type RegionUpdateOne
- func (ruo *RegionUpdateOne) AddCities(c ...*City) *RegionUpdateOne
- func (ruo *RegionUpdateOne) AddCityIDs(ids ...uuid.UUID) *RegionUpdateOne
- func (ruo *RegionUpdateOne) ClearCities() *RegionUpdateOne
- func (ruo *RegionUpdateOne) ClearCountry() *RegionUpdateOne
- func (ruo *RegionUpdateOne) Exec(ctx context.Context) error
- func (ruo *RegionUpdateOne) ExecX(ctx context.Context)
- func (ruo *RegionUpdateOne) Mutation() *RegionMutation
- func (ruo *RegionUpdateOne) RemoveCities(c ...*City) *RegionUpdateOne
- func (ruo *RegionUpdateOne) RemoveCityIDs(ids ...uuid.UUID) *RegionUpdateOne
- func (ruo *RegionUpdateOne) Save(ctx context.Context) (*Region, error)
- func (ruo *RegionUpdateOne) SaveX(ctx context.Context) *Region
- func (ruo *RegionUpdateOne) Select(field string, fields ...string) *RegionUpdateOne
- func (ruo *RegionUpdateOne) SetCountry(c *Country) *RegionUpdateOne
- func (ruo *RegionUpdateOne) SetCountryID(u uuid.UUID) *RegionUpdateOne
- func (ruo *RegionUpdateOne) SetCreatedAt(t time.Time) *RegionUpdateOne
- func (ruo *RegionUpdateOne) SetName(s string) *RegionUpdateOne
- func (ruo *RegionUpdateOne) SetNillableCountryID(u *uuid.UUID) *RegionUpdateOne
- func (ruo *RegionUpdateOne) SetNillableCreatedAt(t *time.Time) *RegionUpdateOne
- func (ruo *RegionUpdateOne) SetNillableName(s *string) *RegionUpdateOne
- func (ruo *RegionUpdateOne) SetUpdatedAt(t time.Time) *RegionUpdateOne
- func (ruo *RegionUpdateOne) Where(ps ...predicate.Region) *RegionUpdateOne
- type Regions
- type Replies
- type Reply
- func (r *Reply) QueryAuthor() *UserQuery
- func (r *Reply) QueryComment() *CommentQuery
- func (r *Reply) QueryNotifications() *NotificationQuery
- func (r *Reply) QueryReactions() *ReactionQuery
- func (r *Reply) String() string
- func (r *Reply) Unwrap() *Reply
- func (r *Reply) Update() *ReplyUpdateOne
- func (r *Reply) Value(name string) (ent.Value, error)
- type ReplyClient
- func (c *ReplyClient) Create() *ReplyCreate
- func (c *ReplyClient) CreateBulk(builders ...*ReplyCreate) *ReplyCreateBulk
- func (c *ReplyClient) Delete() *ReplyDelete
- func (c *ReplyClient) DeleteOne(r *Reply) *ReplyDeleteOne
- func (c *ReplyClient) DeleteOneID(id uuid.UUID) *ReplyDeleteOne
- func (c *ReplyClient) Get(ctx context.Context, id uuid.UUID) (*Reply, error)
- func (c *ReplyClient) GetX(ctx context.Context, id uuid.UUID) *Reply
- func (c *ReplyClient) Hooks() []Hook
- func (c *ReplyClient) Intercept(interceptors ...Interceptor)
- func (c *ReplyClient) Interceptors() []Interceptor
- func (c *ReplyClient) MapCreateBulk(slice any, setFunc func(*ReplyCreate, int)) *ReplyCreateBulk
- func (c *ReplyClient) Query() *ReplyQuery
- func (c *ReplyClient) QueryAuthor(r *Reply) *UserQuery
- func (c *ReplyClient) QueryComment(r *Reply) *CommentQuery
- func (c *ReplyClient) QueryNotifications(r *Reply) *NotificationQuery
- func (c *ReplyClient) QueryReactions(r *Reply) *ReactionQuery
- func (c *ReplyClient) Update() *ReplyUpdate
- func (c *ReplyClient) UpdateOne(r *Reply) *ReplyUpdateOne
- func (c *ReplyClient) UpdateOneID(id uuid.UUID) *ReplyUpdateOne
- func (c *ReplyClient) Use(hooks ...Hook)
- type ReplyCreate
- func (rc *ReplyCreate) AddNotificationIDs(ids ...uuid.UUID) *ReplyCreate
- func (rc *ReplyCreate) AddNotifications(n ...*Notification) *ReplyCreate
- func (rc *ReplyCreate) AddReactionIDs(ids ...uuid.UUID) *ReplyCreate
- func (rc *ReplyCreate) AddReactions(r ...*Reaction) *ReplyCreate
- func (rc *ReplyCreate) Exec(ctx context.Context) error
- func (rc *ReplyCreate) ExecX(ctx context.Context)
- func (rc *ReplyCreate) Mutation() *ReplyMutation
- func (rc *ReplyCreate) Save(ctx context.Context) (*Reply, error)
- func (rc *ReplyCreate) SaveX(ctx context.Context) *Reply
- func (rc *ReplyCreate) SetAuthor(u *User) *ReplyCreate
- func (rc *ReplyCreate) SetAuthorID(u uuid.UUID) *ReplyCreate
- func (rc *ReplyCreate) SetComment(c *Comment) *ReplyCreate
- func (rc *ReplyCreate) SetCommentID(u uuid.UUID) *ReplyCreate
- func (rc *ReplyCreate) SetCreatedAt(t time.Time) *ReplyCreate
- func (rc *ReplyCreate) SetID(u uuid.UUID) *ReplyCreate
- func (rc *ReplyCreate) SetNillableCreatedAt(t *time.Time) *ReplyCreate
- func (rc *ReplyCreate) SetNillableID(u *uuid.UUID) *ReplyCreate
- func (rc *ReplyCreate) SetNillableUpdatedAt(t *time.Time) *ReplyCreate
- func (rc *ReplyCreate) SetSlug(s string) *ReplyCreate
- func (rc *ReplyCreate) SetText(s string) *ReplyCreate
- func (rc *ReplyCreate) SetUpdatedAt(t time.Time) *ReplyCreate
- type ReplyCreateBulk
- type ReplyDelete
- type ReplyDeleteOne
- type ReplyEdges
- type ReplyGroupBy
- func (rgb *ReplyGroupBy) Aggregate(fns ...AggregateFunc) *ReplyGroupBy
- func (s *ReplyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReplyGroupBy) BoolX(ctx context.Context) bool
- func (s *ReplyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ReplyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ReplyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReplyGroupBy) Float64X(ctx context.Context) float64
- func (s *ReplyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReplyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ReplyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ReplyGroupBy) IntX(ctx context.Context) int
- func (s *ReplyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ReplyGroupBy) IntsX(ctx context.Context) []int
- func (rgb *ReplyGroupBy) Scan(ctx context.Context, v any) error
- func (s *ReplyGroupBy) ScanX(ctx context.Context, v any)
- func (s *ReplyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ReplyGroupBy) StringX(ctx context.Context) string
- func (s *ReplyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ReplyGroupBy) StringsX(ctx context.Context) []string
- type ReplyMutation
- func (m *ReplyMutation) AddField(name string, value ent.Value) error
- func (m *ReplyMutation) AddNotificationIDs(ids ...uuid.UUID)
- func (m *ReplyMutation) AddReactionIDs(ids ...uuid.UUID)
- func (m *ReplyMutation) AddedEdges() []string
- func (m *ReplyMutation) AddedField(name string) (ent.Value, bool)
- func (m *ReplyMutation) AddedFields() []string
- func (m *ReplyMutation) AddedIDs(name string) []ent.Value
- func (m *ReplyMutation) AuthorCleared() bool
- func (m *ReplyMutation) AuthorID() (r uuid.UUID, exists bool)
- func (m *ReplyMutation) AuthorIDs() (ids []uuid.UUID)
- func (m *ReplyMutation) ClearAuthor()
- func (m *ReplyMutation) ClearComment()
- func (m *ReplyMutation) ClearEdge(name string) error
- func (m *ReplyMutation) ClearField(name string) error
- func (m *ReplyMutation) ClearNotifications()
- func (m *ReplyMutation) ClearReactions()
- func (m *ReplyMutation) ClearedEdges() []string
- func (m *ReplyMutation) ClearedFields() []string
- func (m ReplyMutation) Client() *Client
- func (m *ReplyMutation) CommentCleared() bool
- func (m *ReplyMutation) CommentID() (r uuid.UUID, exists bool)
- func (m *ReplyMutation) CommentIDs() (ids []uuid.UUID)
- func (m *ReplyMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ReplyMutation) EdgeCleared(name string) bool
- func (m *ReplyMutation) Field(name string) (ent.Value, bool)
- func (m *ReplyMutation) FieldCleared(name string) bool
- func (m *ReplyMutation) Fields() []string
- func (m *ReplyMutation) ID() (id uuid.UUID, exists bool)
- func (m *ReplyMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ReplyMutation) NotificationsCleared() bool
- func (m *ReplyMutation) NotificationsIDs() (ids []uuid.UUID)
- func (m *ReplyMutation) OldAuthorID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ReplyMutation) OldCommentID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ReplyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ReplyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ReplyMutation) OldSlug(ctx context.Context) (v string, err error)
- func (m *ReplyMutation) OldText(ctx context.Context) (v string, err error)
- func (m *ReplyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ReplyMutation) Op() Op
- func (m *ReplyMutation) ReactionsCleared() bool
- func (m *ReplyMutation) ReactionsIDs() (ids []uuid.UUID)
- func (m *ReplyMutation) RemoveNotificationIDs(ids ...uuid.UUID)
- func (m *ReplyMutation) RemoveReactionIDs(ids ...uuid.UUID)
- func (m *ReplyMutation) RemovedEdges() []string
- func (m *ReplyMutation) RemovedIDs(name string) []ent.Value
- func (m *ReplyMutation) RemovedNotificationsIDs() (ids []uuid.UUID)
- func (m *ReplyMutation) RemovedReactionsIDs() (ids []uuid.UUID)
- func (m *ReplyMutation) ResetAuthor()
- func (m *ReplyMutation) ResetAuthorID()
- func (m *ReplyMutation) ResetComment()
- func (m *ReplyMutation) ResetCommentID()
- func (m *ReplyMutation) ResetCreatedAt()
- func (m *ReplyMutation) ResetEdge(name string) error
- func (m *ReplyMutation) ResetField(name string) error
- func (m *ReplyMutation) ResetNotifications()
- func (m *ReplyMutation) ResetReactions()
- func (m *ReplyMutation) ResetSlug()
- func (m *ReplyMutation) ResetText()
- func (m *ReplyMutation) ResetUpdatedAt()
- func (m *ReplyMutation) SetAuthorID(u uuid.UUID)
- func (m *ReplyMutation) SetCommentID(u uuid.UUID)
- func (m *ReplyMutation) SetCreatedAt(t time.Time)
- func (m *ReplyMutation) SetField(name string, value ent.Value) error
- func (m *ReplyMutation) SetID(id uuid.UUID)
- func (m *ReplyMutation) SetOp(op Op)
- func (m *ReplyMutation) SetSlug(s string)
- func (m *ReplyMutation) SetText(s string)
- func (m *ReplyMutation) SetUpdatedAt(t time.Time)
- func (m *ReplyMutation) Slug() (r string, exists bool)
- func (m *ReplyMutation) Text() (r string, exists bool)
- func (m ReplyMutation) Tx() (*Tx, error)
- func (m *ReplyMutation) Type() string
- func (m *ReplyMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ReplyMutation) Where(ps ...predicate.Reply)
- func (m *ReplyMutation) WhereP(ps ...func(*sql.Selector))
- type ReplyQuery
- func (rq *ReplyQuery) Aggregate(fns ...AggregateFunc) *ReplySelect
- func (rq *ReplyQuery) All(ctx context.Context) ([]*Reply, error)
- func (rq *ReplyQuery) AllX(ctx context.Context) []*Reply
- func (rq *ReplyQuery) Clone() *ReplyQuery
- func (rq *ReplyQuery) Count(ctx context.Context) (int, error)
- func (rq *ReplyQuery) CountX(ctx context.Context) int
- func (rq *ReplyQuery) Exist(ctx context.Context) (bool, error)
- func (rq *ReplyQuery) ExistX(ctx context.Context) bool
- func (rq *ReplyQuery) First(ctx context.Context) (*Reply, error)
- func (rq *ReplyQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ReplyQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (rq *ReplyQuery) FirstX(ctx context.Context) *Reply
- func (rq *ReplyQuery) GroupBy(field string, fields ...string) *ReplyGroupBy
- func (rq *ReplyQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (rq *ReplyQuery) IDsX(ctx context.Context) []uuid.UUID
- func (rq *ReplyQuery) Limit(limit int) *ReplyQuery
- func (rq *ReplyQuery) Offset(offset int) *ReplyQuery
- func (rq *ReplyQuery) Only(ctx context.Context) (*Reply, error)
- func (rq *ReplyQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ReplyQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (rq *ReplyQuery) OnlyX(ctx context.Context) *Reply
- func (rq *ReplyQuery) Order(o ...reply.OrderOption) *ReplyQuery
- func (rq *ReplyQuery) QueryAuthor() *UserQuery
- func (rq *ReplyQuery) QueryComment() *CommentQuery
- func (rq *ReplyQuery) QueryNotifications() *NotificationQuery
- func (rq *ReplyQuery) QueryReactions() *ReactionQuery
- func (rq *ReplyQuery) Select(fields ...string) *ReplySelect
- func (rq *ReplyQuery) Unique(unique bool) *ReplyQuery
- func (rq *ReplyQuery) Where(ps ...predicate.Reply) *ReplyQuery
- func (rq *ReplyQuery) WithAuthor(opts ...func(*UserQuery)) *ReplyQuery
- func (rq *ReplyQuery) WithComment(opts ...func(*CommentQuery)) *ReplyQuery
- func (rq *ReplyQuery) WithNotifications(opts ...func(*NotificationQuery)) *ReplyQuery
- func (rq *ReplyQuery) WithReactions(opts ...func(*ReactionQuery)) *ReplyQuery
- type ReplySelect
- func (rs *ReplySelect) Aggregate(fns ...AggregateFunc) *ReplySelect
- func (s *ReplySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReplySelect) BoolX(ctx context.Context) bool
- func (s *ReplySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ReplySelect) BoolsX(ctx context.Context) []bool
- func (s *ReplySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReplySelect) Float64X(ctx context.Context) float64
- func (s *ReplySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReplySelect) Float64sX(ctx context.Context) []float64
- func (s *ReplySelect) Int(ctx context.Context) (_ int, err error)
- func (s *ReplySelect) IntX(ctx context.Context) int
- func (s *ReplySelect) Ints(ctx context.Context) ([]int, error)
- func (s *ReplySelect) IntsX(ctx context.Context) []int
- func (rs *ReplySelect) Scan(ctx context.Context, v any) error
- func (s *ReplySelect) ScanX(ctx context.Context, v any)
- func (s *ReplySelect) String(ctx context.Context) (_ string, err error)
- func (s *ReplySelect) StringX(ctx context.Context) string
- func (s *ReplySelect) Strings(ctx context.Context) ([]string, error)
- func (s *ReplySelect) StringsX(ctx context.Context) []string
- type ReplyUpdate
- func (ru *ReplyUpdate) AddNotificationIDs(ids ...uuid.UUID) *ReplyUpdate
- func (ru *ReplyUpdate) AddNotifications(n ...*Notification) *ReplyUpdate
- func (ru *ReplyUpdate) AddReactionIDs(ids ...uuid.UUID) *ReplyUpdate
- func (ru *ReplyUpdate) AddReactions(r ...*Reaction) *ReplyUpdate
- func (ru *ReplyUpdate) ClearAuthor() *ReplyUpdate
- func (ru *ReplyUpdate) ClearComment() *ReplyUpdate
- func (ru *ReplyUpdate) ClearNotifications() *ReplyUpdate
- func (ru *ReplyUpdate) ClearReactions() *ReplyUpdate
- func (ru *ReplyUpdate) Exec(ctx context.Context) error
- func (ru *ReplyUpdate) ExecX(ctx context.Context)
- func (ru *ReplyUpdate) Mutation() *ReplyMutation
- func (ru *ReplyUpdate) RemoveNotificationIDs(ids ...uuid.UUID) *ReplyUpdate
- func (ru *ReplyUpdate) RemoveNotifications(n ...*Notification) *ReplyUpdate
- func (ru *ReplyUpdate) RemoveReactionIDs(ids ...uuid.UUID) *ReplyUpdate
- func (ru *ReplyUpdate) RemoveReactions(r ...*Reaction) *ReplyUpdate
- func (ru *ReplyUpdate) Save(ctx context.Context) (int, error)
- func (ru *ReplyUpdate) SaveX(ctx context.Context) int
- func (ru *ReplyUpdate) SetAuthor(u *User) *ReplyUpdate
- func (ru *ReplyUpdate) SetAuthorID(u uuid.UUID) *ReplyUpdate
- func (ru *ReplyUpdate) SetComment(c *Comment) *ReplyUpdate
- func (ru *ReplyUpdate) SetCommentID(u uuid.UUID) *ReplyUpdate
- func (ru *ReplyUpdate) SetCreatedAt(t time.Time) *ReplyUpdate
- func (ru *ReplyUpdate) SetNillableAuthorID(u *uuid.UUID) *ReplyUpdate
- func (ru *ReplyUpdate) SetNillableCommentID(u *uuid.UUID) *ReplyUpdate
- func (ru *ReplyUpdate) SetNillableCreatedAt(t *time.Time) *ReplyUpdate
- func (ru *ReplyUpdate) SetNillableSlug(s *string) *ReplyUpdate
- func (ru *ReplyUpdate) SetNillableText(s *string) *ReplyUpdate
- func (ru *ReplyUpdate) SetSlug(s string) *ReplyUpdate
- func (ru *ReplyUpdate) SetText(s string) *ReplyUpdate
- func (ru *ReplyUpdate) SetUpdatedAt(t time.Time) *ReplyUpdate
- func (ru *ReplyUpdate) Where(ps ...predicate.Reply) *ReplyUpdate
- type ReplyUpdateOne
- func (ruo *ReplyUpdateOne) AddNotificationIDs(ids ...uuid.UUID) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) AddNotifications(n ...*Notification) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) AddReactionIDs(ids ...uuid.UUID) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) AddReactions(r ...*Reaction) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) ClearAuthor() *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) ClearComment() *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) ClearNotifications() *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) ClearReactions() *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) Exec(ctx context.Context) error
- func (ruo *ReplyUpdateOne) ExecX(ctx context.Context)
- func (ruo *ReplyUpdateOne) Mutation() *ReplyMutation
- func (ruo *ReplyUpdateOne) RemoveNotificationIDs(ids ...uuid.UUID) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) RemoveNotifications(n ...*Notification) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) RemoveReactionIDs(ids ...uuid.UUID) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) RemoveReactions(r ...*Reaction) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) Save(ctx context.Context) (*Reply, error)
- func (ruo *ReplyUpdateOne) SaveX(ctx context.Context) *Reply
- func (ruo *ReplyUpdateOne) Select(field string, fields ...string) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetAuthor(u *User) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetAuthorID(u uuid.UUID) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetComment(c *Comment) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetCommentID(u uuid.UUID) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetCreatedAt(t time.Time) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetNillableAuthorID(u *uuid.UUID) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetNillableCommentID(u *uuid.UUID) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetNillableCreatedAt(t *time.Time) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetNillableSlug(s *string) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetNillableText(s *string) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetSlug(s string) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetText(s string) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) SetUpdatedAt(t time.Time) *ReplyUpdateOne
- func (ruo *ReplyUpdateOne) Where(ps ...predicate.Reply) *ReplyUpdateOne
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type SiteDetail
- type SiteDetailClient
- func (c *SiteDetailClient) Create() *SiteDetailCreate
- func (c *SiteDetailClient) CreateBulk(builders ...*SiteDetailCreate) *SiteDetailCreateBulk
- func (c *SiteDetailClient) Delete() *SiteDetailDelete
- func (c *SiteDetailClient) DeleteOne(sd *SiteDetail) *SiteDetailDeleteOne
- func (c *SiteDetailClient) DeleteOneID(id uuid.UUID) *SiteDetailDeleteOne
- func (c *SiteDetailClient) Get(ctx context.Context, id uuid.UUID) (*SiteDetail, error)
- func (c *SiteDetailClient) GetX(ctx context.Context, id uuid.UUID) *SiteDetail
- func (c *SiteDetailClient) Hooks() []Hook
- func (c *SiteDetailClient) Intercept(interceptors ...Interceptor)
- func (c *SiteDetailClient) Interceptors() []Interceptor
- func (c *SiteDetailClient) MapCreateBulk(slice any, setFunc func(*SiteDetailCreate, int)) *SiteDetailCreateBulk
- func (c *SiteDetailClient) Query() *SiteDetailQuery
- func (c *SiteDetailClient) Update() *SiteDetailUpdate
- func (c *SiteDetailClient) UpdateOne(sd *SiteDetail) *SiteDetailUpdateOne
- func (c *SiteDetailClient) UpdateOneID(id uuid.UUID) *SiteDetailUpdateOne
- func (c *SiteDetailClient) Use(hooks ...Hook)
- type SiteDetailCreate
- func (sdc *SiteDetailCreate) Exec(ctx context.Context) error
- func (sdc *SiteDetailCreate) ExecX(ctx context.Context)
- func (sdc *SiteDetailCreate) Mutation() *SiteDetailMutation
- func (sdc *SiteDetailCreate) Save(ctx context.Context) (*SiteDetail, error)
- func (sdc *SiteDetailCreate) SaveX(ctx context.Context) *SiteDetail
- func (sdc *SiteDetailCreate) SetAddress(s string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetCreatedAt(t time.Time) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetEmail(s string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetFb(s string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetID(u uuid.UUID) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetIg(s string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetName(s string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetNillableAddress(s *string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetNillableCreatedAt(t *time.Time) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetNillableEmail(s *string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetNillableFb(s *string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetNillableID(u *uuid.UUID) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetNillableIg(s *string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetNillableName(s *string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetNillablePhone(s *string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetNillableTw(s *string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetNillableUpdatedAt(t *time.Time) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetNillableWh(s *string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetPhone(s string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetTw(s string) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetUpdatedAt(t time.Time) *SiteDetailCreate
- func (sdc *SiteDetailCreate) SetWh(s string) *SiteDetailCreate
- type SiteDetailCreateBulk
- type SiteDetailDelete
- type SiteDetailDeleteOne
- type SiteDetailGroupBy
- func (sdgb *SiteDetailGroupBy) Aggregate(fns ...AggregateFunc) *SiteDetailGroupBy
- func (s *SiteDetailGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SiteDetailGroupBy) BoolX(ctx context.Context) bool
- func (s *SiteDetailGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SiteDetailGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SiteDetailGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SiteDetailGroupBy) Float64X(ctx context.Context) float64
- func (s *SiteDetailGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SiteDetailGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SiteDetailGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SiteDetailGroupBy) IntX(ctx context.Context) int
- func (s *SiteDetailGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SiteDetailGroupBy) IntsX(ctx context.Context) []int
- func (sdgb *SiteDetailGroupBy) Scan(ctx context.Context, v any) error
- func (s *SiteDetailGroupBy) ScanX(ctx context.Context, v any)
- func (s *SiteDetailGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SiteDetailGroupBy) StringX(ctx context.Context) string
- func (s *SiteDetailGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SiteDetailGroupBy) StringsX(ctx context.Context) []string
- type SiteDetailMutation
- func (m *SiteDetailMutation) AddField(name string, value ent.Value) error
- func (m *SiteDetailMutation) AddedEdges() []string
- func (m *SiteDetailMutation) AddedField(name string) (ent.Value, bool)
- func (m *SiteDetailMutation) AddedFields() []string
- func (m *SiteDetailMutation) AddedIDs(name string) []ent.Value
- func (m *SiteDetailMutation) Address() (r string, exists bool)
- func (m *SiteDetailMutation) ClearEdge(name string) error
- func (m *SiteDetailMutation) ClearField(name string) error
- func (m *SiteDetailMutation) ClearedEdges() []string
- func (m *SiteDetailMutation) ClearedFields() []string
- func (m SiteDetailMutation) Client() *Client
- func (m *SiteDetailMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SiteDetailMutation) EdgeCleared(name string) bool
- func (m *SiteDetailMutation) Email() (r string, exists bool)
- func (m *SiteDetailMutation) Fb() (r string, exists bool)
- func (m *SiteDetailMutation) Field(name string) (ent.Value, bool)
- func (m *SiteDetailMutation) FieldCleared(name string) bool
- func (m *SiteDetailMutation) Fields() []string
- func (m *SiteDetailMutation) ID() (id uuid.UUID, exists bool)
- func (m *SiteDetailMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *SiteDetailMutation) Ig() (r string, exists bool)
- func (m *SiteDetailMutation) Name() (r string, exists bool)
- func (m *SiteDetailMutation) OldAddress(ctx context.Context) (v string, err error)
- func (m *SiteDetailMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SiteDetailMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *SiteDetailMutation) OldFb(ctx context.Context) (v string, err error)
- func (m *SiteDetailMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SiteDetailMutation) OldIg(ctx context.Context) (v string, err error)
- func (m *SiteDetailMutation) OldName(ctx context.Context) (v string, err error)
- func (m *SiteDetailMutation) OldPhone(ctx context.Context) (v string, err error)
- func (m *SiteDetailMutation) OldTw(ctx context.Context) (v string, err error)
- func (m *SiteDetailMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SiteDetailMutation) OldWh(ctx context.Context) (v string, err error)
- func (m *SiteDetailMutation) Op() Op
- func (m *SiteDetailMutation) Phone() (r string, exists bool)
- func (m *SiteDetailMutation) RemovedEdges() []string
- func (m *SiteDetailMutation) RemovedIDs(name string) []ent.Value
- func (m *SiteDetailMutation) ResetAddress()
- func (m *SiteDetailMutation) ResetCreatedAt()
- func (m *SiteDetailMutation) ResetEdge(name string) error
- func (m *SiteDetailMutation) ResetEmail()
- func (m *SiteDetailMutation) ResetFb()
- func (m *SiteDetailMutation) ResetField(name string) error
- func (m *SiteDetailMutation) ResetIg()
- func (m *SiteDetailMutation) ResetName()
- func (m *SiteDetailMutation) ResetPhone()
- func (m *SiteDetailMutation) ResetTw()
- func (m *SiteDetailMutation) ResetUpdatedAt()
- func (m *SiteDetailMutation) ResetWh()
- func (m *SiteDetailMutation) SetAddress(s string)
- func (m *SiteDetailMutation) SetCreatedAt(t time.Time)
- func (m *SiteDetailMutation) SetEmail(s string)
- func (m *SiteDetailMutation) SetFb(s string)
- func (m *SiteDetailMutation) SetField(name string, value ent.Value) error
- func (m *SiteDetailMutation) SetID(id uuid.UUID)
- func (m *SiteDetailMutation) SetIg(s string)
- func (m *SiteDetailMutation) SetName(s string)
- func (m *SiteDetailMutation) SetOp(op Op)
- func (m *SiteDetailMutation) SetPhone(s string)
- func (m *SiteDetailMutation) SetTw(s string)
- func (m *SiteDetailMutation) SetUpdatedAt(t time.Time)
- func (m *SiteDetailMutation) SetWh(s string)
- func (m *SiteDetailMutation) Tw() (r string, exists bool)
- func (m SiteDetailMutation) Tx() (*Tx, error)
- func (m *SiteDetailMutation) Type() string
- func (m *SiteDetailMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SiteDetailMutation) Wh() (r string, exists bool)
- func (m *SiteDetailMutation) Where(ps ...predicate.SiteDetail)
- func (m *SiteDetailMutation) WhereP(ps ...func(*sql.Selector))
- type SiteDetailQuery
- func (sdq *SiteDetailQuery) Aggregate(fns ...AggregateFunc) *SiteDetailSelect
- func (sdq *SiteDetailQuery) All(ctx context.Context) ([]*SiteDetail, error)
- func (sdq *SiteDetailQuery) AllX(ctx context.Context) []*SiteDetail
- func (sdq *SiteDetailQuery) Clone() *SiteDetailQuery
- func (sdq *SiteDetailQuery) Count(ctx context.Context) (int, error)
- func (sdq *SiteDetailQuery) CountX(ctx context.Context) int
- func (sdq *SiteDetailQuery) Exist(ctx context.Context) (bool, error)
- func (sdq *SiteDetailQuery) ExistX(ctx context.Context) bool
- func (sdq *SiteDetailQuery) First(ctx context.Context) (*SiteDetail, error)
- func (sdq *SiteDetailQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sdq *SiteDetailQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sdq *SiteDetailQuery) FirstX(ctx context.Context) *SiteDetail
- func (sdq *SiteDetailQuery) GroupBy(field string, fields ...string) *SiteDetailGroupBy
- func (sdq *SiteDetailQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (sdq *SiteDetailQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sdq *SiteDetailQuery) Limit(limit int) *SiteDetailQuery
- func (sdq *SiteDetailQuery) Offset(offset int) *SiteDetailQuery
- func (sdq *SiteDetailQuery) Only(ctx context.Context) (*SiteDetail, error)
- func (sdq *SiteDetailQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sdq *SiteDetailQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sdq *SiteDetailQuery) OnlyX(ctx context.Context) *SiteDetail
- func (sdq *SiteDetailQuery) Order(o ...sitedetail.OrderOption) *SiteDetailQuery
- func (sdq *SiteDetailQuery) Select(fields ...string) *SiteDetailSelect
- func (sdq *SiteDetailQuery) Unique(unique bool) *SiteDetailQuery
- func (sdq *SiteDetailQuery) Where(ps ...predicate.SiteDetail) *SiteDetailQuery
- type SiteDetailSelect
- func (sds *SiteDetailSelect) Aggregate(fns ...AggregateFunc) *SiteDetailSelect
- func (s *SiteDetailSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SiteDetailSelect) BoolX(ctx context.Context) bool
- func (s *SiteDetailSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SiteDetailSelect) BoolsX(ctx context.Context) []bool
- func (s *SiteDetailSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SiteDetailSelect) Float64X(ctx context.Context) float64
- func (s *SiteDetailSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SiteDetailSelect) Float64sX(ctx context.Context) []float64
- func (s *SiteDetailSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SiteDetailSelect) IntX(ctx context.Context) int
- func (s *SiteDetailSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SiteDetailSelect) IntsX(ctx context.Context) []int
- func (sds *SiteDetailSelect) Scan(ctx context.Context, v any) error
- func (s *SiteDetailSelect) ScanX(ctx context.Context, v any)
- func (s *SiteDetailSelect) String(ctx context.Context) (_ string, err error)
- func (s *SiteDetailSelect) StringX(ctx context.Context) string
- func (s *SiteDetailSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SiteDetailSelect) StringsX(ctx context.Context) []string
- type SiteDetailUpdate
- func (sdu *SiteDetailUpdate) Exec(ctx context.Context) error
- func (sdu *SiteDetailUpdate) ExecX(ctx context.Context)
- func (sdu *SiteDetailUpdate) Mutation() *SiteDetailMutation
- func (sdu *SiteDetailUpdate) Save(ctx context.Context) (int, error)
- func (sdu *SiteDetailUpdate) SaveX(ctx context.Context) int
- func (sdu *SiteDetailUpdate) SetAddress(s string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetCreatedAt(t time.Time) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetEmail(s string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetFb(s string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetIg(s string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetName(s string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetNillableAddress(s *string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetNillableCreatedAt(t *time.Time) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetNillableEmail(s *string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetNillableFb(s *string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetNillableIg(s *string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetNillableName(s *string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetNillablePhone(s *string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetNillableTw(s *string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetNillableWh(s *string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetPhone(s string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetTw(s string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetUpdatedAt(t time.Time) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) SetWh(s string) *SiteDetailUpdate
- func (sdu *SiteDetailUpdate) Where(ps ...predicate.SiteDetail) *SiteDetailUpdate
- type SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) Exec(ctx context.Context) error
- func (sduo *SiteDetailUpdateOne) ExecX(ctx context.Context)
- func (sduo *SiteDetailUpdateOne) Mutation() *SiteDetailMutation
- func (sduo *SiteDetailUpdateOne) Save(ctx context.Context) (*SiteDetail, error)
- func (sduo *SiteDetailUpdateOne) SaveX(ctx context.Context) *SiteDetail
- func (sduo *SiteDetailUpdateOne) Select(field string, fields ...string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetAddress(s string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetCreatedAt(t time.Time) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetEmail(s string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetFb(s string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetIg(s string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetName(s string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetNillableAddress(s *string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetNillableCreatedAt(t *time.Time) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetNillableEmail(s *string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetNillableFb(s *string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetNillableIg(s *string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetNillableName(s *string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetNillablePhone(s *string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetNillableTw(s *string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetNillableWh(s *string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetPhone(s string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetTw(s string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetUpdatedAt(t time.Time) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) SetWh(s string) *SiteDetailUpdateOne
- func (sduo *SiteDetailUpdateOne) Where(ps ...predicate.SiteDetail) *SiteDetailUpdateOne
- type SiteDetails
- type TraverseFunc
- type Traverser
- type Tx
- type User
- func (u *User) QueryAvatar() *FileQuery
- func (u *User) QueryCity() *CityQuery
- func (u *User) QueryComments() *CommentQuery
- func (u *User) QueryMemberChats() *ChatQuery
- func (u *User) QueryMessages() *MessageQuery
- func (u *User) QueryNotifications() *NotificationQuery
- func (u *User) QueryNotificationsFrom() *NotificationQuery
- func (u *User) QueryNotificationsRead() *NotificationQuery
- func (u *User) QueryOtp() *OtpQuery
- func (u *User) QueryOwnedChats() *ChatQuery
- func (u *User) QueryPosts() *PostQuery
- func (u *User) QueryReactions() *ReactionQuery
- func (u *User) QueryReplies() *ReplyQuery
- func (u *User) QueryRequesteeFriends() *FriendQuery
- func (u *User) QueryRequesterFriends() *FriendQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryAvatar(u *User) *FileQuery
- func (c *UserClient) QueryCity(u *User) *CityQuery
- func (c *UserClient) QueryComments(u *User) *CommentQuery
- func (c *UserClient) QueryMemberChats(u *User) *ChatQuery
- func (c *UserClient) QueryMessages(u *User) *MessageQuery
- func (c *UserClient) QueryNotifications(u *User) *NotificationQuery
- func (c *UserClient) QueryNotificationsFrom(u *User) *NotificationQuery
- func (c *UserClient) QueryNotificationsRead(u *User) *NotificationQuery
- func (c *UserClient) QueryOtp(u *User) *OtpQuery
- func (c *UserClient) QueryOwnedChats(u *User) *ChatQuery
- func (c *UserClient) QueryPosts(u *User) *PostQuery
- func (c *UserClient) QueryReactions(u *User) *ReactionQuery
- func (c *UserClient) QueryReplies(u *User) *ReplyQuery
- func (c *UserClient) QueryRequesteeFriends(u *User) *FriendQuery
- func (c *UserClient) QueryRequesterFriends(u *User) *FriendQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddCommentIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddComments(c ...*Comment) *UserCreate
- func (uc *UserCreate) AddMemberChatIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddMemberChats(c ...*Chat) *UserCreate
- func (uc *UserCreate) AddMessageIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddMessages(m ...*Message) *UserCreate
- func (uc *UserCreate) AddNotificationIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddNotifications(n ...*Notification) *UserCreate
- func (uc *UserCreate) AddNotificationsFrom(n ...*Notification) *UserCreate
- func (uc *UserCreate) AddNotificationsFromIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddNotificationsRead(n ...*Notification) *UserCreate
- func (uc *UserCreate) AddNotificationsReadIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddOwnedChatIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddOwnedChats(c ...*Chat) *UserCreate
- func (uc *UserCreate) AddPostIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddPosts(p ...*Post) *UserCreate
- func (uc *UserCreate) AddReactionIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddReactions(r ...*Reaction) *UserCreate
- func (uc *UserCreate) AddReplies(r ...*Reply) *UserCreate
- func (uc *UserCreate) AddReplyIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddRequesteeFriendIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddRequesteeFriends(f ...*Friend) *UserCreate
- func (uc *UserCreate) AddRequesterFriendIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddRequesterFriends(f ...*Friend) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAccess(s string) *UserCreate
- func (uc *UserCreate) SetAvatar(f *File) *UserCreate
- func (uc *UserCreate) SetAvatarID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetBio(s string) *UserCreate
- func (uc *UserCreate) SetCity(c *City) *UserCreate
- func (uc *UserCreate) SetCityID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDob(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetFirstName(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetIsActive(b bool) *UserCreate
- func (uc *UserCreate) SetIsEmailVerified(b bool) *UserCreate
- func (uc *UserCreate) SetIsStaff(b bool) *UserCreate
- func (uc *UserCreate) SetLastName(s string) *UserCreate
- func (uc *UserCreate) SetNillableAccess(s *string) *UserCreate
- func (uc *UserCreate) SetNillableAvatarID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableBio(s *string) *UserCreate
- func (uc *UserCreate) SetNillableCityID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDob(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableIsActive(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableIsEmailVerified(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableIsStaff(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableOtpID(id *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableRefresh(s *string) *UserCreate
- func (uc *UserCreate) SetNillableTermsAgreement(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetOtp(o *Otp) *UserCreate
- func (uc *UserCreate) SetOtpID(id uuid.UUID) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetRefresh(s string) *UserCreate
- func (uc *UserCreate) SetTermsAgreement(b bool) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- func (e UserEdges) AvatarOrErr() (*File, error)
- func (e UserEdges) CityOrErr() (*City, error)
- func (e UserEdges) CommentsOrErr() ([]*Comment, error)
- func (e UserEdges) MemberChatsOrErr() ([]*Chat, error)
- func (e UserEdges) MessagesOrErr() ([]*Message, error)
- func (e UserEdges) NotificationsFromOrErr() ([]*Notification, error)
- func (e UserEdges) NotificationsOrErr() ([]*Notification, error)
- func (e UserEdges) NotificationsReadOrErr() ([]*Notification, error)
- func (e UserEdges) OtpOrErr() (*Otp, error)
- func (e UserEdges) OwnedChatsOrErr() ([]*Chat, error)
- func (e UserEdges) PostsOrErr() ([]*Post, error)
- func (e UserEdges) ReactionsOrErr() ([]*Reaction, error)
- func (e UserEdges) RepliesOrErr() ([]*Reply, error)
- func (e UserEdges) RequesteeFriendsOrErr() ([]*Friend, error)
- func (e UserEdges) RequesterFriendsOrErr() ([]*Friend, error)
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) Access() (r string, exists bool)
- func (m *UserMutation) AccessCleared() bool
- func (m *UserMutation) AddCommentIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddMemberChatIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddMessageIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddNotificationIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddNotificationsFromIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddNotificationsReadIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddOwnedChatIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddPostIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddReactionIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddReplyIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddRequesteeFriendIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddRequesterFriendIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AvatarCleared() bool
- func (m *UserMutation) AvatarID() (r uuid.UUID, exists bool)
- func (m *UserMutation) AvatarIDCleared() bool
- func (m *UserMutation) AvatarIDs() (ids []uuid.UUID)
- func (m *UserMutation) Bio() (r string, exists bool)
- func (m *UserMutation) BioCleared() bool
- func (m *UserMutation) CityCleared() bool
- func (m *UserMutation) CityID() (r uuid.UUID, exists bool)
- func (m *UserMutation) CityIDCleared() bool
- func (m *UserMutation) CityIDs() (ids []uuid.UUID)
- func (m *UserMutation) ClearAccess()
- func (m *UserMutation) ClearAvatar()
- func (m *UserMutation) ClearAvatarID()
- func (m *UserMutation) ClearBio()
- func (m *UserMutation) ClearCity()
- func (m *UserMutation) ClearCityID()
- func (m *UserMutation) ClearComments()
- func (m *UserMutation) ClearDob()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearMemberChats()
- func (m *UserMutation) ClearMessages()
- func (m *UserMutation) ClearNotifications()
- func (m *UserMutation) ClearNotificationsFrom()
- func (m *UserMutation) ClearNotificationsRead()
- func (m *UserMutation) ClearOtp()
- func (m *UserMutation) ClearOwnedChats()
- func (m *UserMutation) ClearPosts()
- func (m *UserMutation) ClearReactions()
- func (m *UserMutation) ClearRefresh()
- func (m *UserMutation) ClearReplies()
- func (m *UserMutation) ClearRequesteeFriends()
- func (m *UserMutation) ClearRequesterFriends()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CommentsCleared() bool
- func (m *UserMutation) CommentsIDs() (ids []uuid.UUID)
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Dob() (r time.Time, exists bool)
- func (m *UserMutation) DobCleared() bool
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) FirstName() (r string, exists bool)
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) IsActive() (r bool, exists bool)
- func (m *UserMutation) IsEmailVerified() (r bool, exists bool)
- func (m *UserMutation) IsStaff() (r bool, exists bool)
- func (m *UserMutation) LastName() (r string, exists bool)
- func (m *UserMutation) MemberChatsCleared() bool
- func (m *UserMutation) MemberChatsIDs() (ids []uuid.UUID)
- func (m *UserMutation) MessagesCleared() bool
- func (m *UserMutation) MessagesIDs() (ids []uuid.UUID)
- func (m *UserMutation) NotificationsCleared() bool
- func (m *UserMutation) NotificationsFromCleared() bool
- func (m *UserMutation) NotificationsFromIDs() (ids []uuid.UUID)
- func (m *UserMutation) NotificationsIDs() (ids []uuid.UUID)
- func (m *UserMutation) NotificationsReadCleared() bool
- func (m *UserMutation) NotificationsReadIDs() (ids []uuid.UUID)
- func (m *UserMutation) OldAccess(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldAvatarID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *UserMutation) OldBio(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldCityID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldDob(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldIsActive(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldIsEmailVerified(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldIsStaff(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldRefresh(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldTermsAgreement(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) OtpCleared() bool
- func (m *UserMutation) OtpID() (id uuid.UUID, exists bool)
- func (m *UserMutation) OtpIDs() (ids []uuid.UUID)
- func (m *UserMutation) OwnedChatsCleared() bool
- func (m *UserMutation) OwnedChatsIDs() (ids []uuid.UUID)
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) PostsCleared() bool
- func (m *UserMutation) PostsIDs() (ids []uuid.UUID)
- func (m *UserMutation) ReactionsCleared() bool
- func (m *UserMutation) ReactionsIDs() (ids []uuid.UUID)
- func (m *UserMutation) Refresh() (r string, exists bool)
- func (m *UserMutation) RefreshCleared() bool
- func (m *UserMutation) RemoveCommentIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveMemberChatIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveMessageIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveNotificationIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveNotificationsFromIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveNotificationsReadIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveOwnedChatIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovePostIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveReactionIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveReplyIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveRequesteeFriendIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveRequesterFriendIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovedCommentsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedMemberChatsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedMessagesIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedNotificationsFromIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedNotificationsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedNotificationsReadIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedOwnedChatsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedPostsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedReactionsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedRepliesIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedRequesteeFriendsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedRequesterFriendsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RepliesCleared() bool
- func (m *UserMutation) RepliesIDs() (ids []uuid.UUID)
- func (m *UserMutation) RequesteeFriendsCleared() bool
- func (m *UserMutation) RequesteeFriendsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RequesterFriendsCleared() bool
- func (m *UserMutation) RequesterFriendsIDs() (ids []uuid.UUID)
- func (m *UserMutation) ResetAccess()
- func (m *UserMutation) ResetAvatar()
- func (m *UserMutation) ResetAvatarID()
- func (m *UserMutation) ResetBio()
- func (m *UserMutation) ResetCity()
- func (m *UserMutation) ResetCityID()
- func (m *UserMutation) ResetComments()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetDob()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFirstName()
- func (m *UserMutation) ResetIsActive()
- func (m *UserMutation) ResetIsEmailVerified()
- func (m *UserMutation) ResetIsStaff()
- func (m *UserMutation) ResetLastName()
- func (m *UserMutation) ResetMemberChats()
- func (m *UserMutation) ResetMessages()
- func (m *UserMutation) ResetNotifications()
- func (m *UserMutation) ResetNotificationsFrom()
- func (m *UserMutation) ResetNotificationsRead()
- func (m *UserMutation) ResetOtp()
- func (m *UserMutation) ResetOwnedChats()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetPosts()
- func (m *UserMutation) ResetReactions()
- func (m *UserMutation) ResetRefresh()
- func (m *UserMutation) ResetReplies()
- func (m *UserMutation) ResetRequesteeFriends()
- func (m *UserMutation) ResetRequesterFriends()
- func (m *UserMutation) ResetTermsAgreement()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SetAccess(s string)
- func (m *UserMutation) SetAvatarID(u uuid.UUID)
- func (m *UserMutation) SetBio(s string)
- func (m *UserMutation) SetCityID(u uuid.UUID)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetDob(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetFirstName(s string)
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetIsActive(b bool)
- func (m *UserMutation) SetIsEmailVerified(b bool)
- func (m *UserMutation) SetIsStaff(b bool)
- func (m *UserMutation) SetLastName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetOtpID(id uuid.UUID)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetRefresh(s string)
- func (m *UserMutation) SetTermsAgreement(b bool)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) SetUsername(s string)
- func (m *UserMutation) TermsAgreement() (r bool, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryAvatar() *FileQuery
- func (uq *UserQuery) QueryCity() *CityQuery
- func (uq *UserQuery) QueryComments() *CommentQuery
- func (uq *UserQuery) QueryMemberChats() *ChatQuery
- func (uq *UserQuery) QueryMessages() *MessageQuery
- func (uq *UserQuery) QueryNotifications() *NotificationQuery
- func (uq *UserQuery) QueryNotificationsFrom() *NotificationQuery
- func (uq *UserQuery) QueryNotificationsRead() *NotificationQuery
- func (uq *UserQuery) QueryOtp() *OtpQuery
- func (uq *UserQuery) QueryOwnedChats() *ChatQuery
- func (uq *UserQuery) QueryPosts() *PostQuery
- func (uq *UserQuery) QueryReactions() *ReactionQuery
- func (uq *UserQuery) QueryReplies() *ReplyQuery
- func (uq *UserQuery) QueryRequesteeFriends() *FriendQuery
- func (uq *UserQuery) QueryRequesterFriends() *FriendQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithAvatar(opts ...func(*FileQuery)) *UserQuery
- func (uq *UserQuery) WithCity(opts ...func(*CityQuery)) *UserQuery
- func (uq *UserQuery) WithComments(opts ...func(*CommentQuery)) *UserQuery
- func (uq *UserQuery) WithMemberChats(opts ...func(*ChatQuery)) *UserQuery
- func (uq *UserQuery) WithMessages(opts ...func(*MessageQuery)) *UserQuery
- func (uq *UserQuery) WithNotifications(opts ...func(*NotificationQuery)) *UserQuery
- func (uq *UserQuery) WithNotificationsFrom(opts ...func(*NotificationQuery)) *UserQuery
- func (uq *UserQuery) WithNotificationsRead(opts ...func(*NotificationQuery)) *UserQuery
- func (uq *UserQuery) WithOtp(opts ...func(*OtpQuery)) *UserQuery
- func (uq *UserQuery) WithOwnedChats(opts ...func(*ChatQuery)) *UserQuery
- func (uq *UserQuery) WithPosts(opts ...func(*PostQuery)) *UserQuery
- func (uq *UserQuery) WithReactions(opts ...func(*ReactionQuery)) *UserQuery
- func (uq *UserQuery) WithReplies(opts ...func(*ReplyQuery)) *UserQuery
- func (uq *UserQuery) WithRequesteeFriends(opts ...func(*FriendQuery)) *UserQuery
- func (uq *UserQuery) WithRequesterFriends(opts ...func(*FriendQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddCommentIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddComments(c ...*Comment) *UserUpdate
- func (uu *UserUpdate) AddMemberChatIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddMemberChats(c ...*Chat) *UserUpdate
- func (uu *UserUpdate) AddMessageIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddMessages(m ...*Message) *UserUpdate
- func (uu *UserUpdate) AddNotificationIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddNotifications(n ...*Notification) *UserUpdate
- func (uu *UserUpdate) AddNotificationsFrom(n ...*Notification) *UserUpdate
- func (uu *UserUpdate) AddNotificationsFromIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddNotificationsRead(n ...*Notification) *UserUpdate
- func (uu *UserUpdate) AddNotificationsReadIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddOwnedChatIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddOwnedChats(c ...*Chat) *UserUpdate
- func (uu *UserUpdate) AddPostIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddPosts(p ...*Post) *UserUpdate
- func (uu *UserUpdate) AddReactionIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddReactions(r ...*Reaction) *UserUpdate
- func (uu *UserUpdate) AddReplies(r ...*Reply) *UserUpdate
- func (uu *UserUpdate) AddReplyIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddRequesteeFriendIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddRequesteeFriends(f ...*Friend) *UserUpdate
- func (uu *UserUpdate) AddRequesterFriendIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddRequesterFriends(f ...*Friend) *UserUpdate
- func (uu *UserUpdate) ClearAccess() *UserUpdate
- func (uu *UserUpdate) ClearAvatar() *UserUpdate
- func (uu *UserUpdate) ClearAvatarID() *UserUpdate
- func (uu *UserUpdate) ClearBio() *UserUpdate
- func (uu *UserUpdate) ClearCity() *UserUpdate
- func (uu *UserUpdate) ClearCityID() *UserUpdate
- func (uu *UserUpdate) ClearComments() *UserUpdate
- func (uu *UserUpdate) ClearDob() *UserUpdate
- func (uu *UserUpdate) ClearMemberChats() *UserUpdate
- func (uu *UserUpdate) ClearMessages() *UserUpdate
- func (uu *UserUpdate) ClearNotifications() *UserUpdate
- func (uu *UserUpdate) ClearNotificationsFrom() *UserUpdate
- func (uu *UserUpdate) ClearNotificationsRead() *UserUpdate
- func (uu *UserUpdate) ClearOtp() *UserUpdate
- func (uu *UserUpdate) ClearOwnedChats() *UserUpdate
- func (uu *UserUpdate) ClearPosts() *UserUpdate
- func (uu *UserUpdate) ClearReactions() *UserUpdate
- func (uu *UserUpdate) ClearRefresh() *UserUpdate
- func (uu *UserUpdate) ClearReplies() *UserUpdate
- func (uu *UserUpdate) ClearRequesteeFriends() *UserUpdate
- func (uu *UserUpdate) ClearRequesterFriends() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveCommentIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveComments(c ...*Comment) *UserUpdate
- func (uu *UserUpdate) RemoveMemberChatIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveMemberChats(c ...*Chat) *UserUpdate
- func (uu *UserUpdate) RemoveMessageIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveMessages(m ...*Message) *UserUpdate
- func (uu *UserUpdate) RemoveNotificationIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveNotifications(n ...*Notification) *UserUpdate
- func (uu *UserUpdate) RemoveNotificationsFrom(n ...*Notification) *UserUpdate
- func (uu *UserUpdate) RemoveNotificationsFromIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveNotificationsRead(n ...*Notification) *UserUpdate
- func (uu *UserUpdate) RemoveNotificationsReadIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveOwnedChatIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveOwnedChats(c ...*Chat) *UserUpdate
- func (uu *UserUpdate) RemovePostIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemovePosts(p ...*Post) *UserUpdate
- func (uu *UserUpdate) RemoveReactionIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveReactions(r ...*Reaction) *UserUpdate
- func (uu *UserUpdate) RemoveReplies(r ...*Reply) *UserUpdate
- func (uu *UserUpdate) RemoveReplyIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveRequesteeFriendIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveRequesteeFriends(f ...*Friend) *UserUpdate
- func (uu *UserUpdate) RemoveRequesterFriendIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveRequesterFriends(f ...*Friend) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAccess(s string) *UserUpdate
- func (uu *UserUpdate) SetAvatar(f *File) *UserUpdate
- func (uu *UserUpdate) SetAvatarID(u uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetBio(s string) *UserUpdate
- func (uu *UserUpdate) SetCity(c *City) *UserUpdate
- func (uu *UserUpdate) SetCityID(u uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetDob(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetFirstName(s string) *UserUpdate
- func (uu *UserUpdate) SetIsActive(b bool) *UserUpdate
- func (uu *UserUpdate) SetIsEmailVerified(b bool) *UserUpdate
- func (uu *UserUpdate) SetIsStaff(b bool) *UserUpdate
- func (uu *UserUpdate) SetLastName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableAccess(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableAvatarID(u *uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetNillableBio(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableCityID(u *uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableDob(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableFirstName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableIsActive(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableIsEmailVerified(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableIsStaff(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableLastName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableOtpID(id *uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableRefresh(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableTermsAgreement(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableUsername(s *string) *UserUpdate
- func (uu *UserUpdate) SetOtp(o *Otp) *UserUpdate
- func (uu *UserUpdate) SetOtpID(id uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetRefresh(s string) *UserUpdate
- func (uu *UserUpdate) SetTermsAgreement(b bool) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddCommentIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddComments(c ...*Comment) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMemberChatIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMemberChats(c ...*Chat) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMessageIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMessages(m ...*Message) *UserUpdateOne
- func (uuo *UserUpdateOne) AddNotificationIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddNotifications(n ...*Notification) *UserUpdateOne
- func (uuo *UserUpdateOne) AddNotificationsFrom(n ...*Notification) *UserUpdateOne
- func (uuo *UserUpdateOne) AddNotificationsFromIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddNotificationsRead(n ...*Notification) *UserUpdateOne
- func (uuo *UserUpdateOne) AddNotificationsReadIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddOwnedChatIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddOwnedChats(c ...*Chat) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPostIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPosts(p ...*Post) *UserUpdateOne
- func (uuo *UserUpdateOne) AddReactionIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddReactions(r ...*Reaction) *UserUpdateOne
- func (uuo *UserUpdateOne) AddReplies(r ...*Reply) *UserUpdateOne
- func (uuo *UserUpdateOne) AddReplyIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRequesteeFriendIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRequesteeFriends(f ...*Friend) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRequesterFriendIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRequesterFriends(f ...*Friend) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAccess() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAvatar() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAvatarID() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBio() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCity() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCityID() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearComments() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDob() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMemberChats() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMessages() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearNotifications() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearNotificationsFrom() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearNotificationsRead() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOtp() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOwnedChats() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPosts() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearReactions() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRefresh() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearReplies() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRequesteeFriends() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRequesterFriends() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveCommentIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveComments(c ...*Comment) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMemberChatIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMemberChats(c ...*Chat) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMessageIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMessages(m ...*Message) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveNotificationIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveNotifications(n ...*Notification) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveNotificationsFrom(n ...*Notification) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveNotificationsFromIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveNotificationsRead(n ...*Notification) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveNotificationsReadIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveOwnedChatIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveOwnedChats(c ...*Chat) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePostIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePosts(p ...*Post) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveReactionIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveReactions(r ...*Reaction) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveReplies(r ...*Reply) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveReplyIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRequesteeFriendIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRequesteeFriends(f ...*Friend) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRequesterFriendIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRequesterFriends(f ...*Friend) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAccess(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAvatar(f *File) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAvatarID(u uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBio(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCity(c *City) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCityID(u uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDob(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsActive(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsEmailVerified(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsStaff(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAccess(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAvatarID(u *uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBio(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCityID(u *uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDob(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableFirstName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsActive(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsEmailVerified(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsStaff(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableOtpID(id *uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRefresh(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableTermsAgreement(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUsername(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetOtp(o *Otp) *UserUpdateOne
- func (uuo *UserUpdateOne) SetOtpID(id uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRefresh(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTermsAgreement(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeChat = "Chat" TypeCity = "City" TypeComment = "Comment" TypeCountry = "Country" TypeFile = "File" TypeFriend = "Friend" TypeMessage = "Message" TypeNotification = "Notification" TypeOtp = "Otp" TypePost = "Post" TypeReaction = "Reaction" TypeRegion = "Region" TypeReply = "Reply" TypeSiteDetail = "SiteDetail" TypeUser = "User" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type 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 Chat ¶
type Chat struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name *string `json:"name,omitempty"` // Ctype holds the value of the "ctype" field. Ctype chat.Ctype `json:"ctype,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID uuid.UUID `json:"owner_id,omitempty"` // ImageID holds the value of the "image_id" field. ImageID *uuid.UUID `json:"image_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ChatQuery when eager-loading is set. Edges ChatEdges `json:"edges"` // contains filtered or unexported fields }
Chat is the model entity for the Chat schema.
func (*Chat) QueryImage ¶
QueryImage queries the "image" edge of the Chat entity.
func (*Chat) QueryMessages ¶
func (c *Chat) QueryMessages() *MessageQuery
QueryMessages queries the "messages" edge of the Chat entity.
func (*Chat) QueryOwner ¶
QueryOwner queries the "owner" edge of the Chat entity.
func (*Chat) QueryUsers ¶
QueryUsers queries the "users" edge of the Chat entity.
func (*Chat) Unwrap ¶
Unwrap unwraps the Chat 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 (*Chat) Update ¶
func (c *Chat) Update() *ChatUpdateOne
Update returns a builder for updating this Chat. Note that you need to call Chat.Unwrap() before calling this method if this Chat was returned from a transaction, and the transaction was committed or rolled back.
type ChatClient ¶
type ChatClient struct {
// contains filtered or unexported fields
}
ChatClient is a client for the Chat schema.
func NewChatClient ¶
func NewChatClient(c config) *ChatClient
NewChatClient returns a client for the Chat from the given config.
func (*ChatClient) Create ¶
func (c *ChatClient) Create() *ChatCreate
Create returns a builder for creating a Chat entity.
func (*ChatClient) CreateBulk ¶
func (c *ChatClient) CreateBulk(builders ...*ChatCreate) *ChatCreateBulk
CreateBulk returns a builder for creating a bulk of Chat entities.
func (*ChatClient) Delete ¶
func (c *ChatClient) Delete() *ChatDelete
Delete returns a delete builder for Chat.
func (*ChatClient) DeleteOne ¶
func (c *ChatClient) DeleteOne(ch *Chat) *ChatDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ChatClient) DeleteOneID ¶
func (c *ChatClient) DeleteOneID(id uuid.UUID) *ChatDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ChatClient) Intercept ¶
func (c *ChatClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `chat.Intercept(f(g(h())))`.
func (*ChatClient) Interceptors ¶
func (c *ChatClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ChatClient) MapCreateBulk ¶
func (c *ChatClient) MapCreateBulk(slice any, setFunc func(*ChatCreate, int)) *ChatCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ChatClient) Query ¶
func (c *ChatClient) Query() *ChatQuery
Query returns a query builder for Chat.
func (*ChatClient) QueryImage ¶
func (c *ChatClient) QueryImage(ch *Chat) *FileQuery
QueryImage queries the image edge of a Chat.
func (*ChatClient) QueryMessages ¶
func (c *ChatClient) QueryMessages(ch *Chat) *MessageQuery
QueryMessages queries the messages edge of a Chat.
func (*ChatClient) QueryOwner ¶
func (c *ChatClient) QueryOwner(ch *Chat) *UserQuery
QueryOwner queries the owner edge of a Chat.
func (*ChatClient) QueryUsers ¶
func (c *ChatClient) QueryUsers(ch *Chat) *UserQuery
QueryUsers queries the users edge of a Chat.
func (*ChatClient) Update ¶
func (c *ChatClient) Update() *ChatUpdate
Update returns an update builder for Chat.
func (*ChatClient) UpdateOne ¶
func (c *ChatClient) UpdateOne(ch *Chat) *ChatUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ChatClient) UpdateOneID ¶
func (c *ChatClient) UpdateOneID(id uuid.UUID) *ChatUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ChatClient) Use ¶
func (c *ChatClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `chat.Hooks(f(g(h())))`.
type ChatCreate ¶
type ChatCreate struct {
// contains filtered or unexported fields
}
ChatCreate is the builder for creating a Chat entity.
func (*ChatCreate) AddMessageIDs ¶
func (cc *ChatCreate) AddMessageIDs(ids ...uuid.UUID) *ChatCreate
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*ChatCreate) AddMessages ¶
func (cc *ChatCreate) AddMessages(m ...*Message) *ChatCreate
AddMessages adds the "messages" edges to the Message entity.
func (*ChatCreate) AddUserIDs ¶
func (cc *ChatCreate) AddUserIDs(ids ...uuid.UUID) *ChatCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*ChatCreate) AddUsers ¶
func (cc *ChatCreate) AddUsers(u ...*User) *ChatCreate
AddUsers adds the "users" edges to the User entity.
func (*ChatCreate) Exec ¶
func (cc *ChatCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatCreate) ExecX ¶
func (cc *ChatCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatCreate) Mutation ¶
func (cc *ChatCreate) Mutation() *ChatMutation
Mutation returns the ChatMutation object of the builder.
func (*ChatCreate) Save ¶
func (cc *ChatCreate) Save(ctx context.Context) (*Chat, error)
Save creates the Chat in the database.
func (*ChatCreate) SaveX ¶
func (cc *ChatCreate) SaveX(ctx context.Context) *Chat
SaveX calls Save and panics if Save returns an error.
func (*ChatCreate) SetCreatedAt ¶
func (cc *ChatCreate) SetCreatedAt(t time.Time) *ChatCreate
SetCreatedAt sets the "created_at" field.
func (*ChatCreate) SetCtype ¶
func (cc *ChatCreate) SetCtype(c chat.Ctype) *ChatCreate
SetCtype sets the "ctype" field.
func (*ChatCreate) SetDescription ¶
func (cc *ChatCreate) SetDescription(s string) *ChatCreate
SetDescription sets the "description" field.
func (*ChatCreate) SetID ¶
func (cc *ChatCreate) SetID(u uuid.UUID) *ChatCreate
SetID sets the "id" field.
func (*ChatCreate) SetImage ¶
func (cc *ChatCreate) SetImage(f *File) *ChatCreate
SetImage sets the "image" edge to the File entity.
func (*ChatCreate) SetImageID ¶
func (cc *ChatCreate) SetImageID(u uuid.UUID) *ChatCreate
SetImageID sets the "image_id" field.
func (*ChatCreate) SetName ¶
func (cc *ChatCreate) SetName(s string) *ChatCreate
SetName sets the "name" field.
func (*ChatCreate) SetNillableCreatedAt ¶
func (cc *ChatCreate) SetNillableCreatedAt(t *time.Time) *ChatCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ChatCreate) SetNillableDescription ¶
func (cc *ChatCreate) SetNillableDescription(s *string) *ChatCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ChatCreate) SetNillableID ¶
func (cc *ChatCreate) SetNillableID(u *uuid.UUID) *ChatCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ChatCreate) SetNillableImageID ¶
func (cc *ChatCreate) SetNillableImageID(u *uuid.UUID) *ChatCreate
SetNillableImageID sets the "image_id" field if the given value is not nil.
func (*ChatCreate) SetNillableName ¶
func (cc *ChatCreate) SetNillableName(s *string) *ChatCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*ChatCreate) SetNillableUpdatedAt ¶
func (cc *ChatCreate) SetNillableUpdatedAt(t *time.Time) *ChatCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ChatCreate) SetOwner ¶
func (cc *ChatCreate) SetOwner(u *User) *ChatCreate
SetOwner sets the "owner" edge to the User entity.
func (*ChatCreate) SetOwnerID ¶
func (cc *ChatCreate) SetOwnerID(u uuid.UUID) *ChatCreate
SetOwnerID sets the "owner_id" field.
func (*ChatCreate) SetUpdatedAt ¶
func (cc *ChatCreate) SetUpdatedAt(t time.Time) *ChatCreate
SetUpdatedAt sets the "updated_at" field.
type ChatCreateBulk ¶
type ChatCreateBulk struct {
// contains filtered or unexported fields
}
ChatCreateBulk is the builder for creating many Chat entities in bulk.
func (*ChatCreateBulk) Exec ¶
func (ccb *ChatCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatCreateBulk) ExecX ¶
func (ccb *ChatCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ChatDelete ¶
type ChatDelete struct {
// contains filtered or unexported fields
}
ChatDelete is the builder for deleting a Chat entity.
func (*ChatDelete) Exec ¶
func (cd *ChatDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ChatDelete) ExecX ¶
func (cd *ChatDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ChatDelete) Where ¶
func (cd *ChatDelete) Where(ps ...predicate.Chat) *ChatDelete
Where appends a list predicates to the ChatDelete builder.
type ChatDeleteOne ¶
type ChatDeleteOne struct {
// contains filtered or unexported fields
}
ChatDeleteOne is the builder for deleting a single Chat entity.
func (*ChatDeleteOne) Exec ¶
func (cdo *ChatDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ChatDeleteOne) ExecX ¶
func (cdo *ChatDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatDeleteOne) Where ¶
func (cdo *ChatDeleteOne) Where(ps ...predicate.Chat) *ChatDeleteOne
Where appends a list predicates to the ChatDelete builder.
type ChatEdges ¶
type ChatEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // Image holds the value of the image edge. Image *File `json:"image,omitempty"` // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // Messages holds the value of the messages edge. Messages []*Message `json:"messages,omitempty"` // contains filtered or unexported fields }
ChatEdges holds the relations/edges for other nodes in the graph.
func (ChatEdges) ImageOrErr ¶
ImageOrErr returns the Image value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ChatEdges) MessagesOrErr ¶
MessagesOrErr returns the Messages value or an error if the edge was not loaded in eager-loading.
func (ChatEdges) OwnerOrErr ¶
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ChatEdges) UsersOrErr ¶
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type ChatGroupBy ¶
type ChatGroupBy struct {
// contains filtered or unexported fields
}
ChatGroupBy is the group-by builder for Chat entities.
func (*ChatGroupBy) Aggregate ¶
func (cgb *ChatGroupBy) Aggregate(fns ...AggregateFunc) *ChatGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ChatGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Scan ¶
func (cgb *ChatGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatMutation ¶
type ChatMutation struct {
// contains filtered or unexported fields
}
ChatMutation represents an operation that mutates the Chat nodes in the graph.
func (*ChatMutation) AddField ¶
func (m *ChatMutation) 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 (*ChatMutation) AddMessageIDs ¶
func (m *ChatMutation) AddMessageIDs(ids ...uuid.UUID)
AddMessageIDs adds the "messages" edge to the Message entity by ids.
func (*ChatMutation) AddUserIDs ¶
func (m *ChatMutation) AddUserIDs(ids ...uuid.UUID)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*ChatMutation) AddedEdges ¶
func (m *ChatMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ChatMutation) AddedField ¶
func (m *ChatMutation) 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 (*ChatMutation) AddedFields ¶
func (m *ChatMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ChatMutation) AddedIDs ¶
func (m *ChatMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ChatMutation) ClearDescription ¶
func (m *ChatMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*ChatMutation) ClearEdge ¶
func (m *ChatMutation) 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 (*ChatMutation) ClearField ¶
func (m *ChatMutation) 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 (*ChatMutation) ClearImage ¶
func (m *ChatMutation) ClearImage()
ClearImage clears the "image" edge to the File entity.
func (*ChatMutation) ClearImageID ¶
func (m *ChatMutation) ClearImageID()
ClearImageID clears the value of the "image_id" field.
func (*ChatMutation) ClearMessages ¶
func (m *ChatMutation) ClearMessages()
ClearMessages clears the "messages" edge to the Message entity.
func (*ChatMutation) ClearName ¶
func (m *ChatMutation) ClearName()
ClearName clears the value of the "name" field.
func (*ChatMutation) ClearOwner ¶
func (m *ChatMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*ChatMutation) ClearUsers ¶
func (m *ChatMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*ChatMutation) ClearedEdges ¶
func (m *ChatMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ChatMutation) ClearedFields ¶
func (m *ChatMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ChatMutation) Client ¶
func (m ChatMutation) 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 (*ChatMutation) CreatedAt ¶
func (m *ChatMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ChatMutation) Ctype ¶
func (m *ChatMutation) Ctype() (r chat.Ctype, exists bool)
Ctype returns the value of the "ctype" field in the mutation.
func (*ChatMutation) Description ¶
func (m *ChatMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ChatMutation) DescriptionCleared ¶
func (m *ChatMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*ChatMutation) EdgeCleared ¶
func (m *ChatMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ChatMutation) Field ¶
func (m *ChatMutation) 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 (*ChatMutation) FieldCleared ¶
func (m *ChatMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ChatMutation) Fields ¶
func (m *ChatMutation) 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 (*ChatMutation) ID ¶
func (m *ChatMutation) 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 (*ChatMutation) 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 (*ChatMutation) ImageCleared ¶
func (m *ChatMutation) ImageCleared() bool
ImageCleared reports if the "image" edge to the File entity was cleared.
func (*ChatMutation) ImageID ¶
func (m *ChatMutation) ImageID() (r uuid.UUID, exists bool)
ImageID returns the value of the "image_id" field in the mutation.
func (*ChatMutation) ImageIDCleared ¶
func (m *ChatMutation) ImageIDCleared() bool
ImageIDCleared returns if the "image_id" field was cleared in this mutation.
func (*ChatMutation) ImageIDs ¶
func (m *ChatMutation) ImageIDs() (ids []uuid.UUID)
ImageIDs returns the "image" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ImageID instead. It exists only for internal usage by the builders.
func (*ChatMutation) MessagesCleared ¶
func (m *ChatMutation) MessagesCleared() bool
MessagesCleared reports if the "messages" edge to the Message entity was cleared.
func (*ChatMutation) MessagesIDs ¶
func (m *ChatMutation) MessagesIDs() (ids []uuid.UUID)
MessagesIDs returns the "messages" edge IDs in the mutation.
func (*ChatMutation) Name ¶
func (m *ChatMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ChatMutation) NameCleared ¶
func (m *ChatMutation) NameCleared() bool
NameCleared returns if the "name" field was cleared in this mutation.
func (*ChatMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldCtype ¶
OldCtype returns the old "ctype" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldDescription ¶
func (m *ChatMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the Chat entity. If the Chat 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 (*ChatMutation) 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 (*ChatMutation) OldImageID ¶
OldImageID returns the old "image_id" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldName ¶
func (m *ChatMutation) OldName(ctx context.Context) (v *string, err error)
OldName returns the old "name" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldOwnerID ¶
OldOwnerID returns the old "owner_id" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OwnerCleared ¶
func (m *ChatMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*ChatMutation) OwnerID ¶
func (m *ChatMutation) OwnerID() (r uuid.UUID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*ChatMutation) OwnerIDs ¶
func (m *ChatMutation) OwnerIDs() (ids []uuid.UUID)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*ChatMutation) RemoveMessageIDs ¶
func (m *ChatMutation) RemoveMessageIDs(ids ...uuid.UUID)
RemoveMessageIDs removes the "messages" edge to the Message entity by IDs.
func (*ChatMutation) RemoveUserIDs ¶
func (m *ChatMutation) RemoveUserIDs(ids ...uuid.UUID)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*ChatMutation) RemovedEdges ¶
func (m *ChatMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ChatMutation) RemovedIDs ¶
func (m *ChatMutation) 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 (*ChatMutation) RemovedMessagesIDs ¶
func (m *ChatMutation) RemovedMessagesIDs() (ids []uuid.UUID)
RemovedMessages returns the removed IDs of the "messages" edge to the Message entity.
func (*ChatMutation) RemovedUsersIDs ¶
func (m *ChatMutation) RemovedUsersIDs() (ids []uuid.UUID)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*ChatMutation) ResetCreatedAt ¶
func (m *ChatMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ChatMutation) ResetCtype ¶
func (m *ChatMutation) ResetCtype()
ResetCtype resets all changes to the "ctype" field.
func (*ChatMutation) ResetDescription ¶
func (m *ChatMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ChatMutation) ResetEdge ¶
func (m *ChatMutation) 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 (*ChatMutation) ResetField ¶
func (m *ChatMutation) 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 (*ChatMutation) ResetImage ¶
func (m *ChatMutation) ResetImage()
ResetImage resets all changes to the "image" edge.
func (*ChatMutation) ResetImageID ¶
func (m *ChatMutation) ResetImageID()
ResetImageID resets all changes to the "image_id" field.
func (*ChatMutation) ResetMessages ¶
func (m *ChatMutation) ResetMessages()
ResetMessages resets all changes to the "messages" edge.
func (*ChatMutation) ResetName ¶
func (m *ChatMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ChatMutation) ResetOwner ¶
func (m *ChatMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*ChatMutation) ResetOwnerID ¶
func (m *ChatMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*ChatMutation) ResetUpdatedAt ¶
func (m *ChatMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ChatMutation) ResetUsers ¶
func (m *ChatMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*ChatMutation) SetCreatedAt ¶
func (m *ChatMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ChatMutation) SetCtype ¶
func (m *ChatMutation) SetCtype(c chat.Ctype)
SetCtype sets the "ctype" field.
func (*ChatMutation) SetDescription ¶
func (m *ChatMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ChatMutation) SetField ¶
func (m *ChatMutation) 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 (*ChatMutation) SetID ¶
func (m *ChatMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Chat entities.
func (*ChatMutation) SetImageID ¶
func (m *ChatMutation) SetImageID(u uuid.UUID)
SetImageID sets the "image_id" field.
func (*ChatMutation) SetName ¶
func (m *ChatMutation) SetName(s string)
SetName sets the "name" field.
func (*ChatMutation) SetOp ¶
func (m *ChatMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ChatMutation) SetOwnerID ¶
func (m *ChatMutation) SetOwnerID(u uuid.UUID)
SetOwnerID sets the "owner_id" field.
func (*ChatMutation) SetUpdatedAt ¶
func (m *ChatMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (ChatMutation) Tx ¶
func (m ChatMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ChatMutation) Type ¶
func (m *ChatMutation) Type() string
Type returns the node type of this mutation (Chat).
func (*ChatMutation) UpdatedAt ¶
func (m *ChatMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ChatMutation) UsersCleared ¶
func (m *ChatMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*ChatMutation) UsersIDs ¶
func (m *ChatMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the "users" edge IDs in the mutation.
func (*ChatMutation) Where ¶
func (m *ChatMutation) Where(ps ...predicate.Chat)
Where appends a list predicates to the ChatMutation builder.
func (*ChatMutation) WhereP ¶
func (m *ChatMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ChatMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ChatQuery ¶
type ChatQuery struct {
// contains filtered or unexported fields
}
ChatQuery is the builder for querying Chat entities.
func (*ChatQuery) Aggregate ¶
func (cq *ChatQuery) Aggregate(fns ...AggregateFunc) *ChatSelect
Aggregate returns a ChatSelect configured with the given aggregations.
func (*ChatQuery) Clone ¶
Clone returns a duplicate of the ChatQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ChatQuery) First ¶
First returns the first Chat entity from the query. Returns a *NotFoundError when no Chat was found.
func (*ChatQuery) FirstID ¶
FirstID returns the first Chat ID from the query. Returns a *NotFoundError when no Chat ID was found.
func (*ChatQuery) GroupBy ¶
func (cq *ChatQuery) GroupBy(field string, fields ...string) *ChatGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Chat.Query(). GroupBy(chat.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ChatQuery) Only ¶
Only returns a single Chat entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Chat entity is found. Returns a *NotFoundError when no Chat entities are found.
func (*ChatQuery) OnlyID ¶
OnlyID is like Only, but returns the only Chat ID in the query. Returns a *NotSingularError when more than one Chat ID is found. Returns a *NotFoundError when no entities are found.
func (*ChatQuery) Order ¶
func (cq *ChatQuery) Order(o ...chat.OrderOption) *ChatQuery
Order specifies how the records should be ordered.
func (*ChatQuery) QueryImage ¶
QueryImage chains the current query on the "image" edge.
func (*ChatQuery) QueryMessages ¶
func (cq *ChatQuery) QueryMessages() *MessageQuery
QueryMessages chains the current query on the "messages" edge.
func (*ChatQuery) QueryOwner ¶
QueryOwner chains the current query on the "owner" edge.
func (*ChatQuery) QueryUsers ¶
QueryUsers chains the current query on the "users" edge.
func (*ChatQuery) Select ¶
func (cq *ChatQuery) Select(fields ...string) *ChatSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Chat.Query(). Select(chat.FieldCreatedAt). Scan(ctx, &v)
func (*ChatQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*ChatQuery) WithImage ¶
WithImage tells the query-builder to eager-load the nodes that are connected to the "image" edge. The optional arguments are used to configure the query builder of the edge.
func (*ChatQuery) WithMessages ¶
func (cq *ChatQuery) WithMessages(opts ...func(*MessageQuery)) *ChatQuery
WithMessages tells the query-builder to eager-load the nodes that are connected to the "messages" edge. The optional arguments are used to configure the query builder of the edge.
type ChatSelect ¶
type ChatSelect struct { *ChatQuery // contains filtered or unexported fields }
ChatSelect is the builder for selecting fields of Chat entities.
func (*ChatSelect) Aggregate ¶
func (cs *ChatSelect) Aggregate(fns ...AggregateFunc) *ChatSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ChatSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChatSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatSelect) Scan ¶
func (cs *ChatSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatUpdate ¶
type ChatUpdate struct {
// contains filtered or unexported fields
}
ChatUpdate is the builder for updating Chat entities.
func (*ChatUpdate) AddMessageIDs ¶
func (cu *ChatUpdate) AddMessageIDs(ids ...uuid.UUID) *ChatUpdate
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*ChatUpdate) AddMessages ¶
func (cu *ChatUpdate) AddMessages(m ...*Message) *ChatUpdate
AddMessages adds the "messages" edges to the Message entity.
func (*ChatUpdate) AddUserIDs ¶
func (cu *ChatUpdate) AddUserIDs(ids ...uuid.UUID) *ChatUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*ChatUpdate) AddUsers ¶
func (cu *ChatUpdate) AddUsers(u ...*User) *ChatUpdate
AddUsers adds the "users" edges to the User entity.
func (*ChatUpdate) ClearDescription ¶
func (cu *ChatUpdate) ClearDescription() *ChatUpdate
ClearDescription clears the value of the "description" field.
func (*ChatUpdate) ClearImage ¶
func (cu *ChatUpdate) ClearImage() *ChatUpdate
ClearImage clears the "image" edge to the File entity.
func (*ChatUpdate) ClearImageID ¶
func (cu *ChatUpdate) ClearImageID() *ChatUpdate
ClearImageID clears the value of the "image_id" field.
func (*ChatUpdate) ClearMessages ¶
func (cu *ChatUpdate) ClearMessages() *ChatUpdate
ClearMessages clears all "messages" edges to the Message entity.
func (*ChatUpdate) ClearName ¶
func (cu *ChatUpdate) ClearName() *ChatUpdate
ClearName clears the value of the "name" field.
func (*ChatUpdate) ClearOwner ¶
func (cu *ChatUpdate) ClearOwner() *ChatUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*ChatUpdate) ClearUsers ¶
func (cu *ChatUpdate) ClearUsers() *ChatUpdate
ClearUsers clears all "users" edges to the User entity.
func (*ChatUpdate) Exec ¶
func (cu *ChatUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatUpdate) ExecX ¶
func (cu *ChatUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatUpdate) Mutation ¶
func (cu *ChatUpdate) Mutation() *ChatMutation
Mutation returns the ChatMutation object of the builder.
func (*ChatUpdate) RemoveMessageIDs ¶
func (cu *ChatUpdate) RemoveMessageIDs(ids ...uuid.UUID) *ChatUpdate
RemoveMessageIDs removes the "messages" edge to Message entities by IDs.
func (*ChatUpdate) RemoveMessages ¶
func (cu *ChatUpdate) RemoveMessages(m ...*Message) *ChatUpdate
RemoveMessages removes "messages" edges to Message entities.
func (*ChatUpdate) RemoveUserIDs ¶
func (cu *ChatUpdate) RemoveUserIDs(ids ...uuid.UUID) *ChatUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*ChatUpdate) RemoveUsers ¶
func (cu *ChatUpdate) RemoveUsers(u ...*User) *ChatUpdate
RemoveUsers removes "users" edges to User entities.
func (*ChatUpdate) Save ¶
func (cu *ChatUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ChatUpdate) SaveX ¶
func (cu *ChatUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ChatUpdate) SetCreatedAt ¶
func (cu *ChatUpdate) SetCreatedAt(t time.Time) *ChatUpdate
SetCreatedAt sets the "created_at" field.
func (*ChatUpdate) SetCtype ¶
func (cu *ChatUpdate) SetCtype(c chat.Ctype) *ChatUpdate
SetCtype sets the "ctype" field.
func (*ChatUpdate) SetDescription ¶
func (cu *ChatUpdate) SetDescription(s string) *ChatUpdate
SetDescription sets the "description" field.
func (*ChatUpdate) SetImage ¶
func (cu *ChatUpdate) SetImage(f *File) *ChatUpdate
SetImage sets the "image" edge to the File entity.
func (*ChatUpdate) SetImageID ¶
func (cu *ChatUpdate) SetImageID(u uuid.UUID) *ChatUpdate
SetImageID sets the "image_id" field.
func (*ChatUpdate) SetName ¶
func (cu *ChatUpdate) SetName(s string) *ChatUpdate
SetName sets the "name" field.
func (*ChatUpdate) SetNillableCreatedAt ¶
func (cu *ChatUpdate) SetNillableCreatedAt(t *time.Time) *ChatUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ChatUpdate) SetNillableCtype ¶
func (cu *ChatUpdate) SetNillableCtype(c *chat.Ctype) *ChatUpdate
SetNillableCtype sets the "ctype" field if the given value is not nil.
func (*ChatUpdate) SetNillableDescription ¶
func (cu *ChatUpdate) SetNillableDescription(s *string) *ChatUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ChatUpdate) SetNillableImageID ¶
func (cu *ChatUpdate) SetNillableImageID(u *uuid.UUID) *ChatUpdate
SetNillableImageID sets the "image_id" field if the given value is not nil.
func (*ChatUpdate) SetNillableName ¶
func (cu *ChatUpdate) SetNillableName(s *string) *ChatUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ChatUpdate) SetNillableOwnerID ¶
func (cu *ChatUpdate) SetNillableOwnerID(u *uuid.UUID) *ChatUpdate
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*ChatUpdate) SetOwner ¶
func (cu *ChatUpdate) SetOwner(u *User) *ChatUpdate
SetOwner sets the "owner" edge to the User entity.
func (*ChatUpdate) SetOwnerID ¶
func (cu *ChatUpdate) SetOwnerID(u uuid.UUID) *ChatUpdate
SetOwnerID sets the "owner_id" field.
func (*ChatUpdate) SetUpdatedAt ¶
func (cu *ChatUpdate) SetUpdatedAt(t time.Time) *ChatUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ChatUpdate) Where ¶
func (cu *ChatUpdate) Where(ps ...predicate.Chat) *ChatUpdate
Where appends a list predicates to the ChatUpdate builder.
type ChatUpdateOne ¶
type ChatUpdateOne struct {
// contains filtered or unexported fields
}
ChatUpdateOne is the builder for updating a single Chat entity.
func (*ChatUpdateOne) AddMessageIDs ¶
func (cuo *ChatUpdateOne) AddMessageIDs(ids ...uuid.UUID) *ChatUpdateOne
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*ChatUpdateOne) AddMessages ¶
func (cuo *ChatUpdateOne) AddMessages(m ...*Message) *ChatUpdateOne
AddMessages adds the "messages" edges to the Message entity.
func (*ChatUpdateOne) AddUserIDs ¶
func (cuo *ChatUpdateOne) AddUserIDs(ids ...uuid.UUID) *ChatUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*ChatUpdateOne) AddUsers ¶
func (cuo *ChatUpdateOne) AddUsers(u ...*User) *ChatUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*ChatUpdateOne) ClearDescription ¶
func (cuo *ChatUpdateOne) ClearDescription() *ChatUpdateOne
ClearDescription clears the value of the "description" field.
func (*ChatUpdateOne) ClearImage ¶
func (cuo *ChatUpdateOne) ClearImage() *ChatUpdateOne
ClearImage clears the "image" edge to the File entity.
func (*ChatUpdateOne) ClearImageID ¶
func (cuo *ChatUpdateOne) ClearImageID() *ChatUpdateOne
ClearImageID clears the value of the "image_id" field.
func (*ChatUpdateOne) ClearMessages ¶
func (cuo *ChatUpdateOne) ClearMessages() *ChatUpdateOne
ClearMessages clears all "messages" edges to the Message entity.
func (*ChatUpdateOne) ClearName ¶
func (cuo *ChatUpdateOne) ClearName() *ChatUpdateOne
ClearName clears the value of the "name" field.
func (*ChatUpdateOne) ClearOwner ¶
func (cuo *ChatUpdateOne) ClearOwner() *ChatUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*ChatUpdateOne) ClearUsers ¶
func (cuo *ChatUpdateOne) ClearUsers() *ChatUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*ChatUpdateOne) Exec ¶
func (cuo *ChatUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ChatUpdateOne) ExecX ¶
func (cuo *ChatUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatUpdateOne) Mutation ¶
func (cuo *ChatUpdateOne) Mutation() *ChatMutation
Mutation returns the ChatMutation object of the builder.
func (*ChatUpdateOne) RemoveMessageIDs ¶
func (cuo *ChatUpdateOne) RemoveMessageIDs(ids ...uuid.UUID) *ChatUpdateOne
RemoveMessageIDs removes the "messages" edge to Message entities by IDs.
func (*ChatUpdateOne) RemoveMessages ¶
func (cuo *ChatUpdateOne) RemoveMessages(m ...*Message) *ChatUpdateOne
RemoveMessages removes "messages" edges to Message entities.
func (*ChatUpdateOne) RemoveUserIDs ¶
func (cuo *ChatUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *ChatUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*ChatUpdateOne) RemoveUsers ¶
func (cuo *ChatUpdateOne) RemoveUsers(u ...*User) *ChatUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*ChatUpdateOne) Save ¶
func (cuo *ChatUpdateOne) Save(ctx context.Context) (*Chat, error)
Save executes the query and returns the updated Chat entity.
func (*ChatUpdateOne) SaveX ¶
func (cuo *ChatUpdateOne) SaveX(ctx context.Context) *Chat
SaveX is like Save, but panics if an error occurs.
func (*ChatUpdateOne) Select ¶
func (cuo *ChatUpdateOne) Select(field string, fields ...string) *ChatUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ChatUpdateOne) SetCreatedAt ¶
func (cuo *ChatUpdateOne) SetCreatedAt(t time.Time) *ChatUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ChatUpdateOne) SetCtype ¶
func (cuo *ChatUpdateOne) SetCtype(c chat.Ctype) *ChatUpdateOne
SetCtype sets the "ctype" field.
func (*ChatUpdateOne) SetDescription ¶
func (cuo *ChatUpdateOne) SetDescription(s string) *ChatUpdateOne
SetDescription sets the "description" field.
func (*ChatUpdateOne) SetImage ¶
func (cuo *ChatUpdateOne) SetImage(f *File) *ChatUpdateOne
SetImage sets the "image" edge to the File entity.
func (*ChatUpdateOne) SetImageID ¶
func (cuo *ChatUpdateOne) SetImageID(u uuid.UUID) *ChatUpdateOne
SetImageID sets the "image_id" field.
func (*ChatUpdateOne) SetName ¶
func (cuo *ChatUpdateOne) SetName(s string) *ChatUpdateOne
SetName sets the "name" field.
func (*ChatUpdateOne) SetNillableCreatedAt ¶
func (cuo *ChatUpdateOne) SetNillableCreatedAt(t *time.Time) *ChatUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ChatUpdateOne) SetNillableCtype ¶
func (cuo *ChatUpdateOne) SetNillableCtype(c *chat.Ctype) *ChatUpdateOne
SetNillableCtype sets the "ctype" field if the given value is not nil.
func (*ChatUpdateOne) SetNillableDescription ¶
func (cuo *ChatUpdateOne) SetNillableDescription(s *string) *ChatUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ChatUpdateOne) SetNillableImageID ¶
func (cuo *ChatUpdateOne) SetNillableImageID(u *uuid.UUID) *ChatUpdateOne
SetNillableImageID sets the "image_id" field if the given value is not nil.
func (*ChatUpdateOne) SetNillableName ¶
func (cuo *ChatUpdateOne) SetNillableName(s *string) *ChatUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ChatUpdateOne) SetNillableOwnerID ¶
func (cuo *ChatUpdateOne) SetNillableOwnerID(u *uuid.UUID) *ChatUpdateOne
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*ChatUpdateOne) SetOwner ¶
func (cuo *ChatUpdateOne) SetOwner(u *User) *ChatUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*ChatUpdateOne) SetOwnerID ¶
func (cuo *ChatUpdateOne) SetOwnerID(u uuid.UUID) *ChatUpdateOne
SetOwnerID sets the "owner_id" field.
func (*ChatUpdateOne) SetUpdatedAt ¶
func (cuo *ChatUpdateOne) SetUpdatedAt(t time.Time) *ChatUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ChatUpdateOne) Where ¶
func (cuo *ChatUpdateOne) Where(ps ...predicate.Chat) *ChatUpdateOne
Where appends a list predicates to the ChatUpdate builder.
type City ¶
type City struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // RegionID holds the value of the "region_id" field. RegionID *uuid.UUID `json:"region_id,omitempty"` // CountryID holds the value of the "country_id" field. CountryID uuid.UUID `json:"country_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CityQuery when eager-loading is set. Edges CityEdges `json:"edges"` // contains filtered or unexported fields }
City is the model entity for the City schema.
func (*City) QueryCountry ¶
func (c *City) QueryCountry() *CountryQuery
QueryCountry queries the "country" edge of the City entity.
func (*City) QueryRegion ¶
func (c *City) QueryRegion() *RegionQuery
QueryRegion queries the "region" edge of the City entity.
func (*City) QueryUsers ¶
QueryUsers queries the "users" edge of the City entity.
func (*City) Unwrap ¶
Unwrap unwraps the City 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 (*City) Update ¶
func (c *City) Update() *CityUpdateOne
Update returns a builder for updating this City. Note that you need to call City.Unwrap() before calling this method if this City was returned from a transaction, and the transaction was committed or rolled back.
type CityClient ¶
type CityClient struct {
// contains filtered or unexported fields
}
CityClient is a client for the City schema.
func NewCityClient ¶
func NewCityClient(c config) *CityClient
NewCityClient returns a client for the City from the given config.
func (*CityClient) Create ¶
func (c *CityClient) Create() *CityCreate
Create returns a builder for creating a City entity.
func (*CityClient) CreateBulk ¶
func (c *CityClient) CreateBulk(builders ...*CityCreate) *CityCreateBulk
CreateBulk returns a builder for creating a bulk of City entities.
func (*CityClient) Delete ¶
func (c *CityClient) Delete() *CityDelete
Delete returns a delete builder for City.
func (*CityClient) DeleteOne ¶
func (c *CityClient) DeleteOne(ci *City) *CityDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CityClient) DeleteOneID ¶
func (c *CityClient) DeleteOneID(id uuid.UUID) *CityDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CityClient) Intercept ¶
func (c *CityClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `city.Intercept(f(g(h())))`.
func (*CityClient) Interceptors ¶
func (c *CityClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CityClient) MapCreateBulk ¶
func (c *CityClient) MapCreateBulk(slice any, setFunc func(*CityCreate, int)) *CityCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CityClient) Query ¶
func (c *CityClient) Query() *CityQuery
Query returns a query builder for City.
func (*CityClient) QueryCountry ¶
func (c *CityClient) QueryCountry(ci *City) *CountryQuery
QueryCountry queries the country edge of a City.
func (*CityClient) QueryRegion ¶
func (c *CityClient) QueryRegion(ci *City) *RegionQuery
QueryRegion queries the region edge of a City.
func (*CityClient) QueryUsers ¶
func (c *CityClient) QueryUsers(ci *City) *UserQuery
QueryUsers queries the users edge of a City.
func (*CityClient) Update ¶
func (c *CityClient) Update() *CityUpdate
Update returns an update builder for City.
func (*CityClient) UpdateOne ¶
func (c *CityClient) UpdateOne(ci *City) *CityUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CityClient) UpdateOneID ¶
func (c *CityClient) UpdateOneID(id uuid.UUID) *CityUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CityClient) Use ¶
func (c *CityClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `city.Hooks(f(g(h())))`.
type CityCreate ¶
type CityCreate struct {
// contains filtered or unexported fields
}
CityCreate is the builder for creating a City entity.
func (*CityCreate) AddUserIDs ¶
func (cc *CityCreate) AddUserIDs(ids ...uuid.UUID) *CityCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*CityCreate) AddUsers ¶
func (cc *CityCreate) AddUsers(u ...*User) *CityCreate
AddUsers adds the "users" edges to the User entity.
func (*CityCreate) Exec ¶
func (cc *CityCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CityCreate) ExecX ¶
func (cc *CityCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CityCreate) Mutation ¶
func (cc *CityCreate) Mutation() *CityMutation
Mutation returns the CityMutation object of the builder.
func (*CityCreate) Save ¶
func (cc *CityCreate) Save(ctx context.Context) (*City, error)
Save creates the City in the database.
func (*CityCreate) SaveX ¶
func (cc *CityCreate) SaveX(ctx context.Context) *City
SaveX calls Save and panics if Save returns an error.
func (*CityCreate) SetCountry ¶
func (cc *CityCreate) SetCountry(c *Country) *CityCreate
SetCountry sets the "country" edge to the Country entity.
func (*CityCreate) SetCountryID ¶
func (cc *CityCreate) SetCountryID(u uuid.UUID) *CityCreate
SetCountryID sets the "country_id" field.
func (*CityCreate) SetCreatedAt ¶
func (cc *CityCreate) SetCreatedAt(t time.Time) *CityCreate
SetCreatedAt sets the "created_at" field.
func (*CityCreate) SetID ¶
func (cc *CityCreate) SetID(u uuid.UUID) *CityCreate
SetID sets the "id" field.
func (*CityCreate) SetName ¶
func (cc *CityCreate) SetName(s string) *CityCreate
SetName sets the "name" field.
func (*CityCreate) SetNillableCreatedAt ¶
func (cc *CityCreate) SetNillableCreatedAt(t *time.Time) *CityCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CityCreate) SetNillableID ¶
func (cc *CityCreate) SetNillableID(u *uuid.UUID) *CityCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CityCreate) SetNillableRegionID ¶
func (cc *CityCreate) SetNillableRegionID(u *uuid.UUID) *CityCreate
SetNillableRegionID sets the "region_id" field if the given value is not nil.
func (*CityCreate) SetNillableUpdatedAt ¶
func (cc *CityCreate) SetNillableUpdatedAt(t *time.Time) *CityCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CityCreate) SetRegion ¶
func (cc *CityCreate) SetRegion(r *Region) *CityCreate
SetRegion sets the "region" edge to the Region entity.
func (*CityCreate) SetRegionID ¶
func (cc *CityCreate) SetRegionID(u uuid.UUID) *CityCreate
SetRegionID sets the "region_id" field.
func (*CityCreate) SetUpdatedAt ¶
func (cc *CityCreate) SetUpdatedAt(t time.Time) *CityCreate
SetUpdatedAt sets the "updated_at" field.
type CityCreateBulk ¶
type CityCreateBulk struct {
// contains filtered or unexported fields
}
CityCreateBulk is the builder for creating many City entities in bulk.
func (*CityCreateBulk) Exec ¶
func (ccb *CityCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CityCreateBulk) ExecX ¶
func (ccb *CityCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CityDelete ¶
type CityDelete struct {
// contains filtered or unexported fields
}
CityDelete is the builder for deleting a City entity.
func (*CityDelete) Exec ¶
func (cd *CityDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CityDelete) ExecX ¶
func (cd *CityDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CityDelete) Where ¶
func (cd *CityDelete) Where(ps ...predicate.City) *CityDelete
Where appends a list predicates to the CityDelete builder.
type CityDeleteOne ¶
type CityDeleteOne struct {
// contains filtered or unexported fields
}
CityDeleteOne is the builder for deleting a single City entity.
func (*CityDeleteOne) Exec ¶
func (cdo *CityDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CityDeleteOne) ExecX ¶
func (cdo *CityDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CityDeleteOne) Where ¶
func (cdo *CityDeleteOne) Where(ps ...predicate.City) *CityDeleteOne
Where appends a list predicates to the CityDelete builder.
type CityEdges ¶
type CityEdges struct { // Region holds the value of the region edge. Region *Region `json:"region,omitempty"` // Country holds the value of the country edge. Country *Country `json:"country,omitempty"` // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // contains filtered or unexported fields }
CityEdges holds the relations/edges for other nodes in the graph.
func (CityEdges) CountryOrErr ¶
CountryOrErr returns the Country value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CityEdges) RegionOrErr ¶
RegionOrErr returns the Region value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CityEdges) UsersOrErr ¶
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type CityGroupBy ¶
type CityGroupBy struct {
// contains filtered or unexported fields
}
CityGroupBy is the group-by builder for City entities.
func (*CityGroupBy) Aggregate ¶
func (cgb *CityGroupBy) Aggregate(fns ...AggregateFunc) *CityGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CityGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CityGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CityGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CityGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CityGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CityGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CityGroupBy) Scan ¶
func (cgb *CityGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CityGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CityMutation ¶
type CityMutation struct {
// contains filtered or unexported fields
}
CityMutation represents an operation that mutates the City nodes in the graph.
func (*CityMutation) AddField ¶
func (m *CityMutation) 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 (*CityMutation) AddUserIDs ¶
func (m *CityMutation) AddUserIDs(ids ...uuid.UUID)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*CityMutation) AddedEdges ¶
func (m *CityMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CityMutation) AddedField ¶
func (m *CityMutation) 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 (*CityMutation) AddedFields ¶
func (m *CityMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CityMutation) AddedIDs ¶
func (m *CityMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CityMutation) ClearCountry ¶
func (m *CityMutation) ClearCountry()
ClearCountry clears the "country" edge to the Country entity.
func (*CityMutation) ClearEdge ¶
func (m *CityMutation) 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 (*CityMutation) ClearField ¶
func (m *CityMutation) 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 (*CityMutation) ClearRegion ¶
func (m *CityMutation) ClearRegion()
ClearRegion clears the "region" edge to the Region entity.
func (*CityMutation) ClearRegionID ¶
func (m *CityMutation) ClearRegionID()
ClearRegionID clears the value of the "region_id" field.
func (*CityMutation) ClearUsers ¶
func (m *CityMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*CityMutation) ClearedEdges ¶
func (m *CityMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CityMutation) ClearedFields ¶
func (m *CityMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CityMutation) Client ¶
func (m CityMutation) 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 (*CityMutation) CountryCleared ¶
func (m *CityMutation) CountryCleared() bool
CountryCleared reports if the "country" edge to the Country entity was cleared.
func (*CityMutation) CountryID ¶
func (m *CityMutation) CountryID() (r uuid.UUID, exists bool)
CountryID returns the value of the "country_id" field in the mutation.
func (*CityMutation) CountryIDs ¶
func (m *CityMutation) CountryIDs() (ids []uuid.UUID)
CountryIDs returns the "country" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CountryID instead. It exists only for internal usage by the builders.
func (*CityMutation) CreatedAt ¶
func (m *CityMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CityMutation) EdgeCleared ¶
func (m *CityMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CityMutation) Field ¶
func (m *CityMutation) 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 (*CityMutation) FieldCleared ¶
func (m *CityMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CityMutation) Fields ¶
func (m *CityMutation) 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 (*CityMutation) ID ¶
func (m *CityMutation) 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 (*CityMutation) 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 (*CityMutation) Name ¶
func (m *CityMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CityMutation) OldCountryID ¶
OldCountryID returns the old "country_id" field's value of the City entity. If the City 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 (*CityMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the City entity. If the City 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 (*CityMutation) 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 (*CityMutation) OldName ¶
func (m *CityMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the City entity. If the City 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 (*CityMutation) OldRegionID ¶
OldRegionID returns the old "region_id" field's value of the City entity. If the City 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 (*CityMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the City entity. If the City 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 (*CityMutation) RegionCleared ¶
func (m *CityMutation) RegionCleared() bool
RegionCleared reports if the "region" edge to the Region entity was cleared.
func (*CityMutation) RegionID ¶
func (m *CityMutation) RegionID() (r uuid.UUID, exists bool)
RegionID returns the value of the "region_id" field in the mutation.
func (*CityMutation) RegionIDCleared ¶
func (m *CityMutation) RegionIDCleared() bool
RegionIDCleared returns if the "region_id" field was cleared in this mutation.
func (*CityMutation) RegionIDs ¶
func (m *CityMutation) RegionIDs() (ids []uuid.UUID)
RegionIDs returns the "region" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RegionID instead. It exists only for internal usage by the builders.
func (*CityMutation) RemoveUserIDs ¶
func (m *CityMutation) RemoveUserIDs(ids ...uuid.UUID)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*CityMutation) RemovedEdges ¶
func (m *CityMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CityMutation) RemovedIDs ¶
func (m *CityMutation) 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 (*CityMutation) RemovedUsersIDs ¶
func (m *CityMutation) RemovedUsersIDs() (ids []uuid.UUID)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*CityMutation) ResetCountry ¶
func (m *CityMutation) ResetCountry()
ResetCountry resets all changes to the "country" edge.
func (*CityMutation) ResetCountryID ¶
func (m *CityMutation) ResetCountryID()
ResetCountryID resets all changes to the "country_id" field.
func (*CityMutation) ResetCreatedAt ¶
func (m *CityMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CityMutation) ResetEdge ¶
func (m *CityMutation) 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 (*CityMutation) ResetField ¶
func (m *CityMutation) 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 (*CityMutation) ResetName ¶
func (m *CityMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CityMutation) ResetRegion ¶
func (m *CityMutation) ResetRegion()
ResetRegion resets all changes to the "region" edge.
func (*CityMutation) ResetRegionID ¶
func (m *CityMutation) ResetRegionID()
ResetRegionID resets all changes to the "region_id" field.
func (*CityMutation) ResetUpdatedAt ¶
func (m *CityMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CityMutation) ResetUsers ¶
func (m *CityMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*CityMutation) SetCountryID ¶
func (m *CityMutation) SetCountryID(u uuid.UUID)
SetCountryID sets the "country_id" field.
func (*CityMutation) SetCreatedAt ¶
func (m *CityMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CityMutation) SetField ¶
func (m *CityMutation) 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 (*CityMutation) SetID ¶
func (m *CityMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of City entities.
func (*CityMutation) SetName ¶
func (m *CityMutation) SetName(s string)
SetName sets the "name" field.
func (*CityMutation) SetOp ¶
func (m *CityMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CityMutation) SetRegionID ¶
func (m *CityMutation) SetRegionID(u uuid.UUID)
SetRegionID sets the "region_id" field.
func (*CityMutation) SetUpdatedAt ¶
func (m *CityMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (CityMutation) Tx ¶
func (m CityMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CityMutation) Type ¶
func (m *CityMutation) Type() string
Type returns the node type of this mutation (City).
func (*CityMutation) UpdatedAt ¶
func (m *CityMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CityMutation) UsersCleared ¶
func (m *CityMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*CityMutation) UsersIDs ¶
func (m *CityMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the "users" edge IDs in the mutation.
func (*CityMutation) Where ¶
func (m *CityMutation) Where(ps ...predicate.City)
Where appends a list predicates to the CityMutation builder.
func (*CityMutation) WhereP ¶
func (m *CityMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CityMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CityQuery ¶
type CityQuery struct {
// contains filtered or unexported fields
}
CityQuery is the builder for querying City entities.
func (*CityQuery) Aggregate ¶
func (cq *CityQuery) Aggregate(fns ...AggregateFunc) *CitySelect
Aggregate returns a CitySelect configured with the given aggregations.
func (*CityQuery) Clone ¶
Clone returns a duplicate of the CityQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CityQuery) First ¶
First returns the first City entity from the query. Returns a *NotFoundError when no City was found.
func (*CityQuery) FirstID ¶
FirstID returns the first City ID from the query. Returns a *NotFoundError when no City ID was found.
func (*CityQuery) GroupBy ¶
func (cq *CityQuery) GroupBy(field string, fields ...string) *CityGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.City.Query(). GroupBy(city.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CityQuery) Only ¶
Only returns a single City entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one City entity is found. Returns a *NotFoundError when no City entities are found.
func (*CityQuery) OnlyID ¶
OnlyID is like Only, but returns the only City ID in the query. Returns a *NotSingularError when more than one City ID is found. Returns a *NotFoundError when no entities are found.
func (*CityQuery) Order ¶
func (cq *CityQuery) Order(o ...city.OrderOption) *CityQuery
Order specifies how the records should be ordered.
func (*CityQuery) QueryCountry ¶
func (cq *CityQuery) QueryCountry() *CountryQuery
QueryCountry chains the current query on the "country" edge.
func (*CityQuery) QueryRegion ¶
func (cq *CityQuery) QueryRegion() *RegionQuery
QueryRegion chains the current query on the "region" edge.
func (*CityQuery) QueryUsers ¶
QueryUsers chains the current query on the "users" edge.
func (*CityQuery) Select ¶
func (cq *CityQuery) Select(fields ...string) *CitySelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.City.Query(). Select(city.FieldCreatedAt). Scan(ctx, &v)
func (*CityQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*CityQuery) WithCountry ¶
func (cq *CityQuery) WithCountry(opts ...func(*CountryQuery)) *CityQuery
WithCountry tells the query-builder to eager-load the nodes that are connected to the "country" edge. The optional arguments are used to configure the query builder of the edge.
func (*CityQuery) WithRegion ¶
func (cq *CityQuery) WithRegion(opts ...func(*RegionQuery)) *CityQuery
WithRegion tells the query-builder to eager-load the nodes that are connected to the "region" edge. The optional arguments are used to configure the query builder of the edge.
type CitySelect ¶
type CitySelect struct { *CityQuery // contains filtered or unexported fields }
CitySelect is the builder for selecting fields of City entities.
func (*CitySelect) Aggregate ¶
func (cs *CitySelect) Aggregate(fns ...AggregateFunc) *CitySelect
Aggregate adds the given aggregation functions to the selector query.
func (*CitySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CitySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CitySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CitySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CitySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CitySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CitySelect) Scan ¶
func (cs *CitySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CitySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CityUpdate ¶
type CityUpdate struct {
// contains filtered or unexported fields
}
CityUpdate is the builder for updating City entities.
func (*CityUpdate) AddUserIDs ¶
func (cu *CityUpdate) AddUserIDs(ids ...uuid.UUID) *CityUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*CityUpdate) AddUsers ¶
func (cu *CityUpdate) AddUsers(u ...*User) *CityUpdate
AddUsers adds the "users" edges to the User entity.
func (*CityUpdate) ClearCountry ¶
func (cu *CityUpdate) ClearCountry() *CityUpdate
ClearCountry clears the "country" edge to the Country entity.
func (*CityUpdate) ClearRegion ¶
func (cu *CityUpdate) ClearRegion() *CityUpdate
ClearRegion clears the "region" edge to the Region entity.
func (*CityUpdate) ClearRegionID ¶
func (cu *CityUpdate) ClearRegionID() *CityUpdate
ClearRegionID clears the value of the "region_id" field.
func (*CityUpdate) ClearUsers ¶
func (cu *CityUpdate) ClearUsers() *CityUpdate
ClearUsers clears all "users" edges to the User entity.
func (*CityUpdate) Exec ¶
func (cu *CityUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CityUpdate) ExecX ¶
func (cu *CityUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CityUpdate) Mutation ¶
func (cu *CityUpdate) Mutation() *CityMutation
Mutation returns the CityMutation object of the builder.
func (*CityUpdate) RemoveUserIDs ¶
func (cu *CityUpdate) RemoveUserIDs(ids ...uuid.UUID) *CityUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*CityUpdate) RemoveUsers ¶
func (cu *CityUpdate) RemoveUsers(u ...*User) *CityUpdate
RemoveUsers removes "users" edges to User entities.
func (*CityUpdate) Save ¶
func (cu *CityUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CityUpdate) SaveX ¶
func (cu *CityUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CityUpdate) SetCountry ¶
func (cu *CityUpdate) SetCountry(c *Country) *CityUpdate
SetCountry sets the "country" edge to the Country entity.
func (*CityUpdate) SetCountryID ¶
func (cu *CityUpdate) SetCountryID(u uuid.UUID) *CityUpdate
SetCountryID sets the "country_id" field.
func (*CityUpdate) SetCreatedAt ¶
func (cu *CityUpdate) SetCreatedAt(t time.Time) *CityUpdate
SetCreatedAt sets the "created_at" field.
func (*CityUpdate) SetName ¶
func (cu *CityUpdate) SetName(s string) *CityUpdate
SetName sets the "name" field.
func (*CityUpdate) SetNillableCountryID ¶
func (cu *CityUpdate) SetNillableCountryID(u *uuid.UUID) *CityUpdate
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*CityUpdate) SetNillableCreatedAt ¶
func (cu *CityUpdate) SetNillableCreatedAt(t *time.Time) *CityUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CityUpdate) SetNillableName ¶
func (cu *CityUpdate) SetNillableName(s *string) *CityUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*CityUpdate) SetNillableRegionID ¶
func (cu *CityUpdate) SetNillableRegionID(u *uuid.UUID) *CityUpdate
SetNillableRegionID sets the "region_id" field if the given value is not nil.
func (*CityUpdate) SetRegion ¶
func (cu *CityUpdate) SetRegion(r *Region) *CityUpdate
SetRegion sets the "region" edge to the Region entity.
func (*CityUpdate) SetRegionID ¶
func (cu *CityUpdate) SetRegionID(u uuid.UUID) *CityUpdate
SetRegionID sets the "region_id" field.
func (*CityUpdate) SetUpdatedAt ¶
func (cu *CityUpdate) SetUpdatedAt(t time.Time) *CityUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CityUpdate) Where ¶
func (cu *CityUpdate) Where(ps ...predicate.City) *CityUpdate
Where appends a list predicates to the CityUpdate builder.
type CityUpdateOne ¶
type CityUpdateOne struct {
// contains filtered or unexported fields
}
CityUpdateOne is the builder for updating a single City entity.
func (*CityUpdateOne) AddUserIDs ¶
func (cuo *CityUpdateOne) AddUserIDs(ids ...uuid.UUID) *CityUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*CityUpdateOne) AddUsers ¶
func (cuo *CityUpdateOne) AddUsers(u ...*User) *CityUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*CityUpdateOne) ClearCountry ¶
func (cuo *CityUpdateOne) ClearCountry() *CityUpdateOne
ClearCountry clears the "country" edge to the Country entity.
func (*CityUpdateOne) ClearRegion ¶
func (cuo *CityUpdateOne) ClearRegion() *CityUpdateOne
ClearRegion clears the "region" edge to the Region entity.
func (*CityUpdateOne) ClearRegionID ¶
func (cuo *CityUpdateOne) ClearRegionID() *CityUpdateOne
ClearRegionID clears the value of the "region_id" field.
func (*CityUpdateOne) ClearUsers ¶
func (cuo *CityUpdateOne) ClearUsers() *CityUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*CityUpdateOne) Exec ¶
func (cuo *CityUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CityUpdateOne) ExecX ¶
func (cuo *CityUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CityUpdateOne) Mutation ¶
func (cuo *CityUpdateOne) Mutation() *CityMutation
Mutation returns the CityMutation object of the builder.
func (*CityUpdateOne) RemoveUserIDs ¶
func (cuo *CityUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *CityUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*CityUpdateOne) RemoveUsers ¶
func (cuo *CityUpdateOne) RemoveUsers(u ...*User) *CityUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*CityUpdateOne) Save ¶
func (cuo *CityUpdateOne) Save(ctx context.Context) (*City, error)
Save executes the query and returns the updated City entity.
func (*CityUpdateOne) SaveX ¶
func (cuo *CityUpdateOne) SaveX(ctx context.Context) *City
SaveX is like Save, but panics if an error occurs.
func (*CityUpdateOne) Select ¶
func (cuo *CityUpdateOne) Select(field string, fields ...string) *CityUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CityUpdateOne) SetCountry ¶
func (cuo *CityUpdateOne) SetCountry(c *Country) *CityUpdateOne
SetCountry sets the "country" edge to the Country entity.
func (*CityUpdateOne) SetCountryID ¶
func (cuo *CityUpdateOne) SetCountryID(u uuid.UUID) *CityUpdateOne
SetCountryID sets the "country_id" field.
func (*CityUpdateOne) SetCreatedAt ¶
func (cuo *CityUpdateOne) SetCreatedAt(t time.Time) *CityUpdateOne
SetCreatedAt sets the "created_at" field.
func (*CityUpdateOne) SetName ¶
func (cuo *CityUpdateOne) SetName(s string) *CityUpdateOne
SetName sets the "name" field.
func (*CityUpdateOne) SetNillableCountryID ¶
func (cuo *CityUpdateOne) SetNillableCountryID(u *uuid.UUID) *CityUpdateOne
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*CityUpdateOne) SetNillableCreatedAt ¶
func (cuo *CityUpdateOne) SetNillableCreatedAt(t *time.Time) *CityUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CityUpdateOne) SetNillableName ¶
func (cuo *CityUpdateOne) SetNillableName(s *string) *CityUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*CityUpdateOne) SetNillableRegionID ¶
func (cuo *CityUpdateOne) SetNillableRegionID(u *uuid.UUID) *CityUpdateOne
SetNillableRegionID sets the "region_id" field if the given value is not nil.
func (*CityUpdateOne) SetRegion ¶
func (cuo *CityUpdateOne) SetRegion(r *Region) *CityUpdateOne
SetRegion sets the "region" edge to the Region entity.
func (*CityUpdateOne) SetRegionID ¶
func (cuo *CityUpdateOne) SetRegionID(u uuid.UUID) *CityUpdateOne
SetRegionID sets the "region_id" field.
func (*CityUpdateOne) SetUpdatedAt ¶
func (cuo *CityUpdateOne) SetUpdatedAt(t time.Time) *CityUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CityUpdateOne) Where ¶
func (cuo *CityUpdateOne) Where(ps ...predicate.City) *CityUpdateOne
Where appends a list predicates to the CityUpdate builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Chat is the client for interacting with the Chat builders. Chat *ChatClient // City is the client for interacting with the City builders. City *CityClient // Comment is the client for interacting with the Comment builders. Comment *CommentClient // Country is the client for interacting with the Country builders. Country *CountryClient // File is the client for interacting with the File builders. File *FileClient // Friend is the client for interacting with the Friend builders. Friend *FriendClient // Message is the client for interacting with the Message builders. Message *MessageClient // Notification is the client for interacting with the Notification builders. Notification *NotificationClient // Otp is the client for interacting with the Otp builders. Otp *OtpClient // Post is the client for interacting with the Post builders. Post *PostClient // Reaction is the client for interacting with the Reaction builders. Reaction *ReactionClient // Region is the client for interacting with the Region builders. Region *RegionClient // Reply is the client for interacting with the Reply builders. Reply *ReplyClient // SiteDetail is the client for interacting with the SiteDetail builders. SiteDetail *SiteDetailClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Chat. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type Comment ¶
type Comment struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // Slug holds the value of the "slug" field. Slug string `json:"slug,omitempty"` // AuthorID holds the value of the "author_id" field. AuthorID uuid.UUID `json:"author_id,omitempty"` // PostID holds the value of the "post_id" field. PostID uuid.UUID `json:"post_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CommentQuery when eager-loading is set. Edges CommentEdges `json:"edges"` // contains filtered or unexported fields }
Comment is the model entity for the Comment schema.
func (*Comment) QueryAuthor ¶
QueryAuthor queries the "author" edge of the Comment entity.
func (*Comment) QueryNotifications ¶
func (c *Comment) QueryNotifications() *NotificationQuery
QueryNotifications queries the "notifications" edge of the Comment entity.
func (*Comment) QueryReactions ¶
func (c *Comment) QueryReactions() *ReactionQuery
QueryReactions queries the "reactions" edge of the Comment entity.
func (*Comment) QueryReplies ¶
func (c *Comment) QueryReplies() *ReplyQuery
QueryReplies queries the "replies" edge of the Comment entity.
func (*Comment) Unwrap ¶
Unwrap unwraps the Comment 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 (*Comment) Update ¶
func (c *Comment) Update() *CommentUpdateOne
Update returns a builder for updating this Comment. Note that you need to call Comment.Unwrap() before calling this method if this Comment was returned from a transaction, and the transaction was committed or rolled back.
type CommentClient ¶
type CommentClient struct {
// contains filtered or unexported fields
}
CommentClient is a client for the Comment schema.
func NewCommentClient ¶
func NewCommentClient(c config) *CommentClient
NewCommentClient returns a client for the Comment from the given config.
func (*CommentClient) Create ¶
func (c *CommentClient) Create() *CommentCreate
Create returns a builder for creating a Comment entity.
func (*CommentClient) CreateBulk ¶
func (c *CommentClient) CreateBulk(builders ...*CommentCreate) *CommentCreateBulk
CreateBulk returns a builder for creating a bulk of Comment entities.
func (*CommentClient) Delete ¶
func (c *CommentClient) Delete() *CommentDelete
Delete returns a delete builder for Comment.
func (*CommentClient) DeleteOne ¶
func (c *CommentClient) DeleteOne(co *Comment) *CommentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CommentClient) DeleteOneID ¶
func (c *CommentClient) DeleteOneID(id uuid.UUID) *CommentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CommentClient) Hooks ¶
func (c *CommentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CommentClient) Intercept ¶
func (c *CommentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `comment.Intercept(f(g(h())))`.
func (*CommentClient) Interceptors ¶
func (c *CommentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CommentClient) MapCreateBulk ¶
func (c *CommentClient) MapCreateBulk(slice any, setFunc func(*CommentCreate, int)) *CommentCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CommentClient) Query ¶
func (c *CommentClient) Query() *CommentQuery
Query returns a query builder for Comment.
func (*CommentClient) QueryAuthor ¶
func (c *CommentClient) QueryAuthor(co *Comment) *UserQuery
QueryAuthor queries the author edge of a Comment.
func (*CommentClient) QueryNotifications ¶
func (c *CommentClient) QueryNotifications(co *Comment) *NotificationQuery
QueryNotifications queries the notifications edge of a Comment.
func (*CommentClient) QueryPost ¶
func (c *CommentClient) QueryPost(co *Comment) *PostQuery
QueryPost queries the post edge of a Comment.
func (*CommentClient) QueryReactions ¶
func (c *CommentClient) QueryReactions(co *Comment) *ReactionQuery
QueryReactions queries the reactions edge of a Comment.
func (*CommentClient) QueryReplies ¶
func (c *CommentClient) QueryReplies(co *Comment) *ReplyQuery
QueryReplies queries the replies edge of a Comment.
func (*CommentClient) Update ¶
func (c *CommentClient) Update() *CommentUpdate
Update returns an update builder for Comment.
func (*CommentClient) UpdateOne ¶
func (c *CommentClient) UpdateOne(co *Comment) *CommentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CommentClient) UpdateOneID ¶
func (c *CommentClient) UpdateOneID(id uuid.UUID) *CommentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CommentClient) Use ¶
func (c *CommentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `comment.Hooks(f(g(h())))`.
type CommentCreate ¶
type CommentCreate struct {
// contains filtered or unexported fields
}
CommentCreate is the builder for creating a Comment entity.
func (*CommentCreate) AddNotificationIDs ¶
func (cc *CommentCreate) AddNotificationIDs(ids ...uuid.UUID) *CommentCreate
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*CommentCreate) AddNotifications ¶
func (cc *CommentCreate) AddNotifications(n ...*Notification) *CommentCreate
AddNotifications adds the "notifications" edges to the Notification entity.
func (*CommentCreate) AddReactionIDs ¶
func (cc *CommentCreate) AddReactionIDs(ids ...uuid.UUID) *CommentCreate
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*CommentCreate) AddReactions ¶
func (cc *CommentCreate) AddReactions(r ...*Reaction) *CommentCreate
AddReactions adds the "reactions" edges to the Reaction entity.
func (*CommentCreate) AddReplies ¶
func (cc *CommentCreate) AddReplies(r ...*Reply) *CommentCreate
AddReplies adds the "replies" edges to the Reply entity.
func (*CommentCreate) AddReplyIDs ¶
func (cc *CommentCreate) AddReplyIDs(ids ...uuid.UUID) *CommentCreate
AddReplyIDs adds the "replies" edge to the Reply entity by IDs.
func (*CommentCreate) Exec ¶
func (cc *CommentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CommentCreate) ExecX ¶
func (cc *CommentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentCreate) Mutation ¶
func (cc *CommentCreate) Mutation() *CommentMutation
Mutation returns the CommentMutation object of the builder.
func (*CommentCreate) Save ¶
func (cc *CommentCreate) Save(ctx context.Context) (*Comment, error)
Save creates the Comment in the database.
func (*CommentCreate) SaveX ¶
func (cc *CommentCreate) SaveX(ctx context.Context) *Comment
SaveX calls Save and panics if Save returns an error.
func (*CommentCreate) SetAuthor ¶
func (cc *CommentCreate) SetAuthor(u *User) *CommentCreate
SetAuthor sets the "author" edge to the User entity.
func (*CommentCreate) SetAuthorID ¶
func (cc *CommentCreate) SetAuthorID(u uuid.UUID) *CommentCreate
SetAuthorID sets the "author_id" field.
func (*CommentCreate) SetCreatedAt ¶
func (cc *CommentCreate) SetCreatedAt(t time.Time) *CommentCreate
SetCreatedAt sets the "created_at" field.
func (*CommentCreate) SetID ¶
func (cc *CommentCreate) SetID(u uuid.UUID) *CommentCreate
SetID sets the "id" field.
func (*CommentCreate) SetNillableCreatedAt ¶
func (cc *CommentCreate) SetNillableCreatedAt(t *time.Time) *CommentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CommentCreate) SetNillableID ¶
func (cc *CommentCreate) SetNillableID(u *uuid.UUID) *CommentCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CommentCreate) SetNillableUpdatedAt ¶
func (cc *CommentCreate) SetNillableUpdatedAt(t *time.Time) *CommentCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CommentCreate) SetPost ¶
func (cc *CommentCreate) SetPost(p *Post) *CommentCreate
SetPost sets the "post" edge to the Post entity.
func (*CommentCreate) SetPostID ¶
func (cc *CommentCreate) SetPostID(u uuid.UUID) *CommentCreate
SetPostID sets the "post_id" field.
func (*CommentCreate) SetSlug ¶
func (cc *CommentCreate) SetSlug(s string) *CommentCreate
SetSlug sets the "slug" field.
func (*CommentCreate) SetText ¶
func (cc *CommentCreate) SetText(s string) *CommentCreate
SetText sets the "text" field.
func (*CommentCreate) SetUpdatedAt ¶
func (cc *CommentCreate) SetUpdatedAt(t time.Time) *CommentCreate
SetUpdatedAt sets the "updated_at" field.
type CommentCreateBulk ¶
type CommentCreateBulk struct {
// contains filtered or unexported fields
}
CommentCreateBulk is the builder for creating many Comment entities in bulk.
func (*CommentCreateBulk) Exec ¶
func (ccb *CommentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CommentCreateBulk) ExecX ¶
func (ccb *CommentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CommentDelete ¶
type CommentDelete struct {
// contains filtered or unexported fields
}
CommentDelete is the builder for deleting a Comment entity.
func (*CommentDelete) Exec ¶
func (cd *CommentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CommentDelete) ExecX ¶
func (cd *CommentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CommentDelete) Where ¶
func (cd *CommentDelete) Where(ps ...predicate.Comment) *CommentDelete
Where appends a list predicates to the CommentDelete builder.
type CommentDeleteOne ¶
type CommentDeleteOne struct {
// contains filtered or unexported fields
}
CommentDeleteOne is the builder for deleting a single Comment entity.
func (*CommentDeleteOne) Exec ¶
func (cdo *CommentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CommentDeleteOne) ExecX ¶
func (cdo *CommentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentDeleteOne) Where ¶
func (cdo *CommentDeleteOne) Where(ps ...predicate.Comment) *CommentDeleteOne
Where appends a list predicates to the CommentDelete builder.
type CommentEdges ¶
type CommentEdges struct { // Reactions holds the value of the reactions edge. Reactions []*Reaction `json:"reactions,omitempty"` // Author holds the value of the author edge. Author *User `json:"author,omitempty"` // Post holds the value of the post edge. Post *Post `json:"post,omitempty"` // Replies holds the value of the replies edge. Replies []*Reply `json:"replies,omitempty"` // Notifications holds the value of the notifications edge. Notifications []*Notification `json:"notifications,omitempty"` // contains filtered or unexported fields }
CommentEdges holds the relations/edges for other nodes in the graph.
func (CommentEdges) AuthorOrErr ¶
func (e CommentEdges) AuthorOrErr() (*User, error)
AuthorOrErr returns the Author value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CommentEdges) NotificationsOrErr ¶
func (e CommentEdges) NotificationsOrErr() ([]*Notification, error)
NotificationsOrErr returns the Notifications value or an error if the edge was not loaded in eager-loading.
func (CommentEdges) PostOrErr ¶
func (e CommentEdges) PostOrErr() (*Post, error)
PostOrErr returns the Post value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CommentEdges) ReactionsOrErr ¶
func (e CommentEdges) ReactionsOrErr() ([]*Reaction, error)
ReactionsOrErr returns the Reactions value or an error if the edge was not loaded in eager-loading.
func (CommentEdges) RepliesOrErr ¶
func (e CommentEdges) RepliesOrErr() ([]*Reply, error)
RepliesOrErr returns the Replies value or an error if the edge was not loaded in eager-loading.
type CommentGroupBy ¶
type CommentGroupBy struct {
// contains filtered or unexported fields
}
CommentGroupBy is the group-by builder for Comment entities.
func (*CommentGroupBy) Aggregate ¶
func (cgb *CommentGroupBy) Aggregate(fns ...AggregateFunc) *CommentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CommentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Scan ¶
func (cgb *CommentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CommentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CommentMutation ¶
type CommentMutation struct {
// contains filtered or unexported fields
}
CommentMutation represents an operation that mutates the Comment nodes in the graph.
func (*CommentMutation) AddField ¶
func (m *CommentMutation) 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 (*CommentMutation) AddNotificationIDs ¶
func (m *CommentMutation) AddNotificationIDs(ids ...uuid.UUID)
AddNotificationIDs adds the "notifications" edge to the Notification entity by ids.
func (*CommentMutation) AddReactionIDs ¶
func (m *CommentMutation) AddReactionIDs(ids ...uuid.UUID)
AddReactionIDs adds the "reactions" edge to the Reaction entity by ids.
func (*CommentMutation) AddReplyIDs ¶
func (m *CommentMutation) AddReplyIDs(ids ...uuid.UUID)
AddReplyIDs adds the "replies" edge to the Reply entity by ids.
func (*CommentMutation) AddedEdges ¶
func (m *CommentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CommentMutation) AddedField ¶
func (m *CommentMutation) 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 (*CommentMutation) AddedFields ¶
func (m *CommentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CommentMutation) AddedIDs ¶
func (m *CommentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CommentMutation) AuthorCleared ¶
func (m *CommentMutation) AuthorCleared() bool
AuthorCleared reports if the "author" edge to the User entity was cleared.
func (*CommentMutation) AuthorID ¶
func (m *CommentMutation) AuthorID() (r uuid.UUID, exists bool)
AuthorID returns the value of the "author_id" field in the mutation.
func (*CommentMutation) AuthorIDs ¶
func (m *CommentMutation) AuthorIDs() (ids []uuid.UUID)
AuthorIDs returns the "author" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AuthorID instead. It exists only for internal usage by the builders.
func (*CommentMutation) ClearAuthor ¶
func (m *CommentMutation) ClearAuthor()
ClearAuthor clears the "author" edge to the User entity.
func (*CommentMutation) ClearEdge ¶
func (m *CommentMutation) 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 (*CommentMutation) ClearField ¶
func (m *CommentMutation) 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 (*CommentMutation) ClearNotifications ¶
func (m *CommentMutation) ClearNotifications()
ClearNotifications clears the "notifications" edge to the Notification entity.
func (*CommentMutation) ClearPost ¶
func (m *CommentMutation) ClearPost()
ClearPost clears the "post" edge to the Post entity.
func (*CommentMutation) ClearReactions ¶
func (m *CommentMutation) ClearReactions()
ClearReactions clears the "reactions" edge to the Reaction entity.
func (*CommentMutation) ClearReplies ¶
func (m *CommentMutation) ClearReplies()
ClearReplies clears the "replies" edge to the Reply entity.
func (*CommentMutation) ClearedEdges ¶
func (m *CommentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CommentMutation) ClearedFields ¶
func (m *CommentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CommentMutation) Client ¶
func (m CommentMutation) 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 (*CommentMutation) CreatedAt ¶
func (m *CommentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CommentMutation) EdgeCleared ¶
func (m *CommentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CommentMutation) Field ¶
func (m *CommentMutation) 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 (*CommentMutation) FieldCleared ¶
func (m *CommentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CommentMutation) Fields ¶
func (m *CommentMutation) 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 (*CommentMutation) ID ¶
func (m *CommentMutation) 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 (*CommentMutation) 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 (*CommentMutation) NotificationsCleared ¶
func (m *CommentMutation) NotificationsCleared() bool
NotificationsCleared reports if the "notifications" edge to the Notification entity was cleared.
func (*CommentMutation) NotificationsIDs ¶
func (m *CommentMutation) NotificationsIDs() (ids []uuid.UUID)
NotificationsIDs returns the "notifications" edge IDs in the mutation.
func (*CommentMutation) OldAuthorID ¶
OldAuthorID returns the old "author_id" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Comment entity. If the Comment 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 (*CommentMutation) 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 (*CommentMutation) OldPostID ¶
OldPostID returns the old "post_id" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldSlug ¶
func (m *CommentMutation) OldSlug(ctx context.Context) (v string, err error)
OldSlug returns the old "slug" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldText ¶
func (m *CommentMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Comment entity. If the Comment 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 (*CommentMutation) PostCleared ¶
func (m *CommentMutation) PostCleared() bool
PostCleared reports if the "post" edge to the Post entity was cleared.
func (*CommentMutation) PostID ¶
func (m *CommentMutation) PostID() (r uuid.UUID, exists bool)
PostID returns the value of the "post_id" field in the mutation.
func (*CommentMutation) PostIDs ¶
func (m *CommentMutation) PostIDs() (ids []uuid.UUID)
PostIDs returns the "post" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PostID instead. It exists only for internal usage by the builders.
func (*CommentMutation) ReactionsCleared ¶
func (m *CommentMutation) ReactionsCleared() bool
ReactionsCleared reports if the "reactions" edge to the Reaction entity was cleared.
func (*CommentMutation) ReactionsIDs ¶
func (m *CommentMutation) ReactionsIDs() (ids []uuid.UUID)
ReactionsIDs returns the "reactions" edge IDs in the mutation.
func (*CommentMutation) RemoveNotificationIDs ¶
func (m *CommentMutation) RemoveNotificationIDs(ids ...uuid.UUID)
RemoveNotificationIDs removes the "notifications" edge to the Notification entity by IDs.
func (*CommentMutation) RemoveReactionIDs ¶
func (m *CommentMutation) RemoveReactionIDs(ids ...uuid.UUID)
RemoveReactionIDs removes the "reactions" edge to the Reaction entity by IDs.
func (*CommentMutation) RemoveReplyIDs ¶
func (m *CommentMutation) RemoveReplyIDs(ids ...uuid.UUID)
RemoveReplyIDs removes the "replies" edge to the Reply entity by IDs.
func (*CommentMutation) RemovedEdges ¶
func (m *CommentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CommentMutation) RemovedIDs ¶
func (m *CommentMutation) 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 (*CommentMutation) RemovedNotificationsIDs ¶
func (m *CommentMutation) RemovedNotificationsIDs() (ids []uuid.UUID)
RemovedNotifications returns the removed IDs of the "notifications" edge to the Notification entity.
func (*CommentMutation) RemovedReactionsIDs ¶
func (m *CommentMutation) RemovedReactionsIDs() (ids []uuid.UUID)
RemovedReactions returns the removed IDs of the "reactions" edge to the Reaction entity.
func (*CommentMutation) RemovedRepliesIDs ¶
func (m *CommentMutation) RemovedRepliesIDs() (ids []uuid.UUID)
RemovedReplies returns the removed IDs of the "replies" edge to the Reply entity.
func (*CommentMutation) RepliesCleared ¶
func (m *CommentMutation) RepliesCleared() bool
RepliesCleared reports if the "replies" edge to the Reply entity was cleared.
func (*CommentMutation) RepliesIDs ¶
func (m *CommentMutation) RepliesIDs() (ids []uuid.UUID)
RepliesIDs returns the "replies" edge IDs in the mutation.
func (*CommentMutation) ResetAuthor ¶
func (m *CommentMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" edge.
func (*CommentMutation) ResetAuthorID ¶
func (m *CommentMutation) ResetAuthorID()
ResetAuthorID resets all changes to the "author_id" field.
func (*CommentMutation) ResetCreatedAt ¶
func (m *CommentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CommentMutation) ResetEdge ¶
func (m *CommentMutation) 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 (*CommentMutation) ResetField ¶
func (m *CommentMutation) 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 (*CommentMutation) ResetNotifications ¶
func (m *CommentMutation) ResetNotifications()
ResetNotifications resets all changes to the "notifications" edge.
func (*CommentMutation) ResetPost ¶
func (m *CommentMutation) ResetPost()
ResetPost resets all changes to the "post" edge.
func (*CommentMutation) ResetPostID ¶
func (m *CommentMutation) ResetPostID()
ResetPostID resets all changes to the "post_id" field.
func (*CommentMutation) ResetReactions ¶
func (m *CommentMutation) ResetReactions()
ResetReactions resets all changes to the "reactions" edge.
func (*CommentMutation) ResetReplies ¶
func (m *CommentMutation) ResetReplies()
ResetReplies resets all changes to the "replies" edge.
func (*CommentMutation) ResetSlug ¶
func (m *CommentMutation) ResetSlug()
ResetSlug resets all changes to the "slug" field.
func (*CommentMutation) ResetText ¶
func (m *CommentMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*CommentMutation) ResetUpdatedAt ¶
func (m *CommentMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CommentMutation) SetAuthorID ¶
func (m *CommentMutation) SetAuthorID(u uuid.UUID)
SetAuthorID sets the "author_id" field.
func (*CommentMutation) SetCreatedAt ¶
func (m *CommentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CommentMutation) SetField ¶
func (m *CommentMutation) 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 (*CommentMutation) SetID ¶
func (m *CommentMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Comment entities.
func (*CommentMutation) SetOp ¶
func (m *CommentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CommentMutation) SetPostID ¶
func (m *CommentMutation) SetPostID(u uuid.UUID)
SetPostID sets the "post_id" field.
func (*CommentMutation) SetSlug ¶
func (m *CommentMutation) SetSlug(s string)
SetSlug sets the "slug" field.
func (*CommentMutation) SetText ¶
func (m *CommentMutation) SetText(s string)
SetText sets the "text" field.
func (*CommentMutation) SetUpdatedAt ¶
func (m *CommentMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CommentMutation) Slug ¶
func (m *CommentMutation) Slug() (r string, exists bool)
Slug returns the value of the "slug" field in the mutation.
func (*CommentMutation) Text ¶
func (m *CommentMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (CommentMutation) Tx ¶
func (m CommentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CommentMutation) Type ¶
func (m *CommentMutation) Type() string
Type returns the node type of this mutation (Comment).
func (*CommentMutation) UpdatedAt ¶
func (m *CommentMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CommentMutation) Where ¶
func (m *CommentMutation) Where(ps ...predicate.Comment)
Where appends a list predicates to the CommentMutation builder.
func (*CommentMutation) WhereP ¶
func (m *CommentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CommentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CommentQuery ¶
type CommentQuery struct {
// contains filtered or unexported fields
}
CommentQuery is the builder for querying Comment entities.
func (*CommentQuery) Aggregate ¶
func (cq *CommentQuery) Aggregate(fns ...AggregateFunc) *CommentSelect
Aggregate returns a CommentSelect configured with the given aggregations.
func (*CommentQuery) All ¶
func (cq *CommentQuery) All(ctx context.Context) ([]*Comment, error)
All executes the query and returns a list of Comments.
func (*CommentQuery) AllX ¶
func (cq *CommentQuery) AllX(ctx context.Context) []*Comment
AllX is like All, but panics if an error occurs.
func (*CommentQuery) Clone ¶
func (cq *CommentQuery) Clone() *CommentQuery
Clone returns a duplicate of the CommentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CommentQuery) Count ¶
func (cq *CommentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CommentQuery) CountX ¶
func (cq *CommentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CommentQuery) Exist ¶
func (cq *CommentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CommentQuery) ExistX ¶
func (cq *CommentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CommentQuery) First ¶
func (cq *CommentQuery) First(ctx context.Context) (*Comment, error)
First returns the first Comment entity from the query. Returns a *NotFoundError when no Comment was found.
func (*CommentQuery) FirstID ¶
FirstID returns the first Comment ID from the query. Returns a *NotFoundError when no Comment ID was found.
func (*CommentQuery) FirstIDX ¶
func (cq *CommentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CommentQuery) FirstX ¶
func (cq *CommentQuery) FirstX(ctx context.Context) *Comment
FirstX is like First, but panics if an error occurs.
func (*CommentQuery) GroupBy ¶
func (cq *CommentQuery) GroupBy(field string, fields ...string) *CommentGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Comment.Query(). GroupBy(comment.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CommentQuery) IDsX ¶
func (cq *CommentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CommentQuery) Limit ¶
func (cq *CommentQuery) Limit(limit int) *CommentQuery
Limit the number of records to be returned by this query.
func (*CommentQuery) Offset ¶
func (cq *CommentQuery) Offset(offset int) *CommentQuery
Offset to start from.
func (*CommentQuery) Only ¶
func (cq *CommentQuery) Only(ctx context.Context) (*Comment, error)
Only returns a single Comment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Comment entity is found. Returns a *NotFoundError when no Comment entities are found.
func (*CommentQuery) OnlyID ¶
OnlyID is like Only, but returns the only Comment ID in the query. Returns a *NotSingularError when more than one Comment ID is found. Returns a *NotFoundError when no entities are found.
func (*CommentQuery) OnlyIDX ¶
func (cq *CommentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CommentQuery) OnlyX ¶
func (cq *CommentQuery) OnlyX(ctx context.Context) *Comment
OnlyX is like Only, but panics if an error occurs.
func (*CommentQuery) Order ¶
func (cq *CommentQuery) Order(o ...comment.OrderOption) *CommentQuery
Order specifies how the records should be ordered.
func (*CommentQuery) QueryAuthor ¶
func (cq *CommentQuery) QueryAuthor() *UserQuery
QueryAuthor chains the current query on the "author" edge.
func (*CommentQuery) QueryNotifications ¶
func (cq *CommentQuery) QueryNotifications() *NotificationQuery
QueryNotifications chains the current query on the "notifications" edge.
func (*CommentQuery) QueryPost ¶
func (cq *CommentQuery) QueryPost() *PostQuery
QueryPost chains the current query on the "post" edge.
func (*CommentQuery) QueryReactions ¶
func (cq *CommentQuery) QueryReactions() *ReactionQuery
QueryReactions chains the current query on the "reactions" edge.
func (*CommentQuery) QueryReplies ¶
func (cq *CommentQuery) QueryReplies() *ReplyQuery
QueryReplies chains the current query on the "replies" edge.
func (*CommentQuery) Select ¶
func (cq *CommentQuery) Select(fields ...string) *CommentSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Comment.Query(). Select(comment.FieldCreatedAt). Scan(ctx, &v)
func (*CommentQuery) Unique ¶
func (cq *CommentQuery) Unique(unique bool) *CommentQuery
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 (*CommentQuery) Where ¶
func (cq *CommentQuery) Where(ps ...predicate.Comment) *CommentQuery
Where adds a new predicate for the CommentQuery builder.
func (*CommentQuery) WithAuthor ¶
func (cq *CommentQuery) WithAuthor(opts ...func(*UserQuery)) *CommentQuery
WithAuthor tells the query-builder to eager-load the nodes that are connected to the "author" edge. The optional arguments are used to configure the query builder of the edge.
func (*CommentQuery) WithNotifications ¶
func (cq *CommentQuery) WithNotifications(opts ...func(*NotificationQuery)) *CommentQuery
WithNotifications tells the query-builder to eager-load the nodes that are connected to the "notifications" edge. The optional arguments are used to configure the query builder of the edge.
func (*CommentQuery) WithPost ¶
func (cq *CommentQuery) WithPost(opts ...func(*PostQuery)) *CommentQuery
WithPost tells the query-builder to eager-load the nodes that are connected to the "post" edge. The optional arguments are used to configure the query builder of the edge.
func (*CommentQuery) WithReactions ¶
func (cq *CommentQuery) WithReactions(opts ...func(*ReactionQuery)) *CommentQuery
WithReactions tells the query-builder to eager-load the nodes that are connected to the "reactions" edge. The optional arguments are used to configure the query builder of the edge.
func (*CommentQuery) WithReplies ¶
func (cq *CommentQuery) WithReplies(opts ...func(*ReplyQuery)) *CommentQuery
WithReplies tells the query-builder to eager-load the nodes that are connected to the "replies" edge. The optional arguments are used to configure the query builder of the edge.
type CommentSelect ¶
type CommentSelect struct { *CommentQuery // contains filtered or unexported fields }
CommentSelect is the builder for selecting fields of Comment entities.
func (*CommentSelect) Aggregate ¶
func (cs *CommentSelect) Aggregate(fns ...AggregateFunc) *CommentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CommentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Scan ¶
func (cs *CommentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CommentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CommentUpdate ¶
type CommentUpdate struct {
// contains filtered or unexported fields
}
CommentUpdate is the builder for updating Comment entities.
func (*CommentUpdate) AddNotificationIDs ¶
func (cu *CommentUpdate) AddNotificationIDs(ids ...uuid.UUID) *CommentUpdate
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*CommentUpdate) AddNotifications ¶
func (cu *CommentUpdate) AddNotifications(n ...*Notification) *CommentUpdate
AddNotifications adds the "notifications" edges to the Notification entity.
func (*CommentUpdate) AddReactionIDs ¶
func (cu *CommentUpdate) AddReactionIDs(ids ...uuid.UUID) *CommentUpdate
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*CommentUpdate) AddReactions ¶
func (cu *CommentUpdate) AddReactions(r ...*Reaction) *CommentUpdate
AddReactions adds the "reactions" edges to the Reaction entity.
func (*CommentUpdate) AddReplies ¶
func (cu *CommentUpdate) AddReplies(r ...*Reply) *CommentUpdate
AddReplies adds the "replies" edges to the Reply entity.
func (*CommentUpdate) AddReplyIDs ¶
func (cu *CommentUpdate) AddReplyIDs(ids ...uuid.UUID) *CommentUpdate
AddReplyIDs adds the "replies" edge to the Reply entity by IDs.
func (*CommentUpdate) ClearAuthor ¶
func (cu *CommentUpdate) ClearAuthor() *CommentUpdate
ClearAuthor clears the "author" edge to the User entity.
func (*CommentUpdate) ClearNotifications ¶
func (cu *CommentUpdate) ClearNotifications() *CommentUpdate
ClearNotifications clears all "notifications" edges to the Notification entity.
func (*CommentUpdate) ClearPost ¶
func (cu *CommentUpdate) ClearPost() *CommentUpdate
ClearPost clears the "post" edge to the Post entity.
func (*CommentUpdate) ClearReactions ¶
func (cu *CommentUpdate) ClearReactions() *CommentUpdate
ClearReactions clears all "reactions" edges to the Reaction entity.
func (*CommentUpdate) ClearReplies ¶
func (cu *CommentUpdate) ClearReplies() *CommentUpdate
ClearReplies clears all "replies" edges to the Reply entity.
func (*CommentUpdate) Exec ¶
func (cu *CommentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CommentUpdate) ExecX ¶
func (cu *CommentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentUpdate) Mutation ¶
func (cu *CommentUpdate) Mutation() *CommentMutation
Mutation returns the CommentMutation object of the builder.
func (*CommentUpdate) RemoveNotificationIDs ¶
func (cu *CommentUpdate) RemoveNotificationIDs(ids ...uuid.UUID) *CommentUpdate
RemoveNotificationIDs removes the "notifications" edge to Notification entities by IDs.
func (*CommentUpdate) RemoveNotifications ¶
func (cu *CommentUpdate) RemoveNotifications(n ...*Notification) *CommentUpdate
RemoveNotifications removes "notifications" edges to Notification entities.
func (*CommentUpdate) RemoveReactionIDs ¶
func (cu *CommentUpdate) RemoveReactionIDs(ids ...uuid.UUID) *CommentUpdate
RemoveReactionIDs removes the "reactions" edge to Reaction entities by IDs.
func (*CommentUpdate) RemoveReactions ¶
func (cu *CommentUpdate) RemoveReactions(r ...*Reaction) *CommentUpdate
RemoveReactions removes "reactions" edges to Reaction entities.
func (*CommentUpdate) RemoveReplies ¶
func (cu *CommentUpdate) RemoveReplies(r ...*Reply) *CommentUpdate
RemoveReplies removes "replies" edges to Reply entities.
func (*CommentUpdate) RemoveReplyIDs ¶
func (cu *CommentUpdate) RemoveReplyIDs(ids ...uuid.UUID) *CommentUpdate
RemoveReplyIDs removes the "replies" edge to Reply entities by IDs.
func (*CommentUpdate) Save ¶
func (cu *CommentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CommentUpdate) SaveX ¶
func (cu *CommentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CommentUpdate) SetAuthor ¶
func (cu *CommentUpdate) SetAuthor(u *User) *CommentUpdate
SetAuthor sets the "author" edge to the User entity.
func (*CommentUpdate) SetAuthorID ¶
func (cu *CommentUpdate) SetAuthorID(u uuid.UUID) *CommentUpdate
SetAuthorID sets the "author_id" field.
func (*CommentUpdate) SetCreatedAt ¶
func (cu *CommentUpdate) SetCreatedAt(t time.Time) *CommentUpdate
SetCreatedAt sets the "created_at" field.
func (*CommentUpdate) SetNillableAuthorID ¶
func (cu *CommentUpdate) SetNillableAuthorID(u *uuid.UUID) *CommentUpdate
SetNillableAuthorID sets the "author_id" field if the given value is not nil.
func (*CommentUpdate) SetNillableCreatedAt ¶
func (cu *CommentUpdate) SetNillableCreatedAt(t *time.Time) *CommentUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CommentUpdate) SetNillablePostID ¶
func (cu *CommentUpdate) SetNillablePostID(u *uuid.UUID) *CommentUpdate
SetNillablePostID sets the "post_id" field if the given value is not nil.
func (*CommentUpdate) SetNillableSlug ¶
func (cu *CommentUpdate) SetNillableSlug(s *string) *CommentUpdate
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*CommentUpdate) SetNillableText ¶
func (cu *CommentUpdate) SetNillableText(s *string) *CommentUpdate
SetNillableText sets the "text" field if the given value is not nil.
func (*CommentUpdate) SetPost ¶
func (cu *CommentUpdate) SetPost(p *Post) *CommentUpdate
SetPost sets the "post" edge to the Post entity.
func (*CommentUpdate) SetPostID ¶
func (cu *CommentUpdate) SetPostID(u uuid.UUID) *CommentUpdate
SetPostID sets the "post_id" field.
func (*CommentUpdate) SetSlug ¶
func (cu *CommentUpdate) SetSlug(s string) *CommentUpdate
SetSlug sets the "slug" field.
func (*CommentUpdate) SetText ¶
func (cu *CommentUpdate) SetText(s string) *CommentUpdate
SetText sets the "text" field.
func (*CommentUpdate) SetUpdatedAt ¶
func (cu *CommentUpdate) SetUpdatedAt(t time.Time) *CommentUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CommentUpdate) Where ¶
func (cu *CommentUpdate) Where(ps ...predicate.Comment) *CommentUpdate
Where appends a list predicates to the CommentUpdate builder.
type CommentUpdateOne ¶
type CommentUpdateOne struct {
// contains filtered or unexported fields
}
CommentUpdateOne is the builder for updating a single Comment entity.
func (*CommentUpdateOne) AddNotificationIDs ¶
func (cuo *CommentUpdateOne) AddNotificationIDs(ids ...uuid.UUID) *CommentUpdateOne
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*CommentUpdateOne) AddNotifications ¶
func (cuo *CommentUpdateOne) AddNotifications(n ...*Notification) *CommentUpdateOne
AddNotifications adds the "notifications" edges to the Notification entity.
func (*CommentUpdateOne) AddReactionIDs ¶
func (cuo *CommentUpdateOne) AddReactionIDs(ids ...uuid.UUID) *CommentUpdateOne
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*CommentUpdateOne) AddReactions ¶
func (cuo *CommentUpdateOne) AddReactions(r ...*Reaction) *CommentUpdateOne
AddReactions adds the "reactions" edges to the Reaction entity.
func (*CommentUpdateOne) AddReplies ¶
func (cuo *CommentUpdateOne) AddReplies(r ...*Reply) *CommentUpdateOne
AddReplies adds the "replies" edges to the Reply entity.
func (*CommentUpdateOne) AddReplyIDs ¶
func (cuo *CommentUpdateOne) AddReplyIDs(ids ...uuid.UUID) *CommentUpdateOne
AddReplyIDs adds the "replies" edge to the Reply entity by IDs.
func (*CommentUpdateOne) ClearAuthor ¶
func (cuo *CommentUpdateOne) ClearAuthor() *CommentUpdateOne
ClearAuthor clears the "author" edge to the User entity.
func (*CommentUpdateOne) ClearNotifications ¶
func (cuo *CommentUpdateOne) ClearNotifications() *CommentUpdateOne
ClearNotifications clears all "notifications" edges to the Notification entity.
func (*CommentUpdateOne) ClearPost ¶
func (cuo *CommentUpdateOne) ClearPost() *CommentUpdateOne
ClearPost clears the "post" edge to the Post entity.
func (*CommentUpdateOne) ClearReactions ¶
func (cuo *CommentUpdateOne) ClearReactions() *CommentUpdateOne
ClearReactions clears all "reactions" edges to the Reaction entity.
func (*CommentUpdateOne) ClearReplies ¶
func (cuo *CommentUpdateOne) ClearReplies() *CommentUpdateOne
ClearReplies clears all "replies" edges to the Reply entity.
func (*CommentUpdateOne) Exec ¶
func (cuo *CommentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CommentUpdateOne) ExecX ¶
func (cuo *CommentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentUpdateOne) Mutation ¶
func (cuo *CommentUpdateOne) Mutation() *CommentMutation
Mutation returns the CommentMutation object of the builder.
func (*CommentUpdateOne) RemoveNotificationIDs ¶
func (cuo *CommentUpdateOne) RemoveNotificationIDs(ids ...uuid.UUID) *CommentUpdateOne
RemoveNotificationIDs removes the "notifications" edge to Notification entities by IDs.
func (*CommentUpdateOne) RemoveNotifications ¶
func (cuo *CommentUpdateOne) RemoveNotifications(n ...*Notification) *CommentUpdateOne
RemoveNotifications removes "notifications" edges to Notification entities.
func (*CommentUpdateOne) RemoveReactionIDs ¶
func (cuo *CommentUpdateOne) RemoveReactionIDs(ids ...uuid.UUID) *CommentUpdateOne
RemoveReactionIDs removes the "reactions" edge to Reaction entities by IDs.
func (*CommentUpdateOne) RemoveReactions ¶
func (cuo *CommentUpdateOne) RemoveReactions(r ...*Reaction) *CommentUpdateOne
RemoveReactions removes "reactions" edges to Reaction entities.
func (*CommentUpdateOne) RemoveReplies ¶
func (cuo *CommentUpdateOne) RemoveReplies(r ...*Reply) *CommentUpdateOne
RemoveReplies removes "replies" edges to Reply entities.
func (*CommentUpdateOne) RemoveReplyIDs ¶
func (cuo *CommentUpdateOne) RemoveReplyIDs(ids ...uuid.UUID) *CommentUpdateOne
RemoveReplyIDs removes the "replies" edge to Reply entities by IDs.
func (*CommentUpdateOne) Save ¶
func (cuo *CommentUpdateOne) Save(ctx context.Context) (*Comment, error)
Save executes the query and returns the updated Comment entity.
func (*CommentUpdateOne) SaveX ¶
func (cuo *CommentUpdateOne) SaveX(ctx context.Context) *Comment
SaveX is like Save, but panics if an error occurs.
func (*CommentUpdateOne) Select ¶
func (cuo *CommentUpdateOne) Select(field string, fields ...string) *CommentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CommentUpdateOne) SetAuthor ¶
func (cuo *CommentUpdateOne) SetAuthor(u *User) *CommentUpdateOne
SetAuthor sets the "author" edge to the User entity.
func (*CommentUpdateOne) SetAuthorID ¶
func (cuo *CommentUpdateOne) SetAuthorID(u uuid.UUID) *CommentUpdateOne
SetAuthorID sets the "author_id" field.
func (*CommentUpdateOne) SetCreatedAt ¶
func (cuo *CommentUpdateOne) SetCreatedAt(t time.Time) *CommentUpdateOne
SetCreatedAt sets the "created_at" field.
func (*CommentUpdateOne) SetNillableAuthorID ¶
func (cuo *CommentUpdateOne) SetNillableAuthorID(u *uuid.UUID) *CommentUpdateOne
SetNillableAuthorID sets the "author_id" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableCreatedAt ¶
func (cuo *CommentUpdateOne) SetNillableCreatedAt(t *time.Time) *CommentUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CommentUpdateOne) SetNillablePostID ¶
func (cuo *CommentUpdateOne) SetNillablePostID(u *uuid.UUID) *CommentUpdateOne
SetNillablePostID sets the "post_id" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableSlug ¶
func (cuo *CommentUpdateOne) SetNillableSlug(s *string) *CommentUpdateOne
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableText ¶
func (cuo *CommentUpdateOne) SetNillableText(s *string) *CommentUpdateOne
SetNillableText sets the "text" field if the given value is not nil.
func (*CommentUpdateOne) SetPost ¶
func (cuo *CommentUpdateOne) SetPost(p *Post) *CommentUpdateOne
SetPost sets the "post" edge to the Post entity.
func (*CommentUpdateOne) SetPostID ¶
func (cuo *CommentUpdateOne) SetPostID(u uuid.UUID) *CommentUpdateOne
SetPostID sets the "post_id" field.
func (*CommentUpdateOne) SetSlug ¶
func (cuo *CommentUpdateOne) SetSlug(s string) *CommentUpdateOne
SetSlug sets the "slug" field.
func (*CommentUpdateOne) SetText ¶
func (cuo *CommentUpdateOne) SetText(s string) *CommentUpdateOne
SetText sets the "text" field.
func (*CommentUpdateOne) SetUpdatedAt ¶
func (cuo *CommentUpdateOne) SetUpdatedAt(t time.Time) *CommentUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CommentUpdateOne) Where ¶
func (cuo *CommentUpdateOne) Where(ps ...predicate.Comment) *CommentUpdateOne
Where appends a list predicates to the CommentUpdate builder.
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 Country ¶
type Country struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CountryQuery when eager-loading is set. Edges CountryEdges `json:"edges"` // contains filtered or unexported fields }
Country is the model entity for the Country schema.
func (*Country) QueryCities ¶
QueryCities queries the "cities" edge of the Country entity.
func (*Country) QueryRegions ¶
func (c *Country) QueryRegions() *RegionQuery
QueryRegions queries the "regions" edge of the Country entity.
func (*Country) Unwrap ¶
Unwrap unwraps the Country 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 (*Country) Update ¶
func (c *Country) Update() *CountryUpdateOne
Update returns a builder for updating this Country. Note that you need to call Country.Unwrap() before calling this method if this Country was returned from a transaction, and the transaction was committed or rolled back.
type CountryClient ¶
type CountryClient struct {
// contains filtered or unexported fields
}
CountryClient is a client for the Country schema.
func NewCountryClient ¶
func NewCountryClient(c config) *CountryClient
NewCountryClient returns a client for the Country from the given config.
func (*CountryClient) Create ¶
func (c *CountryClient) Create() *CountryCreate
Create returns a builder for creating a Country entity.
func (*CountryClient) CreateBulk ¶
func (c *CountryClient) CreateBulk(builders ...*CountryCreate) *CountryCreateBulk
CreateBulk returns a builder for creating a bulk of Country entities.
func (*CountryClient) Delete ¶
func (c *CountryClient) Delete() *CountryDelete
Delete returns a delete builder for Country.
func (*CountryClient) DeleteOne ¶
func (c *CountryClient) DeleteOne(co *Country) *CountryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CountryClient) DeleteOneID ¶
func (c *CountryClient) DeleteOneID(id uuid.UUID) *CountryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CountryClient) Hooks ¶
func (c *CountryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CountryClient) Intercept ¶
func (c *CountryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `country.Intercept(f(g(h())))`.
func (*CountryClient) Interceptors ¶
func (c *CountryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CountryClient) MapCreateBulk ¶
func (c *CountryClient) MapCreateBulk(slice any, setFunc func(*CountryCreate, int)) *CountryCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CountryClient) Query ¶
func (c *CountryClient) Query() *CountryQuery
Query returns a query builder for Country.
func (*CountryClient) QueryCities ¶
func (c *CountryClient) QueryCities(co *Country) *CityQuery
QueryCities queries the cities edge of a Country.
func (*CountryClient) QueryRegions ¶
func (c *CountryClient) QueryRegions(co *Country) *RegionQuery
QueryRegions queries the regions edge of a Country.
func (*CountryClient) Update ¶
func (c *CountryClient) Update() *CountryUpdate
Update returns an update builder for Country.
func (*CountryClient) UpdateOne ¶
func (c *CountryClient) UpdateOne(co *Country) *CountryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CountryClient) UpdateOneID ¶
func (c *CountryClient) UpdateOneID(id uuid.UUID) *CountryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CountryClient) Use ¶
func (c *CountryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `country.Hooks(f(g(h())))`.
type CountryCreate ¶
type CountryCreate struct {
// contains filtered or unexported fields
}
CountryCreate is the builder for creating a Country entity.
func (*CountryCreate) AddCities ¶
func (cc *CountryCreate) AddCities(c ...*City) *CountryCreate
AddCities adds the "cities" edges to the City entity.
func (*CountryCreate) AddCityIDs ¶
func (cc *CountryCreate) AddCityIDs(ids ...uuid.UUID) *CountryCreate
AddCityIDs adds the "cities" edge to the City entity by IDs.
func (*CountryCreate) AddRegionIDs ¶
func (cc *CountryCreate) AddRegionIDs(ids ...uuid.UUID) *CountryCreate
AddRegionIDs adds the "regions" edge to the Region entity by IDs.
func (*CountryCreate) AddRegions ¶
func (cc *CountryCreate) AddRegions(r ...*Region) *CountryCreate
AddRegions adds the "regions" edges to the Region entity.
func (*CountryCreate) Exec ¶
func (cc *CountryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryCreate) ExecX ¶
func (cc *CountryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryCreate) Mutation ¶
func (cc *CountryCreate) Mutation() *CountryMutation
Mutation returns the CountryMutation object of the builder.
func (*CountryCreate) Save ¶
func (cc *CountryCreate) Save(ctx context.Context) (*Country, error)
Save creates the Country in the database.
func (*CountryCreate) SaveX ¶
func (cc *CountryCreate) SaveX(ctx context.Context) *Country
SaveX calls Save and panics if Save returns an error.
func (*CountryCreate) SetCode ¶
func (cc *CountryCreate) SetCode(s string) *CountryCreate
SetCode sets the "code" field.
func (*CountryCreate) SetCreatedAt ¶
func (cc *CountryCreate) SetCreatedAt(t time.Time) *CountryCreate
SetCreatedAt sets the "created_at" field.
func (*CountryCreate) SetID ¶
func (cc *CountryCreate) SetID(u uuid.UUID) *CountryCreate
SetID sets the "id" field.
func (*CountryCreate) SetName ¶
func (cc *CountryCreate) SetName(s string) *CountryCreate
SetName sets the "name" field.
func (*CountryCreate) SetNillableCreatedAt ¶
func (cc *CountryCreate) SetNillableCreatedAt(t *time.Time) *CountryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CountryCreate) SetNillableID ¶
func (cc *CountryCreate) SetNillableID(u *uuid.UUID) *CountryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CountryCreate) SetNillableUpdatedAt ¶
func (cc *CountryCreate) SetNillableUpdatedAt(t *time.Time) *CountryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CountryCreate) SetUpdatedAt ¶
func (cc *CountryCreate) SetUpdatedAt(t time.Time) *CountryCreate
SetUpdatedAt sets the "updated_at" field.
type CountryCreateBulk ¶
type CountryCreateBulk struct {
// contains filtered or unexported fields
}
CountryCreateBulk is the builder for creating many Country entities in bulk.
func (*CountryCreateBulk) Exec ¶
func (ccb *CountryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryCreateBulk) ExecX ¶
func (ccb *CountryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CountryDelete ¶
type CountryDelete struct {
// contains filtered or unexported fields
}
CountryDelete is the builder for deleting a Country entity.
func (*CountryDelete) Exec ¶
func (cd *CountryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CountryDelete) ExecX ¶
func (cd *CountryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CountryDelete) Where ¶
func (cd *CountryDelete) Where(ps ...predicate.Country) *CountryDelete
Where appends a list predicates to the CountryDelete builder.
type CountryDeleteOne ¶
type CountryDeleteOne struct {
// contains filtered or unexported fields
}
CountryDeleteOne is the builder for deleting a single Country entity.
func (*CountryDeleteOne) Exec ¶
func (cdo *CountryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CountryDeleteOne) ExecX ¶
func (cdo *CountryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryDeleteOne) Where ¶
func (cdo *CountryDeleteOne) Where(ps ...predicate.Country) *CountryDeleteOne
Where appends a list predicates to the CountryDelete builder.
type CountryEdges ¶
type CountryEdges struct { // Cities holds the value of the cities edge. Cities []*City `json:"cities,omitempty"` // Regions holds the value of the regions edge. Regions []*Region `json:"regions,omitempty"` // contains filtered or unexported fields }
CountryEdges holds the relations/edges for other nodes in the graph.
func (CountryEdges) CitiesOrErr ¶
func (e CountryEdges) CitiesOrErr() ([]*City, error)
CitiesOrErr returns the Cities value or an error if the edge was not loaded in eager-loading.
func (CountryEdges) RegionsOrErr ¶
func (e CountryEdges) RegionsOrErr() ([]*Region, error)
RegionsOrErr returns the Regions value or an error if the edge was not loaded in eager-loading.
type CountryGroupBy ¶
type CountryGroupBy struct {
// contains filtered or unexported fields
}
CountryGroupBy is the group-by builder for Country entities.
func (*CountryGroupBy) Aggregate ¶
func (cgb *CountryGroupBy) Aggregate(fns ...AggregateFunc) *CountryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CountryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Scan ¶
func (cgb *CountryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CountryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CountryMutation ¶
type CountryMutation struct {
// contains filtered or unexported fields
}
CountryMutation represents an operation that mutates the Country nodes in the graph.
func (*CountryMutation) AddCityIDs ¶
func (m *CountryMutation) AddCityIDs(ids ...uuid.UUID)
AddCityIDs adds the "cities" edge to the City entity by ids.
func (*CountryMutation) AddField ¶
func (m *CountryMutation) 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 (*CountryMutation) AddRegionIDs ¶
func (m *CountryMutation) AddRegionIDs(ids ...uuid.UUID)
AddRegionIDs adds the "regions" edge to the Region entity by ids.
func (*CountryMutation) AddedEdges ¶
func (m *CountryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CountryMutation) AddedField ¶
func (m *CountryMutation) 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 (*CountryMutation) AddedFields ¶
func (m *CountryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CountryMutation) AddedIDs ¶
func (m *CountryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CountryMutation) CitiesCleared ¶
func (m *CountryMutation) CitiesCleared() bool
CitiesCleared reports if the "cities" edge to the City entity was cleared.
func (*CountryMutation) CitiesIDs ¶
func (m *CountryMutation) CitiesIDs() (ids []uuid.UUID)
CitiesIDs returns the "cities" edge IDs in the mutation.
func (*CountryMutation) ClearCities ¶
func (m *CountryMutation) ClearCities()
ClearCities clears the "cities" edge to the City entity.
func (*CountryMutation) ClearEdge ¶
func (m *CountryMutation) 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 (*CountryMutation) ClearField ¶
func (m *CountryMutation) 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 (*CountryMutation) ClearRegions ¶
func (m *CountryMutation) ClearRegions()
ClearRegions clears the "regions" edge to the Region entity.
func (*CountryMutation) ClearedEdges ¶
func (m *CountryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CountryMutation) ClearedFields ¶
func (m *CountryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CountryMutation) Client ¶
func (m CountryMutation) 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 (*CountryMutation) Code ¶
func (m *CountryMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*CountryMutation) CreatedAt ¶
func (m *CountryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CountryMutation) EdgeCleared ¶
func (m *CountryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CountryMutation) Field ¶
func (m *CountryMutation) 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 (*CountryMutation) FieldCleared ¶
func (m *CountryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CountryMutation) Fields ¶
func (m *CountryMutation) 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 (*CountryMutation) ID ¶
func (m *CountryMutation) 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 (*CountryMutation) 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 (*CountryMutation) Name ¶
func (m *CountryMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CountryMutation) OldCode ¶
func (m *CountryMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Country entity. If the Country 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 (*CountryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Country entity. If the Country 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 (*CountryMutation) 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 (*CountryMutation) OldName ¶
func (m *CountryMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Country entity. If the Country 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 (*CountryMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Country entity. If the Country 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 (*CountryMutation) RegionsCleared ¶
func (m *CountryMutation) RegionsCleared() bool
RegionsCleared reports if the "regions" edge to the Region entity was cleared.
func (*CountryMutation) RegionsIDs ¶
func (m *CountryMutation) RegionsIDs() (ids []uuid.UUID)
RegionsIDs returns the "regions" edge IDs in the mutation.
func (*CountryMutation) RemoveCityIDs ¶
func (m *CountryMutation) RemoveCityIDs(ids ...uuid.UUID)
RemoveCityIDs removes the "cities" edge to the City entity by IDs.
func (*CountryMutation) RemoveRegionIDs ¶
func (m *CountryMutation) RemoveRegionIDs(ids ...uuid.UUID)
RemoveRegionIDs removes the "regions" edge to the Region entity by IDs.
func (*CountryMutation) RemovedCitiesIDs ¶
func (m *CountryMutation) RemovedCitiesIDs() (ids []uuid.UUID)
RemovedCities returns the removed IDs of the "cities" edge to the City entity.
func (*CountryMutation) RemovedEdges ¶
func (m *CountryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CountryMutation) RemovedIDs ¶
func (m *CountryMutation) 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 (*CountryMutation) RemovedRegionsIDs ¶
func (m *CountryMutation) RemovedRegionsIDs() (ids []uuid.UUID)
RemovedRegions returns the removed IDs of the "regions" edge to the Region entity.
func (*CountryMutation) ResetCities ¶
func (m *CountryMutation) ResetCities()
ResetCities resets all changes to the "cities" edge.
func (*CountryMutation) ResetCode ¶
func (m *CountryMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*CountryMutation) ResetCreatedAt ¶
func (m *CountryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CountryMutation) ResetEdge ¶
func (m *CountryMutation) 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 (*CountryMutation) ResetField ¶
func (m *CountryMutation) 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 (*CountryMutation) ResetName ¶
func (m *CountryMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CountryMutation) ResetRegions ¶
func (m *CountryMutation) ResetRegions()
ResetRegions resets all changes to the "regions" edge.
func (*CountryMutation) ResetUpdatedAt ¶
func (m *CountryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CountryMutation) SetCode ¶
func (m *CountryMutation) SetCode(s string)
SetCode sets the "code" field.
func (*CountryMutation) SetCreatedAt ¶
func (m *CountryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CountryMutation) SetField ¶
func (m *CountryMutation) 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 (*CountryMutation) SetID ¶
func (m *CountryMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Country entities.
func (*CountryMutation) SetName ¶
func (m *CountryMutation) SetName(s string)
SetName sets the "name" field.
func (*CountryMutation) SetOp ¶
func (m *CountryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CountryMutation) SetUpdatedAt ¶
func (m *CountryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (CountryMutation) Tx ¶
func (m CountryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CountryMutation) Type ¶
func (m *CountryMutation) Type() string
Type returns the node type of this mutation (Country).
func (*CountryMutation) UpdatedAt ¶
func (m *CountryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CountryMutation) Where ¶
func (m *CountryMutation) Where(ps ...predicate.Country)
Where appends a list predicates to the CountryMutation builder.
func (*CountryMutation) WhereP ¶
func (m *CountryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CountryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CountryQuery ¶
type CountryQuery struct {
// contains filtered or unexported fields
}
CountryQuery is the builder for querying Country entities.
func (*CountryQuery) Aggregate ¶
func (cq *CountryQuery) Aggregate(fns ...AggregateFunc) *CountrySelect
Aggregate returns a CountrySelect configured with the given aggregations.
func (*CountryQuery) All ¶
func (cq *CountryQuery) All(ctx context.Context) ([]*Country, error)
All executes the query and returns a list of Countries.
func (*CountryQuery) AllX ¶
func (cq *CountryQuery) AllX(ctx context.Context) []*Country
AllX is like All, but panics if an error occurs.
func (*CountryQuery) Clone ¶
func (cq *CountryQuery) Clone() *CountryQuery
Clone returns a duplicate of the CountryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CountryQuery) Count ¶
func (cq *CountryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CountryQuery) CountX ¶
func (cq *CountryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CountryQuery) Exist ¶
func (cq *CountryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CountryQuery) ExistX ¶
func (cq *CountryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CountryQuery) First ¶
func (cq *CountryQuery) First(ctx context.Context) (*Country, error)
First returns the first Country entity from the query. Returns a *NotFoundError when no Country was found.
func (*CountryQuery) FirstID ¶
FirstID returns the first Country ID from the query. Returns a *NotFoundError when no Country ID was found.
func (*CountryQuery) FirstIDX ¶
func (cq *CountryQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CountryQuery) FirstX ¶
func (cq *CountryQuery) FirstX(ctx context.Context) *Country
FirstX is like First, but panics if an error occurs.
func (*CountryQuery) GroupBy ¶
func (cq *CountryQuery) GroupBy(field string, fields ...string) *CountryGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Country.Query(). GroupBy(country.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CountryQuery) IDsX ¶
func (cq *CountryQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CountryQuery) Limit ¶
func (cq *CountryQuery) Limit(limit int) *CountryQuery
Limit the number of records to be returned by this query.
func (*CountryQuery) Offset ¶
func (cq *CountryQuery) Offset(offset int) *CountryQuery
Offset to start from.
func (*CountryQuery) Only ¶
func (cq *CountryQuery) Only(ctx context.Context) (*Country, error)
Only returns a single Country entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Country entity is found. Returns a *NotFoundError when no Country entities are found.
func (*CountryQuery) OnlyID ¶
OnlyID is like Only, but returns the only Country ID in the query. Returns a *NotSingularError when more than one Country ID is found. Returns a *NotFoundError when no entities are found.
func (*CountryQuery) OnlyIDX ¶
func (cq *CountryQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CountryQuery) OnlyX ¶
func (cq *CountryQuery) OnlyX(ctx context.Context) *Country
OnlyX is like Only, but panics if an error occurs.
func (*CountryQuery) Order ¶
func (cq *CountryQuery) Order(o ...country.OrderOption) *CountryQuery
Order specifies how the records should be ordered.
func (*CountryQuery) QueryCities ¶
func (cq *CountryQuery) QueryCities() *CityQuery
QueryCities chains the current query on the "cities" edge.
func (*CountryQuery) QueryRegions ¶
func (cq *CountryQuery) QueryRegions() *RegionQuery
QueryRegions chains the current query on the "regions" edge.
func (*CountryQuery) Select ¶
func (cq *CountryQuery) Select(fields ...string) *CountrySelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Country.Query(). Select(country.FieldCreatedAt). Scan(ctx, &v)
func (*CountryQuery) Unique ¶
func (cq *CountryQuery) Unique(unique bool) *CountryQuery
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 (*CountryQuery) Where ¶
func (cq *CountryQuery) Where(ps ...predicate.Country) *CountryQuery
Where adds a new predicate for the CountryQuery builder.
func (*CountryQuery) WithCities ¶
func (cq *CountryQuery) WithCities(opts ...func(*CityQuery)) *CountryQuery
WithCities tells the query-builder to eager-load the nodes that are connected to the "cities" edge. The optional arguments are used to configure the query builder of the edge.
func (*CountryQuery) WithRegions ¶
func (cq *CountryQuery) WithRegions(opts ...func(*RegionQuery)) *CountryQuery
WithRegions tells the query-builder to eager-load the nodes that are connected to the "regions" edge. The optional arguments are used to configure the query builder of the edge.
type CountrySelect ¶
type CountrySelect struct { *CountryQuery // contains filtered or unexported fields }
CountrySelect is the builder for selecting fields of Country entities.
func (*CountrySelect) Aggregate ¶
func (cs *CountrySelect) Aggregate(fns ...AggregateFunc) *CountrySelect
Aggregate adds the given aggregation functions to the selector query.
func (*CountrySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CountrySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CountrySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CountrySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CountrySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CountrySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CountrySelect) Scan ¶
func (cs *CountrySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CountrySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CountryUpdate ¶
type CountryUpdate struct {
// contains filtered or unexported fields
}
CountryUpdate is the builder for updating Country entities.
func (*CountryUpdate) AddCities ¶
func (cu *CountryUpdate) AddCities(c ...*City) *CountryUpdate
AddCities adds the "cities" edges to the City entity.
func (*CountryUpdate) AddCityIDs ¶
func (cu *CountryUpdate) AddCityIDs(ids ...uuid.UUID) *CountryUpdate
AddCityIDs adds the "cities" edge to the City entity by IDs.
func (*CountryUpdate) AddRegionIDs ¶
func (cu *CountryUpdate) AddRegionIDs(ids ...uuid.UUID) *CountryUpdate
AddRegionIDs adds the "regions" edge to the Region entity by IDs.
func (*CountryUpdate) AddRegions ¶
func (cu *CountryUpdate) AddRegions(r ...*Region) *CountryUpdate
AddRegions adds the "regions" edges to the Region entity.
func (*CountryUpdate) ClearCities ¶
func (cu *CountryUpdate) ClearCities() *CountryUpdate
ClearCities clears all "cities" edges to the City entity.
func (*CountryUpdate) ClearRegions ¶
func (cu *CountryUpdate) ClearRegions() *CountryUpdate
ClearRegions clears all "regions" edges to the Region entity.
func (*CountryUpdate) Exec ¶
func (cu *CountryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryUpdate) ExecX ¶
func (cu *CountryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryUpdate) Mutation ¶
func (cu *CountryUpdate) Mutation() *CountryMutation
Mutation returns the CountryMutation object of the builder.
func (*CountryUpdate) RemoveCities ¶
func (cu *CountryUpdate) RemoveCities(c ...*City) *CountryUpdate
RemoveCities removes "cities" edges to City entities.
func (*CountryUpdate) RemoveCityIDs ¶
func (cu *CountryUpdate) RemoveCityIDs(ids ...uuid.UUID) *CountryUpdate
RemoveCityIDs removes the "cities" edge to City entities by IDs.
func (*CountryUpdate) RemoveRegionIDs ¶
func (cu *CountryUpdate) RemoveRegionIDs(ids ...uuid.UUID) *CountryUpdate
RemoveRegionIDs removes the "regions" edge to Region entities by IDs.
func (*CountryUpdate) RemoveRegions ¶
func (cu *CountryUpdate) RemoveRegions(r ...*Region) *CountryUpdate
RemoveRegions removes "regions" edges to Region entities.
func (*CountryUpdate) Save ¶
func (cu *CountryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CountryUpdate) SaveX ¶
func (cu *CountryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CountryUpdate) SetCode ¶
func (cu *CountryUpdate) SetCode(s string) *CountryUpdate
SetCode sets the "code" field.
func (*CountryUpdate) SetCreatedAt ¶
func (cu *CountryUpdate) SetCreatedAt(t time.Time) *CountryUpdate
SetCreatedAt sets the "created_at" field.
func (*CountryUpdate) SetName ¶
func (cu *CountryUpdate) SetName(s string) *CountryUpdate
SetName sets the "name" field.
func (*CountryUpdate) SetNillableCode ¶
func (cu *CountryUpdate) SetNillableCode(s *string) *CountryUpdate
SetNillableCode sets the "code" field if the given value is not nil.
func (*CountryUpdate) SetNillableCreatedAt ¶
func (cu *CountryUpdate) SetNillableCreatedAt(t *time.Time) *CountryUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CountryUpdate) SetNillableName ¶
func (cu *CountryUpdate) SetNillableName(s *string) *CountryUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*CountryUpdate) SetUpdatedAt ¶
func (cu *CountryUpdate) SetUpdatedAt(t time.Time) *CountryUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CountryUpdate) Where ¶
func (cu *CountryUpdate) Where(ps ...predicate.Country) *CountryUpdate
Where appends a list predicates to the CountryUpdate builder.
type CountryUpdateOne ¶
type CountryUpdateOne struct {
// contains filtered or unexported fields
}
CountryUpdateOne is the builder for updating a single Country entity.
func (*CountryUpdateOne) AddCities ¶
func (cuo *CountryUpdateOne) AddCities(c ...*City) *CountryUpdateOne
AddCities adds the "cities" edges to the City entity.
func (*CountryUpdateOne) AddCityIDs ¶
func (cuo *CountryUpdateOne) AddCityIDs(ids ...uuid.UUID) *CountryUpdateOne
AddCityIDs adds the "cities" edge to the City entity by IDs.
func (*CountryUpdateOne) AddRegionIDs ¶
func (cuo *CountryUpdateOne) AddRegionIDs(ids ...uuid.UUID) *CountryUpdateOne
AddRegionIDs adds the "regions" edge to the Region entity by IDs.
func (*CountryUpdateOne) AddRegions ¶
func (cuo *CountryUpdateOne) AddRegions(r ...*Region) *CountryUpdateOne
AddRegions adds the "regions" edges to the Region entity.
func (*CountryUpdateOne) ClearCities ¶
func (cuo *CountryUpdateOne) ClearCities() *CountryUpdateOne
ClearCities clears all "cities" edges to the City entity.
func (*CountryUpdateOne) ClearRegions ¶
func (cuo *CountryUpdateOne) ClearRegions() *CountryUpdateOne
ClearRegions clears all "regions" edges to the Region entity.
func (*CountryUpdateOne) Exec ¶
func (cuo *CountryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CountryUpdateOne) ExecX ¶
func (cuo *CountryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryUpdateOne) Mutation ¶
func (cuo *CountryUpdateOne) Mutation() *CountryMutation
Mutation returns the CountryMutation object of the builder.
func (*CountryUpdateOne) RemoveCities ¶
func (cuo *CountryUpdateOne) RemoveCities(c ...*City) *CountryUpdateOne
RemoveCities removes "cities" edges to City entities.
func (*CountryUpdateOne) RemoveCityIDs ¶
func (cuo *CountryUpdateOne) RemoveCityIDs(ids ...uuid.UUID) *CountryUpdateOne
RemoveCityIDs removes the "cities" edge to City entities by IDs.
func (*CountryUpdateOne) RemoveRegionIDs ¶
func (cuo *CountryUpdateOne) RemoveRegionIDs(ids ...uuid.UUID) *CountryUpdateOne
RemoveRegionIDs removes the "regions" edge to Region entities by IDs.
func (*CountryUpdateOne) RemoveRegions ¶
func (cuo *CountryUpdateOne) RemoveRegions(r ...*Region) *CountryUpdateOne
RemoveRegions removes "regions" edges to Region entities.
func (*CountryUpdateOne) Save ¶
func (cuo *CountryUpdateOne) Save(ctx context.Context) (*Country, error)
Save executes the query and returns the updated Country entity.
func (*CountryUpdateOne) SaveX ¶
func (cuo *CountryUpdateOne) SaveX(ctx context.Context) *Country
SaveX is like Save, but panics if an error occurs.
func (*CountryUpdateOne) Select ¶
func (cuo *CountryUpdateOne) Select(field string, fields ...string) *CountryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CountryUpdateOne) SetCode ¶
func (cuo *CountryUpdateOne) SetCode(s string) *CountryUpdateOne
SetCode sets the "code" field.
func (*CountryUpdateOne) SetCreatedAt ¶
func (cuo *CountryUpdateOne) SetCreatedAt(t time.Time) *CountryUpdateOne
SetCreatedAt sets the "created_at" field.
func (*CountryUpdateOne) SetName ¶
func (cuo *CountryUpdateOne) SetName(s string) *CountryUpdateOne
SetName sets the "name" field.
func (*CountryUpdateOne) SetNillableCode ¶
func (cuo *CountryUpdateOne) SetNillableCode(s *string) *CountryUpdateOne
SetNillableCode sets the "code" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableCreatedAt ¶
func (cuo *CountryUpdateOne) SetNillableCreatedAt(t *time.Time) *CountryUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableName ¶
func (cuo *CountryUpdateOne) SetNillableName(s *string) *CountryUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*CountryUpdateOne) SetUpdatedAt ¶
func (cuo *CountryUpdateOne) SetUpdatedAt(t time.Time) *CountryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CountryUpdateOne) Where ¶
func (cuo *CountryUpdateOne) Where(ps ...predicate.Country) *CountryUpdateOne
Where appends a list predicates to the CountryUpdate builder.
type File ¶
type File struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // ResourceType holds the value of the "resource_type" field. ResourceType string `json:"resource_type,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FileQuery when eager-loading is set. Edges FileEdges `json:"edges"` // contains filtered or unexported fields }
File is the model entity for the File schema.
func (*File) QueryChats ¶
QueryChats queries the "chats" edge of the File entity.
func (*File) QueryMessages ¶
func (f *File) QueryMessages() *MessageQuery
QueryMessages queries the "messages" edge of the File entity.
func (*File) QueryPosts ¶
QueryPosts queries the "posts" edge of the File entity.
func (*File) QueryUsers ¶
QueryUsers queries the "users" edge of the File entity.
func (*File) Unwrap ¶
Unwrap unwraps the File 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 (*File) Update ¶
func (f *File) Update() *FileUpdateOne
Update returns a builder for updating this File. Note that you need to call File.Unwrap() before calling this method if this File was returned from a transaction, and the transaction was committed or rolled back.
type FileClient ¶
type FileClient struct {
// contains filtered or unexported fields
}
FileClient is a client for the File schema.
func NewFileClient ¶
func NewFileClient(c config) *FileClient
NewFileClient returns a client for the File from the given config.
func (*FileClient) Create ¶
func (c *FileClient) Create() *FileCreate
Create returns a builder for creating a File entity.
func (*FileClient) CreateBulk ¶
func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
CreateBulk returns a builder for creating a bulk of File entities.
func (*FileClient) Delete ¶
func (c *FileClient) Delete() *FileDelete
Delete returns a delete builder for File.
func (*FileClient) DeleteOne ¶
func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FileClient) DeleteOneID ¶
func (c *FileClient) DeleteOneID(id uuid.UUID) *FileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FileClient) Intercept ¶
func (c *FileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `file.Intercept(f(g(h())))`.
func (*FileClient) Interceptors ¶
func (c *FileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FileClient) MapCreateBulk ¶
func (c *FileClient) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*FileClient) Query ¶
func (c *FileClient) Query() *FileQuery
Query returns a query builder for File.
func (*FileClient) QueryChats ¶
func (c *FileClient) QueryChats(f *File) *ChatQuery
QueryChats queries the chats edge of a File.
func (*FileClient) QueryMessages ¶
func (c *FileClient) QueryMessages(f *File) *MessageQuery
QueryMessages queries the messages edge of a File.
func (*FileClient) QueryPosts ¶
func (c *FileClient) QueryPosts(f *File) *PostQuery
QueryPosts queries the posts edge of a File.
func (*FileClient) QueryUsers ¶
func (c *FileClient) QueryUsers(f *File) *UserQuery
QueryUsers queries the users edge of a File.
func (*FileClient) Update ¶
func (c *FileClient) Update() *FileUpdate
Update returns an update builder for File.
func (*FileClient) UpdateOne ¶
func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FileClient) UpdateOneID ¶
func (c *FileClient) UpdateOneID(id uuid.UUID) *FileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FileClient) Use ¶
func (c *FileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `file.Hooks(f(g(h())))`.
type FileCreate ¶
type FileCreate struct {
// contains filtered or unexported fields
}
FileCreate is the builder for creating a File entity.
func (*FileCreate) AddChatIDs ¶
func (fc *FileCreate) AddChatIDs(ids ...uuid.UUID) *FileCreate
AddChatIDs adds the "chats" edge to the Chat entity by IDs.
func (*FileCreate) AddChats ¶
func (fc *FileCreate) AddChats(c ...*Chat) *FileCreate
AddChats adds the "chats" edges to the Chat entity.
func (*FileCreate) AddMessageIDs ¶
func (fc *FileCreate) AddMessageIDs(ids ...uuid.UUID) *FileCreate
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*FileCreate) AddMessages ¶
func (fc *FileCreate) AddMessages(m ...*Message) *FileCreate
AddMessages adds the "messages" edges to the Message entity.
func (*FileCreate) AddPostIDs ¶
func (fc *FileCreate) AddPostIDs(ids ...uuid.UUID) *FileCreate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*FileCreate) AddPosts ¶
func (fc *FileCreate) AddPosts(p ...*Post) *FileCreate
AddPosts adds the "posts" edges to the Post entity.
func (*FileCreate) AddUserIDs ¶
func (fc *FileCreate) AddUserIDs(ids ...uuid.UUID) *FileCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*FileCreate) AddUsers ¶
func (fc *FileCreate) AddUsers(u ...*User) *FileCreate
AddUsers adds the "users" edges to the User entity.
func (*FileCreate) Exec ¶
func (fc *FileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreate) ExecX ¶
func (fc *FileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreate) Mutation ¶
func (fc *FileCreate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileCreate) Save ¶
func (fc *FileCreate) Save(ctx context.Context) (*File, error)
Save creates the File in the database.
func (*FileCreate) SaveX ¶
func (fc *FileCreate) SaveX(ctx context.Context) *File
SaveX calls Save and panics if Save returns an error.
func (*FileCreate) SetCreatedAt ¶
func (fc *FileCreate) SetCreatedAt(t time.Time) *FileCreate
SetCreatedAt sets the "created_at" field.
func (*FileCreate) SetID ¶
func (fc *FileCreate) SetID(u uuid.UUID) *FileCreate
SetID sets the "id" field.
func (*FileCreate) SetNillableCreatedAt ¶
func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FileCreate) SetNillableID ¶
func (fc *FileCreate) SetNillableID(u *uuid.UUID) *FileCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*FileCreate) SetNillableUpdatedAt ¶
func (fc *FileCreate) SetNillableUpdatedAt(t *time.Time) *FileCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FileCreate) SetResourceType ¶
func (fc *FileCreate) SetResourceType(s string) *FileCreate
SetResourceType sets the "resource_type" field.
func (*FileCreate) SetUpdatedAt ¶
func (fc *FileCreate) SetUpdatedAt(t time.Time) *FileCreate
SetUpdatedAt sets the "updated_at" field.
type FileCreateBulk ¶
type FileCreateBulk struct {
// contains filtered or unexported fields
}
FileCreateBulk is the builder for creating many File entities in bulk.
func (*FileCreateBulk) Exec ¶
func (fcb *FileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreateBulk) ExecX ¶
func (fcb *FileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type FileDelete ¶
type FileDelete struct {
// contains filtered or unexported fields
}
FileDelete is the builder for deleting a File entity.
func (*FileDelete) Exec ¶
func (fd *FileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FileDelete) ExecX ¶
func (fd *FileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FileDelete) Where ¶
func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete
Where appends a list predicates to the FileDelete builder.
type FileDeleteOne ¶
type FileDeleteOne struct {
// contains filtered or unexported fields
}
FileDeleteOne is the builder for deleting a single File entity.
func (*FileDeleteOne) Exec ¶
func (fdo *FileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FileDeleteOne) ExecX ¶
func (fdo *FileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileDeleteOne) Where ¶
func (fdo *FileDeleteOne) Where(ps ...predicate.File) *FileDeleteOne
Where appends a list predicates to the FileDelete builder.
type FileEdges ¶
type FileEdges struct { // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // Posts holds the value of the posts edge. Posts []*Post `json:"posts,omitempty"` // Chats holds the value of the chats edge. Chats []*Chat `json:"chats,omitempty"` // Messages holds the value of the messages edge. Messages []*Message `json:"messages,omitempty"` // contains filtered or unexported fields }
FileEdges holds the relations/edges for other nodes in the graph.
func (FileEdges) ChatsOrErr ¶
ChatsOrErr returns the Chats value or an error if the edge was not loaded in eager-loading.
func (FileEdges) MessagesOrErr ¶
MessagesOrErr returns the Messages value or an error if the edge was not loaded in eager-loading.
func (FileEdges) PostsOrErr ¶
PostsOrErr returns the Posts value or an error if the edge was not loaded in eager-loading.
func (FileEdges) UsersOrErr ¶
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type FileGroupBy ¶
type FileGroupBy struct {
// contains filtered or unexported fields
}
FileGroupBy is the group-by builder for File entities.
func (*FileGroupBy) Aggregate ¶
func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Scan ¶
func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileMutation ¶
type FileMutation struct {
// contains filtered or unexported fields
}
FileMutation represents an operation that mutates the File nodes in the graph.
func (*FileMutation) AddChatIDs ¶
func (m *FileMutation) AddChatIDs(ids ...uuid.UUID)
AddChatIDs adds the "chats" edge to the Chat entity by ids.
func (*FileMutation) AddField ¶
func (m *FileMutation) 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 (*FileMutation) AddMessageIDs ¶
func (m *FileMutation) AddMessageIDs(ids ...uuid.UUID)
AddMessageIDs adds the "messages" edge to the Message entity by ids.
func (*FileMutation) AddPostIDs ¶
func (m *FileMutation) AddPostIDs(ids ...uuid.UUID)
AddPostIDs adds the "posts" edge to the Post entity by ids.
func (*FileMutation) AddUserIDs ¶
func (m *FileMutation) AddUserIDs(ids ...uuid.UUID)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*FileMutation) AddedEdges ¶
func (m *FileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FileMutation) AddedField ¶
func (m *FileMutation) 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 (*FileMutation) AddedFields ¶
func (m *FileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FileMutation) AddedIDs ¶
func (m *FileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FileMutation) ChatsCleared ¶
func (m *FileMutation) ChatsCleared() bool
ChatsCleared reports if the "chats" edge to the Chat entity was cleared.
func (*FileMutation) ChatsIDs ¶
func (m *FileMutation) ChatsIDs() (ids []uuid.UUID)
ChatsIDs returns the "chats" edge IDs in the mutation.
func (*FileMutation) ClearChats ¶
func (m *FileMutation) ClearChats()
ClearChats clears the "chats" edge to the Chat entity.
func (*FileMutation) ClearEdge ¶
func (m *FileMutation) 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 (*FileMutation) ClearField ¶
func (m *FileMutation) 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 (*FileMutation) ClearMessages ¶
func (m *FileMutation) ClearMessages()
ClearMessages clears the "messages" edge to the Message entity.
func (*FileMutation) ClearPosts ¶
func (m *FileMutation) ClearPosts()
ClearPosts clears the "posts" edge to the Post entity.
func (*FileMutation) ClearUsers ¶
func (m *FileMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*FileMutation) ClearedEdges ¶
func (m *FileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FileMutation) ClearedFields ¶
func (m *FileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FileMutation) Client ¶
func (m FileMutation) 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 (*FileMutation) CreatedAt ¶
func (m *FileMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FileMutation) EdgeCleared ¶
func (m *FileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FileMutation) Field ¶
func (m *FileMutation) 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 (*FileMutation) FieldCleared ¶
func (m *FileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FileMutation) Fields ¶
func (m *FileMutation) 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 (*FileMutation) ID ¶
func (m *FileMutation) 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 (*FileMutation) 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 (*FileMutation) MessagesCleared ¶
func (m *FileMutation) MessagesCleared() bool
MessagesCleared reports if the "messages" edge to the Message entity was cleared.
func (*FileMutation) MessagesIDs ¶
func (m *FileMutation) MessagesIDs() (ids []uuid.UUID)
MessagesIDs returns the "messages" edge IDs in the mutation.
func (*FileMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the File entity. If the File 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 (*FileMutation) 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 (*FileMutation) OldResourceType ¶
func (m *FileMutation) OldResourceType(ctx context.Context) (v string, err error)
OldResourceType returns the old "resource_type" field's value of the File entity. If the File 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 (*FileMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the File entity. If the File 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 (*FileMutation) PostsCleared ¶
func (m *FileMutation) PostsCleared() bool
PostsCleared reports if the "posts" edge to the Post entity was cleared.
func (*FileMutation) PostsIDs ¶
func (m *FileMutation) PostsIDs() (ids []uuid.UUID)
PostsIDs returns the "posts" edge IDs in the mutation.
func (*FileMutation) RemoveChatIDs ¶
func (m *FileMutation) RemoveChatIDs(ids ...uuid.UUID)
RemoveChatIDs removes the "chats" edge to the Chat entity by IDs.
func (*FileMutation) RemoveMessageIDs ¶
func (m *FileMutation) RemoveMessageIDs(ids ...uuid.UUID)
RemoveMessageIDs removes the "messages" edge to the Message entity by IDs.
func (*FileMutation) RemovePostIDs ¶
func (m *FileMutation) RemovePostIDs(ids ...uuid.UUID)
RemovePostIDs removes the "posts" edge to the Post entity by IDs.
func (*FileMutation) RemoveUserIDs ¶
func (m *FileMutation) RemoveUserIDs(ids ...uuid.UUID)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*FileMutation) RemovedChatsIDs ¶
func (m *FileMutation) RemovedChatsIDs() (ids []uuid.UUID)
RemovedChats returns the removed IDs of the "chats" edge to the Chat entity.
func (*FileMutation) RemovedEdges ¶
func (m *FileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FileMutation) RemovedIDs ¶
func (m *FileMutation) 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 (*FileMutation) RemovedMessagesIDs ¶
func (m *FileMutation) RemovedMessagesIDs() (ids []uuid.UUID)
RemovedMessages returns the removed IDs of the "messages" edge to the Message entity.
func (*FileMutation) RemovedPostsIDs ¶
func (m *FileMutation) RemovedPostsIDs() (ids []uuid.UUID)
RemovedPosts returns the removed IDs of the "posts" edge to the Post entity.
func (*FileMutation) RemovedUsersIDs ¶
func (m *FileMutation) RemovedUsersIDs() (ids []uuid.UUID)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*FileMutation) ResetChats ¶
func (m *FileMutation) ResetChats()
ResetChats resets all changes to the "chats" edge.
func (*FileMutation) ResetCreatedAt ¶
func (m *FileMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FileMutation) ResetEdge ¶
func (m *FileMutation) 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 (*FileMutation) ResetField ¶
func (m *FileMutation) 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 (*FileMutation) ResetMessages ¶
func (m *FileMutation) ResetMessages()
ResetMessages resets all changes to the "messages" edge.
func (*FileMutation) ResetPosts ¶
func (m *FileMutation) ResetPosts()
ResetPosts resets all changes to the "posts" edge.
func (*FileMutation) ResetResourceType ¶
func (m *FileMutation) ResetResourceType()
ResetResourceType resets all changes to the "resource_type" field.
func (*FileMutation) ResetUpdatedAt ¶
func (m *FileMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FileMutation) ResetUsers ¶
func (m *FileMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*FileMutation) ResourceType ¶
func (m *FileMutation) ResourceType() (r string, exists bool)
ResourceType returns the value of the "resource_type" field in the mutation.
func (*FileMutation) SetCreatedAt ¶
func (m *FileMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FileMutation) SetField ¶
func (m *FileMutation) 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 (*FileMutation) SetID ¶
func (m *FileMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of File entities.
func (*FileMutation) SetOp ¶
func (m *FileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FileMutation) SetResourceType ¶
func (m *FileMutation) SetResourceType(s string)
SetResourceType sets the "resource_type" field.
func (*FileMutation) SetUpdatedAt ¶
func (m *FileMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (FileMutation) Tx ¶
func (m FileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FileMutation) Type ¶
func (m *FileMutation) Type() string
Type returns the node type of this mutation (File).
func (*FileMutation) UpdatedAt ¶
func (m *FileMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*FileMutation) UsersCleared ¶
func (m *FileMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*FileMutation) UsersIDs ¶
func (m *FileMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the "users" edge IDs in the mutation.
func (*FileMutation) Where ¶
func (m *FileMutation) Where(ps ...predicate.File)
Where appends a list predicates to the FileMutation builder.
func (*FileMutation) WhereP ¶
func (m *FileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FileQuery ¶
type FileQuery struct {
// contains filtered or unexported fields
}
FileQuery is the builder for querying File entities.
func (*FileQuery) Aggregate ¶
func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate returns a FileSelect configured with the given aggregations.
func (*FileQuery) Clone ¶
Clone returns a duplicate of the FileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FileQuery) First ¶
First returns the first File entity from the query. Returns a *NotFoundError when no File was found.
func (*FileQuery) FirstID ¶
FirstID returns the first File ID from the query. Returns a *NotFoundError when no File ID was found.
func (*FileQuery) GroupBy ¶
func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.File.Query(). GroupBy(file.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FileQuery) Only ¶
Only returns a single File entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one File entity is found. Returns a *NotFoundError when no File entities are found.
func (*FileQuery) OnlyID ¶
OnlyID is like Only, but returns the only File ID in the query. Returns a *NotSingularError when more than one File ID is found. Returns a *NotFoundError when no entities are found.
func (*FileQuery) Order ¶
func (fq *FileQuery) Order(o ...file.OrderOption) *FileQuery
Order specifies how the records should be ordered.
func (*FileQuery) QueryChats ¶
QueryChats chains the current query on the "chats" edge.
func (*FileQuery) QueryMessages ¶
func (fq *FileQuery) QueryMessages() *MessageQuery
QueryMessages chains the current query on the "messages" edge.
func (*FileQuery) QueryPosts ¶
QueryPosts chains the current query on the "posts" edge.
func (*FileQuery) QueryUsers ¶
QueryUsers chains the current query on the "users" edge.
func (*FileQuery) Select ¶
func (fq *FileQuery) Select(fields ...string) *FileSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.File.Query(). Select(file.FieldCreatedAt). Scan(ctx, &v)
func (*FileQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*FileQuery) WithChats ¶
WithChats tells the query-builder to eager-load the nodes that are connected to the "chats" edge. The optional arguments are used to configure the query builder of the edge.
func (*FileQuery) WithMessages ¶
func (fq *FileQuery) WithMessages(opts ...func(*MessageQuery)) *FileQuery
WithMessages tells the query-builder to eager-load the nodes that are connected to the "messages" edge. The optional arguments are used to configure the query builder of the edge.
type FileSelect ¶
type FileSelect struct { *FileQuery // contains filtered or unexported fields }
FileSelect is the builder for selecting fields of File entities.
func (*FileSelect) Aggregate ¶
func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileSelect) Scan ¶
func (fs *FileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileUpdate ¶
type FileUpdate struct {
// contains filtered or unexported fields
}
FileUpdate is the builder for updating File entities.
func (*FileUpdate) AddChatIDs ¶
func (fu *FileUpdate) AddChatIDs(ids ...uuid.UUID) *FileUpdate
AddChatIDs adds the "chats" edge to the Chat entity by IDs.
func (*FileUpdate) AddChats ¶
func (fu *FileUpdate) AddChats(c ...*Chat) *FileUpdate
AddChats adds the "chats" edges to the Chat entity.
func (*FileUpdate) AddMessageIDs ¶
func (fu *FileUpdate) AddMessageIDs(ids ...uuid.UUID) *FileUpdate
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*FileUpdate) AddMessages ¶
func (fu *FileUpdate) AddMessages(m ...*Message) *FileUpdate
AddMessages adds the "messages" edges to the Message entity.
func (*FileUpdate) AddPostIDs ¶
func (fu *FileUpdate) AddPostIDs(ids ...uuid.UUID) *FileUpdate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*FileUpdate) AddPosts ¶
func (fu *FileUpdate) AddPosts(p ...*Post) *FileUpdate
AddPosts adds the "posts" edges to the Post entity.
func (*FileUpdate) AddUserIDs ¶
func (fu *FileUpdate) AddUserIDs(ids ...uuid.UUID) *FileUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*FileUpdate) AddUsers ¶
func (fu *FileUpdate) AddUsers(u ...*User) *FileUpdate
AddUsers adds the "users" edges to the User entity.
func (*FileUpdate) ClearChats ¶
func (fu *FileUpdate) ClearChats() *FileUpdate
ClearChats clears all "chats" edges to the Chat entity.
func (*FileUpdate) ClearMessages ¶
func (fu *FileUpdate) ClearMessages() *FileUpdate
ClearMessages clears all "messages" edges to the Message entity.
func (*FileUpdate) ClearPosts ¶
func (fu *FileUpdate) ClearPosts() *FileUpdate
ClearPosts clears all "posts" edges to the Post entity.
func (*FileUpdate) ClearUsers ¶
func (fu *FileUpdate) ClearUsers() *FileUpdate
ClearUsers clears all "users" edges to the User entity.
func (*FileUpdate) Exec ¶
func (fu *FileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpdate) ExecX ¶
func (fu *FileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdate) Mutation ¶
func (fu *FileUpdate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdate) RemoveChatIDs ¶
func (fu *FileUpdate) RemoveChatIDs(ids ...uuid.UUID) *FileUpdate
RemoveChatIDs removes the "chats" edge to Chat entities by IDs.
func (*FileUpdate) RemoveChats ¶
func (fu *FileUpdate) RemoveChats(c ...*Chat) *FileUpdate
RemoveChats removes "chats" edges to Chat entities.
func (*FileUpdate) RemoveMessageIDs ¶
func (fu *FileUpdate) RemoveMessageIDs(ids ...uuid.UUID) *FileUpdate
RemoveMessageIDs removes the "messages" edge to Message entities by IDs.
func (*FileUpdate) RemoveMessages ¶
func (fu *FileUpdate) RemoveMessages(m ...*Message) *FileUpdate
RemoveMessages removes "messages" edges to Message entities.
func (*FileUpdate) RemovePostIDs ¶
func (fu *FileUpdate) RemovePostIDs(ids ...uuid.UUID) *FileUpdate
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*FileUpdate) RemovePosts ¶
func (fu *FileUpdate) RemovePosts(p ...*Post) *FileUpdate
RemovePosts removes "posts" edges to Post entities.
func (*FileUpdate) RemoveUserIDs ¶
func (fu *FileUpdate) RemoveUserIDs(ids ...uuid.UUID) *FileUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*FileUpdate) RemoveUsers ¶
func (fu *FileUpdate) RemoveUsers(u ...*User) *FileUpdate
RemoveUsers removes "users" edges to User entities.
func (*FileUpdate) Save ¶
func (fu *FileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FileUpdate) SaveX ¶
func (fu *FileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FileUpdate) SetCreatedAt ¶
func (fu *FileUpdate) SetCreatedAt(t time.Time) *FileUpdate
SetCreatedAt sets the "created_at" field.
func (*FileUpdate) SetNillableCreatedAt ¶
func (fu *FileUpdate) SetNillableCreatedAt(t *time.Time) *FileUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FileUpdate) SetNillableResourceType ¶
func (fu *FileUpdate) SetNillableResourceType(s *string) *FileUpdate
SetNillableResourceType sets the "resource_type" field if the given value is not nil.
func (*FileUpdate) SetResourceType ¶
func (fu *FileUpdate) SetResourceType(s string) *FileUpdate
SetResourceType sets the "resource_type" field.
func (*FileUpdate) SetUpdatedAt ¶
func (fu *FileUpdate) SetUpdatedAt(t time.Time) *FileUpdate
SetUpdatedAt sets the "updated_at" field.
func (*FileUpdate) Where ¶
func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
Where appends a list predicates to the FileUpdate builder.
type FileUpdateOne ¶
type FileUpdateOne struct {
// contains filtered or unexported fields
}
FileUpdateOne is the builder for updating a single File entity.
func (*FileUpdateOne) AddChatIDs ¶
func (fuo *FileUpdateOne) AddChatIDs(ids ...uuid.UUID) *FileUpdateOne
AddChatIDs adds the "chats" edge to the Chat entity by IDs.
func (*FileUpdateOne) AddChats ¶
func (fuo *FileUpdateOne) AddChats(c ...*Chat) *FileUpdateOne
AddChats adds the "chats" edges to the Chat entity.
func (*FileUpdateOne) AddMessageIDs ¶
func (fuo *FileUpdateOne) AddMessageIDs(ids ...uuid.UUID) *FileUpdateOne
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*FileUpdateOne) AddMessages ¶
func (fuo *FileUpdateOne) AddMessages(m ...*Message) *FileUpdateOne
AddMessages adds the "messages" edges to the Message entity.
func (*FileUpdateOne) AddPostIDs ¶
func (fuo *FileUpdateOne) AddPostIDs(ids ...uuid.UUID) *FileUpdateOne
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*FileUpdateOne) AddPosts ¶
func (fuo *FileUpdateOne) AddPosts(p ...*Post) *FileUpdateOne
AddPosts adds the "posts" edges to the Post entity.
func (*FileUpdateOne) AddUserIDs ¶
func (fuo *FileUpdateOne) AddUserIDs(ids ...uuid.UUID) *FileUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*FileUpdateOne) AddUsers ¶
func (fuo *FileUpdateOne) AddUsers(u ...*User) *FileUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*FileUpdateOne) ClearChats ¶
func (fuo *FileUpdateOne) ClearChats() *FileUpdateOne
ClearChats clears all "chats" edges to the Chat entity.
func (*FileUpdateOne) ClearMessages ¶
func (fuo *FileUpdateOne) ClearMessages() *FileUpdateOne
ClearMessages clears all "messages" edges to the Message entity.
func (*FileUpdateOne) ClearPosts ¶
func (fuo *FileUpdateOne) ClearPosts() *FileUpdateOne
ClearPosts clears all "posts" edges to the Post entity.
func (*FileUpdateOne) ClearUsers ¶
func (fuo *FileUpdateOne) ClearUsers() *FileUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*FileUpdateOne) Exec ¶
func (fuo *FileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FileUpdateOne) ExecX ¶
func (fuo *FileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdateOne) Mutation ¶
func (fuo *FileUpdateOne) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdateOne) RemoveChatIDs ¶
func (fuo *FileUpdateOne) RemoveChatIDs(ids ...uuid.UUID) *FileUpdateOne
RemoveChatIDs removes the "chats" edge to Chat entities by IDs.
func (*FileUpdateOne) RemoveChats ¶
func (fuo *FileUpdateOne) RemoveChats(c ...*Chat) *FileUpdateOne
RemoveChats removes "chats" edges to Chat entities.
func (*FileUpdateOne) RemoveMessageIDs ¶
func (fuo *FileUpdateOne) RemoveMessageIDs(ids ...uuid.UUID) *FileUpdateOne
RemoveMessageIDs removes the "messages" edge to Message entities by IDs.
func (*FileUpdateOne) RemoveMessages ¶
func (fuo *FileUpdateOne) RemoveMessages(m ...*Message) *FileUpdateOne
RemoveMessages removes "messages" edges to Message entities.
func (*FileUpdateOne) RemovePostIDs ¶
func (fuo *FileUpdateOne) RemovePostIDs(ids ...uuid.UUID) *FileUpdateOne
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*FileUpdateOne) RemovePosts ¶
func (fuo *FileUpdateOne) RemovePosts(p ...*Post) *FileUpdateOne
RemovePosts removes "posts" edges to Post entities.
func (*FileUpdateOne) RemoveUserIDs ¶
func (fuo *FileUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *FileUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*FileUpdateOne) RemoveUsers ¶
func (fuo *FileUpdateOne) RemoveUsers(u ...*User) *FileUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*FileUpdateOne) Save ¶
func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
Save executes the query and returns the updated File entity.
func (*FileUpdateOne) SaveX ¶
func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
SaveX is like Save, but panics if an error occurs.
func (*FileUpdateOne) Select ¶
func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FileUpdateOne) SetCreatedAt ¶
func (fuo *FileUpdateOne) SetCreatedAt(t time.Time) *FileUpdateOne
SetCreatedAt sets the "created_at" field.
func (*FileUpdateOne) SetNillableCreatedAt ¶
func (fuo *FileUpdateOne) SetNillableCreatedAt(t *time.Time) *FileUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FileUpdateOne) SetNillableResourceType ¶
func (fuo *FileUpdateOne) SetNillableResourceType(s *string) *FileUpdateOne
SetNillableResourceType sets the "resource_type" field if the given value is not nil.
func (*FileUpdateOne) SetResourceType ¶
func (fuo *FileUpdateOne) SetResourceType(s string) *FileUpdateOne
SetResourceType sets the "resource_type" field.
func (*FileUpdateOne) SetUpdatedAt ¶
func (fuo *FileUpdateOne) SetUpdatedAt(t time.Time) *FileUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*FileUpdateOne) Where ¶
func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
Where appends a list predicates to the FileUpdate builder.
type Friend ¶
type Friend struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // RequesterID holds the value of the "requester_id" field. RequesterID uuid.UUID `json:"requester_id,omitempty"` // RequesteeID holds the value of the "requestee_id" field. RequesteeID uuid.UUID `json:"requestee_id,omitempty"` // Status holds the value of the "status" field. Status friend.Status `json:"status,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FriendQuery when eager-loading is set. Edges FriendEdges `json:"edges"` // contains filtered or unexported fields }
Friend is the model entity for the Friend schema.
func (*Friend) QueryRequestee ¶
QueryRequestee queries the "requestee" edge of the Friend entity.
func (*Friend) QueryRequester ¶
QueryRequester queries the "requester" edge of the Friend entity.
func (*Friend) Unwrap ¶
Unwrap unwraps the Friend 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 (*Friend) Update ¶
func (f *Friend) Update() *FriendUpdateOne
Update returns a builder for updating this Friend. Note that you need to call Friend.Unwrap() before calling this method if this Friend was returned from a transaction, and the transaction was committed or rolled back.
type FriendClient ¶
type FriendClient struct {
// contains filtered or unexported fields
}
FriendClient is a client for the Friend schema.
func NewFriendClient ¶
func NewFriendClient(c config) *FriendClient
NewFriendClient returns a client for the Friend from the given config.
func (*FriendClient) Create ¶
func (c *FriendClient) Create() *FriendCreate
Create returns a builder for creating a Friend entity.
func (*FriendClient) CreateBulk ¶
func (c *FriendClient) CreateBulk(builders ...*FriendCreate) *FriendCreateBulk
CreateBulk returns a builder for creating a bulk of Friend entities.
func (*FriendClient) Delete ¶
func (c *FriendClient) Delete() *FriendDelete
Delete returns a delete builder for Friend.
func (*FriendClient) DeleteOne ¶
func (c *FriendClient) DeleteOne(f *Friend) *FriendDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FriendClient) DeleteOneID ¶
func (c *FriendClient) DeleteOneID(id uuid.UUID) *FriendDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FriendClient) Intercept ¶
func (c *FriendClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `friend.Intercept(f(g(h())))`.
func (*FriendClient) Interceptors ¶
func (c *FriendClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FriendClient) MapCreateBulk ¶
func (c *FriendClient) MapCreateBulk(slice any, setFunc func(*FriendCreate, int)) *FriendCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*FriendClient) Query ¶
func (c *FriendClient) Query() *FriendQuery
Query returns a query builder for Friend.
func (*FriendClient) QueryRequestee ¶
func (c *FriendClient) QueryRequestee(f *Friend) *UserQuery
QueryRequestee queries the requestee edge of a Friend.
func (*FriendClient) QueryRequester ¶
func (c *FriendClient) QueryRequester(f *Friend) *UserQuery
QueryRequester queries the requester edge of a Friend.
func (*FriendClient) Update ¶
func (c *FriendClient) Update() *FriendUpdate
Update returns an update builder for Friend.
func (*FriendClient) UpdateOne ¶
func (c *FriendClient) UpdateOne(f *Friend) *FriendUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FriendClient) UpdateOneID ¶
func (c *FriendClient) UpdateOneID(id uuid.UUID) *FriendUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FriendClient) Use ¶
func (c *FriendClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `friend.Hooks(f(g(h())))`.
type FriendCreate ¶
type FriendCreate struct {
// contains filtered or unexported fields
}
FriendCreate is the builder for creating a Friend entity.
func (*FriendCreate) Exec ¶
func (fc *FriendCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FriendCreate) ExecX ¶
func (fc *FriendCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendCreate) Mutation ¶
func (fc *FriendCreate) Mutation() *FriendMutation
Mutation returns the FriendMutation object of the builder.
func (*FriendCreate) Save ¶
func (fc *FriendCreate) Save(ctx context.Context) (*Friend, error)
Save creates the Friend in the database.
func (*FriendCreate) SaveX ¶
func (fc *FriendCreate) SaveX(ctx context.Context) *Friend
SaveX calls Save and panics if Save returns an error.
func (*FriendCreate) SetCreatedAt ¶
func (fc *FriendCreate) SetCreatedAt(t time.Time) *FriendCreate
SetCreatedAt sets the "created_at" field.
func (*FriendCreate) SetID ¶
func (fc *FriendCreate) SetID(u uuid.UUID) *FriendCreate
SetID sets the "id" field.
func (*FriendCreate) SetNillableCreatedAt ¶
func (fc *FriendCreate) SetNillableCreatedAt(t *time.Time) *FriendCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FriendCreate) SetNillableID ¶
func (fc *FriendCreate) SetNillableID(u *uuid.UUID) *FriendCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*FriendCreate) SetNillableStatus ¶
func (fc *FriendCreate) SetNillableStatus(f *friend.Status) *FriendCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*FriendCreate) SetNillableUpdatedAt ¶
func (fc *FriendCreate) SetNillableUpdatedAt(t *time.Time) *FriendCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FriendCreate) SetRequestee ¶
func (fc *FriendCreate) SetRequestee(u *User) *FriendCreate
SetRequestee sets the "requestee" edge to the User entity.
func (*FriendCreate) SetRequesteeID ¶
func (fc *FriendCreate) SetRequesteeID(u uuid.UUID) *FriendCreate
SetRequesteeID sets the "requestee_id" field.
func (*FriendCreate) SetRequester ¶
func (fc *FriendCreate) SetRequester(u *User) *FriendCreate
SetRequester sets the "requester" edge to the User entity.
func (*FriendCreate) SetRequesterID ¶
func (fc *FriendCreate) SetRequesterID(u uuid.UUID) *FriendCreate
SetRequesterID sets the "requester_id" field.
func (*FriendCreate) SetStatus ¶
func (fc *FriendCreate) SetStatus(f friend.Status) *FriendCreate
SetStatus sets the "status" field.
func (*FriendCreate) SetUpdatedAt ¶
func (fc *FriendCreate) SetUpdatedAt(t time.Time) *FriendCreate
SetUpdatedAt sets the "updated_at" field.
type FriendCreateBulk ¶
type FriendCreateBulk struct {
// contains filtered or unexported fields
}
FriendCreateBulk is the builder for creating many Friend entities in bulk.
func (*FriendCreateBulk) Exec ¶
func (fcb *FriendCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FriendCreateBulk) ExecX ¶
func (fcb *FriendCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type FriendDelete ¶
type FriendDelete struct {
// contains filtered or unexported fields
}
FriendDelete is the builder for deleting a Friend entity.
func (*FriendDelete) Exec ¶
func (fd *FriendDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FriendDelete) ExecX ¶
func (fd *FriendDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FriendDelete) Where ¶
func (fd *FriendDelete) Where(ps ...predicate.Friend) *FriendDelete
Where appends a list predicates to the FriendDelete builder.
type FriendDeleteOne ¶
type FriendDeleteOne struct {
// contains filtered or unexported fields
}
FriendDeleteOne is the builder for deleting a single Friend entity.
func (*FriendDeleteOne) Exec ¶
func (fdo *FriendDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FriendDeleteOne) ExecX ¶
func (fdo *FriendDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendDeleteOne) Where ¶
func (fdo *FriendDeleteOne) Where(ps ...predicate.Friend) *FriendDeleteOne
Where appends a list predicates to the FriendDelete builder.
type FriendEdges ¶
type FriendEdges struct { // Requester holds the value of the requester edge. Requester *User `json:"requester,omitempty"` // Requestee holds the value of the requestee edge. Requestee *User `json:"requestee,omitempty"` // contains filtered or unexported fields }
FriendEdges holds the relations/edges for other nodes in the graph.
func (FriendEdges) RequesteeOrErr ¶
func (e FriendEdges) RequesteeOrErr() (*User, error)
RequesteeOrErr returns the Requestee value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (FriendEdges) RequesterOrErr ¶
func (e FriendEdges) RequesterOrErr() (*User, error)
RequesterOrErr returns the Requester value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type FriendGroupBy ¶
type FriendGroupBy struct {
// contains filtered or unexported fields
}
FriendGroupBy is the group-by builder for Friend entities.
func (*FriendGroupBy) Aggregate ¶
func (fgb *FriendGroupBy) Aggregate(fns ...AggregateFunc) *FriendGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FriendGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FriendGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FriendGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FriendGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FriendGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FriendGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FriendGroupBy) Scan ¶
func (fgb *FriendGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FriendGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FriendMutation ¶
type FriendMutation struct {
// contains filtered or unexported fields
}
FriendMutation represents an operation that mutates the Friend nodes in the graph.
func (*FriendMutation) AddField ¶
func (m *FriendMutation) 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 (*FriendMutation) AddedEdges ¶
func (m *FriendMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FriendMutation) AddedField ¶
func (m *FriendMutation) 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 (*FriendMutation) AddedFields ¶
func (m *FriendMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FriendMutation) AddedIDs ¶
func (m *FriendMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FriendMutation) ClearEdge ¶
func (m *FriendMutation) 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 (*FriendMutation) ClearField ¶
func (m *FriendMutation) 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 (*FriendMutation) ClearRequestee ¶
func (m *FriendMutation) ClearRequestee()
ClearRequestee clears the "requestee" edge to the User entity.
func (*FriendMutation) ClearRequester ¶
func (m *FriendMutation) ClearRequester()
ClearRequester clears the "requester" edge to the User entity.
func (*FriendMutation) ClearedEdges ¶
func (m *FriendMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FriendMutation) ClearedFields ¶
func (m *FriendMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FriendMutation) Client ¶
func (m FriendMutation) 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 (*FriendMutation) CreatedAt ¶
func (m *FriendMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FriendMutation) EdgeCleared ¶
func (m *FriendMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FriendMutation) Field ¶
func (m *FriendMutation) 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 (*FriendMutation) FieldCleared ¶
func (m *FriendMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FriendMutation) Fields ¶
func (m *FriendMutation) 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 (*FriendMutation) ID ¶
func (m *FriendMutation) 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 (*FriendMutation) 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 (*FriendMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Friend entity. If the Friend 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 (*FriendMutation) 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 (*FriendMutation) OldRequesteeID ¶
OldRequesteeID returns the old "requestee_id" field's value of the Friend entity. If the Friend 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 (*FriendMutation) OldRequesterID ¶
OldRequesterID returns the old "requester_id" field's value of the Friend entity. If the Friend 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 (*FriendMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Friend entity. If the Friend 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 (*FriendMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Friend entity. If the Friend 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 (*FriendMutation) RemovedEdges ¶
func (m *FriendMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FriendMutation) RemovedIDs ¶
func (m *FriendMutation) 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 (*FriendMutation) RequesteeCleared ¶
func (m *FriendMutation) RequesteeCleared() bool
RequesteeCleared reports if the "requestee" edge to the User entity was cleared.
func (*FriendMutation) RequesteeID ¶
func (m *FriendMutation) RequesteeID() (r uuid.UUID, exists bool)
RequesteeID returns the value of the "requestee_id" field in the mutation.
func (*FriendMutation) RequesteeIDs ¶
func (m *FriendMutation) RequesteeIDs() (ids []uuid.UUID)
RequesteeIDs returns the "requestee" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RequesteeID instead. It exists only for internal usage by the builders.
func (*FriendMutation) RequesterCleared ¶
func (m *FriendMutation) RequesterCleared() bool
RequesterCleared reports if the "requester" edge to the User entity was cleared.
func (*FriendMutation) RequesterID ¶
func (m *FriendMutation) RequesterID() (r uuid.UUID, exists bool)
RequesterID returns the value of the "requester_id" field in the mutation.
func (*FriendMutation) RequesterIDs ¶
func (m *FriendMutation) RequesterIDs() (ids []uuid.UUID)
RequesterIDs returns the "requester" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RequesterID instead. It exists only for internal usage by the builders.
func (*FriendMutation) ResetCreatedAt ¶
func (m *FriendMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FriendMutation) ResetEdge ¶
func (m *FriendMutation) 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 (*FriendMutation) ResetField ¶
func (m *FriendMutation) 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 (*FriendMutation) ResetRequestee ¶
func (m *FriendMutation) ResetRequestee()
ResetRequestee resets all changes to the "requestee" edge.
func (*FriendMutation) ResetRequesteeID ¶
func (m *FriendMutation) ResetRequesteeID()
ResetRequesteeID resets all changes to the "requestee_id" field.
func (*FriendMutation) ResetRequester ¶
func (m *FriendMutation) ResetRequester()
ResetRequester resets all changes to the "requester" edge.
func (*FriendMutation) ResetRequesterID ¶
func (m *FriendMutation) ResetRequesterID()
ResetRequesterID resets all changes to the "requester_id" field.
func (*FriendMutation) ResetStatus ¶
func (m *FriendMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*FriendMutation) ResetUpdatedAt ¶
func (m *FriendMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FriendMutation) SetCreatedAt ¶
func (m *FriendMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FriendMutation) SetField ¶
func (m *FriendMutation) 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 (*FriendMutation) SetID ¶
func (m *FriendMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Friend entities.
func (*FriendMutation) SetOp ¶
func (m *FriendMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FriendMutation) SetRequesteeID ¶
func (m *FriendMutation) SetRequesteeID(u uuid.UUID)
SetRequesteeID sets the "requestee_id" field.
func (*FriendMutation) SetRequesterID ¶
func (m *FriendMutation) SetRequesterID(u uuid.UUID)
SetRequesterID sets the "requester_id" field.
func (*FriendMutation) SetStatus ¶
func (m *FriendMutation) SetStatus(f friend.Status)
SetStatus sets the "status" field.
func (*FriendMutation) SetUpdatedAt ¶
func (m *FriendMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*FriendMutation) Status ¶
func (m *FriendMutation) Status() (r friend.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (FriendMutation) Tx ¶
func (m FriendMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FriendMutation) Type ¶
func (m *FriendMutation) Type() string
Type returns the node type of this mutation (Friend).
func (*FriendMutation) UpdatedAt ¶
func (m *FriendMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*FriendMutation) Where ¶
func (m *FriendMutation) Where(ps ...predicate.Friend)
Where appends a list predicates to the FriendMutation builder.
func (*FriendMutation) WhereP ¶
func (m *FriendMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FriendMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FriendQuery ¶
type FriendQuery struct {
// contains filtered or unexported fields
}
FriendQuery is the builder for querying Friend entities.
func (*FriendQuery) Aggregate ¶
func (fq *FriendQuery) Aggregate(fns ...AggregateFunc) *FriendSelect
Aggregate returns a FriendSelect configured with the given aggregations.
func (*FriendQuery) All ¶
func (fq *FriendQuery) All(ctx context.Context) ([]*Friend, error)
All executes the query and returns a list of Friends.
func (*FriendQuery) AllX ¶
func (fq *FriendQuery) AllX(ctx context.Context) []*Friend
AllX is like All, but panics if an error occurs.
func (*FriendQuery) Clone ¶
func (fq *FriendQuery) Clone() *FriendQuery
Clone returns a duplicate of the FriendQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FriendQuery) Count ¶
func (fq *FriendQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*FriendQuery) CountX ¶
func (fq *FriendQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*FriendQuery) Exist ¶
func (fq *FriendQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*FriendQuery) ExistX ¶
func (fq *FriendQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*FriendQuery) First ¶
func (fq *FriendQuery) First(ctx context.Context) (*Friend, error)
First returns the first Friend entity from the query. Returns a *NotFoundError when no Friend was found.
func (*FriendQuery) FirstID ¶
FirstID returns the first Friend ID from the query. Returns a *NotFoundError when no Friend ID was found.
func (*FriendQuery) FirstIDX ¶
func (fq *FriendQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*FriendQuery) FirstX ¶
func (fq *FriendQuery) FirstX(ctx context.Context) *Friend
FirstX is like First, but panics if an error occurs.
func (*FriendQuery) GroupBy ¶
func (fq *FriendQuery) GroupBy(field string, fields ...string) *FriendGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Friend.Query(). GroupBy(friend.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FriendQuery) IDsX ¶
func (fq *FriendQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*FriendQuery) Limit ¶
func (fq *FriendQuery) Limit(limit int) *FriendQuery
Limit the number of records to be returned by this query.
func (*FriendQuery) Offset ¶
func (fq *FriendQuery) Offset(offset int) *FriendQuery
Offset to start from.
func (*FriendQuery) Only ¶
func (fq *FriendQuery) Only(ctx context.Context) (*Friend, error)
Only returns a single Friend entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Friend entity is found. Returns a *NotFoundError when no Friend entities are found.
func (*FriendQuery) OnlyID ¶
OnlyID is like Only, but returns the only Friend ID in the query. Returns a *NotSingularError when more than one Friend ID is found. Returns a *NotFoundError when no entities are found.
func (*FriendQuery) OnlyIDX ¶
func (fq *FriendQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*FriendQuery) OnlyX ¶
func (fq *FriendQuery) OnlyX(ctx context.Context) *Friend
OnlyX is like Only, but panics if an error occurs.
func (*FriendQuery) Order ¶
func (fq *FriendQuery) Order(o ...friend.OrderOption) *FriendQuery
Order specifies how the records should be ordered.
func (*FriendQuery) QueryRequestee ¶
func (fq *FriendQuery) QueryRequestee() *UserQuery
QueryRequestee chains the current query on the "requestee" edge.
func (*FriendQuery) QueryRequester ¶
func (fq *FriendQuery) QueryRequester() *UserQuery
QueryRequester chains the current query on the "requester" edge.
func (*FriendQuery) Select ¶
func (fq *FriendQuery) Select(fields ...string) *FriendSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Friend.Query(). Select(friend.FieldCreatedAt). Scan(ctx, &v)
func (*FriendQuery) Unique ¶
func (fq *FriendQuery) Unique(unique bool) *FriendQuery
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 (*FriendQuery) Where ¶
func (fq *FriendQuery) Where(ps ...predicate.Friend) *FriendQuery
Where adds a new predicate for the FriendQuery builder.
func (*FriendQuery) WithRequestee ¶
func (fq *FriendQuery) WithRequestee(opts ...func(*UserQuery)) *FriendQuery
WithRequestee tells the query-builder to eager-load the nodes that are connected to the "requestee" edge. The optional arguments are used to configure the query builder of the edge.
func (*FriendQuery) WithRequester ¶
func (fq *FriendQuery) WithRequester(opts ...func(*UserQuery)) *FriendQuery
WithRequester tells the query-builder to eager-load the nodes that are connected to the "requester" edge. The optional arguments are used to configure the query builder of the edge.
type FriendSelect ¶
type FriendSelect struct { *FriendQuery // contains filtered or unexported fields }
FriendSelect is the builder for selecting fields of Friend entities.
func (*FriendSelect) Aggregate ¶
func (fs *FriendSelect) Aggregate(fns ...AggregateFunc) *FriendSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FriendSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FriendSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FriendSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FriendSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FriendSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FriendSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FriendSelect) Scan ¶
func (fs *FriendSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FriendSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FriendUpdate ¶
type FriendUpdate struct {
// contains filtered or unexported fields
}
FriendUpdate is the builder for updating Friend entities.
func (*FriendUpdate) ClearRequestee ¶
func (fu *FriendUpdate) ClearRequestee() *FriendUpdate
ClearRequestee clears the "requestee" edge to the User entity.
func (*FriendUpdate) ClearRequester ¶
func (fu *FriendUpdate) ClearRequester() *FriendUpdate
ClearRequester clears the "requester" edge to the User entity.
func (*FriendUpdate) Exec ¶
func (fu *FriendUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FriendUpdate) ExecX ¶
func (fu *FriendUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendUpdate) Mutation ¶
func (fu *FriendUpdate) Mutation() *FriendMutation
Mutation returns the FriendMutation object of the builder.
func (*FriendUpdate) Save ¶
func (fu *FriendUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FriendUpdate) SaveX ¶
func (fu *FriendUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FriendUpdate) SetCreatedAt ¶
func (fu *FriendUpdate) SetCreatedAt(t time.Time) *FriendUpdate
SetCreatedAt sets the "created_at" field.
func (*FriendUpdate) SetNillableCreatedAt ¶
func (fu *FriendUpdate) SetNillableCreatedAt(t *time.Time) *FriendUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FriendUpdate) SetNillableRequesteeID ¶
func (fu *FriendUpdate) SetNillableRequesteeID(u *uuid.UUID) *FriendUpdate
SetNillableRequesteeID sets the "requestee_id" field if the given value is not nil.
func (*FriendUpdate) SetNillableRequesterID ¶
func (fu *FriendUpdate) SetNillableRequesterID(u *uuid.UUID) *FriendUpdate
SetNillableRequesterID sets the "requester_id" field if the given value is not nil.
func (*FriendUpdate) SetNillableStatus ¶
func (fu *FriendUpdate) SetNillableStatus(f *friend.Status) *FriendUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*FriendUpdate) SetRequestee ¶
func (fu *FriendUpdate) SetRequestee(u *User) *FriendUpdate
SetRequestee sets the "requestee" edge to the User entity.
func (*FriendUpdate) SetRequesteeID ¶
func (fu *FriendUpdate) SetRequesteeID(u uuid.UUID) *FriendUpdate
SetRequesteeID sets the "requestee_id" field.
func (*FriendUpdate) SetRequester ¶
func (fu *FriendUpdate) SetRequester(u *User) *FriendUpdate
SetRequester sets the "requester" edge to the User entity.
func (*FriendUpdate) SetRequesterID ¶
func (fu *FriendUpdate) SetRequesterID(u uuid.UUID) *FriendUpdate
SetRequesterID sets the "requester_id" field.
func (*FriendUpdate) SetStatus ¶
func (fu *FriendUpdate) SetStatus(f friend.Status) *FriendUpdate
SetStatus sets the "status" field.
func (*FriendUpdate) SetUpdatedAt ¶
func (fu *FriendUpdate) SetUpdatedAt(t time.Time) *FriendUpdate
SetUpdatedAt sets the "updated_at" field.
func (*FriendUpdate) Where ¶
func (fu *FriendUpdate) Where(ps ...predicate.Friend) *FriendUpdate
Where appends a list predicates to the FriendUpdate builder.
type FriendUpdateOne ¶
type FriendUpdateOne struct {
// contains filtered or unexported fields
}
FriendUpdateOne is the builder for updating a single Friend entity.
func (*FriendUpdateOne) ClearRequestee ¶
func (fuo *FriendUpdateOne) ClearRequestee() *FriendUpdateOne
ClearRequestee clears the "requestee" edge to the User entity.
func (*FriendUpdateOne) ClearRequester ¶
func (fuo *FriendUpdateOne) ClearRequester() *FriendUpdateOne
ClearRequester clears the "requester" edge to the User entity.
func (*FriendUpdateOne) Exec ¶
func (fuo *FriendUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FriendUpdateOne) ExecX ¶
func (fuo *FriendUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendUpdateOne) Mutation ¶
func (fuo *FriendUpdateOne) Mutation() *FriendMutation
Mutation returns the FriendMutation object of the builder.
func (*FriendUpdateOne) Save ¶
func (fuo *FriendUpdateOne) Save(ctx context.Context) (*Friend, error)
Save executes the query and returns the updated Friend entity.
func (*FriendUpdateOne) SaveX ¶
func (fuo *FriendUpdateOne) SaveX(ctx context.Context) *Friend
SaveX is like Save, but panics if an error occurs.
func (*FriendUpdateOne) Select ¶
func (fuo *FriendUpdateOne) Select(field string, fields ...string) *FriendUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FriendUpdateOne) SetCreatedAt ¶
func (fuo *FriendUpdateOne) SetCreatedAt(t time.Time) *FriendUpdateOne
SetCreatedAt sets the "created_at" field.
func (*FriendUpdateOne) SetNillableCreatedAt ¶
func (fuo *FriendUpdateOne) SetNillableCreatedAt(t *time.Time) *FriendUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FriendUpdateOne) SetNillableRequesteeID ¶
func (fuo *FriendUpdateOne) SetNillableRequesteeID(u *uuid.UUID) *FriendUpdateOne
SetNillableRequesteeID sets the "requestee_id" field if the given value is not nil.
func (*FriendUpdateOne) SetNillableRequesterID ¶
func (fuo *FriendUpdateOne) SetNillableRequesterID(u *uuid.UUID) *FriendUpdateOne
SetNillableRequesterID sets the "requester_id" field if the given value is not nil.
func (*FriendUpdateOne) SetNillableStatus ¶
func (fuo *FriendUpdateOne) SetNillableStatus(f *friend.Status) *FriendUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*FriendUpdateOne) SetRequestee ¶
func (fuo *FriendUpdateOne) SetRequestee(u *User) *FriendUpdateOne
SetRequestee sets the "requestee" edge to the User entity.
func (*FriendUpdateOne) SetRequesteeID ¶
func (fuo *FriendUpdateOne) SetRequesteeID(u uuid.UUID) *FriendUpdateOne
SetRequesteeID sets the "requestee_id" field.
func (*FriendUpdateOne) SetRequester ¶
func (fuo *FriendUpdateOne) SetRequester(u *User) *FriendUpdateOne
SetRequester sets the "requester" edge to the User entity.
func (*FriendUpdateOne) SetRequesterID ¶
func (fuo *FriendUpdateOne) SetRequesterID(u uuid.UUID) *FriendUpdateOne
SetRequesterID sets the "requester_id" field.
func (*FriendUpdateOne) SetStatus ¶
func (fuo *FriendUpdateOne) SetStatus(f friend.Status) *FriendUpdateOne
SetStatus sets the "status" field.
func (*FriendUpdateOne) SetUpdatedAt ¶
func (fuo *FriendUpdateOne) SetUpdatedAt(t time.Time) *FriendUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*FriendUpdateOne) Where ¶
func (fuo *FriendUpdateOne) Where(ps ...predicate.Friend) *FriendUpdateOne
Where appends a list predicates to the FriendUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type Message ¶
type Message struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Text holds the value of the "text" field. Text *string `json:"text,omitempty"` // SenderID holds the value of the "sender_id" field. SenderID uuid.UUID `json:"sender_id,omitempty"` // ChatID holds the value of the "chat_id" field. ChatID uuid.UUID `json:"chat_id,omitempty"` // FileID holds the value of the "file_id" field. FileID *uuid.UUID `json:"file_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MessageQuery when eager-loading is set. Edges MessageEdges `json:"edges"` // contains filtered or unexported fields }
Message is the model entity for the Message schema.
func (*Message) QuerySender ¶
QuerySender queries the "sender" edge of the Message entity.
func (*Message) Unwrap ¶
Unwrap unwraps the Message 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 (*Message) Update ¶
func (m *Message) Update() *MessageUpdateOne
Update returns a builder for updating this Message. Note that you need to call Message.Unwrap() before calling this method if this Message was returned from a transaction, and the transaction was committed or rolled back.
type MessageClient ¶
type MessageClient struct {
// contains filtered or unexported fields
}
MessageClient is a client for the Message schema.
func NewMessageClient ¶
func NewMessageClient(c config) *MessageClient
NewMessageClient returns a client for the Message from the given config.
func (*MessageClient) Create ¶
func (c *MessageClient) Create() *MessageCreate
Create returns a builder for creating a Message entity.
func (*MessageClient) CreateBulk ¶
func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
CreateBulk returns a builder for creating a bulk of Message entities.
func (*MessageClient) Delete ¶
func (c *MessageClient) Delete() *MessageDelete
Delete returns a delete builder for Message.
func (*MessageClient) DeleteOne ¶
func (c *MessageClient) DeleteOne(m *Message) *MessageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MessageClient) DeleteOneID ¶
func (c *MessageClient) DeleteOneID(id uuid.UUID) *MessageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MessageClient) Hooks ¶
func (c *MessageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MessageClient) Intercept ¶
func (c *MessageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `message.Intercept(f(g(h())))`.
func (*MessageClient) Interceptors ¶
func (c *MessageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MessageClient) MapCreateBulk ¶
func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*MessageClient) Query ¶
func (c *MessageClient) Query() *MessageQuery
Query returns a query builder for Message.
func (*MessageClient) QueryChat ¶
func (c *MessageClient) QueryChat(m *Message) *ChatQuery
QueryChat queries the chat edge of a Message.
func (*MessageClient) QueryFile ¶
func (c *MessageClient) QueryFile(m *Message) *FileQuery
QueryFile queries the file edge of a Message.
func (*MessageClient) QuerySender ¶
func (c *MessageClient) QuerySender(m *Message) *UserQuery
QuerySender queries the sender edge of a Message.
func (*MessageClient) Update ¶
func (c *MessageClient) Update() *MessageUpdate
Update returns an update builder for Message.
func (*MessageClient) UpdateOne ¶
func (c *MessageClient) UpdateOne(m *Message) *MessageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MessageClient) UpdateOneID ¶
func (c *MessageClient) UpdateOneID(id uuid.UUID) *MessageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MessageClient) Use ¶
func (c *MessageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `message.Hooks(f(g(h())))`.
type MessageCreate ¶
type MessageCreate struct {
// contains filtered or unexported fields
}
MessageCreate is the builder for creating a Message entity.
func (*MessageCreate) Exec ¶
func (mc *MessageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreate) ExecX ¶
func (mc *MessageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageCreate) Mutation ¶
func (mc *MessageCreate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageCreate) Save ¶
func (mc *MessageCreate) Save(ctx context.Context) (*Message, error)
Save creates the Message in the database.
func (*MessageCreate) SaveX ¶
func (mc *MessageCreate) SaveX(ctx context.Context) *Message
SaveX calls Save and panics if Save returns an error.
func (*MessageCreate) SetChat ¶
func (mc *MessageCreate) SetChat(c *Chat) *MessageCreate
SetChat sets the "chat" edge to the Chat entity.
func (*MessageCreate) SetChatID ¶
func (mc *MessageCreate) SetChatID(u uuid.UUID) *MessageCreate
SetChatID sets the "chat_id" field.
func (*MessageCreate) SetCreatedAt ¶
func (mc *MessageCreate) SetCreatedAt(t time.Time) *MessageCreate
SetCreatedAt sets the "created_at" field.
func (*MessageCreate) SetFile ¶
func (mc *MessageCreate) SetFile(f *File) *MessageCreate
SetFile sets the "file" edge to the File entity.
func (*MessageCreate) SetFileID ¶
func (mc *MessageCreate) SetFileID(u uuid.UUID) *MessageCreate
SetFileID sets the "file_id" field.
func (*MessageCreate) SetID ¶
func (mc *MessageCreate) SetID(u uuid.UUID) *MessageCreate
SetID sets the "id" field.
func (*MessageCreate) SetNillableCreatedAt ¶
func (mc *MessageCreate) SetNillableCreatedAt(t *time.Time) *MessageCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MessageCreate) SetNillableFileID ¶
func (mc *MessageCreate) SetNillableFileID(u *uuid.UUID) *MessageCreate
SetNillableFileID sets the "file_id" field if the given value is not nil.
func (*MessageCreate) SetNillableID ¶
func (mc *MessageCreate) SetNillableID(u *uuid.UUID) *MessageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*MessageCreate) SetNillableText ¶
func (mc *MessageCreate) SetNillableText(s *string) *MessageCreate
SetNillableText sets the "text" field if the given value is not nil.
func (*MessageCreate) SetNillableUpdatedAt ¶
func (mc *MessageCreate) SetNillableUpdatedAt(t *time.Time) *MessageCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MessageCreate) SetSender ¶
func (mc *MessageCreate) SetSender(u *User) *MessageCreate
SetSender sets the "sender" edge to the User entity.
func (*MessageCreate) SetSenderID ¶
func (mc *MessageCreate) SetSenderID(u uuid.UUID) *MessageCreate
SetSenderID sets the "sender_id" field.
func (*MessageCreate) SetText ¶
func (mc *MessageCreate) SetText(s string) *MessageCreate
SetText sets the "text" field.
func (*MessageCreate) SetUpdatedAt ¶
func (mc *MessageCreate) SetUpdatedAt(t time.Time) *MessageCreate
SetUpdatedAt sets the "updated_at" field.
type MessageCreateBulk ¶
type MessageCreateBulk struct {
// contains filtered or unexported fields
}
MessageCreateBulk is the builder for creating many Message entities in bulk.
func (*MessageCreateBulk) Exec ¶
func (mcb *MessageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreateBulk) ExecX ¶
func (mcb *MessageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MessageDelete ¶
type MessageDelete struct {
// contains filtered or unexported fields
}
MessageDelete is the builder for deleting a Message entity.
func (*MessageDelete) Exec ¶
func (md *MessageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MessageDelete) ExecX ¶
func (md *MessageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MessageDelete) Where ¶
func (md *MessageDelete) Where(ps ...predicate.Message) *MessageDelete
Where appends a list predicates to the MessageDelete builder.
type MessageDeleteOne ¶
type MessageDeleteOne struct {
// contains filtered or unexported fields
}
MessageDeleteOne is the builder for deleting a single Message entity.
func (*MessageDeleteOne) Exec ¶
func (mdo *MessageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MessageDeleteOne) ExecX ¶
func (mdo *MessageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageDeleteOne) Where ¶
func (mdo *MessageDeleteOne) Where(ps ...predicate.Message) *MessageDeleteOne
Where appends a list predicates to the MessageDelete builder.
type MessageEdges ¶
type MessageEdges struct { // Sender holds the value of the sender edge. Sender *User `json:"sender,omitempty"` // Chat holds the value of the chat edge. Chat *Chat `json:"chat,omitempty"` // File holds the value of the file edge. File *File `json:"file,omitempty"` // contains filtered or unexported fields }
MessageEdges holds the relations/edges for other nodes in the graph.
func (MessageEdges) ChatOrErr ¶
func (e MessageEdges) ChatOrErr() (*Chat, error)
ChatOrErr returns the Chat value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MessageEdges) FileOrErr ¶
func (e MessageEdges) FileOrErr() (*File, error)
FileOrErr returns the File value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MessageEdges) SenderOrErr ¶
func (e MessageEdges) SenderOrErr() (*User, error)
SenderOrErr returns the Sender value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MessageGroupBy ¶
type MessageGroupBy struct {
// contains filtered or unexported fields
}
MessageGroupBy is the group-by builder for Message entities.
func (*MessageGroupBy) Aggregate ¶
func (mgb *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MessageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Scan ¶
func (mgb *MessageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageMutation ¶
type MessageMutation struct {
// contains filtered or unexported fields
}
MessageMutation represents an operation that mutates the Message nodes in the graph.
func (*MessageMutation) AddField ¶
func (m *MessageMutation) 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 (*MessageMutation) AddedEdges ¶
func (m *MessageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MessageMutation) AddedField ¶
func (m *MessageMutation) 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 (*MessageMutation) AddedFields ¶
func (m *MessageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MessageMutation) AddedIDs ¶
func (m *MessageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MessageMutation) ChatCleared ¶
func (m *MessageMutation) ChatCleared() bool
ChatCleared reports if the "chat" edge to the Chat entity was cleared.
func (*MessageMutation) ChatID ¶
func (m *MessageMutation) ChatID() (r uuid.UUID, exists bool)
ChatID returns the value of the "chat_id" field in the mutation.
func (*MessageMutation) ChatIDs ¶
func (m *MessageMutation) ChatIDs() (ids []uuid.UUID)
ChatIDs returns the "chat" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ChatID instead. It exists only for internal usage by the builders.
func (*MessageMutation) ClearChat ¶
func (m *MessageMutation) ClearChat()
ClearChat clears the "chat" edge to the Chat entity.
func (*MessageMutation) ClearEdge ¶
func (m *MessageMutation) 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 (*MessageMutation) ClearField ¶
func (m *MessageMutation) 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 (*MessageMutation) ClearFile ¶
func (m *MessageMutation) ClearFile()
ClearFile clears the "file" edge to the File entity.
func (*MessageMutation) ClearFileID ¶
func (m *MessageMutation) ClearFileID()
ClearFileID clears the value of the "file_id" field.
func (*MessageMutation) ClearSender ¶
func (m *MessageMutation) ClearSender()
ClearSender clears the "sender" edge to the User entity.
func (*MessageMutation) ClearText ¶
func (m *MessageMutation) ClearText()
ClearText clears the value of the "text" field.
func (*MessageMutation) ClearedEdges ¶
func (m *MessageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MessageMutation) ClearedFields ¶
func (m *MessageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MessageMutation) Client ¶
func (m MessageMutation) 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 (*MessageMutation) CreatedAt ¶
func (m *MessageMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MessageMutation) EdgeCleared ¶
func (m *MessageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MessageMutation) Field ¶
func (m *MessageMutation) 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 (*MessageMutation) FieldCleared ¶
func (m *MessageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MessageMutation) Fields ¶
func (m *MessageMutation) 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 (*MessageMutation) FileCleared ¶
func (m *MessageMutation) FileCleared() bool
FileCleared reports if the "file" edge to the File entity was cleared.
func (*MessageMutation) FileID ¶
func (m *MessageMutation) FileID() (r uuid.UUID, exists bool)
FileID returns the value of the "file_id" field in the mutation.
func (*MessageMutation) FileIDCleared ¶
func (m *MessageMutation) FileIDCleared() bool
FileIDCleared returns if the "file_id" field was cleared in this mutation.
func (*MessageMutation) FileIDs ¶
func (m *MessageMutation) FileIDs() (ids []uuid.UUID)
FileIDs returns the "file" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FileID instead. It exists only for internal usage by the builders.
func (*MessageMutation) ID ¶
func (m *MessageMutation) 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 (*MessageMutation) 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 (*MessageMutation) OldChatID ¶
OldChatID returns the old "chat_id" field's value of the Message entity. If the Message 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 (*MessageMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Message entity. If the Message 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 (*MessageMutation) 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 (*MessageMutation) OldFileID ¶
OldFileID returns the old "file_id" field's value of the Message entity. If the Message 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 (*MessageMutation) OldSenderID ¶
OldSenderID returns the old "sender_id" field's value of the Message entity. If the Message 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 (*MessageMutation) OldText ¶
func (m *MessageMutation) OldText(ctx context.Context) (v *string, err error)
OldText returns the old "text" field's value of the Message entity. If the Message 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 (*MessageMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Message entity. If the Message 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 (*MessageMutation) RemovedEdges ¶
func (m *MessageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MessageMutation) RemovedIDs ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetChat ¶
func (m *MessageMutation) ResetChat()
ResetChat resets all changes to the "chat" edge.
func (*MessageMutation) ResetChatID ¶
func (m *MessageMutation) ResetChatID()
ResetChatID resets all changes to the "chat_id" field.
func (*MessageMutation) ResetCreatedAt ¶
func (m *MessageMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MessageMutation) ResetEdge ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetField ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetFile ¶
func (m *MessageMutation) ResetFile()
ResetFile resets all changes to the "file" edge.
func (*MessageMutation) ResetFileID ¶
func (m *MessageMutation) ResetFileID()
ResetFileID resets all changes to the "file_id" field.
func (*MessageMutation) ResetSender ¶
func (m *MessageMutation) ResetSender()
ResetSender resets all changes to the "sender" edge.
func (*MessageMutation) ResetSenderID ¶
func (m *MessageMutation) ResetSenderID()
ResetSenderID resets all changes to the "sender_id" field.
func (*MessageMutation) ResetText ¶
func (m *MessageMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*MessageMutation) ResetUpdatedAt ¶
func (m *MessageMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MessageMutation) SenderCleared ¶
func (m *MessageMutation) SenderCleared() bool
SenderCleared reports if the "sender" edge to the User entity was cleared.
func (*MessageMutation) SenderID ¶
func (m *MessageMutation) SenderID() (r uuid.UUID, exists bool)
SenderID returns the value of the "sender_id" field in the mutation.
func (*MessageMutation) SenderIDs ¶
func (m *MessageMutation) SenderIDs() (ids []uuid.UUID)
SenderIDs returns the "sender" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SenderID instead. It exists only for internal usage by the builders.
func (*MessageMutation) SetChatID ¶
func (m *MessageMutation) SetChatID(u uuid.UUID)
SetChatID sets the "chat_id" field.
func (*MessageMutation) SetCreatedAt ¶
func (m *MessageMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MessageMutation) SetField ¶
func (m *MessageMutation) 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 (*MessageMutation) SetFileID ¶
func (m *MessageMutation) SetFileID(u uuid.UUID)
SetFileID sets the "file_id" field.
func (*MessageMutation) SetID ¶
func (m *MessageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Message entities.
func (*MessageMutation) SetOp ¶
func (m *MessageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MessageMutation) SetSenderID ¶
func (m *MessageMutation) SetSenderID(u uuid.UUID)
SetSenderID sets the "sender_id" field.
func (*MessageMutation) SetText ¶
func (m *MessageMutation) SetText(s string)
SetText sets the "text" field.
func (*MessageMutation) SetUpdatedAt ¶
func (m *MessageMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MessageMutation) Text ¶
func (m *MessageMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (*MessageMutation) TextCleared ¶
func (m *MessageMutation) TextCleared() bool
TextCleared returns if the "text" field was cleared in this mutation.
func (MessageMutation) Tx ¶
func (m MessageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MessageMutation) Type ¶
func (m *MessageMutation) Type() string
Type returns the node type of this mutation (Message).
func (*MessageMutation) UpdatedAt ¶
func (m *MessageMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MessageMutation) Where ¶
func (m *MessageMutation) Where(ps ...predicate.Message)
Where appends a list predicates to the MessageMutation builder.
func (*MessageMutation) WhereP ¶
func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MessageQuery ¶
type MessageQuery struct {
// contains filtered or unexported fields
}
MessageQuery is the builder for querying Message entities.
func (*MessageQuery) Aggregate ¶
func (mq *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate returns a MessageSelect configured with the given aggregations.
func (*MessageQuery) All ¶
func (mq *MessageQuery) All(ctx context.Context) ([]*Message, error)
All executes the query and returns a list of Messages.
func (*MessageQuery) AllX ¶
func (mq *MessageQuery) AllX(ctx context.Context) []*Message
AllX is like All, but panics if an error occurs.
func (*MessageQuery) Clone ¶
func (mq *MessageQuery) Clone() *MessageQuery
Clone returns a duplicate of the MessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MessageQuery) Count ¶
func (mq *MessageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MessageQuery) CountX ¶
func (mq *MessageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MessageQuery) Exist ¶
func (mq *MessageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MessageQuery) ExistX ¶
func (mq *MessageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MessageQuery) First ¶
func (mq *MessageQuery) First(ctx context.Context) (*Message, error)
First returns the first Message entity from the query. Returns a *NotFoundError when no Message was found.
func (*MessageQuery) FirstID ¶
FirstID returns the first Message ID from the query. Returns a *NotFoundError when no Message ID was found.
func (*MessageQuery) FirstIDX ¶
func (mq *MessageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*MessageQuery) FirstX ¶
func (mq *MessageQuery) FirstX(ctx context.Context) *Message
FirstX is like First, but panics if an error occurs.
func (*MessageQuery) GroupBy ¶
func (mq *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Message.Query(). GroupBy(message.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MessageQuery) IDsX ¶
func (mq *MessageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*MessageQuery) Limit ¶
func (mq *MessageQuery) Limit(limit int) *MessageQuery
Limit the number of records to be returned by this query.
func (*MessageQuery) Offset ¶
func (mq *MessageQuery) Offset(offset int) *MessageQuery
Offset to start from.
func (*MessageQuery) Only ¶
func (mq *MessageQuery) Only(ctx context.Context) (*Message, error)
Only returns a single Message entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Message entity is found. Returns a *NotFoundError when no Message entities are found.
func (*MessageQuery) OnlyID ¶
OnlyID is like Only, but returns the only Message ID in the query. Returns a *NotSingularError when more than one Message ID is found. Returns a *NotFoundError when no entities are found.
func (*MessageQuery) OnlyIDX ¶
func (mq *MessageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MessageQuery) OnlyX ¶
func (mq *MessageQuery) OnlyX(ctx context.Context) *Message
OnlyX is like Only, but panics if an error occurs.
func (*MessageQuery) Order ¶
func (mq *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
Order specifies how the records should be ordered.
func (*MessageQuery) QueryChat ¶
func (mq *MessageQuery) QueryChat() *ChatQuery
QueryChat chains the current query on the "chat" edge.
func (*MessageQuery) QueryFile ¶
func (mq *MessageQuery) QueryFile() *FileQuery
QueryFile chains the current query on the "file" edge.
func (*MessageQuery) QuerySender ¶
func (mq *MessageQuery) QuerySender() *UserQuery
QuerySender chains the current query on the "sender" edge.
func (*MessageQuery) Select ¶
func (mq *MessageQuery) Select(fields ...string) *MessageSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Message.Query(). Select(message.FieldCreatedAt). Scan(ctx, &v)
func (*MessageQuery) Unique ¶
func (mq *MessageQuery) Unique(unique bool) *MessageQuery
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 (*MessageQuery) Where ¶
func (mq *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
Where adds a new predicate for the MessageQuery builder.
func (*MessageQuery) WithChat ¶
func (mq *MessageQuery) WithChat(opts ...func(*ChatQuery)) *MessageQuery
WithChat tells the query-builder to eager-load the nodes that are connected to the "chat" edge. The optional arguments are used to configure the query builder of the edge.
func (*MessageQuery) WithFile ¶
func (mq *MessageQuery) WithFile(opts ...func(*FileQuery)) *MessageQuery
WithFile tells the query-builder to eager-load the nodes that are connected to the "file" edge. The optional arguments are used to configure the query builder of the edge.
func (*MessageQuery) WithSender ¶
func (mq *MessageQuery) WithSender(opts ...func(*UserQuery)) *MessageQuery
WithSender tells the query-builder to eager-load the nodes that are connected to the "sender" edge. The optional arguments are used to configure the query builder of the edge.
type MessageSelect ¶
type MessageSelect struct { *MessageQuery // contains filtered or unexported fields }
MessageSelect is the builder for selecting fields of Message entities.
func (*MessageSelect) Aggregate ¶
func (ms *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MessageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Scan ¶
func (ms *MessageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageUpdate ¶
type MessageUpdate struct {
// contains filtered or unexported fields
}
MessageUpdate is the builder for updating Message entities.
func (*MessageUpdate) ClearChat ¶
func (mu *MessageUpdate) ClearChat() *MessageUpdate
ClearChat clears the "chat" edge to the Chat entity.
func (*MessageUpdate) ClearFile ¶
func (mu *MessageUpdate) ClearFile() *MessageUpdate
ClearFile clears the "file" edge to the File entity.
func (*MessageUpdate) ClearFileID ¶
func (mu *MessageUpdate) ClearFileID() *MessageUpdate
ClearFileID clears the value of the "file_id" field.
func (*MessageUpdate) ClearSender ¶
func (mu *MessageUpdate) ClearSender() *MessageUpdate
ClearSender clears the "sender" edge to the User entity.
func (*MessageUpdate) ClearText ¶
func (mu *MessageUpdate) ClearText() *MessageUpdate
ClearText clears the value of the "text" field.
func (*MessageUpdate) Exec ¶
func (mu *MessageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageUpdate) ExecX ¶
func (mu *MessageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdate) Mutation ¶
func (mu *MessageUpdate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdate) Save ¶
func (mu *MessageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MessageUpdate) SaveX ¶
func (mu *MessageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdate) SetChat ¶
func (mu *MessageUpdate) SetChat(c *Chat) *MessageUpdate
SetChat sets the "chat" edge to the Chat entity.
func (*MessageUpdate) SetChatID ¶
func (mu *MessageUpdate) SetChatID(u uuid.UUID) *MessageUpdate
SetChatID sets the "chat_id" field.
func (*MessageUpdate) SetCreatedAt ¶
func (mu *MessageUpdate) SetCreatedAt(t time.Time) *MessageUpdate
SetCreatedAt sets the "created_at" field.
func (*MessageUpdate) SetFile ¶
func (mu *MessageUpdate) SetFile(f *File) *MessageUpdate
SetFile sets the "file" edge to the File entity.
func (*MessageUpdate) SetFileID ¶
func (mu *MessageUpdate) SetFileID(u uuid.UUID) *MessageUpdate
SetFileID sets the "file_id" field.
func (*MessageUpdate) SetNillableChatID ¶
func (mu *MessageUpdate) SetNillableChatID(u *uuid.UUID) *MessageUpdate
SetNillableChatID sets the "chat_id" field if the given value is not nil.
func (*MessageUpdate) SetNillableCreatedAt ¶
func (mu *MessageUpdate) SetNillableCreatedAt(t *time.Time) *MessageUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MessageUpdate) SetNillableFileID ¶
func (mu *MessageUpdate) SetNillableFileID(u *uuid.UUID) *MessageUpdate
SetNillableFileID sets the "file_id" field if the given value is not nil.
func (*MessageUpdate) SetNillableSenderID ¶
func (mu *MessageUpdate) SetNillableSenderID(u *uuid.UUID) *MessageUpdate
SetNillableSenderID sets the "sender_id" field if the given value is not nil.
func (*MessageUpdate) SetNillableText ¶
func (mu *MessageUpdate) SetNillableText(s *string) *MessageUpdate
SetNillableText sets the "text" field if the given value is not nil.
func (*MessageUpdate) SetSender ¶
func (mu *MessageUpdate) SetSender(u *User) *MessageUpdate
SetSender sets the "sender" edge to the User entity.
func (*MessageUpdate) SetSenderID ¶
func (mu *MessageUpdate) SetSenderID(u uuid.UUID) *MessageUpdate
SetSenderID sets the "sender_id" field.
func (*MessageUpdate) SetText ¶
func (mu *MessageUpdate) SetText(s string) *MessageUpdate
SetText sets the "text" field.
func (*MessageUpdate) SetUpdatedAt ¶
func (mu *MessageUpdate) SetUpdatedAt(t time.Time) *MessageUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MessageUpdate) Where ¶
func (mu *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
Where appends a list predicates to the MessageUpdate builder.
type MessageUpdateOne ¶
type MessageUpdateOne struct {
// contains filtered or unexported fields
}
MessageUpdateOne is the builder for updating a single Message entity.
func (*MessageUpdateOne) ClearChat ¶
func (muo *MessageUpdateOne) ClearChat() *MessageUpdateOne
ClearChat clears the "chat" edge to the Chat entity.
func (*MessageUpdateOne) ClearFile ¶
func (muo *MessageUpdateOne) ClearFile() *MessageUpdateOne
ClearFile clears the "file" edge to the File entity.
func (*MessageUpdateOne) ClearFileID ¶
func (muo *MessageUpdateOne) ClearFileID() *MessageUpdateOne
ClearFileID clears the value of the "file_id" field.
func (*MessageUpdateOne) ClearSender ¶
func (muo *MessageUpdateOne) ClearSender() *MessageUpdateOne
ClearSender clears the "sender" edge to the User entity.
func (*MessageUpdateOne) ClearText ¶
func (muo *MessageUpdateOne) ClearText() *MessageUpdateOne
ClearText clears the value of the "text" field.
func (*MessageUpdateOne) Exec ¶
func (muo *MessageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MessageUpdateOne) ExecX ¶
func (muo *MessageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdateOne) Mutation ¶
func (muo *MessageUpdateOne) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdateOne) Save ¶
func (muo *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
Save executes the query and returns the updated Message entity.
func (*MessageUpdateOne) SaveX ¶
func (muo *MessageUpdateOne) SaveX(ctx context.Context) *Message
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdateOne) Select ¶
func (muo *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MessageUpdateOne) SetChat ¶
func (muo *MessageUpdateOne) SetChat(c *Chat) *MessageUpdateOne
SetChat sets the "chat" edge to the Chat entity.
func (*MessageUpdateOne) SetChatID ¶
func (muo *MessageUpdateOne) SetChatID(u uuid.UUID) *MessageUpdateOne
SetChatID sets the "chat_id" field.
func (*MessageUpdateOne) SetCreatedAt ¶
func (muo *MessageUpdateOne) SetCreatedAt(t time.Time) *MessageUpdateOne
SetCreatedAt sets the "created_at" field.
func (*MessageUpdateOne) SetFile ¶
func (muo *MessageUpdateOne) SetFile(f *File) *MessageUpdateOne
SetFile sets the "file" edge to the File entity.
func (*MessageUpdateOne) SetFileID ¶
func (muo *MessageUpdateOne) SetFileID(u uuid.UUID) *MessageUpdateOne
SetFileID sets the "file_id" field.
func (*MessageUpdateOne) SetNillableChatID ¶
func (muo *MessageUpdateOne) SetNillableChatID(u *uuid.UUID) *MessageUpdateOne
SetNillableChatID sets the "chat_id" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableCreatedAt ¶
func (muo *MessageUpdateOne) SetNillableCreatedAt(t *time.Time) *MessageUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableFileID ¶
func (muo *MessageUpdateOne) SetNillableFileID(u *uuid.UUID) *MessageUpdateOne
SetNillableFileID sets the "file_id" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableSenderID ¶
func (muo *MessageUpdateOne) SetNillableSenderID(u *uuid.UUID) *MessageUpdateOne
SetNillableSenderID sets the "sender_id" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableText ¶
func (muo *MessageUpdateOne) SetNillableText(s *string) *MessageUpdateOne
SetNillableText sets the "text" field if the given value is not nil.
func (*MessageUpdateOne) SetSender ¶
func (muo *MessageUpdateOne) SetSender(u *User) *MessageUpdateOne
SetSender sets the "sender" edge to the User entity.
func (*MessageUpdateOne) SetSenderID ¶
func (muo *MessageUpdateOne) SetSenderID(u uuid.UUID) *MessageUpdateOne
SetSenderID sets the "sender_id" field.
func (*MessageUpdateOne) SetText ¶
func (muo *MessageUpdateOne) SetText(s string) *MessageUpdateOne
SetText sets the "text" field.
func (*MessageUpdateOne) SetUpdatedAt ¶
func (muo *MessageUpdateOne) SetUpdatedAt(t time.Time) *MessageUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MessageUpdateOne) Where ¶
func (muo *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
Where appends a list predicates to the MessageUpdate builder.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type Notification ¶
type Notification struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // SenderID holds the value of the "sender_id" field. SenderID *uuid.UUID `json:"sender_id,omitempty"` // Ntype holds the value of the "ntype" field. Ntype notification.Ntype `json:"ntype,omitempty"` // PostID holds the value of the "post_id" field. PostID *uuid.UUID `json:"post_id,omitempty"` // CommentID holds the value of the "comment_id" field. CommentID *uuid.UUID `json:"comment_id,omitempty"` // ReplyID holds the value of the "reply_id" field. ReplyID *uuid.UUID `json:"reply_id,omitempty"` // Text holds the value of the "text" field. Text *string `json:"text,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NotificationQuery when eager-loading is set. Edges NotificationEdges `json:"edges"` // contains filtered or unexported fields }
Notification is the model entity for the Notification schema.
func (*Notification) QueryComment ¶
func (n *Notification) QueryComment() *CommentQuery
QueryComment queries the "comment" edge of the Notification entity.
func (*Notification) QueryPost ¶
func (n *Notification) QueryPost() *PostQuery
QueryPost queries the "post" edge of the Notification entity.
func (*Notification) QueryReadBy ¶
func (n *Notification) QueryReadBy() *UserQuery
QueryReadBy queries the "read_by" edge of the Notification entity.
func (*Notification) QueryReceivers ¶
func (n *Notification) QueryReceivers() *UserQuery
QueryReceivers queries the "receivers" edge of the Notification entity.
func (*Notification) QueryReply ¶
func (n *Notification) QueryReply() *ReplyQuery
QueryReply queries the "reply" edge of the Notification entity.
func (*Notification) QuerySender ¶
func (n *Notification) QuerySender() *UserQuery
QuerySender queries the "sender" edge of the Notification entity.
func (*Notification) String ¶
func (n *Notification) String() string
String implements the fmt.Stringer.
func (*Notification) Unwrap ¶
func (n *Notification) Unwrap() *Notification
Unwrap unwraps the Notification 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 (*Notification) Update ¶
func (n *Notification) Update() *NotificationUpdateOne
Update returns a builder for updating this Notification. Note that you need to call Notification.Unwrap() before calling this method if this Notification was returned from a transaction, and the transaction was committed or rolled back.
type NotificationClient ¶
type NotificationClient struct {
// contains filtered or unexported fields
}
NotificationClient is a client for the Notification schema.
func NewNotificationClient ¶
func NewNotificationClient(c config) *NotificationClient
NewNotificationClient returns a client for the Notification from the given config.
func (*NotificationClient) Create ¶
func (c *NotificationClient) Create() *NotificationCreate
Create returns a builder for creating a Notification entity.
func (*NotificationClient) CreateBulk ¶
func (c *NotificationClient) CreateBulk(builders ...*NotificationCreate) *NotificationCreateBulk
CreateBulk returns a builder for creating a bulk of Notification entities.
func (*NotificationClient) Delete ¶
func (c *NotificationClient) Delete() *NotificationDelete
Delete returns a delete builder for Notification.
func (*NotificationClient) DeleteOne ¶
func (c *NotificationClient) DeleteOne(n *Notification) *NotificationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NotificationClient) DeleteOneID ¶
func (c *NotificationClient) DeleteOneID(id uuid.UUID) *NotificationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NotificationClient) Get ¶
func (c *NotificationClient) Get(ctx context.Context, id uuid.UUID) (*Notification, error)
Get returns a Notification entity by its id.
func (*NotificationClient) GetX ¶
func (c *NotificationClient) GetX(ctx context.Context, id uuid.UUID) *Notification
GetX is like Get, but panics if an error occurs.
func (*NotificationClient) Hooks ¶
func (c *NotificationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NotificationClient) Intercept ¶
func (c *NotificationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `notification.Intercept(f(g(h())))`.
func (*NotificationClient) Interceptors ¶
func (c *NotificationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NotificationClient) MapCreateBulk ¶
func (c *NotificationClient) MapCreateBulk(slice any, setFunc func(*NotificationCreate, int)) *NotificationCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*NotificationClient) Query ¶
func (c *NotificationClient) Query() *NotificationQuery
Query returns a query builder for Notification.
func (*NotificationClient) QueryComment ¶
func (c *NotificationClient) QueryComment(n *Notification) *CommentQuery
QueryComment queries the comment edge of a Notification.
func (*NotificationClient) QueryPost ¶
func (c *NotificationClient) QueryPost(n *Notification) *PostQuery
QueryPost queries the post edge of a Notification.
func (*NotificationClient) QueryReadBy ¶
func (c *NotificationClient) QueryReadBy(n *Notification) *UserQuery
QueryReadBy queries the read_by edge of a Notification.
func (*NotificationClient) QueryReceivers ¶
func (c *NotificationClient) QueryReceivers(n *Notification) *UserQuery
QueryReceivers queries the receivers edge of a Notification.
func (*NotificationClient) QueryReply ¶
func (c *NotificationClient) QueryReply(n *Notification) *ReplyQuery
QueryReply queries the reply edge of a Notification.
func (*NotificationClient) QuerySender ¶
func (c *NotificationClient) QuerySender(n *Notification) *UserQuery
QuerySender queries the sender edge of a Notification.
func (*NotificationClient) Update ¶
func (c *NotificationClient) Update() *NotificationUpdate
Update returns an update builder for Notification.
func (*NotificationClient) UpdateOne ¶
func (c *NotificationClient) UpdateOne(n *Notification) *NotificationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NotificationClient) UpdateOneID ¶
func (c *NotificationClient) UpdateOneID(id uuid.UUID) *NotificationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NotificationClient) Use ¶
func (c *NotificationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `notification.Hooks(f(g(h())))`.
type NotificationCreate ¶
type NotificationCreate struct {
// contains filtered or unexported fields
}
NotificationCreate is the builder for creating a Notification entity.
func (*NotificationCreate) AddReadBy ¶
func (nc *NotificationCreate) AddReadBy(u ...*User) *NotificationCreate
AddReadBy adds the "read_by" edges to the User entity.
func (*NotificationCreate) AddReadByIDs ¶
func (nc *NotificationCreate) AddReadByIDs(ids ...uuid.UUID) *NotificationCreate
AddReadByIDs adds the "read_by" edge to the User entity by IDs.
func (*NotificationCreate) AddReceiverIDs ¶
func (nc *NotificationCreate) AddReceiverIDs(ids ...uuid.UUID) *NotificationCreate
AddReceiverIDs adds the "receivers" edge to the User entity by IDs.
func (*NotificationCreate) AddReceivers ¶
func (nc *NotificationCreate) AddReceivers(u ...*User) *NotificationCreate
AddReceivers adds the "receivers" edges to the User entity.
func (*NotificationCreate) Exec ¶
func (nc *NotificationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NotificationCreate) ExecX ¶
func (nc *NotificationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationCreate) Mutation ¶
func (nc *NotificationCreate) Mutation() *NotificationMutation
Mutation returns the NotificationMutation object of the builder.
func (*NotificationCreate) Save ¶
func (nc *NotificationCreate) Save(ctx context.Context) (*Notification, error)
Save creates the Notification in the database.
func (*NotificationCreate) SaveX ¶
func (nc *NotificationCreate) SaveX(ctx context.Context) *Notification
SaveX calls Save and panics if Save returns an error.
func (*NotificationCreate) SetComment ¶
func (nc *NotificationCreate) SetComment(c *Comment) *NotificationCreate
SetComment sets the "comment" edge to the Comment entity.
func (*NotificationCreate) SetCommentID ¶
func (nc *NotificationCreate) SetCommentID(u uuid.UUID) *NotificationCreate
SetCommentID sets the "comment_id" field.
func (*NotificationCreate) SetCreatedAt ¶
func (nc *NotificationCreate) SetCreatedAt(t time.Time) *NotificationCreate
SetCreatedAt sets the "created_at" field.
func (*NotificationCreate) SetID ¶
func (nc *NotificationCreate) SetID(u uuid.UUID) *NotificationCreate
SetID sets the "id" field.
func (*NotificationCreate) SetNillableCommentID ¶
func (nc *NotificationCreate) SetNillableCommentID(u *uuid.UUID) *NotificationCreate
SetNillableCommentID sets the "comment_id" field if the given value is not nil.
func (*NotificationCreate) SetNillableCreatedAt ¶
func (nc *NotificationCreate) SetNillableCreatedAt(t *time.Time) *NotificationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*NotificationCreate) SetNillableID ¶
func (nc *NotificationCreate) SetNillableID(u *uuid.UUID) *NotificationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*NotificationCreate) SetNillablePostID ¶
func (nc *NotificationCreate) SetNillablePostID(u *uuid.UUID) *NotificationCreate
SetNillablePostID sets the "post_id" field if the given value is not nil.
func (*NotificationCreate) SetNillableReplyID ¶
func (nc *NotificationCreate) SetNillableReplyID(u *uuid.UUID) *NotificationCreate
SetNillableReplyID sets the "reply_id" field if the given value is not nil.
func (*NotificationCreate) SetNillableSenderID ¶
func (nc *NotificationCreate) SetNillableSenderID(u *uuid.UUID) *NotificationCreate
SetNillableSenderID sets the "sender_id" field if the given value is not nil.
func (*NotificationCreate) SetNillableText ¶
func (nc *NotificationCreate) SetNillableText(s *string) *NotificationCreate
SetNillableText sets the "text" field if the given value is not nil.
func (*NotificationCreate) SetNillableUpdatedAt ¶
func (nc *NotificationCreate) SetNillableUpdatedAt(t *time.Time) *NotificationCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*NotificationCreate) SetNtype ¶
func (nc *NotificationCreate) SetNtype(n notification.Ntype) *NotificationCreate
SetNtype sets the "ntype" field.
func (*NotificationCreate) SetPost ¶
func (nc *NotificationCreate) SetPost(p *Post) *NotificationCreate
SetPost sets the "post" edge to the Post entity.
func (*NotificationCreate) SetPostID ¶
func (nc *NotificationCreate) SetPostID(u uuid.UUID) *NotificationCreate
SetPostID sets the "post_id" field.
func (*NotificationCreate) SetReply ¶
func (nc *NotificationCreate) SetReply(r *Reply) *NotificationCreate
SetReply sets the "reply" edge to the Reply entity.
func (*NotificationCreate) SetReplyID ¶
func (nc *NotificationCreate) SetReplyID(u uuid.UUID) *NotificationCreate
SetReplyID sets the "reply_id" field.
func (*NotificationCreate) SetSender ¶
func (nc *NotificationCreate) SetSender(u *User) *NotificationCreate
SetSender sets the "sender" edge to the User entity.
func (*NotificationCreate) SetSenderID ¶
func (nc *NotificationCreate) SetSenderID(u uuid.UUID) *NotificationCreate
SetSenderID sets the "sender_id" field.
func (*NotificationCreate) SetText ¶
func (nc *NotificationCreate) SetText(s string) *NotificationCreate
SetText sets the "text" field.
func (*NotificationCreate) SetUpdatedAt ¶
func (nc *NotificationCreate) SetUpdatedAt(t time.Time) *NotificationCreate
SetUpdatedAt sets the "updated_at" field.
type NotificationCreateBulk ¶
type NotificationCreateBulk struct {
// contains filtered or unexported fields
}
NotificationCreateBulk is the builder for creating many Notification entities in bulk.
func (*NotificationCreateBulk) Exec ¶
func (ncb *NotificationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NotificationCreateBulk) ExecX ¶
func (ncb *NotificationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationCreateBulk) Save ¶
func (ncb *NotificationCreateBulk) Save(ctx context.Context) ([]*Notification, error)
Save creates the Notification entities in the database.
func (*NotificationCreateBulk) SaveX ¶
func (ncb *NotificationCreateBulk) SaveX(ctx context.Context) []*Notification
SaveX is like Save, but panics if an error occurs.
type NotificationDelete ¶
type NotificationDelete struct {
// contains filtered or unexported fields
}
NotificationDelete is the builder for deleting a Notification entity.
func (*NotificationDelete) Exec ¶
func (nd *NotificationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NotificationDelete) ExecX ¶
func (nd *NotificationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NotificationDelete) Where ¶
func (nd *NotificationDelete) Where(ps ...predicate.Notification) *NotificationDelete
Where appends a list predicates to the NotificationDelete builder.
type NotificationDeleteOne ¶
type NotificationDeleteOne struct {
// contains filtered or unexported fields
}
NotificationDeleteOne is the builder for deleting a single Notification entity.
func (*NotificationDeleteOne) Exec ¶
func (ndo *NotificationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NotificationDeleteOne) ExecX ¶
func (ndo *NotificationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationDeleteOne) Where ¶
func (ndo *NotificationDeleteOne) Where(ps ...predicate.Notification) *NotificationDeleteOne
Where appends a list predicates to the NotificationDelete builder.
type NotificationEdges ¶
type NotificationEdges struct { // Sender holds the value of the sender edge. Sender *User `json:"sender,omitempty"` // Receivers holds the value of the receivers edge. Receivers []*User `json:"receivers,omitempty"` // Post holds the value of the post edge. Post *Post `json:"post,omitempty"` // Comment holds the value of the comment edge. Comment *Comment `json:"comment,omitempty"` // Reply holds the value of the reply edge. Reply *Reply `json:"reply,omitempty"` // ReadBy holds the value of the read_by edge. ReadBy []*User `json:"read_by,omitempty"` // contains filtered or unexported fields }
NotificationEdges holds the relations/edges for other nodes in the graph.
func (NotificationEdges) CommentOrErr ¶
func (e NotificationEdges) CommentOrErr() (*Comment, error)
CommentOrErr returns the Comment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NotificationEdges) PostOrErr ¶
func (e NotificationEdges) PostOrErr() (*Post, error)
PostOrErr returns the Post value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NotificationEdges) ReadByOrErr ¶
func (e NotificationEdges) ReadByOrErr() ([]*User, error)
ReadByOrErr returns the ReadBy value or an error if the edge was not loaded in eager-loading.
func (NotificationEdges) ReceiversOrErr ¶
func (e NotificationEdges) ReceiversOrErr() ([]*User, error)
ReceiversOrErr returns the Receivers value or an error if the edge was not loaded in eager-loading.
func (NotificationEdges) ReplyOrErr ¶
func (e NotificationEdges) ReplyOrErr() (*Reply, error)
ReplyOrErr returns the Reply value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NotificationEdges) SenderOrErr ¶
func (e NotificationEdges) SenderOrErr() (*User, error)
SenderOrErr returns the Sender value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NotificationGroupBy ¶
type NotificationGroupBy struct {
// contains filtered or unexported fields
}
NotificationGroupBy is the group-by builder for Notification entities.
func (*NotificationGroupBy) Aggregate ¶
func (ngb *NotificationGroupBy) Aggregate(fns ...AggregateFunc) *NotificationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NotificationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Scan ¶
func (ngb *NotificationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NotificationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NotificationMutation ¶
type NotificationMutation struct {
// contains filtered or unexported fields
}
NotificationMutation represents an operation that mutates the Notification nodes in the graph.
func (*NotificationMutation) AddField ¶
func (m *NotificationMutation) 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 (*NotificationMutation) AddReadByIDs ¶
func (m *NotificationMutation) AddReadByIDs(ids ...uuid.UUID)
AddReadByIDs adds the "read_by" edge to the User entity by ids.
func (*NotificationMutation) AddReceiverIDs ¶
func (m *NotificationMutation) AddReceiverIDs(ids ...uuid.UUID)
AddReceiverIDs adds the "receivers" edge to the User entity by ids.
func (*NotificationMutation) AddedEdges ¶
func (m *NotificationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NotificationMutation) AddedField ¶
func (m *NotificationMutation) 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 (*NotificationMutation) AddedFields ¶
func (m *NotificationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NotificationMutation) AddedIDs ¶
func (m *NotificationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NotificationMutation) ClearComment ¶
func (m *NotificationMutation) ClearComment()
ClearComment clears the "comment" edge to the Comment entity.
func (*NotificationMutation) ClearCommentID ¶
func (m *NotificationMutation) ClearCommentID()
ClearCommentID clears the value of the "comment_id" field.
func (*NotificationMutation) ClearEdge ¶
func (m *NotificationMutation) 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 (*NotificationMutation) ClearField ¶
func (m *NotificationMutation) 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 (*NotificationMutation) ClearPost ¶
func (m *NotificationMutation) ClearPost()
ClearPost clears the "post" edge to the Post entity.
func (*NotificationMutation) ClearPostID ¶
func (m *NotificationMutation) ClearPostID()
ClearPostID clears the value of the "post_id" field.
func (*NotificationMutation) ClearReadBy ¶
func (m *NotificationMutation) ClearReadBy()
ClearReadBy clears the "read_by" edge to the User entity.
func (*NotificationMutation) ClearReceivers ¶
func (m *NotificationMutation) ClearReceivers()
ClearReceivers clears the "receivers" edge to the User entity.
func (*NotificationMutation) ClearReply ¶
func (m *NotificationMutation) ClearReply()
ClearReply clears the "reply" edge to the Reply entity.
func (*NotificationMutation) ClearReplyID ¶
func (m *NotificationMutation) ClearReplyID()
ClearReplyID clears the value of the "reply_id" field.
func (*NotificationMutation) ClearSender ¶
func (m *NotificationMutation) ClearSender()
ClearSender clears the "sender" edge to the User entity.
func (*NotificationMutation) ClearSenderID ¶
func (m *NotificationMutation) ClearSenderID()
ClearSenderID clears the value of the "sender_id" field.
func (*NotificationMutation) ClearText ¶
func (m *NotificationMutation) ClearText()
ClearText clears the value of the "text" field.
func (*NotificationMutation) ClearedEdges ¶
func (m *NotificationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NotificationMutation) ClearedFields ¶
func (m *NotificationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NotificationMutation) Client ¶
func (m NotificationMutation) 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 (*NotificationMutation) CommentCleared ¶
func (m *NotificationMutation) CommentCleared() bool
CommentCleared reports if the "comment" edge to the Comment entity was cleared.
func (*NotificationMutation) CommentID ¶
func (m *NotificationMutation) CommentID() (r uuid.UUID, exists bool)
CommentID returns the value of the "comment_id" field in the mutation.
func (*NotificationMutation) CommentIDCleared ¶
func (m *NotificationMutation) CommentIDCleared() bool
CommentIDCleared returns if the "comment_id" field was cleared in this mutation.
func (*NotificationMutation) CommentIDs ¶
func (m *NotificationMutation) CommentIDs() (ids []uuid.UUID)
CommentIDs returns the "comment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CommentID instead. It exists only for internal usage by the builders.
func (*NotificationMutation) CreatedAt ¶
func (m *NotificationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*NotificationMutation) EdgeCleared ¶
func (m *NotificationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NotificationMutation) Field ¶
func (m *NotificationMutation) 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 (*NotificationMutation) FieldCleared ¶
func (m *NotificationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NotificationMutation) Fields ¶
func (m *NotificationMutation) 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 (*NotificationMutation) ID ¶
func (m *NotificationMutation) 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 (*NotificationMutation) 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 (*NotificationMutation) Ntype ¶
func (m *NotificationMutation) Ntype() (r notification.Ntype, exists bool)
Ntype returns the value of the "ntype" field in the mutation.
func (*NotificationMutation) OldCommentID ¶
OldCommentID returns the old "comment_id" field's value of the Notification entity. If the Notification 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 (*NotificationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Notification entity. If the Notification 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 (*NotificationMutation) 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 (*NotificationMutation) OldNtype ¶
func (m *NotificationMutation) OldNtype(ctx context.Context) (v notification.Ntype, err error)
OldNtype returns the old "ntype" field's value of the Notification entity. If the Notification 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 (*NotificationMutation) OldPostID ¶
OldPostID returns the old "post_id" field's value of the Notification entity. If the Notification 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 (*NotificationMutation) OldReplyID ¶
OldReplyID returns the old "reply_id" field's value of the Notification entity. If the Notification 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 (*NotificationMutation) OldSenderID ¶
OldSenderID returns the old "sender_id" field's value of the Notification entity. If the Notification 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 (*NotificationMutation) OldText ¶
func (m *NotificationMutation) OldText(ctx context.Context) (v *string, err error)
OldText returns the old "text" field's value of the Notification entity. If the Notification 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 (*NotificationMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Notification entity. If the Notification 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 (*NotificationMutation) Op ¶
func (m *NotificationMutation) Op() Op
Op returns the operation name.
func (*NotificationMutation) PostCleared ¶
func (m *NotificationMutation) PostCleared() bool
PostCleared reports if the "post" edge to the Post entity was cleared.
func (*NotificationMutation) PostID ¶
func (m *NotificationMutation) PostID() (r uuid.UUID, exists bool)
PostID returns the value of the "post_id" field in the mutation.
func (*NotificationMutation) PostIDCleared ¶
func (m *NotificationMutation) PostIDCleared() bool
PostIDCleared returns if the "post_id" field was cleared in this mutation.
func (*NotificationMutation) PostIDs ¶
func (m *NotificationMutation) PostIDs() (ids []uuid.UUID)
PostIDs returns the "post" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PostID instead. It exists only for internal usage by the builders.
func (*NotificationMutation) ReadByCleared ¶
func (m *NotificationMutation) ReadByCleared() bool
ReadByCleared reports if the "read_by" edge to the User entity was cleared.
func (*NotificationMutation) ReadByIDs ¶
func (m *NotificationMutation) ReadByIDs() (ids []uuid.UUID)
ReadByIDs returns the "read_by" edge IDs in the mutation.
func (*NotificationMutation) ReceiversCleared ¶
func (m *NotificationMutation) ReceiversCleared() bool
ReceiversCleared reports if the "receivers" edge to the User entity was cleared.
func (*NotificationMutation) ReceiversIDs ¶
func (m *NotificationMutation) ReceiversIDs() (ids []uuid.UUID)
ReceiversIDs returns the "receivers" edge IDs in the mutation.
func (*NotificationMutation) RemoveReadByIDs ¶
func (m *NotificationMutation) RemoveReadByIDs(ids ...uuid.UUID)
RemoveReadByIDs removes the "read_by" edge to the User entity by IDs.
func (*NotificationMutation) RemoveReceiverIDs ¶
func (m *NotificationMutation) RemoveReceiverIDs(ids ...uuid.UUID)
RemoveReceiverIDs removes the "receivers" edge to the User entity by IDs.
func (*NotificationMutation) RemovedEdges ¶
func (m *NotificationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NotificationMutation) RemovedIDs ¶
func (m *NotificationMutation) 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 (*NotificationMutation) RemovedReadByIDs ¶
func (m *NotificationMutation) RemovedReadByIDs() (ids []uuid.UUID)
RemovedReadBy returns the removed IDs of the "read_by" edge to the User entity.
func (*NotificationMutation) RemovedReceiversIDs ¶
func (m *NotificationMutation) RemovedReceiversIDs() (ids []uuid.UUID)
RemovedReceivers returns the removed IDs of the "receivers" edge to the User entity.
func (*NotificationMutation) ReplyCleared ¶
func (m *NotificationMutation) ReplyCleared() bool
ReplyCleared reports if the "reply" edge to the Reply entity was cleared.
func (*NotificationMutation) ReplyID ¶
func (m *NotificationMutation) ReplyID() (r uuid.UUID, exists bool)
ReplyID returns the value of the "reply_id" field in the mutation.
func (*NotificationMutation) ReplyIDCleared ¶
func (m *NotificationMutation) ReplyIDCleared() bool
ReplyIDCleared returns if the "reply_id" field was cleared in this mutation.
func (*NotificationMutation) ReplyIDs ¶
func (m *NotificationMutation) ReplyIDs() (ids []uuid.UUID)
ReplyIDs returns the "reply" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ReplyID instead. It exists only for internal usage by the builders.
func (*NotificationMutation) ResetComment ¶
func (m *NotificationMutation) ResetComment()
ResetComment resets all changes to the "comment" edge.
func (*NotificationMutation) ResetCommentID ¶
func (m *NotificationMutation) ResetCommentID()
ResetCommentID resets all changes to the "comment_id" field.
func (*NotificationMutation) ResetCreatedAt ¶
func (m *NotificationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*NotificationMutation) ResetEdge ¶
func (m *NotificationMutation) 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 (*NotificationMutation) ResetField ¶
func (m *NotificationMutation) 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 (*NotificationMutation) ResetNtype ¶
func (m *NotificationMutation) ResetNtype()
ResetNtype resets all changes to the "ntype" field.
func (*NotificationMutation) ResetPost ¶
func (m *NotificationMutation) ResetPost()
ResetPost resets all changes to the "post" edge.
func (*NotificationMutation) ResetPostID ¶
func (m *NotificationMutation) ResetPostID()
ResetPostID resets all changes to the "post_id" field.
func (*NotificationMutation) ResetReadBy ¶
func (m *NotificationMutation) ResetReadBy()
ResetReadBy resets all changes to the "read_by" edge.
func (*NotificationMutation) ResetReceivers ¶
func (m *NotificationMutation) ResetReceivers()
ResetReceivers resets all changes to the "receivers" edge.
func (*NotificationMutation) ResetReply ¶
func (m *NotificationMutation) ResetReply()
ResetReply resets all changes to the "reply" edge.
func (*NotificationMutation) ResetReplyID ¶
func (m *NotificationMutation) ResetReplyID()
ResetReplyID resets all changes to the "reply_id" field.
func (*NotificationMutation) ResetSender ¶
func (m *NotificationMutation) ResetSender()
ResetSender resets all changes to the "sender" edge.
func (*NotificationMutation) ResetSenderID ¶
func (m *NotificationMutation) ResetSenderID()
ResetSenderID resets all changes to the "sender_id" field.
func (*NotificationMutation) ResetText ¶
func (m *NotificationMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*NotificationMutation) ResetUpdatedAt ¶
func (m *NotificationMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*NotificationMutation) SenderCleared ¶
func (m *NotificationMutation) SenderCleared() bool
SenderCleared reports if the "sender" edge to the User entity was cleared.
func (*NotificationMutation) SenderID ¶
func (m *NotificationMutation) SenderID() (r uuid.UUID, exists bool)
SenderID returns the value of the "sender_id" field in the mutation.
func (*NotificationMutation) SenderIDCleared ¶
func (m *NotificationMutation) SenderIDCleared() bool
SenderIDCleared returns if the "sender_id" field was cleared in this mutation.
func (*NotificationMutation) SenderIDs ¶
func (m *NotificationMutation) SenderIDs() (ids []uuid.UUID)
SenderIDs returns the "sender" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SenderID instead. It exists only for internal usage by the builders.
func (*NotificationMutation) SetCommentID ¶
func (m *NotificationMutation) SetCommentID(u uuid.UUID)
SetCommentID sets the "comment_id" field.
func (*NotificationMutation) SetCreatedAt ¶
func (m *NotificationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*NotificationMutation) SetField ¶
func (m *NotificationMutation) 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 (*NotificationMutation) SetID ¶
func (m *NotificationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Notification entities.
func (*NotificationMutation) SetNtype ¶
func (m *NotificationMutation) SetNtype(n notification.Ntype)
SetNtype sets the "ntype" field.
func (*NotificationMutation) SetOp ¶
func (m *NotificationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NotificationMutation) SetPostID ¶
func (m *NotificationMutation) SetPostID(u uuid.UUID)
SetPostID sets the "post_id" field.
func (*NotificationMutation) SetReplyID ¶
func (m *NotificationMutation) SetReplyID(u uuid.UUID)
SetReplyID sets the "reply_id" field.
func (*NotificationMutation) SetSenderID ¶
func (m *NotificationMutation) SetSenderID(u uuid.UUID)
SetSenderID sets the "sender_id" field.
func (*NotificationMutation) SetText ¶
func (m *NotificationMutation) SetText(s string)
SetText sets the "text" field.
func (*NotificationMutation) SetUpdatedAt ¶
func (m *NotificationMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*NotificationMutation) Text ¶
func (m *NotificationMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (*NotificationMutation) TextCleared ¶
func (m *NotificationMutation) TextCleared() bool
TextCleared returns if the "text" field was cleared in this mutation.
func (NotificationMutation) Tx ¶
func (m NotificationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NotificationMutation) Type ¶
func (m *NotificationMutation) Type() string
Type returns the node type of this mutation (Notification).
func (*NotificationMutation) UpdatedAt ¶
func (m *NotificationMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*NotificationMutation) Where ¶
func (m *NotificationMutation) Where(ps ...predicate.Notification)
Where appends a list predicates to the NotificationMutation builder.
func (*NotificationMutation) WhereP ¶
func (m *NotificationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NotificationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NotificationQuery ¶
type NotificationQuery struct {
// contains filtered or unexported fields
}
NotificationQuery is the builder for querying Notification entities.
func (*NotificationQuery) Aggregate ¶
func (nq *NotificationQuery) Aggregate(fns ...AggregateFunc) *NotificationSelect
Aggregate returns a NotificationSelect configured with the given aggregations.
func (*NotificationQuery) All ¶
func (nq *NotificationQuery) All(ctx context.Context) ([]*Notification, error)
All executes the query and returns a list of Notifications.
func (*NotificationQuery) AllX ¶
func (nq *NotificationQuery) AllX(ctx context.Context) []*Notification
AllX is like All, but panics if an error occurs.
func (*NotificationQuery) Clone ¶
func (nq *NotificationQuery) Clone() *NotificationQuery
Clone returns a duplicate of the NotificationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NotificationQuery) Count ¶
func (nq *NotificationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NotificationQuery) CountX ¶
func (nq *NotificationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NotificationQuery) Exist ¶
func (nq *NotificationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NotificationQuery) ExistX ¶
func (nq *NotificationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NotificationQuery) First ¶
func (nq *NotificationQuery) First(ctx context.Context) (*Notification, error)
First returns the first Notification entity from the query. Returns a *NotFoundError when no Notification was found.
func (*NotificationQuery) FirstID ¶
FirstID returns the first Notification ID from the query. Returns a *NotFoundError when no Notification ID was found.
func (*NotificationQuery) FirstIDX ¶
func (nq *NotificationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*NotificationQuery) FirstX ¶
func (nq *NotificationQuery) FirstX(ctx context.Context) *Notification
FirstX is like First, but panics if an error occurs.
func (*NotificationQuery) GroupBy ¶
func (nq *NotificationQuery) GroupBy(field string, fields ...string) *NotificationGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Notification.Query(). GroupBy(notification.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NotificationQuery) IDsX ¶
func (nq *NotificationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*NotificationQuery) Limit ¶
func (nq *NotificationQuery) Limit(limit int) *NotificationQuery
Limit the number of records to be returned by this query.
func (*NotificationQuery) Offset ¶
func (nq *NotificationQuery) Offset(offset int) *NotificationQuery
Offset to start from.
func (*NotificationQuery) Only ¶
func (nq *NotificationQuery) Only(ctx context.Context) (*Notification, error)
Only returns a single Notification entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Notification entity is found. Returns a *NotFoundError when no Notification entities are found.
func (*NotificationQuery) OnlyID ¶
OnlyID is like Only, but returns the only Notification ID in the query. Returns a *NotSingularError when more than one Notification ID is found. Returns a *NotFoundError when no entities are found.
func (*NotificationQuery) OnlyIDX ¶
func (nq *NotificationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NotificationQuery) OnlyX ¶
func (nq *NotificationQuery) OnlyX(ctx context.Context) *Notification
OnlyX is like Only, but panics if an error occurs.
func (*NotificationQuery) Order ¶
func (nq *NotificationQuery) Order(o ...notification.OrderOption) *NotificationQuery
Order specifies how the records should be ordered.
func (*NotificationQuery) QueryComment ¶
func (nq *NotificationQuery) QueryComment() *CommentQuery
QueryComment chains the current query on the "comment" edge.
func (*NotificationQuery) QueryPost ¶
func (nq *NotificationQuery) QueryPost() *PostQuery
QueryPost chains the current query on the "post" edge.
func (*NotificationQuery) QueryReadBy ¶
func (nq *NotificationQuery) QueryReadBy() *UserQuery
QueryReadBy chains the current query on the "read_by" edge.
func (*NotificationQuery) QueryReceivers ¶
func (nq *NotificationQuery) QueryReceivers() *UserQuery
QueryReceivers chains the current query on the "receivers" edge.
func (*NotificationQuery) QueryReply ¶
func (nq *NotificationQuery) QueryReply() *ReplyQuery
QueryReply chains the current query on the "reply" edge.
func (*NotificationQuery) QuerySender ¶
func (nq *NotificationQuery) QuerySender() *UserQuery
QuerySender chains the current query on the "sender" edge.
func (*NotificationQuery) Select ¶
func (nq *NotificationQuery) Select(fields ...string) *NotificationSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Notification.Query(). Select(notification.FieldCreatedAt). Scan(ctx, &v)
func (*NotificationQuery) Unique ¶
func (nq *NotificationQuery) Unique(unique bool) *NotificationQuery
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 (*NotificationQuery) Where ¶
func (nq *NotificationQuery) Where(ps ...predicate.Notification) *NotificationQuery
Where adds a new predicate for the NotificationQuery builder.
func (*NotificationQuery) WithComment ¶
func (nq *NotificationQuery) WithComment(opts ...func(*CommentQuery)) *NotificationQuery
WithComment tells the query-builder to eager-load the nodes that are connected to the "comment" edge. The optional arguments are used to configure the query builder of the edge.
func (*NotificationQuery) WithPost ¶
func (nq *NotificationQuery) WithPost(opts ...func(*PostQuery)) *NotificationQuery
WithPost tells the query-builder to eager-load the nodes that are connected to the "post" edge. The optional arguments are used to configure the query builder of the edge.
func (*NotificationQuery) WithReadBy ¶
func (nq *NotificationQuery) WithReadBy(opts ...func(*UserQuery)) *NotificationQuery
WithReadBy tells the query-builder to eager-load the nodes that are connected to the "read_by" edge. The optional arguments are used to configure the query builder of the edge.
func (*NotificationQuery) WithReceivers ¶
func (nq *NotificationQuery) WithReceivers(opts ...func(*UserQuery)) *NotificationQuery
WithReceivers tells the query-builder to eager-load the nodes that are connected to the "receivers" edge. The optional arguments are used to configure the query builder of the edge.
func (*NotificationQuery) WithReply ¶
func (nq *NotificationQuery) WithReply(opts ...func(*ReplyQuery)) *NotificationQuery
WithReply tells the query-builder to eager-load the nodes that are connected to the "reply" edge. The optional arguments are used to configure the query builder of the edge.
func (*NotificationQuery) WithSender ¶
func (nq *NotificationQuery) WithSender(opts ...func(*UserQuery)) *NotificationQuery
WithSender tells the query-builder to eager-load the nodes that are connected to the "sender" edge. The optional arguments are used to configure the query builder of the edge.
type NotificationSelect ¶
type NotificationSelect struct { *NotificationQuery // contains filtered or unexported fields }
NotificationSelect is the builder for selecting fields of Notification entities.
func (*NotificationSelect) Aggregate ¶
func (ns *NotificationSelect) Aggregate(fns ...AggregateFunc) *NotificationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NotificationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Scan ¶
func (ns *NotificationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NotificationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NotificationUpdate ¶
type NotificationUpdate struct {
// contains filtered or unexported fields
}
NotificationUpdate is the builder for updating Notification entities.
func (*NotificationUpdate) AddReadBy ¶
func (nu *NotificationUpdate) AddReadBy(u ...*User) *NotificationUpdate
AddReadBy adds the "read_by" edges to the User entity.
func (*NotificationUpdate) AddReadByIDs ¶
func (nu *NotificationUpdate) AddReadByIDs(ids ...uuid.UUID) *NotificationUpdate
AddReadByIDs adds the "read_by" edge to the User entity by IDs.
func (*NotificationUpdate) AddReceiverIDs ¶
func (nu *NotificationUpdate) AddReceiverIDs(ids ...uuid.UUID) *NotificationUpdate
AddReceiverIDs adds the "receivers" edge to the User entity by IDs.
func (*NotificationUpdate) AddReceivers ¶
func (nu *NotificationUpdate) AddReceivers(u ...*User) *NotificationUpdate
AddReceivers adds the "receivers" edges to the User entity.
func (*NotificationUpdate) ClearComment ¶
func (nu *NotificationUpdate) ClearComment() *NotificationUpdate
ClearComment clears the "comment" edge to the Comment entity.
func (*NotificationUpdate) ClearCommentID ¶
func (nu *NotificationUpdate) ClearCommentID() *NotificationUpdate
ClearCommentID clears the value of the "comment_id" field.
func (*NotificationUpdate) ClearPost ¶
func (nu *NotificationUpdate) ClearPost() *NotificationUpdate
ClearPost clears the "post" edge to the Post entity.
func (*NotificationUpdate) ClearPostID ¶
func (nu *NotificationUpdate) ClearPostID() *NotificationUpdate
ClearPostID clears the value of the "post_id" field.
func (*NotificationUpdate) ClearReadBy ¶
func (nu *NotificationUpdate) ClearReadBy() *NotificationUpdate
ClearReadBy clears all "read_by" edges to the User entity.
func (*NotificationUpdate) ClearReceivers ¶
func (nu *NotificationUpdate) ClearReceivers() *NotificationUpdate
ClearReceivers clears all "receivers" edges to the User entity.
func (*NotificationUpdate) ClearReply ¶
func (nu *NotificationUpdate) ClearReply() *NotificationUpdate
ClearReply clears the "reply" edge to the Reply entity.
func (*NotificationUpdate) ClearReplyID ¶
func (nu *NotificationUpdate) ClearReplyID() *NotificationUpdate
ClearReplyID clears the value of the "reply_id" field.
func (*NotificationUpdate) ClearSender ¶
func (nu *NotificationUpdate) ClearSender() *NotificationUpdate
ClearSender clears the "sender" edge to the User entity.
func (*NotificationUpdate) ClearSenderID ¶
func (nu *NotificationUpdate) ClearSenderID() *NotificationUpdate
ClearSenderID clears the value of the "sender_id" field.
func (*NotificationUpdate) ClearText ¶
func (nu *NotificationUpdate) ClearText() *NotificationUpdate
ClearText clears the value of the "text" field.
func (*NotificationUpdate) Exec ¶
func (nu *NotificationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NotificationUpdate) ExecX ¶
func (nu *NotificationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationUpdate) Mutation ¶
func (nu *NotificationUpdate) Mutation() *NotificationMutation
Mutation returns the NotificationMutation object of the builder.
func (*NotificationUpdate) RemoveReadBy ¶
func (nu *NotificationUpdate) RemoveReadBy(u ...*User) *NotificationUpdate
RemoveReadBy removes "read_by" edges to User entities.
func (*NotificationUpdate) RemoveReadByIDs ¶
func (nu *NotificationUpdate) RemoveReadByIDs(ids ...uuid.UUID) *NotificationUpdate
RemoveReadByIDs removes the "read_by" edge to User entities by IDs.
func (*NotificationUpdate) RemoveReceiverIDs ¶
func (nu *NotificationUpdate) RemoveReceiverIDs(ids ...uuid.UUID) *NotificationUpdate
RemoveReceiverIDs removes the "receivers" edge to User entities by IDs.
func (*NotificationUpdate) RemoveReceivers ¶
func (nu *NotificationUpdate) RemoveReceivers(u ...*User) *NotificationUpdate
RemoveReceivers removes "receivers" edges to User entities.
func (*NotificationUpdate) Save ¶
func (nu *NotificationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NotificationUpdate) SaveX ¶
func (nu *NotificationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NotificationUpdate) SetComment ¶
func (nu *NotificationUpdate) SetComment(c *Comment) *NotificationUpdate
SetComment sets the "comment" edge to the Comment entity.
func (*NotificationUpdate) SetCommentID ¶
func (nu *NotificationUpdate) SetCommentID(u uuid.UUID) *NotificationUpdate
SetCommentID sets the "comment_id" field.
func (*NotificationUpdate) SetCreatedAt ¶
func (nu *NotificationUpdate) SetCreatedAt(t time.Time) *NotificationUpdate
SetCreatedAt sets the "created_at" field.
func (*NotificationUpdate) SetNillableCommentID ¶
func (nu *NotificationUpdate) SetNillableCommentID(u *uuid.UUID) *NotificationUpdate
SetNillableCommentID sets the "comment_id" field if the given value is not nil.
func (*NotificationUpdate) SetNillableCreatedAt ¶
func (nu *NotificationUpdate) SetNillableCreatedAt(t *time.Time) *NotificationUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*NotificationUpdate) SetNillableNtype ¶
func (nu *NotificationUpdate) SetNillableNtype(n *notification.Ntype) *NotificationUpdate
SetNillableNtype sets the "ntype" field if the given value is not nil.
func (*NotificationUpdate) SetNillablePostID ¶
func (nu *NotificationUpdate) SetNillablePostID(u *uuid.UUID) *NotificationUpdate
SetNillablePostID sets the "post_id" field if the given value is not nil.
func (*NotificationUpdate) SetNillableReplyID ¶
func (nu *NotificationUpdate) SetNillableReplyID(u *uuid.UUID) *NotificationUpdate
SetNillableReplyID sets the "reply_id" field if the given value is not nil.
func (*NotificationUpdate) SetNillableSenderID ¶
func (nu *NotificationUpdate) SetNillableSenderID(u *uuid.UUID) *NotificationUpdate
SetNillableSenderID sets the "sender_id" field if the given value is not nil.
func (*NotificationUpdate) SetNillableText ¶
func (nu *NotificationUpdate) SetNillableText(s *string) *NotificationUpdate
SetNillableText sets the "text" field if the given value is not nil.
func (*NotificationUpdate) SetNtype ¶
func (nu *NotificationUpdate) SetNtype(n notification.Ntype) *NotificationUpdate
SetNtype sets the "ntype" field.
func (*NotificationUpdate) SetPost ¶
func (nu *NotificationUpdate) SetPost(p *Post) *NotificationUpdate
SetPost sets the "post" edge to the Post entity.
func (*NotificationUpdate) SetPostID ¶
func (nu *NotificationUpdate) SetPostID(u uuid.UUID) *NotificationUpdate
SetPostID sets the "post_id" field.
func (*NotificationUpdate) SetReply ¶
func (nu *NotificationUpdate) SetReply(r *Reply) *NotificationUpdate
SetReply sets the "reply" edge to the Reply entity.
func (*NotificationUpdate) SetReplyID ¶
func (nu *NotificationUpdate) SetReplyID(u uuid.UUID) *NotificationUpdate
SetReplyID sets the "reply_id" field.
func (*NotificationUpdate) SetSender ¶
func (nu *NotificationUpdate) SetSender(u *User) *NotificationUpdate
SetSender sets the "sender" edge to the User entity.
func (*NotificationUpdate) SetSenderID ¶
func (nu *NotificationUpdate) SetSenderID(u uuid.UUID) *NotificationUpdate
SetSenderID sets the "sender_id" field.
func (*NotificationUpdate) SetText ¶
func (nu *NotificationUpdate) SetText(s string) *NotificationUpdate
SetText sets the "text" field.
func (*NotificationUpdate) SetUpdatedAt ¶
func (nu *NotificationUpdate) SetUpdatedAt(t time.Time) *NotificationUpdate
SetUpdatedAt sets the "updated_at" field.
func (*NotificationUpdate) Where ¶
func (nu *NotificationUpdate) Where(ps ...predicate.Notification) *NotificationUpdate
Where appends a list predicates to the NotificationUpdate builder.
type NotificationUpdateOne ¶
type NotificationUpdateOne struct {
// contains filtered or unexported fields
}
NotificationUpdateOne is the builder for updating a single Notification entity.
func (*NotificationUpdateOne) AddReadBy ¶
func (nuo *NotificationUpdateOne) AddReadBy(u ...*User) *NotificationUpdateOne
AddReadBy adds the "read_by" edges to the User entity.
func (*NotificationUpdateOne) AddReadByIDs ¶
func (nuo *NotificationUpdateOne) AddReadByIDs(ids ...uuid.UUID) *NotificationUpdateOne
AddReadByIDs adds the "read_by" edge to the User entity by IDs.
func (*NotificationUpdateOne) AddReceiverIDs ¶
func (nuo *NotificationUpdateOne) AddReceiverIDs(ids ...uuid.UUID) *NotificationUpdateOne
AddReceiverIDs adds the "receivers" edge to the User entity by IDs.
func (*NotificationUpdateOne) AddReceivers ¶
func (nuo *NotificationUpdateOne) AddReceivers(u ...*User) *NotificationUpdateOne
AddReceivers adds the "receivers" edges to the User entity.
func (*NotificationUpdateOne) ClearComment ¶
func (nuo *NotificationUpdateOne) ClearComment() *NotificationUpdateOne
ClearComment clears the "comment" edge to the Comment entity.
func (*NotificationUpdateOne) ClearCommentID ¶
func (nuo *NotificationUpdateOne) ClearCommentID() *NotificationUpdateOne
ClearCommentID clears the value of the "comment_id" field.
func (*NotificationUpdateOne) ClearPost ¶
func (nuo *NotificationUpdateOne) ClearPost() *NotificationUpdateOne
ClearPost clears the "post" edge to the Post entity.
func (*NotificationUpdateOne) ClearPostID ¶
func (nuo *NotificationUpdateOne) ClearPostID() *NotificationUpdateOne
ClearPostID clears the value of the "post_id" field.
func (*NotificationUpdateOne) ClearReadBy ¶
func (nuo *NotificationUpdateOne) ClearReadBy() *NotificationUpdateOne
ClearReadBy clears all "read_by" edges to the User entity.
func (*NotificationUpdateOne) ClearReceivers ¶
func (nuo *NotificationUpdateOne) ClearReceivers() *NotificationUpdateOne
ClearReceivers clears all "receivers" edges to the User entity.
func (*NotificationUpdateOne) ClearReply ¶
func (nuo *NotificationUpdateOne) ClearReply() *NotificationUpdateOne
ClearReply clears the "reply" edge to the Reply entity.
func (*NotificationUpdateOne) ClearReplyID ¶
func (nuo *NotificationUpdateOne) ClearReplyID() *NotificationUpdateOne
ClearReplyID clears the value of the "reply_id" field.
func (*NotificationUpdateOne) ClearSender ¶
func (nuo *NotificationUpdateOne) ClearSender() *NotificationUpdateOne
ClearSender clears the "sender" edge to the User entity.
func (*NotificationUpdateOne) ClearSenderID ¶
func (nuo *NotificationUpdateOne) ClearSenderID() *NotificationUpdateOne
ClearSenderID clears the value of the "sender_id" field.
func (*NotificationUpdateOne) ClearText ¶
func (nuo *NotificationUpdateOne) ClearText() *NotificationUpdateOne
ClearText clears the value of the "text" field.
func (*NotificationUpdateOne) Exec ¶
func (nuo *NotificationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NotificationUpdateOne) ExecX ¶
func (nuo *NotificationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationUpdateOne) Mutation ¶
func (nuo *NotificationUpdateOne) Mutation() *NotificationMutation
Mutation returns the NotificationMutation object of the builder.
func (*NotificationUpdateOne) RemoveReadBy ¶
func (nuo *NotificationUpdateOne) RemoveReadBy(u ...*User) *NotificationUpdateOne
RemoveReadBy removes "read_by" edges to User entities.
func (*NotificationUpdateOne) RemoveReadByIDs ¶
func (nuo *NotificationUpdateOne) RemoveReadByIDs(ids ...uuid.UUID) *NotificationUpdateOne
RemoveReadByIDs removes the "read_by" edge to User entities by IDs.
func (*NotificationUpdateOne) RemoveReceiverIDs ¶
func (nuo *NotificationUpdateOne) RemoveReceiverIDs(ids ...uuid.UUID) *NotificationUpdateOne
RemoveReceiverIDs removes the "receivers" edge to User entities by IDs.
func (*NotificationUpdateOne) RemoveReceivers ¶
func (nuo *NotificationUpdateOne) RemoveReceivers(u ...*User) *NotificationUpdateOne
RemoveReceivers removes "receivers" edges to User entities.
func (*NotificationUpdateOne) Save ¶
func (nuo *NotificationUpdateOne) Save(ctx context.Context) (*Notification, error)
Save executes the query and returns the updated Notification entity.
func (*NotificationUpdateOne) SaveX ¶
func (nuo *NotificationUpdateOne) SaveX(ctx context.Context) *Notification
SaveX is like Save, but panics if an error occurs.
func (*NotificationUpdateOne) Select ¶
func (nuo *NotificationUpdateOne) Select(field string, fields ...string) *NotificationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NotificationUpdateOne) SetComment ¶
func (nuo *NotificationUpdateOne) SetComment(c *Comment) *NotificationUpdateOne
SetComment sets the "comment" edge to the Comment entity.
func (*NotificationUpdateOne) SetCommentID ¶
func (nuo *NotificationUpdateOne) SetCommentID(u uuid.UUID) *NotificationUpdateOne
SetCommentID sets the "comment_id" field.
func (*NotificationUpdateOne) SetCreatedAt ¶
func (nuo *NotificationUpdateOne) SetCreatedAt(t time.Time) *NotificationUpdateOne
SetCreatedAt sets the "created_at" field.
func (*NotificationUpdateOne) SetNillableCommentID ¶
func (nuo *NotificationUpdateOne) SetNillableCommentID(u *uuid.UUID) *NotificationUpdateOne
SetNillableCommentID sets the "comment_id" field if the given value is not nil.
func (*NotificationUpdateOne) SetNillableCreatedAt ¶
func (nuo *NotificationUpdateOne) SetNillableCreatedAt(t *time.Time) *NotificationUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*NotificationUpdateOne) SetNillableNtype ¶
func (nuo *NotificationUpdateOne) SetNillableNtype(n *notification.Ntype) *NotificationUpdateOne
SetNillableNtype sets the "ntype" field if the given value is not nil.
func (*NotificationUpdateOne) SetNillablePostID ¶
func (nuo *NotificationUpdateOne) SetNillablePostID(u *uuid.UUID) *NotificationUpdateOne
SetNillablePostID sets the "post_id" field if the given value is not nil.
func (*NotificationUpdateOne) SetNillableReplyID ¶
func (nuo *NotificationUpdateOne) SetNillableReplyID(u *uuid.UUID) *NotificationUpdateOne
SetNillableReplyID sets the "reply_id" field if the given value is not nil.
func (*NotificationUpdateOne) SetNillableSenderID ¶
func (nuo *NotificationUpdateOne) SetNillableSenderID(u *uuid.UUID) *NotificationUpdateOne
SetNillableSenderID sets the "sender_id" field if the given value is not nil.
func (*NotificationUpdateOne) SetNillableText ¶
func (nuo *NotificationUpdateOne) SetNillableText(s *string) *NotificationUpdateOne
SetNillableText sets the "text" field if the given value is not nil.
func (*NotificationUpdateOne) SetNtype ¶
func (nuo *NotificationUpdateOne) SetNtype(n notification.Ntype) *NotificationUpdateOne
SetNtype sets the "ntype" field.
func (*NotificationUpdateOne) SetPost ¶
func (nuo *NotificationUpdateOne) SetPost(p *Post) *NotificationUpdateOne
SetPost sets the "post" edge to the Post entity.
func (*NotificationUpdateOne) SetPostID ¶
func (nuo *NotificationUpdateOne) SetPostID(u uuid.UUID) *NotificationUpdateOne
SetPostID sets the "post_id" field.
func (*NotificationUpdateOne) SetReply ¶
func (nuo *NotificationUpdateOne) SetReply(r *Reply) *NotificationUpdateOne
SetReply sets the "reply" edge to the Reply entity.
func (*NotificationUpdateOne) SetReplyID ¶
func (nuo *NotificationUpdateOne) SetReplyID(u uuid.UUID) *NotificationUpdateOne
SetReplyID sets the "reply_id" field.
func (*NotificationUpdateOne) SetSender ¶
func (nuo *NotificationUpdateOne) SetSender(u *User) *NotificationUpdateOne
SetSender sets the "sender" edge to the User entity.
func (*NotificationUpdateOne) SetSenderID ¶
func (nuo *NotificationUpdateOne) SetSenderID(u uuid.UUID) *NotificationUpdateOne
SetSenderID sets the "sender_id" field.
func (*NotificationUpdateOne) SetText ¶
func (nuo *NotificationUpdateOne) SetText(s string) *NotificationUpdateOne
SetText sets the "text" field.
func (*NotificationUpdateOne) SetUpdatedAt ¶
func (nuo *NotificationUpdateOne) SetUpdatedAt(t time.Time) *NotificationUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*NotificationUpdateOne) Where ¶
func (nuo *NotificationUpdateOne) Where(ps ...predicate.Notification) *NotificationUpdateOne
Where appends a list predicates to the NotificationUpdate builder.
type Notifications ¶
type Notifications []*Notification
Notifications is a parsable slice of Notification.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type Otp ¶
type Otp struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Code holds the value of the "code" field. Code uint32 `json:"code,omitempty"` // UserID holds the value of the "user_id" field. UserID uuid.UUID `json:"user_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the OtpQuery when eager-loading is set. Edges OtpEdges `json:"edges"` // contains filtered or unexported fields }
Otp is the model entity for the Otp schema.
func (*Otp) Unwrap ¶
Unwrap unwraps the Otp 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 (*Otp) Update ¶
func (o *Otp) Update() *OtpUpdateOne
Update returns a builder for updating this Otp. Note that you need to call Otp.Unwrap() before calling this method if this Otp was returned from a transaction, and the transaction was committed or rolled back.
type OtpClient ¶
type OtpClient struct {
// contains filtered or unexported fields
}
OtpClient is a client for the Otp schema.
func NewOtpClient ¶
func NewOtpClient(c config) *OtpClient
NewOtpClient returns a client for the Otp from the given config.
func (*OtpClient) CreateBulk ¶
func (c *OtpClient) CreateBulk(builders ...*OtpCreate) *OtpCreateBulk
CreateBulk returns a builder for creating a bulk of Otp entities.
func (*OtpClient) DeleteOne ¶
func (c *OtpClient) DeleteOne(o *Otp) *OtpDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OtpClient) DeleteOneID ¶
func (c *OtpClient) DeleteOneID(id uuid.UUID) *OtpDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OtpClient) Intercept ¶
func (c *OtpClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `otp.Intercept(f(g(h())))`.
func (*OtpClient) Interceptors ¶
func (c *OtpClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OtpClient) MapCreateBulk ¶
func (c *OtpClient) MapCreateBulk(slice any, setFunc func(*OtpCreate, int)) *OtpCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*OtpClient) UpdateOne ¶
func (c *OtpClient) UpdateOne(o *Otp) *OtpUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OtpClient) UpdateOneID ¶
func (c *OtpClient) UpdateOneID(id uuid.UUID) *OtpUpdateOne
UpdateOneID returns an update builder for the given id.
type OtpCreate ¶
type OtpCreate struct {
// contains filtered or unexported fields
}
OtpCreate is the builder for creating a Otp entity.
func (*OtpCreate) Mutation ¶
func (oc *OtpCreate) Mutation() *OtpMutation
Mutation returns the OtpMutation object of the builder.
func (*OtpCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*OtpCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OtpCreate) SetNillableID ¶
SetNillableID sets the "id" field if the given value is not nil.
func (*OtpCreate) SetNillableUpdatedAt ¶
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OtpCreate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
type OtpCreateBulk ¶
type OtpCreateBulk struct {
// contains filtered or unexported fields
}
OtpCreateBulk is the builder for creating many Otp entities in bulk.
func (*OtpCreateBulk) Exec ¶
func (ocb *OtpCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OtpCreateBulk) ExecX ¶
func (ocb *OtpCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type OtpDelete ¶
type OtpDelete struct {
// contains filtered or unexported fields
}
OtpDelete is the builder for deleting a Otp entity.
func (*OtpDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type OtpDeleteOne ¶
type OtpDeleteOne struct {
// contains filtered or unexported fields
}
OtpDeleteOne is the builder for deleting a single Otp entity.
func (*OtpDeleteOne) Exec ¶
func (odo *OtpDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OtpDeleteOne) ExecX ¶
func (odo *OtpDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OtpDeleteOne) Where ¶
func (odo *OtpDeleteOne) Where(ps ...predicate.Otp) *OtpDeleteOne
Where appends a list predicates to the OtpDelete builder.
type OtpEdges ¶
type OtpEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
OtpEdges holds the relations/edges for other nodes in the graph.
type OtpGroupBy ¶
type OtpGroupBy struct {
// contains filtered or unexported fields
}
OtpGroupBy is the group-by builder for Otp entities.
func (*OtpGroupBy) Aggregate ¶
func (ogb *OtpGroupBy) Aggregate(fns ...AggregateFunc) *OtpGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OtpGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OtpGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OtpGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OtpGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OtpGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OtpGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OtpGroupBy) Scan ¶
func (ogb *OtpGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OtpGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OtpMutation ¶
type OtpMutation struct {
// contains filtered or unexported fields
}
OtpMutation represents an operation that mutates the Otp nodes in the graph.
func (*OtpMutation) AddCode ¶
func (m *OtpMutation) AddCode(u int32)
AddCode adds u to the "code" field.
func (*OtpMutation) AddField ¶
func (m *OtpMutation) 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 (*OtpMutation) AddedCode ¶
func (m *OtpMutation) AddedCode() (r int32, exists bool)
AddedCode returns the value that was added to the "code" field in this mutation.
func (*OtpMutation) AddedEdges ¶
func (m *OtpMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OtpMutation) AddedField ¶
func (m *OtpMutation) 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 (*OtpMutation) AddedFields ¶
func (m *OtpMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OtpMutation) AddedIDs ¶
func (m *OtpMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OtpMutation) ClearEdge ¶
func (m *OtpMutation) 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 (*OtpMutation) ClearField ¶
func (m *OtpMutation) 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 (*OtpMutation) ClearUser ¶
func (m *OtpMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*OtpMutation) ClearedEdges ¶
func (m *OtpMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OtpMutation) ClearedFields ¶
func (m *OtpMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OtpMutation) Client ¶
func (m OtpMutation) 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 (*OtpMutation) Code ¶
func (m *OtpMutation) Code() (r uint32, exists bool)
Code returns the value of the "code" field in the mutation.
func (*OtpMutation) CreatedAt ¶
func (m *OtpMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OtpMutation) EdgeCleared ¶
func (m *OtpMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OtpMutation) Field ¶
func (m *OtpMutation) 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 (*OtpMutation) FieldCleared ¶
func (m *OtpMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OtpMutation) Fields ¶
func (m *OtpMutation) 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 (*OtpMutation) ID ¶
func (m *OtpMutation) 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 (*OtpMutation) 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 (*OtpMutation) OldCode ¶
func (m *OtpMutation) OldCode(ctx context.Context) (v uint32, err error)
OldCode returns the old "code" field's value of the Otp entity. If the Otp 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 (*OtpMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Otp entity. If the Otp 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 (*OtpMutation) 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 (*OtpMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Otp entity. If the Otp 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 (*OtpMutation) OldUserID ¶
OldUserID returns the old "user_id" field's value of the Otp entity. If the Otp 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 (*OtpMutation) RemovedEdges ¶
func (m *OtpMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OtpMutation) RemovedIDs ¶
func (m *OtpMutation) 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 (*OtpMutation) ResetCode ¶
func (m *OtpMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*OtpMutation) ResetCreatedAt ¶
func (m *OtpMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OtpMutation) ResetEdge ¶
func (m *OtpMutation) 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 (*OtpMutation) ResetField ¶
func (m *OtpMutation) 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 (*OtpMutation) ResetUpdatedAt ¶
func (m *OtpMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OtpMutation) ResetUser ¶
func (m *OtpMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*OtpMutation) ResetUserID ¶
func (m *OtpMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*OtpMutation) SetCode ¶
func (m *OtpMutation) SetCode(u uint32)
SetCode sets the "code" field.
func (*OtpMutation) SetCreatedAt ¶
func (m *OtpMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OtpMutation) SetField ¶
func (m *OtpMutation) 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 (*OtpMutation) SetID ¶
func (m *OtpMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Otp entities.
func (*OtpMutation) SetOp ¶
func (m *OtpMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OtpMutation) SetUpdatedAt ¶
func (m *OtpMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OtpMutation) SetUserID ¶
func (m *OtpMutation) SetUserID(u uuid.UUID)
SetUserID sets the "user_id" field.
func (OtpMutation) Tx ¶
func (m OtpMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OtpMutation) Type ¶
func (m *OtpMutation) Type() string
Type returns the node type of this mutation (Otp).
func (*OtpMutation) UpdatedAt ¶
func (m *OtpMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OtpMutation) UserCleared ¶
func (m *OtpMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*OtpMutation) UserID ¶
func (m *OtpMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*OtpMutation) UserIDs ¶
func (m *OtpMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*OtpMutation) Where ¶
func (m *OtpMutation) Where(ps ...predicate.Otp)
Where appends a list predicates to the OtpMutation builder.
func (*OtpMutation) WhereP ¶
func (m *OtpMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OtpMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OtpQuery ¶
type OtpQuery struct {
// contains filtered or unexported fields
}
OtpQuery is the builder for querying Otp entities.
func (*OtpQuery) Aggregate ¶
func (oq *OtpQuery) Aggregate(fns ...AggregateFunc) *OtpSelect
Aggregate returns a OtpSelect configured with the given aggregations.
func (*OtpQuery) Clone ¶
Clone returns a duplicate of the OtpQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OtpQuery) First ¶
First returns the first Otp entity from the query. Returns a *NotFoundError when no Otp was found.
func (*OtpQuery) FirstID ¶
FirstID returns the first Otp ID from the query. Returns a *NotFoundError when no Otp ID was found.
func (*OtpQuery) GroupBy ¶
func (oq *OtpQuery) GroupBy(field string, fields ...string) *OtpGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Otp.Query(). GroupBy(otp.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OtpQuery) Only ¶
Only returns a single Otp entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Otp entity is found. Returns a *NotFoundError when no Otp entities are found.
func (*OtpQuery) OnlyID ¶
OnlyID is like Only, but returns the only Otp ID in the query. Returns a *NotSingularError when more than one Otp ID is found. Returns a *NotFoundError when no entities are found.
func (*OtpQuery) Order ¶
func (oq *OtpQuery) Order(o ...otp.OrderOption) *OtpQuery
Order specifies how the records should be ordered.
func (*OtpQuery) Select ¶
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Otp.Query(). Select(otp.FieldCreatedAt). Scan(ctx, &v)
func (*OtpQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
type OtpSelect ¶
type OtpSelect struct { *OtpQuery // contains filtered or unexported fields }
OtpSelect is the builder for selecting fields of Otp entities.
func (*OtpSelect) Aggregate ¶
func (os *OtpSelect) Aggregate(fns ...AggregateFunc) *OtpSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OtpSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OtpSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OtpSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OtpSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OtpSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OtpSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OtpSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OtpUpdate ¶
type OtpUpdate struct {
// contains filtered or unexported fields
}
OtpUpdate is the builder for updating Otp entities.
func (*OtpUpdate) Mutation ¶
func (ou *OtpUpdate) Mutation() *OtpMutation
Mutation returns the OtpMutation object of the builder.
func (*OtpUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*OtpUpdate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*OtpUpdate) SetNillableCode ¶
SetNillableCode sets the "code" field if the given value is not nil.
func (*OtpUpdate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OtpUpdate) SetNillableUserID ¶
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OtpUpdate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
type OtpUpdateOne ¶
type OtpUpdateOne struct {
// contains filtered or unexported fields
}
OtpUpdateOne is the builder for updating a single Otp entity.
func (*OtpUpdateOne) AddCode ¶
func (ouo *OtpUpdateOne) AddCode(u int32) *OtpUpdateOne
AddCode adds u to the "code" field.
func (*OtpUpdateOne) ClearUser ¶
func (ouo *OtpUpdateOne) ClearUser() *OtpUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*OtpUpdateOne) Exec ¶
func (ouo *OtpUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OtpUpdateOne) ExecX ¶
func (ouo *OtpUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OtpUpdateOne) Mutation ¶
func (ouo *OtpUpdateOne) Mutation() *OtpMutation
Mutation returns the OtpMutation object of the builder.
func (*OtpUpdateOne) Save ¶
func (ouo *OtpUpdateOne) Save(ctx context.Context) (*Otp, error)
Save executes the query and returns the updated Otp entity.
func (*OtpUpdateOne) SaveX ¶
func (ouo *OtpUpdateOne) SaveX(ctx context.Context) *Otp
SaveX is like Save, but panics if an error occurs.
func (*OtpUpdateOne) Select ¶
func (ouo *OtpUpdateOne) Select(field string, fields ...string) *OtpUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OtpUpdateOne) SetCode ¶
func (ouo *OtpUpdateOne) SetCode(u uint32) *OtpUpdateOne
SetCode sets the "code" field.
func (*OtpUpdateOne) SetCreatedAt ¶
func (ouo *OtpUpdateOne) SetCreatedAt(t time.Time) *OtpUpdateOne
SetCreatedAt sets the "created_at" field.
func (*OtpUpdateOne) SetNillableCode ¶
func (ouo *OtpUpdateOne) SetNillableCode(u *uint32) *OtpUpdateOne
SetNillableCode sets the "code" field if the given value is not nil.
func (*OtpUpdateOne) SetNillableCreatedAt ¶
func (ouo *OtpUpdateOne) SetNillableCreatedAt(t *time.Time) *OtpUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OtpUpdateOne) SetNillableUserID ¶
func (ouo *OtpUpdateOne) SetNillableUserID(u *uuid.UUID) *OtpUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OtpUpdateOne) SetUpdatedAt ¶
func (ouo *OtpUpdateOne) SetUpdatedAt(t time.Time) *OtpUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OtpUpdateOne) SetUser ¶
func (ouo *OtpUpdateOne) SetUser(u *User) *OtpUpdateOne
SetUser sets the "user" edge to the User entity.
func (*OtpUpdateOne) SetUserID ¶
func (ouo *OtpUpdateOne) SetUserID(u uuid.UUID) *OtpUpdateOne
SetUserID sets the "user_id" field.
func (*OtpUpdateOne) Where ¶
func (ouo *OtpUpdateOne) Where(ps ...predicate.Otp) *OtpUpdateOne
Where appends a list predicates to the OtpUpdate builder.
type Post ¶
type Post struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // Slug holds the value of the "slug" field. Slug string `json:"slug,omitempty"` // AuthorID holds the value of the "author_id" field. AuthorID uuid.UUID `json:"author_id,omitempty"` // ImageID holds the value of the "image_id" field. ImageID *uuid.UUID `json:"image_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PostQuery when eager-loading is set. Edges PostEdges `json:"edges"` // contains filtered or unexported fields }
Post is the model entity for the Post schema.
func (*Post) QueryAuthor ¶
QueryAuthor queries the "author" edge of the Post entity.
func (*Post) QueryComments ¶
func (po *Post) QueryComments() *CommentQuery
QueryComments queries the "comments" edge of the Post entity.
func (*Post) QueryImage ¶
QueryImage queries the "image" edge of the Post entity.
func (*Post) QueryNotifications ¶
func (po *Post) QueryNotifications() *NotificationQuery
QueryNotifications queries the "notifications" edge of the Post entity.
func (*Post) QueryReactions ¶
func (po *Post) QueryReactions() *ReactionQuery
QueryReactions queries the "reactions" edge of the Post entity.
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) Intercept ¶
func (c *PostClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `post.Intercept(f(g(h())))`.
func (*PostClient) Interceptors ¶
func (c *PostClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PostClient) MapCreateBulk ¶
func (c *PostClient) MapCreateBulk(slice any, setFunc func(*PostCreate, int)) *PostCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PostClient) Query ¶
func (c *PostClient) Query() *PostQuery
Query returns a query builder for Post.
func (*PostClient) QueryAuthor ¶
func (c *PostClient) QueryAuthor(po *Post) *UserQuery
QueryAuthor queries the author edge of a Post.
func (*PostClient) QueryComments ¶
func (c *PostClient) QueryComments(po *Post) *CommentQuery
QueryComments queries the comments edge of a Post.
func (*PostClient) QueryImage ¶
func (c *PostClient) QueryImage(po *Post) *FileQuery
QueryImage queries the image edge of a Post.
func (*PostClient) QueryNotifications ¶
func (c *PostClient) QueryNotifications(po *Post) *NotificationQuery
QueryNotifications queries the notifications edge of a Post.
func (*PostClient) QueryReactions ¶
func (c *PostClient) QueryReactions(po *Post) *ReactionQuery
QueryReactions queries the reactions edge of a 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) AddCommentIDs ¶
func (pc *PostCreate) AddCommentIDs(ids ...uuid.UUID) *PostCreate
AddCommentIDs adds the "comments" edge to the Comment entity by IDs.
func (*PostCreate) AddComments ¶
func (pc *PostCreate) AddComments(c ...*Comment) *PostCreate
AddComments adds the "comments" edges to the Comment entity.
func (*PostCreate) AddNotificationIDs ¶
func (pc *PostCreate) AddNotificationIDs(ids ...uuid.UUID) *PostCreate
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*PostCreate) AddNotifications ¶
func (pc *PostCreate) AddNotifications(n ...*Notification) *PostCreate
AddNotifications adds the "notifications" edges to the Notification entity.
func (*PostCreate) AddReactionIDs ¶
func (pc *PostCreate) AddReactionIDs(ids ...uuid.UUID) *PostCreate
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*PostCreate) AddReactions ¶
func (pc *PostCreate) AddReactions(r ...*Reaction) *PostCreate
AddReactions adds the "reactions" edges to the Reaction 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) SetAuthor ¶
func (pc *PostCreate) SetAuthor(u *User) *PostCreate
SetAuthor sets the "author" edge to the User entity.
func (*PostCreate) SetAuthorID ¶
func (pc *PostCreate) SetAuthorID(u uuid.UUID) *PostCreate
SetAuthorID sets the "author_id" field.
func (*PostCreate) SetCreatedAt ¶
func (pc *PostCreate) SetCreatedAt(t time.Time) *PostCreate
SetCreatedAt sets the "created_at" field.
func (*PostCreate) SetID ¶
func (pc *PostCreate) SetID(u uuid.UUID) *PostCreate
SetID sets the "id" field.
func (*PostCreate) SetImage ¶
func (pc *PostCreate) SetImage(f *File) *PostCreate
SetImage sets the "image" edge to the File entity.
func (*PostCreate) SetImageID ¶
func (pc *PostCreate) SetImageID(u uuid.UUID) *PostCreate
SetImageID sets the "image_id" 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) SetNillableID ¶
func (pc *PostCreate) SetNillableID(u *uuid.UUID) *PostCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*PostCreate) SetNillableImageID ¶
func (pc *PostCreate) SetNillableImageID(u *uuid.UUID) *PostCreate
SetNillableImageID sets the "image_id" field if the given value is not nil.
func (*PostCreate) SetNillableUpdatedAt ¶
func (pc *PostCreate) SetNillableUpdatedAt(t *time.Time) *PostCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PostCreate) SetSlug ¶
func (pc *PostCreate) SetSlug(s string) *PostCreate
SetSlug sets the "slug" field.
func (*PostCreate) SetText ¶
func (pc *PostCreate) SetText(s string) *PostCreate
SetText sets the "text" field.
func (*PostCreate) SetUpdatedAt ¶
func (pc *PostCreate) SetUpdatedAt(t time.Time) *PostCreate
SetUpdatedAt sets the "updated_at" 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.
func (*PostDeleteOne) Where ¶
func (pdo *PostDeleteOne) Where(ps ...predicate.Post) *PostDeleteOne
Where appends a list predicates to the PostDelete builder.
type PostEdges ¶
type PostEdges struct { // Reactions holds the value of the reactions edge. Reactions []*Reaction `json:"reactions,omitempty"` // Author holds the value of the author edge. Author *User `json:"author,omitempty"` // Image holds the value of the image edge. Image *File `json:"image,omitempty"` // Comments holds the value of the comments edge. Comments []*Comment `json:"comments,omitempty"` // Notifications holds the value of the notifications edge. Notifications []*Notification `json:"notifications,omitempty"` // contains filtered or unexported fields }
PostEdges holds the relations/edges for other nodes in the graph.
func (PostEdges) AuthorOrErr ¶
AuthorOrErr returns the Author value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PostEdges) CommentsOrErr ¶
CommentsOrErr returns the Comments value or an error if the edge was not loaded in eager-loading.
func (PostEdges) ImageOrErr ¶
ImageOrErr returns the Image value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PostEdges) NotificationsOrErr ¶
func (e PostEdges) NotificationsOrErr() ([]*Notification, error)
NotificationsOrErr returns the Notifications value or an error if the edge was not loaded in eager-loading.
func (PostEdges) ReactionsOrErr ¶
ReactionsOrErr returns the Reactions value or an error if the edge was not loaded in eager-loading.
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 selector 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) AddCommentIDs ¶
func (m *PostMutation) AddCommentIDs(ids ...uuid.UUID)
AddCommentIDs adds the "comments" edge to the Comment entity by ids.
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) AddNotificationIDs ¶
func (m *PostMutation) AddNotificationIDs(ids ...uuid.UUID)
AddNotificationIDs adds the "notifications" edge to the Notification entity by ids.
func (*PostMutation) AddReactionIDs ¶
func (m *PostMutation) AddReactionIDs(ids ...uuid.UUID)
AddReactionIDs adds the "reactions" edge to the Reaction entity by ids.
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) 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) AuthorCleared ¶
func (m *PostMutation) AuthorCleared() bool
AuthorCleared reports if the "author" edge to the User entity was cleared.
func (*PostMutation) AuthorID ¶
func (m *PostMutation) AuthorID() (r uuid.UUID, exists bool)
AuthorID returns the value of the "author_id" field in the mutation.
func (*PostMutation) AuthorIDs ¶
func (m *PostMutation) AuthorIDs() (ids []uuid.UUID)
AuthorIDs returns the "author" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AuthorID instead. It exists only for internal usage by the builders.
func (*PostMutation) ClearAuthor ¶
func (m *PostMutation) ClearAuthor()
ClearAuthor clears the "author" edge to the User entity.
func (*PostMutation) ClearComments ¶
func (m *PostMutation) ClearComments()
ClearComments clears the "comments" edge to the Comment entity.
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) ClearImage ¶
func (m *PostMutation) ClearImage()
ClearImage clears the "image" edge to the File entity.
func (*PostMutation) ClearImageID ¶
func (m *PostMutation) ClearImageID()
ClearImageID clears the value of the "image_id" field.
func (*PostMutation) ClearNotifications ¶
func (m *PostMutation) ClearNotifications()
ClearNotifications clears the "notifications" edge to the Notification entity.
func (*PostMutation) ClearReactions ¶
func (m *PostMutation) ClearReactions()
ClearReactions clears the "reactions" edge to the Reaction entity.
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) CommentsCleared ¶
func (m *PostMutation) CommentsCleared() bool
CommentsCleared reports if the "comments" edge to the Comment entity was cleared.
func (*PostMutation) CommentsIDs ¶
func (m *PostMutation) CommentsIDs() (ids []uuid.UUID)
CommentsIDs returns the "comments" edge IDs in the mutation.
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) 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) ImageCleared ¶
func (m *PostMutation) ImageCleared() bool
ImageCleared reports if the "image" edge to the File entity was cleared.
func (*PostMutation) ImageID ¶
func (m *PostMutation) ImageID() (r uuid.UUID, exists bool)
ImageID returns the value of the "image_id" field in the mutation.
func (*PostMutation) ImageIDCleared ¶
func (m *PostMutation) ImageIDCleared() bool
ImageIDCleared returns if the "image_id" field was cleared in this mutation.
func (*PostMutation) ImageIDs ¶
func (m *PostMutation) ImageIDs() (ids []uuid.UUID)
ImageIDs returns the "image" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ImageID instead. It exists only for internal usage by the builders.
func (*PostMutation) NotificationsCleared ¶
func (m *PostMutation) NotificationsCleared() bool
NotificationsCleared reports if the "notifications" edge to the Notification entity was cleared.
func (*PostMutation) NotificationsIDs ¶
func (m *PostMutation) NotificationsIDs() (ids []uuid.UUID)
NotificationsIDs returns the "notifications" edge IDs in the mutation.
func (*PostMutation) OldAuthorID ¶
OldAuthorID returns the old "author_id" 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) 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) OldImageID ¶
OldImageID returns the old "image_id" 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) OldSlug ¶
func (m *PostMutation) OldSlug(ctx context.Context) (v string, err error)
OldSlug returns the old "slug" 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) OldText ¶
func (m *PostMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" 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) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_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) ReactionsCleared ¶
func (m *PostMutation) ReactionsCleared() bool
ReactionsCleared reports if the "reactions" edge to the Reaction entity was cleared.
func (*PostMutation) ReactionsIDs ¶
func (m *PostMutation) ReactionsIDs() (ids []uuid.UUID)
ReactionsIDs returns the "reactions" edge IDs in the mutation.
func (*PostMutation) RemoveCommentIDs ¶
func (m *PostMutation) RemoveCommentIDs(ids ...uuid.UUID)
RemoveCommentIDs removes the "comments" edge to the Comment entity by IDs.
func (*PostMutation) RemoveNotificationIDs ¶
func (m *PostMutation) RemoveNotificationIDs(ids ...uuid.UUID)
RemoveNotificationIDs removes the "notifications" edge to the Notification entity by IDs.
func (*PostMutation) RemoveReactionIDs ¶
func (m *PostMutation) RemoveReactionIDs(ids ...uuid.UUID)
RemoveReactionIDs removes the "reactions" edge to the Reaction entity by IDs.
func (*PostMutation) RemovedCommentsIDs ¶
func (m *PostMutation) RemovedCommentsIDs() (ids []uuid.UUID)
RemovedComments returns the removed IDs of the "comments" edge to the Comment entity.
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) RemovedNotificationsIDs ¶
func (m *PostMutation) RemovedNotificationsIDs() (ids []uuid.UUID)
RemovedNotifications returns the removed IDs of the "notifications" edge to the Notification entity.
func (*PostMutation) RemovedReactionsIDs ¶
func (m *PostMutation) RemovedReactionsIDs() (ids []uuid.UUID)
RemovedReactions returns the removed IDs of the "reactions" edge to the Reaction entity.
func (*PostMutation) ResetAuthor ¶
func (m *PostMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" edge.
func (*PostMutation) ResetAuthorID ¶
func (m *PostMutation) ResetAuthorID()
ResetAuthorID resets all changes to the "author_id" field.
func (*PostMutation) ResetComments ¶
func (m *PostMutation) ResetComments()
ResetComments resets all changes to the "comments" edge.
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) ResetImage ¶
func (m *PostMutation) ResetImage()
ResetImage resets all changes to the "image" edge.
func (*PostMutation) ResetImageID ¶
func (m *PostMutation) ResetImageID()
ResetImageID resets all changes to the "image_id" field.
func (*PostMutation) ResetNotifications ¶
func (m *PostMutation) ResetNotifications()
ResetNotifications resets all changes to the "notifications" edge.
func (*PostMutation) ResetReactions ¶
func (m *PostMutation) ResetReactions()
ResetReactions resets all changes to the "reactions" edge.
func (*PostMutation) ResetSlug ¶
func (m *PostMutation) ResetSlug()
ResetSlug resets all changes to the "slug" field.
func (*PostMutation) ResetText ¶
func (m *PostMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*PostMutation) ResetUpdatedAt ¶
func (m *PostMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PostMutation) SetAuthorID ¶
func (m *PostMutation) SetAuthorID(u uuid.UUID)
SetAuthorID sets the "author_id" 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) 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) SetImageID ¶
func (m *PostMutation) SetImageID(u uuid.UUID)
SetImageID sets the "image_id" field.
func (*PostMutation) SetOp ¶
func (m *PostMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PostMutation) SetSlug ¶
func (m *PostMutation) SetSlug(s string)
SetSlug sets the "slug" field.
func (*PostMutation) SetText ¶
func (m *PostMutation) SetText(s string)
SetText sets the "text" field.
func (*PostMutation) SetUpdatedAt ¶
func (m *PostMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PostMutation) Slug ¶
func (m *PostMutation) Slug() (r string, exists bool)
Slug returns the value of the "slug" field in the mutation.
func (*PostMutation) Text ¶
func (m *PostMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
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) UpdatedAt ¶
func (m *PostMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PostMutation) Where ¶
func (m *PostMutation) Where(ps ...predicate.Post)
Where appends a list predicates to the PostMutation builder.
func (*PostMutation) WhereP ¶
func (m *PostMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PostMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Post.Query(). GroupBy(post.FieldCreatedAt). 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) Order ¶
func (pq *PostQuery) Order(o ...post.OrderOption) *PostQuery
Order specifies how the records should be ordered.
func (*PostQuery) QueryAuthor ¶
QueryAuthor chains the current query on the "author" edge.
func (*PostQuery) QueryComments ¶
func (pq *PostQuery) QueryComments() *CommentQuery
QueryComments chains the current query on the "comments" edge.
func (*PostQuery) QueryImage ¶
QueryImage chains the current query on the "image" edge.
func (*PostQuery) QueryNotifications ¶
func (pq *PostQuery) QueryNotifications() *NotificationQuery
QueryNotifications chains the current query on the "notifications" edge.
func (*PostQuery) QueryReactions ¶
func (pq *PostQuery) QueryReactions() *ReactionQuery
QueryReactions chains the current query on the "reactions" edge.
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Post.Query(). Select(post.FieldCreatedAt). Scan(ctx, &v)
func (*PostQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PostQuery) WithAuthor ¶
WithAuthor tells the query-builder to eager-load the nodes that are connected to the "author" edge. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithComments ¶
func (pq *PostQuery) WithComments(opts ...func(*CommentQuery)) *PostQuery
WithComments tells the query-builder to eager-load the nodes that are connected to the "comments" edge. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithImage ¶
WithImage tells the query-builder to eager-load the nodes that are connected to the "image" edge. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithNotifications ¶
func (pq *PostQuery) WithNotifications(opts ...func(*NotificationQuery)) *PostQuery
WithNotifications tells the query-builder to eager-load the nodes that are connected to the "notifications" edge. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithReactions ¶
func (pq *PostQuery) WithReactions(opts ...func(*ReactionQuery)) *PostQuery
WithReactions tells the query-builder to eager-load the nodes that are connected to the "reactions" edge. The optional arguments are used to configure the query builder of the edge.
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) AddCommentIDs ¶
func (pu *PostUpdate) AddCommentIDs(ids ...uuid.UUID) *PostUpdate
AddCommentIDs adds the "comments" edge to the Comment entity by IDs.
func (*PostUpdate) AddComments ¶
func (pu *PostUpdate) AddComments(c ...*Comment) *PostUpdate
AddComments adds the "comments" edges to the Comment entity.
func (*PostUpdate) AddNotificationIDs ¶
func (pu *PostUpdate) AddNotificationIDs(ids ...uuid.UUID) *PostUpdate
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*PostUpdate) AddNotifications ¶
func (pu *PostUpdate) AddNotifications(n ...*Notification) *PostUpdate
AddNotifications adds the "notifications" edges to the Notification entity.
func (*PostUpdate) AddReactionIDs ¶
func (pu *PostUpdate) AddReactionIDs(ids ...uuid.UUID) *PostUpdate
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*PostUpdate) AddReactions ¶
func (pu *PostUpdate) AddReactions(r ...*Reaction) *PostUpdate
AddReactions adds the "reactions" edges to the Reaction entity.
func (*PostUpdate) ClearAuthor ¶
func (pu *PostUpdate) ClearAuthor() *PostUpdate
ClearAuthor clears the "author" edge to the User entity.
func (*PostUpdate) ClearComments ¶
func (pu *PostUpdate) ClearComments() *PostUpdate
ClearComments clears all "comments" edges to the Comment entity.
func (*PostUpdate) ClearImage ¶
func (pu *PostUpdate) ClearImage() *PostUpdate
ClearImage clears the "image" edge to the File entity.
func (*PostUpdate) ClearImageID ¶
func (pu *PostUpdate) ClearImageID() *PostUpdate
ClearImageID clears the value of the "image_id" field.
func (*PostUpdate) ClearNotifications ¶
func (pu *PostUpdate) ClearNotifications() *PostUpdate
ClearNotifications clears all "notifications" edges to the Notification entity.
func (*PostUpdate) ClearReactions ¶
func (pu *PostUpdate) ClearReactions() *PostUpdate
ClearReactions clears all "reactions" edges to the Reaction entity.
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) RemoveCommentIDs ¶
func (pu *PostUpdate) RemoveCommentIDs(ids ...uuid.UUID) *PostUpdate
RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.
func (*PostUpdate) RemoveComments ¶
func (pu *PostUpdate) RemoveComments(c ...*Comment) *PostUpdate
RemoveComments removes "comments" edges to Comment entities.
func (*PostUpdate) RemoveNotificationIDs ¶
func (pu *PostUpdate) RemoveNotificationIDs(ids ...uuid.UUID) *PostUpdate
RemoveNotificationIDs removes the "notifications" edge to Notification entities by IDs.
func (*PostUpdate) RemoveNotifications ¶
func (pu *PostUpdate) RemoveNotifications(n ...*Notification) *PostUpdate
RemoveNotifications removes "notifications" edges to Notification entities.
func (*PostUpdate) RemoveReactionIDs ¶
func (pu *PostUpdate) RemoveReactionIDs(ids ...uuid.UUID) *PostUpdate
RemoveReactionIDs removes the "reactions" edge to Reaction entities by IDs.
func (*PostUpdate) RemoveReactions ¶
func (pu *PostUpdate) RemoveReactions(r ...*Reaction) *PostUpdate
RemoveReactions removes "reactions" edges to Reaction entities.
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) SetAuthor ¶
func (pu *PostUpdate) SetAuthor(u *User) *PostUpdate
SetAuthor sets the "author" edge to the User entity.
func (*PostUpdate) SetAuthorID ¶
func (pu *PostUpdate) SetAuthorID(u uuid.UUID) *PostUpdate
SetAuthorID sets the "author_id" field.
func (*PostUpdate) SetCreatedAt ¶
func (pu *PostUpdate) SetCreatedAt(t time.Time) *PostUpdate
SetCreatedAt sets the "created_at" field.
func (*PostUpdate) SetImage ¶
func (pu *PostUpdate) SetImage(f *File) *PostUpdate
SetImage sets the "image" edge to the File entity.
func (*PostUpdate) SetImageID ¶
func (pu *PostUpdate) SetImageID(u uuid.UUID) *PostUpdate
SetImageID sets the "image_id" field.
func (*PostUpdate) SetNillableAuthorID ¶
func (pu *PostUpdate) SetNillableAuthorID(u *uuid.UUID) *PostUpdate
SetNillableAuthorID sets the "author_id" field if the given value is not nil.
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) SetNillableImageID ¶
func (pu *PostUpdate) SetNillableImageID(u *uuid.UUID) *PostUpdate
SetNillableImageID sets the "image_id" field if the given value is not nil.
func (*PostUpdate) SetNillableSlug ¶
func (pu *PostUpdate) SetNillableSlug(s *string) *PostUpdate
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*PostUpdate) SetNillableText ¶
func (pu *PostUpdate) SetNillableText(s *string) *PostUpdate
SetNillableText sets the "text" field if the given value is not nil.
func (*PostUpdate) SetSlug ¶
func (pu *PostUpdate) SetSlug(s string) *PostUpdate
SetSlug sets the "slug" field.
func (*PostUpdate) SetText ¶
func (pu *PostUpdate) SetText(s string) *PostUpdate
SetText sets the "text" field.
func (*PostUpdate) SetUpdatedAt ¶
func (pu *PostUpdate) SetUpdatedAt(t time.Time) *PostUpdate
SetUpdatedAt sets the "updated_at" 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) AddCommentIDs ¶
func (puo *PostUpdateOne) AddCommentIDs(ids ...uuid.UUID) *PostUpdateOne
AddCommentIDs adds the "comments" edge to the Comment entity by IDs.
func (*PostUpdateOne) AddComments ¶
func (puo *PostUpdateOne) AddComments(c ...*Comment) *PostUpdateOne
AddComments adds the "comments" edges to the Comment entity.
func (*PostUpdateOne) AddNotificationIDs ¶
func (puo *PostUpdateOne) AddNotificationIDs(ids ...uuid.UUID) *PostUpdateOne
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*PostUpdateOne) AddNotifications ¶
func (puo *PostUpdateOne) AddNotifications(n ...*Notification) *PostUpdateOne
AddNotifications adds the "notifications" edges to the Notification entity.
func (*PostUpdateOne) AddReactionIDs ¶
func (puo *PostUpdateOne) AddReactionIDs(ids ...uuid.UUID) *PostUpdateOne
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*PostUpdateOne) AddReactions ¶
func (puo *PostUpdateOne) AddReactions(r ...*Reaction) *PostUpdateOne
AddReactions adds the "reactions" edges to the Reaction entity.
func (*PostUpdateOne) ClearAuthor ¶
func (puo *PostUpdateOne) ClearAuthor() *PostUpdateOne
ClearAuthor clears the "author" edge to the User entity.
func (*PostUpdateOne) ClearComments ¶
func (puo *PostUpdateOne) ClearComments() *PostUpdateOne
ClearComments clears all "comments" edges to the Comment entity.
func (*PostUpdateOne) ClearImage ¶
func (puo *PostUpdateOne) ClearImage() *PostUpdateOne
ClearImage clears the "image" edge to the File entity.
func (*PostUpdateOne) ClearImageID ¶
func (puo *PostUpdateOne) ClearImageID() *PostUpdateOne
ClearImageID clears the value of the "image_id" field.
func (*PostUpdateOne) ClearNotifications ¶
func (puo *PostUpdateOne) ClearNotifications() *PostUpdateOne
ClearNotifications clears all "notifications" edges to the Notification entity.
func (*PostUpdateOne) ClearReactions ¶
func (puo *PostUpdateOne) ClearReactions() *PostUpdateOne
ClearReactions clears all "reactions" edges to the Reaction entity.
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) RemoveCommentIDs ¶
func (puo *PostUpdateOne) RemoveCommentIDs(ids ...uuid.UUID) *PostUpdateOne
RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.
func (*PostUpdateOne) RemoveComments ¶
func (puo *PostUpdateOne) RemoveComments(c ...*Comment) *PostUpdateOne
RemoveComments removes "comments" edges to Comment entities.
func (*PostUpdateOne) RemoveNotificationIDs ¶
func (puo *PostUpdateOne) RemoveNotificationIDs(ids ...uuid.UUID) *PostUpdateOne
RemoveNotificationIDs removes the "notifications" edge to Notification entities by IDs.
func (*PostUpdateOne) RemoveNotifications ¶
func (puo *PostUpdateOne) RemoveNotifications(n ...*Notification) *PostUpdateOne
RemoveNotifications removes "notifications" edges to Notification entities.
func (*PostUpdateOne) RemoveReactionIDs ¶
func (puo *PostUpdateOne) RemoveReactionIDs(ids ...uuid.UUID) *PostUpdateOne
RemoveReactionIDs removes the "reactions" edge to Reaction entities by IDs.
func (*PostUpdateOne) RemoveReactions ¶
func (puo *PostUpdateOne) RemoveReactions(r ...*Reaction) *PostUpdateOne
RemoveReactions removes "reactions" edges to Reaction entities.
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) SetAuthor ¶
func (puo *PostUpdateOne) SetAuthor(u *User) *PostUpdateOne
SetAuthor sets the "author" edge to the User entity.
func (*PostUpdateOne) SetAuthorID ¶
func (puo *PostUpdateOne) SetAuthorID(u uuid.UUID) *PostUpdateOne
SetAuthorID sets the "author_id" field.
func (*PostUpdateOne) SetCreatedAt ¶
func (puo *PostUpdateOne) SetCreatedAt(t time.Time) *PostUpdateOne
SetCreatedAt sets the "created_at" field.
func (*PostUpdateOne) SetImage ¶
func (puo *PostUpdateOne) SetImage(f *File) *PostUpdateOne
SetImage sets the "image" edge to the File entity.
func (*PostUpdateOne) SetImageID ¶
func (puo *PostUpdateOne) SetImageID(u uuid.UUID) *PostUpdateOne
SetImageID sets the "image_id" field.
func (*PostUpdateOne) SetNillableAuthorID ¶
func (puo *PostUpdateOne) SetNillableAuthorID(u *uuid.UUID) *PostUpdateOne
SetNillableAuthorID sets the "author_id" field if the given value is not nil.
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) SetNillableImageID ¶
func (puo *PostUpdateOne) SetNillableImageID(u *uuid.UUID) *PostUpdateOne
SetNillableImageID sets the "image_id" field if the given value is not nil.
func (*PostUpdateOne) SetNillableSlug ¶
func (puo *PostUpdateOne) SetNillableSlug(s *string) *PostUpdateOne
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*PostUpdateOne) SetNillableText ¶
func (puo *PostUpdateOne) SetNillableText(s *string) *PostUpdateOne
SetNillableText sets the "text" field if the given value is not nil.
func (*PostUpdateOne) SetSlug ¶
func (puo *PostUpdateOne) SetSlug(s string) *PostUpdateOne
SetSlug sets the "slug" field.
func (*PostUpdateOne) SetText ¶
func (puo *PostUpdateOne) SetText(s string) *PostUpdateOne
SetText sets the "text" field.
func (*PostUpdateOne) SetUpdatedAt ¶
func (puo *PostUpdateOne) SetUpdatedAt(t time.Time) *PostUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PostUpdateOne) Where ¶
func (puo *PostUpdateOne) Where(ps ...predicate.Post) *PostUpdateOne
Where appends a list predicates to the PostUpdate builder.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type Reaction ¶
type Reaction struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // UserID holds the value of the "user_id" field. UserID uuid.UUID `json:"user_id,omitempty"` // Rtype holds the value of the "rtype" field. Rtype reaction.Rtype `json:"rtype,omitempty"` // PostID holds the value of the "post_id" field. PostID *uuid.UUID `json:"post_id,omitempty"` // CommentID holds the value of the "comment_id" field. CommentID *uuid.UUID `json:"comment_id,omitempty"` // ReplyID holds the value of the "reply_id" field. ReplyID *uuid.UUID `json:"reply_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ReactionQuery when eager-loading is set. Edges ReactionEdges `json:"edges"` // contains filtered or unexported fields }
Reaction is the model entity for the Reaction schema.
func (*Reaction) QueryComment ¶
func (r *Reaction) QueryComment() *CommentQuery
QueryComment queries the "comment" edge of the Reaction entity.
func (*Reaction) QueryReply ¶
func (r *Reaction) QueryReply() *ReplyQuery
QueryReply queries the "reply" edge of the Reaction entity.
func (*Reaction) Unwrap ¶
Unwrap unwraps the Reaction 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 (*Reaction) Update ¶
func (r *Reaction) Update() *ReactionUpdateOne
Update returns a builder for updating this Reaction. Note that you need to call Reaction.Unwrap() before calling this method if this Reaction was returned from a transaction, and the transaction was committed or rolled back.
type ReactionClient ¶
type ReactionClient struct {
// contains filtered or unexported fields
}
ReactionClient is a client for the Reaction schema.
func NewReactionClient ¶
func NewReactionClient(c config) *ReactionClient
NewReactionClient returns a client for the Reaction from the given config.
func (*ReactionClient) Create ¶
func (c *ReactionClient) Create() *ReactionCreate
Create returns a builder for creating a Reaction entity.
func (*ReactionClient) CreateBulk ¶
func (c *ReactionClient) CreateBulk(builders ...*ReactionCreate) *ReactionCreateBulk
CreateBulk returns a builder for creating a bulk of Reaction entities.
func (*ReactionClient) Delete ¶
func (c *ReactionClient) Delete() *ReactionDelete
Delete returns a delete builder for Reaction.
func (*ReactionClient) DeleteOne ¶
func (c *ReactionClient) DeleteOne(r *Reaction) *ReactionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ReactionClient) DeleteOneID ¶
func (c *ReactionClient) DeleteOneID(id uuid.UUID) *ReactionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ReactionClient) Hooks ¶
func (c *ReactionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ReactionClient) Intercept ¶
func (c *ReactionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `reaction.Intercept(f(g(h())))`.
func (*ReactionClient) Interceptors ¶
func (c *ReactionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ReactionClient) MapCreateBulk ¶
func (c *ReactionClient) MapCreateBulk(slice any, setFunc func(*ReactionCreate, int)) *ReactionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ReactionClient) Query ¶
func (c *ReactionClient) Query() *ReactionQuery
Query returns a query builder for Reaction.
func (*ReactionClient) QueryComment ¶
func (c *ReactionClient) QueryComment(r *Reaction) *CommentQuery
QueryComment queries the comment edge of a Reaction.
func (*ReactionClient) QueryPost ¶
func (c *ReactionClient) QueryPost(r *Reaction) *PostQuery
QueryPost queries the post edge of a Reaction.
func (*ReactionClient) QueryReply ¶
func (c *ReactionClient) QueryReply(r *Reaction) *ReplyQuery
QueryReply queries the reply edge of a Reaction.
func (*ReactionClient) QueryUser ¶
func (c *ReactionClient) QueryUser(r *Reaction) *UserQuery
QueryUser queries the user edge of a Reaction.
func (*ReactionClient) Update ¶
func (c *ReactionClient) Update() *ReactionUpdate
Update returns an update builder for Reaction.
func (*ReactionClient) UpdateOne ¶
func (c *ReactionClient) UpdateOne(r *Reaction) *ReactionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ReactionClient) UpdateOneID ¶
func (c *ReactionClient) UpdateOneID(id uuid.UUID) *ReactionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ReactionClient) Use ¶
func (c *ReactionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `reaction.Hooks(f(g(h())))`.
type ReactionCreate ¶
type ReactionCreate struct {
// contains filtered or unexported fields
}
ReactionCreate is the builder for creating a Reaction entity.
func (*ReactionCreate) Exec ¶
func (rc *ReactionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactionCreate) ExecX ¶
func (rc *ReactionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionCreate) Mutation ¶
func (rc *ReactionCreate) Mutation() *ReactionMutation
Mutation returns the ReactionMutation object of the builder.
func (*ReactionCreate) Save ¶
func (rc *ReactionCreate) Save(ctx context.Context) (*Reaction, error)
Save creates the Reaction in the database.
func (*ReactionCreate) SaveX ¶
func (rc *ReactionCreate) SaveX(ctx context.Context) *Reaction
SaveX calls Save and panics if Save returns an error.
func (*ReactionCreate) SetComment ¶
func (rc *ReactionCreate) SetComment(c *Comment) *ReactionCreate
SetComment sets the "comment" edge to the Comment entity.
func (*ReactionCreate) SetCommentID ¶
func (rc *ReactionCreate) SetCommentID(u uuid.UUID) *ReactionCreate
SetCommentID sets the "comment_id" field.
func (*ReactionCreate) SetCreatedAt ¶
func (rc *ReactionCreate) SetCreatedAt(t time.Time) *ReactionCreate
SetCreatedAt sets the "created_at" field.
func (*ReactionCreate) SetID ¶
func (rc *ReactionCreate) SetID(u uuid.UUID) *ReactionCreate
SetID sets the "id" field.
func (*ReactionCreate) SetNillableCommentID ¶
func (rc *ReactionCreate) SetNillableCommentID(u *uuid.UUID) *ReactionCreate
SetNillableCommentID sets the "comment_id" field if the given value is not nil.
func (*ReactionCreate) SetNillableCreatedAt ¶
func (rc *ReactionCreate) SetNillableCreatedAt(t *time.Time) *ReactionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReactionCreate) SetNillableID ¶
func (rc *ReactionCreate) SetNillableID(u *uuid.UUID) *ReactionCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ReactionCreate) SetNillablePostID ¶
func (rc *ReactionCreate) SetNillablePostID(u *uuid.UUID) *ReactionCreate
SetNillablePostID sets the "post_id" field if the given value is not nil.
func (*ReactionCreate) SetNillableReplyID ¶
func (rc *ReactionCreate) SetNillableReplyID(u *uuid.UUID) *ReactionCreate
SetNillableReplyID sets the "reply_id" field if the given value is not nil.
func (*ReactionCreate) SetNillableRtype ¶
func (rc *ReactionCreate) SetNillableRtype(r *reaction.Rtype) *ReactionCreate
SetNillableRtype sets the "rtype" field if the given value is not nil.
func (*ReactionCreate) SetNillableUpdatedAt ¶
func (rc *ReactionCreate) SetNillableUpdatedAt(t *time.Time) *ReactionCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ReactionCreate) SetPost ¶
func (rc *ReactionCreate) SetPost(p *Post) *ReactionCreate
SetPost sets the "post" edge to the Post entity.
func (*ReactionCreate) SetPostID ¶
func (rc *ReactionCreate) SetPostID(u uuid.UUID) *ReactionCreate
SetPostID sets the "post_id" field.
func (*ReactionCreate) SetReply ¶
func (rc *ReactionCreate) SetReply(r *Reply) *ReactionCreate
SetReply sets the "reply" edge to the Reply entity.
func (*ReactionCreate) SetReplyID ¶
func (rc *ReactionCreate) SetReplyID(u uuid.UUID) *ReactionCreate
SetReplyID sets the "reply_id" field.
func (*ReactionCreate) SetRtype ¶
func (rc *ReactionCreate) SetRtype(r reaction.Rtype) *ReactionCreate
SetRtype sets the "rtype" field.
func (*ReactionCreate) SetUpdatedAt ¶
func (rc *ReactionCreate) SetUpdatedAt(t time.Time) *ReactionCreate
SetUpdatedAt sets the "updated_at" field.
func (*ReactionCreate) SetUser ¶
func (rc *ReactionCreate) SetUser(u *User) *ReactionCreate
SetUser sets the "user" edge to the User entity.
func (*ReactionCreate) SetUserID ¶
func (rc *ReactionCreate) SetUserID(u uuid.UUID) *ReactionCreate
SetUserID sets the "user_id" field.
type ReactionCreateBulk ¶
type ReactionCreateBulk struct {
// contains filtered or unexported fields
}
ReactionCreateBulk is the builder for creating many Reaction entities in bulk.
func (*ReactionCreateBulk) Exec ¶
func (rcb *ReactionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactionCreateBulk) ExecX ¶
func (rcb *ReactionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ReactionDelete ¶
type ReactionDelete struct {
// contains filtered or unexported fields
}
ReactionDelete is the builder for deleting a Reaction entity.
func (*ReactionDelete) Exec ¶
func (rd *ReactionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ReactionDelete) ExecX ¶
func (rd *ReactionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ReactionDelete) Where ¶
func (rd *ReactionDelete) Where(ps ...predicate.Reaction) *ReactionDelete
Where appends a list predicates to the ReactionDelete builder.
type ReactionDeleteOne ¶
type ReactionDeleteOne struct {
// contains filtered or unexported fields
}
ReactionDeleteOne is the builder for deleting a single Reaction entity.
func (*ReactionDeleteOne) Exec ¶
func (rdo *ReactionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ReactionDeleteOne) ExecX ¶
func (rdo *ReactionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionDeleteOne) Where ¶
func (rdo *ReactionDeleteOne) Where(ps ...predicate.Reaction) *ReactionDeleteOne
Where appends a list predicates to the ReactionDelete builder.
type ReactionEdges ¶
type ReactionEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Post holds the value of the post edge. Post *Post `json:"post,omitempty"` // Comment holds the value of the comment edge. Comment *Comment `json:"comment,omitempty"` // Reply holds the value of the reply edge. Reply *Reply `json:"reply,omitempty"` // contains filtered or unexported fields }
ReactionEdges holds the relations/edges for other nodes in the graph.
func (ReactionEdges) CommentOrErr ¶
func (e ReactionEdges) CommentOrErr() (*Comment, error)
CommentOrErr returns the Comment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ReactionEdges) PostOrErr ¶
func (e ReactionEdges) PostOrErr() (*Post, error)
PostOrErr returns the Post value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ReactionEdges) ReplyOrErr ¶
func (e ReactionEdges) ReplyOrErr() (*Reply, error)
ReplyOrErr returns the Reply value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ReactionEdges) UserOrErr ¶
func (e ReactionEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ReactionGroupBy ¶
type ReactionGroupBy struct {
// contains filtered or unexported fields
}
ReactionGroupBy is the group-by builder for Reaction entities.
func (*ReactionGroupBy) Aggregate ¶
func (rgb *ReactionGroupBy) Aggregate(fns ...AggregateFunc) *ReactionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ReactionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Scan ¶
func (rgb *ReactionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReactionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReactionMutation ¶
type ReactionMutation struct {
// contains filtered or unexported fields
}
ReactionMutation represents an operation that mutates the Reaction nodes in the graph.
func (*ReactionMutation) AddField ¶
func (m *ReactionMutation) 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 (*ReactionMutation) AddedEdges ¶
func (m *ReactionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ReactionMutation) AddedField ¶
func (m *ReactionMutation) 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 (*ReactionMutation) AddedFields ¶
func (m *ReactionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ReactionMutation) AddedIDs ¶
func (m *ReactionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ReactionMutation) ClearComment ¶
func (m *ReactionMutation) ClearComment()
ClearComment clears the "comment" edge to the Comment entity.
func (*ReactionMutation) ClearCommentID ¶
func (m *ReactionMutation) ClearCommentID()
ClearCommentID clears the value of the "comment_id" field.
func (*ReactionMutation) ClearEdge ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ClearField ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ClearPost ¶
func (m *ReactionMutation) ClearPost()
ClearPost clears the "post" edge to the Post entity.
func (*ReactionMutation) ClearPostID ¶
func (m *ReactionMutation) ClearPostID()
ClearPostID clears the value of the "post_id" field.
func (*ReactionMutation) ClearReply ¶
func (m *ReactionMutation) ClearReply()
ClearReply clears the "reply" edge to the Reply entity.
func (*ReactionMutation) ClearReplyID ¶
func (m *ReactionMutation) ClearReplyID()
ClearReplyID clears the value of the "reply_id" field.
func (*ReactionMutation) ClearUser ¶
func (m *ReactionMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*ReactionMutation) ClearedEdges ¶
func (m *ReactionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ReactionMutation) ClearedFields ¶
func (m *ReactionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ReactionMutation) Client ¶
func (m ReactionMutation) 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 (*ReactionMutation) CommentCleared ¶
func (m *ReactionMutation) CommentCleared() bool
CommentCleared reports if the "comment" edge to the Comment entity was cleared.
func (*ReactionMutation) CommentID ¶
func (m *ReactionMutation) CommentID() (r uuid.UUID, exists bool)
CommentID returns the value of the "comment_id" field in the mutation.
func (*ReactionMutation) CommentIDCleared ¶
func (m *ReactionMutation) CommentIDCleared() bool
CommentIDCleared returns if the "comment_id" field was cleared in this mutation.
func (*ReactionMutation) CommentIDs ¶
func (m *ReactionMutation) CommentIDs() (ids []uuid.UUID)
CommentIDs returns the "comment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CommentID instead. It exists only for internal usage by the builders.
func (*ReactionMutation) CreatedAt ¶
func (m *ReactionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ReactionMutation) EdgeCleared ¶
func (m *ReactionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ReactionMutation) Field ¶
func (m *ReactionMutation) 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 (*ReactionMutation) FieldCleared ¶
func (m *ReactionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ReactionMutation) Fields ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ID ¶
func (m *ReactionMutation) 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 (*ReactionMutation) 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 (*ReactionMutation) OldCommentID ¶
OldCommentID returns the old "comment_id" field's value of the Reaction entity. If the Reaction 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 (*ReactionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Reaction entity. If the Reaction 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 (*ReactionMutation) 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 (*ReactionMutation) OldPostID ¶
OldPostID returns the old "post_id" field's value of the Reaction entity. If the Reaction 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 (*ReactionMutation) OldReplyID ¶
OldReplyID returns the old "reply_id" field's value of the Reaction entity. If the Reaction 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 (*ReactionMutation) OldRtype ¶
OldRtype returns the old "rtype" field's value of the Reaction entity. If the Reaction 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 (*ReactionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Reaction entity. If the Reaction 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 (*ReactionMutation) OldUserID ¶
OldUserID returns the old "user_id" field's value of the Reaction entity. If the Reaction 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 (*ReactionMutation) PostCleared ¶
func (m *ReactionMutation) PostCleared() bool
PostCleared reports if the "post" edge to the Post entity was cleared.
func (*ReactionMutation) PostID ¶
func (m *ReactionMutation) PostID() (r uuid.UUID, exists bool)
PostID returns the value of the "post_id" field in the mutation.
func (*ReactionMutation) PostIDCleared ¶
func (m *ReactionMutation) PostIDCleared() bool
PostIDCleared returns if the "post_id" field was cleared in this mutation.
func (*ReactionMutation) PostIDs ¶
func (m *ReactionMutation) PostIDs() (ids []uuid.UUID)
PostIDs returns the "post" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PostID instead. It exists only for internal usage by the builders.
func (*ReactionMutation) RemovedEdges ¶
func (m *ReactionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ReactionMutation) RemovedIDs ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ReplyCleared ¶
func (m *ReactionMutation) ReplyCleared() bool
ReplyCleared reports if the "reply" edge to the Reply entity was cleared.
func (*ReactionMutation) ReplyID ¶
func (m *ReactionMutation) ReplyID() (r uuid.UUID, exists bool)
ReplyID returns the value of the "reply_id" field in the mutation.
func (*ReactionMutation) ReplyIDCleared ¶
func (m *ReactionMutation) ReplyIDCleared() bool
ReplyIDCleared returns if the "reply_id" field was cleared in this mutation.
func (*ReactionMutation) ReplyIDs ¶
func (m *ReactionMutation) ReplyIDs() (ids []uuid.UUID)
ReplyIDs returns the "reply" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ReplyID instead. It exists only for internal usage by the builders.
func (*ReactionMutation) ResetComment ¶
func (m *ReactionMutation) ResetComment()
ResetComment resets all changes to the "comment" edge.
func (*ReactionMutation) ResetCommentID ¶
func (m *ReactionMutation) ResetCommentID()
ResetCommentID resets all changes to the "comment_id" field.
func (*ReactionMutation) ResetCreatedAt ¶
func (m *ReactionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ReactionMutation) ResetEdge ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ResetField ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ResetPost ¶
func (m *ReactionMutation) ResetPost()
ResetPost resets all changes to the "post" edge.
func (*ReactionMutation) ResetPostID ¶
func (m *ReactionMutation) ResetPostID()
ResetPostID resets all changes to the "post_id" field.
func (*ReactionMutation) ResetReply ¶
func (m *ReactionMutation) ResetReply()
ResetReply resets all changes to the "reply" edge.
func (*ReactionMutation) ResetReplyID ¶
func (m *ReactionMutation) ResetReplyID()
ResetReplyID resets all changes to the "reply_id" field.
func (*ReactionMutation) ResetRtype ¶
func (m *ReactionMutation) ResetRtype()
ResetRtype resets all changes to the "rtype" field.
func (*ReactionMutation) ResetUpdatedAt ¶
func (m *ReactionMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ReactionMutation) ResetUser ¶
func (m *ReactionMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*ReactionMutation) ResetUserID ¶
func (m *ReactionMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*ReactionMutation) Rtype ¶
func (m *ReactionMutation) Rtype() (r reaction.Rtype, exists bool)
Rtype returns the value of the "rtype" field in the mutation.
func (*ReactionMutation) SetCommentID ¶
func (m *ReactionMutation) SetCommentID(u uuid.UUID)
SetCommentID sets the "comment_id" field.
func (*ReactionMutation) SetCreatedAt ¶
func (m *ReactionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ReactionMutation) SetField ¶
func (m *ReactionMutation) 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 (*ReactionMutation) SetID ¶
func (m *ReactionMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Reaction entities.
func (*ReactionMutation) SetOp ¶
func (m *ReactionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ReactionMutation) SetPostID ¶
func (m *ReactionMutation) SetPostID(u uuid.UUID)
SetPostID sets the "post_id" field.
func (*ReactionMutation) SetReplyID ¶
func (m *ReactionMutation) SetReplyID(u uuid.UUID)
SetReplyID sets the "reply_id" field.
func (*ReactionMutation) SetRtype ¶
func (m *ReactionMutation) SetRtype(r reaction.Rtype)
SetRtype sets the "rtype" field.
func (*ReactionMutation) SetUpdatedAt ¶
func (m *ReactionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ReactionMutation) SetUserID ¶
func (m *ReactionMutation) SetUserID(u uuid.UUID)
SetUserID sets the "user_id" field.
func (ReactionMutation) Tx ¶
func (m ReactionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ReactionMutation) Type ¶
func (m *ReactionMutation) Type() string
Type returns the node type of this mutation (Reaction).
func (*ReactionMutation) UpdatedAt ¶
func (m *ReactionMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ReactionMutation) UserCleared ¶
func (m *ReactionMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*ReactionMutation) UserID ¶
func (m *ReactionMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*ReactionMutation) UserIDs ¶
func (m *ReactionMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*ReactionMutation) Where ¶
func (m *ReactionMutation) Where(ps ...predicate.Reaction)
Where appends a list predicates to the ReactionMutation builder.
func (*ReactionMutation) WhereP ¶
func (m *ReactionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ReactionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ReactionQuery ¶
type ReactionQuery struct {
// contains filtered or unexported fields
}
ReactionQuery is the builder for querying Reaction entities.
func (*ReactionQuery) Aggregate ¶
func (rq *ReactionQuery) Aggregate(fns ...AggregateFunc) *ReactionSelect
Aggregate returns a ReactionSelect configured with the given aggregations.
func (*ReactionQuery) All ¶
func (rq *ReactionQuery) All(ctx context.Context) ([]*Reaction, error)
All executes the query and returns a list of Reactions.
func (*ReactionQuery) AllX ¶
func (rq *ReactionQuery) AllX(ctx context.Context) []*Reaction
AllX is like All, but panics if an error occurs.
func (*ReactionQuery) Clone ¶
func (rq *ReactionQuery) Clone() *ReactionQuery
Clone returns a duplicate of the ReactionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ReactionQuery) Count ¶
func (rq *ReactionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ReactionQuery) CountX ¶
func (rq *ReactionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ReactionQuery) Exist ¶
func (rq *ReactionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ReactionQuery) ExistX ¶
func (rq *ReactionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ReactionQuery) First ¶
func (rq *ReactionQuery) First(ctx context.Context) (*Reaction, error)
First returns the first Reaction entity from the query. Returns a *NotFoundError when no Reaction was found.
func (*ReactionQuery) FirstID ¶
FirstID returns the first Reaction ID from the query. Returns a *NotFoundError when no Reaction ID was found.
func (*ReactionQuery) FirstIDX ¶
func (rq *ReactionQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ReactionQuery) FirstX ¶
func (rq *ReactionQuery) FirstX(ctx context.Context) *Reaction
FirstX is like First, but panics if an error occurs.
func (*ReactionQuery) GroupBy ¶
func (rq *ReactionQuery) GroupBy(field string, fields ...string) *ReactionGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Reaction.Query(). GroupBy(reaction.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ReactionQuery) IDsX ¶
func (rq *ReactionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ReactionQuery) Limit ¶
func (rq *ReactionQuery) Limit(limit int) *ReactionQuery
Limit the number of records to be returned by this query.
func (*ReactionQuery) Offset ¶
func (rq *ReactionQuery) Offset(offset int) *ReactionQuery
Offset to start from.
func (*ReactionQuery) Only ¶
func (rq *ReactionQuery) Only(ctx context.Context) (*Reaction, error)
Only returns a single Reaction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Reaction entity is found. Returns a *NotFoundError when no Reaction entities are found.
func (*ReactionQuery) OnlyID ¶
OnlyID is like Only, but returns the only Reaction ID in the query. Returns a *NotSingularError when more than one Reaction ID is found. Returns a *NotFoundError when no entities are found.
func (*ReactionQuery) OnlyIDX ¶
func (rq *ReactionQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ReactionQuery) OnlyX ¶
func (rq *ReactionQuery) OnlyX(ctx context.Context) *Reaction
OnlyX is like Only, but panics if an error occurs.
func (*ReactionQuery) Order ¶
func (rq *ReactionQuery) Order(o ...reaction.OrderOption) *ReactionQuery
Order specifies how the records should be ordered.
func (*ReactionQuery) QueryComment ¶
func (rq *ReactionQuery) QueryComment() *CommentQuery
QueryComment chains the current query on the "comment" edge.
func (*ReactionQuery) QueryPost ¶
func (rq *ReactionQuery) QueryPost() *PostQuery
QueryPost chains the current query on the "post" edge.
func (*ReactionQuery) QueryReply ¶
func (rq *ReactionQuery) QueryReply() *ReplyQuery
QueryReply chains the current query on the "reply" edge.
func (*ReactionQuery) QueryUser ¶
func (rq *ReactionQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*ReactionQuery) Select ¶
func (rq *ReactionQuery) Select(fields ...string) *ReactionSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Reaction.Query(). Select(reaction.FieldCreatedAt). Scan(ctx, &v)
func (*ReactionQuery) Unique ¶
func (rq *ReactionQuery) Unique(unique bool) *ReactionQuery
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 (*ReactionQuery) Where ¶
func (rq *ReactionQuery) Where(ps ...predicate.Reaction) *ReactionQuery
Where adds a new predicate for the ReactionQuery builder.
func (*ReactionQuery) WithComment ¶
func (rq *ReactionQuery) WithComment(opts ...func(*CommentQuery)) *ReactionQuery
WithComment tells the query-builder to eager-load the nodes that are connected to the "comment" edge. The optional arguments are used to configure the query builder of the edge.
func (*ReactionQuery) WithPost ¶
func (rq *ReactionQuery) WithPost(opts ...func(*PostQuery)) *ReactionQuery
WithPost tells the query-builder to eager-load the nodes that are connected to the "post" edge. The optional arguments are used to configure the query builder of the edge.
func (*ReactionQuery) WithReply ¶
func (rq *ReactionQuery) WithReply(opts ...func(*ReplyQuery)) *ReactionQuery
WithReply tells the query-builder to eager-load the nodes that are connected to the "reply" edge. The optional arguments are used to configure the query builder of the edge.
func (*ReactionQuery) WithUser ¶
func (rq *ReactionQuery) WithUser(opts ...func(*UserQuery)) *ReactionQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type ReactionSelect ¶
type ReactionSelect struct { *ReactionQuery // contains filtered or unexported fields }
ReactionSelect is the builder for selecting fields of Reaction entities.
func (*ReactionSelect) Aggregate ¶
func (rs *ReactionSelect) Aggregate(fns ...AggregateFunc) *ReactionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ReactionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Scan ¶
func (rs *ReactionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReactionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReactionUpdate ¶
type ReactionUpdate struct {
// contains filtered or unexported fields
}
ReactionUpdate is the builder for updating Reaction entities.
func (*ReactionUpdate) ClearComment ¶
func (ru *ReactionUpdate) ClearComment() *ReactionUpdate
ClearComment clears the "comment" edge to the Comment entity.
func (*ReactionUpdate) ClearCommentID ¶
func (ru *ReactionUpdate) ClearCommentID() *ReactionUpdate
ClearCommentID clears the value of the "comment_id" field.
func (*ReactionUpdate) ClearPost ¶
func (ru *ReactionUpdate) ClearPost() *ReactionUpdate
ClearPost clears the "post" edge to the Post entity.
func (*ReactionUpdate) ClearPostID ¶
func (ru *ReactionUpdate) ClearPostID() *ReactionUpdate
ClearPostID clears the value of the "post_id" field.
func (*ReactionUpdate) ClearReply ¶
func (ru *ReactionUpdate) ClearReply() *ReactionUpdate
ClearReply clears the "reply" edge to the Reply entity.
func (*ReactionUpdate) ClearReplyID ¶
func (ru *ReactionUpdate) ClearReplyID() *ReactionUpdate
ClearReplyID clears the value of the "reply_id" field.
func (*ReactionUpdate) ClearUser ¶
func (ru *ReactionUpdate) ClearUser() *ReactionUpdate
ClearUser clears the "user" edge to the User entity.
func (*ReactionUpdate) Exec ¶
func (ru *ReactionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactionUpdate) ExecX ¶
func (ru *ReactionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionUpdate) Mutation ¶
func (ru *ReactionUpdate) Mutation() *ReactionMutation
Mutation returns the ReactionMutation object of the builder.
func (*ReactionUpdate) Save ¶
func (ru *ReactionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ReactionUpdate) SaveX ¶
func (ru *ReactionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ReactionUpdate) SetComment ¶
func (ru *ReactionUpdate) SetComment(c *Comment) *ReactionUpdate
SetComment sets the "comment" edge to the Comment entity.
func (*ReactionUpdate) SetCommentID ¶
func (ru *ReactionUpdate) SetCommentID(u uuid.UUID) *ReactionUpdate
SetCommentID sets the "comment_id" field.
func (*ReactionUpdate) SetCreatedAt ¶
func (ru *ReactionUpdate) SetCreatedAt(t time.Time) *ReactionUpdate
SetCreatedAt sets the "created_at" field.
func (*ReactionUpdate) SetNillableCommentID ¶
func (ru *ReactionUpdate) SetNillableCommentID(u *uuid.UUID) *ReactionUpdate
SetNillableCommentID sets the "comment_id" field if the given value is not nil.
func (*ReactionUpdate) SetNillableCreatedAt ¶
func (ru *ReactionUpdate) SetNillableCreatedAt(t *time.Time) *ReactionUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReactionUpdate) SetNillablePostID ¶
func (ru *ReactionUpdate) SetNillablePostID(u *uuid.UUID) *ReactionUpdate
SetNillablePostID sets the "post_id" field if the given value is not nil.
func (*ReactionUpdate) SetNillableReplyID ¶
func (ru *ReactionUpdate) SetNillableReplyID(u *uuid.UUID) *ReactionUpdate
SetNillableReplyID sets the "reply_id" field if the given value is not nil.
func (*ReactionUpdate) SetNillableRtype ¶
func (ru *ReactionUpdate) SetNillableRtype(r *reaction.Rtype) *ReactionUpdate
SetNillableRtype sets the "rtype" field if the given value is not nil.
func (*ReactionUpdate) SetNillableUserID ¶
func (ru *ReactionUpdate) SetNillableUserID(u *uuid.UUID) *ReactionUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*ReactionUpdate) SetPost ¶
func (ru *ReactionUpdate) SetPost(p *Post) *ReactionUpdate
SetPost sets the "post" edge to the Post entity.
func (*ReactionUpdate) SetPostID ¶
func (ru *ReactionUpdate) SetPostID(u uuid.UUID) *ReactionUpdate
SetPostID sets the "post_id" field.
func (*ReactionUpdate) SetReply ¶
func (ru *ReactionUpdate) SetReply(r *Reply) *ReactionUpdate
SetReply sets the "reply" edge to the Reply entity.
func (*ReactionUpdate) SetReplyID ¶
func (ru *ReactionUpdate) SetReplyID(u uuid.UUID) *ReactionUpdate
SetReplyID sets the "reply_id" field.
func (*ReactionUpdate) SetRtype ¶
func (ru *ReactionUpdate) SetRtype(r reaction.Rtype) *ReactionUpdate
SetRtype sets the "rtype" field.
func (*ReactionUpdate) SetUpdatedAt ¶
func (ru *ReactionUpdate) SetUpdatedAt(t time.Time) *ReactionUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ReactionUpdate) SetUser ¶
func (ru *ReactionUpdate) SetUser(u *User) *ReactionUpdate
SetUser sets the "user" edge to the User entity.
func (*ReactionUpdate) SetUserID ¶
func (ru *ReactionUpdate) SetUserID(u uuid.UUID) *ReactionUpdate
SetUserID sets the "user_id" field.
func (*ReactionUpdate) Where ¶
func (ru *ReactionUpdate) Where(ps ...predicate.Reaction) *ReactionUpdate
Where appends a list predicates to the ReactionUpdate builder.
type ReactionUpdateOne ¶
type ReactionUpdateOne struct {
// contains filtered or unexported fields
}
ReactionUpdateOne is the builder for updating a single Reaction entity.
func (*ReactionUpdateOne) ClearComment ¶
func (ruo *ReactionUpdateOne) ClearComment() *ReactionUpdateOne
ClearComment clears the "comment" edge to the Comment entity.
func (*ReactionUpdateOne) ClearCommentID ¶
func (ruo *ReactionUpdateOne) ClearCommentID() *ReactionUpdateOne
ClearCommentID clears the value of the "comment_id" field.
func (*ReactionUpdateOne) ClearPost ¶
func (ruo *ReactionUpdateOne) ClearPost() *ReactionUpdateOne
ClearPost clears the "post" edge to the Post entity.
func (*ReactionUpdateOne) ClearPostID ¶
func (ruo *ReactionUpdateOne) ClearPostID() *ReactionUpdateOne
ClearPostID clears the value of the "post_id" field.
func (*ReactionUpdateOne) ClearReply ¶
func (ruo *ReactionUpdateOne) ClearReply() *ReactionUpdateOne
ClearReply clears the "reply" edge to the Reply entity.
func (*ReactionUpdateOne) ClearReplyID ¶
func (ruo *ReactionUpdateOne) ClearReplyID() *ReactionUpdateOne
ClearReplyID clears the value of the "reply_id" field.
func (*ReactionUpdateOne) ClearUser ¶
func (ruo *ReactionUpdateOne) ClearUser() *ReactionUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*ReactionUpdateOne) Exec ¶
func (ruo *ReactionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ReactionUpdateOne) ExecX ¶
func (ruo *ReactionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionUpdateOne) Mutation ¶
func (ruo *ReactionUpdateOne) Mutation() *ReactionMutation
Mutation returns the ReactionMutation object of the builder.
func (*ReactionUpdateOne) Save ¶
func (ruo *ReactionUpdateOne) Save(ctx context.Context) (*Reaction, error)
Save executes the query and returns the updated Reaction entity.
func (*ReactionUpdateOne) SaveX ¶
func (ruo *ReactionUpdateOne) SaveX(ctx context.Context) *Reaction
SaveX is like Save, but panics if an error occurs.
func (*ReactionUpdateOne) Select ¶
func (ruo *ReactionUpdateOne) Select(field string, fields ...string) *ReactionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ReactionUpdateOne) SetComment ¶
func (ruo *ReactionUpdateOne) SetComment(c *Comment) *ReactionUpdateOne
SetComment sets the "comment" edge to the Comment entity.
func (*ReactionUpdateOne) SetCommentID ¶
func (ruo *ReactionUpdateOne) SetCommentID(u uuid.UUID) *ReactionUpdateOne
SetCommentID sets the "comment_id" field.
func (*ReactionUpdateOne) SetCreatedAt ¶
func (ruo *ReactionUpdateOne) SetCreatedAt(t time.Time) *ReactionUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ReactionUpdateOne) SetNillableCommentID ¶
func (ruo *ReactionUpdateOne) SetNillableCommentID(u *uuid.UUID) *ReactionUpdateOne
SetNillableCommentID sets the "comment_id" field if the given value is not nil.
func (*ReactionUpdateOne) SetNillableCreatedAt ¶
func (ruo *ReactionUpdateOne) SetNillableCreatedAt(t *time.Time) *ReactionUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReactionUpdateOne) SetNillablePostID ¶
func (ruo *ReactionUpdateOne) SetNillablePostID(u *uuid.UUID) *ReactionUpdateOne
SetNillablePostID sets the "post_id" field if the given value is not nil.
func (*ReactionUpdateOne) SetNillableReplyID ¶
func (ruo *ReactionUpdateOne) SetNillableReplyID(u *uuid.UUID) *ReactionUpdateOne
SetNillableReplyID sets the "reply_id" field if the given value is not nil.
func (*ReactionUpdateOne) SetNillableRtype ¶
func (ruo *ReactionUpdateOne) SetNillableRtype(r *reaction.Rtype) *ReactionUpdateOne
SetNillableRtype sets the "rtype" field if the given value is not nil.
func (*ReactionUpdateOne) SetNillableUserID ¶
func (ruo *ReactionUpdateOne) SetNillableUserID(u *uuid.UUID) *ReactionUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*ReactionUpdateOne) SetPost ¶
func (ruo *ReactionUpdateOne) SetPost(p *Post) *ReactionUpdateOne
SetPost sets the "post" edge to the Post entity.
func (*ReactionUpdateOne) SetPostID ¶
func (ruo *ReactionUpdateOne) SetPostID(u uuid.UUID) *ReactionUpdateOne
SetPostID sets the "post_id" field.
func (*ReactionUpdateOne) SetReply ¶
func (ruo *ReactionUpdateOne) SetReply(r *Reply) *ReactionUpdateOne
SetReply sets the "reply" edge to the Reply entity.
func (*ReactionUpdateOne) SetReplyID ¶
func (ruo *ReactionUpdateOne) SetReplyID(u uuid.UUID) *ReactionUpdateOne
SetReplyID sets the "reply_id" field.
func (*ReactionUpdateOne) SetRtype ¶
func (ruo *ReactionUpdateOne) SetRtype(r reaction.Rtype) *ReactionUpdateOne
SetRtype sets the "rtype" field.
func (*ReactionUpdateOne) SetUpdatedAt ¶
func (ruo *ReactionUpdateOne) SetUpdatedAt(t time.Time) *ReactionUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ReactionUpdateOne) SetUser ¶
func (ruo *ReactionUpdateOne) SetUser(u *User) *ReactionUpdateOne
SetUser sets the "user" edge to the User entity.
func (*ReactionUpdateOne) SetUserID ¶
func (ruo *ReactionUpdateOne) SetUserID(u uuid.UUID) *ReactionUpdateOne
SetUserID sets the "user_id" field.
func (*ReactionUpdateOne) Where ¶
func (ruo *ReactionUpdateOne) Where(ps ...predicate.Reaction) *ReactionUpdateOne
Where appends a list predicates to the ReactionUpdate builder.
type Region ¶
type Region struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // CountryID holds the value of the "country_id" field. CountryID uuid.UUID `json:"country_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RegionQuery when eager-loading is set. Edges RegionEdges `json:"edges"` // contains filtered or unexported fields }
Region is the model entity for the Region schema.
func (*Region) QueryCities ¶
QueryCities queries the "cities" edge of the Region entity.
func (*Region) QueryCountry ¶
func (r *Region) QueryCountry() *CountryQuery
QueryCountry queries the "country" edge of the Region entity.
func (*Region) Unwrap ¶
Unwrap unwraps the Region 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 (*Region) Update ¶
func (r *Region) Update() *RegionUpdateOne
Update returns a builder for updating this Region. Note that you need to call Region.Unwrap() before calling this method if this Region was returned from a transaction, and the transaction was committed or rolled back.
type RegionClient ¶
type RegionClient struct {
// contains filtered or unexported fields
}
RegionClient is a client for the Region schema.
func NewRegionClient ¶
func NewRegionClient(c config) *RegionClient
NewRegionClient returns a client for the Region from the given config.
func (*RegionClient) Create ¶
func (c *RegionClient) Create() *RegionCreate
Create returns a builder for creating a Region entity.
func (*RegionClient) CreateBulk ¶
func (c *RegionClient) CreateBulk(builders ...*RegionCreate) *RegionCreateBulk
CreateBulk returns a builder for creating a bulk of Region entities.
func (*RegionClient) Delete ¶
func (c *RegionClient) Delete() *RegionDelete
Delete returns a delete builder for Region.
func (*RegionClient) DeleteOne ¶
func (c *RegionClient) DeleteOne(r *Region) *RegionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RegionClient) DeleteOneID ¶
func (c *RegionClient) DeleteOneID(id uuid.UUID) *RegionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RegionClient) Intercept ¶
func (c *RegionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `region.Intercept(f(g(h())))`.
func (*RegionClient) Interceptors ¶
func (c *RegionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RegionClient) MapCreateBulk ¶
func (c *RegionClient) MapCreateBulk(slice any, setFunc func(*RegionCreate, int)) *RegionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*RegionClient) Query ¶
func (c *RegionClient) Query() *RegionQuery
Query returns a query builder for Region.
func (*RegionClient) QueryCities ¶
func (c *RegionClient) QueryCities(r *Region) *CityQuery
QueryCities queries the cities edge of a Region.
func (*RegionClient) QueryCountry ¶
func (c *RegionClient) QueryCountry(r *Region) *CountryQuery
QueryCountry queries the country edge of a Region.
func (*RegionClient) Update ¶
func (c *RegionClient) Update() *RegionUpdate
Update returns an update builder for Region.
func (*RegionClient) UpdateOne ¶
func (c *RegionClient) UpdateOne(r *Region) *RegionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RegionClient) UpdateOneID ¶
func (c *RegionClient) UpdateOneID(id uuid.UUID) *RegionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RegionClient) Use ¶
func (c *RegionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `region.Hooks(f(g(h())))`.
type RegionCreate ¶
type RegionCreate struct {
// contains filtered or unexported fields
}
RegionCreate is the builder for creating a Region entity.
func (*RegionCreate) AddCities ¶
func (rc *RegionCreate) AddCities(c ...*City) *RegionCreate
AddCities adds the "cities" edges to the City entity.
func (*RegionCreate) AddCityIDs ¶
func (rc *RegionCreate) AddCityIDs(ids ...uuid.UUID) *RegionCreate
AddCityIDs adds the "cities" edge to the City entity by IDs.
func (*RegionCreate) Exec ¶
func (rc *RegionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RegionCreate) ExecX ¶
func (rc *RegionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RegionCreate) Mutation ¶
func (rc *RegionCreate) Mutation() *RegionMutation
Mutation returns the RegionMutation object of the builder.
func (*RegionCreate) Save ¶
func (rc *RegionCreate) Save(ctx context.Context) (*Region, error)
Save creates the Region in the database.
func (*RegionCreate) SaveX ¶
func (rc *RegionCreate) SaveX(ctx context.Context) *Region
SaveX calls Save and panics if Save returns an error.
func (*RegionCreate) SetCountry ¶
func (rc *RegionCreate) SetCountry(c *Country) *RegionCreate
SetCountry sets the "country" edge to the Country entity.
func (*RegionCreate) SetCountryID ¶
func (rc *RegionCreate) SetCountryID(u uuid.UUID) *RegionCreate
SetCountryID sets the "country_id" field.
func (*RegionCreate) SetCreatedAt ¶
func (rc *RegionCreate) SetCreatedAt(t time.Time) *RegionCreate
SetCreatedAt sets the "created_at" field.
func (*RegionCreate) SetID ¶
func (rc *RegionCreate) SetID(u uuid.UUID) *RegionCreate
SetID sets the "id" field.
func (*RegionCreate) SetName ¶
func (rc *RegionCreate) SetName(s string) *RegionCreate
SetName sets the "name" field.
func (*RegionCreate) SetNillableCreatedAt ¶
func (rc *RegionCreate) SetNillableCreatedAt(t *time.Time) *RegionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RegionCreate) SetNillableID ¶
func (rc *RegionCreate) SetNillableID(u *uuid.UUID) *RegionCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*RegionCreate) SetNillableUpdatedAt ¶
func (rc *RegionCreate) SetNillableUpdatedAt(t *time.Time) *RegionCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*RegionCreate) SetUpdatedAt ¶
func (rc *RegionCreate) SetUpdatedAt(t time.Time) *RegionCreate
SetUpdatedAt sets the "updated_at" field.
type RegionCreateBulk ¶
type RegionCreateBulk struct {
// contains filtered or unexported fields
}
RegionCreateBulk is the builder for creating many Region entities in bulk.
func (*RegionCreateBulk) Exec ¶
func (rcb *RegionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RegionCreateBulk) ExecX ¶
func (rcb *RegionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RegionDelete ¶
type RegionDelete struct {
// contains filtered or unexported fields
}
RegionDelete is the builder for deleting a Region entity.
func (*RegionDelete) Exec ¶
func (rd *RegionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RegionDelete) ExecX ¶
func (rd *RegionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RegionDelete) Where ¶
func (rd *RegionDelete) Where(ps ...predicate.Region) *RegionDelete
Where appends a list predicates to the RegionDelete builder.
type RegionDeleteOne ¶
type RegionDeleteOne struct {
// contains filtered or unexported fields
}
RegionDeleteOne is the builder for deleting a single Region entity.
func (*RegionDeleteOne) Exec ¶
func (rdo *RegionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RegionDeleteOne) ExecX ¶
func (rdo *RegionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RegionDeleteOne) Where ¶
func (rdo *RegionDeleteOne) Where(ps ...predicate.Region) *RegionDeleteOne
Where appends a list predicates to the RegionDelete builder.
type RegionEdges ¶
type RegionEdges struct { // Country holds the value of the country edge. Country *Country `json:"country,omitempty"` // Cities holds the value of the cities edge. Cities []*City `json:"cities,omitempty"` // contains filtered or unexported fields }
RegionEdges holds the relations/edges for other nodes in the graph.
func (RegionEdges) CitiesOrErr ¶
func (e RegionEdges) CitiesOrErr() ([]*City, error)
CitiesOrErr returns the Cities value or an error if the edge was not loaded in eager-loading.
func (RegionEdges) CountryOrErr ¶
func (e RegionEdges) CountryOrErr() (*Country, error)
CountryOrErr returns the Country value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RegionGroupBy ¶
type RegionGroupBy struct {
// contains filtered or unexported fields
}
RegionGroupBy is the group-by builder for Region entities.
func (*RegionGroupBy) Aggregate ¶
func (rgb *RegionGroupBy) Aggregate(fns ...AggregateFunc) *RegionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RegionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RegionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RegionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RegionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RegionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RegionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RegionGroupBy) Scan ¶
func (rgb *RegionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RegionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RegionMutation ¶
type RegionMutation struct {
// contains filtered or unexported fields
}
RegionMutation represents an operation that mutates the Region nodes in the graph.
func (*RegionMutation) AddCityIDs ¶
func (m *RegionMutation) AddCityIDs(ids ...uuid.UUID)
AddCityIDs adds the "cities" edge to the City entity by ids.
func (*RegionMutation) AddField ¶
func (m *RegionMutation) 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 (*RegionMutation) AddedEdges ¶
func (m *RegionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RegionMutation) AddedField ¶
func (m *RegionMutation) 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 (*RegionMutation) AddedFields ¶
func (m *RegionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RegionMutation) AddedIDs ¶
func (m *RegionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RegionMutation) CitiesCleared ¶
func (m *RegionMutation) CitiesCleared() bool
CitiesCleared reports if the "cities" edge to the City entity was cleared.
func (*RegionMutation) CitiesIDs ¶
func (m *RegionMutation) CitiesIDs() (ids []uuid.UUID)
CitiesIDs returns the "cities" edge IDs in the mutation.
func (*RegionMutation) ClearCities ¶
func (m *RegionMutation) ClearCities()
ClearCities clears the "cities" edge to the City entity.
func (*RegionMutation) ClearCountry ¶
func (m *RegionMutation) ClearCountry()
ClearCountry clears the "country" edge to the Country entity.
func (*RegionMutation) ClearEdge ¶
func (m *RegionMutation) 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 (*RegionMutation) ClearField ¶
func (m *RegionMutation) 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 (*RegionMutation) ClearedEdges ¶
func (m *RegionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RegionMutation) ClearedFields ¶
func (m *RegionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RegionMutation) Client ¶
func (m RegionMutation) 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 (*RegionMutation) CountryCleared ¶
func (m *RegionMutation) CountryCleared() bool
CountryCleared reports if the "country" edge to the Country entity was cleared.
func (*RegionMutation) CountryID ¶
func (m *RegionMutation) CountryID() (r uuid.UUID, exists bool)
CountryID returns the value of the "country_id" field in the mutation.
func (*RegionMutation) CountryIDs ¶
func (m *RegionMutation) CountryIDs() (ids []uuid.UUID)
CountryIDs returns the "country" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CountryID instead. It exists only for internal usage by the builders.
func (*RegionMutation) CreatedAt ¶
func (m *RegionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RegionMutation) EdgeCleared ¶
func (m *RegionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RegionMutation) Field ¶
func (m *RegionMutation) 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 (*RegionMutation) FieldCleared ¶
func (m *RegionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RegionMutation) Fields ¶
func (m *RegionMutation) 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 (*RegionMutation) ID ¶
func (m *RegionMutation) 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 (*RegionMutation) 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 (*RegionMutation) Name ¶
func (m *RegionMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*RegionMutation) OldCountryID ¶
OldCountryID returns the old "country_id" field's value of the Region entity. If the Region 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 (*RegionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Region entity. If the Region 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 (*RegionMutation) 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 (*RegionMutation) OldName ¶
func (m *RegionMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Region entity. If the Region 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 (*RegionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Region entity. If the Region 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 (*RegionMutation) RemoveCityIDs ¶
func (m *RegionMutation) RemoveCityIDs(ids ...uuid.UUID)
RemoveCityIDs removes the "cities" edge to the City entity by IDs.
func (*RegionMutation) RemovedCitiesIDs ¶
func (m *RegionMutation) RemovedCitiesIDs() (ids []uuid.UUID)
RemovedCities returns the removed IDs of the "cities" edge to the City entity.
func (*RegionMutation) RemovedEdges ¶
func (m *RegionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RegionMutation) RemovedIDs ¶
func (m *RegionMutation) 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 (*RegionMutation) ResetCities ¶
func (m *RegionMutation) ResetCities()
ResetCities resets all changes to the "cities" edge.
func (*RegionMutation) ResetCountry ¶
func (m *RegionMutation) ResetCountry()
ResetCountry resets all changes to the "country" edge.
func (*RegionMutation) ResetCountryID ¶
func (m *RegionMutation) ResetCountryID()
ResetCountryID resets all changes to the "country_id" field.
func (*RegionMutation) ResetCreatedAt ¶
func (m *RegionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RegionMutation) ResetEdge ¶
func (m *RegionMutation) 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 (*RegionMutation) ResetField ¶
func (m *RegionMutation) 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 (*RegionMutation) ResetName ¶
func (m *RegionMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*RegionMutation) ResetUpdatedAt ¶
func (m *RegionMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*RegionMutation) SetCountryID ¶
func (m *RegionMutation) SetCountryID(u uuid.UUID)
SetCountryID sets the "country_id" field.
func (*RegionMutation) SetCreatedAt ¶
func (m *RegionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RegionMutation) SetField ¶
func (m *RegionMutation) 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 (*RegionMutation) SetID ¶
func (m *RegionMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Region entities.
func (*RegionMutation) SetName ¶
func (m *RegionMutation) SetName(s string)
SetName sets the "name" field.
func (*RegionMutation) SetOp ¶
func (m *RegionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RegionMutation) SetUpdatedAt ¶
func (m *RegionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (RegionMutation) Tx ¶
func (m RegionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RegionMutation) Type ¶
func (m *RegionMutation) Type() string
Type returns the node type of this mutation (Region).
func (*RegionMutation) UpdatedAt ¶
func (m *RegionMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*RegionMutation) Where ¶
func (m *RegionMutation) Where(ps ...predicate.Region)
Where appends a list predicates to the RegionMutation builder.
func (*RegionMutation) WhereP ¶
func (m *RegionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RegionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RegionQuery ¶
type RegionQuery struct {
// contains filtered or unexported fields
}
RegionQuery is the builder for querying Region entities.
func (*RegionQuery) Aggregate ¶
func (rq *RegionQuery) Aggregate(fns ...AggregateFunc) *RegionSelect
Aggregate returns a RegionSelect configured with the given aggregations.
func (*RegionQuery) All ¶
func (rq *RegionQuery) All(ctx context.Context) ([]*Region, error)
All executes the query and returns a list of Regions.
func (*RegionQuery) AllX ¶
func (rq *RegionQuery) AllX(ctx context.Context) []*Region
AllX is like All, but panics if an error occurs.
func (*RegionQuery) Clone ¶
func (rq *RegionQuery) Clone() *RegionQuery
Clone returns a duplicate of the RegionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RegionQuery) Count ¶
func (rq *RegionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RegionQuery) CountX ¶
func (rq *RegionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RegionQuery) Exist ¶
func (rq *RegionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RegionQuery) ExistX ¶
func (rq *RegionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RegionQuery) First ¶
func (rq *RegionQuery) First(ctx context.Context) (*Region, error)
First returns the first Region entity from the query. Returns a *NotFoundError when no Region was found.
func (*RegionQuery) FirstID ¶
FirstID returns the first Region ID from the query. Returns a *NotFoundError when no Region ID was found.
func (*RegionQuery) FirstIDX ¶
func (rq *RegionQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*RegionQuery) FirstX ¶
func (rq *RegionQuery) FirstX(ctx context.Context) *Region
FirstX is like First, but panics if an error occurs.
func (*RegionQuery) GroupBy ¶
func (rq *RegionQuery) GroupBy(field string, fields ...string) *RegionGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Region.Query(). GroupBy(region.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RegionQuery) IDsX ¶
func (rq *RegionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*RegionQuery) Limit ¶
func (rq *RegionQuery) Limit(limit int) *RegionQuery
Limit the number of records to be returned by this query.
func (*RegionQuery) Offset ¶
func (rq *RegionQuery) Offset(offset int) *RegionQuery
Offset to start from.
func (*RegionQuery) Only ¶
func (rq *RegionQuery) Only(ctx context.Context) (*Region, error)
Only returns a single Region entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Region entity is found. Returns a *NotFoundError when no Region entities are found.
func (*RegionQuery) OnlyID ¶
OnlyID is like Only, but returns the only Region ID in the query. Returns a *NotSingularError when more than one Region ID is found. Returns a *NotFoundError when no entities are found.
func (*RegionQuery) OnlyIDX ¶
func (rq *RegionQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RegionQuery) OnlyX ¶
func (rq *RegionQuery) OnlyX(ctx context.Context) *Region
OnlyX is like Only, but panics if an error occurs.
func (*RegionQuery) Order ¶
func (rq *RegionQuery) Order(o ...region.OrderOption) *RegionQuery
Order specifies how the records should be ordered.
func (*RegionQuery) QueryCities ¶
func (rq *RegionQuery) QueryCities() *CityQuery
QueryCities chains the current query on the "cities" edge.
func (*RegionQuery) QueryCountry ¶
func (rq *RegionQuery) QueryCountry() *CountryQuery
QueryCountry chains the current query on the "country" edge.
func (*RegionQuery) Select ¶
func (rq *RegionQuery) Select(fields ...string) *RegionSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Region.Query(). Select(region.FieldCreatedAt). Scan(ctx, &v)
func (*RegionQuery) Unique ¶
func (rq *RegionQuery) Unique(unique bool) *RegionQuery
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 (*RegionQuery) Where ¶
func (rq *RegionQuery) Where(ps ...predicate.Region) *RegionQuery
Where adds a new predicate for the RegionQuery builder.
func (*RegionQuery) WithCities ¶
func (rq *RegionQuery) WithCities(opts ...func(*CityQuery)) *RegionQuery
WithCities tells the query-builder to eager-load the nodes that are connected to the "cities" edge. The optional arguments are used to configure the query builder of the edge.
func (*RegionQuery) WithCountry ¶
func (rq *RegionQuery) WithCountry(opts ...func(*CountryQuery)) *RegionQuery
WithCountry tells the query-builder to eager-load the nodes that are connected to the "country" edge. The optional arguments are used to configure the query builder of the edge.
type RegionSelect ¶
type RegionSelect struct { *RegionQuery // contains filtered or unexported fields }
RegionSelect is the builder for selecting fields of Region entities.
func (*RegionSelect) Aggregate ¶
func (rs *RegionSelect) Aggregate(fns ...AggregateFunc) *RegionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RegionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RegionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RegionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RegionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RegionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RegionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RegionSelect) Scan ¶
func (rs *RegionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RegionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RegionUpdate ¶
type RegionUpdate struct {
// contains filtered or unexported fields
}
RegionUpdate is the builder for updating Region entities.
func (*RegionUpdate) AddCities ¶
func (ru *RegionUpdate) AddCities(c ...*City) *RegionUpdate
AddCities adds the "cities" edges to the City entity.
func (*RegionUpdate) AddCityIDs ¶
func (ru *RegionUpdate) AddCityIDs(ids ...uuid.UUID) *RegionUpdate
AddCityIDs adds the "cities" edge to the City entity by IDs.
func (*RegionUpdate) ClearCities ¶
func (ru *RegionUpdate) ClearCities() *RegionUpdate
ClearCities clears all "cities" edges to the City entity.
func (*RegionUpdate) ClearCountry ¶
func (ru *RegionUpdate) ClearCountry() *RegionUpdate
ClearCountry clears the "country" edge to the Country entity.
func (*RegionUpdate) Exec ¶
func (ru *RegionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RegionUpdate) ExecX ¶
func (ru *RegionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RegionUpdate) Mutation ¶
func (ru *RegionUpdate) Mutation() *RegionMutation
Mutation returns the RegionMutation object of the builder.
func (*RegionUpdate) RemoveCities ¶
func (ru *RegionUpdate) RemoveCities(c ...*City) *RegionUpdate
RemoveCities removes "cities" edges to City entities.
func (*RegionUpdate) RemoveCityIDs ¶
func (ru *RegionUpdate) RemoveCityIDs(ids ...uuid.UUID) *RegionUpdate
RemoveCityIDs removes the "cities" edge to City entities by IDs.
func (*RegionUpdate) Save ¶
func (ru *RegionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RegionUpdate) SaveX ¶
func (ru *RegionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RegionUpdate) SetCountry ¶
func (ru *RegionUpdate) SetCountry(c *Country) *RegionUpdate
SetCountry sets the "country" edge to the Country entity.
func (*RegionUpdate) SetCountryID ¶
func (ru *RegionUpdate) SetCountryID(u uuid.UUID) *RegionUpdate
SetCountryID sets the "country_id" field.
func (*RegionUpdate) SetCreatedAt ¶
func (ru *RegionUpdate) SetCreatedAt(t time.Time) *RegionUpdate
SetCreatedAt sets the "created_at" field.
func (*RegionUpdate) SetName ¶
func (ru *RegionUpdate) SetName(s string) *RegionUpdate
SetName sets the "name" field.
func (*RegionUpdate) SetNillableCountryID ¶
func (ru *RegionUpdate) SetNillableCountryID(u *uuid.UUID) *RegionUpdate
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*RegionUpdate) SetNillableCreatedAt ¶
func (ru *RegionUpdate) SetNillableCreatedAt(t *time.Time) *RegionUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RegionUpdate) SetNillableName ¶
func (ru *RegionUpdate) SetNillableName(s *string) *RegionUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*RegionUpdate) SetUpdatedAt ¶
func (ru *RegionUpdate) SetUpdatedAt(t time.Time) *RegionUpdate
SetUpdatedAt sets the "updated_at" field.
func (*RegionUpdate) Where ¶
func (ru *RegionUpdate) Where(ps ...predicate.Region) *RegionUpdate
Where appends a list predicates to the RegionUpdate builder.
type RegionUpdateOne ¶
type RegionUpdateOne struct {
// contains filtered or unexported fields
}
RegionUpdateOne is the builder for updating a single Region entity.
func (*RegionUpdateOne) AddCities ¶
func (ruo *RegionUpdateOne) AddCities(c ...*City) *RegionUpdateOne
AddCities adds the "cities" edges to the City entity.
func (*RegionUpdateOne) AddCityIDs ¶
func (ruo *RegionUpdateOne) AddCityIDs(ids ...uuid.UUID) *RegionUpdateOne
AddCityIDs adds the "cities" edge to the City entity by IDs.
func (*RegionUpdateOne) ClearCities ¶
func (ruo *RegionUpdateOne) ClearCities() *RegionUpdateOne
ClearCities clears all "cities" edges to the City entity.
func (*RegionUpdateOne) ClearCountry ¶
func (ruo *RegionUpdateOne) ClearCountry() *RegionUpdateOne
ClearCountry clears the "country" edge to the Country entity.
func (*RegionUpdateOne) Exec ¶
func (ruo *RegionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RegionUpdateOne) ExecX ¶
func (ruo *RegionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RegionUpdateOne) Mutation ¶
func (ruo *RegionUpdateOne) Mutation() *RegionMutation
Mutation returns the RegionMutation object of the builder.
func (*RegionUpdateOne) RemoveCities ¶
func (ruo *RegionUpdateOne) RemoveCities(c ...*City) *RegionUpdateOne
RemoveCities removes "cities" edges to City entities.
func (*RegionUpdateOne) RemoveCityIDs ¶
func (ruo *RegionUpdateOne) RemoveCityIDs(ids ...uuid.UUID) *RegionUpdateOne
RemoveCityIDs removes the "cities" edge to City entities by IDs.
func (*RegionUpdateOne) Save ¶
func (ruo *RegionUpdateOne) Save(ctx context.Context) (*Region, error)
Save executes the query and returns the updated Region entity.
func (*RegionUpdateOne) SaveX ¶
func (ruo *RegionUpdateOne) SaveX(ctx context.Context) *Region
SaveX is like Save, but panics if an error occurs.
func (*RegionUpdateOne) Select ¶
func (ruo *RegionUpdateOne) Select(field string, fields ...string) *RegionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RegionUpdateOne) SetCountry ¶
func (ruo *RegionUpdateOne) SetCountry(c *Country) *RegionUpdateOne
SetCountry sets the "country" edge to the Country entity.
func (*RegionUpdateOne) SetCountryID ¶
func (ruo *RegionUpdateOne) SetCountryID(u uuid.UUID) *RegionUpdateOne
SetCountryID sets the "country_id" field.
func (*RegionUpdateOne) SetCreatedAt ¶
func (ruo *RegionUpdateOne) SetCreatedAt(t time.Time) *RegionUpdateOne
SetCreatedAt sets the "created_at" field.
func (*RegionUpdateOne) SetName ¶
func (ruo *RegionUpdateOne) SetName(s string) *RegionUpdateOne
SetName sets the "name" field.
func (*RegionUpdateOne) SetNillableCountryID ¶
func (ruo *RegionUpdateOne) SetNillableCountryID(u *uuid.UUID) *RegionUpdateOne
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*RegionUpdateOne) SetNillableCreatedAt ¶
func (ruo *RegionUpdateOne) SetNillableCreatedAt(t *time.Time) *RegionUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RegionUpdateOne) SetNillableName ¶
func (ruo *RegionUpdateOne) SetNillableName(s *string) *RegionUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*RegionUpdateOne) SetUpdatedAt ¶
func (ruo *RegionUpdateOne) SetUpdatedAt(t time.Time) *RegionUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*RegionUpdateOne) Where ¶
func (ruo *RegionUpdateOne) Where(ps ...predicate.Region) *RegionUpdateOne
Where appends a list predicates to the RegionUpdate builder.
type Reply ¶
type Reply struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // Slug holds the value of the "slug" field. Slug string `json:"slug,omitempty"` // AuthorID holds the value of the "author_id" field. AuthorID uuid.UUID `json:"author_id,omitempty"` // CommentID holds the value of the "comment_id" field. CommentID uuid.UUID `json:"comment_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ReplyQuery when eager-loading is set. Edges ReplyEdges `json:"edges"` // contains filtered or unexported fields }
Reply is the model entity for the Reply schema.
func (*Reply) QueryAuthor ¶
QueryAuthor queries the "author" edge of the Reply entity.
func (*Reply) QueryComment ¶
func (r *Reply) QueryComment() *CommentQuery
QueryComment queries the "comment" edge of the Reply entity.
func (*Reply) QueryNotifications ¶
func (r *Reply) QueryNotifications() *NotificationQuery
QueryNotifications queries the "notifications" edge of the Reply entity.
func (*Reply) QueryReactions ¶
func (r *Reply) QueryReactions() *ReactionQuery
QueryReactions queries the "reactions" edge of the Reply entity.
func (*Reply) Unwrap ¶
Unwrap unwraps the Reply 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 (*Reply) Update ¶
func (r *Reply) Update() *ReplyUpdateOne
Update returns a builder for updating this Reply. Note that you need to call Reply.Unwrap() before calling this method if this Reply was returned from a transaction, and the transaction was committed or rolled back.
type ReplyClient ¶
type ReplyClient struct {
// contains filtered or unexported fields
}
ReplyClient is a client for the Reply schema.
func NewReplyClient ¶
func NewReplyClient(c config) *ReplyClient
NewReplyClient returns a client for the Reply from the given config.
func (*ReplyClient) Create ¶
func (c *ReplyClient) Create() *ReplyCreate
Create returns a builder for creating a Reply entity.
func (*ReplyClient) CreateBulk ¶
func (c *ReplyClient) CreateBulk(builders ...*ReplyCreate) *ReplyCreateBulk
CreateBulk returns a builder for creating a bulk of Reply entities.
func (*ReplyClient) Delete ¶
func (c *ReplyClient) Delete() *ReplyDelete
Delete returns a delete builder for Reply.
func (*ReplyClient) DeleteOne ¶
func (c *ReplyClient) DeleteOne(r *Reply) *ReplyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ReplyClient) DeleteOneID ¶
func (c *ReplyClient) DeleteOneID(id uuid.UUID) *ReplyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ReplyClient) Intercept ¶
func (c *ReplyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `reply.Intercept(f(g(h())))`.
func (*ReplyClient) Interceptors ¶
func (c *ReplyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ReplyClient) MapCreateBulk ¶
func (c *ReplyClient) MapCreateBulk(slice any, setFunc func(*ReplyCreate, int)) *ReplyCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ReplyClient) Query ¶
func (c *ReplyClient) Query() *ReplyQuery
Query returns a query builder for Reply.
func (*ReplyClient) QueryAuthor ¶
func (c *ReplyClient) QueryAuthor(r *Reply) *UserQuery
QueryAuthor queries the author edge of a Reply.
func (*ReplyClient) QueryComment ¶
func (c *ReplyClient) QueryComment(r *Reply) *CommentQuery
QueryComment queries the comment edge of a Reply.
func (*ReplyClient) QueryNotifications ¶
func (c *ReplyClient) QueryNotifications(r *Reply) *NotificationQuery
QueryNotifications queries the notifications edge of a Reply.
func (*ReplyClient) QueryReactions ¶
func (c *ReplyClient) QueryReactions(r *Reply) *ReactionQuery
QueryReactions queries the reactions edge of a Reply.
func (*ReplyClient) Update ¶
func (c *ReplyClient) Update() *ReplyUpdate
Update returns an update builder for Reply.
func (*ReplyClient) UpdateOne ¶
func (c *ReplyClient) UpdateOne(r *Reply) *ReplyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ReplyClient) UpdateOneID ¶
func (c *ReplyClient) UpdateOneID(id uuid.UUID) *ReplyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ReplyClient) Use ¶
func (c *ReplyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `reply.Hooks(f(g(h())))`.
type ReplyCreate ¶
type ReplyCreate struct {
// contains filtered or unexported fields
}
ReplyCreate is the builder for creating a Reply entity.
func (*ReplyCreate) AddNotificationIDs ¶
func (rc *ReplyCreate) AddNotificationIDs(ids ...uuid.UUID) *ReplyCreate
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*ReplyCreate) AddNotifications ¶
func (rc *ReplyCreate) AddNotifications(n ...*Notification) *ReplyCreate
AddNotifications adds the "notifications" edges to the Notification entity.
func (*ReplyCreate) AddReactionIDs ¶
func (rc *ReplyCreate) AddReactionIDs(ids ...uuid.UUID) *ReplyCreate
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*ReplyCreate) AddReactions ¶
func (rc *ReplyCreate) AddReactions(r ...*Reaction) *ReplyCreate
AddReactions adds the "reactions" edges to the Reaction entity.
func (*ReplyCreate) Exec ¶
func (rc *ReplyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReplyCreate) ExecX ¶
func (rc *ReplyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReplyCreate) Mutation ¶
func (rc *ReplyCreate) Mutation() *ReplyMutation
Mutation returns the ReplyMutation object of the builder.
func (*ReplyCreate) Save ¶
func (rc *ReplyCreate) Save(ctx context.Context) (*Reply, error)
Save creates the Reply in the database.
func (*ReplyCreate) SaveX ¶
func (rc *ReplyCreate) SaveX(ctx context.Context) *Reply
SaveX calls Save and panics if Save returns an error.
func (*ReplyCreate) SetAuthor ¶
func (rc *ReplyCreate) SetAuthor(u *User) *ReplyCreate
SetAuthor sets the "author" edge to the User entity.
func (*ReplyCreate) SetAuthorID ¶
func (rc *ReplyCreate) SetAuthorID(u uuid.UUID) *ReplyCreate
SetAuthorID sets the "author_id" field.
func (*ReplyCreate) SetComment ¶
func (rc *ReplyCreate) SetComment(c *Comment) *ReplyCreate
SetComment sets the "comment" edge to the Comment entity.
func (*ReplyCreate) SetCommentID ¶
func (rc *ReplyCreate) SetCommentID(u uuid.UUID) *ReplyCreate
SetCommentID sets the "comment_id" field.
func (*ReplyCreate) SetCreatedAt ¶
func (rc *ReplyCreate) SetCreatedAt(t time.Time) *ReplyCreate
SetCreatedAt sets the "created_at" field.
func (*ReplyCreate) SetID ¶
func (rc *ReplyCreate) SetID(u uuid.UUID) *ReplyCreate
SetID sets the "id" field.
func (*ReplyCreate) SetNillableCreatedAt ¶
func (rc *ReplyCreate) SetNillableCreatedAt(t *time.Time) *ReplyCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReplyCreate) SetNillableID ¶
func (rc *ReplyCreate) SetNillableID(u *uuid.UUID) *ReplyCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ReplyCreate) SetNillableUpdatedAt ¶
func (rc *ReplyCreate) SetNillableUpdatedAt(t *time.Time) *ReplyCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ReplyCreate) SetSlug ¶
func (rc *ReplyCreate) SetSlug(s string) *ReplyCreate
SetSlug sets the "slug" field.
func (*ReplyCreate) SetText ¶
func (rc *ReplyCreate) SetText(s string) *ReplyCreate
SetText sets the "text" field.
func (*ReplyCreate) SetUpdatedAt ¶
func (rc *ReplyCreate) SetUpdatedAt(t time.Time) *ReplyCreate
SetUpdatedAt sets the "updated_at" field.
type ReplyCreateBulk ¶
type ReplyCreateBulk struct {
// contains filtered or unexported fields
}
ReplyCreateBulk is the builder for creating many Reply entities in bulk.
func (*ReplyCreateBulk) Exec ¶
func (rcb *ReplyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReplyCreateBulk) ExecX ¶
func (rcb *ReplyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ReplyDelete ¶
type ReplyDelete struct {
// contains filtered or unexported fields
}
ReplyDelete is the builder for deleting a Reply entity.
func (*ReplyDelete) Exec ¶
func (rd *ReplyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ReplyDelete) ExecX ¶
func (rd *ReplyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ReplyDelete) Where ¶
func (rd *ReplyDelete) Where(ps ...predicate.Reply) *ReplyDelete
Where appends a list predicates to the ReplyDelete builder.
type ReplyDeleteOne ¶
type ReplyDeleteOne struct {
// contains filtered or unexported fields
}
ReplyDeleteOne is the builder for deleting a single Reply entity.
func (*ReplyDeleteOne) Exec ¶
func (rdo *ReplyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ReplyDeleteOne) ExecX ¶
func (rdo *ReplyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReplyDeleteOne) Where ¶
func (rdo *ReplyDeleteOne) Where(ps ...predicate.Reply) *ReplyDeleteOne
Where appends a list predicates to the ReplyDelete builder.
type ReplyEdges ¶
type ReplyEdges struct { // Reactions holds the value of the reactions edge. Reactions []*Reaction `json:"reactions,omitempty"` // Author holds the value of the author edge. Author *User `json:"author,omitempty"` // Comment holds the value of the comment edge. Comment *Comment `json:"comment,omitempty"` // Notifications holds the value of the notifications edge. Notifications []*Notification `json:"notifications,omitempty"` // contains filtered or unexported fields }
ReplyEdges holds the relations/edges for other nodes in the graph.
func (ReplyEdges) AuthorOrErr ¶
func (e ReplyEdges) AuthorOrErr() (*User, error)
AuthorOrErr returns the Author value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ReplyEdges) CommentOrErr ¶
func (e ReplyEdges) CommentOrErr() (*Comment, error)
CommentOrErr returns the Comment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ReplyEdges) NotificationsOrErr ¶
func (e ReplyEdges) NotificationsOrErr() ([]*Notification, error)
NotificationsOrErr returns the Notifications value or an error if the edge was not loaded in eager-loading.
func (ReplyEdges) ReactionsOrErr ¶
func (e ReplyEdges) ReactionsOrErr() ([]*Reaction, error)
ReactionsOrErr returns the Reactions value or an error if the edge was not loaded in eager-loading.
type ReplyGroupBy ¶
type ReplyGroupBy struct {
// contains filtered or unexported fields
}
ReplyGroupBy is the group-by builder for Reply entities.
func (*ReplyGroupBy) Aggregate ¶
func (rgb *ReplyGroupBy) Aggregate(fns ...AggregateFunc) *ReplyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ReplyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReplyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReplyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReplyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReplyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReplyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReplyGroupBy) Scan ¶
func (rgb *ReplyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReplyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReplyMutation ¶
type ReplyMutation struct {
// contains filtered or unexported fields
}
ReplyMutation represents an operation that mutates the Reply nodes in the graph.
func (*ReplyMutation) AddField ¶
func (m *ReplyMutation) 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 (*ReplyMutation) AddNotificationIDs ¶
func (m *ReplyMutation) AddNotificationIDs(ids ...uuid.UUID)
AddNotificationIDs adds the "notifications" edge to the Notification entity by ids.
func (*ReplyMutation) AddReactionIDs ¶
func (m *ReplyMutation) AddReactionIDs(ids ...uuid.UUID)
AddReactionIDs adds the "reactions" edge to the Reaction entity by ids.
func (*ReplyMutation) AddedEdges ¶
func (m *ReplyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ReplyMutation) AddedField ¶
func (m *ReplyMutation) 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 (*ReplyMutation) AddedFields ¶
func (m *ReplyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ReplyMutation) AddedIDs ¶
func (m *ReplyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ReplyMutation) AuthorCleared ¶
func (m *ReplyMutation) AuthorCleared() bool
AuthorCleared reports if the "author" edge to the User entity was cleared.
func (*ReplyMutation) AuthorID ¶
func (m *ReplyMutation) AuthorID() (r uuid.UUID, exists bool)
AuthorID returns the value of the "author_id" field in the mutation.
func (*ReplyMutation) AuthorIDs ¶
func (m *ReplyMutation) AuthorIDs() (ids []uuid.UUID)
AuthorIDs returns the "author" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AuthorID instead. It exists only for internal usage by the builders.
func (*ReplyMutation) ClearAuthor ¶
func (m *ReplyMutation) ClearAuthor()
ClearAuthor clears the "author" edge to the User entity.
func (*ReplyMutation) ClearComment ¶
func (m *ReplyMutation) ClearComment()
ClearComment clears the "comment" edge to the Comment entity.
func (*ReplyMutation) ClearEdge ¶
func (m *ReplyMutation) 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 (*ReplyMutation) ClearField ¶
func (m *ReplyMutation) 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 (*ReplyMutation) ClearNotifications ¶
func (m *ReplyMutation) ClearNotifications()
ClearNotifications clears the "notifications" edge to the Notification entity.
func (*ReplyMutation) ClearReactions ¶
func (m *ReplyMutation) ClearReactions()
ClearReactions clears the "reactions" edge to the Reaction entity.
func (*ReplyMutation) ClearedEdges ¶
func (m *ReplyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ReplyMutation) ClearedFields ¶
func (m *ReplyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ReplyMutation) Client ¶
func (m ReplyMutation) 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 (*ReplyMutation) CommentCleared ¶
func (m *ReplyMutation) CommentCleared() bool
CommentCleared reports if the "comment" edge to the Comment entity was cleared.
func (*ReplyMutation) CommentID ¶
func (m *ReplyMutation) CommentID() (r uuid.UUID, exists bool)
CommentID returns the value of the "comment_id" field in the mutation.
func (*ReplyMutation) CommentIDs ¶
func (m *ReplyMutation) CommentIDs() (ids []uuid.UUID)
CommentIDs returns the "comment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CommentID instead. It exists only for internal usage by the builders.
func (*ReplyMutation) CreatedAt ¶
func (m *ReplyMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ReplyMutation) EdgeCleared ¶
func (m *ReplyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ReplyMutation) Field ¶
func (m *ReplyMutation) 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 (*ReplyMutation) FieldCleared ¶
func (m *ReplyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ReplyMutation) Fields ¶
func (m *ReplyMutation) 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 (*ReplyMutation) ID ¶
func (m *ReplyMutation) 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 (*ReplyMutation) 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 (*ReplyMutation) NotificationsCleared ¶
func (m *ReplyMutation) NotificationsCleared() bool
NotificationsCleared reports if the "notifications" edge to the Notification entity was cleared.
func (*ReplyMutation) NotificationsIDs ¶
func (m *ReplyMutation) NotificationsIDs() (ids []uuid.UUID)
NotificationsIDs returns the "notifications" edge IDs in the mutation.
func (*ReplyMutation) OldAuthorID ¶
OldAuthorID returns the old "author_id" field's value of the Reply entity. If the Reply 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 (*ReplyMutation) OldCommentID ¶
OldCommentID returns the old "comment_id" field's value of the Reply entity. If the Reply 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 (*ReplyMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Reply entity. If the Reply 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 (*ReplyMutation) 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 (*ReplyMutation) OldSlug ¶
func (m *ReplyMutation) OldSlug(ctx context.Context) (v string, err error)
OldSlug returns the old "slug" field's value of the Reply entity. If the Reply 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 (*ReplyMutation) OldText ¶
func (m *ReplyMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" field's value of the Reply entity. If the Reply 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 (*ReplyMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Reply entity. If the Reply 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 (*ReplyMutation) ReactionsCleared ¶
func (m *ReplyMutation) ReactionsCleared() bool
ReactionsCleared reports if the "reactions" edge to the Reaction entity was cleared.
func (*ReplyMutation) ReactionsIDs ¶
func (m *ReplyMutation) ReactionsIDs() (ids []uuid.UUID)
ReactionsIDs returns the "reactions" edge IDs in the mutation.
func (*ReplyMutation) RemoveNotificationIDs ¶
func (m *ReplyMutation) RemoveNotificationIDs(ids ...uuid.UUID)
RemoveNotificationIDs removes the "notifications" edge to the Notification entity by IDs.
func (*ReplyMutation) RemoveReactionIDs ¶
func (m *ReplyMutation) RemoveReactionIDs(ids ...uuid.UUID)
RemoveReactionIDs removes the "reactions" edge to the Reaction entity by IDs.
func (*ReplyMutation) RemovedEdges ¶
func (m *ReplyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ReplyMutation) RemovedIDs ¶
func (m *ReplyMutation) 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 (*ReplyMutation) RemovedNotificationsIDs ¶
func (m *ReplyMutation) RemovedNotificationsIDs() (ids []uuid.UUID)
RemovedNotifications returns the removed IDs of the "notifications" edge to the Notification entity.
func (*ReplyMutation) RemovedReactionsIDs ¶
func (m *ReplyMutation) RemovedReactionsIDs() (ids []uuid.UUID)
RemovedReactions returns the removed IDs of the "reactions" edge to the Reaction entity.
func (*ReplyMutation) ResetAuthor ¶
func (m *ReplyMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" edge.
func (*ReplyMutation) ResetAuthorID ¶
func (m *ReplyMutation) ResetAuthorID()
ResetAuthorID resets all changes to the "author_id" field.
func (*ReplyMutation) ResetComment ¶
func (m *ReplyMutation) ResetComment()
ResetComment resets all changes to the "comment" edge.
func (*ReplyMutation) ResetCommentID ¶
func (m *ReplyMutation) ResetCommentID()
ResetCommentID resets all changes to the "comment_id" field.
func (*ReplyMutation) ResetCreatedAt ¶
func (m *ReplyMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ReplyMutation) ResetEdge ¶
func (m *ReplyMutation) 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 (*ReplyMutation) ResetField ¶
func (m *ReplyMutation) 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 (*ReplyMutation) ResetNotifications ¶
func (m *ReplyMutation) ResetNotifications()
ResetNotifications resets all changes to the "notifications" edge.
func (*ReplyMutation) ResetReactions ¶
func (m *ReplyMutation) ResetReactions()
ResetReactions resets all changes to the "reactions" edge.
func (*ReplyMutation) ResetSlug ¶
func (m *ReplyMutation) ResetSlug()
ResetSlug resets all changes to the "slug" field.
func (*ReplyMutation) ResetText ¶
func (m *ReplyMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*ReplyMutation) ResetUpdatedAt ¶
func (m *ReplyMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ReplyMutation) SetAuthorID ¶
func (m *ReplyMutation) SetAuthorID(u uuid.UUID)
SetAuthorID sets the "author_id" field.
func (*ReplyMutation) SetCommentID ¶
func (m *ReplyMutation) SetCommentID(u uuid.UUID)
SetCommentID sets the "comment_id" field.
func (*ReplyMutation) SetCreatedAt ¶
func (m *ReplyMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ReplyMutation) SetField ¶
func (m *ReplyMutation) 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 (*ReplyMutation) SetID ¶
func (m *ReplyMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Reply entities.
func (*ReplyMutation) SetOp ¶
func (m *ReplyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ReplyMutation) SetSlug ¶
func (m *ReplyMutation) SetSlug(s string)
SetSlug sets the "slug" field.
func (*ReplyMutation) SetText ¶
func (m *ReplyMutation) SetText(s string)
SetText sets the "text" field.
func (*ReplyMutation) SetUpdatedAt ¶
func (m *ReplyMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ReplyMutation) Slug ¶
func (m *ReplyMutation) Slug() (r string, exists bool)
Slug returns the value of the "slug" field in the mutation.
func (*ReplyMutation) Text ¶
func (m *ReplyMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (ReplyMutation) Tx ¶
func (m ReplyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ReplyMutation) Type ¶
func (m *ReplyMutation) Type() string
Type returns the node type of this mutation (Reply).
func (*ReplyMutation) UpdatedAt ¶
func (m *ReplyMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ReplyMutation) Where ¶
func (m *ReplyMutation) Where(ps ...predicate.Reply)
Where appends a list predicates to the ReplyMutation builder.
func (*ReplyMutation) WhereP ¶
func (m *ReplyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ReplyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ReplyQuery ¶
type ReplyQuery struct {
// contains filtered or unexported fields
}
ReplyQuery is the builder for querying Reply entities.
func (*ReplyQuery) Aggregate ¶
func (rq *ReplyQuery) Aggregate(fns ...AggregateFunc) *ReplySelect
Aggregate returns a ReplySelect configured with the given aggregations.
func (*ReplyQuery) All ¶
func (rq *ReplyQuery) All(ctx context.Context) ([]*Reply, error)
All executes the query and returns a list of Replies.
func (*ReplyQuery) AllX ¶
func (rq *ReplyQuery) AllX(ctx context.Context) []*Reply
AllX is like All, but panics if an error occurs.
func (*ReplyQuery) Clone ¶
func (rq *ReplyQuery) Clone() *ReplyQuery
Clone returns a duplicate of the ReplyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ReplyQuery) Count ¶
func (rq *ReplyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ReplyQuery) CountX ¶
func (rq *ReplyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ReplyQuery) Exist ¶
func (rq *ReplyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ReplyQuery) ExistX ¶
func (rq *ReplyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ReplyQuery) First ¶
func (rq *ReplyQuery) First(ctx context.Context) (*Reply, error)
First returns the first Reply entity from the query. Returns a *NotFoundError when no Reply was found.
func (*ReplyQuery) FirstID ¶
FirstID returns the first Reply ID from the query. Returns a *NotFoundError when no Reply ID was found.
func (*ReplyQuery) FirstIDX ¶
func (rq *ReplyQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ReplyQuery) FirstX ¶
func (rq *ReplyQuery) FirstX(ctx context.Context) *Reply
FirstX is like First, but panics if an error occurs.
func (*ReplyQuery) GroupBy ¶
func (rq *ReplyQuery) GroupBy(field string, fields ...string) *ReplyGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Reply.Query(). GroupBy(reply.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ReplyQuery) IDsX ¶
func (rq *ReplyQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ReplyQuery) Limit ¶
func (rq *ReplyQuery) Limit(limit int) *ReplyQuery
Limit the number of records to be returned by this query.
func (*ReplyQuery) Offset ¶
func (rq *ReplyQuery) Offset(offset int) *ReplyQuery
Offset to start from.
func (*ReplyQuery) Only ¶
func (rq *ReplyQuery) Only(ctx context.Context) (*Reply, error)
Only returns a single Reply entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Reply entity is found. Returns a *NotFoundError when no Reply entities are found.
func (*ReplyQuery) OnlyID ¶
OnlyID is like Only, but returns the only Reply ID in the query. Returns a *NotSingularError when more than one Reply ID is found. Returns a *NotFoundError when no entities are found.
func (*ReplyQuery) OnlyIDX ¶
func (rq *ReplyQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ReplyQuery) OnlyX ¶
func (rq *ReplyQuery) OnlyX(ctx context.Context) *Reply
OnlyX is like Only, but panics if an error occurs.
func (*ReplyQuery) Order ¶
func (rq *ReplyQuery) Order(o ...reply.OrderOption) *ReplyQuery
Order specifies how the records should be ordered.
func (*ReplyQuery) QueryAuthor ¶
func (rq *ReplyQuery) QueryAuthor() *UserQuery
QueryAuthor chains the current query on the "author" edge.
func (*ReplyQuery) QueryComment ¶
func (rq *ReplyQuery) QueryComment() *CommentQuery
QueryComment chains the current query on the "comment" edge.
func (*ReplyQuery) QueryNotifications ¶
func (rq *ReplyQuery) QueryNotifications() *NotificationQuery
QueryNotifications chains the current query on the "notifications" edge.
func (*ReplyQuery) QueryReactions ¶
func (rq *ReplyQuery) QueryReactions() *ReactionQuery
QueryReactions chains the current query on the "reactions" edge.
func (*ReplyQuery) Select ¶
func (rq *ReplyQuery) Select(fields ...string) *ReplySelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Reply.Query(). Select(reply.FieldCreatedAt). Scan(ctx, &v)
func (*ReplyQuery) Unique ¶
func (rq *ReplyQuery) Unique(unique bool) *ReplyQuery
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 (*ReplyQuery) Where ¶
func (rq *ReplyQuery) Where(ps ...predicate.Reply) *ReplyQuery
Where adds a new predicate for the ReplyQuery builder.
func (*ReplyQuery) WithAuthor ¶
func (rq *ReplyQuery) WithAuthor(opts ...func(*UserQuery)) *ReplyQuery
WithAuthor tells the query-builder to eager-load the nodes that are connected to the "author" edge. The optional arguments are used to configure the query builder of the edge.
func (*ReplyQuery) WithComment ¶
func (rq *ReplyQuery) WithComment(opts ...func(*CommentQuery)) *ReplyQuery
WithComment tells the query-builder to eager-load the nodes that are connected to the "comment" edge. The optional arguments are used to configure the query builder of the edge.
func (*ReplyQuery) WithNotifications ¶
func (rq *ReplyQuery) WithNotifications(opts ...func(*NotificationQuery)) *ReplyQuery
WithNotifications tells the query-builder to eager-load the nodes that are connected to the "notifications" edge. The optional arguments are used to configure the query builder of the edge.
func (*ReplyQuery) WithReactions ¶
func (rq *ReplyQuery) WithReactions(opts ...func(*ReactionQuery)) *ReplyQuery
WithReactions tells the query-builder to eager-load the nodes that are connected to the "reactions" edge. The optional arguments are used to configure the query builder of the edge.
type ReplySelect ¶
type ReplySelect struct { *ReplyQuery // contains filtered or unexported fields }
ReplySelect is the builder for selecting fields of Reply entities.
func (*ReplySelect) Aggregate ¶
func (rs *ReplySelect) Aggregate(fns ...AggregateFunc) *ReplySelect
Aggregate adds the given aggregation functions to the selector query.
func (*ReplySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReplySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReplySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReplySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReplySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReplySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReplySelect) Scan ¶
func (rs *ReplySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReplySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReplyUpdate ¶
type ReplyUpdate struct {
// contains filtered or unexported fields
}
ReplyUpdate is the builder for updating Reply entities.
func (*ReplyUpdate) AddNotificationIDs ¶
func (ru *ReplyUpdate) AddNotificationIDs(ids ...uuid.UUID) *ReplyUpdate
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*ReplyUpdate) AddNotifications ¶
func (ru *ReplyUpdate) AddNotifications(n ...*Notification) *ReplyUpdate
AddNotifications adds the "notifications" edges to the Notification entity.
func (*ReplyUpdate) AddReactionIDs ¶
func (ru *ReplyUpdate) AddReactionIDs(ids ...uuid.UUID) *ReplyUpdate
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*ReplyUpdate) AddReactions ¶
func (ru *ReplyUpdate) AddReactions(r ...*Reaction) *ReplyUpdate
AddReactions adds the "reactions" edges to the Reaction entity.
func (*ReplyUpdate) ClearAuthor ¶
func (ru *ReplyUpdate) ClearAuthor() *ReplyUpdate
ClearAuthor clears the "author" edge to the User entity.
func (*ReplyUpdate) ClearComment ¶
func (ru *ReplyUpdate) ClearComment() *ReplyUpdate
ClearComment clears the "comment" edge to the Comment entity.
func (*ReplyUpdate) ClearNotifications ¶
func (ru *ReplyUpdate) ClearNotifications() *ReplyUpdate
ClearNotifications clears all "notifications" edges to the Notification entity.
func (*ReplyUpdate) ClearReactions ¶
func (ru *ReplyUpdate) ClearReactions() *ReplyUpdate
ClearReactions clears all "reactions" edges to the Reaction entity.
func (*ReplyUpdate) Exec ¶
func (ru *ReplyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReplyUpdate) ExecX ¶
func (ru *ReplyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReplyUpdate) Mutation ¶
func (ru *ReplyUpdate) Mutation() *ReplyMutation
Mutation returns the ReplyMutation object of the builder.
func (*ReplyUpdate) RemoveNotificationIDs ¶
func (ru *ReplyUpdate) RemoveNotificationIDs(ids ...uuid.UUID) *ReplyUpdate
RemoveNotificationIDs removes the "notifications" edge to Notification entities by IDs.
func (*ReplyUpdate) RemoveNotifications ¶
func (ru *ReplyUpdate) RemoveNotifications(n ...*Notification) *ReplyUpdate
RemoveNotifications removes "notifications" edges to Notification entities.
func (*ReplyUpdate) RemoveReactionIDs ¶
func (ru *ReplyUpdate) RemoveReactionIDs(ids ...uuid.UUID) *ReplyUpdate
RemoveReactionIDs removes the "reactions" edge to Reaction entities by IDs.
func (*ReplyUpdate) RemoveReactions ¶
func (ru *ReplyUpdate) RemoveReactions(r ...*Reaction) *ReplyUpdate
RemoveReactions removes "reactions" edges to Reaction entities.
func (*ReplyUpdate) Save ¶
func (ru *ReplyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ReplyUpdate) SaveX ¶
func (ru *ReplyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ReplyUpdate) SetAuthor ¶
func (ru *ReplyUpdate) SetAuthor(u *User) *ReplyUpdate
SetAuthor sets the "author" edge to the User entity.
func (*ReplyUpdate) SetAuthorID ¶
func (ru *ReplyUpdate) SetAuthorID(u uuid.UUID) *ReplyUpdate
SetAuthorID sets the "author_id" field.
func (*ReplyUpdate) SetComment ¶
func (ru *ReplyUpdate) SetComment(c *Comment) *ReplyUpdate
SetComment sets the "comment" edge to the Comment entity.
func (*ReplyUpdate) SetCommentID ¶
func (ru *ReplyUpdate) SetCommentID(u uuid.UUID) *ReplyUpdate
SetCommentID sets the "comment_id" field.
func (*ReplyUpdate) SetCreatedAt ¶
func (ru *ReplyUpdate) SetCreatedAt(t time.Time) *ReplyUpdate
SetCreatedAt sets the "created_at" field.
func (*ReplyUpdate) SetNillableAuthorID ¶
func (ru *ReplyUpdate) SetNillableAuthorID(u *uuid.UUID) *ReplyUpdate
SetNillableAuthorID sets the "author_id" field if the given value is not nil.
func (*ReplyUpdate) SetNillableCommentID ¶
func (ru *ReplyUpdate) SetNillableCommentID(u *uuid.UUID) *ReplyUpdate
SetNillableCommentID sets the "comment_id" field if the given value is not nil.
func (*ReplyUpdate) SetNillableCreatedAt ¶
func (ru *ReplyUpdate) SetNillableCreatedAt(t *time.Time) *ReplyUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReplyUpdate) SetNillableSlug ¶
func (ru *ReplyUpdate) SetNillableSlug(s *string) *ReplyUpdate
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*ReplyUpdate) SetNillableText ¶
func (ru *ReplyUpdate) SetNillableText(s *string) *ReplyUpdate
SetNillableText sets the "text" field if the given value is not nil.
func (*ReplyUpdate) SetSlug ¶
func (ru *ReplyUpdate) SetSlug(s string) *ReplyUpdate
SetSlug sets the "slug" field.
func (*ReplyUpdate) SetText ¶
func (ru *ReplyUpdate) SetText(s string) *ReplyUpdate
SetText sets the "text" field.
func (*ReplyUpdate) SetUpdatedAt ¶
func (ru *ReplyUpdate) SetUpdatedAt(t time.Time) *ReplyUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ReplyUpdate) Where ¶
func (ru *ReplyUpdate) Where(ps ...predicate.Reply) *ReplyUpdate
Where appends a list predicates to the ReplyUpdate builder.
type ReplyUpdateOne ¶
type ReplyUpdateOne struct {
// contains filtered or unexported fields
}
ReplyUpdateOne is the builder for updating a single Reply entity.
func (*ReplyUpdateOne) AddNotificationIDs ¶
func (ruo *ReplyUpdateOne) AddNotificationIDs(ids ...uuid.UUID) *ReplyUpdateOne
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*ReplyUpdateOne) AddNotifications ¶
func (ruo *ReplyUpdateOne) AddNotifications(n ...*Notification) *ReplyUpdateOne
AddNotifications adds the "notifications" edges to the Notification entity.
func (*ReplyUpdateOne) AddReactionIDs ¶
func (ruo *ReplyUpdateOne) AddReactionIDs(ids ...uuid.UUID) *ReplyUpdateOne
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*ReplyUpdateOne) AddReactions ¶
func (ruo *ReplyUpdateOne) AddReactions(r ...*Reaction) *ReplyUpdateOne
AddReactions adds the "reactions" edges to the Reaction entity.
func (*ReplyUpdateOne) ClearAuthor ¶
func (ruo *ReplyUpdateOne) ClearAuthor() *ReplyUpdateOne
ClearAuthor clears the "author" edge to the User entity.
func (*ReplyUpdateOne) ClearComment ¶
func (ruo *ReplyUpdateOne) ClearComment() *ReplyUpdateOne
ClearComment clears the "comment" edge to the Comment entity.
func (*ReplyUpdateOne) ClearNotifications ¶
func (ruo *ReplyUpdateOne) ClearNotifications() *ReplyUpdateOne
ClearNotifications clears all "notifications" edges to the Notification entity.
func (*ReplyUpdateOne) ClearReactions ¶
func (ruo *ReplyUpdateOne) ClearReactions() *ReplyUpdateOne
ClearReactions clears all "reactions" edges to the Reaction entity.
func (*ReplyUpdateOne) Exec ¶
func (ruo *ReplyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ReplyUpdateOne) ExecX ¶
func (ruo *ReplyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReplyUpdateOne) Mutation ¶
func (ruo *ReplyUpdateOne) Mutation() *ReplyMutation
Mutation returns the ReplyMutation object of the builder.
func (*ReplyUpdateOne) RemoveNotificationIDs ¶
func (ruo *ReplyUpdateOne) RemoveNotificationIDs(ids ...uuid.UUID) *ReplyUpdateOne
RemoveNotificationIDs removes the "notifications" edge to Notification entities by IDs.
func (*ReplyUpdateOne) RemoveNotifications ¶
func (ruo *ReplyUpdateOne) RemoveNotifications(n ...*Notification) *ReplyUpdateOne
RemoveNotifications removes "notifications" edges to Notification entities.
func (*ReplyUpdateOne) RemoveReactionIDs ¶
func (ruo *ReplyUpdateOne) RemoveReactionIDs(ids ...uuid.UUID) *ReplyUpdateOne
RemoveReactionIDs removes the "reactions" edge to Reaction entities by IDs.
func (*ReplyUpdateOne) RemoveReactions ¶
func (ruo *ReplyUpdateOne) RemoveReactions(r ...*Reaction) *ReplyUpdateOne
RemoveReactions removes "reactions" edges to Reaction entities.
func (*ReplyUpdateOne) Save ¶
func (ruo *ReplyUpdateOne) Save(ctx context.Context) (*Reply, error)
Save executes the query and returns the updated Reply entity.
func (*ReplyUpdateOne) SaveX ¶
func (ruo *ReplyUpdateOne) SaveX(ctx context.Context) *Reply
SaveX is like Save, but panics if an error occurs.
func (*ReplyUpdateOne) Select ¶
func (ruo *ReplyUpdateOne) Select(field string, fields ...string) *ReplyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ReplyUpdateOne) SetAuthor ¶
func (ruo *ReplyUpdateOne) SetAuthor(u *User) *ReplyUpdateOne
SetAuthor sets the "author" edge to the User entity.
func (*ReplyUpdateOne) SetAuthorID ¶
func (ruo *ReplyUpdateOne) SetAuthorID(u uuid.UUID) *ReplyUpdateOne
SetAuthorID sets the "author_id" field.
func (*ReplyUpdateOne) SetComment ¶
func (ruo *ReplyUpdateOne) SetComment(c *Comment) *ReplyUpdateOne
SetComment sets the "comment" edge to the Comment entity.
func (*ReplyUpdateOne) SetCommentID ¶
func (ruo *ReplyUpdateOne) SetCommentID(u uuid.UUID) *ReplyUpdateOne
SetCommentID sets the "comment_id" field.
func (*ReplyUpdateOne) SetCreatedAt ¶
func (ruo *ReplyUpdateOne) SetCreatedAt(t time.Time) *ReplyUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ReplyUpdateOne) SetNillableAuthorID ¶
func (ruo *ReplyUpdateOne) SetNillableAuthorID(u *uuid.UUID) *ReplyUpdateOne
SetNillableAuthorID sets the "author_id" field if the given value is not nil.
func (*ReplyUpdateOne) SetNillableCommentID ¶
func (ruo *ReplyUpdateOne) SetNillableCommentID(u *uuid.UUID) *ReplyUpdateOne
SetNillableCommentID sets the "comment_id" field if the given value is not nil.
func (*ReplyUpdateOne) SetNillableCreatedAt ¶
func (ruo *ReplyUpdateOne) SetNillableCreatedAt(t *time.Time) *ReplyUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReplyUpdateOne) SetNillableSlug ¶
func (ruo *ReplyUpdateOne) SetNillableSlug(s *string) *ReplyUpdateOne
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*ReplyUpdateOne) SetNillableText ¶
func (ruo *ReplyUpdateOne) SetNillableText(s *string) *ReplyUpdateOne
SetNillableText sets the "text" field if the given value is not nil.
func (*ReplyUpdateOne) SetSlug ¶
func (ruo *ReplyUpdateOne) SetSlug(s string) *ReplyUpdateOne
SetSlug sets the "slug" field.
func (*ReplyUpdateOne) SetText ¶
func (ruo *ReplyUpdateOne) SetText(s string) *ReplyUpdateOne
SetText sets the "text" field.
func (*ReplyUpdateOne) SetUpdatedAt ¶
func (ruo *ReplyUpdateOne) SetUpdatedAt(t time.Time) *ReplyUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ReplyUpdateOne) Where ¶
func (ruo *ReplyUpdateOne) Where(ps ...predicate.Reply) *ReplyUpdateOne
Where appends a list predicates to the ReplyUpdate builder.
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 SiteDetail ¶
type SiteDetail struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Phone holds the value of the "phone" field. Phone string `json:"phone,omitempty"` // Address holds the value of the "address" field. Address string `json:"address,omitempty"` // Fb holds the value of the "fb" field. Fb string `json:"fb,omitempty"` // Tw holds the value of the "tw" field. Tw string `json:"tw,omitempty"` // Wh holds the value of the "wh" field. Wh string `json:"wh,omitempty"` // Ig holds the value of the "ig" field. Ig string `json:"ig,omitempty"` // contains filtered or unexported fields }
SiteDetail is the model entity for the SiteDetail schema.
func (*SiteDetail) String ¶
func (sd *SiteDetail) String() string
String implements the fmt.Stringer.
func (*SiteDetail) Unwrap ¶
func (sd *SiteDetail) Unwrap() *SiteDetail
Unwrap unwraps the SiteDetail 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 (*SiteDetail) Update ¶
func (sd *SiteDetail) Update() *SiteDetailUpdateOne
Update returns a builder for updating this SiteDetail. Note that you need to call SiteDetail.Unwrap() before calling this method if this SiteDetail was returned from a transaction, and the transaction was committed or rolled back.
type SiteDetailClient ¶
type SiteDetailClient struct {
// contains filtered or unexported fields
}
SiteDetailClient is a client for the SiteDetail schema.
func NewSiteDetailClient ¶
func NewSiteDetailClient(c config) *SiteDetailClient
NewSiteDetailClient returns a client for the SiteDetail from the given config.
func (*SiteDetailClient) Create ¶
func (c *SiteDetailClient) Create() *SiteDetailCreate
Create returns a builder for creating a SiteDetail entity.
func (*SiteDetailClient) CreateBulk ¶
func (c *SiteDetailClient) CreateBulk(builders ...*SiteDetailCreate) *SiteDetailCreateBulk
CreateBulk returns a builder for creating a bulk of SiteDetail entities.
func (*SiteDetailClient) Delete ¶
func (c *SiteDetailClient) Delete() *SiteDetailDelete
Delete returns a delete builder for SiteDetail.
func (*SiteDetailClient) DeleteOne ¶
func (c *SiteDetailClient) DeleteOne(sd *SiteDetail) *SiteDetailDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SiteDetailClient) DeleteOneID ¶
func (c *SiteDetailClient) DeleteOneID(id uuid.UUID) *SiteDetailDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SiteDetailClient) Get ¶
func (c *SiteDetailClient) Get(ctx context.Context, id uuid.UUID) (*SiteDetail, error)
Get returns a SiteDetail entity by its id.
func (*SiteDetailClient) GetX ¶
func (c *SiteDetailClient) GetX(ctx context.Context, id uuid.UUID) *SiteDetail
GetX is like Get, but panics if an error occurs.
func (*SiteDetailClient) Hooks ¶
func (c *SiteDetailClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SiteDetailClient) Intercept ¶
func (c *SiteDetailClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `sitedetail.Intercept(f(g(h())))`.
func (*SiteDetailClient) Interceptors ¶
func (c *SiteDetailClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SiteDetailClient) MapCreateBulk ¶
func (c *SiteDetailClient) MapCreateBulk(slice any, setFunc func(*SiteDetailCreate, int)) *SiteDetailCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SiteDetailClient) Query ¶
func (c *SiteDetailClient) Query() *SiteDetailQuery
Query returns a query builder for SiteDetail.
func (*SiteDetailClient) Update ¶
func (c *SiteDetailClient) Update() *SiteDetailUpdate
Update returns an update builder for SiteDetail.
func (*SiteDetailClient) UpdateOne ¶
func (c *SiteDetailClient) UpdateOne(sd *SiteDetail) *SiteDetailUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SiteDetailClient) UpdateOneID ¶
func (c *SiteDetailClient) UpdateOneID(id uuid.UUID) *SiteDetailUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SiteDetailClient) Use ¶
func (c *SiteDetailClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sitedetail.Hooks(f(g(h())))`.
type SiteDetailCreate ¶
type SiteDetailCreate struct {
// contains filtered or unexported fields
}
SiteDetailCreate is the builder for creating a SiteDetail entity.
func (*SiteDetailCreate) Exec ¶
func (sdc *SiteDetailCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SiteDetailCreate) ExecX ¶
func (sdc *SiteDetailCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SiteDetailCreate) Mutation ¶
func (sdc *SiteDetailCreate) Mutation() *SiteDetailMutation
Mutation returns the SiteDetailMutation object of the builder.
func (*SiteDetailCreate) Save ¶
func (sdc *SiteDetailCreate) Save(ctx context.Context) (*SiteDetail, error)
Save creates the SiteDetail in the database.
func (*SiteDetailCreate) SaveX ¶
func (sdc *SiteDetailCreate) SaveX(ctx context.Context) *SiteDetail
SaveX calls Save and panics if Save returns an error.
func (*SiteDetailCreate) SetAddress ¶
func (sdc *SiteDetailCreate) SetAddress(s string) *SiteDetailCreate
SetAddress sets the "address" field.
func (*SiteDetailCreate) SetCreatedAt ¶
func (sdc *SiteDetailCreate) SetCreatedAt(t time.Time) *SiteDetailCreate
SetCreatedAt sets the "created_at" field.
func (*SiteDetailCreate) SetEmail ¶
func (sdc *SiteDetailCreate) SetEmail(s string) *SiteDetailCreate
SetEmail sets the "email" field.
func (*SiteDetailCreate) SetFb ¶
func (sdc *SiteDetailCreate) SetFb(s string) *SiteDetailCreate
SetFb sets the "fb" field.
func (*SiteDetailCreate) SetID ¶
func (sdc *SiteDetailCreate) SetID(u uuid.UUID) *SiteDetailCreate
SetID sets the "id" field.
func (*SiteDetailCreate) SetIg ¶
func (sdc *SiteDetailCreate) SetIg(s string) *SiteDetailCreate
SetIg sets the "ig" field.
func (*SiteDetailCreate) SetName ¶
func (sdc *SiteDetailCreate) SetName(s string) *SiteDetailCreate
SetName sets the "name" field.
func (*SiteDetailCreate) SetNillableAddress ¶
func (sdc *SiteDetailCreate) SetNillableAddress(s *string) *SiteDetailCreate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*SiteDetailCreate) SetNillableCreatedAt ¶
func (sdc *SiteDetailCreate) SetNillableCreatedAt(t *time.Time) *SiteDetailCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SiteDetailCreate) SetNillableEmail ¶
func (sdc *SiteDetailCreate) SetNillableEmail(s *string) *SiteDetailCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*SiteDetailCreate) SetNillableFb ¶
func (sdc *SiteDetailCreate) SetNillableFb(s *string) *SiteDetailCreate
SetNillableFb sets the "fb" field if the given value is not nil.
func (*SiteDetailCreate) SetNillableID ¶
func (sdc *SiteDetailCreate) SetNillableID(u *uuid.UUID) *SiteDetailCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SiteDetailCreate) SetNillableIg ¶
func (sdc *SiteDetailCreate) SetNillableIg(s *string) *SiteDetailCreate
SetNillableIg sets the "ig" field if the given value is not nil.
func (*SiteDetailCreate) SetNillableName ¶
func (sdc *SiteDetailCreate) SetNillableName(s *string) *SiteDetailCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*SiteDetailCreate) SetNillablePhone ¶
func (sdc *SiteDetailCreate) SetNillablePhone(s *string) *SiteDetailCreate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*SiteDetailCreate) SetNillableTw ¶
func (sdc *SiteDetailCreate) SetNillableTw(s *string) *SiteDetailCreate
SetNillableTw sets the "tw" field if the given value is not nil.
func (*SiteDetailCreate) SetNillableUpdatedAt ¶
func (sdc *SiteDetailCreate) SetNillableUpdatedAt(t *time.Time) *SiteDetailCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SiteDetailCreate) SetNillableWh ¶
func (sdc *SiteDetailCreate) SetNillableWh(s *string) *SiteDetailCreate
SetNillableWh sets the "wh" field if the given value is not nil.
func (*SiteDetailCreate) SetPhone ¶
func (sdc *SiteDetailCreate) SetPhone(s string) *SiteDetailCreate
SetPhone sets the "phone" field.
func (*SiteDetailCreate) SetTw ¶
func (sdc *SiteDetailCreate) SetTw(s string) *SiteDetailCreate
SetTw sets the "tw" field.
func (*SiteDetailCreate) SetUpdatedAt ¶
func (sdc *SiteDetailCreate) SetUpdatedAt(t time.Time) *SiteDetailCreate
SetUpdatedAt sets the "updated_at" field.
func (*SiteDetailCreate) SetWh ¶
func (sdc *SiteDetailCreate) SetWh(s string) *SiteDetailCreate
SetWh sets the "wh" field.
type SiteDetailCreateBulk ¶
type SiteDetailCreateBulk struct {
// contains filtered or unexported fields
}
SiteDetailCreateBulk is the builder for creating many SiteDetail entities in bulk.
func (*SiteDetailCreateBulk) Exec ¶
func (sdcb *SiteDetailCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SiteDetailCreateBulk) ExecX ¶
func (sdcb *SiteDetailCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SiteDetailCreateBulk) Save ¶
func (sdcb *SiteDetailCreateBulk) Save(ctx context.Context) ([]*SiteDetail, error)
Save creates the SiteDetail entities in the database.
func (*SiteDetailCreateBulk) SaveX ¶
func (sdcb *SiteDetailCreateBulk) SaveX(ctx context.Context) []*SiteDetail
SaveX is like Save, but panics if an error occurs.
type SiteDetailDelete ¶
type SiteDetailDelete struct {
// contains filtered or unexported fields
}
SiteDetailDelete is the builder for deleting a SiteDetail entity.
func (*SiteDetailDelete) Exec ¶
func (sdd *SiteDetailDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SiteDetailDelete) ExecX ¶
func (sdd *SiteDetailDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SiteDetailDelete) Where ¶
func (sdd *SiteDetailDelete) Where(ps ...predicate.SiteDetail) *SiteDetailDelete
Where appends a list predicates to the SiteDetailDelete builder.
type SiteDetailDeleteOne ¶
type SiteDetailDeleteOne struct {
// contains filtered or unexported fields
}
SiteDetailDeleteOne is the builder for deleting a single SiteDetail entity.
func (*SiteDetailDeleteOne) Exec ¶
func (sddo *SiteDetailDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SiteDetailDeleteOne) ExecX ¶
func (sddo *SiteDetailDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SiteDetailDeleteOne) Where ¶
func (sddo *SiteDetailDeleteOne) Where(ps ...predicate.SiteDetail) *SiteDetailDeleteOne
Where appends a list predicates to the SiteDetailDelete builder.
type SiteDetailGroupBy ¶
type SiteDetailGroupBy struct {
// contains filtered or unexported fields
}
SiteDetailGroupBy is the group-by builder for SiteDetail entities.
func (*SiteDetailGroupBy) Aggregate ¶
func (sdgb *SiteDetailGroupBy) Aggregate(fns ...AggregateFunc) *SiteDetailGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SiteDetailGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SiteDetailGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SiteDetailGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SiteDetailGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SiteDetailGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SiteDetailGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SiteDetailGroupBy) Scan ¶
func (sdgb *SiteDetailGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SiteDetailGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SiteDetailMutation ¶
type SiteDetailMutation struct {
// contains filtered or unexported fields
}
SiteDetailMutation represents an operation that mutates the SiteDetail nodes in the graph.
func (*SiteDetailMutation) AddField ¶
func (m *SiteDetailMutation) 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 (*SiteDetailMutation) AddedEdges ¶
func (m *SiteDetailMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SiteDetailMutation) AddedField ¶
func (m *SiteDetailMutation) 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 (*SiteDetailMutation) AddedFields ¶
func (m *SiteDetailMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SiteDetailMutation) AddedIDs ¶
func (m *SiteDetailMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SiteDetailMutation) Address ¶
func (m *SiteDetailMutation) Address() (r string, exists bool)
Address returns the value of the "address" field in the mutation.
func (*SiteDetailMutation) ClearEdge ¶
func (m *SiteDetailMutation) 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 (*SiteDetailMutation) ClearField ¶
func (m *SiteDetailMutation) 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 (*SiteDetailMutation) ClearedEdges ¶
func (m *SiteDetailMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SiteDetailMutation) ClearedFields ¶
func (m *SiteDetailMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SiteDetailMutation) Client ¶
func (m SiteDetailMutation) 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 (*SiteDetailMutation) CreatedAt ¶
func (m *SiteDetailMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SiteDetailMutation) EdgeCleared ¶
func (m *SiteDetailMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SiteDetailMutation) Email ¶
func (m *SiteDetailMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*SiteDetailMutation) Fb ¶
func (m *SiteDetailMutation) Fb() (r string, exists bool)
Fb returns the value of the "fb" field in the mutation.
func (*SiteDetailMutation) Field ¶
func (m *SiteDetailMutation) 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 (*SiteDetailMutation) FieldCleared ¶
func (m *SiteDetailMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SiteDetailMutation) Fields ¶
func (m *SiteDetailMutation) 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 (*SiteDetailMutation) ID ¶
func (m *SiteDetailMutation) 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 (*SiteDetailMutation) 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 (*SiteDetailMutation) Ig ¶
func (m *SiteDetailMutation) Ig() (r string, exists bool)
Ig returns the value of the "ig" field in the mutation.
func (*SiteDetailMutation) Name ¶
func (m *SiteDetailMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*SiteDetailMutation) OldAddress ¶
func (m *SiteDetailMutation) OldAddress(ctx context.Context) (v string, err error)
OldAddress returns the old "address" field's value of the SiteDetail entity. If the SiteDetail 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 (*SiteDetailMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the SiteDetail entity. If the SiteDetail 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 (*SiteDetailMutation) OldEmail ¶
func (m *SiteDetailMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the SiteDetail entity. If the SiteDetail 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 (*SiteDetailMutation) OldFb ¶
func (m *SiteDetailMutation) OldFb(ctx context.Context) (v string, err error)
OldFb returns the old "fb" field's value of the SiteDetail entity. If the SiteDetail 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 (*SiteDetailMutation) 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 (*SiteDetailMutation) OldIg ¶
func (m *SiteDetailMutation) OldIg(ctx context.Context) (v string, err error)
OldIg returns the old "ig" field's value of the SiteDetail entity. If the SiteDetail 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 (*SiteDetailMutation) OldName ¶
func (m *SiteDetailMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the SiteDetail entity. If the SiteDetail 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 (*SiteDetailMutation) OldPhone ¶
func (m *SiteDetailMutation) OldPhone(ctx context.Context) (v string, err error)
OldPhone returns the old "phone" field's value of the SiteDetail entity. If the SiteDetail 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 (*SiteDetailMutation) OldTw ¶
func (m *SiteDetailMutation) OldTw(ctx context.Context) (v string, err error)
OldTw returns the old "tw" field's value of the SiteDetail entity. If the SiteDetail 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 (*SiteDetailMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the SiteDetail entity. If the SiteDetail 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 (*SiteDetailMutation) OldWh ¶
func (m *SiteDetailMutation) OldWh(ctx context.Context) (v string, err error)
OldWh returns the old "wh" field's value of the SiteDetail entity. If the SiteDetail 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 (*SiteDetailMutation) Phone ¶
func (m *SiteDetailMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*SiteDetailMutation) RemovedEdges ¶
func (m *SiteDetailMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SiteDetailMutation) RemovedIDs ¶
func (m *SiteDetailMutation) 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 (*SiteDetailMutation) ResetAddress ¶
func (m *SiteDetailMutation) ResetAddress()
ResetAddress resets all changes to the "address" field.
func (*SiteDetailMutation) ResetCreatedAt ¶
func (m *SiteDetailMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SiteDetailMutation) ResetEdge ¶
func (m *SiteDetailMutation) 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 (*SiteDetailMutation) ResetEmail ¶
func (m *SiteDetailMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*SiteDetailMutation) ResetFb ¶
func (m *SiteDetailMutation) ResetFb()
ResetFb resets all changes to the "fb" field.
func (*SiteDetailMutation) ResetField ¶
func (m *SiteDetailMutation) 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 (*SiteDetailMutation) ResetIg ¶
func (m *SiteDetailMutation) ResetIg()
ResetIg resets all changes to the "ig" field.
func (*SiteDetailMutation) ResetName ¶
func (m *SiteDetailMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SiteDetailMutation) ResetPhone ¶
func (m *SiteDetailMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*SiteDetailMutation) ResetTw ¶
func (m *SiteDetailMutation) ResetTw()
ResetTw resets all changes to the "tw" field.
func (*SiteDetailMutation) ResetUpdatedAt ¶
func (m *SiteDetailMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SiteDetailMutation) ResetWh ¶
func (m *SiteDetailMutation) ResetWh()
ResetWh resets all changes to the "wh" field.
func (*SiteDetailMutation) SetAddress ¶
func (m *SiteDetailMutation) SetAddress(s string)
SetAddress sets the "address" field.
func (*SiteDetailMutation) SetCreatedAt ¶
func (m *SiteDetailMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SiteDetailMutation) SetEmail ¶
func (m *SiteDetailMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*SiteDetailMutation) SetFb ¶
func (m *SiteDetailMutation) SetFb(s string)
SetFb sets the "fb" field.
func (*SiteDetailMutation) SetField ¶
func (m *SiteDetailMutation) 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 (*SiteDetailMutation) SetID ¶
func (m *SiteDetailMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of SiteDetail entities.
func (*SiteDetailMutation) SetIg ¶
func (m *SiteDetailMutation) SetIg(s string)
SetIg sets the "ig" field.
func (*SiteDetailMutation) SetName ¶
func (m *SiteDetailMutation) SetName(s string)
SetName sets the "name" field.
func (*SiteDetailMutation) SetOp ¶
func (m *SiteDetailMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SiteDetailMutation) SetPhone ¶
func (m *SiteDetailMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*SiteDetailMutation) SetTw ¶
func (m *SiteDetailMutation) SetTw(s string)
SetTw sets the "tw" field.
func (*SiteDetailMutation) SetUpdatedAt ¶
func (m *SiteDetailMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*SiteDetailMutation) SetWh ¶
func (m *SiteDetailMutation) SetWh(s string)
SetWh sets the "wh" field.
func (*SiteDetailMutation) Tw ¶
func (m *SiteDetailMutation) Tw() (r string, exists bool)
Tw returns the value of the "tw" field in the mutation.
func (SiteDetailMutation) Tx ¶
func (m SiteDetailMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SiteDetailMutation) Type ¶
func (m *SiteDetailMutation) Type() string
Type returns the node type of this mutation (SiteDetail).
func (*SiteDetailMutation) UpdatedAt ¶
func (m *SiteDetailMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SiteDetailMutation) Wh ¶
func (m *SiteDetailMutation) Wh() (r string, exists bool)
Wh returns the value of the "wh" field in the mutation.
func (*SiteDetailMutation) Where ¶
func (m *SiteDetailMutation) Where(ps ...predicate.SiteDetail)
Where appends a list predicates to the SiteDetailMutation builder.
func (*SiteDetailMutation) WhereP ¶
func (m *SiteDetailMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SiteDetailMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SiteDetailQuery ¶
type SiteDetailQuery struct {
// contains filtered or unexported fields
}
SiteDetailQuery is the builder for querying SiteDetail entities.
func (*SiteDetailQuery) Aggregate ¶
func (sdq *SiteDetailQuery) Aggregate(fns ...AggregateFunc) *SiteDetailSelect
Aggregate returns a SiteDetailSelect configured with the given aggregations.
func (*SiteDetailQuery) All ¶
func (sdq *SiteDetailQuery) All(ctx context.Context) ([]*SiteDetail, error)
All executes the query and returns a list of SiteDetails.
func (*SiteDetailQuery) AllX ¶
func (sdq *SiteDetailQuery) AllX(ctx context.Context) []*SiteDetail
AllX is like All, but panics if an error occurs.
func (*SiteDetailQuery) Clone ¶
func (sdq *SiteDetailQuery) Clone() *SiteDetailQuery
Clone returns a duplicate of the SiteDetailQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SiteDetailQuery) Count ¶
func (sdq *SiteDetailQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SiteDetailQuery) CountX ¶
func (sdq *SiteDetailQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SiteDetailQuery) Exist ¶
func (sdq *SiteDetailQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SiteDetailQuery) ExistX ¶
func (sdq *SiteDetailQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SiteDetailQuery) First ¶
func (sdq *SiteDetailQuery) First(ctx context.Context) (*SiteDetail, error)
First returns the first SiteDetail entity from the query. Returns a *NotFoundError when no SiteDetail was found.
func (*SiteDetailQuery) FirstID ¶
FirstID returns the first SiteDetail ID from the query. Returns a *NotFoundError when no SiteDetail ID was found.
func (*SiteDetailQuery) FirstIDX ¶
func (sdq *SiteDetailQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*SiteDetailQuery) FirstX ¶
func (sdq *SiteDetailQuery) FirstX(ctx context.Context) *SiteDetail
FirstX is like First, but panics if an error occurs.
func (*SiteDetailQuery) GroupBy ¶
func (sdq *SiteDetailQuery) GroupBy(field string, fields ...string) *SiteDetailGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.SiteDetail.Query(). GroupBy(sitedetail.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SiteDetailQuery) IDsX ¶
func (sdq *SiteDetailQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SiteDetailQuery) Limit ¶
func (sdq *SiteDetailQuery) Limit(limit int) *SiteDetailQuery
Limit the number of records to be returned by this query.
func (*SiteDetailQuery) Offset ¶
func (sdq *SiteDetailQuery) Offset(offset int) *SiteDetailQuery
Offset to start from.
func (*SiteDetailQuery) Only ¶
func (sdq *SiteDetailQuery) Only(ctx context.Context) (*SiteDetail, error)
Only returns a single SiteDetail entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SiteDetail entity is found. Returns a *NotFoundError when no SiteDetail entities are found.
func (*SiteDetailQuery) OnlyID ¶
OnlyID is like Only, but returns the only SiteDetail ID in the query. Returns a *NotSingularError when more than one SiteDetail ID is found. Returns a *NotFoundError when no entities are found.
func (*SiteDetailQuery) OnlyIDX ¶
func (sdq *SiteDetailQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SiteDetailQuery) OnlyX ¶
func (sdq *SiteDetailQuery) OnlyX(ctx context.Context) *SiteDetail
OnlyX is like Only, but panics if an error occurs.
func (*SiteDetailQuery) Order ¶
func (sdq *SiteDetailQuery) Order(o ...sitedetail.OrderOption) *SiteDetailQuery
Order specifies how the records should be ordered.
func (*SiteDetailQuery) Select ¶
func (sdq *SiteDetailQuery) Select(fields ...string) *SiteDetailSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.SiteDetail.Query(). Select(sitedetail.FieldCreatedAt). Scan(ctx, &v)
func (*SiteDetailQuery) Unique ¶
func (sdq *SiteDetailQuery) Unique(unique bool) *SiteDetailQuery
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 (*SiteDetailQuery) Where ¶
func (sdq *SiteDetailQuery) Where(ps ...predicate.SiteDetail) *SiteDetailQuery
Where adds a new predicate for the SiteDetailQuery builder.
type SiteDetailSelect ¶
type SiteDetailSelect struct { *SiteDetailQuery // contains filtered or unexported fields }
SiteDetailSelect is the builder for selecting fields of SiteDetail entities.
func (*SiteDetailSelect) Aggregate ¶
func (sds *SiteDetailSelect) Aggregate(fns ...AggregateFunc) *SiteDetailSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SiteDetailSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SiteDetailSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SiteDetailSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SiteDetailSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SiteDetailSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SiteDetailSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SiteDetailSelect) Scan ¶
func (sds *SiteDetailSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SiteDetailSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SiteDetailUpdate ¶
type SiteDetailUpdate struct {
// contains filtered or unexported fields
}
SiteDetailUpdate is the builder for updating SiteDetail entities.
func (*SiteDetailUpdate) Exec ¶
func (sdu *SiteDetailUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SiteDetailUpdate) ExecX ¶
func (sdu *SiteDetailUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SiteDetailUpdate) Mutation ¶
func (sdu *SiteDetailUpdate) Mutation() *SiteDetailMutation
Mutation returns the SiteDetailMutation object of the builder.
func (*SiteDetailUpdate) Save ¶
func (sdu *SiteDetailUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SiteDetailUpdate) SaveX ¶
func (sdu *SiteDetailUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SiteDetailUpdate) SetAddress ¶
func (sdu *SiteDetailUpdate) SetAddress(s string) *SiteDetailUpdate
SetAddress sets the "address" field.
func (*SiteDetailUpdate) SetCreatedAt ¶
func (sdu *SiteDetailUpdate) SetCreatedAt(t time.Time) *SiteDetailUpdate
SetCreatedAt sets the "created_at" field.
func (*SiteDetailUpdate) SetEmail ¶
func (sdu *SiteDetailUpdate) SetEmail(s string) *SiteDetailUpdate
SetEmail sets the "email" field.
func (*SiteDetailUpdate) SetFb ¶
func (sdu *SiteDetailUpdate) SetFb(s string) *SiteDetailUpdate
SetFb sets the "fb" field.
func (*SiteDetailUpdate) SetIg ¶
func (sdu *SiteDetailUpdate) SetIg(s string) *SiteDetailUpdate
SetIg sets the "ig" field.
func (*SiteDetailUpdate) SetName ¶
func (sdu *SiteDetailUpdate) SetName(s string) *SiteDetailUpdate
SetName sets the "name" field.
func (*SiteDetailUpdate) SetNillableAddress ¶
func (sdu *SiteDetailUpdate) SetNillableAddress(s *string) *SiteDetailUpdate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*SiteDetailUpdate) SetNillableCreatedAt ¶
func (sdu *SiteDetailUpdate) SetNillableCreatedAt(t *time.Time) *SiteDetailUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SiteDetailUpdate) SetNillableEmail ¶
func (sdu *SiteDetailUpdate) SetNillableEmail(s *string) *SiteDetailUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*SiteDetailUpdate) SetNillableFb ¶
func (sdu *SiteDetailUpdate) SetNillableFb(s *string) *SiteDetailUpdate
SetNillableFb sets the "fb" field if the given value is not nil.
func (*SiteDetailUpdate) SetNillableIg ¶
func (sdu *SiteDetailUpdate) SetNillableIg(s *string) *SiteDetailUpdate
SetNillableIg sets the "ig" field if the given value is not nil.
func (*SiteDetailUpdate) SetNillableName ¶
func (sdu *SiteDetailUpdate) SetNillableName(s *string) *SiteDetailUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*SiteDetailUpdate) SetNillablePhone ¶
func (sdu *SiteDetailUpdate) SetNillablePhone(s *string) *SiteDetailUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*SiteDetailUpdate) SetNillableTw ¶
func (sdu *SiteDetailUpdate) SetNillableTw(s *string) *SiteDetailUpdate
SetNillableTw sets the "tw" field if the given value is not nil.
func (*SiteDetailUpdate) SetNillableWh ¶
func (sdu *SiteDetailUpdate) SetNillableWh(s *string) *SiteDetailUpdate
SetNillableWh sets the "wh" field if the given value is not nil.
func (*SiteDetailUpdate) SetPhone ¶
func (sdu *SiteDetailUpdate) SetPhone(s string) *SiteDetailUpdate
SetPhone sets the "phone" field.
func (*SiteDetailUpdate) SetTw ¶
func (sdu *SiteDetailUpdate) SetTw(s string) *SiteDetailUpdate
SetTw sets the "tw" field.
func (*SiteDetailUpdate) SetUpdatedAt ¶
func (sdu *SiteDetailUpdate) SetUpdatedAt(t time.Time) *SiteDetailUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SiteDetailUpdate) SetWh ¶
func (sdu *SiteDetailUpdate) SetWh(s string) *SiteDetailUpdate
SetWh sets the "wh" field.
func (*SiteDetailUpdate) Where ¶
func (sdu *SiteDetailUpdate) Where(ps ...predicate.SiteDetail) *SiteDetailUpdate
Where appends a list predicates to the SiteDetailUpdate builder.
type SiteDetailUpdateOne ¶
type SiteDetailUpdateOne struct {
// contains filtered or unexported fields
}
SiteDetailUpdateOne is the builder for updating a single SiteDetail entity.
func (*SiteDetailUpdateOne) Exec ¶
func (sduo *SiteDetailUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SiteDetailUpdateOne) ExecX ¶
func (sduo *SiteDetailUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SiteDetailUpdateOne) Mutation ¶
func (sduo *SiteDetailUpdateOne) Mutation() *SiteDetailMutation
Mutation returns the SiteDetailMutation object of the builder.
func (*SiteDetailUpdateOne) Save ¶
func (sduo *SiteDetailUpdateOne) Save(ctx context.Context) (*SiteDetail, error)
Save executes the query and returns the updated SiteDetail entity.
func (*SiteDetailUpdateOne) SaveX ¶
func (sduo *SiteDetailUpdateOne) SaveX(ctx context.Context) *SiteDetail
SaveX is like Save, but panics if an error occurs.
func (*SiteDetailUpdateOne) Select ¶
func (sduo *SiteDetailUpdateOne) Select(field string, fields ...string) *SiteDetailUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SiteDetailUpdateOne) SetAddress ¶
func (sduo *SiteDetailUpdateOne) SetAddress(s string) *SiteDetailUpdateOne
SetAddress sets the "address" field.
func (*SiteDetailUpdateOne) SetCreatedAt ¶
func (sduo *SiteDetailUpdateOne) SetCreatedAt(t time.Time) *SiteDetailUpdateOne
SetCreatedAt sets the "created_at" field.
func (*SiteDetailUpdateOne) SetEmail ¶
func (sduo *SiteDetailUpdateOne) SetEmail(s string) *SiteDetailUpdateOne
SetEmail sets the "email" field.
func (*SiteDetailUpdateOne) SetFb ¶
func (sduo *SiteDetailUpdateOne) SetFb(s string) *SiteDetailUpdateOne
SetFb sets the "fb" field.
func (*SiteDetailUpdateOne) SetIg ¶
func (sduo *SiteDetailUpdateOne) SetIg(s string) *SiteDetailUpdateOne
SetIg sets the "ig" field.
func (*SiteDetailUpdateOne) SetName ¶
func (sduo *SiteDetailUpdateOne) SetName(s string) *SiteDetailUpdateOne
SetName sets the "name" field.
func (*SiteDetailUpdateOne) SetNillableAddress ¶
func (sduo *SiteDetailUpdateOne) SetNillableAddress(s *string) *SiteDetailUpdateOne
SetNillableAddress sets the "address" field if the given value is not nil.
func (*SiteDetailUpdateOne) SetNillableCreatedAt ¶
func (sduo *SiteDetailUpdateOne) SetNillableCreatedAt(t *time.Time) *SiteDetailUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SiteDetailUpdateOne) SetNillableEmail ¶
func (sduo *SiteDetailUpdateOne) SetNillableEmail(s *string) *SiteDetailUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*SiteDetailUpdateOne) SetNillableFb ¶
func (sduo *SiteDetailUpdateOne) SetNillableFb(s *string) *SiteDetailUpdateOne
SetNillableFb sets the "fb" field if the given value is not nil.
func (*SiteDetailUpdateOne) SetNillableIg ¶
func (sduo *SiteDetailUpdateOne) SetNillableIg(s *string) *SiteDetailUpdateOne
SetNillableIg sets the "ig" field if the given value is not nil.
func (*SiteDetailUpdateOne) SetNillableName ¶
func (sduo *SiteDetailUpdateOne) SetNillableName(s *string) *SiteDetailUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*SiteDetailUpdateOne) SetNillablePhone ¶
func (sduo *SiteDetailUpdateOne) SetNillablePhone(s *string) *SiteDetailUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*SiteDetailUpdateOne) SetNillableTw ¶
func (sduo *SiteDetailUpdateOne) SetNillableTw(s *string) *SiteDetailUpdateOne
SetNillableTw sets the "tw" field if the given value is not nil.
func (*SiteDetailUpdateOne) SetNillableWh ¶
func (sduo *SiteDetailUpdateOne) SetNillableWh(s *string) *SiteDetailUpdateOne
SetNillableWh sets the "wh" field if the given value is not nil.
func (*SiteDetailUpdateOne) SetPhone ¶
func (sduo *SiteDetailUpdateOne) SetPhone(s string) *SiteDetailUpdateOne
SetPhone sets the "phone" field.
func (*SiteDetailUpdateOne) SetTw ¶
func (sduo *SiteDetailUpdateOne) SetTw(s string) *SiteDetailUpdateOne
SetTw sets the "tw" field.
func (*SiteDetailUpdateOne) SetUpdatedAt ¶
func (sduo *SiteDetailUpdateOne) SetUpdatedAt(t time.Time) *SiteDetailUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SiteDetailUpdateOne) SetWh ¶
func (sduo *SiteDetailUpdateOne) SetWh(s string) *SiteDetailUpdateOne
SetWh sets the "wh" field.
func (*SiteDetailUpdateOne) Where ¶
func (sduo *SiteDetailUpdateOne) Where(ps ...predicate.SiteDetail) *SiteDetailUpdateOne
Where appends a list predicates to the SiteDetailUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Chat is the client for interacting with the Chat builders. Chat *ChatClient // City is the client for interacting with the City builders. City *CityClient // Comment is the client for interacting with the Comment builders. Comment *CommentClient // Country is the client for interacting with the Country builders. Country *CountryClient // File is the client for interacting with the File builders. File *FileClient // Friend is the client for interacting with the Friend builders. Friend *FriendClient // Message is the client for interacting with the Message builders. Message *MessageClient // Notification is the client for interacting with the Notification builders. Notification *NotificationClient // Otp is the client for interacting with the Otp builders. Otp *OtpClient // Post is the client for interacting with the Post builders. Post *PostClient // Reaction is the client for interacting with the Reaction builders. Reaction *ReactionClient // Region is the client for interacting with the Region builders. Region *RegionClient // Reply is the client for interacting with the Reply builders. Reply *ReplyClient // SiteDetail is the client for interacting with the SiteDetail builders. SiteDetail *SiteDetailClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // FirstName holds the value of the "first_name" field. FirstName string `json:"first_name,omitempty"` // LastName holds the value of the "last_name" field. LastName string `json:"last_name,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // TermsAgreement holds the value of the "terms_agreement" field. TermsAgreement bool `json:"terms_agreement,omitempty"` // IsEmailVerified holds the value of the "is_email_verified" field. IsEmailVerified bool `json:"is_email_verified,omitempty"` // IsStaff holds the value of the "is_staff" field. IsStaff bool `json:"is_staff,omitempty"` // IsActive holds the value of the "is_active" field. IsActive bool `json:"is_active,omitempty"` // Bio holds the value of the "bio" field. Bio *string `json:"bio,omitempty"` // Dob holds the value of the "dob" field. Dob *time.Time `json:"dob,omitempty"` // Access holds the value of the "access" field. Access *string `json:"access,omitempty"` // Refresh holds the value of the "refresh" field. Refresh *string `json:"refresh,omitempty"` // CityID holds the value of the "city_id" field. CityID *uuid.UUID `json:"city_id,omitempty"` // AvatarID holds the value of the "avatar_id" field. AvatarID *uuid.UUID `json:"avatar_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryAvatar ¶
QueryAvatar queries the "avatar" edge of the User entity.
func (*User) QueryComments ¶
func (u *User) QueryComments() *CommentQuery
QueryComments queries the "comments" edge of the User entity.
func (*User) QueryMemberChats ¶
QueryMemberChats queries the "member_chats" edge of the User entity.
func (*User) QueryMessages ¶
func (u *User) QueryMessages() *MessageQuery
QueryMessages queries the "messages" edge of the User entity.
func (*User) QueryNotifications ¶
func (u *User) QueryNotifications() *NotificationQuery
QueryNotifications queries the "notifications" edge of the User entity.
func (*User) QueryNotificationsFrom ¶
func (u *User) QueryNotificationsFrom() *NotificationQuery
QueryNotificationsFrom queries the "notifications_from" edge of the User entity.
func (*User) QueryNotificationsRead ¶
func (u *User) QueryNotificationsRead() *NotificationQuery
QueryNotificationsRead queries the "notifications_read" edge of the User entity.
func (*User) QueryOwnedChats ¶
QueryOwnedChats queries the "owned_chats" edge of the User entity.
func (*User) QueryPosts ¶
QueryPosts queries the "posts" edge of the User entity.
func (*User) QueryReactions ¶
func (u *User) QueryReactions() *ReactionQuery
QueryReactions queries the "reactions" edge of the User entity.
func (*User) QueryReplies ¶
func (u *User) QueryReplies() *ReplyQuery
QueryReplies queries the "replies" edge of the User entity.
func (*User) QueryRequesteeFriends ¶
func (u *User) QueryRequesteeFriends() *FriendQuery
QueryRequesteeFriends queries the "requestee_friends" edge of the User entity.
func (*User) QueryRequesterFriends ¶
func (u *User) QueryRequesterFriends() *FriendQuery
QueryRequesterFriends queries the "requester_friends" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryAvatar ¶
func (c *UserClient) QueryAvatar(u *User) *FileQuery
QueryAvatar queries the avatar edge of a User.
func (*UserClient) QueryCity ¶
func (c *UserClient) QueryCity(u *User) *CityQuery
QueryCity queries the city edge of a User.
func (*UserClient) QueryComments ¶
func (c *UserClient) QueryComments(u *User) *CommentQuery
QueryComments queries the comments edge of a User.
func (*UserClient) QueryMemberChats ¶
func (c *UserClient) QueryMemberChats(u *User) *ChatQuery
QueryMemberChats queries the member_chats edge of a User.
func (*UserClient) QueryMessages ¶
func (c *UserClient) QueryMessages(u *User) *MessageQuery
QueryMessages queries the messages edge of a User.
func (*UserClient) QueryNotifications ¶
func (c *UserClient) QueryNotifications(u *User) *NotificationQuery
QueryNotifications queries the notifications edge of a User.
func (*UserClient) QueryNotificationsFrom ¶
func (c *UserClient) QueryNotificationsFrom(u *User) *NotificationQuery
QueryNotificationsFrom queries the notifications_from edge of a User.
func (*UserClient) QueryNotificationsRead ¶
func (c *UserClient) QueryNotificationsRead(u *User) *NotificationQuery
QueryNotificationsRead queries the notifications_read edge of a User.
func (*UserClient) QueryOtp ¶
func (c *UserClient) QueryOtp(u *User) *OtpQuery
QueryOtp queries the otp edge of a User.
func (*UserClient) QueryOwnedChats ¶
func (c *UserClient) QueryOwnedChats(u *User) *ChatQuery
QueryOwnedChats queries the owned_chats edge of a User.
func (*UserClient) QueryPosts ¶
func (c *UserClient) QueryPosts(u *User) *PostQuery
QueryPosts queries the posts edge of a User.
func (*UserClient) QueryReactions ¶
func (c *UserClient) QueryReactions(u *User) *ReactionQuery
QueryReactions queries the reactions edge of a User.
func (*UserClient) QueryReplies ¶
func (c *UserClient) QueryReplies(u *User) *ReplyQuery
QueryReplies queries the replies edge of a User.
func (*UserClient) QueryRequesteeFriends ¶
func (c *UserClient) QueryRequesteeFriends(u *User) *FriendQuery
QueryRequesteeFriends queries the requestee_friends edge of a User.
func (*UserClient) QueryRequesterFriends ¶
func (c *UserClient) QueryRequesterFriends(u *User) *FriendQuery
QueryRequesterFriends queries the requester_friends edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddCommentIDs ¶
func (uc *UserCreate) AddCommentIDs(ids ...uuid.UUID) *UserCreate
AddCommentIDs adds the "comments" edge to the Comment entity by IDs.
func (*UserCreate) AddComments ¶
func (uc *UserCreate) AddComments(c ...*Comment) *UserCreate
AddComments adds the "comments" edges to the Comment entity.
func (*UserCreate) AddMemberChatIDs ¶
func (uc *UserCreate) AddMemberChatIDs(ids ...uuid.UUID) *UserCreate
AddMemberChatIDs adds the "member_chats" edge to the Chat entity by IDs.
func (*UserCreate) AddMemberChats ¶
func (uc *UserCreate) AddMemberChats(c ...*Chat) *UserCreate
AddMemberChats adds the "member_chats" edges to the Chat entity.
func (*UserCreate) AddMessageIDs ¶
func (uc *UserCreate) AddMessageIDs(ids ...uuid.UUID) *UserCreate
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*UserCreate) AddMessages ¶
func (uc *UserCreate) AddMessages(m ...*Message) *UserCreate
AddMessages adds the "messages" edges to the Message entity.
func (*UserCreate) AddNotificationIDs ¶
func (uc *UserCreate) AddNotificationIDs(ids ...uuid.UUID) *UserCreate
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*UserCreate) AddNotifications ¶
func (uc *UserCreate) AddNotifications(n ...*Notification) *UserCreate
AddNotifications adds the "notifications" edges to the Notification entity.
func (*UserCreate) AddNotificationsFrom ¶
func (uc *UserCreate) AddNotificationsFrom(n ...*Notification) *UserCreate
AddNotificationsFrom adds the "notifications_from" edges to the Notification entity.
func (*UserCreate) AddNotificationsFromIDs ¶
func (uc *UserCreate) AddNotificationsFromIDs(ids ...uuid.UUID) *UserCreate
AddNotificationsFromIDs adds the "notifications_from" edge to the Notification entity by IDs.
func (*UserCreate) AddNotificationsRead ¶
func (uc *UserCreate) AddNotificationsRead(n ...*Notification) *UserCreate
AddNotificationsRead adds the "notifications_read" edges to the Notification entity.
func (*UserCreate) AddNotificationsReadIDs ¶
func (uc *UserCreate) AddNotificationsReadIDs(ids ...uuid.UUID) *UserCreate
AddNotificationsReadIDs adds the "notifications_read" edge to the Notification entity by IDs.
func (*UserCreate) AddOwnedChatIDs ¶
func (uc *UserCreate) AddOwnedChatIDs(ids ...uuid.UUID) *UserCreate
AddOwnedChatIDs adds the "owned_chats" edge to the Chat entity by IDs.
func (*UserCreate) AddOwnedChats ¶
func (uc *UserCreate) AddOwnedChats(c ...*Chat) *UserCreate
AddOwnedChats adds the "owned_chats" edges to the Chat entity.
func (*UserCreate) AddPostIDs ¶
func (uc *UserCreate) AddPostIDs(ids ...uuid.UUID) *UserCreate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*UserCreate) AddPosts ¶
func (uc *UserCreate) AddPosts(p ...*Post) *UserCreate
AddPosts adds the "posts" edges to the Post entity.
func (*UserCreate) AddReactionIDs ¶
func (uc *UserCreate) AddReactionIDs(ids ...uuid.UUID) *UserCreate
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*UserCreate) AddReactions ¶
func (uc *UserCreate) AddReactions(r ...*Reaction) *UserCreate
AddReactions adds the "reactions" edges to the Reaction entity.
func (*UserCreate) AddReplies ¶
func (uc *UserCreate) AddReplies(r ...*Reply) *UserCreate
AddReplies adds the "replies" edges to the Reply entity.
func (*UserCreate) AddReplyIDs ¶
func (uc *UserCreate) AddReplyIDs(ids ...uuid.UUID) *UserCreate
AddReplyIDs adds the "replies" edge to the Reply entity by IDs.
func (*UserCreate) AddRequesteeFriendIDs ¶
func (uc *UserCreate) AddRequesteeFriendIDs(ids ...uuid.UUID) *UserCreate
AddRequesteeFriendIDs adds the "requestee_friends" edge to the Friend entity by IDs.
func (*UserCreate) AddRequesteeFriends ¶
func (uc *UserCreate) AddRequesteeFriends(f ...*Friend) *UserCreate
AddRequesteeFriends adds the "requestee_friends" edges to the Friend entity.
func (*UserCreate) AddRequesterFriendIDs ¶
func (uc *UserCreate) AddRequesterFriendIDs(ids ...uuid.UUID) *UserCreate
AddRequesterFriendIDs adds the "requester_friends" edge to the Friend entity by IDs.
func (*UserCreate) AddRequesterFriends ¶
func (uc *UserCreate) AddRequesterFriends(f ...*Friend) *UserCreate
AddRequesterFriends adds the "requester_friends" edges to the Friend entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAccess ¶
func (uc *UserCreate) SetAccess(s string) *UserCreate
SetAccess sets the "access" field.
func (*UserCreate) SetAvatar ¶
func (uc *UserCreate) SetAvatar(f *File) *UserCreate
SetAvatar sets the "avatar" edge to the File entity.
func (*UserCreate) SetAvatarID ¶
func (uc *UserCreate) SetAvatarID(u uuid.UUID) *UserCreate
SetAvatarID sets the "avatar_id" field.
func (*UserCreate) SetBio ¶
func (uc *UserCreate) SetBio(s string) *UserCreate
SetBio sets the "bio" field.
func (*UserCreate) SetCity ¶
func (uc *UserCreate) SetCity(c *City) *UserCreate
SetCity sets the "city" edge to the City entity.
func (*UserCreate) SetCityID ¶
func (uc *UserCreate) SetCityID(u uuid.UUID) *UserCreate
SetCityID sets the "city_id" field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetDob ¶
func (uc *UserCreate) SetDob(t time.Time) *UserCreate
SetDob sets the "dob" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetFirstName ¶
func (uc *UserCreate) SetFirstName(s string) *UserCreate
SetFirstName sets the "first_name" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIsActive ¶
func (uc *UserCreate) SetIsActive(b bool) *UserCreate
SetIsActive sets the "is_active" field.
func (*UserCreate) SetIsEmailVerified ¶
func (uc *UserCreate) SetIsEmailVerified(b bool) *UserCreate
SetIsEmailVerified sets the "is_email_verified" field.
func (*UserCreate) SetIsStaff ¶
func (uc *UserCreate) SetIsStaff(b bool) *UserCreate
SetIsStaff sets the "is_staff" field.
func (*UserCreate) SetLastName ¶
func (uc *UserCreate) SetLastName(s string) *UserCreate
SetLastName sets the "last_name" field.
func (*UserCreate) SetNillableAccess ¶
func (uc *UserCreate) SetNillableAccess(s *string) *UserCreate
SetNillableAccess sets the "access" field if the given value is not nil.
func (*UserCreate) SetNillableAvatarID ¶
func (uc *UserCreate) SetNillableAvatarID(u *uuid.UUID) *UserCreate
SetNillableAvatarID sets the "avatar_id" field if the given value is not nil.
func (*UserCreate) SetNillableBio ¶
func (uc *UserCreate) SetNillableBio(s *string) *UserCreate
SetNillableBio sets the "bio" field if the given value is not nil.
func (*UserCreate) SetNillableCityID ¶
func (uc *UserCreate) SetNillableCityID(u *uuid.UUID) *UserCreate
SetNillableCityID sets the "city_id" field if the given value is not nil.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableDob ¶
func (uc *UserCreate) SetNillableDob(t *time.Time) *UserCreate
SetNillableDob sets the "dob" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableIsActive ¶
func (uc *UserCreate) SetNillableIsActive(b *bool) *UserCreate
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*UserCreate) SetNillableIsEmailVerified ¶
func (uc *UserCreate) SetNillableIsEmailVerified(b *bool) *UserCreate
SetNillableIsEmailVerified sets the "is_email_verified" field if the given value is not nil.
func (*UserCreate) SetNillableIsStaff ¶
func (uc *UserCreate) SetNillableIsStaff(b *bool) *UserCreate
SetNillableIsStaff sets the "is_staff" field if the given value is not nil.
func (*UserCreate) SetNillableOtpID ¶
func (uc *UserCreate) SetNillableOtpID(id *uuid.UUID) *UserCreate
SetNillableOtpID sets the "otp" edge to the Otp entity by ID if the given value is not nil.
func (*UserCreate) SetNillableRefresh ¶
func (uc *UserCreate) SetNillableRefresh(s *string) *UserCreate
SetNillableRefresh sets the "refresh" field if the given value is not nil.
func (*UserCreate) SetNillableTermsAgreement ¶
func (uc *UserCreate) SetNillableTermsAgreement(b *bool) *UserCreate
SetNillableTermsAgreement sets the "terms_agreement" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetOtp ¶
func (uc *UserCreate) SetOtp(o *Otp) *UserCreate
SetOtp sets the "otp" edge to the Otp entity.
func (*UserCreate) SetOtpID ¶
func (uc *UserCreate) SetOtpID(id uuid.UUID) *UserCreate
SetOtpID sets the "otp" edge to the Otp entity by ID.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetRefresh ¶
func (uc *UserCreate) SetRefresh(s string) *UserCreate
SetRefresh sets the "refresh" field.
func (*UserCreate) SetTermsAgreement ¶
func (uc *UserCreate) SetTermsAgreement(b bool) *UserCreate
SetTermsAgreement sets the "terms_agreement" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // City holds the value of the city edge. City *City `json:"city,omitempty"` // Avatar holds the value of the avatar edge. Avatar *File `json:"avatar,omitempty"` // Otp holds the value of the otp edge. Otp *Otp `json:"otp,omitempty"` // Posts holds the value of the posts edge. Posts []*Post `json:"posts,omitempty"` // Reactions holds the value of the reactions edge. Reactions []*Reaction `json:"reactions,omitempty"` // Comments holds the value of the comments edge. Comments []*Comment `json:"comments,omitempty"` // Replies holds the value of the replies edge. Replies []*Reply `json:"replies,omitempty"` // RequesterFriends holds the value of the requester_friends edge. RequesterFriends []*Friend `json:"requester_friends,omitempty"` // RequesteeFriends holds the value of the requestee_friends edge. RequesteeFriends []*Friend `json:"requestee_friends,omitempty"` // NotificationsFrom holds the value of the notifications_from edge. NotificationsFrom []*Notification `json:"notifications_from,omitempty"` // Notifications holds the value of the notifications edge. Notifications []*Notification `json:"notifications,omitempty"` // NotificationsRead holds the value of the notifications_read edge. NotificationsRead []*Notification `json:"notifications_read,omitempty"` // OwnedChats holds the value of the owned_chats edge. OwnedChats []*Chat `json:"owned_chats,omitempty"` // MemberChats holds the value of the member_chats edge. MemberChats []*Chat `json:"member_chats,omitempty"` // Messages holds the value of the messages edge. Messages []*Message `json:"messages,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) AvatarOrErr ¶
AvatarOrErr returns the Avatar value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) CityOrErr ¶
CityOrErr returns the City value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) CommentsOrErr ¶
CommentsOrErr returns the Comments value or an error if the edge was not loaded in eager-loading.
func (UserEdges) MemberChatsOrErr ¶
MemberChatsOrErr returns the MemberChats value or an error if the edge was not loaded in eager-loading.
func (UserEdges) MessagesOrErr ¶
MessagesOrErr returns the Messages value or an error if the edge was not loaded in eager-loading.
func (UserEdges) NotificationsFromOrErr ¶
func (e UserEdges) NotificationsFromOrErr() ([]*Notification, error)
NotificationsFromOrErr returns the NotificationsFrom value or an error if the edge was not loaded in eager-loading.
func (UserEdges) NotificationsOrErr ¶
func (e UserEdges) NotificationsOrErr() ([]*Notification, error)
NotificationsOrErr returns the Notifications value or an error if the edge was not loaded in eager-loading.
func (UserEdges) NotificationsReadOrErr ¶
func (e UserEdges) NotificationsReadOrErr() ([]*Notification, error)
NotificationsReadOrErr returns the NotificationsRead value or an error if the edge was not loaded in eager-loading.
func (UserEdges) OtpOrErr ¶
OtpOrErr returns the Otp value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) OwnedChatsOrErr ¶
OwnedChatsOrErr returns the OwnedChats value or an error if the edge was not loaded in eager-loading.
func (UserEdges) PostsOrErr ¶
PostsOrErr returns the Posts value or an error if the edge was not loaded in eager-loading.
func (UserEdges) ReactionsOrErr ¶
ReactionsOrErr returns the Reactions value or an error if the edge was not loaded in eager-loading.
func (UserEdges) RepliesOrErr ¶
RepliesOrErr returns the Replies value or an error if the edge was not loaded in eager-loading.
func (UserEdges) RequesteeFriendsOrErr ¶
RequesteeFriendsOrErr returns the RequesteeFriends value or an error if the edge was not loaded in eager-loading.
func (UserEdges) RequesterFriendsOrErr ¶
RequesterFriendsOrErr returns the RequesterFriends value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) Access ¶
func (m *UserMutation) Access() (r string, exists bool)
Access returns the value of the "access" field in the mutation.
func (*UserMutation) AccessCleared ¶
func (m *UserMutation) AccessCleared() bool
AccessCleared returns if the "access" field was cleared in this mutation.
func (*UserMutation) AddCommentIDs ¶
func (m *UserMutation) AddCommentIDs(ids ...uuid.UUID)
AddCommentIDs adds the "comments" edge to the Comment entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddMemberChatIDs ¶
func (m *UserMutation) AddMemberChatIDs(ids ...uuid.UUID)
AddMemberChatIDs adds the "member_chats" edge to the Chat entity by ids.
func (*UserMutation) AddMessageIDs ¶
func (m *UserMutation) AddMessageIDs(ids ...uuid.UUID)
AddMessageIDs adds the "messages" edge to the Message entity by ids.
func (*UserMutation) AddNotificationIDs ¶
func (m *UserMutation) AddNotificationIDs(ids ...uuid.UUID)
AddNotificationIDs adds the "notifications" edge to the Notification entity by ids.
func (*UserMutation) AddNotificationsFromIDs ¶
func (m *UserMutation) AddNotificationsFromIDs(ids ...uuid.UUID)
AddNotificationsFromIDs adds the "notifications_from" edge to the Notification entity by ids.
func (*UserMutation) AddNotificationsReadIDs ¶
func (m *UserMutation) AddNotificationsReadIDs(ids ...uuid.UUID)
AddNotificationsReadIDs adds the "notifications_read" edge to the Notification entity by ids.
func (*UserMutation) AddOwnedChatIDs ¶
func (m *UserMutation) AddOwnedChatIDs(ids ...uuid.UUID)
AddOwnedChatIDs adds the "owned_chats" edge to the Chat entity by ids.
func (*UserMutation) AddPostIDs ¶
func (m *UserMutation) AddPostIDs(ids ...uuid.UUID)
AddPostIDs adds the "posts" edge to the Post entity by ids.
func (*UserMutation) AddReactionIDs ¶
func (m *UserMutation) AddReactionIDs(ids ...uuid.UUID)
AddReactionIDs adds the "reactions" edge to the Reaction entity by ids.
func (*UserMutation) AddReplyIDs ¶
func (m *UserMutation) AddReplyIDs(ids ...uuid.UUID)
AddReplyIDs adds the "replies" edge to the Reply entity by ids.
func (*UserMutation) AddRequesteeFriendIDs ¶
func (m *UserMutation) AddRequesteeFriendIDs(ids ...uuid.UUID)
AddRequesteeFriendIDs adds the "requestee_friends" edge to the Friend entity by ids.
func (*UserMutation) AddRequesterFriendIDs ¶
func (m *UserMutation) AddRequesterFriendIDs(ids ...uuid.UUID)
AddRequesterFriendIDs adds the "requester_friends" edge to the Friend entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AvatarCleared ¶
func (m *UserMutation) AvatarCleared() bool
AvatarCleared reports if the "avatar" edge to the File entity was cleared.
func (*UserMutation) AvatarID ¶
func (m *UserMutation) AvatarID() (r uuid.UUID, exists bool)
AvatarID returns the value of the "avatar_id" field in the mutation.
func (*UserMutation) AvatarIDCleared ¶
func (m *UserMutation) AvatarIDCleared() bool
AvatarIDCleared returns if the "avatar_id" field was cleared in this mutation.
func (*UserMutation) AvatarIDs ¶
func (m *UserMutation) AvatarIDs() (ids []uuid.UUID)
AvatarIDs returns the "avatar" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AvatarID instead. It exists only for internal usage by the builders.
func (*UserMutation) Bio ¶
func (m *UserMutation) Bio() (r string, exists bool)
Bio returns the value of the "bio" field in the mutation.
func (*UserMutation) BioCleared ¶
func (m *UserMutation) BioCleared() bool
BioCleared returns if the "bio" field was cleared in this mutation.
func (*UserMutation) CityCleared ¶
func (m *UserMutation) CityCleared() bool
CityCleared reports if the "city" edge to the City entity was cleared.
func (*UserMutation) CityID ¶
func (m *UserMutation) CityID() (r uuid.UUID, exists bool)
CityID returns the value of the "city_id" field in the mutation.
func (*UserMutation) CityIDCleared ¶
func (m *UserMutation) CityIDCleared() bool
CityIDCleared returns if the "city_id" field was cleared in this mutation.
func (*UserMutation) CityIDs ¶
func (m *UserMutation) CityIDs() (ids []uuid.UUID)
CityIDs returns the "city" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CityID instead. It exists only for internal usage by the builders.
func (*UserMutation) ClearAccess ¶
func (m *UserMutation) ClearAccess()
ClearAccess clears the value of the "access" field.
func (*UserMutation) ClearAvatar ¶
func (m *UserMutation) ClearAvatar()
ClearAvatar clears the "avatar" edge to the File entity.
func (*UserMutation) ClearAvatarID ¶
func (m *UserMutation) ClearAvatarID()
ClearAvatarID clears the value of the "avatar_id" field.
func (*UserMutation) ClearBio ¶
func (m *UserMutation) ClearBio()
ClearBio clears the value of the "bio" field.
func (*UserMutation) ClearCity ¶
func (m *UserMutation) ClearCity()
ClearCity clears the "city" edge to the City entity.
func (*UserMutation) ClearCityID ¶
func (m *UserMutation) ClearCityID()
ClearCityID clears the value of the "city_id" field.
func (*UserMutation) ClearComments ¶
func (m *UserMutation) ClearComments()
ClearComments clears the "comments" edge to the Comment entity.
func (*UserMutation) ClearDob ¶
func (m *UserMutation) ClearDob()
ClearDob clears the value of the "dob" field.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearMemberChats ¶
func (m *UserMutation) ClearMemberChats()
ClearMemberChats clears the "member_chats" edge to the Chat entity.
func (*UserMutation) ClearMessages ¶
func (m *UserMutation) ClearMessages()
ClearMessages clears the "messages" edge to the Message entity.
func (*UserMutation) ClearNotifications ¶
func (m *UserMutation) ClearNotifications()
ClearNotifications clears the "notifications" edge to the Notification entity.
func (*UserMutation) ClearNotificationsFrom ¶
func (m *UserMutation) ClearNotificationsFrom()
ClearNotificationsFrom clears the "notifications_from" edge to the Notification entity.
func (*UserMutation) ClearNotificationsRead ¶
func (m *UserMutation) ClearNotificationsRead()
ClearNotificationsRead clears the "notifications_read" edge to the Notification entity.
func (*UserMutation) ClearOtp ¶
func (m *UserMutation) ClearOtp()
ClearOtp clears the "otp" edge to the Otp entity.
func (*UserMutation) ClearOwnedChats ¶
func (m *UserMutation) ClearOwnedChats()
ClearOwnedChats clears the "owned_chats" edge to the Chat entity.
func (*UserMutation) ClearPosts ¶
func (m *UserMutation) ClearPosts()
ClearPosts clears the "posts" edge to the Post entity.
func (*UserMutation) ClearReactions ¶
func (m *UserMutation) ClearReactions()
ClearReactions clears the "reactions" edge to the Reaction entity.
func (*UserMutation) ClearRefresh ¶
func (m *UserMutation) ClearRefresh()
ClearRefresh clears the value of the "refresh" field.
func (*UserMutation) ClearReplies ¶
func (m *UserMutation) ClearReplies()
ClearReplies clears the "replies" edge to the Reply entity.
func (*UserMutation) ClearRequesteeFriends ¶
func (m *UserMutation) ClearRequesteeFriends()
ClearRequesteeFriends clears the "requestee_friends" edge to the Friend entity.
func (*UserMutation) ClearRequesterFriends ¶
func (m *UserMutation) ClearRequesterFriends()
ClearRequesterFriends clears the "requester_friends" edge to the Friend entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CommentsCleared ¶
func (m *UserMutation) CommentsCleared() bool
CommentsCleared reports if the "comments" edge to the Comment entity was cleared.
func (*UserMutation) CommentsIDs ¶
func (m *UserMutation) CommentsIDs() (ids []uuid.UUID)
CommentsIDs returns the "comments" edge IDs in the mutation.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) Dob ¶
func (m *UserMutation) Dob() (r time.Time, exists bool)
Dob returns the value of the "dob" field in the mutation.
func (*UserMutation) DobCleared ¶
func (m *UserMutation) DobCleared() bool
DobCleared returns if the "dob" field was cleared in this mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) FirstName ¶
func (m *UserMutation) FirstName() (r string, exists bool)
FirstName returns the value of the "first_name" field in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) IsActive ¶
func (m *UserMutation) IsActive() (r bool, exists bool)
IsActive returns the value of the "is_active" field in the mutation.
func (*UserMutation) IsEmailVerified ¶
func (m *UserMutation) IsEmailVerified() (r bool, exists bool)
IsEmailVerified returns the value of the "is_email_verified" field in the mutation.
func (*UserMutation) IsStaff ¶
func (m *UserMutation) IsStaff() (r bool, exists bool)
IsStaff returns the value of the "is_staff" field in the mutation.
func (*UserMutation) LastName ¶
func (m *UserMutation) LastName() (r string, exists bool)
LastName returns the value of the "last_name" field in the mutation.
func (*UserMutation) MemberChatsCleared ¶
func (m *UserMutation) MemberChatsCleared() bool
MemberChatsCleared reports if the "member_chats" edge to the Chat entity was cleared.
func (*UserMutation) MemberChatsIDs ¶
func (m *UserMutation) MemberChatsIDs() (ids []uuid.UUID)
MemberChatsIDs returns the "member_chats" edge IDs in the mutation.
func (*UserMutation) MessagesCleared ¶
func (m *UserMutation) MessagesCleared() bool
MessagesCleared reports if the "messages" edge to the Message entity was cleared.
func (*UserMutation) MessagesIDs ¶
func (m *UserMutation) MessagesIDs() (ids []uuid.UUID)
MessagesIDs returns the "messages" edge IDs in the mutation.
func (*UserMutation) NotificationsCleared ¶
func (m *UserMutation) NotificationsCleared() bool
NotificationsCleared reports if the "notifications" edge to the Notification entity was cleared.
func (*UserMutation) NotificationsFromCleared ¶
func (m *UserMutation) NotificationsFromCleared() bool
NotificationsFromCleared reports if the "notifications_from" edge to the Notification entity was cleared.
func (*UserMutation) NotificationsFromIDs ¶
func (m *UserMutation) NotificationsFromIDs() (ids []uuid.UUID)
NotificationsFromIDs returns the "notifications_from" edge IDs in the mutation.
func (*UserMutation) NotificationsIDs ¶
func (m *UserMutation) NotificationsIDs() (ids []uuid.UUID)
NotificationsIDs returns the "notifications" edge IDs in the mutation.
func (*UserMutation) NotificationsReadCleared ¶
func (m *UserMutation) NotificationsReadCleared() bool
NotificationsReadCleared reports if the "notifications_read" edge to the Notification entity was cleared.
func (*UserMutation) NotificationsReadIDs ¶
func (m *UserMutation) NotificationsReadIDs() (ids []uuid.UUID)
NotificationsReadIDs returns the "notifications_read" edge IDs in the mutation.
func (*UserMutation) OldAccess ¶
func (m *UserMutation) OldAccess(ctx context.Context) (v *string, err error)
OldAccess returns the old "access" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldAvatarID ¶
OldAvatarID returns the old "avatar_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldBio ¶
func (m *UserMutation) OldBio(ctx context.Context) (v *string, err error)
OldBio returns the old "bio" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCityID ¶
OldCityID returns the old "city_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldDob ¶
OldDob returns the old "dob" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldFirstName ¶
func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)
OldFirstName returns the old "first_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldIsActive ¶
func (m *UserMutation) OldIsActive(ctx context.Context) (v bool, err error)
OldIsActive returns the old "is_active" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldIsEmailVerified ¶
func (m *UserMutation) OldIsEmailVerified(ctx context.Context) (v bool, err error)
OldIsEmailVerified returns the old "is_email_verified" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldIsStaff ¶
func (m *UserMutation) OldIsStaff(ctx context.Context) (v bool, err error)
OldIsStaff returns the old "is_staff" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldLastName ¶
func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)
OldLastName returns the old "last_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldRefresh ¶
func (m *UserMutation) OldRefresh(ctx context.Context) (v *string, err error)
OldRefresh returns the old "refresh" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldTermsAgreement ¶
func (m *UserMutation) OldTermsAgreement(ctx context.Context) (v bool, err error)
OldTermsAgreement returns the old "terms_agreement" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OtpCleared ¶
func (m *UserMutation) OtpCleared() bool
OtpCleared reports if the "otp" edge to the Otp entity was cleared.
func (*UserMutation) OtpID ¶
func (m *UserMutation) OtpID() (id uuid.UUID, exists bool)
OtpID returns the "otp" edge ID in the mutation.
func (*UserMutation) OtpIDs ¶
func (m *UserMutation) OtpIDs() (ids []uuid.UUID)
OtpIDs returns the "otp" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OtpID instead. It exists only for internal usage by the builders.
func (*UserMutation) OwnedChatsCleared ¶
func (m *UserMutation) OwnedChatsCleared() bool
OwnedChatsCleared reports if the "owned_chats" edge to the Chat entity was cleared.
func (*UserMutation) OwnedChatsIDs ¶
func (m *UserMutation) OwnedChatsIDs() (ids []uuid.UUID)
OwnedChatsIDs returns the "owned_chats" edge IDs in the mutation.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) PostsCleared ¶
func (m *UserMutation) PostsCleared() bool
PostsCleared reports if the "posts" edge to the Post entity was cleared.
func (*UserMutation) PostsIDs ¶
func (m *UserMutation) PostsIDs() (ids []uuid.UUID)
PostsIDs returns the "posts" edge IDs in the mutation.
func (*UserMutation) ReactionsCleared ¶
func (m *UserMutation) ReactionsCleared() bool
ReactionsCleared reports if the "reactions" edge to the Reaction entity was cleared.
func (*UserMutation) ReactionsIDs ¶
func (m *UserMutation) ReactionsIDs() (ids []uuid.UUID)
ReactionsIDs returns the "reactions" edge IDs in the mutation.
func (*UserMutation) Refresh ¶
func (m *UserMutation) Refresh() (r string, exists bool)
Refresh returns the value of the "refresh" field in the mutation.
func (*UserMutation) RefreshCleared ¶
func (m *UserMutation) RefreshCleared() bool
RefreshCleared returns if the "refresh" field was cleared in this mutation.
func (*UserMutation) RemoveCommentIDs ¶
func (m *UserMutation) RemoveCommentIDs(ids ...uuid.UUID)
RemoveCommentIDs removes the "comments" edge to the Comment entity by IDs.
func (*UserMutation) RemoveMemberChatIDs ¶
func (m *UserMutation) RemoveMemberChatIDs(ids ...uuid.UUID)
RemoveMemberChatIDs removes the "member_chats" edge to the Chat entity by IDs.
func (*UserMutation) RemoveMessageIDs ¶
func (m *UserMutation) RemoveMessageIDs(ids ...uuid.UUID)
RemoveMessageIDs removes the "messages" edge to the Message entity by IDs.
func (*UserMutation) RemoveNotificationIDs ¶
func (m *UserMutation) RemoveNotificationIDs(ids ...uuid.UUID)
RemoveNotificationIDs removes the "notifications" edge to the Notification entity by IDs.
func (*UserMutation) RemoveNotificationsFromIDs ¶
func (m *UserMutation) RemoveNotificationsFromIDs(ids ...uuid.UUID)
RemoveNotificationsFromIDs removes the "notifications_from" edge to the Notification entity by IDs.
func (*UserMutation) RemoveNotificationsReadIDs ¶
func (m *UserMutation) RemoveNotificationsReadIDs(ids ...uuid.UUID)
RemoveNotificationsReadIDs removes the "notifications_read" edge to the Notification entity by IDs.
func (*UserMutation) RemoveOwnedChatIDs ¶
func (m *UserMutation) RemoveOwnedChatIDs(ids ...uuid.UUID)
RemoveOwnedChatIDs removes the "owned_chats" edge to the Chat entity by IDs.
func (*UserMutation) RemovePostIDs ¶
func (m *UserMutation) RemovePostIDs(ids ...uuid.UUID)
RemovePostIDs removes the "posts" edge to the Post entity by IDs.
func (*UserMutation) RemoveReactionIDs ¶
func (m *UserMutation) RemoveReactionIDs(ids ...uuid.UUID)
RemoveReactionIDs removes the "reactions" edge to the Reaction entity by IDs.
func (*UserMutation) RemoveReplyIDs ¶
func (m *UserMutation) RemoveReplyIDs(ids ...uuid.UUID)
RemoveReplyIDs removes the "replies" edge to the Reply entity by IDs.
func (*UserMutation) RemoveRequesteeFriendIDs ¶
func (m *UserMutation) RemoveRequesteeFriendIDs(ids ...uuid.UUID)
RemoveRequesteeFriendIDs removes the "requestee_friends" edge to the Friend entity by IDs.
func (*UserMutation) RemoveRequesterFriendIDs ¶
func (m *UserMutation) RemoveRequesterFriendIDs(ids ...uuid.UUID)
RemoveRequesterFriendIDs removes the "requester_friends" edge to the Friend entity by IDs.
func (*UserMutation) RemovedCommentsIDs ¶
func (m *UserMutation) RemovedCommentsIDs() (ids []uuid.UUID)
RemovedComments returns the removed IDs of the "comments" edge to the Comment entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedMemberChatsIDs ¶
func (m *UserMutation) RemovedMemberChatsIDs() (ids []uuid.UUID)
RemovedMemberChats returns the removed IDs of the "member_chats" edge to the Chat entity.
func (*UserMutation) RemovedMessagesIDs ¶
func (m *UserMutation) RemovedMessagesIDs() (ids []uuid.UUID)
RemovedMessages returns the removed IDs of the "messages" edge to the Message entity.
func (*UserMutation) RemovedNotificationsFromIDs ¶
func (m *UserMutation) RemovedNotificationsFromIDs() (ids []uuid.UUID)
RemovedNotificationsFrom returns the removed IDs of the "notifications_from" edge to the Notification entity.
func (*UserMutation) RemovedNotificationsIDs ¶
func (m *UserMutation) RemovedNotificationsIDs() (ids []uuid.UUID)
RemovedNotifications returns the removed IDs of the "notifications" edge to the Notification entity.
func (*UserMutation) RemovedNotificationsReadIDs ¶
func (m *UserMutation) RemovedNotificationsReadIDs() (ids []uuid.UUID)
RemovedNotificationsRead returns the removed IDs of the "notifications_read" edge to the Notification entity.
func (*UserMutation) RemovedOwnedChatsIDs ¶
func (m *UserMutation) RemovedOwnedChatsIDs() (ids []uuid.UUID)
RemovedOwnedChats returns the removed IDs of the "owned_chats" edge to the Chat entity.
func (*UserMutation) RemovedPostsIDs ¶
func (m *UserMutation) RemovedPostsIDs() (ids []uuid.UUID)
RemovedPosts returns the removed IDs of the "posts" edge to the Post entity.
func (*UserMutation) RemovedReactionsIDs ¶
func (m *UserMutation) RemovedReactionsIDs() (ids []uuid.UUID)
RemovedReactions returns the removed IDs of the "reactions" edge to the Reaction entity.
func (*UserMutation) RemovedRepliesIDs ¶
func (m *UserMutation) RemovedRepliesIDs() (ids []uuid.UUID)
RemovedReplies returns the removed IDs of the "replies" edge to the Reply entity.
func (*UserMutation) RemovedRequesteeFriendsIDs ¶
func (m *UserMutation) RemovedRequesteeFriendsIDs() (ids []uuid.UUID)
RemovedRequesteeFriends returns the removed IDs of the "requestee_friends" edge to the Friend entity.
func (*UserMutation) RemovedRequesterFriendsIDs ¶
func (m *UserMutation) RemovedRequesterFriendsIDs() (ids []uuid.UUID)
RemovedRequesterFriends returns the removed IDs of the "requester_friends" edge to the Friend entity.
func (*UserMutation) RepliesCleared ¶
func (m *UserMutation) RepliesCleared() bool
RepliesCleared reports if the "replies" edge to the Reply entity was cleared.
func (*UserMutation) RepliesIDs ¶
func (m *UserMutation) RepliesIDs() (ids []uuid.UUID)
RepliesIDs returns the "replies" edge IDs in the mutation.
func (*UserMutation) RequesteeFriendsCleared ¶
func (m *UserMutation) RequesteeFriendsCleared() bool
RequesteeFriendsCleared reports if the "requestee_friends" edge to the Friend entity was cleared.
func (*UserMutation) RequesteeFriendsIDs ¶
func (m *UserMutation) RequesteeFriendsIDs() (ids []uuid.UUID)
RequesteeFriendsIDs returns the "requestee_friends" edge IDs in the mutation.
func (*UserMutation) RequesterFriendsCleared ¶
func (m *UserMutation) RequesterFriendsCleared() bool
RequesterFriendsCleared reports if the "requester_friends" edge to the Friend entity was cleared.
func (*UserMutation) RequesterFriendsIDs ¶
func (m *UserMutation) RequesterFriendsIDs() (ids []uuid.UUID)
RequesterFriendsIDs returns the "requester_friends" edge IDs in the mutation.
func (*UserMutation) ResetAccess ¶
func (m *UserMutation) ResetAccess()
ResetAccess resets all changes to the "access" field.
func (*UserMutation) ResetAvatar ¶
func (m *UserMutation) ResetAvatar()
ResetAvatar resets all changes to the "avatar" edge.
func (*UserMutation) ResetAvatarID ¶
func (m *UserMutation) ResetAvatarID()
ResetAvatarID resets all changes to the "avatar_id" field.
func (*UserMutation) ResetBio ¶
func (m *UserMutation) ResetBio()
ResetBio resets all changes to the "bio" field.
func (*UserMutation) ResetCity ¶
func (m *UserMutation) ResetCity()
ResetCity resets all changes to the "city" edge.
func (*UserMutation) ResetCityID ¶
func (m *UserMutation) ResetCityID()
ResetCityID resets all changes to the "city_id" field.
func (*UserMutation) ResetComments ¶
func (m *UserMutation) ResetComments()
ResetComments resets all changes to the "comments" edge.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetDob ¶
func (m *UserMutation) ResetDob()
ResetDob resets all changes to the "dob" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetFirstName ¶
func (m *UserMutation) ResetFirstName()
ResetFirstName resets all changes to the "first_name" field.
func (*UserMutation) ResetIsActive ¶
func (m *UserMutation) ResetIsActive()
ResetIsActive resets all changes to the "is_active" field.
func (*UserMutation) ResetIsEmailVerified ¶
func (m *UserMutation) ResetIsEmailVerified()
ResetIsEmailVerified resets all changes to the "is_email_verified" field.
func (*UserMutation) ResetIsStaff ¶
func (m *UserMutation) ResetIsStaff()
ResetIsStaff resets all changes to the "is_staff" field.
func (*UserMutation) ResetLastName ¶
func (m *UserMutation) ResetLastName()
ResetLastName resets all changes to the "last_name" field.
func (*UserMutation) ResetMemberChats ¶
func (m *UserMutation) ResetMemberChats()
ResetMemberChats resets all changes to the "member_chats" edge.
func (*UserMutation) ResetMessages ¶
func (m *UserMutation) ResetMessages()
ResetMessages resets all changes to the "messages" edge.
func (*UserMutation) ResetNotifications ¶
func (m *UserMutation) ResetNotifications()
ResetNotifications resets all changes to the "notifications" edge.
func (*UserMutation) ResetNotificationsFrom ¶
func (m *UserMutation) ResetNotificationsFrom()
ResetNotificationsFrom resets all changes to the "notifications_from" edge.
func (*UserMutation) ResetNotificationsRead ¶
func (m *UserMutation) ResetNotificationsRead()
ResetNotificationsRead resets all changes to the "notifications_read" edge.
func (*UserMutation) ResetOtp ¶
func (m *UserMutation) ResetOtp()
ResetOtp resets all changes to the "otp" edge.
func (*UserMutation) ResetOwnedChats ¶
func (m *UserMutation) ResetOwnedChats()
ResetOwnedChats resets all changes to the "owned_chats" edge.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetPosts ¶
func (m *UserMutation) ResetPosts()
ResetPosts resets all changes to the "posts" edge.
func (*UserMutation) ResetReactions ¶
func (m *UserMutation) ResetReactions()
ResetReactions resets all changes to the "reactions" edge.
func (*UserMutation) ResetRefresh ¶
func (m *UserMutation) ResetRefresh()
ResetRefresh resets all changes to the "refresh" field.
func (*UserMutation) ResetReplies ¶
func (m *UserMutation) ResetReplies()
ResetReplies resets all changes to the "replies" edge.
func (*UserMutation) ResetRequesteeFriends ¶
func (m *UserMutation) ResetRequesteeFriends()
ResetRequesteeFriends resets all changes to the "requestee_friends" edge.
func (*UserMutation) ResetRequesterFriends ¶
func (m *UserMutation) ResetRequesterFriends()
ResetRequesterFriends resets all changes to the "requester_friends" edge.
func (*UserMutation) ResetTermsAgreement ¶
func (m *UserMutation) ResetTermsAgreement()
ResetTermsAgreement resets all changes to the "terms_agreement" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SetAccess ¶
func (m *UserMutation) SetAccess(s string)
SetAccess sets the "access" field.
func (*UserMutation) SetAvatarID ¶
func (m *UserMutation) SetAvatarID(u uuid.UUID)
SetAvatarID sets the "avatar_id" field.
func (*UserMutation) SetCityID ¶
func (m *UserMutation) SetCityID(u uuid.UUID)
SetCityID sets the "city_id" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetDob ¶
func (m *UserMutation) SetDob(t time.Time)
SetDob sets the "dob" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetFirstName ¶
func (m *UserMutation) SetFirstName(s string)
SetFirstName sets the "first_name" field.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetIsActive ¶
func (m *UserMutation) SetIsActive(b bool)
SetIsActive sets the "is_active" field.
func (*UserMutation) SetIsEmailVerified ¶
func (m *UserMutation) SetIsEmailVerified(b bool)
SetIsEmailVerified sets the "is_email_verified" field.
func (*UserMutation) SetIsStaff ¶
func (m *UserMutation) SetIsStaff(b bool)
SetIsStaff sets the "is_staff" field.
func (*UserMutation) SetLastName ¶
func (m *UserMutation) SetLastName(s string)
SetLastName sets the "last_name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetOtpID ¶
func (m *UserMutation) SetOtpID(id uuid.UUID)
SetOtpID sets the "otp" edge to the Otp entity by id.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetRefresh ¶
func (m *UserMutation) SetRefresh(s string)
SetRefresh sets the "refresh" field.
func (*UserMutation) SetTermsAgreement ¶
func (m *UserMutation) SetTermsAgreement(b bool)
SetTermsAgreement sets the "terms_agreement" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*UserMutation) TermsAgreement ¶
func (m *UserMutation) TermsAgreement() (r bool, exists bool)
TermsAgreement returns the value of the "terms_agreement" field in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryAvatar ¶
QueryAvatar chains the current query on the "avatar" edge.
func (*UserQuery) QueryComments ¶
func (uq *UserQuery) QueryComments() *CommentQuery
QueryComments chains the current query on the "comments" edge.
func (*UserQuery) QueryMemberChats ¶
QueryMemberChats chains the current query on the "member_chats" edge.
func (*UserQuery) QueryMessages ¶
func (uq *UserQuery) QueryMessages() *MessageQuery
QueryMessages chains the current query on the "messages" edge.
func (*UserQuery) QueryNotifications ¶
func (uq *UserQuery) QueryNotifications() *NotificationQuery
QueryNotifications chains the current query on the "notifications" edge.
func (*UserQuery) QueryNotificationsFrom ¶
func (uq *UserQuery) QueryNotificationsFrom() *NotificationQuery
QueryNotificationsFrom chains the current query on the "notifications_from" edge.
func (*UserQuery) QueryNotificationsRead ¶
func (uq *UserQuery) QueryNotificationsRead() *NotificationQuery
QueryNotificationsRead chains the current query on the "notifications_read" edge.
func (*UserQuery) QueryOwnedChats ¶
QueryOwnedChats chains the current query on the "owned_chats" edge.
func (*UserQuery) QueryPosts ¶
QueryPosts chains the current query on the "posts" edge.
func (*UserQuery) QueryReactions ¶
func (uq *UserQuery) QueryReactions() *ReactionQuery
QueryReactions chains the current query on the "reactions" edge.
func (*UserQuery) QueryReplies ¶
func (uq *UserQuery) QueryReplies() *ReplyQuery
QueryReplies chains the current query on the "replies" edge.
func (*UserQuery) QueryRequesteeFriends ¶
func (uq *UserQuery) QueryRequesteeFriends() *FriendQuery
QueryRequesteeFriends chains the current query on the "requestee_friends" edge.
func (*UserQuery) QueryRequesterFriends ¶
func (uq *UserQuery) QueryRequesterFriends() *FriendQuery
QueryRequesterFriends chains the current query on the "requester_friends" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.User.Query(). Select(user.FieldCreatedAt). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithAvatar ¶
WithAvatar tells the query-builder to eager-load the nodes that are connected to the "avatar" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithCity ¶
WithCity tells the query-builder to eager-load the nodes that are connected to the "city" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithComments ¶
func (uq *UserQuery) WithComments(opts ...func(*CommentQuery)) *UserQuery
WithComments tells the query-builder to eager-load the nodes that are connected to the "comments" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithMemberChats ¶
WithMemberChats tells the query-builder to eager-load the nodes that are connected to the "member_chats" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithMessages ¶
func (uq *UserQuery) WithMessages(opts ...func(*MessageQuery)) *UserQuery
WithMessages tells the query-builder to eager-load the nodes that are connected to the "messages" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNotifications ¶
func (uq *UserQuery) WithNotifications(opts ...func(*NotificationQuery)) *UserQuery
WithNotifications tells the query-builder to eager-load the nodes that are connected to the "notifications" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNotificationsFrom ¶
func (uq *UserQuery) WithNotificationsFrom(opts ...func(*NotificationQuery)) *UserQuery
WithNotificationsFrom tells the query-builder to eager-load the nodes that are connected to the "notifications_from" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNotificationsRead ¶
func (uq *UserQuery) WithNotificationsRead(opts ...func(*NotificationQuery)) *UserQuery
WithNotificationsRead tells the query-builder to eager-load the nodes that are connected to the "notifications_read" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithOtp ¶
WithOtp tells the query-builder to eager-load the nodes that are connected to the "otp" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithOwnedChats ¶
WithOwnedChats tells the query-builder to eager-load the nodes that are connected to the "owned_chats" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithPosts ¶
WithPosts tells the query-builder to eager-load the nodes that are connected to the "posts" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithReactions ¶
func (uq *UserQuery) WithReactions(opts ...func(*ReactionQuery)) *UserQuery
WithReactions tells the query-builder to eager-load the nodes that are connected to the "reactions" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithReplies ¶
func (uq *UserQuery) WithReplies(opts ...func(*ReplyQuery)) *UserQuery
WithReplies tells the query-builder to eager-load the nodes that are connected to the "replies" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithRequesteeFriends ¶
func (uq *UserQuery) WithRequesteeFriends(opts ...func(*FriendQuery)) *UserQuery
WithRequesteeFriends tells the query-builder to eager-load the nodes that are connected to the "requestee_friends" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithRequesterFriends ¶
func (uq *UserQuery) WithRequesterFriends(opts ...func(*FriendQuery)) *UserQuery
WithRequesterFriends tells the query-builder to eager-load the nodes that are connected to the "requester_friends" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddCommentIDs ¶
func (uu *UserUpdate) AddCommentIDs(ids ...uuid.UUID) *UserUpdate
AddCommentIDs adds the "comments" edge to the Comment entity by IDs.
func (*UserUpdate) AddComments ¶
func (uu *UserUpdate) AddComments(c ...*Comment) *UserUpdate
AddComments adds the "comments" edges to the Comment entity.
func (*UserUpdate) AddMemberChatIDs ¶
func (uu *UserUpdate) AddMemberChatIDs(ids ...uuid.UUID) *UserUpdate
AddMemberChatIDs adds the "member_chats" edge to the Chat entity by IDs.
func (*UserUpdate) AddMemberChats ¶
func (uu *UserUpdate) AddMemberChats(c ...*Chat) *UserUpdate
AddMemberChats adds the "member_chats" edges to the Chat entity.
func (*UserUpdate) AddMessageIDs ¶
func (uu *UserUpdate) AddMessageIDs(ids ...uuid.UUID) *UserUpdate
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*UserUpdate) AddMessages ¶
func (uu *UserUpdate) AddMessages(m ...*Message) *UserUpdate
AddMessages adds the "messages" edges to the Message entity.
func (*UserUpdate) AddNotificationIDs ¶
func (uu *UserUpdate) AddNotificationIDs(ids ...uuid.UUID) *UserUpdate
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*UserUpdate) AddNotifications ¶
func (uu *UserUpdate) AddNotifications(n ...*Notification) *UserUpdate
AddNotifications adds the "notifications" edges to the Notification entity.
func (*UserUpdate) AddNotificationsFrom ¶
func (uu *UserUpdate) AddNotificationsFrom(n ...*Notification) *UserUpdate
AddNotificationsFrom adds the "notifications_from" edges to the Notification entity.
func (*UserUpdate) AddNotificationsFromIDs ¶
func (uu *UserUpdate) AddNotificationsFromIDs(ids ...uuid.UUID) *UserUpdate
AddNotificationsFromIDs adds the "notifications_from" edge to the Notification entity by IDs.
func (*UserUpdate) AddNotificationsRead ¶
func (uu *UserUpdate) AddNotificationsRead(n ...*Notification) *UserUpdate
AddNotificationsRead adds the "notifications_read" edges to the Notification entity.
func (*UserUpdate) AddNotificationsReadIDs ¶
func (uu *UserUpdate) AddNotificationsReadIDs(ids ...uuid.UUID) *UserUpdate
AddNotificationsReadIDs adds the "notifications_read" edge to the Notification entity by IDs.
func (*UserUpdate) AddOwnedChatIDs ¶
func (uu *UserUpdate) AddOwnedChatIDs(ids ...uuid.UUID) *UserUpdate
AddOwnedChatIDs adds the "owned_chats" edge to the Chat entity by IDs.
func (*UserUpdate) AddOwnedChats ¶
func (uu *UserUpdate) AddOwnedChats(c ...*Chat) *UserUpdate
AddOwnedChats adds the "owned_chats" edges to the Chat entity.
func (*UserUpdate) AddPostIDs ¶
func (uu *UserUpdate) AddPostIDs(ids ...uuid.UUID) *UserUpdate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*UserUpdate) AddPosts ¶
func (uu *UserUpdate) AddPosts(p ...*Post) *UserUpdate
AddPosts adds the "posts" edges to the Post entity.
func (*UserUpdate) AddReactionIDs ¶
func (uu *UserUpdate) AddReactionIDs(ids ...uuid.UUID) *UserUpdate
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*UserUpdate) AddReactions ¶
func (uu *UserUpdate) AddReactions(r ...*Reaction) *UserUpdate
AddReactions adds the "reactions" edges to the Reaction entity.
func (*UserUpdate) AddReplies ¶
func (uu *UserUpdate) AddReplies(r ...*Reply) *UserUpdate
AddReplies adds the "replies" edges to the Reply entity.
func (*UserUpdate) AddReplyIDs ¶
func (uu *UserUpdate) AddReplyIDs(ids ...uuid.UUID) *UserUpdate
AddReplyIDs adds the "replies" edge to the Reply entity by IDs.
func (*UserUpdate) AddRequesteeFriendIDs ¶
func (uu *UserUpdate) AddRequesteeFriendIDs(ids ...uuid.UUID) *UserUpdate
AddRequesteeFriendIDs adds the "requestee_friends" edge to the Friend entity by IDs.
func (*UserUpdate) AddRequesteeFriends ¶
func (uu *UserUpdate) AddRequesteeFriends(f ...*Friend) *UserUpdate
AddRequesteeFriends adds the "requestee_friends" edges to the Friend entity.
func (*UserUpdate) AddRequesterFriendIDs ¶
func (uu *UserUpdate) AddRequesterFriendIDs(ids ...uuid.UUID) *UserUpdate
AddRequesterFriendIDs adds the "requester_friends" edge to the Friend entity by IDs.
func (*UserUpdate) AddRequesterFriends ¶
func (uu *UserUpdate) AddRequesterFriends(f ...*Friend) *UserUpdate
AddRequesterFriends adds the "requester_friends" edges to the Friend entity.
func (*UserUpdate) ClearAccess ¶
func (uu *UserUpdate) ClearAccess() *UserUpdate
ClearAccess clears the value of the "access" field.
func (*UserUpdate) ClearAvatar ¶
func (uu *UserUpdate) ClearAvatar() *UserUpdate
ClearAvatar clears the "avatar" edge to the File entity.
func (*UserUpdate) ClearAvatarID ¶
func (uu *UserUpdate) ClearAvatarID() *UserUpdate
ClearAvatarID clears the value of the "avatar_id" field.
func (*UserUpdate) ClearBio ¶
func (uu *UserUpdate) ClearBio() *UserUpdate
ClearBio clears the value of the "bio" field.
func (*UserUpdate) ClearCity ¶
func (uu *UserUpdate) ClearCity() *UserUpdate
ClearCity clears the "city" edge to the City entity.
func (*UserUpdate) ClearCityID ¶
func (uu *UserUpdate) ClearCityID() *UserUpdate
ClearCityID clears the value of the "city_id" field.
func (*UserUpdate) ClearComments ¶
func (uu *UserUpdate) ClearComments() *UserUpdate
ClearComments clears all "comments" edges to the Comment entity.
func (*UserUpdate) ClearDob ¶
func (uu *UserUpdate) ClearDob() *UserUpdate
ClearDob clears the value of the "dob" field.
func (*UserUpdate) ClearMemberChats ¶
func (uu *UserUpdate) ClearMemberChats() *UserUpdate
ClearMemberChats clears all "member_chats" edges to the Chat entity.
func (*UserUpdate) ClearMessages ¶
func (uu *UserUpdate) ClearMessages() *UserUpdate
ClearMessages clears all "messages" edges to the Message entity.
func (*UserUpdate) ClearNotifications ¶
func (uu *UserUpdate) ClearNotifications() *UserUpdate
ClearNotifications clears all "notifications" edges to the Notification entity.
func (*UserUpdate) ClearNotificationsFrom ¶
func (uu *UserUpdate) ClearNotificationsFrom() *UserUpdate
ClearNotificationsFrom clears all "notifications_from" edges to the Notification entity.
func (*UserUpdate) ClearNotificationsRead ¶
func (uu *UserUpdate) ClearNotificationsRead() *UserUpdate
ClearNotificationsRead clears all "notifications_read" edges to the Notification entity.
func (*UserUpdate) ClearOtp ¶
func (uu *UserUpdate) ClearOtp() *UserUpdate
ClearOtp clears the "otp" edge to the Otp entity.
func (*UserUpdate) ClearOwnedChats ¶
func (uu *UserUpdate) ClearOwnedChats() *UserUpdate
ClearOwnedChats clears all "owned_chats" edges to the Chat entity.
func (*UserUpdate) ClearPosts ¶
func (uu *UserUpdate) ClearPosts() *UserUpdate
ClearPosts clears all "posts" edges to the Post entity.
func (*UserUpdate) ClearReactions ¶
func (uu *UserUpdate) ClearReactions() *UserUpdate
ClearReactions clears all "reactions" edges to the Reaction entity.
func (*UserUpdate) ClearRefresh ¶
func (uu *UserUpdate) ClearRefresh() *UserUpdate
ClearRefresh clears the value of the "refresh" field.
func (*UserUpdate) ClearReplies ¶
func (uu *UserUpdate) ClearReplies() *UserUpdate
ClearReplies clears all "replies" edges to the Reply entity.
func (*UserUpdate) ClearRequesteeFriends ¶
func (uu *UserUpdate) ClearRequesteeFriends() *UserUpdate
ClearRequesteeFriends clears all "requestee_friends" edges to the Friend entity.
func (*UserUpdate) ClearRequesterFriends ¶
func (uu *UserUpdate) ClearRequesterFriends() *UserUpdate
ClearRequesterFriends clears all "requester_friends" edges to the Friend entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveCommentIDs ¶
func (uu *UserUpdate) RemoveCommentIDs(ids ...uuid.UUID) *UserUpdate
RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.
func (*UserUpdate) RemoveComments ¶
func (uu *UserUpdate) RemoveComments(c ...*Comment) *UserUpdate
RemoveComments removes "comments" edges to Comment entities.
func (*UserUpdate) RemoveMemberChatIDs ¶
func (uu *UserUpdate) RemoveMemberChatIDs(ids ...uuid.UUID) *UserUpdate
RemoveMemberChatIDs removes the "member_chats" edge to Chat entities by IDs.
func (*UserUpdate) RemoveMemberChats ¶
func (uu *UserUpdate) RemoveMemberChats(c ...*Chat) *UserUpdate
RemoveMemberChats removes "member_chats" edges to Chat entities.
func (*UserUpdate) RemoveMessageIDs ¶
func (uu *UserUpdate) RemoveMessageIDs(ids ...uuid.UUID) *UserUpdate
RemoveMessageIDs removes the "messages" edge to Message entities by IDs.
func (*UserUpdate) RemoveMessages ¶
func (uu *UserUpdate) RemoveMessages(m ...*Message) *UserUpdate
RemoveMessages removes "messages" edges to Message entities.
func (*UserUpdate) RemoveNotificationIDs ¶
func (uu *UserUpdate) RemoveNotificationIDs(ids ...uuid.UUID) *UserUpdate
RemoveNotificationIDs removes the "notifications" edge to Notification entities by IDs.
func (*UserUpdate) RemoveNotifications ¶
func (uu *UserUpdate) RemoveNotifications(n ...*Notification) *UserUpdate
RemoveNotifications removes "notifications" edges to Notification entities.
func (*UserUpdate) RemoveNotificationsFrom ¶
func (uu *UserUpdate) RemoveNotificationsFrom(n ...*Notification) *UserUpdate
RemoveNotificationsFrom removes "notifications_from" edges to Notification entities.
func (*UserUpdate) RemoveNotificationsFromIDs ¶
func (uu *UserUpdate) RemoveNotificationsFromIDs(ids ...uuid.UUID) *UserUpdate
RemoveNotificationsFromIDs removes the "notifications_from" edge to Notification entities by IDs.
func (*UserUpdate) RemoveNotificationsRead ¶
func (uu *UserUpdate) RemoveNotificationsRead(n ...*Notification) *UserUpdate
RemoveNotificationsRead removes "notifications_read" edges to Notification entities.
func (*UserUpdate) RemoveNotificationsReadIDs ¶
func (uu *UserUpdate) RemoveNotificationsReadIDs(ids ...uuid.UUID) *UserUpdate
RemoveNotificationsReadIDs removes the "notifications_read" edge to Notification entities by IDs.
func (*UserUpdate) RemoveOwnedChatIDs ¶
func (uu *UserUpdate) RemoveOwnedChatIDs(ids ...uuid.UUID) *UserUpdate
RemoveOwnedChatIDs removes the "owned_chats" edge to Chat entities by IDs.
func (*UserUpdate) RemoveOwnedChats ¶
func (uu *UserUpdate) RemoveOwnedChats(c ...*Chat) *UserUpdate
RemoveOwnedChats removes "owned_chats" edges to Chat entities.
func (*UserUpdate) RemovePostIDs ¶
func (uu *UserUpdate) RemovePostIDs(ids ...uuid.UUID) *UserUpdate
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*UserUpdate) RemovePosts ¶
func (uu *UserUpdate) RemovePosts(p ...*Post) *UserUpdate
RemovePosts removes "posts" edges to Post entities.
func (*UserUpdate) RemoveReactionIDs ¶
func (uu *UserUpdate) RemoveReactionIDs(ids ...uuid.UUID) *UserUpdate
RemoveReactionIDs removes the "reactions" edge to Reaction entities by IDs.
func (*UserUpdate) RemoveReactions ¶
func (uu *UserUpdate) RemoveReactions(r ...*Reaction) *UserUpdate
RemoveReactions removes "reactions" edges to Reaction entities.
func (*UserUpdate) RemoveReplies ¶
func (uu *UserUpdate) RemoveReplies(r ...*Reply) *UserUpdate
RemoveReplies removes "replies" edges to Reply entities.
func (*UserUpdate) RemoveReplyIDs ¶
func (uu *UserUpdate) RemoveReplyIDs(ids ...uuid.UUID) *UserUpdate
RemoveReplyIDs removes the "replies" edge to Reply entities by IDs.
func (*UserUpdate) RemoveRequesteeFriendIDs ¶
func (uu *UserUpdate) RemoveRequesteeFriendIDs(ids ...uuid.UUID) *UserUpdate
RemoveRequesteeFriendIDs removes the "requestee_friends" edge to Friend entities by IDs.
func (*UserUpdate) RemoveRequesteeFriends ¶
func (uu *UserUpdate) RemoveRequesteeFriends(f ...*Friend) *UserUpdate
RemoveRequesteeFriends removes "requestee_friends" edges to Friend entities.
func (*UserUpdate) RemoveRequesterFriendIDs ¶
func (uu *UserUpdate) RemoveRequesterFriendIDs(ids ...uuid.UUID) *UserUpdate
RemoveRequesterFriendIDs removes the "requester_friends" edge to Friend entities by IDs.
func (*UserUpdate) RemoveRequesterFriends ¶
func (uu *UserUpdate) RemoveRequesterFriends(f ...*Friend) *UserUpdate
RemoveRequesterFriends removes "requester_friends" edges to Friend entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAccess ¶
func (uu *UserUpdate) SetAccess(s string) *UserUpdate
SetAccess sets the "access" field.
func (*UserUpdate) SetAvatar ¶
func (uu *UserUpdate) SetAvatar(f *File) *UserUpdate
SetAvatar sets the "avatar" edge to the File entity.
func (*UserUpdate) SetAvatarID ¶
func (uu *UserUpdate) SetAvatarID(u uuid.UUID) *UserUpdate
SetAvatarID sets the "avatar_id" field.
func (*UserUpdate) SetBio ¶
func (uu *UserUpdate) SetBio(s string) *UserUpdate
SetBio sets the "bio" field.
func (*UserUpdate) SetCity ¶
func (uu *UserUpdate) SetCity(c *City) *UserUpdate
SetCity sets the "city" edge to the City entity.
func (*UserUpdate) SetCityID ¶
func (uu *UserUpdate) SetCityID(u uuid.UUID) *UserUpdate
SetCityID sets the "city_id" field.
func (*UserUpdate) SetCreatedAt ¶
func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
SetCreatedAt sets the "created_at" field.
func (*UserUpdate) SetDob ¶
func (uu *UserUpdate) SetDob(t time.Time) *UserUpdate
SetDob sets the "dob" field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetFirstName ¶
func (uu *UserUpdate) SetFirstName(s string) *UserUpdate
SetFirstName sets the "first_name" field.
func (*UserUpdate) SetIsActive ¶
func (uu *UserUpdate) SetIsActive(b bool) *UserUpdate
SetIsActive sets the "is_active" field.
func (*UserUpdate) SetIsEmailVerified ¶
func (uu *UserUpdate) SetIsEmailVerified(b bool) *UserUpdate
SetIsEmailVerified sets the "is_email_verified" field.
func (*UserUpdate) SetIsStaff ¶
func (uu *UserUpdate) SetIsStaff(b bool) *UserUpdate
SetIsStaff sets the "is_staff" field.
func (*UserUpdate) SetLastName ¶
func (uu *UserUpdate) SetLastName(s string) *UserUpdate
SetLastName sets the "last_name" field.
func (*UserUpdate) SetNillableAccess ¶
func (uu *UserUpdate) SetNillableAccess(s *string) *UserUpdate
SetNillableAccess sets the "access" field if the given value is not nil.
func (*UserUpdate) SetNillableAvatarID ¶
func (uu *UserUpdate) SetNillableAvatarID(u *uuid.UUID) *UserUpdate
SetNillableAvatarID sets the "avatar_id" field if the given value is not nil.
func (*UserUpdate) SetNillableBio ¶
func (uu *UserUpdate) SetNillableBio(s *string) *UserUpdate
SetNillableBio sets the "bio" field if the given value is not nil.
func (*UserUpdate) SetNillableCityID ¶
func (uu *UserUpdate) SetNillableCityID(u *uuid.UUID) *UserUpdate
SetNillableCityID sets the "city_id" field if the given value is not nil.
func (*UserUpdate) SetNillableCreatedAt ¶
func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdate) SetNillableDob ¶
func (uu *UserUpdate) SetNillableDob(t *time.Time) *UserUpdate
SetNillableDob sets the "dob" field if the given value is not nil.
func (*UserUpdate) SetNillableEmail ¶
func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdate) SetNillableFirstName ¶
func (uu *UserUpdate) SetNillableFirstName(s *string) *UserUpdate
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*UserUpdate) SetNillableIsActive ¶
func (uu *UserUpdate) SetNillableIsActive(b *bool) *UserUpdate
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*UserUpdate) SetNillableIsEmailVerified ¶
func (uu *UserUpdate) SetNillableIsEmailVerified(b *bool) *UserUpdate
SetNillableIsEmailVerified sets the "is_email_verified" field if the given value is not nil.
func (*UserUpdate) SetNillableIsStaff ¶
func (uu *UserUpdate) SetNillableIsStaff(b *bool) *UserUpdate
SetNillableIsStaff sets the "is_staff" field if the given value is not nil.
func (*UserUpdate) SetNillableLastName ¶
func (uu *UserUpdate) SetNillableLastName(s *string) *UserUpdate
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*UserUpdate) SetNillableOtpID ¶
func (uu *UserUpdate) SetNillableOtpID(id *uuid.UUID) *UserUpdate
SetNillableOtpID sets the "otp" edge to the Otp entity by ID if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetNillableRefresh ¶
func (uu *UserUpdate) SetNillableRefresh(s *string) *UserUpdate
SetNillableRefresh sets the "refresh" field if the given value is not nil.
func (*UserUpdate) SetNillableTermsAgreement ¶
func (uu *UserUpdate) SetNillableTermsAgreement(b *bool) *UserUpdate
SetNillableTermsAgreement sets the "terms_agreement" field if the given value is not nil.
func (*UserUpdate) SetNillableUsername ¶
func (uu *UserUpdate) SetNillableUsername(s *string) *UserUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdate) SetOtp ¶
func (uu *UserUpdate) SetOtp(o *Otp) *UserUpdate
SetOtp sets the "otp" edge to the Otp entity.
func (*UserUpdate) SetOtpID ¶
func (uu *UserUpdate) SetOtpID(id uuid.UUID) *UserUpdate
SetOtpID sets the "otp" edge to the Otp entity by ID.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetRefresh ¶
func (uu *UserUpdate) SetRefresh(s string) *UserUpdate
SetRefresh sets the "refresh" field.
func (*UserUpdate) SetTermsAgreement ¶
func (uu *UserUpdate) SetTermsAgreement(b bool) *UserUpdate
SetTermsAgreement sets the "terms_agreement" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddCommentIDs ¶
func (uuo *UserUpdateOne) AddCommentIDs(ids ...uuid.UUID) *UserUpdateOne
AddCommentIDs adds the "comments" edge to the Comment entity by IDs.
func (*UserUpdateOne) AddComments ¶
func (uuo *UserUpdateOne) AddComments(c ...*Comment) *UserUpdateOne
AddComments adds the "comments" edges to the Comment entity.
func (*UserUpdateOne) AddMemberChatIDs ¶
func (uuo *UserUpdateOne) AddMemberChatIDs(ids ...uuid.UUID) *UserUpdateOne
AddMemberChatIDs adds the "member_chats" edge to the Chat entity by IDs.
func (*UserUpdateOne) AddMemberChats ¶
func (uuo *UserUpdateOne) AddMemberChats(c ...*Chat) *UserUpdateOne
AddMemberChats adds the "member_chats" edges to the Chat entity.
func (*UserUpdateOne) AddMessageIDs ¶
func (uuo *UserUpdateOne) AddMessageIDs(ids ...uuid.UUID) *UserUpdateOne
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*UserUpdateOne) AddMessages ¶
func (uuo *UserUpdateOne) AddMessages(m ...*Message) *UserUpdateOne
AddMessages adds the "messages" edges to the Message entity.
func (*UserUpdateOne) AddNotificationIDs ¶
func (uuo *UserUpdateOne) AddNotificationIDs(ids ...uuid.UUID) *UserUpdateOne
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*UserUpdateOne) AddNotifications ¶
func (uuo *UserUpdateOne) AddNotifications(n ...*Notification) *UserUpdateOne
AddNotifications adds the "notifications" edges to the Notification entity.
func (*UserUpdateOne) AddNotificationsFrom ¶
func (uuo *UserUpdateOne) AddNotificationsFrom(n ...*Notification) *UserUpdateOne
AddNotificationsFrom adds the "notifications_from" edges to the Notification entity.
func (*UserUpdateOne) AddNotificationsFromIDs ¶
func (uuo *UserUpdateOne) AddNotificationsFromIDs(ids ...uuid.UUID) *UserUpdateOne
AddNotificationsFromIDs adds the "notifications_from" edge to the Notification entity by IDs.
func (*UserUpdateOne) AddNotificationsRead ¶
func (uuo *UserUpdateOne) AddNotificationsRead(n ...*Notification) *UserUpdateOne
AddNotificationsRead adds the "notifications_read" edges to the Notification entity.
func (*UserUpdateOne) AddNotificationsReadIDs ¶
func (uuo *UserUpdateOne) AddNotificationsReadIDs(ids ...uuid.UUID) *UserUpdateOne
AddNotificationsReadIDs adds the "notifications_read" edge to the Notification entity by IDs.
func (*UserUpdateOne) AddOwnedChatIDs ¶
func (uuo *UserUpdateOne) AddOwnedChatIDs(ids ...uuid.UUID) *UserUpdateOne
AddOwnedChatIDs adds the "owned_chats" edge to the Chat entity by IDs.
func (*UserUpdateOne) AddOwnedChats ¶
func (uuo *UserUpdateOne) AddOwnedChats(c ...*Chat) *UserUpdateOne
AddOwnedChats adds the "owned_chats" edges to the Chat entity.
func (*UserUpdateOne) AddPostIDs ¶
func (uuo *UserUpdateOne) AddPostIDs(ids ...uuid.UUID) *UserUpdateOne
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*UserUpdateOne) AddPosts ¶
func (uuo *UserUpdateOne) AddPosts(p ...*Post) *UserUpdateOne
AddPosts adds the "posts" edges to the Post entity.
func (*UserUpdateOne) AddReactionIDs ¶
func (uuo *UserUpdateOne) AddReactionIDs(ids ...uuid.UUID) *UserUpdateOne
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*UserUpdateOne) AddReactions ¶
func (uuo *UserUpdateOne) AddReactions(r ...*Reaction) *UserUpdateOne
AddReactions adds the "reactions" edges to the Reaction entity.
func (*UserUpdateOne) AddReplies ¶
func (uuo *UserUpdateOne) AddReplies(r ...*Reply) *UserUpdateOne
AddReplies adds the "replies" edges to the Reply entity.
func (*UserUpdateOne) AddReplyIDs ¶
func (uuo *UserUpdateOne) AddReplyIDs(ids ...uuid.UUID) *UserUpdateOne
AddReplyIDs adds the "replies" edge to the Reply entity by IDs.
func (*UserUpdateOne) AddRequesteeFriendIDs ¶
func (uuo *UserUpdateOne) AddRequesteeFriendIDs(ids ...uuid.UUID) *UserUpdateOne
AddRequesteeFriendIDs adds the "requestee_friends" edge to the Friend entity by IDs.
func (*UserUpdateOne) AddRequesteeFriends ¶
func (uuo *UserUpdateOne) AddRequesteeFriends(f ...*Friend) *UserUpdateOne
AddRequesteeFriends adds the "requestee_friends" edges to the Friend entity.
func (*UserUpdateOne) AddRequesterFriendIDs ¶
func (uuo *UserUpdateOne) AddRequesterFriendIDs(ids ...uuid.UUID) *UserUpdateOne
AddRequesterFriendIDs adds the "requester_friends" edge to the Friend entity by IDs.
func (*UserUpdateOne) AddRequesterFriends ¶
func (uuo *UserUpdateOne) AddRequesterFriends(f ...*Friend) *UserUpdateOne
AddRequesterFriends adds the "requester_friends" edges to the Friend entity.
func (*UserUpdateOne) ClearAccess ¶
func (uuo *UserUpdateOne) ClearAccess() *UserUpdateOne
ClearAccess clears the value of the "access" field.
func (*UserUpdateOne) ClearAvatar ¶
func (uuo *UserUpdateOne) ClearAvatar() *UserUpdateOne
ClearAvatar clears the "avatar" edge to the File entity.
func (*UserUpdateOne) ClearAvatarID ¶
func (uuo *UserUpdateOne) ClearAvatarID() *UserUpdateOne
ClearAvatarID clears the value of the "avatar_id" field.
func (*UserUpdateOne) ClearBio ¶
func (uuo *UserUpdateOne) ClearBio() *UserUpdateOne
ClearBio clears the value of the "bio" field.
func (*UserUpdateOne) ClearCity ¶
func (uuo *UserUpdateOne) ClearCity() *UserUpdateOne
ClearCity clears the "city" edge to the City entity.
func (*UserUpdateOne) ClearCityID ¶
func (uuo *UserUpdateOne) ClearCityID() *UserUpdateOne
ClearCityID clears the value of the "city_id" field.
func (*UserUpdateOne) ClearComments ¶
func (uuo *UserUpdateOne) ClearComments() *UserUpdateOne
ClearComments clears all "comments" edges to the Comment entity.
func (*UserUpdateOne) ClearDob ¶
func (uuo *UserUpdateOne) ClearDob() *UserUpdateOne
ClearDob clears the value of the "dob" field.
func (*UserUpdateOne) ClearMemberChats ¶
func (uuo *UserUpdateOne) ClearMemberChats() *UserUpdateOne
ClearMemberChats clears all "member_chats" edges to the Chat entity.
func (*UserUpdateOne) ClearMessages ¶
func (uuo *UserUpdateOne) ClearMessages() *UserUpdateOne
ClearMessages clears all "messages" edges to the Message entity.
func (*UserUpdateOne) ClearNotifications ¶
func (uuo *UserUpdateOne) ClearNotifications() *UserUpdateOne
ClearNotifications clears all "notifications" edges to the Notification entity.
func (*UserUpdateOne) ClearNotificationsFrom ¶
func (uuo *UserUpdateOne) ClearNotificationsFrom() *UserUpdateOne
ClearNotificationsFrom clears all "notifications_from" edges to the Notification entity.
func (*UserUpdateOne) ClearNotificationsRead ¶
func (uuo *UserUpdateOne) ClearNotificationsRead() *UserUpdateOne
ClearNotificationsRead clears all "notifications_read" edges to the Notification entity.
func (*UserUpdateOne) ClearOtp ¶
func (uuo *UserUpdateOne) ClearOtp() *UserUpdateOne
ClearOtp clears the "otp" edge to the Otp entity.
func (*UserUpdateOne) ClearOwnedChats ¶
func (uuo *UserUpdateOne) ClearOwnedChats() *UserUpdateOne
ClearOwnedChats clears all "owned_chats" edges to the Chat entity.
func (*UserUpdateOne) ClearPosts ¶
func (uuo *UserUpdateOne) ClearPosts() *UserUpdateOne
ClearPosts clears all "posts" edges to the Post entity.
func (*UserUpdateOne) ClearReactions ¶
func (uuo *UserUpdateOne) ClearReactions() *UserUpdateOne
ClearReactions clears all "reactions" edges to the Reaction entity.
func (*UserUpdateOne) ClearRefresh ¶
func (uuo *UserUpdateOne) ClearRefresh() *UserUpdateOne
ClearRefresh clears the value of the "refresh" field.
func (*UserUpdateOne) ClearReplies ¶
func (uuo *UserUpdateOne) ClearReplies() *UserUpdateOne
ClearReplies clears all "replies" edges to the Reply entity.
func (*UserUpdateOne) ClearRequesteeFriends ¶
func (uuo *UserUpdateOne) ClearRequesteeFriends() *UserUpdateOne
ClearRequesteeFriends clears all "requestee_friends" edges to the Friend entity.
func (*UserUpdateOne) ClearRequesterFriends ¶
func (uuo *UserUpdateOne) ClearRequesterFriends() *UserUpdateOne
ClearRequesterFriends clears all "requester_friends" edges to the Friend entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveCommentIDs ¶
func (uuo *UserUpdateOne) RemoveCommentIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.
func (*UserUpdateOne) RemoveComments ¶
func (uuo *UserUpdateOne) RemoveComments(c ...*Comment) *UserUpdateOne
RemoveComments removes "comments" edges to Comment entities.
func (*UserUpdateOne) RemoveMemberChatIDs ¶
func (uuo *UserUpdateOne) RemoveMemberChatIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveMemberChatIDs removes the "member_chats" edge to Chat entities by IDs.
func (*UserUpdateOne) RemoveMemberChats ¶
func (uuo *UserUpdateOne) RemoveMemberChats(c ...*Chat) *UserUpdateOne
RemoveMemberChats removes "member_chats" edges to Chat entities.
func (*UserUpdateOne) RemoveMessageIDs ¶
func (uuo *UserUpdateOne) RemoveMessageIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveMessageIDs removes the "messages" edge to Message entities by IDs.
func (*UserUpdateOne) RemoveMessages ¶
func (uuo *UserUpdateOne) RemoveMessages(m ...*Message) *UserUpdateOne
RemoveMessages removes "messages" edges to Message entities.
func (*UserUpdateOne) RemoveNotificationIDs ¶
func (uuo *UserUpdateOne) RemoveNotificationIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveNotificationIDs removes the "notifications" edge to Notification entities by IDs.
func (*UserUpdateOne) RemoveNotifications ¶
func (uuo *UserUpdateOne) RemoveNotifications(n ...*Notification) *UserUpdateOne
RemoveNotifications removes "notifications" edges to Notification entities.
func (*UserUpdateOne) RemoveNotificationsFrom ¶
func (uuo *UserUpdateOne) RemoveNotificationsFrom(n ...*Notification) *UserUpdateOne
RemoveNotificationsFrom removes "notifications_from" edges to Notification entities.
func (*UserUpdateOne) RemoveNotificationsFromIDs ¶
func (uuo *UserUpdateOne) RemoveNotificationsFromIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveNotificationsFromIDs removes the "notifications_from" edge to Notification entities by IDs.
func (*UserUpdateOne) RemoveNotificationsRead ¶
func (uuo *UserUpdateOne) RemoveNotificationsRead(n ...*Notification) *UserUpdateOne
RemoveNotificationsRead removes "notifications_read" edges to Notification entities.
func (*UserUpdateOne) RemoveNotificationsReadIDs ¶
func (uuo *UserUpdateOne) RemoveNotificationsReadIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveNotificationsReadIDs removes the "notifications_read" edge to Notification entities by IDs.
func (*UserUpdateOne) RemoveOwnedChatIDs ¶
func (uuo *UserUpdateOne) RemoveOwnedChatIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveOwnedChatIDs removes the "owned_chats" edge to Chat entities by IDs.
func (*UserUpdateOne) RemoveOwnedChats ¶
func (uuo *UserUpdateOne) RemoveOwnedChats(c ...*Chat) *UserUpdateOne
RemoveOwnedChats removes "owned_chats" edges to Chat entities.
func (*UserUpdateOne) RemovePostIDs ¶
func (uuo *UserUpdateOne) RemovePostIDs(ids ...uuid.UUID) *UserUpdateOne
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*UserUpdateOne) RemovePosts ¶
func (uuo *UserUpdateOne) RemovePosts(p ...*Post) *UserUpdateOne
RemovePosts removes "posts" edges to Post entities.
func (*UserUpdateOne) RemoveReactionIDs ¶
func (uuo *UserUpdateOne) RemoveReactionIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveReactionIDs removes the "reactions" edge to Reaction entities by IDs.
func (*UserUpdateOne) RemoveReactions ¶
func (uuo *UserUpdateOne) RemoveReactions(r ...*Reaction) *UserUpdateOne
RemoveReactions removes "reactions" edges to Reaction entities.
func (*UserUpdateOne) RemoveReplies ¶
func (uuo *UserUpdateOne) RemoveReplies(r ...*Reply) *UserUpdateOne
RemoveReplies removes "replies" edges to Reply entities.
func (*UserUpdateOne) RemoveReplyIDs ¶
func (uuo *UserUpdateOne) RemoveReplyIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveReplyIDs removes the "replies" edge to Reply entities by IDs.
func (*UserUpdateOne) RemoveRequesteeFriendIDs ¶
func (uuo *UserUpdateOne) RemoveRequesteeFriendIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveRequesteeFriendIDs removes the "requestee_friends" edge to Friend entities by IDs.
func (*UserUpdateOne) RemoveRequesteeFriends ¶
func (uuo *UserUpdateOne) RemoveRequesteeFriends(f ...*Friend) *UserUpdateOne
RemoveRequesteeFriends removes "requestee_friends" edges to Friend entities.
func (*UserUpdateOne) RemoveRequesterFriendIDs ¶
func (uuo *UserUpdateOne) RemoveRequesterFriendIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveRequesterFriendIDs removes the "requester_friends" edge to Friend entities by IDs.
func (*UserUpdateOne) RemoveRequesterFriends ¶
func (uuo *UserUpdateOne) RemoveRequesterFriends(f ...*Friend) *UserUpdateOne
RemoveRequesterFriends removes "requester_friends" edges to Friend entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetAccess ¶
func (uuo *UserUpdateOne) SetAccess(s string) *UserUpdateOne
SetAccess sets the "access" field.
func (*UserUpdateOne) SetAvatar ¶
func (uuo *UserUpdateOne) SetAvatar(f *File) *UserUpdateOne
SetAvatar sets the "avatar" edge to the File entity.
func (*UserUpdateOne) SetAvatarID ¶
func (uuo *UserUpdateOne) SetAvatarID(u uuid.UUID) *UserUpdateOne
SetAvatarID sets the "avatar_id" field.
func (*UserUpdateOne) SetBio ¶
func (uuo *UserUpdateOne) SetBio(s string) *UserUpdateOne
SetBio sets the "bio" field.
func (*UserUpdateOne) SetCity ¶
func (uuo *UserUpdateOne) SetCity(c *City) *UserUpdateOne
SetCity sets the "city" edge to the City entity.
func (*UserUpdateOne) SetCityID ¶
func (uuo *UserUpdateOne) SetCityID(u uuid.UUID) *UserUpdateOne
SetCityID sets the "city_id" field.
func (*UserUpdateOne) SetCreatedAt ¶
func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserUpdateOne) SetDob ¶
func (uuo *UserUpdateOne) SetDob(t time.Time) *UserUpdateOne
SetDob sets the "dob" field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetFirstName ¶
func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne
SetFirstName sets the "first_name" field.
func (*UserUpdateOne) SetIsActive ¶
func (uuo *UserUpdateOne) SetIsActive(b bool) *UserUpdateOne
SetIsActive sets the "is_active" field.
func (*UserUpdateOne) SetIsEmailVerified ¶
func (uuo *UserUpdateOne) SetIsEmailVerified(b bool) *UserUpdateOne
SetIsEmailVerified sets the "is_email_verified" field.
func (*UserUpdateOne) SetIsStaff ¶
func (uuo *UserUpdateOne) SetIsStaff(b bool) *UserUpdateOne
SetIsStaff sets the "is_staff" field.
func (*UserUpdateOne) SetLastName ¶
func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne
SetLastName sets the "last_name" field.
func (*UserUpdateOne) SetNillableAccess ¶
func (uuo *UserUpdateOne) SetNillableAccess(s *string) *UserUpdateOne
SetNillableAccess sets the "access" field if the given value is not nil.
func (*UserUpdateOne) SetNillableAvatarID ¶
func (uuo *UserUpdateOne) SetNillableAvatarID(u *uuid.UUID) *UserUpdateOne
SetNillableAvatarID sets the "avatar_id" field if the given value is not nil.
func (*UserUpdateOne) SetNillableBio ¶
func (uuo *UserUpdateOne) SetNillableBio(s *string) *UserUpdateOne
SetNillableBio sets the "bio" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCityID ¶
func (uuo *UserUpdateOne) SetNillableCityID(u *uuid.UUID) *UserUpdateOne
SetNillableCityID sets the "city_id" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCreatedAt ¶
func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDob ¶
func (uuo *UserUpdateOne) SetNillableDob(t *time.Time) *UserUpdateOne
SetNillableDob sets the "dob" field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmail ¶
func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdateOne) SetNillableFirstName ¶
func (uuo *UserUpdateOne) SetNillableFirstName(s *string) *UserUpdateOne
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIsActive ¶
func (uuo *UserUpdateOne) SetNillableIsActive(b *bool) *UserUpdateOne
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIsEmailVerified ¶
func (uuo *UserUpdateOne) SetNillableIsEmailVerified(b *bool) *UserUpdateOne
SetNillableIsEmailVerified sets the "is_email_verified" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIsStaff ¶
func (uuo *UserUpdateOne) SetNillableIsStaff(b *bool) *UserUpdateOne
SetNillableIsStaff sets the "is_staff" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastName ¶
func (uuo *UserUpdateOne) SetNillableLastName(s *string) *UserUpdateOne
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableOtpID ¶
func (uuo *UserUpdateOne) SetNillableOtpID(id *uuid.UUID) *UserUpdateOne
SetNillableOtpID sets the "otp" edge to the Otp entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetNillableRefresh ¶
func (uuo *UserUpdateOne) SetNillableRefresh(s *string) *UserUpdateOne
SetNillableRefresh sets the "refresh" field if the given value is not nil.
func (*UserUpdateOne) SetNillableTermsAgreement ¶
func (uuo *UserUpdateOne) SetNillableTermsAgreement(b *bool) *UserUpdateOne
SetNillableTermsAgreement sets the "terms_agreement" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUsername ¶
func (uuo *UserUpdateOne) SetNillableUsername(s *string) *UserUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdateOne) SetOtp ¶
func (uuo *UserUpdateOne) SetOtp(o *Otp) *UserUpdateOne
SetOtp sets the "otp" edge to the Otp entity.
func (*UserUpdateOne) SetOtpID ¶
func (uuo *UserUpdateOne) SetOtpID(id uuid.UUID) *UserUpdateOne
SetOtpID sets the "otp" edge to the Otp entity by ID.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetRefresh ¶
func (uuo *UserUpdateOne) SetRefresh(s string) *UserUpdateOne
SetRefresh sets the "refresh" field.
func (*UserUpdateOne) SetTermsAgreement ¶
func (uuo *UserUpdateOne) SetTermsAgreement(b bool) *UserUpdateOne
SetTermsAgreement sets the "terms_agreement" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- chat.go
- chat_create.go
- chat_delete.go
- chat_query.go
- chat_update.go
- city.go
- city_create.go
- city_delete.go
- city_query.go
- city_update.go
- client.go
- comment.go
- comment_create.go
- comment_delete.go
- comment_query.go
- comment_update.go
- country.go
- country_create.go
- country_delete.go
- country_query.go
- country_update.go
- ent.go
- file.go
- file_create.go
- file_delete.go
- file_query.go
- file_update.go
- friend.go
- friend_create.go
- friend_delete.go
- friend_query.go
- friend_update.go
- generate.go
- message.go
- message_create.go
- message_delete.go
- message_query.go
- message_update.go
- mutation.go
- notification.go
- notification_create.go
- notification_delete.go
- notification_query.go
- notification_update.go
- otp.go
- otp_create.go
- otp_delete.go
- otp_query.go
- otp_update.go
- post.go
- post_create.go
- post_delete.go
- post_query.go
- post_update.go
- reaction.go
- reaction_create.go
- reaction_delete.go
- reaction_query.go
- reaction_update.go
- region.go
- region_create.go
- region_delete.go
- region_query.go
- region_update.go
- reply.go
- reply_create.go
- reply_delete.go
- reply_query.go
- reply_update.go
- runtime.go
- sitedetail.go
- sitedetail_create.go
- sitedetail_delete.go
- sitedetail_query.go
- sitedetail_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go