Documentation
¶
Index ¶
- Constants
- Variables
- func ApiKeyEdgeCleanup(ctx context.Context, id uuid.UUID) error
- func Asc(fields ...string) func(*sql.Selector)
- func CommentEdgeCleanup(ctx context.Context, id uuid.UUID) error
- 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
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- func PostCategoryEdgeCleanup(ctx context.Context, id uuid.UUID) error
- func PostEdgeCleanup(ctx context.Context, id uuid.UUID) error
- func RefreshTokenEdgeCleanup(ctx context.Context, id uuid.UUID) error
- func UserEdgeCleanup(ctx context.Context, id uuid.UUID) error
- type AggregateFunc
- type ApiKey
- func (*ApiKey) IsNode()
- func (ak *ApiKey) Node(ctx context.Context) (node *Node, err error)
- func (ak *ApiKey) Owner(ctx context.Context) (*User, error)
- func (ak *ApiKey) QueryOwner() *UserQuery
- func (ak *ApiKey) String() string
- func (ak *ApiKey) ToEdge(order *ApiKeyOrder) *ApiKeyEdge
- func (ak *ApiKey) Unwrap() *ApiKey
- func (ak *ApiKey) Update() *ApiKeyUpdateOne
- func (ak *ApiKey) Value(name string) (ent.Value, error)
- type ApiKeyClient
- func (c *ApiKeyClient) Create() *ApiKeyCreate
- func (c *ApiKeyClient) CreateBulk(builders ...*ApiKeyCreate) *ApiKeyCreateBulk
- func (c *ApiKeyClient) Delete() *ApiKeyDelete
- func (c *ApiKeyClient) DeleteOne(ak *ApiKey) *ApiKeyDeleteOne
- func (c *ApiKeyClient) DeleteOneID(id uuid.UUID) *ApiKeyDeleteOne
- func (c *ApiKeyClient) Get(ctx context.Context, id uuid.UUID) (*ApiKey, error)
- func (c *ApiKeyClient) GetX(ctx context.Context, id uuid.UUID) *ApiKey
- func (c *ApiKeyClient) Hooks() []Hook
- func (c *ApiKeyClient) Intercept(interceptors ...Interceptor)
- func (c *ApiKeyClient) Interceptors() []Interceptor
- func (c *ApiKeyClient) MapCreateBulk(slice any, setFunc func(*ApiKeyCreate, int)) *ApiKeyCreateBulk
- func (c *ApiKeyClient) Query() *ApiKeyQuery
- func (c *ApiKeyClient) QueryOwner(ak *ApiKey) *UserQuery
- func (c *ApiKeyClient) Update() *ApiKeyUpdate
- func (c *ApiKeyClient) UpdateOne(ak *ApiKey) *ApiKeyUpdateOne
- func (c *ApiKeyClient) UpdateOneID(id uuid.UUID) *ApiKeyUpdateOne
- func (c *ApiKeyClient) Use(hooks ...Hook)
- type ApiKeyConnection
- type ApiKeyCreate
- func (akc *ApiKeyCreate) Exec(ctx context.Context) error
- func (akc *ApiKeyCreate) ExecX(ctx context.Context)
- func (akc *ApiKeyCreate) Mutation() *ApiKeyMutation
- func (akc *ApiKeyCreate) Save(ctx context.Context) (*ApiKey, error)
- func (akc *ApiKeyCreate) SaveX(ctx context.Context) *ApiKey
- func (akc *ApiKeyCreate) SetAPIKey(s string) *ApiKeyCreate
- func (akc *ApiKeyCreate) SetCreatedAt(t time.Time) *ApiKeyCreate
- func (akc *ApiKeyCreate) SetExpiresOn(t time.Time) *ApiKeyCreate
- func (akc *ApiKeyCreate) SetID(u uuid.UUID) *ApiKeyCreate
- func (c *ApiKeyCreate) SetInput(i CreateApiKeyInput) *ApiKeyCreate
- func (akc *ApiKeyCreate) SetNillableCreatedAt(t *time.Time) *ApiKeyCreate
- func (akc *ApiKeyCreate) SetNillableID(u *uuid.UUID) *ApiKeyCreate
- func (akc *ApiKeyCreate) SetNillableUpdatedAt(t *time.Time) *ApiKeyCreate
- func (akc *ApiKeyCreate) SetOwner(u *User) *ApiKeyCreate
- func (akc *ApiKeyCreate) SetOwnerID(u uuid.UUID) *ApiKeyCreate
- func (akc *ApiKeyCreate) SetUpdatedAt(t time.Time) *ApiKeyCreate
- type ApiKeyCreateBulk
- type ApiKeyDelete
- type ApiKeyDeleteOne
- type ApiKeyEdge
- type ApiKeyEdges
- type ApiKeyFilter
- func (f *ApiKeyFilter) Where(p entql.P)
- func (f *ApiKeyFilter) WhereAPIKey(p entql.StringP)
- func (f *ApiKeyFilter) WhereCreatedAt(p entql.TimeP)
- func (f *ApiKeyFilter) WhereExpiresOn(p entql.TimeP)
- func (f *ApiKeyFilter) WhereHasOwner()
- func (f *ApiKeyFilter) WhereHasOwnerWith(preds ...predicate.User)
- func (f *ApiKeyFilter) WhereID(p entql.ValueP)
- func (f *ApiKeyFilter) WhereOwnerID(p entql.ValueP)
- func (f *ApiKeyFilter) WhereUpdatedAt(p entql.TimeP)
- type ApiKeyGroupBy
- func (akgb *ApiKeyGroupBy) Aggregate(fns ...AggregateFunc) *ApiKeyGroupBy
- func (s *ApiKeyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ApiKeyGroupBy) BoolX(ctx context.Context) bool
- func (s *ApiKeyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ApiKeyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ApiKeyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ApiKeyGroupBy) Float64X(ctx context.Context) float64
- func (s *ApiKeyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ApiKeyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ApiKeyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ApiKeyGroupBy) IntX(ctx context.Context) int
- func (s *ApiKeyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ApiKeyGroupBy) IntsX(ctx context.Context) []int
- func (akgb *ApiKeyGroupBy) Scan(ctx context.Context, v any) error
- func (s *ApiKeyGroupBy) ScanX(ctx context.Context, v any)
- func (s *ApiKeyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ApiKeyGroupBy) StringX(ctx context.Context) string
- func (s *ApiKeyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ApiKeyGroupBy) StringsX(ctx context.Context) []string
- type ApiKeyMutation
- func (m *ApiKeyMutation) APIKey() (r string, exists bool)
- func (m *ApiKeyMutation) AddField(name string, value ent.Value) error
- func (m *ApiKeyMutation) AddedEdges() []string
- func (m *ApiKeyMutation) AddedField(name string) (ent.Value, bool)
- func (m *ApiKeyMutation) AddedFields() []string
- func (m *ApiKeyMutation) AddedIDs(name string) []ent.Value
- func (m *ApiKeyMutation) ClearEdge(name string) error
- func (m *ApiKeyMutation) ClearField(name string) error
- func (m *ApiKeyMutation) ClearOwner()
- func (m *ApiKeyMutation) ClearedEdges() []string
- func (m *ApiKeyMutation) ClearedFields() []string
- func (m ApiKeyMutation) Client() *Client
- func (m *ApiKeyMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ApiKeyMutation) EdgeCleared(name string) bool
- func (m *ApiKeyMutation) ExpiresOn() (r time.Time, exists bool)
- func (m *ApiKeyMutation) Field(name string) (ent.Value, bool)
- func (m *ApiKeyMutation) FieldCleared(name string) bool
- func (m *ApiKeyMutation) Fields() []string
- func (m *ApiKeyMutation) Filter() *ApiKeyFilter
- func (m *ApiKeyMutation) ID() (id uuid.UUID, exists bool)
- func (m *ApiKeyMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ApiKeyMutation) OldAPIKey(ctx context.Context) (v string, err error)
- func (m *ApiKeyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ApiKeyMutation) OldExpiresOn(ctx context.Context) (v time.Time, err error)
- func (m *ApiKeyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ApiKeyMutation) OldOwnerID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ApiKeyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ApiKeyMutation) Op() Op
- func (m *ApiKeyMutation) OwnerCleared() bool
- func (m *ApiKeyMutation) OwnerID() (r uuid.UUID, exists bool)
- func (m *ApiKeyMutation) OwnerIDs() (ids []uuid.UUID)
- func (m *ApiKeyMutation) RemovedEdges() []string
- func (m *ApiKeyMutation) RemovedIDs(name string) []ent.Value
- func (m *ApiKeyMutation) ResetAPIKey()
- func (m *ApiKeyMutation) ResetCreatedAt()
- func (m *ApiKeyMutation) ResetEdge(name string) error
- func (m *ApiKeyMutation) ResetExpiresOn()
- func (m *ApiKeyMutation) ResetField(name string) error
- func (m *ApiKeyMutation) ResetOwner()
- func (m *ApiKeyMutation) ResetOwnerID()
- func (m *ApiKeyMutation) ResetUpdatedAt()
- func (m *ApiKeyMutation) SetAPIKey(s string)
- func (m *ApiKeyMutation) SetCreatedAt(t time.Time)
- func (m *ApiKeyMutation) SetExpiresOn(t time.Time)
- func (m *ApiKeyMutation) SetField(name string, value ent.Value) error
- func (m *ApiKeyMutation) SetID(id uuid.UUID)
- func (m *ApiKeyMutation) SetOp(op Op)
- func (m *ApiKeyMutation) SetOwnerID(u uuid.UUID)
- func (m *ApiKeyMutation) SetUpdatedAt(t time.Time)
- func (m ApiKeyMutation) Tx() (*Tx, error)
- func (m *ApiKeyMutation) Type() string
- func (m *ApiKeyMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ApiKeyMutation) Where(ps ...predicate.ApiKey)
- func (m *ApiKeyMutation) WhereP(ps ...func(*sql.Selector))
- type ApiKeyOrder
- type ApiKeyOrderField
- type ApiKeyPaginateOption
- type ApiKeyQuery
- func (akq *ApiKeyQuery) Aggregate(fns ...AggregateFunc) *ApiKeySelect
- func (akq *ApiKeyQuery) All(ctx context.Context) ([]*ApiKey, error)
- func (akq *ApiKeyQuery) AllX(ctx context.Context) []*ApiKey
- func (akq *ApiKeyQuery) Clone() *ApiKeyQuery
- func (ak *ApiKeyQuery) CollectFields(ctx context.Context, satisfies ...string) (*ApiKeyQuery, error)
- func (akq *ApiKeyQuery) Count(ctx context.Context) (int, error)
- func (akq *ApiKeyQuery) CountX(ctx context.Context) int
- func (akq *ApiKeyQuery) Exist(ctx context.Context) (bool, error)
- func (akq *ApiKeyQuery) ExistX(ctx context.Context) bool
- func (akq *ApiKeyQuery) Filter() *ApiKeyFilter
- func (akq *ApiKeyQuery) First(ctx context.Context) (*ApiKey, error)
- func (akq *ApiKeyQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (akq *ApiKeyQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (akq *ApiKeyQuery) FirstX(ctx context.Context) *ApiKey
- func (akq *ApiKeyQuery) ForShare(opts ...sql.LockOption) *ApiKeyQuery
- func (akq *ApiKeyQuery) ForUpdate(opts ...sql.LockOption) *ApiKeyQuery
- func (akq *ApiKeyQuery) GroupBy(field string, fields ...string) *ApiKeyGroupBy
- func (akq *ApiKeyQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (akq *ApiKeyQuery) IDsX(ctx context.Context) []uuid.UUID
- func (akq *ApiKeyQuery) Limit(limit int) *ApiKeyQuery
- func (akq *ApiKeyQuery) Modify(modifiers ...func(s *sql.Selector)) *ApiKeySelect
- func (akq *ApiKeyQuery) Offset(offset int) *ApiKeyQuery
- func (akq *ApiKeyQuery) Only(ctx context.Context) (*ApiKey, error)
- func (akq *ApiKeyQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (akq *ApiKeyQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (akq *ApiKeyQuery) OnlyX(ctx context.Context) *ApiKey
- func (akq *ApiKeyQuery) Order(o ...apikey.OrderOption) *ApiKeyQuery
- func (ak *ApiKeyQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*ApiKeyConnection, error)
- func (akq *ApiKeyQuery) QueryOwner() *UserQuery
- func (akq *ApiKeyQuery) Select(fields ...string) *ApiKeySelect
- func (akq *ApiKeyQuery) Unique(unique bool) *ApiKeyQuery
- func (akq *ApiKeyQuery) Where(ps ...predicate.ApiKey) *ApiKeyQuery
- func (akq *ApiKeyQuery) WithOwner(opts ...func(*UserQuery)) *ApiKeyQuery
- type ApiKeySelect
- func (aks *ApiKeySelect) Aggregate(fns ...AggregateFunc) *ApiKeySelect
- func (s *ApiKeySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ApiKeySelect) BoolX(ctx context.Context) bool
- func (s *ApiKeySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ApiKeySelect) BoolsX(ctx context.Context) []bool
- func (s *ApiKeySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ApiKeySelect) Float64X(ctx context.Context) float64
- func (s *ApiKeySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ApiKeySelect) Float64sX(ctx context.Context) []float64
- func (s *ApiKeySelect) Int(ctx context.Context) (_ int, err error)
- func (s *ApiKeySelect) IntX(ctx context.Context) int
- func (s *ApiKeySelect) Ints(ctx context.Context) ([]int, error)
- func (s *ApiKeySelect) IntsX(ctx context.Context) []int
- func (aks *ApiKeySelect) Modify(modifiers ...func(s *sql.Selector)) *ApiKeySelect
- func (aks *ApiKeySelect) Scan(ctx context.Context, v any) error
- func (s *ApiKeySelect) ScanX(ctx context.Context, v any)
- func (s *ApiKeySelect) String(ctx context.Context) (_ string, err error)
- func (s *ApiKeySelect) StringX(ctx context.Context) string
- func (s *ApiKeySelect) Strings(ctx context.Context) ([]string, error)
- func (s *ApiKeySelect) StringsX(ctx context.Context) []string
- type ApiKeyUpdate
- func (aku *ApiKeyUpdate) ClearOwner() *ApiKeyUpdate
- func (aku *ApiKeyUpdate) Exec(ctx context.Context) error
- func (aku *ApiKeyUpdate) ExecX(ctx context.Context)
- func (aku *ApiKeyUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ApiKeyUpdate
- func (aku *ApiKeyUpdate) Mutation() *ApiKeyMutation
- func (aku *ApiKeyUpdate) Save(ctx context.Context) (int, error)
- func (aku *ApiKeyUpdate) SaveX(ctx context.Context) int
- func (aku *ApiKeyUpdate) SetAPIKey(s string) *ApiKeyUpdate
- func (aku *ApiKeyUpdate) SetExpiresOn(t time.Time) *ApiKeyUpdate
- func (c *ApiKeyUpdate) SetInput(i UpdateApiKeyInput) *ApiKeyUpdate
- func (aku *ApiKeyUpdate) SetNillableAPIKey(s *string) *ApiKeyUpdate
- func (aku *ApiKeyUpdate) SetNillableExpiresOn(t *time.Time) *ApiKeyUpdate
- func (aku *ApiKeyUpdate) SetNillableOwnerID(u *uuid.UUID) *ApiKeyUpdate
- func (aku *ApiKeyUpdate) SetOwner(u *User) *ApiKeyUpdate
- func (aku *ApiKeyUpdate) SetOwnerID(u uuid.UUID) *ApiKeyUpdate
- func (aku *ApiKeyUpdate) SetUpdatedAt(t time.Time) *ApiKeyUpdate
- func (aku *ApiKeyUpdate) Where(ps ...predicate.ApiKey) *ApiKeyUpdate
- type ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) ClearOwner() *ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) Exec(ctx context.Context) error
- func (akuo *ApiKeyUpdateOne) ExecX(ctx context.Context)
- func (akuo *ApiKeyUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) Mutation() *ApiKeyMutation
- func (akuo *ApiKeyUpdateOne) Save(ctx context.Context) (*ApiKey, error)
- func (akuo *ApiKeyUpdateOne) SaveX(ctx context.Context) *ApiKey
- func (akuo *ApiKeyUpdateOne) Select(field string, fields ...string) *ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) SetAPIKey(s string) *ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) SetExpiresOn(t time.Time) *ApiKeyUpdateOne
- func (c *ApiKeyUpdateOne) SetInput(i UpdateApiKeyInput) *ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) SetNillableAPIKey(s *string) *ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) SetNillableExpiresOn(t *time.Time) *ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) SetNillableOwnerID(u *uuid.UUID) *ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) SetOwner(u *User) *ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) SetOwnerID(u uuid.UUID) *ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) SetUpdatedAt(t time.Time) *ApiKeyUpdateOne
- func (akuo *ApiKeyUpdateOne) Where(ps ...predicate.ApiKey) *ApiKeyUpdateOne
- type ApiKeyWhereInput
- type ApiKeys
- 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) Node(ctx context.Context, id uuid.UUID) (*Node, error)
- func (c *Client) Noder(ctx context.Context, id uuid.UUID, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []uuid.UUID, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type Comment
- func (*Comment) IsNode()
- func (c *Comment) Node(ctx context.Context) (node *Node, err error)
- func (c *Comment) Owner(ctx context.Context) (*User, error)
- func (c *Comment) Post(ctx context.Context) (*Post, error)
- func (c *Comment) QueryOwner() *UserQuery
- func (c *Comment) QueryPost() *PostQuery
- func (c *Comment) String() string
- func (c *Comment) ToEdge(order *CommentOrder) *CommentEdge
- 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) QueryOwner(co *Comment) *UserQuery
- func (c *CommentClient) QueryPost(co *Comment) *PostQuery
- 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 CommentConnection
- type 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) SetContent(s string) *CommentCreate
- func (cc *CommentCreate) SetCreatedAt(t time.Time) *CommentCreate
- func (cc *CommentCreate) SetDeletedAt(t time.Time) *CommentCreate
- func (cc *CommentCreate) SetDeletedBy(s string) *CommentCreate
- func (cc *CommentCreate) SetID(u uuid.UUID) *CommentCreate
- func (c *CommentCreate) SetInput(i CreateCommentInput) *CommentCreate
- func (cc *CommentCreate) SetNillableCreatedAt(t *time.Time) *CommentCreate
- func (cc *CommentCreate) SetNillableDeletedAt(t *time.Time) *CommentCreate
- func (cc *CommentCreate) SetNillableDeletedBy(s *string) *CommentCreate
- func (cc *CommentCreate) SetNillableID(u *uuid.UUID) *CommentCreate
- func (cc *CommentCreate) SetNillablePostID(id *uuid.UUID) *CommentCreate
- func (cc *CommentCreate) SetNillableUpdatedAt(t *time.Time) *CommentCreate
- func (cc *CommentCreate) SetOwner(u *User) *CommentCreate
- func (cc *CommentCreate) SetOwnerID(u uuid.UUID) *CommentCreate
- func (cc *CommentCreate) SetPost(p *Post) *CommentCreate
- func (cc *CommentCreate) SetPostID(id uuid.UUID) *CommentCreate
- func (cc *CommentCreate) SetUpdatedAt(t time.Time) *CommentCreate
- type CommentCreateBulk
- type CommentDelete
- type CommentDeleteOne
- type CommentEdge
- type CommentEdges
- type CommentFilter
- func (f *CommentFilter) Where(p entql.P)
- func (f *CommentFilter) WhereContent(p entql.StringP)
- func (f *CommentFilter) WhereCreatedAt(p entql.TimeP)
- func (f *CommentFilter) WhereDeletedAt(p entql.TimeP)
- func (f *CommentFilter) WhereDeletedBy(p entql.StringP)
- func (f *CommentFilter) WhereHasOwner()
- func (f *CommentFilter) WhereHasOwnerWith(preds ...predicate.User)
- func (f *CommentFilter) WhereHasPost()
- func (f *CommentFilter) WhereHasPostWith(preds ...predicate.Post)
- func (f *CommentFilter) WhereID(p entql.ValueP)
- func (f *CommentFilter) WhereOwnerID(p entql.ValueP)
- func (f *CommentFilter) WhereUpdatedAt(p entql.TimeP)
- 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) 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) ClearDeletedAt()
- func (m *CommentMutation) ClearDeletedBy()
- func (m *CommentMutation) ClearEdge(name string) error
- func (m *CommentMutation) ClearField(name string) error
- func (m *CommentMutation) ClearOwner()
- func (m *CommentMutation) ClearPost()
- func (m *CommentMutation) ClearedEdges() []string
- func (m *CommentMutation) ClearedFields() []string
- func (m CommentMutation) Client() *Client
- func (m *CommentMutation) Content() (r string, exists bool)
- func (m *CommentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CommentMutation) DeletedAt() (r time.Time, exists bool)
- func (m *CommentMutation) DeletedAtCleared() bool
- func (m *CommentMutation) DeletedBy() (r string, exists bool)
- func (m *CommentMutation) DeletedByCleared() 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) Filter() *CommentFilter
- func (m *CommentMutation) ID() (id uuid.UUID, exists bool)
- func (m *CommentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CommentMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CommentMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *CommentMutation) OldDeletedBy(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CommentMutation) OldOwnerID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CommentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CommentMutation) Op() Op
- func (m *CommentMutation) OwnerCleared() bool
- func (m *CommentMutation) OwnerID() (r uuid.UUID, exists bool)
- func (m *CommentMutation) OwnerIDs() (ids []uuid.UUID)
- func (m *CommentMutation) PostCleared() bool
- func (m *CommentMutation) PostID() (id uuid.UUID, exists bool)
- func (m *CommentMutation) PostIDs() (ids []uuid.UUID)
- func (m *CommentMutation) RemovedEdges() []string
- func (m *CommentMutation) RemovedIDs(name string) []ent.Value
- func (m *CommentMutation) ResetContent()
- func (m *CommentMutation) ResetCreatedAt()
- func (m *CommentMutation) ResetDeletedAt()
- func (m *CommentMutation) ResetDeletedBy()
- func (m *CommentMutation) ResetEdge(name string) error
- func (m *CommentMutation) ResetField(name string) error
- func (m *CommentMutation) ResetOwner()
- func (m *CommentMutation) ResetOwnerID()
- func (m *CommentMutation) ResetPost()
- func (m *CommentMutation) ResetUpdatedAt()
- func (m *CommentMutation) SetContent(s string)
- func (m *CommentMutation) SetCreatedAt(t time.Time)
- func (m *CommentMutation) SetDeletedAt(t time.Time)
- func (m *CommentMutation) SetDeletedBy(s string)
- 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) SetOwnerID(u uuid.UUID)
- func (m *CommentMutation) SetPostID(id uuid.UUID)
- func (m *CommentMutation) SetUpdatedAt(t time.Time)
- 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 CommentOrder
- type CommentOrderField
- type CommentPaginateOption
- 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 (c *CommentQuery) CollectFields(ctx context.Context, satisfies ...string) (*CommentQuery, error)
- 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) Filter() *CommentFilter
- 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) ForShare(opts ...sql.LockOption) *CommentQuery
- func (cq *CommentQuery) ForUpdate(opts ...sql.LockOption) *CommentQuery
- 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) Modify(modifiers ...func(s *sql.Selector)) *CommentSelect
- 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 (c *CommentQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*CommentConnection, error)
- func (cq *CommentQuery) QueryOwner() *UserQuery
- func (cq *CommentQuery) QueryPost() *PostQuery
- 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) WithOwner(opts ...func(*UserQuery)) *CommentQuery
- func (cq *CommentQuery) WithPost(opts ...func(*PostQuery)) *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) Modify(modifiers ...func(s *sql.Selector)) *CommentSelect
- 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) ClearDeletedAt() *CommentUpdate
- func (cu *CommentUpdate) ClearDeletedBy() *CommentUpdate
- func (cu *CommentUpdate) ClearOwner() *CommentUpdate
- func (cu *CommentUpdate) ClearPost() *CommentUpdate
- func (cu *CommentUpdate) Exec(ctx context.Context) error
- func (cu *CommentUpdate) ExecX(ctx context.Context)
- func (cu *CommentUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CommentUpdate
- func (cu *CommentUpdate) Mutation() *CommentMutation
- func (cu *CommentUpdate) Save(ctx context.Context) (int, error)
- func (cu *CommentUpdate) SaveX(ctx context.Context) int
- func (cu *CommentUpdate) SetContent(s string) *CommentUpdate
- func (cu *CommentUpdate) SetDeletedAt(t time.Time) *CommentUpdate
- func (cu *CommentUpdate) SetDeletedBy(s string) *CommentUpdate
- func (c *CommentUpdate) SetInput(i UpdateCommentInput) *CommentUpdate
- func (cu *CommentUpdate) SetNillableContent(s *string) *CommentUpdate
- func (cu *CommentUpdate) SetNillableDeletedAt(t *time.Time) *CommentUpdate
- func (cu *CommentUpdate) SetNillableDeletedBy(s *string) *CommentUpdate
- func (cu *CommentUpdate) SetNillableOwnerID(u *uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) SetNillablePostID(id *uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) SetOwner(u *User) *CommentUpdate
- func (cu *CommentUpdate) SetOwnerID(u uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) SetPost(p *Post) *CommentUpdate
- func (cu *CommentUpdate) SetPostID(id uuid.UUID) *CommentUpdate
- func (cu *CommentUpdate) SetUpdatedAt(t time.Time) *CommentUpdate
- func (cu *CommentUpdate) Where(ps ...predicate.Comment) *CommentUpdate
- type CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearDeletedAt() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearDeletedBy() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearOwner() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearPost() *CommentUpdateOne
- func (cuo *CommentUpdateOne) Exec(ctx context.Context) error
- func (cuo *CommentUpdateOne) ExecX(ctx context.Context)
- func (cuo *CommentUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CommentUpdateOne
- func (cuo *CommentUpdateOne) Mutation() *CommentMutation
- 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) SetContent(s string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetDeletedAt(t time.Time) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetDeletedBy(s string) *CommentUpdateOne
- func (c *CommentUpdateOne) SetInput(i UpdateCommentInput) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableContent(s *string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableDeletedAt(t *time.Time) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableDeletedBy(s *string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableOwnerID(u *uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillablePostID(id *uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetOwner(u *User) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetOwnerID(u uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetPost(p *Post) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetPostID(id uuid.UUID) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetUpdatedAt(t time.Time) *CommentUpdateOne
- func (cuo *CommentUpdateOne) Where(ps ...predicate.Comment) *CommentUpdateOne
- type CommentWhereInput
- type Comments
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type CreateApiKeyInput
- type CreateCommentInput
- type CreatePostCategoryInput
- type CreatePostInput
- type CreateRefreshTokenInput
- type CreateUserInput
- type Cursor
- type Edge
- type Field
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type Node
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Policy
- type Post
- func (po *Post) Categories(ctx context.Context) (result []*PostCategory, err error)
- func (po *Post) Comments(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*CommentConnection, error)
- func (*Post) IsNode()
- func (po *Post) LikedBy(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*UserConnection, error)
- func (po *Post) NamedCategories(name string) ([]*PostCategory, error)
- func (po *Post) NamedComments(name string) ([]*Comment, error)
- func (po *Post) NamedLikedBy(name string) ([]*User, error)
- func (po *Post) NamedSavedBy(name string) ([]*User, error)
- func (po *Post) Node(ctx context.Context) (node *Node, err error)
- func (po *Post) Owner(ctx context.Context) (*User, error)
- func (po *Post) QueryCategories() *PostCategoryQuery
- func (po *Post) QueryComments() *CommentQuery
- func (po *Post) QueryLikedBy() *UserQuery
- func (po *Post) QueryOwner() *UserQuery
- func (po *Post) QuerySavedBy() *UserQuery
- func (po *Post) SavedBy(ctx context.Context) (result []*User, err error)
- func (po *Post) String() string
- func (po *Post) ToEdge(order *PostOrder) *PostEdge
- func (po *Post) Unwrap() *Post
- func (po *Post) Update() *PostUpdateOne
- func (po *Post) Value(name string) (ent.Value, error)
- type PostCategories
- type PostCategory
- func (*PostCategory) IsNode()
- func (pc *PostCategory) Node(ctx context.Context) (node *Node, err error)
- func (pc *PostCategory) Post(ctx context.Context) (*Post, error)
- func (pc *PostCategory) QueryPost() *PostQuery
- func (pc *PostCategory) String() string
- func (pc *PostCategory) ToEdge(order *PostCategoryOrder) *PostCategoryEdge
- func (pc *PostCategory) Unwrap() *PostCategory
- func (pc *PostCategory) Update() *PostCategoryUpdateOne
- func (pc *PostCategory) Value(name string) (ent.Value, error)
- type PostCategoryClient
- func (c *PostCategoryClient) Create() *PostCategoryCreate
- func (c *PostCategoryClient) CreateBulk(builders ...*PostCategoryCreate) *PostCategoryCreateBulk
- func (c *PostCategoryClient) Delete() *PostCategoryDelete
- func (c *PostCategoryClient) DeleteOne(pc *PostCategory) *PostCategoryDeleteOne
- func (c *PostCategoryClient) DeleteOneID(id uuid.UUID) *PostCategoryDeleteOne
- func (c *PostCategoryClient) Get(ctx context.Context, id uuid.UUID) (*PostCategory, error)
- func (c *PostCategoryClient) GetX(ctx context.Context, id uuid.UUID) *PostCategory
- func (c *PostCategoryClient) Hooks() []Hook
- func (c *PostCategoryClient) Intercept(interceptors ...Interceptor)
- func (c *PostCategoryClient) Interceptors() []Interceptor
- func (c *PostCategoryClient) MapCreateBulk(slice any, setFunc func(*PostCategoryCreate, int)) *PostCategoryCreateBulk
- func (c *PostCategoryClient) Query() *PostCategoryQuery
- func (c *PostCategoryClient) QueryPost(pc *PostCategory) *PostQuery
- func (c *PostCategoryClient) Update() *PostCategoryUpdate
- func (c *PostCategoryClient) UpdateOne(pc *PostCategory) *PostCategoryUpdateOne
- func (c *PostCategoryClient) UpdateOneID(id uuid.UUID) *PostCategoryUpdateOne
- func (c *PostCategoryClient) Use(hooks ...Hook)
- type PostCategoryConnection
- type PostCategoryCreate
- func (pcc *PostCategoryCreate) Exec(ctx context.Context) error
- func (pcc *PostCategoryCreate) ExecX(ctx context.Context)
- func (pcc *PostCategoryCreate) Mutation() *PostCategoryMutation
- func (pcc *PostCategoryCreate) Save(ctx context.Context) (*PostCategory, error)
- func (pcc *PostCategoryCreate) SaveX(ctx context.Context) *PostCategory
- func (pcc *PostCategoryCreate) SetCategory(po postcategory.Category) *PostCategoryCreate
- func (pcc *PostCategoryCreate) SetCreatedAt(t time.Time) *PostCategoryCreate
- func (pcc *PostCategoryCreate) SetID(u uuid.UUID) *PostCategoryCreate
- func (c *PostCategoryCreate) SetInput(i CreatePostCategoryInput) *PostCategoryCreate
- func (pcc *PostCategoryCreate) SetNillableCreatedAt(t *time.Time) *PostCategoryCreate
- func (pcc *PostCategoryCreate) SetNillableID(u *uuid.UUID) *PostCategoryCreate
- func (pcc *PostCategoryCreate) SetNillablePostID(id *uuid.UUID) *PostCategoryCreate
- func (pcc *PostCategoryCreate) SetNillableUpdatedAt(t *time.Time) *PostCategoryCreate
- func (pcc *PostCategoryCreate) SetPost(p *Post) *PostCategoryCreate
- func (pcc *PostCategoryCreate) SetPostID(id uuid.UUID) *PostCategoryCreate
- func (pcc *PostCategoryCreate) SetUpdatedAt(t time.Time) *PostCategoryCreate
- type PostCategoryCreateBulk
- type PostCategoryDelete
- type PostCategoryDeleteOne
- type PostCategoryEdge
- type PostCategoryEdges
- type PostCategoryFilter
- func (f *PostCategoryFilter) Where(p entql.P)
- func (f *PostCategoryFilter) WhereCategory(p entql.StringP)
- func (f *PostCategoryFilter) WhereCreatedAt(p entql.TimeP)
- func (f *PostCategoryFilter) WhereHasPost()
- func (f *PostCategoryFilter) WhereHasPostWith(preds ...predicate.Post)
- func (f *PostCategoryFilter) WhereID(p entql.ValueP)
- func (f *PostCategoryFilter) WhereUpdatedAt(p entql.TimeP)
- type PostCategoryGroupBy
- func (pcgb *PostCategoryGroupBy) Aggregate(fns ...AggregateFunc) *PostCategoryGroupBy
- func (s *PostCategoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PostCategoryGroupBy) BoolX(ctx context.Context) bool
- func (s *PostCategoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PostCategoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PostCategoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PostCategoryGroupBy) Float64X(ctx context.Context) float64
- func (s *PostCategoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PostCategoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PostCategoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PostCategoryGroupBy) IntX(ctx context.Context) int
- func (s *PostCategoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PostCategoryGroupBy) IntsX(ctx context.Context) []int
- func (pcgb *PostCategoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *PostCategoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *PostCategoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PostCategoryGroupBy) StringX(ctx context.Context) string
- func (s *PostCategoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PostCategoryGroupBy) StringsX(ctx context.Context) []string
- type PostCategoryMutation
- func (m *PostCategoryMutation) AddField(name string, value ent.Value) error
- func (m *PostCategoryMutation) AddedEdges() []string
- func (m *PostCategoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *PostCategoryMutation) AddedFields() []string
- func (m *PostCategoryMutation) AddedIDs(name string) []ent.Value
- func (m *PostCategoryMutation) Category() (r postcategory.Category, exists bool)
- func (m *PostCategoryMutation) ClearEdge(name string) error
- func (m *PostCategoryMutation) ClearField(name string) error
- func (m *PostCategoryMutation) ClearPost()
- func (m *PostCategoryMutation) ClearedEdges() []string
- func (m *PostCategoryMutation) ClearedFields() []string
- func (m PostCategoryMutation) Client() *Client
- func (m *PostCategoryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PostCategoryMutation) EdgeCleared(name string) bool
- func (m *PostCategoryMutation) Field(name string) (ent.Value, bool)
- func (m *PostCategoryMutation) FieldCleared(name string) bool
- func (m *PostCategoryMutation) Fields() []string
- func (m *PostCategoryMutation) Filter() *PostCategoryFilter
- func (m *PostCategoryMutation) ID() (id uuid.UUID, exists bool)
- func (m *PostCategoryMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *PostCategoryMutation) OldCategory(ctx context.Context) (v postcategory.Category, err error)
- func (m *PostCategoryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PostCategoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PostCategoryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PostCategoryMutation) Op() Op
- func (m *PostCategoryMutation) PostCleared() bool
- func (m *PostCategoryMutation) PostID() (id uuid.UUID, exists bool)
- func (m *PostCategoryMutation) PostIDs() (ids []uuid.UUID)
- func (m *PostCategoryMutation) RemovedEdges() []string
- func (m *PostCategoryMutation) RemovedIDs(name string) []ent.Value
- func (m *PostCategoryMutation) ResetCategory()
- func (m *PostCategoryMutation) ResetCreatedAt()
- func (m *PostCategoryMutation) ResetEdge(name string) error
- func (m *PostCategoryMutation) ResetField(name string) error
- func (m *PostCategoryMutation) ResetPost()
- func (m *PostCategoryMutation) ResetUpdatedAt()
- func (m *PostCategoryMutation) SetCategory(po postcategory.Category)
- func (m *PostCategoryMutation) SetCreatedAt(t time.Time)
- func (m *PostCategoryMutation) SetField(name string, value ent.Value) error
- func (m *PostCategoryMutation) SetID(id uuid.UUID)
- func (m *PostCategoryMutation) SetOp(op Op)
- func (m *PostCategoryMutation) SetPostID(id uuid.UUID)
- func (m *PostCategoryMutation) SetUpdatedAt(t time.Time)
- func (m PostCategoryMutation) Tx() (*Tx, error)
- func (m *PostCategoryMutation) Type() string
- func (m *PostCategoryMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PostCategoryMutation) Where(ps ...predicate.PostCategory)
- func (m *PostCategoryMutation) WhereP(ps ...func(*sql.Selector))
- type PostCategoryOrder
- type PostCategoryOrderField
- type PostCategoryPaginateOption
- type PostCategoryQuery
- func (pcq *PostCategoryQuery) Aggregate(fns ...AggregateFunc) *PostCategorySelect
- func (pcq *PostCategoryQuery) All(ctx context.Context) ([]*PostCategory, error)
- func (pcq *PostCategoryQuery) AllX(ctx context.Context) []*PostCategory
- func (pcq *PostCategoryQuery) Clone() *PostCategoryQuery
- func (pc *PostCategoryQuery) CollectFields(ctx context.Context, satisfies ...string) (*PostCategoryQuery, error)
- func (pcq *PostCategoryQuery) Count(ctx context.Context) (int, error)
- func (pcq *PostCategoryQuery) CountX(ctx context.Context) int
- func (pcq *PostCategoryQuery) Exist(ctx context.Context) (bool, error)
- func (pcq *PostCategoryQuery) ExistX(ctx context.Context) bool
- func (pcq *PostCategoryQuery) Filter() *PostCategoryFilter
- func (pcq *PostCategoryQuery) First(ctx context.Context) (*PostCategory, error)
- func (pcq *PostCategoryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pcq *PostCategoryQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (pcq *PostCategoryQuery) FirstX(ctx context.Context) *PostCategory
- func (pcq *PostCategoryQuery) ForShare(opts ...sql.LockOption) *PostCategoryQuery
- func (pcq *PostCategoryQuery) ForUpdate(opts ...sql.LockOption) *PostCategoryQuery
- func (pcq *PostCategoryQuery) GroupBy(field string, fields ...string) *PostCategoryGroupBy
- func (pcq *PostCategoryQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (pcq *PostCategoryQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pcq *PostCategoryQuery) Limit(limit int) *PostCategoryQuery
- func (pcq *PostCategoryQuery) Modify(modifiers ...func(s *sql.Selector)) *PostCategorySelect
- func (pcq *PostCategoryQuery) Offset(offset int) *PostCategoryQuery
- func (pcq *PostCategoryQuery) Only(ctx context.Context) (*PostCategory, error)
- func (pcq *PostCategoryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pcq *PostCategoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (pcq *PostCategoryQuery) OnlyX(ctx context.Context) *PostCategory
- func (pcq *PostCategoryQuery) Order(o ...postcategory.OrderOption) *PostCategoryQuery
- func (pc *PostCategoryQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*PostCategoryConnection, error)
- func (pcq *PostCategoryQuery) QueryPost() *PostQuery
- func (pcq *PostCategoryQuery) Select(fields ...string) *PostCategorySelect
- func (pcq *PostCategoryQuery) Unique(unique bool) *PostCategoryQuery
- func (pcq *PostCategoryQuery) Where(ps ...predicate.PostCategory) *PostCategoryQuery
- func (pcq *PostCategoryQuery) WithPost(opts ...func(*PostQuery)) *PostCategoryQuery
- type PostCategorySelect
- func (pcs *PostCategorySelect) Aggregate(fns ...AggregateFunc) *PostCategorySelect
- func (s *PostCategorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PostCategorySelect) BoolX(ctx context.Context) bool
- func (s *PostCategorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PostCategorySelect) BoolsX(ctx context.Context) []bool
- func (s *PostCategorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PostCategorySelect) Float64X(ctx context.Context) float64
- func (s *PostCategorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PostCategorySelect) Float64sX(ctx context.Context) []float64
- func (s *PostCategorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *PostCategorySelect) IntX(ctx context.Context) int
- func (s *PostCategorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *PostCategorySelect) IntsX(ctx context.Context) []int
- func (pcs *PostCategorySelect) Modify(modifiers ...func(s *sql.Selector)) *PostCategorySelect
- func (pcs *PostCategorySelect) Scan(ctx context.Context, v any) error
- func (s *PostCategorySelect) ScanX(ctx context.Context, v any)
- func (s *PostCategorySelect) String(ctx context.Context) (_ string, err error)
- func (s *PostCategorySelect) StringX(ctx context.Context) string
- func (s *PostCategorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *PostCategorySelect) StringsX(ctx context.Context) []string
- type PostCategoryUpdate
- func (pcu *PostCategoryUpdate) ClearPost() *PostCategoryUpdate
- func (pcu *PostCategoryUpdate) Exec(ctx context.Context) error
- func (pcu *PostCategoryUpdate) ExecX(ctx context.Context)
- func (pcu *PostCategoryUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostCategoryUpdate
- func (pcu *PostCategoryUpdate) Mutation() *PostCategoryMutation
- func (pcu *PostCategoryUpdate) Save(ctx context.Context) (int, error)
- func (pcu *PostCategoryUpdate) SaveX(ctx context.Context) int
- func (pcu *PostCategoryUpdate) SetCategory(po postcategory.Category) *PostCategoryUpdate
- func (c *PostCategoryUpdate) SetInput(i UpdatePostCategoryInput) *PostCategoryUpdate
- func (pcu *PostCategoryUpdate) SetNillableCategory(po *postcategory.Category) *PostCategoryUpdate
- func (pcu *PostCategoryUpdate) SetNillablePostID(id *uuid.UUID) *PostCategoryUpdate
- func (pcu *PostCategoryUpdate) SetPost(p *Post) *PostCategoryUpdate
- func (pcu *PostCategoryUpdate) SetPostID(id uuid.UUID) *PostCategoryUpdate
- func (pcu *PostCategoryUpdate) SetUpdatedAt(t time.Time) *PostCategoryUpdate
- func (pcu *PostCategoryUpdate) Where(ps ...predicate.PostCategory) *PostCategoryUpdate
- type PostCategoryUpdateOne
- func (pcuo *PostCategoryUpdateOne) ClearPost() *PostCategoryUpdateOne
- func (pcuo *PostCategoryUpdateOne) Exec(ctx context.Context) error
- func (pcuo *PostCategoryUpdateOne) ExecX(ctx context.Context)
- func (pcuo *PostCategoryUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostCategoryUpdateOne
- func (pcuo *PostCategoryUpdateOne) Mutation() *PostCategoryMutation
- func (pcuo *PostCategoryUpdateOne) Save(ctx context.Context) (*PostCategory, error)
- func (pcuo *PostCategoryUpdateOne) SaveX(ctx context.Context) *PostCategory
- func (pcuo *PostCategoryUpdateOne) Select(field string, fields ...string) *PostCategoryUpdateOne
- func (pcuo *PostCategoryUpdateOne) SetCategory(po postcategory.Category) *PostCategoryUpdateOne
- func (c *PostCategoryUpdateOne) SetInput(i UpdatePostCategoryInput) *PostCategoryUpdateOne
- func (pcuo *PostCategoryUpdateOne) SetNillableCategory(po *postcategory.Category) *PostCategoryUpdateOne
- func (pcuo *PostCategoryUpdateOne) SetNillablePostID(id *uuid.UUID) *PostCategoryUpdateOne
- func (pcuo *PostCategoryUpdateOne) SetPost(p *Post) *PostCategoryUpdateOne
- func (pcuo *PostCategoryUpdateOne) SetPostID(id uuid.UUID) *PostCategoryUpdateOne
- func (pcuo *PostCategoryUpdateOne) SetUpdatedAt(t time.Time) *PostCategoryUpdateOne
- func (pcuo *PostCategoryUpdateOne) Where(ps ...predicate.PostCategory) *PostCategoryUpdateOne
- type PostCategoryWhereInput
- 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) QueryCategories(po *Post) *PostCategoryQuery
- func (c *PostClient) QueryComments(po *Post) *CommentQuery
- func (c *PostClient) QueryLikedBy(po *Post) *UserQuery
- func (c *PostClient) QueryOwner(po *Post) *UserQuery
- func (c *PostClient) QuerySavedBy(po *Post) *UserQuery
- 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 PostConnection
- type PostCreate
- func (pc *PostCreate) AddCategories(p ...*PostCategory) *PostCreate
- func (pc *PostCreate) AddCategoryIDs(ids ...uuid.UUID) *PostCreate
- func (pc *PostCreate) AddCommentIDs(ids ...uuid.UUID) *PostCreate
- func (pc *PostCreate) AddComments(c ...*Comment) *PostCreate
- func (pc *PostCreate) AddLikedBy(u ...*User) *PostCreate
- func (pc *PostCreate) AddLikedByIDs(ids ...uuid.UUID) *PostCreate
- func (pc *PostCreate) AddSavedBy(u ...*User) *PostCreate
- func (pc *PostCreate) AddSavedByIDs(ids ...uuid.UUID) *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) SetContent(s string) *PostCreate
- func (pc *PostCreate) SetCreatedAt(t time.Time) *PostCreate
- func (pc *PostCreate) SetDeletedAt(t time.Time) *PostCreate
- func (pc *PostCreate) SetDeletedBy(s string) *PostCreate
- func (pc *PostCreate) SetEntityVector(s string) *PostCreate
- func (pc *PostCreate) SetID(u uuid.UUID) *PostCreate
- func (c *PostCreate) SetInput(i CreatePostInput) *PostCreate
- func (pc *PostCreate) SetIsModerated(b bool) *PostCreate
- func (pc *PostCreate) SetLink(s string) *PostCreate
- func (pc *PostCreate) SetMetadata(em extramodel.PostMetadata) *PostCreate
- func (pc *PostCreate) SetModeratedAt(t time.Time) *PostCreate
- func (pc *PostCreate) SetModerationComment(s string) *PostCreate
- func (pc *PostCreate) SetNillableContent(s *string) *PostCreate
- func (pc *PostCreate) SetNillableCreatedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetNillableDeletedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetNillableDeletedBy(s *string) *PostCreate
- func (pc *PostCreate) SetNillableEntityVector(s *string) *PostCreate
- func (pc *PostCreate) SetNillableID(u *uuid.UUID) *PostCreate
- func (pc *PostCreate) SetNillableIsModerated(b *bool) *PostCreate
- func (pc *PostCreate) SetNillableMetadata(em *extramodel.PostMetadata) *PostCreate
- func (pc *PostCreate) SetNillableModeratedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetNillableModerationComment(s *string) *PostCreate
- func (pc *PostCreate) SetNillablePinned(b *bool) *PostCreate
- func (pc *PostCreate) SetNillableUpdatedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetOwner(u *User) *PostCreate
- func (pc *PostCreate) SetOwnerID(u uuid.UUID) *PostCreate
- func (pc *PostCreate) SetPinned(b bool) *PostCreate
- func (pc *PostCreate) SetTitle(s string) *PostCreate
- func (pc *PostCreate) SetUpdatedAt(t time.Time) *PostCreate
- type PostCreateBulk
- type PostDelete
- type PostDeleteOne
- type PostEdge
- type PostEdges
- type PostFilter
- func (f *PostFilter) Where(p entql.P)
- func (f *PostFilter) WhereContent(p entql.StringP)
- func (f *PostFilter) WhereCreatedAt(p entql.TimeP)
- func (f *PostFilter) WhereDeletedAt(p entql.TimeP)
- func (f *PostFilter) WhereDeletedBy(p entql.StringP)
- func (f *PostFilter) WhereEntityVector(p entql.StringP)
- func (f *PostFilter) WhereHasCategories()
- func (f *PostFilter) WhereHasCategoriesWith(preds ...predicate.PostCategory)
- func (f *PostFilter) WhereHasComments()
- func (f *PostFilter) WhereHasCommentsWith(preds ...predicate.Comment)
- func (f *PostFilter) WhereHasLikedBy()
- func (f *PostFilter) WhereHasLikedByWith(preds ...predicate.User)
- func (f *PostFilter) WhereHasOwner()
- func (f *PostFilter) WhereHasOwnerWith(preds ...predicate.User)
- func (f *PostFilter) WhereHasSavedBy()
- func (f *PostFilter) WhereHasSavedByWith(preds ...predicate.User)
- func (f *PostFilter) WhereID(p entql.ValueP)
- func (f *PostFilter) WhereIsModerated(p entql.BoolP)
- func (f *PostFilter) WhereLink(p entql.StringP)
- func (f *PostFilter) WhereMetadata(p entql.BytesP)
- func (f *PostFilter) WhereModeratedAt(p entql.TimeP)
- func (f *PostFilter) WhereModerationComment(p entql.StringP)
- func (f *PostFilter) WhereOwnerID(p entql.ValueP)
- func (f *PostFilter) WherePinned(p entql.BoolP)
- func (f *PostFilter) WhereTitle(p entql.StringP)
- func (f *PostFilter) WhereUpdatedAt(p entql.TimeP)
- 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) AddCategoryIDs(ids ...uuid.UUID)
- func (m *PostMutation) AddCommentIDs(ids ...uuid.UUID)
- func (m *PostMutation) AddField(name string, value ent.Value) error
- func (m *PostMutation) AddLikedByIDs(ids ...uuid.UUID)
- func (m *PostMutation) AddSavedByIDs(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) CategoriesCleared() bool
- func (m *PostMutation) CategoriesIDs() (ids []uuid.UUID)
- func (m *PostMutation) ClearCategories()
- func (m *PostMutation) ClearComments()
- func (m *PostMutation) ClearContent()
- func (m *PostMutation) ClearDeletedAt()
- func (m *PostMutation) ClearDeletedBy()
- func (m *PostMutation) ClearEdge(name string) error
- func (m *PostMutation) ClearEntityVector()
- func (m *PostMutation) ClearField(name string) error
- func (m *PostMutation) ClearLikedBy()
- func (m *PostMutation) ClearMetadata()
- func (m *PostMutation) ClearModeratedAt()
- func (m *PostMutation) ClearModerationComment()
- func (m *PostMutation) ClearOwner()
- func (m *PostMutation) ClearSavedBy()
- 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) Content() (r string, exists bool)
- func (m *PostMutation) ContentCleared() bool
- func (m *PostMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PostMutation) DeletedAt() (r time.Time, exists bool)
- func (m *PostMutation) DeletedAtCleared() bool
- func (m *PostMutation) DeletedBy() (r string, exists bool)
- func (m *PostMutation) DeletedByCleared() bool
- func (m *PostMutation) EdgeCleared(name string) bool
- func (m *PostMutation) EntityVector() (r string, exists bool)
- func (m *PostMutation) EntityVectorCleared() 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) Filter() *PostFilter
- func (m *PostMutation) ID() (id uuid.UUID, exists bool)
- func (m *PostMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *PostMutation) IsModerated() (r bool, exists bool)
- func (m *PostMutation) LikedByCleared() bool
- func (m *PostMutation) LikedByIDs() (ids []uuid.UUID)
- func (m *PostMutation) Link() (r string, exists bool)
- func (m *PostMutation) Metadata() (r extramodel.PostMetadata, exists bool)
- func (m *PostMutation) MetadataCleared() bool
- func (m *PostMutation) ModeratedAt() (r time.Time, exists bool)
- func (m *PostMutation) ModeratedAtCleared() bool
- func (m *PostMutation) ModerationComment() (r string, exists bool)
- func (m *PostMutation) ModerationCommentCleared() bool
- func (m *PostMutation) OldContent(ctx context.Context) (v *string, err error)
- func (m *PostMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PostMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *PostMutation) OldDeletedBy(ctx context.Context) (v string, err error)
- func (m *PostMutation) OldEntityVector(ctx context.Context) (v string, err error)
- func (m *PostMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PostMutation) OldIsModerated(ctx context.Context) (v bool, err error)
- func (m *PostMutation) OldLink(ctx context.Context) (v string, err error)
- func (m *PostMutation) OldMetadata(ctx context.Context) (v extramodel.PostMetadata, err error)
- func (m *PostMutation) OldModeratedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PostMutation) OldModerationComment(ctx context.Context) (v string, err error)
- func (m *PostMutation) OldOwnerID(ctx context.Context) (v uuid.UUID, err error)
- func (m *PostMutation) OldPinned(ctx context.Context) (v bool, err error)
- func (m *PostMutation) OldTitle(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) OwnerCleared() bool
- func (m *PostMutation) OwnerID() (r uuid.UUID, exists bool)
- func (m *PostMutation) OwnerIDs() (ids []uuid.UUID)
- func (m *PostMutation) Pinned() (r bool, exists bool)
- func (m *PostMutation) RemoveCategoryIDs(ids ...uuid.UUID)
- func (m *PostMutation) RemoveCommentIDs(ids ...uuid.UUID)
- func (m *PostMutation) RemoveLikedByIDs(ids ...uuid.UUID)
- func (m *PostMutation) RemoveSavedByIDs(ids ...uuid.UUID)
- func (m *PostMutation) RemovedCategoriesIDs() (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) RemovedLikedByIDs() (ids []uuid.UUID)
- func (m *PostMutation) RemovedSavedByIDs() (ids []uuid.UUID)
- func (m *PostMutation) ResetCategories()
- func (m *PostMutation) ResetComments()
- func (m *PostMutation) ResetContent()
- func (m *PostMutation) ResetCreatedAt()
- func (m *PostMutation) ResetDeletedAt()
- func (m *PostMutation) ResetDeletedBy()
- func (m *PostMutation) ResetEdge(name string) error
- func (m *PostMutation) ResetEntityVector()
- func (m *PostMutation) ResetField(name string) error
- func (m *PostMutation) ResetIsModerated()
- func (m *PostMutation) ResetLikedBy()
- func (m *PostMutation) ResetLink()
- func (m *PostMutation) ResetMetadata()
- func (m *PostMutation) ResetModeratedAt()
- func (m *PostMutation) ResetModerationComment()
- func (m *PostMutation) ResetOwner()
- func (m *PostMutation) ResetOwnerID()
- func (m *PostMutation) ResetPinned()
- func (m *PostMutation) ResetSavedBy()
- func (m *PostMutation) ResetTitle()
- func (m *PostMutation) ResetUpdatedAt()
- func (m *PostMutation) SavedByCleared() bool
- func (m *PostMutation) SavedByIDs() (ids []uuid.UUID)
- func (m *PostMutation) SetContent(s string)
- func (m *PostMutation) SetCreatedAt(t time.Time)
- func (m *PostMutation) SetDeletedAt(t time.Time)
- func (m *PostMutation) SetDeletedBy(s string)
- func (m *PostMutation) SetEntityVector(s string)
- func (m *PostMutation) SetField(name string, value ent.Value) error
- func (m *PostMutation) SetID(id uuid.UUID)
- func (m *PostMutation) SetIsModerated(b bool)
- func (m *PostMutation) SetLink(s string)
- func (m *PostMutation) SetMetadata(em extramodel.PostMetadata)
- func (m *PostMutation) SetModeratedAt(t time.Time)
- func (m *PostMutation) SetModerationComment(s string)
- func (m *PostMutation) SetOp(op Op)
- func (m *PostMutation) SetOwnerID(u uuid.UUID)
- func (m *PostMutation) SetPinned(b bool)
- func (m *PostMutation) SetTitle(s string)
- func (m *PostMutation) SetUpdatedAt(t time.Time)
- func (m *PostMutation) Title() (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 PostOrder
- type PostOrderField
- type PostPaginateOption
- 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 (po *PostQuery) CollectFields(ctx context.Context, satisfies ...string) (*PostQuery, error)
- 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) Filter() *PostFilter
- 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) ForShare(opts ...sql.LockOption) *PostQuery
- func (pq *PostQuery) ForUpdate(opts ...sql.LockOption) *PostQuery
- 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) Modify(modifiers ...func(s *sql.Selector)) *PostSelect
- 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 (po *PostQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*PostConnection, error)
- func (pq *PostQuery) QueryCategories() *PostCategoryQuery
- func (pq *PostQuery) QueryComments() *CommentQuery
- func (pq *PostQuery) QueryLikedBy() *UserQuery
- func (pq *PostQuery) QueryOwner() *UserQuery
- func (pq *PostQuery) QuerySavedBy() *UserQuery
- 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) WithCategories(opts ...func(*PostCategoryQuery)) *PostQuery
- func (pq *PostQuery) WithComments(opts ...func(*CommentQuery)) *PostQuery
- func (pq *PostQuery) WithLikedBy(opts ...func(*UserQuery)) *PostQuery
- func (pq *PostQuery) WithNamedCategories(name string, opts ...func(*PostCategoryQuery)) *PostQuery
- func (pq *PostQuery) WithNamedComments(name string, opts ...func(*CommentQuery)) *PostQuery
- func (pq *PostQuery) WithNamedLikedBy(name string, opts ...func(*UserQuery)) *PostQuery
- func (pq *PostQuery) WithNamedSavedBy(name string, opts ...func(*UserQuery)) *PostQuery
- func (pq *PostQuery) WithOwner(opts ...func(*UserQuery)) *PostQuery
- func (pq *PostQuery) WithSavedBy(opts ...func(*UserQuery)) *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) Modify(modifiers ...func(s *sql.Selector)) *PostSelect
- 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) AddCategories(p ...*PostCategory) *PostUpdate
- func (pu *PostUpdate) AddCategoryIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) AddCommentIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) AddComments(c ...*Comment) *PostUpdate
- func (pu *PostUpdate) AddLikedBy(u ...*User) *PostUpdate
- func (pu *PostUpdate) AddLikedByIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) AddSavedBy(u ...*User) *PostUpdate
- func (pu *PostUpdate) AddSavedByIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) ClearCategories() *PostUpdate
- func (pu *PostUpdate) ClearComments() *PostUpdate
- func (pu *PostUpdate) ClearContent() *PostUpdate
- func (pu *PostUpdate) ClearDeletedAt() *PostUpdate
- func (pu *PostUpdate) ClearDeletedBy() *PostUpdate
- func (pu *PostUpdate) ClearLikedBy() *PostUpdate
- func (pu *PostUpdate) ClearMetadata() *PostUpdate
- func (pu *PostUpdate) ClearModeratedAt() *PostUpdate
- func (pu *PostUpdate) ClearModerationComment() *PostUpdate
- func (pu *PostUpdate) ClearOwner() *PostUpdate
- func (pu *PostUpdate) ClearSavedBy() *PostUpdate
- func (pu *PostUpdate) Exec(ctx context.Context) error
- func (pu *PostUpdate) ExecX(ctx context.Context)
- func (pu *PostUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostUpdate
- func (pu *PostUpdate) Mutation() *PostMutation
- func (pu *PostUpdate) RemoveCategories(p ...*PostCategory) *PostUpdate
- func (pu *PostUpdate) RemoveCategoryIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) RemoveCommentIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) RemoveComments(c ...*Comment) *PostUpdate
- func (pu *PostUpdate) RemoveLikedBy(u ...*User) *PostUpdate
- func (pu *PostUpdate) RemoveLikedByIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) RemoveSavedBy(u ...*User) *PostUpdate
- func (pu *PostUpdate) RemoveSavedByIDs(ids ...uuid.UUID) *PostUpdate
- func (pu *PostUpdate) Save(ctx context.Context) (int, error)
- func (pu *PostUpdate) SaveX(ctx context.Context) int
- func (pu *PostUpdate) SetContent(s string) *PostUpdate
- func (pu *PostUpdate) SetDeletedAt(t time.Time) *PostUpdate
- func (pu *PostUpdate) SetDeletedBy(s string) *PostUpdate
- func (c *PostUpdate) SetInput(i UpdatePostInput) *PostUpdate
- func (pu *PostUpdate) SetIsModerated(b bool) *PostUpdate
- func (pu *PostUpdate) SetLink(s string) *PostUpdate
- func (pu *PostUpdate) SetMetadata(em extramodel.PostMetadata) *PostUpdate
- func (pu *PostUpdate) SetModeratedAt(t time.Time) *PostUpdate
- func (pu *PostUpdate) SetModerationComment(s string) *PostUpdate
- func (pu *PostUpdate) SetNillableContent(s *string) *PostUpdate
- func (pu *PostUpdate) SetNillableDeletedAt(t *time.Time) *PostUpdate
- func (pu *PostUpdate) SetNillableDeletedBy(s *string) *PostUpdate
- func (pu *PostUpdate) SetNillableIsModerated(b *bool) *PostUpdate
- func (pu *PostUpdate) SetNillableLink(s *string) *PostUpdate
- func (pu *PostUpdate) SetNillableMetadata(em *extramodel.PostMetadata) *PostUpdate
- func (pu *PostUpdate) SetNillableModeratedAt(t *time.Time) *PostUpdate
- func (pu *PostUpdate) SetNillableModerationComment(s *string) *PostUpdate
- func (pu *PostUpdate) SetNillableOwnerID(u *uuid.UUID) *PostUpdate
- func (pu *PostUpdate) SetNillablePinned(b *bool) *PostUpdate
- func (pu *PostUpdate) SetNillableTitle(s *string) *PostUpdate
- func (pu *PostUpdate) SetOwner(u *User) *PostUpdate
- func (pu *PostUpdate) SetOwnerID(u uuid.UUID) *PostUpdate
- func (pu *PostUpdate) SetPinned(b bool) *PostUpdate
- func (pu *PostUpdate) SetTitle(s string) *PostUpdate
- func (pu *PostUpdate) SetUpdatedAt(t time.Time) *PostUpdate
- func (pu *PostUpdate) Where(ps ...predicate.Post) *PostUpdate
- type PostUpdateOne
- func (puo *PostUpdateOne) AddCategories(p ...*PostCategory) *PostUpdateOne
- func (puo *PostUpdateOne) AddCategoryIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) AddCommentIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) AddComments(c ...*Comment) *PostUpdateOne
- func (puo *PostUpdateOne) AddLikedBy(u ...*User) *PostUpdateOne
- func (puo *PostUpdateOne) AddLikedByIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) AddSavedBy(u ...*User) *PostUpdateOne
- func (puo *PostUpdateOne) AddSavedByIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) ClearCategories() *PostUpdateOne
- func (puo *PostUpdateOne) ClearComments() *PostUpdateOne
- func (puo *PostUpdateOne) ClearContent() *PostUpdateOne
- func (puo *PostUpdateOne) ClearDeletedAt() *PostUpdateOne
- func (puo *PostUpdateOne) ClearDeletedBy() *PostUpdateOne
- func (puo *PostUpdateOne) ClearLikedBy() *PostUpdateOne
- func (puo *PostUpdateOne) ClearMetadata() *PostUpdateOne
- func (puo *PostUpdateOne) ClearModeratedAt() *PostUpdateOne
- func (puo *PostUpdateOne) ClearModerationComment() *PostUpdateOne
- func (puo *PostUpdateOne) ClearOwner() *PostUpdateOne
- func (puo *PostUpdateOne) ClearSavedBy() *PostUpdateOne
- func (puo *PostUpdateOne) Exec(ctx context.Context) error
- func (puo *PostUpdateOne) ExecX(ctx context.Context)
- func (puo *PostUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostUpdateOne
- func (puo *PostUpdateOne) Mutation() *PostMutation
- func (puo *PostUpdateOne) RemoveCategories(p ...*PostCategory) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveCategoryIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveCommentIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveComments(c ...*Comment) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveLikedBy(u ...*User) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveLikedByIDs(ids ...uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveSavedBy(u ...*User) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveSavedByIDs(ids ...uuid.UUID) *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) SetContent(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetDeletedAt(t time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetDeletedBy(s string) *PostUpdateOne
- func (c *PostUpdateOne) SetInput(i UpdatePostInput) *PostUpdateOne
- func (puo *PostUpdateOne) SetIsModerated(b bool) *PostUpdateOne
- func (puo *PostUpdateOne) SetLink(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetMetadata(em extramodel.PostMetadata) *PostUpdateOne
- func (puo *PostUpdateOne) SetModeratedAt(t time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetModerationComment(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableContent(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableDeletedAt(t *time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableDeletedBy(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableIsModerated(b *bool) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableLink(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableMetadata(em *extramodel.PostMetadata) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableModeratedAt(t *time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableModerationComment(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableOwnerID(u *uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillablePinned(b *bool) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableTitle(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetOwner(u *User) *PostUpdateOne
- func (puo *PostUpdateOne) SetOwnerID(u uuid.UUID) *PostUpdateOne
- func (puo *PostUpdateOne) SetPinned(b bool) *PostUpdateOne
- func (puo *PostUpdateOne) SetTitle(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetUpdatedAt(t time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) Where(ps ...predicate.Post) *PostUpdateOne
- type PostWhereInput
- type Posts
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RefreshToken
- func (*RefreshToken) IsNode()
- func (rt *RefreshToken) Node(ctx context.Context) (node *Node, err error)
- func (rt *RefreshToken) Owner(ctx context.Context) (*User, error)
- func (rt *RefreshToken) QueryOwner() *UserQuery
- func (rt *RefreshToken) String() string
- func (rt *RefreshToken) ToEdge(order *RefreshTokenOrder) *RefreshTokenEdge
- func (rt *RefreshToken) Unwrap() *RefreshToken
- func (rt *RefreshToken) Update() *RefreshTokenUpdateOne
- func (rt *RefreshToken) Value(name string) (ent.Value, error)
- type RefreshTokenClient
- func (c *RefreshTokenClient) Create() *RefreshTokenCreate
- func (c *RefreshTokenClient) CreateBulk(builders ...*RefreshTokenCreate) *RefreshTokenCreateBulk
- func (c *RefreshTokenClient) Delete() *RefreshTokenDelete
- func (c *RefreshTokenClient) DeleteOne(rt *RefreshToken) *RefreshTokenDeleteOne
- func (c *RefreshTokenClient) DeleteOneID(id uuid.UUID) *RefreshTokenDeleteOne
- func (c *RefreshTokenClient) Get(ctx context.Context, id uuid.UUID) (*RefreshToken, error)
- func (c *RefreshTokenClient) GetX(ctx context.Context, id uuid.UUID) *RefreshToken
- func (c *RefreshTokenClient) Hooks() []Hook
- func (c *RefreshTokenClient) Intercept(interceptors ...Interceptor)
- func (c *RefreshTokenClient) Interceptors() []Interceptor
- func (c *RefreshTokenClient) MapCreateBulk(slice any, setFunc func(*RefreshTokenCreate, int)) *RefreshTokenCreateBulk
- func (c *RefreshTokenClient) Query() *RefreshTokenQuery
- func (c *RefreshTokenClient) QueryOwner(rt *RefreshToken) *UserQuery
- func (c *RefreshTokenClient) Update() *RefreshTokenUpdate
- func (c *RefreshTokenClient) UpdateOne(rt *RefreshToken) *RefreshTokenUpdateOne
- func (c *RefreshTokenClient) UpdateOneID(id uuid.UUID) *RefreshTokenUpdateOne
- func (c *RefreshTokenClient) Use(hooks ...Hook)
- type RefreshTokenConnection
- type RefreshTokenCreate
- func (rtc *RefreshTokenCreate) Exec(ctx context.Context) error
- func (rtc *RefreshTokenCreate) ExecX(ctx context.Context)
- func (rtc *RefreshTokenCreate) Mutation() *RefreshTokenMutation
- func (rtc *RefreshTokenCreate) Save(ctx context.Context) (*RefreshToken, error)
- func (rtc *RefreshTokenCreate) SaveX(ctx context.Context) *RefreshToken
- func (rtc *RefreshTokenCreate) SetCreatedAt(t time.Time) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetExpiresAt(t time.Time) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetID(u uuid.UUID) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetIPAddress(s string) *RefreshTokenCreate
- func (c *RefreshTokenCreate) SetInput(i CreateRefreshTokenInput) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetNillableCreatedAt(t *time.Time) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetNillableID(u *uuid.UUID) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetNillableIPAddress(s *string) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetNillableRevoked(b *bool) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetNillableUpdatedAt(t *time.Time) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetNillableUserAgent(s *string) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetOwner(u *User) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetOwnerID(u uuid.UUID) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetRevoked(b bool) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetTokenHash(s string) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetUpdatedAt(t time.Time) *RefreshTokenCreate
- func (rtc *RefreshTokenCreate) SetUserAgent(s string) *RefreshTokenCreate
- type RefreshTokenCreateBulk
- type RefreshTokenDelete
- type RefreshTokenDeleteOne
- type RefreshTokenEdge
- type RefreshTokenEdges
- type RefreshTokenFilter
- func (f *RefreshTokenFilter) Where(p entql.P)
- func (f *RefreshTokenFilter) WhereCreatedAt(p entql.TimeP)
- func (f *RefreshTokenFilter) WhereExpiresAt(p entql.TimeP)
- func (f *RefreshTokenFilter) WhereHasOwner()
- func (f *RefreshTokenFilter) WhereHasOwnerWith(preds ...predicate.User)
- func (f *RefreshTokenFilter) WhereID(p entql.ValueP)
- func (f *RefreshTokenFilter) WhereIPAddress(p entql.StringP)
- func (f *RefreshTokenFilter) WhereOwnerID(p entql.ValueP)
- func (f *RefreshTokenFilter) WhereRevoked(p entql.BoolP)
- func (f *RefreshTokenFilter) WhereTokenHash(p entql.StringP)
- func (f *RefreshTokenFilter) WhereUpdatedAt(p entql.TimeP)
- func (f *RefreshTokenFilter) WhereUserAgent(p entql.StringP)
- type RefreshTokenGroupBy
- func (rtgb *RefreshTokenGroupBy) Aggregate(fns ...AggregateFunc) *RefreshTokenGroupBy
- func (s *RefreshTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RefreshTokenGroupBy) BoolX(ctx context.Context) bool
- func (s *RefreshTokenGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RefreshTokenGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RefreshTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RefreshTokenGroupBy) Float64X(ctx context.Context) float64
- func (s *RefreshTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RefreshTokenGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RefreshTokenGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RefreshTokenGroupBy) IntX(ctx context.Context) int
- func (s *RefreshTokenGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RefreshTokenGroupBy) IntsX(ctx context.Context) []int
- func (rtgb *RefreshTokenGroupBy) Scan(ctx context.Context, v any) error
- func (s *RefreshTokenGroupBy) ScanX(ctx context.Context, v any)
- func (s *RefreshTokenGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RefreshTokenGroupBy) StringX(ctx context.Context) string
- func (s *RefreshTokenGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RefreshTokenGroupBy) StringsX(ctx context.Context) []string
- type RefreshTokenMutation
- func (m *RefreshTokenMutation) AddField(name string, value ent.Value) error
- func (m *RefreshTokenMutation) AddedEdges() []string
- func (m *RefreshTokenMutation) AddedField(name string) (ent.Value, bool)
- func (m *RefreshTokenMutation) AddedFields() []string
- func (m *RefreshTokenMutation) AddedIDs(name string) []ent.Value
- func (m *RefreshTokenMutation) ClearEdge(name string) error
- func (m *RefreshTokenMutation) ClearField(name string) error
- func (m *RefreshTokenMutation) ClearIPAddress()
- func (m *RefreshTokenMutation) ClearOwner()
- func (m *RefreshTokenMutation) ClearUserAgent()
- func (m *RefreshTokenMutation) ClearedEdges() []string
- func (m *RefreshTokenMutation) ClearedFields() []string
- func (m RefreshTokenMutation) Client() *Client
- func (m *RefreshTokenMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RefreshTokenMutation) EdgeCleared(name string) bool
- func (m *RefreshTokenMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *RefreshTokenMutation) Field(name string) (ent.Value, bool)
- func (m *RefreshTokenMutation) FieldCleared(name string) bool
- func (m *RefreshTokenMutation) Fields() []string
- func (m *RefreshTokenMutation) Filter() *RefreshTokenFilter
- func (m *RefreshTokenMutation) ID() (id uuid.UUID, exists bool)
- func (m *RefreshTokenMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *RefreshTokenMutation) IPAddress() (r string, exists bool)
- func (m *RefreshTokenMutation) IPAddressCleared() bool
- func (m *RefreshTokenMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RefreshTokenMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)
- func (m *RefreshTokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RefreshTokenMutation) OldIPAddress(ctx context.Context) (v string, err error)
- func (m *RefreshTokenMutation) OldOwnerID(ctx context.Context) (v uuid.UUID, err error)
- func (m *RefreshTokenMutation) OldRevoked(ctx context.Context) (v bool, err error)
- func (m *RefreshTokenMutation) OldTokenHash(ctx context.Context) (v string, err error)
- func (m *RefreshTokenMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RefreshTokenMutation) OldUserAgent(ctx context.Context) (v string, err error)
- func (m *RefreshTokenMutation) Op() Op
- func (m *RefreshTokenMutation) OwnerCleared() bool
- func (m *RefreshTokenMutation) OwnerID() (r uuid.UUID, exists bool)
- func (m *RefreshTokenMutation) OwnerIDs() (ids []uuid.UUID)
- func (m *RefreshTokenMutation) RemovedEdges() []string
- func (m *RefreshTokenMutation) RemovedIDs(name string) []ent.Value
- func (m *RefreshTokenMutation) ResetCreatedAt()
- func (m *RefreshTokenMutation) ResetEdge(name string) error
- func (m *RefreshTokenMutation) ResetExpiresAt()
- func (m *RefreshTokenMutation) ResetField(name string) error
- func (m *RefreshTokenMutation) ResetIPAddress()
- func (m *RefreshTokenMutation) ResetOwner()
- func (m *RefreshTokenMutation) ResetOwnerID()
- func (m *RefreshTokenMutation) ResetRevoked()
- func (m *RefreshTokenMutation) ResetTokenHash()
- func (m *RefreshTokenMutation) ResetUpdatedAt()
- func (m *RefreshTokenMutation) ResetUserAgent()
- func (m *RefreshTokenMutation) Revoked() (r bool, exists bool)
- func (m *RefreshTokenMutation) SetCreatedAt(t time.Time)
- func (m *RefreshTokenMutation) SetExpiresAt(t time.Time)
- func (m *RefreshTokenMutation) SetField(name string, value ent.Value) error
- func (m *RefreshTokenMutation) SetID(id uuid.UUID)
- func (m *RefreshTokenMutation) SetIPAddress(s string)
- func (m *RefreshTokenMutation) SetOp(op Op)
- func (m *RefreshTokenMutation) SetOwnerID(u uuid.UUID)
- func (m *RefreshTokenMutation) SetRevoked(b bool)
- func (m *RefreshTokenMutation) SetTokenHash(s string)
- func (m *RefreshTokenMutation) SetUpdatedAt(t time.Time)
- func (m *RefreshTokenMutation) SetUserAgent(s string)
- func (m *RefreshTokenMutation) TokenHash() (r string, exists bool)
- func (m RefreshTokenMutation) Tx() (*Tx, error)
- func (m *RefreshTokenMutation) Type() string
- func (m *RefreshTokenMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *RefreshTokenMutation) UserAgent() (r string, exists bool)
- func (m *RefreshTokenMutation) UserAgentCleared() bool
- func (m *RefreshTokenMutation) Where(ps ...predicate.RefreshToken)
- func (m *RefreshTokenMutation) WhereP(ps ...func(*sql.Selector))
- type RefreshTokenOrder
- type RefreshTokenOrderField
- type RefreshTokenPaginateOption
- type RefreshTokenQuery
- func (rtq *RefreshTokenQuery) Aggregate(fns ...AggregateFunc) *RefreshTokenSelect
- func (rtq *RefreshTokenQuery) All(ctx context.Context) ([]*RefreshToken, error)
- func (rtq *RefreshTokenQuery) AllX(ctx context.Context) []*RefreshToken
- func (rtq *RefreshTokenQuery) Clone() *RefreshTokenQuery
- func (rt *RefreshTokenQuery) CollectFields(ctx context.Context, satisfies ...string) (*RefreshTokenQuery, error)
- func (rtq *RefreshTokenQuery) Count(ctx context.Context) (int, error)
- func (rtq *RefreshTokenQuery) CountX(ctx context.Context) int
- func (rtq *RefreshTokenQuery) Exist(ctx context.Context) (bool, error)
- func (rtq *RefreshTokenQuery) ExistX(ctx context.Context) bool
- func (rtq *RefreshTokenQuery) Filter() *RefreshTokenFilter
- func (rtq *RefreshTokenQuery) First(ctx context.Context) (*RefreshToken, error)
- func (rtq *RefreshTokenQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (rtq *RefreshTokenQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (rtq *RefreshTokenQuery) FirstX(ctx context.Context) *RefreshToken
- func (rtq *RefreshTokenQuery) ForShare(opts ...sql.LockOption) *RefreshTokenQuery
- func (rtq *RefreshTokenQuery) ForUpdate(opts ...sql.LockOption) *RefreshTokenQuery
- func (rtq *RefreshTokenQuery) GroupBy(field string, fields ...string) *RefreshTokenGroupBy
- func (rtq *RefreshTokenQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (rtq *RefreshTokenQuery) IDsX(ctx context.Context) []uuid.UUID
- func (rtq *RefreshTokenQuery) Limit(limit int) *RefreshTokenQuery
- func (rtq *RefreshTokenQuery) Modify(modifiers ...func(s *sql.Selector)) *RefreshTokenSelect
- func (rtq *RefreshTokenQuery) Offset(offset int) *RefreshTokenQuery
- func (rtq *RefreshTokenQuery) Only(ctx context.Context) (*RefreshToken, error)
- func (rtq *RefreshTokenQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (rtq *RefreshTokenQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (rtq *RefreshTokenQuery) OnlyX(ctx context.Context) *RefreshToken
- func (rtq *RefreshTokenQuery) Order(o ...refreshtoken.OrderOption) *RefreshTokenQuery
- func (rt *RefreshTokenQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*RefreshTokenConnection, error)
- func (rtq *RefreshTokenQuery) QueryOwner() *UserQuery
- func (rtq *RefreshTokenQuery) Select(fields ...string) *RefreshTokenSelect
- func (rtq *RefreshTokenQuery) Unique(unique bool) *RefreshTokenQuery
- func (rtq *RefreshTokenQuery) Where(ps ...predicate.RefreshToken) *RefreshTokenQuery
- func (rtq *RefreshTokenQuery) WithOwner(opts ...func(*UserQuery)) *RefreshTokenQuery
- type RefreshTokenSelect
- func (rts *RefreshTokenSelect) Aggregate(fns ...AggregateFunc) *RefreshTokenSelect
- func (s *RefreshTokenSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RefreshTokenSelect) BoolX(ctx context.Context) bool
- func (s *RefreshTokenSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RefreshTokenSelect) BoolsX(ctx context.Context) []bool
- func (s *RefreshTokenSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RefreshTokenSelect) Float64X(ctx context.Context) float64
- func (s *RefreshTokenSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RefreshTokenSelect) Float64sX(ctx context.Context) []float64
- func (s *RefreshTokenSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RefreshTokenSelect) IntX(ctx context.Context) int
- func (s *RefreshTokenSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RefreshTokenSelect) IntsX(ctx context.Context) []int
- func (rts *RefreshTokenSelect) Modify(modifiers ...func(s *sql.Selector)) *RefreshTokenSelect
- func (rts *RefreshTokenSelect) Scan(ctx context.Context, v any) error
- func (s *RefreshTokenSelect) ScanX(ctx context.Context, v any)
- func (s *RefreshTokenSelect) String(ctx context.Context) (_ string, err error)
- func (s *RefreshTokenSelect) StringX(ctx context.Context) string
- func (s *RefreshTokenSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RefreshTokenSelect) StringsX(ctx context.Context) []string
- type RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) ClearIPAddress() *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) ClearOwner() *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) ClearUserAgent() *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) Exec(ctx context.Context) error
- func (rtu *RefreshTokenUpdate) ExecX(ctx context.Context)
- func (rtu *RefreshTokenUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) Mutation() *RefreshTokenMutation
- func (rtu *RefreshTokenUpdate) Save(ctx context.Context) (int, error)
- func (rtu *RefreshTokenUpdate) SaveX(ctx context.Context) int
- func (rtu *RefreshTokenUpdate) SetExpiresAt(t time.Time) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetIPAddress(s string) *RefreshTokenUpdate
- func (c *RefreshTokenUpdate) SetInput(i UpdateRefreshTokenInput) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetNillableExpiresAt(t *time.Time) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetNillableIPAddress(s *string) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetNillableOwnerID(u *uuid.UUID) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetNillableRevoked(b *bool) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetNillableTokenHash(s *string) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetNillableUserAgent(s *string) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetOwner(u *User) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetOwnerID(u uuid.UUID) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetRevoked(b bool) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetTokenHash(s string) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetUpdatedAt(t time.Time) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) SetUserAgent(s string) *RefreshTokenUpdate
- func (rtu *RefreshTokenUpdate) Where(ps ...predicate.RefreshToken) *RefreshTokenUpdate
- type RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) ClearIPAddress() *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) ClearOwner() *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) ClearUserAgent() *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) Exec(ctx context.Context) error
- func (rtuo *RefreshTokenUpdateOne) ExecX(ctx context.Context)
- func (rtuo *RefreshTokenUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) Mutation() *RefreshTokenMutation
- func (rtuo *RefreshTokenUpdateOne) Save(ctx context.Context) (*RefreshToken, error)
- func (rtuo *RefreshTokenUpdateOne) SaveX(ctx context.Context) *RefreshToken
- func (rtuo *RefreshTokenUpdateOne) Select(field string, fields ...string) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetExpiresAt(t time.Time) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetIPAddress(s string) *RefreshTokenUpdateOne
- func (c *RefreshTokenUpdateOne) SetInput(i UpdateRefreshTokenInput) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetNillableExpiresAt(t *time.Time) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetNillableIPAddress(s *string) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetNillableOwnerID(u *uuid.UUID) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetNillableRevoked(b *bool) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetNillableTokenHash(s *string) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetNillableUserAgent(s *string) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetOwner(u *User) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetOwnerID(u uuid.UUID) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetRevoked(b bool) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetTokenHash(s string) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetUpdatedAt(t time.Time) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) SetUserAgent(s string) *RefreshTokenUpdateOne
- func (rtuo *RefreshTokenUpdateOne) Where(ps ...predicate.RefreshToken) *RefreshTokenUpdateOne
- type RefreshTokenWhereInput
- type RefreshTokens
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type UpdateApiKeyInput
- type UpdateCommentInput
- type UpdatePostCategoryInput
- type UpdatePostInput
- type UpdateRefreshTokenInput
- type UpdateUserInput
- type User
- func (u *User) APIKeys(ctx context.Context) (result []*ApiKey, err error)
- func (u *User) Comments(ctx context.Context) (result []*Comment, err error)
- func (*User) IsNode()
- func (u *User) LikedPosts(ctx context.Context) (result []*Post, err error)
- func (u *User) NamedAPIKeys(name string) ([]*ApiKey, error)
- func (u *User) NamedComments(name string) ([]*Comment, error)
- func (u *User) NamedLikedPosts(name string) ([]*Post, error)
- func (u *User) NamedPublishedPosts(name string) ([]*Post, error)
- func (u *User) NamedRefreshTokens(name string) ([]*RefreshToken, error)
- func (u *User) NamedSavedPosts(name string) ([]*Post, error)
- func (u *User) Node(ctx context.Context) (node *Node, err error)
- func (u *User) PublishedPosts(ctx context.Context) (result []*Post, err error)
- func (u *User) QueryAPIKeys() *ApiKeyQuery
- func (u *User) QueryComments() *CommentQuery
- func (u *User) QueryLikedPosts() *PostQuery
- func (u *User) QueryPublishedPosts() *PostQuery
- func (u *User) QueryRefreshTokens() *RefreshTokenQuery
- func (u *User) QuerySavedPosts() *PostQuery
- func (u *User) SavedPosts(ctx context.Context) (result []*Post, err error)
- func (u *User) String() string
- func (u *User) ToEdge(order *UserOrder) *UserEdge
- 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) QueryAPIKeys(u *User) *ApiKeyQuery
- func (c *UserClient) QueryComments(u *User) *CommentQuery
- func (c *UserClient) QueryLikedPosts(u *User) *PostQuery
- func (c *UserClient) QueryPublishedPosts(u *User) *PostQuery
- func (c *UserClient) QueryRefreshTokens(u *User) *RefreshTokenQuery
- func (c *UserClient) QuerySavedPosts(u *User) *PostQuery
- 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 UserConnection
- type UserCreate
- func (uc *UserCreate) AddAPIKeyIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddAPIKeys(a ...*ApiKey) *UserCreate
- func (uc *UserCreate) AddCommentIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddComments(c ...*Comment) *UserCreate
- func (uc *UserCreate) AddLikedPostIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddLikedPosts(p ...*Post) *UserCreate
- func (uc *UserCreate) AddPublishedPostIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddPublishedPosts(p ...*Post) *UserCreate
- func (uc *UserCreate) AddRefreshTokenIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddRefreshTokens(r ...*RefreshToken) *UserCreate
- func (uc *UserCreate) AddSavedPostIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddSavedPosts(p ...*Post) *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) SetAlias(s string) *UserCreate
- func (uc *UserCreate) SetAuthProvider(up user.AuthProvider) *UserCreate
- func (uc *UserCreate) SetAwards(s []string) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDeletedBy(s string) *UserCreate
- func (uc *UserCreate) SetDisplayName(s string) *UserCreate
- func (uc *UserCreate) SetExternalID(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (c *UserCreate) SetInput(i CreateUserInput) *UserCreate
- func (uc *UserCreate) SetLastPostSeenCursor(s string) *UserCreate
- func (uc *UserCreate) SetLastSeenAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetNillableAlias(s *string) *UserCreate
- func (uc *UserCreate) SetNillableAuthProvider(up *user.AuthProvider) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDeletedBy(s *string) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableLastPostSeenCursor(s *string) *UserCreate
- func (uc *UserCreate) SetNillableLastSeenAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableProfileImage(s *string) *UserCreate
- func (uc *UserCreate) SetNillableRole(u *user.Role) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetProfileImage(s string) *UserCreate
- func (uc *UserCreate) SetRole(u user.Role) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdge
- type UserEdges
- func (e UserEdges) APIKeysOrErr() ([]*ApiKey, error)
- func (e UserEdges) CommentsOrErr() ([]*Comment, error)
- func (e UserEdges) LikedPostsOrErr() ([]*Post, error)
- func (e UserEdges) PublishedPostsOrErr() ([]*Post, error)
- func (e UserEdges) RefreshTokensOrErr() ([]*RefreshToken, error)
- func (e UserEdges) SavedPostsOrErr() ([]*Post, error)
- type UserFilter
- func (f *UserFilter) Where(p entql.P)
- func (f *UserFilter) WhereAlias(p entql.StringP)
- func (f *UserFilter) WhereAuthProvider(p entql.StringP)
- func (f *UserFilter) WhereAwards(p entql.BytesP)
- func (f *UserFilter) WhereCreatedAt(p entql.TimeP)
- func (f *UserFilter) WhereDeletedAt(p entql.TimeP)
- func (f *UserFilter) WhereDeletedBy(p entql.StringP)
- func (f *UserFilter) WhereDisplayName(p entql.StringP)
- func (f *UserFilter) WhereExternalID(p entql.StringP)
- func (f *UserFilter) WhereHasAPIKeys()
- func (f *UserFilter) WhereHasAPIKeysWith(preds ...predicate.ApiKey)
- func (f *UserFilter) WhereHasComments()
- func (f *UserFilter) WhereHasCommentsWith(preds ...predicate.Comment)
- func (f *UserFilter) WhereHasLikedPosts()
- func (f *UserFilter) WhereHasLikedPostsWith(preds ...predicate.Post)
- func (f *UserFilter) WhereHasPublishedPosts()
- func (f *UserFilter) WhereHasPublishedPostsWith(preds ...predicate.Post)
- func (f *UserFilter) WhereHasRefreshTokens()
- func (f *UserFilter) WhereHasRefreshTokensWith(preds ...predicate.RefreshToken)
- func (f *UserFilter) WhereHasSavedPosts()
- func (f *UserFilter) WhereHasSavedPostsWith(preds ...predicate.Post)
- func (f *UserFilter) WhereID(p entql.ValueP)
- func (f *UserFilter) WhereLastPostSeenCursor(p entql.StringP)
- func (f *UserFilter) WhereLastSeenAt(p entql.TimeP)
- func (f *UserFilter) WhereProfileImage(p entql.StringP)
- func (f *UserFilter) WhereRole(p entql.StringP)
- func (f *UserFilter) WhereUpdatedAt(p entql.TimeP)
- 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) APIKeysCleared() bool
- func (m *UserMutation) APIKeysIDs() (ids []uuid.UUID)
- func (m *UserMutation) AddAPIKeyIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddCommentIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddLikedPostIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddPublishedPostIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddRefreshTokenIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddSavedPostIDs(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) Alias() (r string, exists bool)
- func (m *UserMutation) AliasCleared() bool
- func (m *UserMutation) AppendAwards(s []string)
- func (m *UserMutation) AppendedAwards() ([]string, bool)
- func (m *UserMutation) AuthProvider() (r user.AuthProvider, exists bool)
- func (m *UserMutation) Awards() (r []string, exists bool)
- func (m *UserMutation) AwardsCleared() bool
- func (m *UserMutation) ClearAPIKeys()
- func (m *UserMutation) ClearAlias()
- func (m *UserMutation) ClearAwards()
- func (m *UserMutation) ClearComments()
- func (m *UserMutation) ClearDeletedAt()
- func (m *UserMutation) ClearDeletedBy()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearLastPostSeenCursor()
- func (m *UserMutation) ClearLastSeenAt()
- func (m *UserMutation) ClearLikedPosts()
- func (m *UserMutation) ClearProfileImage()
- func (m *UserMutation) ClearPublishedPosts()
- func (m *UserMutation) ClearRefreshTokens()
- func (m *UserMutation) ClearSavedPosts()
- 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) DeletedAt() (r time.Time, exists bool)
- func (m *UserMutation) DeletedAtCleared() bool
- func (m *UserMutation) DeletedBy() (r string, exists bool)
- func (m *UserMutation) DeletedByCleared() bool
- func (m *UserMutation) DisplayName() (r string, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) ExternalID() (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) Filter() *UserFilter
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) LastPostSeenCursor() (r string, exists bool)
- func (m *UserMutation) LastPostSeenCursorCleared() bool
- func (m *UserMutation) LastSeenAt() (r time.Time, exists bool)
- func (m *UserMutation) LastSeenAtCleared() bool
- func (m *UserMutation) LikedPostsCleared() bool
- func (m *UserMutation) LikedPostsIDs() (ids []uuid.UUID)
- func (m *UserMutation) OldAlias(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldAuthProvider(ctx context.Context) (v user.AuthProvider, err error)
- func (m *UserMutation) OldAwards(ctx context.Context) (v []string, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldDeletedBy(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldDisplayName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldExternalID(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldLastPostSeenCursor(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldLastSeenAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldProfileImage(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldRole(ctx context.Context) (v user.Role, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) ProfileImage() (r string, exists bool)
- func (m *UserMutation) ProfileImageCleared() bool
- func (m *UserMutation) PublishedPostsCleared() bool
- func (m *UserMutation) PublishedPostsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RefreshTokensCleared() bool
- func (m *UserMutation) RefreshTokensIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemoveAPIKeyIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveCommentIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveLikedPostIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovePublishedPostIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveRefreshTokenIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveSavedPostIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovedAPIKeysIDs() (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) RemovedLikedPostsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedPublishedPostsIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedRefreshTokensIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedSavedPostsIDs() (ids []uuid.UUID)
- func (m *UserMutation) ResetAPIKeys()
- func (m *UserMutation) ResetAlias()
- func (m *UserMutation) ResetAuthProvider()
- func (m *UserMutation) ResetAwards()
- func (m *UserMutation) ResetComments()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetDeletedAt()
- func (m *UserMutation) ResetDeletedBy()
- func (m *UserMutation) ResetDisplayName()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetExternalID()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetLastPostSeenCursor()
- func (m *UserMutation) ResetLastSeenAt()
- func (m *UserMutation) ResetLikedPosts()
- func (m *UserMutation) ResetProfileImage()
- func (m *UserMutation) ResetPublishedPosts()
- func (m *UserMutation) ResetRefreshTokens()
- func (m *UserMutation) ResetRole()
- func (m *UserMutation) ResetSavedPosts()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) Role() (r user.Role, exists bool)
- func (m *UserMutation) SavedPostsCleared() bool
- func (m *UserMutation) SavedPostsIDs() (ids []uuid.UUID)
- func (m *UserMutation) SetAlias(s string)
- func (m *UserMutation) SetAuthProvider(up user.AuthProvider)
- func (m *UserMutation) SetAwards(s []string)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetDeletedAt(t time.Time)
- func (m *UserMutation) SetDeletedBy(s string)
- func (m *UserMutation) SetDisplayName(s string)
- func (m *UserMutation) SetExternalID(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetLastPostSeenCursor(s string)
- func (m *UserMutation) SetLastSeenAt(t time.Time)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetProfileImage(s string)
- func (m *UserMutation) SetRole(u user.Role)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserOrder
- type UserOrderField
- type UserPaginateOption
- 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 (u *UserQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserQuery, error)
- 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) Filter() *UserFilter
- 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) ForShare(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
- 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) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
- 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 (u *UserQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*UserConnection, error)
- func (uq *UserQuery) QueryAPIKeys() *ApiKeyQuery
- func (uq *UserQuery) QueryComments() *CommentQuery
- func (uq *UserQuery) QueryLikedPosts() *PostQuery
- func (uq *UserQuery) QueryPublishedPosts() *PostQuery
- func (uq *UserQuery) QueryRefreshTokens() *RefreshTokenQuery
- func (uq *UserQuery) QuerySavedPosts() *PostQuery
- 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) WithAPIKeys(opts ...func(*ApiKeyQuery)) *UserQuery
- func (uq *UserQuery) WithComments(opts ...func(*CommentQuery)) *UserQuery
- func (uq *UserQuery) WithLikedPosts(opts ...func(*PostQuery)) *UserQuery
- func (uq *UserQuery) WithNamedAPIKeys(name string, opts ...func(*ApiKeyQuery)) *UserQuery
- func (uq *UserQuery) WithNamedComments(name string, opts ...func(*CommentQuery)) *UserQuery
- func (uq *UserQuery) WithNamedLikedPosts(name string, opts ...func(*PostQuery)) *UserQuery
- func (uq *UserQuery) WithNamedPublishedPosts(name string, opts ...func(*PostQuery)) *UserQuery
- func (uq *UserQuery) WithNamedRefreshTokens(name string, opts ...func(*RefreshTokenQuery)) *UserQuery
- func (uq *UserQuery) WithNamedSavedPosts(name string, opts ...func(*PostQuery)) *UserQuery
- func (uq *UserQuery) WithPublishedPosts(opts ...func(*PostQuery)) *UserQuery
- func (uq *UserQuery) WithRefreshTokens(opts ...func(*RefreshTokenQuery)) *UserQuery
- func (uq *UserQuery) WithSavedPosts(opts ...func(*PostQuery)) *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) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
- 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) AddAPIKeyIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddAPIKeys(a ...*ApiKey) *UserUpdate
- func (uu *UserUpdate) AddCommentIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddComments(c ...*Comment) *UserUpdate
- func (uu *UserUpdate) AddLikedPostIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddLikedPosts(p ...*Post) *UserUpdate
- func (uu *UserUpdate) AddPublishedPostIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddPublishedPosts(p ...*Post) *UserUpdate
- func (uu *UserUpdate) AddRefreshTokenIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddRefreshTokens(r ...*RefreshToken) *UserUpdate
- func (uu *UserUpdate) AddSavedPostIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddSavedPosts(p ...*Post) *UserUpdate
- func (uu *UserUpdate) AppendAwards(s []string) *UserUpdate
- func (uu *UserUpdate) ClearAPIKeys() *UserUpdate
- func (uu *UserUpdate) ClearAlias() *UserUpdate
- func (uu *UserUpdate) ClearAwards() *UserUpdate
- func (uu *UserUpdate) ClearComments() *UserUpdate
- func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
- func (uu *UserUpdate) ClearDeletedBy() *UserUpdate
- func (uu *UserUpdate) ClearLastPostSeenCursor() *UserUpdate
- func (uu *UserUpdate) ClearLastSeenAt() *UserUpdate
- func (uu *UserUpdate) ClearLikedPosts() *UserUpdate
- func (uu *UserUpdate) ClearProfileImage() *UserUpdate
- func (uu *UserUpdate) ClearPublishedPosts() *UserUpdate
- func (uu *UserUpdate) ClearRefreshTokens() *UserUpdate
- func (uu *UserUpdate) ClearSavedPosts() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveAPIKeyIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveAPIKeys(a ...*ApiKey) *UserUpdate
- func (uu *UserUpdate) RemoveCommentIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveComments(c ...*Comment) *UserUpdate
- func (uu *UserUpdate) RemoveLikedPostIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveLikedPosts(p ...*Post) *UserUpdate
- func (uu *UserUpdate) RemovePublishedPostIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemovePublishedPosts(p ...*Post) *UserUpdate
- func (uu *UserUpdate) RemoveRefreshTokenIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveRefreshTokens(r ...*RefreshToken) *UserUpdate
- func (uu *UserUpdate) RemoveSavedPostIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveSavedPosts(p ...*Post) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAlias(s string) *UserUpdate
- func (uu *UserUpdate) SetAuthProvider(up user.AuthProvider) *UserUpdate
- func (uu *UserUpdate) SetAwards(s []string) *UserUpdate
- func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetDeletedBy(s string) *UserUpdate
- func (uu *UserUpdate) SetDisplayName(s string) *UserUpdate
- func (uu *UserUpdate) SetExternalID(s string) *UserUpdate
- func (c *UserUpdate) SetInput(i UpdateUserInput) *UserUpdate
- func (uu *UserUpdate) SetLastPostSeenCursor(s string) *UserUpdate
- func (uu *UserUpdate) SetLastSeenAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableAlias(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableAuthProvider(up *user.AuthProvider) *UserUpdate
- func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableDeletedBy(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableDisplayName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableExternalID(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableLastPostSeenCursor(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableProfileImage(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableRole(u *user.Role) *UserUpdate
- func (uu *UserUpdate) SetProfileImage(s string) *UserUpdate
- func (uu *UserUpdate) SetRole(u user.Role) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddAPIKeyIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddAPIKeys(a ...*ApiKey) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCommentIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddComments(c ...*Comment) *UserUpdateOne
- func (uuo *UserUpdateOne) AddLikedPostIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddLikedPosts(p ...*Post) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPublishedPostIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPublishedPosts(p ...*Post) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRefreshTokenIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRefreshTokens(r ...*RefreshToken) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSavedPostIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSavedPosts(p ...*Post) *UserUpdateOne
- func (uuo *UserUpdateOne) AppendAwards(s []string) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAPIKeys() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAlias() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAwards() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearComments() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDeletedBy() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearLastPostSeenCursor() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearLastSeenAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearLikedPosts() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearProfileImage() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPublishedPosts() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRefreshTokens() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearSavedPosts() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveAPIKeyIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveAPIKeys(a ...*ApiKey) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveCommentIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveComments(c ...*Comment) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveLikedPostIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveLikedPosts(p ...*Post) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePublishedPostIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePublishedPosts(p ...*Post) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRefreshTokenIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRefreshTokens(r ...*RefreshToken) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSavedPostIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSavedPosts(p ...*Post) *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) SetAlias(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAuthProvider(up user.AuthProvider) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAwards(s []string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDeletedBy(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDisplayName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetExternalID(s string) *UserUpdateOne
- func (c *UserUpdateOne) SetInput(i UpdateUserInput) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastPostSeenCursor(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastSeenAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAlias(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAuthProvider(up *user.AuthProvider) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDeletedBy(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDisplayName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableExternalID(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastPostSeenCursor(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableProfileImage(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRole(u *user.Role) *UserUpdateOne
- func (uuo *UserUpdateOne) SetProfileImage(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRole(u user.Role) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserWhereInput
- 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. TypeApiKey = "ApiKey" TypeComment = "Comment" TypePost = "Post" TypePostCategory = "PostCategory" TypeRefreshToken = "RefreshToken" TypeUser = "User" )
Variables ¶
var ( // ApiKeyOrderFieldID orders ApiKey by id. ApiKeyOrderFieldID = &ApiKeyOrderField{ Value: func(ak *ApiKey) (ent.Value, error) { return ak.ID, nil }, column: apikey.FieldID, toTerm: apikey.ByID, toCursor: func(ak *ApiKey) Cursor { return Cursor{ ID: ak.ID, Value: ak.ID, } }, } // ApiKeyOrderFieldUpdatedAt orders ApiKey by updated_at. ApiKeyOrderFieldUpdatedAt = &ApiKeyOrderField{ Value: func(ak *ApiKey) (ent.Value, error) { return ak.UpdatedAt, nil }, column: apikey.FieldUpdatedAt, toTerm: apikey.ByUpdatedAt, toCursor: func(ak *ApiKey) Cursor { return Cursor{ ID: ak.ID, Value: ak.UpdatedAt, } }, } // ApiKeyOrderFieldCreatedAt orders ApiKey by created_at. ApiKeyOrderFieldCreatedAt = &ApiKeyOrderField{ Value: func(ak *ApiKey) (ent.Value, error) { return ak.CreatedAt, nil }, column: apikey.FieldCreatedAt, toTerm: apikey.ByCreatedAt, toCursor: func(ak *ApiKey) Cursor { return Cursor{ ID: ak.ID, Value: ak.CreatedAt, } }, } )
var ( // CommentOrderFieldID orders Comment by id. CommentOrderFieldID = &CommentOrderField{ Value: func(c *Comment) (ent.Value, error) { return c.ID, nil }, column: comment.FieldID, toTerm: comment.ByID, toCursor: func(c *Comment) Cursor { return Cursor{ ID: c.ID, Value: c.ID, } }, } // CommentOrderFieldUpdatedAt orders Comment by updated_at. CommentOrderFieldUpdatedAt = &CommentOrderField{ Value: func(c *Comment) (ent.Value, error) { return c.UpdatedAt, nil }, column: comment.FieldUpdatedAt, toTerm: comment.ByUpdatedAt, toCursor: func(c *Comment) Cursor { return Cursor{ ID: c.ID, Value: c.UpdatedAt, } }, } // CommentOrderFieldCreatedAt orders Comment by created_at. CommentOrderFieldCreatedAt = &CommentOrderField{ Value: func(c *Comment) (ent.Value, error) { return c.CreatedAt, nil }, column: comment.FieldCreatedAt, toTerm: comment.ByCreatedAt, toCursor: func(c *Comment) Cursor { return Cursor{ ID: c.ID, Value: c.CreatedAt, } }, } )
var ( // PostOrderFieldID orders Post by id. PostOrderFieldID = &PostOrderField{ Value: func(po *Post) (ent.Value, error) { return po.ID, nil }, column: post.FieldID, toTerm: post.ByID, toCursor: func(po *Post) Cursor { return Cursor{ ID: po.ID, Value: po.ID, } }, } // PostOrderFieldUpdatedAt orders Post by updated_at. PostOrderFieldUpdatedAt = &PostOrderField{ Value: func(po *Post) (ent.Value, error) { return po.UpdatedAt, nil }, column: post.FieldUpdatedAt, toTerm: post.ByUpdatedAt, toCursor: func(po *Post) Cursor { return Cursor{ ID: po.ID, Value: po.UpdatedAt, } }, } // PostOrderFieldCreatedAt orders Post by created_at. PostOrderFieldCreatedAt = &PostOrderField{ Value: func(po *Post) (ent.Value, error) { return po.CreatedAt, nil }, column: post.FieldCreatedAt, toTerm: post.ByCreatedAt, toCursor: func(po *Post) Cursor { return Cursor{ ID: po.ID, Value: po.CreatedAt, } }, } // PostOrderFieldModeratedAt orders Post by moderated_at. PostOrderFieldModeratedAt = &PostOrderField{ Value: func(po *Post) (ent.Value, error) { return po.ModeratedAt, nil }, column: post.FieldModeratedAt, toTerm: post.ByModeratedAt, toCursor: func(po *Post) Cursor { return Cursor{ ID: po.ID, Value: po.ModeratedAt, } }, } // PostOrderFieldCommentsCount orders by COMMENTS_COUNT. PostOrderFieldCommentsCount = &PostOrderField{ Value: func(po *Post) (ent.Value, error) { return po.Value("comments_count") }, column: "comments_count", toTerm: func(opts ...sql.OrderTermOption) post.OrderOption { return post.ByCommentsCount( append(opts, sql.OrderSelectAs("comments_count"))..., ) }, toCursor: func(po *Post) Cursor { cv, _ := po.Value("comments_count") return Cursor{ ID: po.ID, Value: cv, } }, } // PostOrderFieldLikedByCount orders by LIKED_BY_COUNT. PostOrderFieldLikedByCount = &PostOrderField{ Value: func(po *Post) (ent.Value, error) { return po.Value("liked_by_count") }, column: "liked_by_count", toTerm: func(opts ...sql.OrderTermOption) post.OrderOption { return post.ByLikedByCount( append(opts, sql.OrderSelectAs("liked_by_count"))..., ) }, toCursor: func(po *Post) Cursor { cv, _ := po.Value("liked_by_count") return Cursor{ ID: po.ID, Value: cv, } }, } )
var ( // PostCategoryOrderFieldID orders PostCategory by id. PostCategoryOrderFieldID = &PostCategoryOrderField{ Value: func(pc *PostCategory) (ent.Value, error) { return pc.ID, nil }, column: postcategory.FieldID, toTerm: postcategory.ByID, toCursor: func(pc *PostCategory) Cursor { return Cursor{ ID: pc.ID, Value: pc.ID, } }, } // PostCategoryOrderFieldUpdatedAt orders PostCategory by updated_at. PostCategoryOrderFieldUpdatedAt = &PostCategoryOrderField{ Value: func(pc *PostCategory) (ent.Value, error) { return pc.UpdatedAt, nil }, column: postcategory.FieldUpdatedAt, toTerm: postcategory.ByUpdatedAt, toCursor: func(pc *PostCategory) Cursor { return Cursor{ ID: pc.ID, Value: pc.UpdatedAt, } }, } // PostCategoryOrderFieldCreatedAt orders PostCategory by created_at. PostCategoryOrderFieldCreatedAt = &PostCategoryOrderField{ Value: func(pc *PostCategory) (ent.Value, error) { return pc.CreatedAt, nil }, column: postcategory.FieldCreatedAt, toTerm: postcategory.ByCreatedAt, toCursor: func(pc *PostCategory) Cursor { return Cursor{ ID: pc.ID, Value: pc.CreatedAt, } }, } )
var ( // RefreshTokenOrderFieldUpdatedAt orders RefreshToken by updated_at. RefreshTokenOrderFieldUpdatedAt = &RefreshTokenOrderField{ Value: func(rt *RefreshToken) (ent.Value, error) { return rt.UpdatedAt, nil }, column: refreshtoken.FieldUpdatedAt, toTerm: refreshtoken.ByUpdatedAt, toCursor: func(rt *RefreshToken) Cursor { return Cursor{ ID: rt.ID, Value: rt.UpdatedAt, } }, } // RefreshTokenOrderFieldCreatedAt orders RefreshToken by created_at. RefreshTokenOrderFieldCreatedAt = &RefreshTokenOrderField{ Value: func(rt *RefreshToken) (ent.Value, error) { return rt.CreatedAt, nil }, column: refreshtoken.FieldCreatedAt, toTerm: refreshtoken.ByCreatedAt, toCursor: func(rt *RefreshToken) Cursor { return Cursor{ ID: rt.ID, Value: rt.CreatedAt, } }, } )
var ( // UserOrderFieldID orders User by id. UserOrderFieldID = &UserOrderField{ Value: func(u *User) (ent.Value, error) { return u.ID, nil }, column: user.FieldID, toTerm: user.ByID, toCursor: func(u *User) Cursor { return Cursor{ ID: u.ID, Value: u.ID, } }, } // UserOrderFieldUpdatedAt orders User by updated_at. UserOrderFieldUpdatedAt = &UserOrderField{ Value: func(u *User) (ent.Value, error) { return u.UpdatedAt, nil }, column: user.FieldUpdatedAt, toTerm: user.ByUpdatedAt, toCursor: func(u *User) Cursor { return Cursor{ ID: u.ID, Value: u.UpdatedAt, } }, } // UserOrderFieldCreatedAt orders User by created_at. UserOrderFieldCreatedAt = &UserOrderField{ Value: func(u *User) (ent.Value, error) { return u.CreatedAt, nil }, column: user.FieldCreatedAt, toTerm: user.ByCreatedAt, toCursor: func(u *User) Cursor { return Cursor{ ID: u.ID, Value: u.CreatedAt, } }, } )
var DefaultApiKeyOrder = &ApiKeyOrder{ Direction: entgql.OrderDirectionAsc, Field: &ApiKeyOrderField{ Value: func(ak *ApiKey) (ent.Value, error) { return ak.ID, nil }, column: apikey.FieldID, toTerm: apikey.ByID, toCursor: func(ak *ApiKey) Cursor { return Cursor{ID: ak.ID} }, }, }
DefaultApiKeyOrder is the default ordering of ApiKey.
var DefaultCommentOrder = &CommentOrder{ Direction: entgql.OrderDirectionAsc, Field: &CommentOrderField{ Value: func(c *Comment) (ent.Value, error) { return c.ID, nil }, column: comment.FieldID, toTerm: comment.ByID, toCursor: func(c *Comment) Cursor { return Cursor{ID: c.ID} }, }, }
DefaultCommentOrder is the default ordering of Comment.
var DefaultPostCategoryOrder = &PostCategoryOrder{ Direction: entgql.OrderDirectionAsc, Field: &PostCategoryOrderField{ Value: func(pc *PostCategory) (ent.Value, error) { return pc.ID, nil }, column: postcategory.FieldID, toTerm: postcategory.ByID, toCursor: func(pc *PostCategory) Cursor { return Cursor{ID: pc.ID} }, }, }
DefaultPostCategoryOrder is the default ordering of PostCategory.
var DefaultPostOrder = &PostOrder{ Direction: entgql.OrderDirectionAsc, Field: &PostOrderField{ Value: func(po *Post) (ent.Value, error) { return po.ID, nil }, column: post.FieldID, toTerm: post.ByID, toCursor: func(po *Post) Cursor { return Cursor{ID: po.ID} }, }, }
DefaultPostOrder is the default ordering of Post.
var DefaultRefreshTokenOrder = &RefreshTokenOrder{ Direction: entgql.OrderDirectionAsc, Field: &RefreshTokenOrderField{ Value: func(rt *RefreshToken) (ent.Value, error) { return rt.ID, nil }, column: refreshtoken.FieldID, toTerm: refreshtoken.ByID, toCursor: func(rt *RefreshToken) Cursor { return Cursor{ID: rt.ID} }, }, }
DefaultRefreshTokenOrder is the default ordering of RefreshToken.
var DefaultUserOrder = &UserOrder{ Direction: entgql.OrderDirectionAsc, Field: &UserOrderField{ Value: func(u *User) (ent.Value, error) { return u.ID, nil }, column: user.FieldID, toTerm: user.ByID, toCursor: func(u *User) Cursor { return Cursor{ID: u.ID} }, }, }
DefaultUserOrder is the default ordering of User.
var ErrEmptyApiKeyWhereInput = errors.New("generated: empty predicate ApiKeyWhereInput")
ErrEmptyApiKeyWhereInput is returned in case the ApiKeyWhereInput is empty.
var ErrEmptyCommentWhereInput = errors.New("generated: empty predicate CommentWhereInput")
ErrEmptyCommentWhereInput is returned in case the CommentWhereInput is empty.
var ErrEmptyPostCategoryWhereInput = errors.New("generated: empty predicate PostCategoryWhereInput")
ErrEmptyPostCategoryWhereInput is returned in case the PostCategoryWhereInput is empty.
var ErrEmptyPostWhereInput = errors.New("generated: empty predicate PostWhereInput")
ErrEmptyPostWhereInput is returned in case the PostWhereInput is empty.
var ErrEmptyRefreshTokenWhereInput = errors.New("generated: empty predicate RefreshTokenWhereInput")
ErrEmptyRefreshTokenWhereInput is returned in case the RefreshTokenWhereInput is empty.
var ErrEmptyUserWhereInput = errors.New("generated: empty predicate UserWhereInput")
ErrEmptyUserWhereInput is returned in case the UserWhereInput is empty.
var ErrTxStarted = errors.New("generated: 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.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx attached.
func OpenTxFromContext ¶
OpenTxFromContext open transactions from client stored in context.
func PostCategoryEdgeCleanup ¶
func RefreshTokenEdgeCleanup ¶
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(generated.As(generated.Sum(field1), "sum_field1"), (generated.As(generated.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 ApiKey ¶
type ApiKey struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // The user id that owns the object OwnerID uuid.UUID `json:"owner_id,omitempty"` // APIKey holds the value of the "api_key" field. APIKey string `json:"api_key,omitempty"` // ExpiresOn holds the value of the "expires_on" field. ExpiresOn time.Time `json:"expires_on,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ApiKeyQuery when eager-loading is set. Edges ApiKeyEdges `json:"edges"` // contains filtered or unexported fields }
ApiKey is the model entity for the ApiKey schema.
func (*ApiKey) IsNode ¶
func (*ApiKey) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*ApiKey) QueryOwner ¶
QueryOwner queries the "owner" edge of the ApiKey entity.
func (*ApiKey) ToEdge ¶
func (ak *ApiKey) ToEdge(order *ApiKeyOrder) *ApiKeyEdge
ToEdge converts ApiKey into ApiKeyEdge.
func (*ApiKey) Unwrap ¶
Unwrap unwraps the ApiKey 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 (*ApiKey) Update ¶
func (ak *ApiKey) Update() *ApiKeyUpdateOne
Update returns a builder for updating this ApiKey. Note that you need to call ApiKey.Unwrap() before calling this method if this ApiKey was returned from a transaction, and the transaction was committed or rolled back.
type ApiKeyClient ¶
type ApiKeyClient struct {
// contains filtered or unexported fields
}
ApiKeyClient is a client for the ApiKey schema.
func NewApiKeyClient ¶
func NewApiKeyClient(c config) *ApiKeyClient
NewApiKeyClient returns a client for the ApiKey from the given config.
func (*ApiKeyClient) Create ¶
func (c *ApiKeyClient) Create() *ApiKeyCreate
Create returns a builder for creating a ApiKey entity.
func (*ApiKeyClient) CreateBulk ¶
func (c *ApiKeyClient) CreateBulk(builders ...*ApiKeyCreate) *ApiKeyCreateBulk
CreateBulk returns a builder for creating a bulk of ApiKey entities.
func (*ApiKeyClient) Delete ¶
func (c *ApiKeyClient) Delete() *ApiKeyDelete
Delete returns a delete builder for ApiKey.
func (*ApiKeyClient) DeleteOne ¶
func (c *ApiKeyClient) DeleteOne(ak *ApiKey) *ApiKeyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ApiKeyClient) DeleteOneID ¶
func (c *ApiKeyClient) DeleteOneID(id uuid.UUID) *ApiKeyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ApiKeyClient) Intercept ¶
func (c *ApiKeyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `apikey.Intercept(f(g(h())))`.
func (*ApiKeyClient) Interceptors ¶
func (c *ApiKeyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ApiKeyClient) MapCreateBulk ¶
func (c *ApiKeyClient) MapCreateBulk(slice any, setFunc func(*ApiKeyCreate, int)) *ApiKeyCreateBulk
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 (*ApiKeyClient) Query ¶
func (c *ApiKeyClient) Query() *ApiKeyQuery
Query returns a query builder for ApiKey.
func (*ApiKeyClient) QueryOwner ¶
func (c *ApiKeyClient) QueryOwner(ak *ApiKey) *UserQuery
QueryOwner queries the owner edge of a ApiKey.
func (*ApiKeyClient) Update ¶
func (c *ApiKeyClient) Update() *ApiKeyUpdate
Update returns an update builder for ApiKey.
func (*ApiKeyClient) UpdateOne ¶
func (c *ApiKeyClient) UpdateOne(ak *ApiKey) *ApiKeyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ApiKeyClient) UpdateOneID ¶
func (c *ApiKeyClient) UpdateOneID(id uuid.UUID) *ApiKeyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ApiKeyClient) Use ¶
func (c *ApiKeyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `apikey.Hooks(f(g(h())))`.
type ApiKeyConnection ¶
type ApiKeyConnection struct { Edges []*ApiKeyEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
ApiKeyConnection is the connection containing edges to ApiKey.
type ApiKeyCreate ¶
type ApiKeyCreate struct {
// contains filtered or unexported fields
}
ApiKeyCreate is the builder for creating a ApiKey entity.
func (*ApiKeyCreate) Exec ¶
func (akc *ApiKeyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ApiKeyCreate) ExecX ¶
func (akc *ApiKeyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ApiKeyCreate) Mutation ¶
func (akc *ApiKeyCreate) Mutation() *ApiKeyMutation
Mutation returns the ApiKeyMutation object of the builder.
func (*ApiKeyCreate) Save ¶
func (akc *ApiKeyCreate) Save(ctx context.Context) (*ApiKey, error)
Save creates the ApiKey in the database.
func (*ApiKeyCreate) SaveX ¶
func (akc *ApiKeyCreate) SaveX(ctx context.Context) *ApiKey
SaveX calls Save and panics if Save returns an error.
func (*ApiKeyCreate) SetAPIKey ¶
func (akc *ApiKeyCreate) SetAPIKey(s string) *ApiKeyCreate
SetAPIKey sets the "api_key" field.
func (*ApiKeyCreate) SetCreatedAt ¶
func (akc *ApiKeyCreate) SetCreatedAt(t time.Time) *ApiKeyCreate
SetCreatedAt sets the "created_at" field.
func (*ApiKeyCreate) SetExpiresOn ¶
func (akc *ApiKeyCreate) SetExpiresOn(t time.Time) *ApiKeyCreate
SetExpiresOn sets the "expires_on" field.
func (*ApiKeyCreate) SetID ¶
func (akc *ApiKeyCreate) SetID(u uuid.UUID) *ApiKeyCreate
SetID sets the "id" field.
func (*ApiKeyCreate) SetInput ¶
func (c *ApiKeyCreate) SetInput(i CreateApiKeyInput) *ApiKeyCreate
SetInput applies the change-set in the CreateApiKeyInput on the ApiKeyCreate builder.
func (*ApiKeyCreate) SetNillableCreatedAt ¶
func (akc *ApiKeyCreate) SetNillableCreatedAt(t *time.Time) *ApiKeyCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ApiKeyCreate) SetNillableID ¶
func (akc *ApiKeyCreate) SetNillableID(u *uuid.UUID) *ApiKeyCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ApiKeyCreate) SetNillableUpdatedAt ¶
func (akc *ApiKeyCreate) SetNillableUpdatedAt(t *time.Time) *ApiKeyCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ApiKeyCreate) SetOwner ¶
func (akc *ApiKeyCreate) SetOwner(u *User) *ApiKeyCreate
SetOwner sets the "owner" edge to the User entity.
func (*ApiKeyCreate) SetOwnerID ¶
func (akc *ApiKeyCreate) SetOwnerID(u uuid.UUID) *ApiKeyCreate
SetOwnerID sets the "owner_id" field.
func (*ApiKeyCreate) SetUpdatedAt ¶
func (akc *ApiKeyCreate) SetUpdatedAt(t time.Time) *ApiKeyCreate
SetUpdatedAt sets the "updated_at" field.
type ApiKeyCreateBulk ¶
type ApiKeyCreateBulk struct {
// contains filtered or unexported fields
}
ApiKeyCreateBulk is the builder for creating many ApiKey entities in bulk.
func (*ApiKeyCreateBulk) Exec ¶
func (akcb *ApiKeyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ApiKeyCreateBulk) ExecX ¶
func (akcb *ApiKeyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ApiKeyDelete ¶
type ApiKeyDelete struct {
// contains filtered or unexported fields
}
ApiKeyDelete is the builder for deleting a ApiKey entity.
func (*ApiKeyDelete) Exec ¶
func (akd *ApiKeyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ApiKeyDelete) ExecX ¶
func (akd *ApiKeyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ApiKeyDelete) Where ¶
func (akd *ApiKeyDelete) Where(ps ...predicate.ApiKey) *ApiKeyDelete
Where appends a list predicates to the ApiKeyDelete builder.
type ApiKeyDeleteOne ¶
type ApiKeyDeleteOne struct {
// contains filtered or unexported fields
}
ApiKeyDeleteOne is the builder for deleting a single ApiKey entity.
func (*ApiKeyDeleteOne) Exec ¶
func (akdo *ApiKeyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ApiKeyDeleteOne) ExecX ¶
func (akdo *ApiKeyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ApiKeyDeleteOne) Where ¶
func (akdo *ApiKeyDeleteOne) Where(ps ...predicate.ApiKey) *ApiKeyDeleteOne
Where appends a list predicates to the ApiKeyDelete builder.
type ApiKeyEdge ¶
ApiKeyEdge is the edge representation of ApiKey.
type ApiKeyEdges ¶
type ApiKeyEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
ApiKeyEdges holds the relations/edges for other nodes in the graph.
func (ApiKeyEdges) OwnerOrErr ¶
func (e ApiKeyEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ApiKeyFilter ¶
type ApiKeyFilter struct {
// contains filtered or unexported fields
}
ApiKeyFilter provides a generic filtering capability at runtime for ApiKeyQuery.
func (*ApiKeyFilter) Where ¶
func (f *ApiKeyFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*ApiKeyFilter) WhereAPIKey ¶
func (f *ApiKeyFilter) WhereAPIKey(p entql.StringP)
WhereAPIKey applies the entql string predicate on the api_key field.
func (*ApiKeyFilter) WhereCreatedAt ¶
func (f *ApiKeyFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*ApiKeyFilter) WhereExpiresOn ¶
func (f *ApiKeyFilter) WhereExpiresOn(p entql.TimeP)
WhereExpiresOn applies the entql time.Time predicate on the expires_on field.
func (*ApiKeyFilter) WhereHasOwner ¶
func (f *ApiKeyFilter) WhereHasOwner()
WhereHasOwner applies a predicate to check if query has an edge owner.
func (*ApiKeyFilter) WhereHasOwnerWith ¶
func (f *ApiKeyFilter) WhereHasOwnerWith(preds ...predicate.User)
WhereHasOwnerWith applies a predicate to check if query has an edge owner with a given conditions (other predicates).
func (*ApiKeyFilter) WhereID ¶
func (f *ApiKeyFilter) WhereID(p entql.ValueP)
WhereID applies the entql [16]byte predicate on the id field.
func (*ApiKeyFilter) WhereOwnerID ¶
func (f *ApiKeyFilter) WhereOwnerID(p entql.ValueP)
WhereOwnerID applies the entql [16]byte predicate on the owner_id field.
func (*ApiKeyFilter) WhereUpdatedAt ¶
func (f *ApiKeyFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type ApiKeyGroupBy ¶
type ApiKeyGroupBy struct {
// contains filtered or unexported fields
}
ApiKeyGroupBy is the group-by builder for ApiKey entities.
func (*ApiKeyGroupBy) Aggregate ¶
func (akgb *ApiKeyGroupBy) Aggregate(fns ...AggregateFunc) *ApiKeyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ApiKeyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ApiKeyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ApiKeyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ApiKeyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ApiKeyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ApiKeyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ApiKeyGroupBy) Scan ¶
func (akgb *ApiKeyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ApiKeyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ApiKeyMutation ¶
type ApiKeyMutation struct {
// contains filtered or unexported fields
}
ApiKeyMutation represents an operation that mutates the ApiKey nodes in the graph.
func (*ApiKeyMutation) APIKey ¶
func (m *ApiKeyMutation) APIKey() (r string, exists bool)
APIKey returns the value of the "api_key" field in the mutation.
func (*ApiKeyMutation) AddField ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) AddedEdges ¶
func (m *ApiKeyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ApiKeyMutation) AddedField ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) AddedFields ¶
func (m *ApiKeyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ApiKeyMutation) AddedIDs ¶
func (m *ApiKeyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ApiKeyMutation) ClearEdge ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) ClearField ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) ClearOwner ¶
func (m *ApiKeyMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*ApiKeyMutation) ClearedEdges ¶
func (m *ApiKeyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ApiKeyMutation) ClearedFields ¶
func (m *ApiKeyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ApiKeyMutation) Client ¶
func (m ApiKeyMutation) 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 (*ApiKeyMutation) CreatedAt ¶
func (m *ApiKeyMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ApiKeyMutation) EdgeCleared ¶
func (m *ApiKeyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ApiKeyMutation) ExpiresOn ¶
func (m *ApiKeyMutation) ExpiresOn() (r time.Time, exists bool)
ExpiresOn returns the value of the "expires_on" field in the mutation.
func (*ApiKeyMutation) Field ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) FieldCleared ¶
func (m *ApiKeyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ApiKeyMutation) Fields ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) Filter ¶
func (m *ApiKeyMutation) Filter() *ApiKeyFilter
Filter returns an entql.Where implementation to apply filters on the ApiKeyMutation builder.
func (*ApiKeyMutation) ID ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) 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 (*ApiKeyMutation) OldAPIKey ¶
func (m *ApiKeyMutation) OldAPIKey(ctx context.Context) (v string, err error)
OldAPIKey returns the old "api_key" field's value of the ApiKey entity. If the ApiKey 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 (*ApiKeyMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ApiKey entity. If the ApiKey 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 (*ApiKeyMutation) OldExpiresOn ¶
OldExpiresOn returns the old "expires_on" field's value of the ApiKey entity. If the ApiKey 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 (*ApiKeyMutation) 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 (*ApiKeyMutation) OldOwnerID ¶
OldOwnerID returns the old "owner_id" field's value of the ApiKey entity. If the ApiKey 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 (*ApiKeyMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ApiKey entity. If the ApiKey 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 (*ApiKeyMutation) OwnerCleared ¶
func (m *ApiKeyMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*ApiKeyMutation) OwnerID ¶
func (m *ApiKeyMutation) OwnerID() (r uuid.UUID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*ApiKeyMutation) OwnerIDs ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) RemovedEdges ¶
func (m *ApiKeyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ApiKeyMutation) RemovedIDs ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) ResetAPIKey ¶
func (m *ApiKeyMutation) ResetAPIKey()
ResetAPIKey resets all changes to the "api_key" field.
func (*ApiKeyMutation) ResetCreatedAt ¶
func (m *ApiKeyMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ApiKeyMutation) ResetEdge ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) ResetExpiresOn ¶
func (m *ApiKeyMutation) ResetExpiresOn()
ResetExpiresOn resets all changes to the "expires_on" field.
func (*ApiKeyMutation) ResetField ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) ResetOwner ¶
func (m *ApiKeyMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*ApiKeyMutation) ResetOwnerID ¶
func (m *ApiKeyMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*ApiKeyMutation) ResetUpdatedAt ¶
func (m *ApiKeyMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ApiKeyMutation) SetAPIKey ¶
func (m *ApiKeyMutation) SetAPIKey(s string)
SetAPIKey sets the "api_key" field.
func (*ApiKeyMutation) SetCreatedAt ¶
func (m *ApiKeyMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ApiKeyMutation) SetExpiresOn ¶
func (m *ApiKeyMutation) SetExpiresOn(t time.Time)
SetExpiresOn sets the "expires_on" field.
func (*ApiKeyMutation) SetField ¶
func (m *ApiKeyMutation) 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 (*ApiKeyMutation) SetID ¶
func (m *ApiKeyMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ApiKey entities.
func (*ApiKeyMutation) SetOp ¶
func (m *ApiKeyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ApiKeyMutation) SetOwnerID ¶
func (m *ApiKeyMutation) SetOwnerID(u uuid.UUID)
SetOwnerID sets the "owner_id" field.
func (*ApiKeyMutation) SetUpdatedAt ¶
func (m *ApiKeyMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (ApiKeyMutation) Tx ¶
func (m ApiKeyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ApiKeyMutation) Type ¶
func (m *ApiKeyMutation) Type() string
Type returns the node type of this mutation (ApiKey).
func (*ApiKeyMutation) UpdatedAt ¶
func (m *ApiKeyMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ApiKeyMutation) Where ¶
func (m *ApiKeyMutation) Where(ps ...predicate.ApiKey)
Where appends a list predicates to the ApiKeyMutation builder.
func (*ApiKeyMutation) WhereP ¶
func (m *ApiKeyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ApiKeyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ApiKeyOrder ¶
type ApiKeyOrder struct { Direction OrderDirection `json:"direction"` Field *ApiKeyOrderField `json:"field"` }
ApiKeyOrder defines the ordering of ApiKey.
type ApiKeyOrderField ¶
type ApiKeyOrderField struct { // Value extracts the ordering value from the given ApiKey. Value func(*ApiKey) (ent.Value, error) // contains filtered or unexported fields }
ApiKeyOrderField defines the ordering field of ApiKey.
func (ApiKeyOrderField) MarshalGQL ¶
func (f ApiKeyOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (ApiKeyOrderField) String ¶
func (f ApiKeyOrderField) String() string
String implement fmt.Stringer interface.
func (*ApiKeyOrderField) UnmarshalGQL ¶
func (f *ApiKeyOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type ApiKeyPaginateOption ¶
type ApiKeyPaginateOption func(*apikeyPager) error
ApiKeyPaginateOption enables pagination customization.
func WithApiKeyFilter ¶
func WithApiKeyFilter(filter func(*ApiKeyQuery) (*ApiKeyQuery, error)) ApiKeyPaginateOption
WithApiKeyFilter configures pagination filter.
func WithApiKeyOrder ¶
func WithApiKeyOrder(order *ApiKeyOrder) ApiKeyPaginateOption
WithApiKeyOrder configures pagination ordering.
type ApiKeyQuery ¶
type ApiKeyQuery struct {
// contains filtered or unexported fields
}
ApiKeyQuery is the builder for querying ApiKey entities.
func (*ApiKeyQuery) Aggregate ¶
func (akq *ApiKeyQuery) Aggregate(fns ...AggregateFunc) *ApiKeySelect
Aggregate returns a ApiKeySelect configured with the given aggregations.
func (*ApiKeyQuery) All ¶
func (akq *ApiKeyQuery) All(ctx context.Context) ([]*ApiKey, error)
All executes the query and returns a list of ApiKeys.
func (*ApiKeyQuery) AllX ¶
func (akq *ApiKeyQuery) AllX(ctx context.Context) []*ApiKey
AllX is like All, but panics if an error occurs.
func (*ApiKeyQuery) Clone ¶
func (akq *ApiKeyQuery) Clone() *ApiKeyQuery
Clone returns a duplicate of the ApiKeyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ApiKeyQuery) CollectFields ¶
func (ak *ApiKeyQuery) CollectFields(ctx context.Context, satisfies ...string) (*ApiKeyQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*ApiKeyQuery) Count ¶
func (akq *ApiKeyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ApiKeyQuery) CountX ¶
func (akq *ApiKeyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ApiKeyQuery) Exist ¶
func (akq *ApiKeyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ApiKeyQuery) ExistX ¶
func (akq *ApiKeyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ApiKeyQuery) Filter ¶
func (akq *ApiKeyQuery) Filter() *ApiKeyFilter
Filter returns a Filter implementation to apply filters on the ApiKeyQuery builder.
func (*ApiKeyQuery) First ¶
func (akq *ApiKeyQuery) First(ctx context.Context) (*ApiKey, error)
First returns the first ApiKey entity from the query. Returns a *NotFoundError when no ApiKey was found.
func (*ApiKeyQuery) FirstID ¶
FirstID returns the first ApiKey ID from the query. Returns a *NotFoundError when no ApiKey ID was found.
func (*ApiKeyQuery) FirstIDX ¶
func (akq *ApiKeyQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ApiKeyQuery) FirstX ¶
func (akq *ApiKeyQuery) FirstX(ctx context.Context) *ApiKey
FirstX is like First, but panics if an error occurs.
func (*ApiKeyQuery) ForShare ¶
func (akq *ApiKeyQuery) ForShare(opts ...sql.LockOption) *ApiKeyQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*ApiKeyQuery) ForUpdate ¶
func (akq *ApiKeyQuery) ForUpdate(opts ...sql.LockOption) *ApiKeyQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*ApiKeyQuery) GroupBy ¶
func (akq *ApiKeyQuery) GroupBy(field string, fields ...string) *ApiKeyGroupBy
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 { UpdatedAt time.Time `json:"updated_at,omitempty"` Count int `json:"count,omitempty"` } client.ApiKey.Query(). GroupBy(apikey.FieldUpdatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*ApiKeyQuery) IDsX ¶
func (akq *ApiKeyQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ApiKeyQuery) Limit ¶
func (akq *ApiKeyQuery) Limit(limit int) *ApiKeyQuery
Limit the number of records to be returned by this query.
func (*ApiKeyQuery) Modify ¶
func (akq *ApiKeyQuery) Modify(modifiers ...func(s *sql.Selector)) *ApiKeySelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ApiKeyQuery) Offset ¶
func (akq *ApiKeyQuery) Offset(offset int) *ApiKeyQuery
Offset to start from.
func (*ApiKeyQuery) Only ¶
func (akq *ApiKeyQuery) Only(ctx context.Context) (*ApiKey, error)
Only returns a single ApiKey entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ApiKey entity is found. Returns a *NotFoundError when no ApiKey entities are found.
func (*ApiKeyQuery) OnlyID ¶
OnlyID is like Only, but returns the only ApiKey ID in the query. Returns a *NotSingularError when more than one ApiKey ID is found. Returns a *NotFoundError when no entities are found.
func (*ApiKeyQuery) OnlyIDX ¶
func (akq *ApiKeyQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ApiKeyQuery) OnlyX ¶
func (akq *ApiKeyQuery) OnlyX(ctx context.Context) *ApiKey
OnlyX is like Only, but panics if an error occurs.
func (*ApiKeyQuery) Order ¶
func (akq *ApiKeyQuery) Order(o ...apikey.OrderOption) *ApiKeyQuery
Order specifies how the records should be ordered.
func (*ApiKeyQuery) Paginate ¶
func (ak *ApiKeyQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...ApiKeyPaginateOption, ) (*ApiKeyConnection, error)
Paginate executes the query and returns a relay based cursor connection to ApiKey.
func (*ApiKeyQuery) QueryOwner ¶
func (akq *ApiKeyQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*ApiKeyQuery) Select ¶
func (akq *ApiKeyQuery) Select(fields ...string) *ApiKeySelect
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 { UpdatedAt time.Time `json:"updated_at,omitempty"` } client.ApiKey.Query(). Select(apikey.FieldUpdatedAt). Scan(ctx, &v)
func (*ApiKeyQuery) Unique ¶
func (akq *ApiKeyQuery) Unique(unique bool) *ApiKeyQuery
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 (*ApiKeyQuery) Where ¶
func (akq *ApiKeyQuery) Where(ps ...predicate.ApiKey) *ApiKeyQuery
Where adds a new predicate for the ApiKeyQuery builder.
func (*ApiKeyQuery) WithOwner ¶
func (akq *ApiKeyQuery) WithOwner(opts ...func(*UserQuery)) *ApiKeyQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type ApiKeySelect ¶
type ApiKeySelect struct { *ApiKeyQuery // contains filtered or unexported fields }
ApiKeySelect is the builder for selecting fields of ApiKey entities.
func (*ApiKeySelect) Aggregate ¶
func (aks *ApiKeySelect) Aggregate(fns ...AggregateFunc) *ApiKeySelect
Aggregate adds the given aggregation functions to the selector query.
func (*ApiKeySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ApiKeySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ApiKeySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ApiKeySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ApiKeySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ApiKeySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ApiKeySelect) Modify ¶
func (aks *ApiKeySelect) Modify(modifiers ...func(s *sql.Selector)) *ApiKeySelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ApiKeySelect) Scan ¶
func (aks *ApiKeySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ApiKeySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ApiKeyUpdate ¶
type ApiKeyUpdate struct {
// contains filtered or unexported fields
}
ApiKeyUpdate is the builder for updating ApiKey entities.
func (*ApiKeyUpdate) ClearOwner ¶
func (aku *ApiKeyUpdate) ClearOwner() *ApiKeyUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*ApiKeyUpdate) Exec ¶
func (aku *ApiKeyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ApiKeyUpdate) ExecX ¶
func (aku *ApiKeyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ApiKeyUpdate) Modify ¶
func (aku *ApiKeyUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ApiKeyUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ApiKeyUpdate) Mutation ¶
func (aku *ApiKeyUpdate) Mutation() *ApiKeyMutation
Mutation returns the ApiKeyMutation object of the builder.
func (*ApiKeyUpdate) Save ¶
func (aku *ApiKeyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ApiKeyUpdate) SaveX ¶
func (aku *ApiKeyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ApiKeyUpdate) SetAPIKey ¶
func (aku *ApiKeyUpdate) SetAPIKey(s string) *ApiKeyUpdate
SetAPIKey sets the "api_key" field.
func (*ApiKeyUpdate) SetExpiresOn ¶
func (aku *ApiKeyUpdate) SetExpiresOn(t time.Time) *ApiKeyUpdate
SetExpiresOn sets the "expires_on" field.
func (*ApiKeyUpdate) SetInput ¶
func (c *ApiKeyUpdate) SetInput(i UpdateApiKeyInput) *ApiKeyUpdate
SetInput applies the change-set in the UpdateApiKeyInput on the ApiKeyUpdate builder.
func (*ApiKeyUpdate) SetNillableAPIKey ¶
func (aku *ApiKeyUpdate) SetNillableAPIKey(s *string) *ApiKeyUpdate
SetNillableAPIKey sets the "api_key" field if the given value is not nil.
func (*ApiKeyUpdate) SetNillableExpiresOn ¶
func (aku *ApiKeyUpdate) SetNillableExpiresOn(t *time.Time) *ApiKeyUpdate
SetNillableExpiresOn sets the "expires_on" field if the given value is not nil.
func (*ApiKeyUpdate) SetNillableOwnerID ¶
func (aku *ApiKeyUpdate) SetNillableOwnerID(u *uuid.UUID) *ApiKeyUpdate
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*ApiKeyUpdate) SetOwner ¶
func (aku *ApiKeyUpdate) SetOwner(u *User) *ApiKeyUpdate
SetOwner sets the "owner" edge to the User entity.
func (*ApiKeyUpdate) SetOwnerID ¶
func (aku *ApiKeyUpdate) SetOwnerID(u uuid.UUID) *ApiKeyUpdate
SetOwnerID sets the "owner_id" field.
func (*ApiKeyUpdate) SetUpdatedAt ¶
func (aku *ApiKeyUpdate) SetUpdatedAt(t time.Time) *ApiKeyUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ApiKeyUpdate) Where ¶
func (aku *ApiKeyUpdate) Where(ps ...predicate.ApiKey) *ApiKeyUpdate
Where appends a list predicates to the ApiKeyUpdate builder.
type ApiKeyUpdateOne ¶
type ApiKeyUpdateOne struct {
// contains filtered or unexported fields
}
ApiKeyUpdateOne is the builder for updating a single ApiKey entity.
func (*ApiKeyUpdateOne) ClearOwner ¶
func (akuo *ApiKeyUpdateOne) ClearOwner() *ApiKeyUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*ApiKeyUpdateOne) Exec ¶
func (akuo *ApiKeyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ApiKeyUpdateOne) ExecX ¶
func (akuo *ApiKeyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ApiKeyUpdateOne) Modify ¶
func (akuo *ApiKeyUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ApiKeyUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ApiKeyUpdateOne) Mutation ¶
func (akuo *ApiKeyUpdateOne) Mutation() *ApiKeyMutation
Mutation returns the ApiKeyMutation object of the builder.
func (*ApiKeyUpdateOne) Save ¶
func (akuo *ApiKeyUpdateOne) Save(ctx context.Context) (*ApiKey, error)
Save executes the query and returns the updated ApiKey entity.
func (*ApiKeyUpdateOne) SaveX ¶
func (akuo *ApiKeyUpdateOne) SaveX(ctx context.Context) *ApiKey
SaveX is like Save, but panics if an error occurs.
func (*ApiKeyUpdateOne) Select ¶
func (akuo *ApiKeyUpdateOne) Select(field string, fields ...string) *ApiKeyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ApiKeyUpdateOne) SetAPIKey ¶
func (akuo *ApiKeyUpdateOne) SetAPIKey(s string) *ApiKeyUpdateOne
SetAPIKey sets the "api_key" field.
func (*ApiKeyUpdateOne) SetExpiresOn ¶
func (akuo *ApiKeyUpdateOne) SetExpiresOn(t time.Time) *ApiKeyUpdateOne
SetExpiresOn sets the "expires_on" field.
func (*ApiKeyUpdateOne) SetInput ¶
func (c *ApiKeyUpdateOne) SetInput(i UpdateApiKeyInput) *ApiKeyUpdateOne
SetInput applies the change-set in the UpdateApiKeyInput on the ApiKeyUpdateOne builder.
func (*ApiKeyUpdateOne) SetNillableAPIKey ¶
func (akuo *ApiKeyUpdateOne) SetNillableAPIKey(s *string) *ApiKeyUpdateOne
SetNillableAPIKey sets the "api_key" field if the given value is not nil.
func (*ApiKeyUpdateOne) SetNillableExpiresOn ¶
func (akuo *ApiKeyUpdateOne) SetNillableExpiresOn(t *time.Time) *ApiKeyUpdateOne
SetNillableExpiresOn sets the "expires_on" field if the given value is not nil.
func (*ApiKeyUpdateOne) SetNillableOwnerID ¶
func (akuo *ApiKeyUpdateOne) SetNillableOwnerID(u *uuid.UUID) *ApiKeyUpdateOne
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*ApiKeyUpdateOne) SetOwner ¶
func (akuo *ApiKeyUpdateOne) SetOwner(u *User) *ApiKeyUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*ApiKeyUpdateOne) SetOwnerID ¶
func (akuo *ApiKeyUpdateOne) SetOwnerID(u uuid.UUID) *ApiKeyUpdateOne
SetOwnerID sets the "owner_id" field.
func (*ApiKeyUpdateOne) SetUpdatedAt ¶
func (akuo *ApiKeyUpdateOne) SetUpdatedAt(t time.Time) *ApiKeyUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ApiKeyUpdateOne) Where ¶
func (akuo *ApiKeyUpdateOne) Where(ps ...predicate.ApiKey) *ApiKeyUpdateOne
Where appends a list predicates to the ApiKeyUpdate builder.
type ApiKeyWhereInput ¶
type ApiKeyWhereInput struct { Predicates []predicate.ApiKey `json:"-"` Not *ApiKeyWhereInput `json:"not,omitempty"` Or []*ApiKeyWhereInput `json:"or,omitempty"` And []*ApiKeyWhereInput `json:"and,omitempty"` // "id" field predicates. ID *uuid.UUID `json:"id,omitempty"` IDNEQ *uuid.UUID `json:"idNEQ,omitempty"` IDIn []uuid.UUID `json:"idIn,omitempty"` IDNotIn []uuid.UUID `json:"idNotIn,omitempty"` IDGT *uuid.UUID `json:"idGT,omitempty"` IDGTE *uuid.UUID `json:"idGTE,omitempty"` IDLT *uuid.UUID `json:"idLT,omitempty"` IDLTE *uuid.UUID `json:"idLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "api_key" field predicates. APIKey *string `json:"apiKey,omitempty"` APIKeyNEQ *string `json:"apiKeyNEQ,omitempty"` APIKeyIn []string `json:"apiKeyIn,omitempty"` APIKeyNotIn []string `json:"apiKeyNotIn,omitempty"` APIKeyGT *string `json:"apiKeyGT,omitempty"` APIKeyGTE *string `json:"apiKeyGTE,omitempty"` APIKeyLT *string `json:"apiKeyLT,omitempty"` APIKeyLTE *string `json:"apiKeyLTE,omitempty"` APIKeyContains *string `json:"apiKeyContains,omitempty"` APIKeyHasPrefix *string `json:"apiKeyHasPrefix,omitempty"` APIKeyHasSuffix *string `json:"apiKeyHasSuffix,omitempty"` APIKeyEqualFold *string `json:"apiKeyEqualFold,omitempty"` APIKeyContainsFold *string `json:"apiKeyContainsFold,omitempty"` // "expires_on" field predicates. ExpiresOn *time.Time `json:"expiresOn,omitempty"` ExpiresOnNEQ *time.Time `json:"expiresOnNEQ,omitempty"` ExpiresOnIn []time.Time `json:"expiresOnIn,omitempty"` ExpiresOnNotIn []time.Time `json:"expiresOnNotIn,omitempty"` ExpiresOnGT *time.Time `json:"expiresOnGT,omitempty"` ExpiresOnGTE *time.Time `json:"expiresOnGTE,omitempty"` ExpiresOnLT *time.Time `json:"expiresOnLT,omitempty"` ExpiresOnLTE *time.Time `json:"expiresOnLTE,omitempty"` // "owner" edge predicates. HasOwner *bool `json:"hasOwner,omitempty"` HasOwnerWith []*UserWhereInput `json:"hasOwnerWith,omitempty"` }
ApiKeyWhereInput represents a where input for filtering ApiKey queries.
func (*ApiKeyWhereInput) AddPredicates ¶
func (i *ApiKeyWhereInput) AddPredicates(predicates ...predicate.ApiKey)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*ApiKeyWhereInput) Filter ¶
func (i *ApiKeyWhereInput) Filter(q *ApiKeyQuery) (*ApiKeyQuery, error)
Filter applies the ApiKeyWhereInput filter on the ApiKeyQuery builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // ApiKey is the client for interacting with the ApiKey builders. ApiKey *ApiKeyClient // Comment is the client for interacting with the Comment builders. Comment *CommentClient // Post is the client for interacting with the Post builders. Post *PostClient // PostCategory is the client for interacting with the PostCategory builders. PostCategory *PostCategoryClient // RefreshToken is the client for interacting with the RefreshToken builders. RefreshToken *RefreshTokenClient // 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(). ApiKey. 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(...)`.
func (*Client) Node ¶
Node returns the node with given global ID.
This API helpful in case you want to build an administrator tool to browser all types in system.
func (*Client) Noder ¶
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
type Comment ¶
type Comment struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at,omitempty"` // DeletedBy holds the value of the "deleted_by" field. DeletedBy string `json:"deleted_by,omitempty"` // The user id that owns the object OwnerID uuid.UUID `json:"owner_id,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,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) IsNode ¶
func (*Comment) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Comment) QueryOwner ¶
QueryOwner queries the "owner" edge of the Comment entity.
func (*Comment) ToEdge ¶
func (c *Comment) ToEdge(order *CommentOrder) *CommentEdge
ToEdge converts Comment into CommentEdge.
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) QueryOwner ¶
func (c *CommentClient) QueryOwner(co *Comment) *UserQuery
QueryOwner queries the owner edge of a Comment.
func (*CommentClient) QueryPost ¶
func (c *CommentClient) QueryPost(co *Comment) *PostQuery
QueryPost queries the post 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 CommentConnection ¶
type CommentConnection struct { Edges []*CommentEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
CommentConnection is the connection containing edges to Comment.
type CommentCreate ¶
type CommentCreate struct {
// contains filtered or unexported fields
}
CommentCreate is the builder for creating a Comment entity.
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) SetContent ¶
func (cc *CommentCreate) SetContent(s string) *CommentCreate
SetContent sets the "content" field.
func (*CommentCreate) SetCreatedAt ¶
func (cc *CommentCreate) SetCreatedAt(t time.Time) *CommentCreate
SetCreatedAt sets the "created_at" field.
func (*CommentCreate) SetDeletedAt ¶
func (cc *CommentCreate) SetDeletedAt(t time.Time) *CommentCreate
SetDeletedAt sets the "deleted_at" field.
func (*CommentCreate) SetDeletedBy ¶
func (cc *CommentCreate) SetDeletedBy(s string) *CommentCreate
SetDeletedBy sets the "deleted_by" field.
func (*CommentCreate) SetID ¶
func (cc *CommentCreate) SetID(u uuid.UUID) *CommentCreate
SetID sets the "id" field.
func (*CommentCreate) SetInput ¶
func (c *CommentCreate) SetInput(i CreateCommentInput) *CommentCreate
SetInput applies the change-set in the CreateCommentInput on the CommentCreate builder.
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) SetNillableDeletedAt ¶
func (cc *CommentCreate) SetNillableDeletedAt(t *time.Time) *CommentCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CommentCreate) SetNillableDeletedBy ¶
func (cc *CommentCreate) SetNillableDeletedBy(s *string) *CommentCreate
SetNillableDeletedBy sets the "deleted_by" 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) SetNillablePostID ¶
func (cc *CommentCreate) SetNillablePostID(id *uuid.UUID) *CommentCreate
SetNillablePostID sets the "post" edge to the Post entity by ID 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) SetOwner ¶
func (cc *CommentCreate) SetOwner(u *User) *CommentCreate
SetOwner sets the "owner" edge to the User entity.
func (*CommentCreate) SetOwnerID ¶
func (cc *CommentCreate) SetOwnerID(u uuid.UUID) *CommentCreate
SetOwnerID sets the "owner_id" field.
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(id uuid.UUID) *CommentCreate
SetPostID sets the "post" edge to the Post entity by ID.
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 CommentEdge ¶
CommentEdge is the edge representation of Comment.
type CommentEdges ¶
type CommentEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // Post holds the value of the post edge. Post *Post `json:"post,omitempty"` // contains filtered or unexported fields }
CommentEdges holds the relations/edges for other nodes in the graph.
func (CommentEdges) OwnerOrErr ¶
func (e CommentEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
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.
type CommentFilter ¶
type CommentFilter struct {
// contains filtered or unexported fields
}
CommentFilter provides a generic filtering capability at runtime for CommentQuery.
func (*CommentFilter) Where ¶
func (f *CommentFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*CommentFilter) WhereContent ¶
func (f *CommentFilter) WhereContent(p entql.StringP)
WhereContent applies the entql string predicate on the content field.
func (*CommentFilter) WhereCreatedAt ¶
func (f *CommentFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*CommentFilter) WhereDeletedAt ¶
func (f *CommentFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*CommentFilter) WhereDeletedBy ¶
func (f *CommentFilter) WhereDeletedBy(p entql.StringP)
WhereDeletedBy applies the entql string predicate on the deleted_by field.
func (*CommentFilter) WhereHasOwner ¶
func (f *CommentFilter) WhereHasOwner()
WhereHasOwner applies a predicate to check if query has an edge owner.
func (*CommentFilter) WhereHasOwnerWith ¶
func (f *CommentFilter) WhereHasOwnerWith(preds ...predicate.User)
WhereHasOwnerWith applies a predicate to check if query has an edge owner with a given conditions (other predicates).
func (*CommentFilter) WhereHasPost ¶
func (f *CommentFilter) WhereHasPost()
WhereHasPost applies a predicate to check if query has an edge post.
func (*CommentFilter) WhereHasPostWith ¶
func (f *CommentFilter) WhereHasPostWith(preds ...predicate.Post)
WhereHasPostWith applies a predicate to check if query has an edge post with a given conditions (other predicates).
func (*CommentFilter) WhereID ¶
func (f *CommentFilter) WhereID(p entql.ValueP)
WhereID applies the entql [16]byte predicate on the id field.
func (*CommentFilter) WhereOwnerID ¶
func (f *CommentFilter) WhereOwnerID(p entql.ValueP)
WhereOwnerID applies the entql [16]byte predicate on the owner_id field.
func (*CommentFilter) WhereUpdatedAt ¶
func (f *CommentFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
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) 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) ClearDeletedAt ¶
func (m *CommentMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CommentMutation) ClearDeletedBy ¶
func (m *CommentMutation) ClearDeletedBy()
ClearDeletedBy clears the value of the "deleted_by" field.
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) ClearOwner ¶
func (m *CommentMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*CommentMutation) ClearPost ¶
func (m *CommentMutation) ClearPost()
ClearPost clears the "post" edge to the Post 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) Content ¶
func (m *CommentMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
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) DeletedAt ¶
func (m *CommentMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*CommentMutation) DeletedAtCleared ¶
func (m *CommentMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*CommentMutation) DeletedBy ¶
func (m *CommentMutation) DeletedBy() (r string, exists bool)
DeletedBy returns the value of the "deleted_by" field in the mutation.
func (*CommentMutation) DeletedByCleared ¶
func (m *CommentMutation) DeletedByCleared() bool
DeletedByCleared returns if the "deleted_by" field was cleared in this 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) Filter ¶
func (m *CommentMutation) Filter() *CommentFilter
Filter returns an entql.Where implementation to apply filters on the CommentMutation builder.
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) OldContent ¶
func (m *CommentMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" 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) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_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) OldDeletedBy ¶
func (m *CommentMutation) OldDeletedBy(ctx context.Context) (v string, err error)
OldDeletedBy returns the old "deleted_by" 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) OldOwnerID ¶
OldOwnerID returns the old "owner_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) 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) OwnerCleared ¶
func (m *CommentMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*CommentMutation) OwnerID ¶
func (m *CommentMutation) OwnerID() (r uuid.UUID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*CommentMutation) OwnerIDs ¶
func (m *CommentMutation) 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 (*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() (id uuid.UUID, exists bool)
PostID returns the "post" edge ID 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) 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) ResetContent ¶
func (m *CommentMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*CommentMutation) ResetCreatedAt ¶
func (m *CommentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CommentMutation) ResetDeletedAt ¶
func (m *CommentMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*CommentMutation) ResetDeletedBy ¶
func (m *CommentMutation) ResetDeletedBy()
ResetDeletedBy resets all changes to the "deleted_by" 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) ResetOwner ¶
func (m *CommentMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*CommentMutation) ResetOwnerID ¶
func (m *CommentMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*CommentMutation) ResetPost ¶
func (m *CommentMutation) ResetPost()
ResetPost resets all changes to the "post" edge.
func (*CommentMutation) ResetUpdatedAt ¶
func (m *CommentMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CommentMutation) SetContent ¶
func (m *CommentMutation) SetContent(s string)
SetContent sets the "content" field.
func (*CommentMutation) SetCreatedAt ¶
func (m *CommentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CommentMutation) SetDeletedAt ¶
func (m *CommentMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*CommentMutation) SetDeletedBy ¶
func (m *CommentMutation) SetDeletedBy(s string)
SetDeletedBy sets the "deleted_by" 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) SetOwnerID ¶
func (m *CommentMutation) SetOwnerID(u uuid.UUID)
SetOwnerID sets the "owner_id" field.
func (*CommentMutation) SetPostID ¶
func (m *CommentMutation) SetPostID(id uuid.UUID)
SetPostID sets the "post" edge to the Post entity by id.
func (*CommentMutation) SetUpdatedAt ¶
func (m *CommentMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
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 CommentOrder ¶
type CommentOrder struct { Direction OrderDirection `json:"direction"` Field *CommentOrderField `json:"field"` }
CommentOrder defines the ordering of Comment.
type CommentOrderField ¶
type CommentOrderField struct { // Value extracts the ordering value from the given Comment. Value func(*Comment) (ent.Value, error) // contains filtered or unexported fields }
CommentOrderField defines the ordering field of Comment.
func (CommentOrderField) MarshalGQL ¶
func (f CommentOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (CommentOrderField) String ¶
func (f CommentOrderField) String() string
String implement fmt.Stringer interface.
func (*CommentOrderField) UnmarshalGQL ¶
func (f *CommentOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type CommentPaginateOption ¶
type CommentPaginateOption func(*commentPager) error
CommentPaginateOption enables pagination customization.
func WithCommentFilter ¶
func WithCommentFilter(filter func(*CommentQuery) (*CommentQuery, error)) CommentPaginateOption
WithCommentFilter configures pagination filter.
func WithCommentOrder ¶
func WithCommentOrder(order *CommentOrder) CommentPaginateOption
WithCommentOrder configures pagination ordering.
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) CollectFields ¶
func (c *CommentQuery) CollectFields(ctx context.Context, satisfies ...string) (*CommentQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
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) Filter ¶
func (cq *CommentQuery) Filter() *CommentFilter
Filter returns a Filter implementation to apply filters on the CommentQuery builder.
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) ForShare ¶
func (cq *CommentQuery) ForShare(opts ...sql.LockOption) *CommentQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*CommentQuery) ForUpdate ¶
func (cq *CommentQuery) ForUpdate(opts ...sql.LockOption) *CommentQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
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 { UpdatedAt time.Time `json:"updated_at,omitempty"` Count int `json:"count,omitempty"` } client.Comment.Query(). GroupBy(comment.FieldUpdatedAt). Aggregate(generated.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) Modify ¶
func (cq *CommentQuery) Modify(modifiers ...func(s *sql.Selector)) *CommentSelect
Modify adds a query modifier for attaching custom logic to queries.
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) Paginate ¶
func (c *CommentQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...CommentPaginateOption, ) (*CommentConnection, error)
Paginate executes the query and returns a relay based cursor connection to Comment.
func (*CommentQuery) QueryOwner ¶
func (cq *CommentQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*CommentQuery) QueryPost ¶
func (cq *CommentQuery) QueryPost() *PostQuery
QueryPost chains the current query on the "post" 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 { UpdatedAt time.Time `json:"updated_at,omitempty"` } client.Comment.Query(). Select(comment.FieldUpdatedAt). 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) WithOwner ¶
func (cq *CommentQuery) WithOwner(opts ...func(*UserQuery)) *CommentQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" 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.
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) Modify ¶
func (cs *CommentSelect) Modify(modifiers ...func(s *sql.Selector)) *CommentSelect
Modify adds a query modifier for attaching custom logic to queries.
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) ClearDeletedAt ¶
func (cu *CommentUpdate) ClearDeletedAt() *CommentUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CommentUpdate) ClearDeletedBy ¶
func (cu *CommentUpdate) ClearDeletedBy() *CommentUpdate
ClearDeletedBy clears the value of the "deleted_by" field.
func (*CommentUpdate) ClearOwner ¶
func (cu *CommentUpdate) ClearOwner() *CommentUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*CommentUpdate) ClearPost ¶
func (cu *CommentUpdate) ClearPost() *CommentUpdate
ClearPost clears the "post" edge to the Post 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) Modify ¶
func (cu *CommentUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CommentUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*CommentUpdate) Mutation ¶
func (cu *CommentUpdate) Mutation() *CommentMutation
Mutation returns the CommentMutation object of the builder.
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) SetContent ¶
func (cu *CommentUpdate) SetContent(s string) *CommentUpdate
SetContent sets the "content" field.
func (*CommentUpdate) SetDeletedAt ¶
func (cu *CommentUpdate) SetDeletedAt(t time.Time) *CommentUpdate
SetDeletedAt sets the "deleted_at" field.
func (*CommentUpdate) SetDeletedBy ¶
func (cu *CommentUpdate) SetDeletedBy(s string) *CommentUpdate
SetDeletedBy sets the "deleted_by" field.
func (*CommentUpdate) SetInput ¶
func (c *CommentUpdate) SetInput(i UpdateCommentInput) *CommentUpdate
SetInput applies the change-set in the UpdateCommentInput on the CommentUpdate builder.
func (*CommentUpdate) SetNillableContent ¶
func (cu *CommentUpdate) SetNillableContent(s *string) *CommentUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*CommentUpdate) SetNillableDeletedAt ¶
func (cu *CommentUpdate) SetNillableDeletedAt(t *time.Time) *CommentUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CommentUpdate) SetNillableDeletedBy ¶
func (cu *CommentUpdate) SetNillableDeletedBy(s *string) *CommentUpdate
SetNillableDeletedBy sets the "deleted_by" field if the given value is not nil.
func (*CommentUpdate) SetNillableOwnerID ¶
func (cu *CommentUpdate) SetNillableOwnerID(u *uuid.UUID) *CommentUpdate
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*CommentUpdate) SetNillablePostID ¶
func (cu *CommentUpdate) SetNillablePostID(id *uuid.UUID) *CommentUpdate
SetNillablePostID sets the "post" edge to the Post entity by ID if the given value is not nil.
func (*CommentUpdate) SetOwner ¶
func (cu *CommentUpdate) SetOwner(u *User) *CommentUpdate
SetOwner sets the "owner" edge to the User entity.
func (*CommentUpdate) SetOwnerID ¶
func (cu *CommentUpdate) SetOwnerID(u uuid.UUID) *CommentUpdate
SetOwnerID sets the "owner_id" field.
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(id uuid.UUID) *CommentUpdate
SetPostID sets the "post" edge to the Post entity by ID.
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) ClearDeletedAt ¶
func (cuo *CommentUpdateOne) ClearDeletedAt() *CommentUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CommentUpdateOne) ClearDeletedBy ¶
func (cuo *CommentUpdateOne) ClearDeletedBy() *CommentUpdateOne
ClearDeletedBy clears the value of the "deleted_by" field.
func (*CommentUpdateOne) ClearOwner ¶
func (cuo *CommentUpdateOne) ClearOwner() *CommentUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*CommentUpdateOne) ClearPost ¶
func (cuo *CommentUpdateOne) ClearPost() *CommentUpdateOne
ClearPost clears the "post" edge to the Post 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) Modify ¶
func (cuo *CommentUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CommentUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*CommentUpdateOne) Mutation ¶
func (cuo *CommentUpdateOne) Mutation() *CommentMutation
Mutation returns the CommentMutation object of the builder.
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) SetContent ¶
func (cuo *CommentUpdateOne) SetContent(s string) *CommentUpdateOne
SetContent sets the "content" field.
func (*CommentUpdateOne) SetDeletedAt ¶
func (cuo *CommentUpdateOne) SetDeletedAt(t time.Time) *CommentUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*CommentUpdateOne) SetDeletedBy ¶
func (cuo *CommentUpdateOne) SetDeletedBy(s string) *CommentUpdateOne
SetDeletedBy sets the "deleted_by" field.
func (*CommentUpdateOne) SetInput ¶
func (c *CommentUpdateOne) SetInput(i UpdateCommentInput) *CommentUpdateOne
SetInput applies the change-set in the UpdateCommentInput on the CommentUpdateOne builder.
func (*CommentUpdateOne) SetNillableContent ¶
func (cuo *CommentUpdateOne) SetNillableContent(s *string) *CommentUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableDeletedAt ¶
func (cuo *CommentUpdateOne) SetNillableDeletedAt(t *time.Time) *CommentUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableDeletedBy ¶
func (cuo *CommentUpdateOne) SetNillableDeletedBy(s *string) *CommentUpdateOne
SetNillableDeletedBy sets the "deleted_by" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableOwnerID ¶
func (cuo *CommentUpdateOne) SetNillableOwnerID(u *uuid.UUID) *CommentUpdateOne
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*CommentUpdateOne) SetNillablePostID ¶
func (cuo *CommentUpdateOne) SetNillablePostID(id *uuid.UUID) *CommentUpdateOne
SetNillablePostID sets the "post" edge to the Post entity by ID if the given value is not nil.
func (*CommentUpdateOne) SetOwner ¶
func (cuo *CommentUpdateOne) SetOwner(u *User) *CommentUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*CommentUpdateOne) SetOwnerID ¶
func (cuo *CommentUpdateOne) SetOwnerID(u uuid.UUID) *CommentUpdateOne
SetOwnerID sets the "owner_id" field.
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(id uuid.UUID) *CommentUpdateOne
SetPostID sets the "post" edge to the Post entity by ID.
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 CommentWhereInput ¶
type CommentWhereInput struct { Predicates []predicate.Comment `json:"-"` Not *CommentWhereInput `json:"not,omitempty"` Or []*CommentWhereInput `json:"or,omitempty"` And []*CommentWhereInput `json:"and,omitempty"` // "id" field predicates. ID *uuid.UUID `json:"id,omitempty"` IDNEQ *uuid.UUID `json:"idNEQ,omitempty"` IDIn []uuid.UUID `json:"idIn,omitempty"` IDNotIn []uuid.UUID `json:"idNotIn,omitempty"` IDGT *uuid.UUID `json:"idGT,omitempty"` IDGTE *uuid.UUID `json:"idGTE,omitempty"` IDLT *uuid.UUID `json:"idLT,omitempty"` IDLTE *uuid.UUID `json:"idLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` DeletedAtIsNil bool `json:"deletedAtIsNil,omitempty"` DeletedAtNotNil bool `json:"deletedAtNotNil,omitempty"` // "deleted_by" field predicates. DeletedBy *string `json:"deletedBy,omitempty"` DeletedByNEQ *string `json:"deletedByNEQ,omitempty"` DeletedByIn []string `json:"deletedByIn,omitempty"` DeletedByNotIn []string `json:"deletedByNotIn,omitempty"` DeletedByGT *string `json:"deletedByGT,omitempty"` DeletedByGTE *string `json:"deletedByGTE,omitempty"` DeletedByLT *string `json:"deletedByLT,omitempty"` DeletedByLTE *string `json:"deletedByLTE,omitempty"` DeletedByContains *string `json:"deletedByContains,omitempty"` DeletedByHasPrefix *string `json:"deletedByHasPrefix,omitempty"` DeletedByHasSuffix *string `json:"deletedByHasSuffix,omitempty"` DeletedByIsNil bool `json:"deletedByIsNil,omitempty"` DeletedByNotNil bool `json:"deletedByNotNil,omitempty"` DeletedByEqualFold *string `json:"deletedByEqualFold,omitempty"` DeletedByContainsFold *string `json:"deletedByContainsFold,omitempty"` // "content" field predicates. Content *string `json:"content,omitempty"` ContentNEQ *string `json:"contentNEQ,omitempty"` ContentIn []string `json:"contentIn,omitempty"` ContentNotIn []string `json:"contentNotIn,omitempty"` ContentGT *string `json:"contentGT,omitempty"` ContentGTE *string `json:"contentGTE,omitempty"` ContentLT *string `json:"contentLT,omitempty"` ContentLTE *string `json:"contentLTE,omitempty"` ContentContains *string `json:"contentContains,omitempty"` ContentHasPrefix *string `json:"contentHasPrefix,omitempty"` ContentHasSuffix *string `json:"contentHasSuffix,omitempty"` ContentEqualFold *string `json:"contentEqualFold,omitempty"` ContentContainsFold *string `json:"contentContainsFold,omitempty"` // "owner" edge predicates. HasOwner *bool `json:"hasOwner,omitempty"` HasOwnerWith []*UserWhereInput `json:"hasOwnerWith,omitempty"` // "post" edge predicates. HasPost *bool `json:"hasPost,omitempty"` HasPostWith []*PostWhereInput `json:"hasPostWith,omitempty"` // Deleted record filter options. IncludeDeleted *bool `json:"includeDeleted,omitempty"` IncludeDeletedOnly *bool `json:"includeDeletedOnly,omitempty"` }
CommentWhereInput represents a where input for filtering Comment queries.
func (*CommentWhereInput) AddPredicates ¶
func (i *CommentWhereInput) AddPredicates(predicates ...predicate.Comment)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*CommentWhereInput) Filter ¶
func (i *CommentWhereInput) Filter(q *CommentQuery) (*CommentQuery, error)
Filter applies the CommentWhereInput filter on the CommentQuery 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 CreateApiKeyInput ¶
CreateApiKeyInput represents a mutation input for creating apikeys.
func (*CreateApiKeyInput) Mutate ¶
func (i *CreateApiKeyInput) Mutate(m *ApiKeyMutation)
Mutate applies the CreateApiKeyInput on the ApiKeyMutation builder.
type CreateCommentInput ¶
CreateCommentInput represents a mutation input for creating comments.
func (*CreateCommentInput) Mutate ¶
func (i *CreateCommentInput) Mutate(m *CommentMutation)
Mutate applies the CreateCommentInput on the CommentMutation builder.
type CreatePostCategoryInput ¶
type CreatePostCategoryInput struct { Category postcategory.Category PostID *uuid.UUID }
CreatePostCategoryInput represents a mutation input for creating postcategories.
func (*CreatePostCategoryInput) Mutate ¶
func (i *CreatePostCategoryInput) Mutate(m *PostCategoryMutation)
Mutate applies the CreatePostCategoryInput on the PostCategoryMutation builder.
type CreatePostInput ¶
type CreatePostInput struct { Pinned *bool Title string Content *string Link string ModerationComment *string IsModerated *bool OwnerID uuid.UUID CommentIDs []uuid.UUID SavedByIDs []uuid.UUID LikedByIDs []uuid.UUID CategoryIDs []uuid.UUID }
CreatePostInput represents a mutation input for creating posts.
func (*CreatePostInput) Mutate ¶
func (i *CreatePostInput) Mutate(m *PostMutation)
Mutate applies the CreatePostInput on the PostMutation builder.
type CreateRefreshTokenInput ¶
type CreateRefreshTokenInput struct { ExpiresAt time.Time Revoked *bool IPAddress *string UserAgent *string OwnerID uuid.UUID }
CreateRefreshTokenInput represents a mutation input for creating refreshtokens.
func (*CreateRefreshTokenInput) Mutate ¶
func (i *CreateRefreshTokenInput) Mutate(m *RefreshTokenMutation)
Mutate applies the CreateRefreshTokenInput on the RefreshTokenMutation builder.
type CreateUserInput ¶
type CreateUserInput struct { DisplayName string Alias *string ProfileImage *string AuthProvider *user.AuthProvider Role *user.Role LastSeenAt *time.Time LastPostSeenCursor *string Awards []string SavedPostIDs []uuid.UUID LikedPostIDs []uuid.UUID PublishedPostIDs []uuid.UUID CommentIDs []uuid.UUID APIKeyIDs []uuid.UUID }
CreateUserInput represents a mutation input for creating users.
func (*CreateUserInput) Mutate ¶
func (i *CreateUserInput) Mutate(m *UserMutation)
Mutate applies the CreateUserInput on the UserMutation builder.
type Edge ¶
type Edge struct { Type string `json:"type,omitempty"` // edge type. Name string `json:"name,omitempty"` // edge name. IDs []uuid.UUID `json:"ids,omitempty"` // node ids (where this edge point to). }
Edges between two nodes.
type Field ¶
type Field struct { Type string `json:"type,omitempty"` // field type. Name string `json:"name,omitempty"` // field name (as in struct). Value string `json:"value,omitempty"` // stringified value. }
Field of a node.
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 MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type Node ¶
type Node struct { ID uuid.UUID `json:"id,omitempty"` // node id. Type string `json:"type,omitempty"` // node type. Fields []*Field `json:"fields,omitempty"` // node fields. Edges []*Edge `json:"edges,omitempty"` // node edges. }
Node in the graph.
type NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type Post ¶
type Post struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at,omitempty"` // DeletedBy holds the value of the "deleted_by" field. DeletedBy string `json:"deleted_by,omitempty"` // The user id that owns the object OwnerID uuid.UUID `json:"owner_id,omitempty"` // Pinned holds the value of the "pinned" field. Pinned bool `json:"pinned,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Content holds the value of the "content" field. Content *string `json:"content,omitempty"` // Link holds the value of the "link" field. Link string `json:"link,omitempty"` // ModerationComment holds the value of the "moderation_comment" field. ModerationComment string `json:"moderation_comment,omitempty"` // IsModerated holds the value of the "is_moderated" field. IsModerated bool `json:"is_moderated,omitempty"` // ModeratedAt holds the value of the "moderated_at" field. ModeratedAt *time.Time `json:"moderated_at,omitempty"` // EntityVector holds the value of the "entity_vector" field. EntityVector string `json:"entity_vector,omitempty"` // Metadata holds the value of the "metadata" field. Metadata extramodel.PostMetadata `json:"metadata,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) Categories ¶
func (po *Post) Categories(ctx context.Context) (result []*PostCategory, err error)
func (*Post) Comments ¶
func (po *Post) Comments( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *CommentOrder, where *CommentWhereInput, ) (*CommentConnection, error)
func (*Post) NamedCategories ¶
func (po *Post) NamedCategories(name string) ([]*PostCategory, error)
NamedCategories returns the Categories named value or an error if the edge was not loaded in eager-loading with this name.
func (*Post) NamedComments ¶
NamedComments returns the Comments named value or an error if the edge was not loaded in eager-loading with this name.
func (*Post) NamedLikedBy ¶
NamedLikedBy returns the LikedBy named value or an error if the edge was not loaded in eager-loading with this name.
func (*Post) NamedSavedBy ¶
NamedSavedBy returns the SavedBy named value or an error if the edge was not loaded in eager-loading with this name.
func (*Post) QueryCategories ¶
func (po *Post) QueryCategories() *PostCategoryQuery
QueryCategories queries the "categories" edge of the Post entity.
func (*Post) QueryComments ¶
func (po *Post) QueryComments() *CommentQuery
QueryComments queries the "comments" edge of the Post entity.
func (*Post) QueryLikedBy ¶
QueryLikedBy queries the "liked_by" edge of the Post entity.
func (*Post) QueryOwner ¶
QueryOwner queries the "owner" edge of the Post entity.
func (*Post) QuerySavedBy ¶
QuerySavedBy queries the "saved_by" 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 PostCategories ¶
type PostCategories []*PostCategory
PostCategories is a parsable slice of PostCategory.
type PostCategory ¶
type PostCategory struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Category holds the value of the "category" field. Category postcategory.Category `json:"category,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PostCategoryQuery when eager-loading is set. Edges PostCategoryEdges `json:"edges"` // contains filtered or unexported fields }
PostCategory is the model entity for the PostCategory schema.
func (*PostCategory) IsNode ¶
func (*PostCategory) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*PostCategory) Node ¶
func (pc *PostCategory) Node(ctx context.Context) (node *Node, err error)
Node implements Noder interface
func (*PostCategory) QueryPost ¶
func (pc *PostCategory) QueryPost() *PostQuery
QueryPost queries the "post" edge of the PostCategory entity.
func (*PostCategory) String ¶
func (pc *PostCategory) String() string
String implements the fmt.Stringer.
func (*PostCategory) ToEdge ¶
func (pc *PostCategory) ToEdge(order *PostCategoryOrder) *PostCategoryEdge
ToEdge converts PostCategory into PostCategoryEdge.
func (*PostCategory) Unwrap ¶
func (pc *PostCategory) Unwrap() *PostCategory
Unwrap unwraps the PostCategory 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 (*PostCategory) Update ¶
func (pc *PostCategory) Update() *PostCategoryUpdateOne
Update returns a builder for updating this PostCategory. Note that you need to call PostCategory.Unwrap() before calling this method if this PostCategory was returned from a transaction, and the transaction was committed or rolled back.
type PostCategoryClient ¶
type PostCategoryClient struct {
// contains filtered or unexported fields
}
PostCategoryClient is a client for the PostCategory schema.
func NewPostCategoryClient ¶
func NewPostCategoryClient(c config) *PostCategoryClient
NewPostCategoryClient returns a client for the PostCategory from the given config.
func (*PostCategoryClient) Create ¶
func (c *PostCategoryClient) Create() *PostCategoryCreate
Create returns a builder for creating a PostCategory entity.
func (*PostCategoryClient) CreateBulk ¶
func (c *PostCategoryClient) CreateBulk(builders ...*PostCategoryCreate) *PostCategoryCreateBulk
CreateBulk returns a builder for creating a bulk of PostCategory entities.
func (*PostCategoryClient) Delete ¶
func (c *PostCategoryClient) Delete() *PostCategoryDelete
Delete returns a delete builder for PostCategory.
func (*PostCategoryClient) DeleteOne ¶
func (c *PostCategoryClient) DeleteOne(pc *PostCategory) *PostCategoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PostCategoryClient) DeleteOneID ¶
func (c *PostCategoryClient) DeleteOneID(id uuid.UUID) *PostCategoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PostCategoryClient) Get ¶
func (c *PostCategoryClient) Get(ctx context.Context, id uuid.UUID) (*PostCategory, error)
Get returns a PostCategory entity by its id.
func (*PostCategoryClient) GetX ¶
func (c *PostCategoryClient) GetX(ctx context.Context, id uuid.UUID) *PostCategory
GetX is like Get, but panics if an error occurs.
func (*PostCategoryClient) Hooks ¶
func (c *PostCategoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PostCategoryClient) Intercept ¶
func (c *PostCategoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `postcategory.Intercept(f(g(h())))`.
func (*PostCategoryClient) Interceptors ¶
func (c *PostCategoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PostCategoryClient) MapCreateBulk ¶
func (c *PostCategoryClient) MapCreateBulk(slice any, setFunc func(*PostCategoryCreate, int)) *PostCategoryCreateBulk
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 (*PostCategoryClient) Query ¶
func (c *PostCategoryClient) Query() *PostCategoryQuery
Query returns a query builder for PostCategory.
func (*PostCategoryClient) QueryPost ¶
func (c *PostCategoryClient) QueryPost(pc *PostCategory) *PostQuery
QueryPost queries the post edge of a PostCategory.
func (*PostCategoryClient) Update ¶
func (c *PostCategoryClient) Update() *PostCategoryUpdate
Update returns an update builder for PostCategory.
func (*PostCategoryClient) UpdateOne ¶
func (c *PostCategoryClient) UpdateOne(pc *PostCategory) *PostCategoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PostCategoryClient) UpdateOneID ¶
func (c *PostCategoryClient) UpdateOneID(id uuid.UUID) *PostCategoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PostCategoryClient) Use ¶
func (c *PostCategoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `postcategory.Hooks(f(g(h())))`.
type PostCategoryConnection ¶
type PostCategoryConnection struct { Edges []*PostCategoryEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
PostCategoryConnection is the connection containing edges to PostCategory.
type PostCategoryCreate ¶
type PostCategoryCreate struct {
// contains filtered or unexported fields
}
PostCategoryCreate is the builder for creating a PostCategory entity.
func (*PostCategoryCreate) Exec ¶
func (pcc *PostCategoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PostCategoryCreate) ExecX ¶
func (pcc *PostCategoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostCategoryCreate) Mutation ¶
func (pcc *PostCategoryCreate) Mutation() *PostCategoryMutation
Mutation returns the PostCategoryMutation object of the builder.
func (*PostCategoryCreate) Save ¶
func (pcc *PostCategoryCreate) Save(ctx context.Context) (*PostCategory, error)
Save creates the PostCategory in the database.
func (*PostCategoryCreate) SaveX ¶
func (pcc *PostCategoryCreate) SaveX(ctx context.Context) *PostCategory
SaveX calls Save and panics if Save returns an error.
func (*PostCategoryCreate) SetCategory ¶
func (pcc *PostCategoryCreate) SetCategory(po postcategory.Category) *PostCategoryCreate
SetCategory sets the "category" field.
func (*PostCategoryCreate) SetCreatedAt ¶
func (pcc *PostCategoryCreate) SetCreatedAt(t time.Time) *PostCategoryCreate
SetCreatedAt sets the "created_at" field.
func (*PostCategoryCreate) SetID ¶
func (pcc *PostCategoryCreate) SetID(u uuid.UUID) *PostCategoryCreate
SetID sets the "id" field.
func (*PostCategoryCreate) SetInput ¶
func (c *PostCategoryCreate) SetInput(i CreatePostCategoryInput) *PostCategoryCreate
SetInput applies the change-set in the CreatePostCategoryInput on the PostCategoryCreate builder.
func (*PostCategoryCreate) SetNillableCreatedAt ¶
func (pcc *PostCategoryCreate) SetNillableCreatedAt(t *time.Time) *PostCategoryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PostCategoryCreate) SetNillableID ¶
func (pcc *PostCategoryCreate) SetNillableID(u *uuid.UUID) *PostCategoryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*PostCategoryCreate) SetNillablePostID ¶
func (pcc *PostCategoryCreate) SetNillablePostID(id *uuid.UUID) *PostCategoryCreate
SetNillablePostID sets the "post" edge to the Post entity by ID if the given value is not nil.
func (*PostCategoryCreate) SetNillableUpdatedAt ¶
func (pcc *PostCategoryCreate) SetNillableUpdatedAt(t *time.Time) *PostCategoryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PostCategoryCreate) SetPost ¶
func (pcc *PostCategoryCreate) SetPost(p *Post) *PostCategoryCreate
SetPost sets the "post" edge to the Post entity.
func (*PostCategoryCreate) SetPostID ¶
func (pcc *PostCategoryCreate) SetPostID(id uuid.UUID) *PostCategoryCreate
SetPostID sets the "post" edge to the Post entity by ID.
func (*PostCategoryCreate) SetUpdatedAt ¶
func (pcc *PostCategoryCreate) SetUpdatedAt(t time.Time) *PostCategoryCreate
SetUpdatedAt sets the "updated_at" field.
type PostCategoryCreateBulk ¶
type PostCategoryCreateBulk struct {
// contains filtered or unexported fields
}
PostCategoryCreateBulk is the builder for creating many PostCategory entities in bulk.
func (*PostCategoryCreateBulk) Exec ¶
func (pccb *PostCategoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PostCategoryCreateBulk) ExecX ¶
func (pccb *PostCategoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostCategoryCreateBulk) Save ¶
func (pccb *PostCategoryCreateBulk) Save(ctx context.Context) ([]*PostCategory, error)
Save creates the PostCategory entities in the database.
func (*PostCategoryCreateBulk) SaveX ¶
func (pccb *PostCategoryCreateBulk) SaveX(ctx context.Context) []*PostCategory
SaveX is like Save, but panics if an error occurs.
type PostCategoryDelete ¶
type PostCategoryDelete struct {
// contains filtered or unexported fields
}
PostCategoryDelete is the builder for deleting a PostCategory entity.
func (*PostCategoryDelete) Exec ¶
func (pcd *PostCategoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PostCategoryDelete) ExecX ¶
func (pcd *PostCategoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PostCategoryDelete) Where ¶
func (pcd *PostCategoryDelete) Where(ps ...predicate.PostCategory) *PostCategoryDelete
Where appends a list predicates to the PostCategoryDelete builder.
type PostCategoryDeleteOne ¶
type PostCategoryDeleteOne struct {
// contains filtered or unexported fields
}
PostCategoryDeleteOne is the builder for deleting a single PostCategory entity.
func (*PostCategoryDeleteOne) Exec ¶
func (pcdo *PostCategoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PostCategoryDeleteOne) ExecX ¶
func (pcdo *PostCategoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostCategoryDeleteOne) Where ¶
func (pcdo *PostCategoryDeleteOne) Where(ps ...predicate.PostCategory) *PostCategoryDeleteOne
Where appends a list predicates to the PostCategoryDelete builder.
type PostCategoryEdge ¶
type PostCategoryEdge struct { Node *PostCategory `json:"node"` Cursor Cursor `json:"cursor"` }
PostCategoryEdge is the edge representation of PostCategory.
type PostCategoryEdges ¶
type PostCategoryEdges struct { // Post holds the value of the post edge. Post *Post `json:"post,omitempty"` // contains filtered or unexported fields }
PostCategoryEdges holds the relations/edges for other nodes in the graph.
func (PostCategoryEdges) PostOrErr ¶
func (e PostCategoryEdges) 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.
type PostCategoryFilter ¶
type PostCategoryFilter struct {
// contains filtered or unexported fields
}
PostCategoryFilter provides a generic filtering capability at runtime for PostCategoryQuery.
func (*PostCategoryFilter) Where ¶
func (f *PostCategoryFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*PostCategoryFilter) WhereCategory ¶
func (f *PostCategoryFilter) WhereCategory(p entql.StringP)
WhereCategory applies the entql string predicate on the category field.
func (*PostCategoryFilter) WhereCreatedAt ¶
func (f *PostCategoryFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*PostCategoryFilter) WhereHasPost ¶
func (f *PostCategoryFilter) WhereHasPost()
WhereHasPost applies a predicate to check if query has an edge post.
func (*PostCategoryFilter) WhereHasPostWith ¶
func (f *PostCategoryFilter) WhereHasPostWith(preds ...predicate.Post)
WhereHasPostWith applies a predicate to check if query has an edge post with a given conditions (other predicates).
func (*PostCategoryFilter) WhereID ¶
func (f *PostCategoryFilter) WhereID(p entql.ValueP)
WhereID applies the entql [16]byte predicate on the id field.
func (*PostCategoryFilter) WhereUpdatedAt ¶
func (f *PostCategoryFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type PostCategoryGroupBy ¶
type PostCategoryGroupBy struct {
// contains filtered or unexported fields
}
PostCategoryGroupBy is the group-by builder for PostCategory entities.
func (*PostCategoryGroupBy) Aggregate ¶
func (pcgb *PostCategoryGroupBy) Aggregate(fns ...AggregateFunc) *PostCategoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PostCategoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PostCategoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PostCategoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PostCategoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PostCategoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PostCategoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PostCategoryGroupBy) Scan ¶
func (pcgb *PostCategoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PostCategoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PostCategoryMutation ¶
type PostCategoryMutation struct {
// contains filtered or unexported fields
}
PostCategoryMutation represents an operation that mutates the PostCategory nodes in the graph.
func (*PostCategoryMutation) AddField ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) AddedEdges ¶
func (m *PostCategoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PostCategoryMutation) AddedField ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) AddedFields ¶
func (m *PostCategoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PostCategoryMutation) AddedIDs ¶
func (m *PostCategoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PostCategoryMutation) Category ¶
func (m *PostCategoryMutation) Category() (r postcategory.Category, exists bool)
Category returns the value of the "category" field in the mutation.
func (*PostCategoryMutation) ClearEdge ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) ClearField ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) ClearPost ¶
func (m *PostCategoryMutation) ClearPost()
ClearPost clears the "post" edge to the Post entity.
func (*PostCategoryMutation) ClearedEdges ¶
func (m *PostCategoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PostCategoryMutation) ClearedFields ¶
func (m *PostCategoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PostCategoryMutation) Client ¶
func (m PostCategoryMutation) 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 (*PostCategoryMutation) CreatedAt ¶
func (m *PostCategoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PostCategoryMutation) EdgeCleared ¶
func (m *PostCategoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PostCategoryMutation) Field ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) FieldCleared ¶
func (m *PostCategoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PostCategoryMutation) Fields ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) Filter ¶
func (m *PostCategoryMutation) Filter() *PostCategoryFilter
Filter returns an entql.Where implementation to apply filters on the PostCategoryMutation builder.
func (*PostCategoryMutation) ID ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) 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 (*PostCategoryMutation) OldCategory ¶
func (m *PostCategoryMutation) OldCategory(ctx context.Context) (v postcategory.Category, err error)
OldCategory returns the old "category" field's value of the PostCategory entity. If the PostCategory 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 (*PostCategoryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the PostCategory entity. If the PostCategory 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 (*PostCategoryMutation) 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 (*PostCategoryMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the PostCategory entity. If the PostCategory 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 (*PostCategoryMutation) Op ¶
func (m *PostCategoryMutation) Op() Op
Op returns the operation name.
func (*PostCategoryMutation) PostCleared ¶
func (m *PostCategoryMutation) PostCleared() bool
PostCleared reports if the "post" edge to the Post entity was cleared.
func (*PostCategoryMutation) PostID ¶
func (m *PostCategoryMutation) PostID() (id uuid.UUID, exists bool)
PostID returns the "post" edge ID in the mutation.
func (*PostCategoryMutation) PostIDs ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) RemovedEdges ¶
func (m *PostCategoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PostCategoryMutation) RemovedIDs ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) ResetCategory ¶
func (m *PostCategoryMutation) ResetCategory()
ResetCategory resets all changes to the "category" field.
func (*PostCategoryMutation) ResetCreatedAt ¶
func (m *PostCategoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PostCategoryMutation) ResetEdge ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) ResetField ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) ResetPost ¶
func (m *PostCategoryMutation) ResetPost()
ResetPost resets all changes to the "post" edge.
func (*PostCategoryMutation) ResetUpdatedAt ¶
func (m *PostCategoryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PostCategoryMutation) SetCategory ¶
func (m *PostCategoryMutation) SetCategory(po postcategory.Category)
SetCategory sets the "category" field.
func (*PostCategoryMutation) SetCreatedAt ¶
func (m *PostCategoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PostCategoryMutation) SetField ¶
func (m *PostCategoryMutation) 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 (*PostCategoryMutation) SetID ¶
func (m *PostCategoryMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of PostCategory entities.
func (*PostCategoryMutation) SetOp ¶
func (m *PostCategoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PostCategoryMutation) SetPostID ¶
func (m *PostCategoryMutation) SetPostID(id uuid.UUID)
SetPostID sets the "post" edge to the Post entity by id.
func (*PostCategoryMutation) SetUpdatedAt ¶
func (m *PostCategoryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (PostCategoryMutation) Tx ¶
func (m PostCategoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PostCategoryMutation) Type ¶
func (m *PostCategoryMutation) Type() string
Type returns the node type of this mutation (PostCategory).
func (*PostCategoryMutation) UpdatedAt ¶
func (m *PostCategoryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PostCategoryMutation) Where ¶
func (m *PostCategoryMutation) Where(ps ...predicate.PostCategory)
Where appends a list predicates to the PostCategoryMutation builder.
func (*PostCategoryMutation) WhereP ¶
func (m *PostCategoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PostCategoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PostCategoryOrder ¶
type PostCategoryOrder struct { Direction OrderDirection `json:"direction"` Field *PostCategoryOrderField `json:"field"` }
PostCategoryOrder defines the ordering of PostCategory.
type PostCategoryOrderField ¶
type PostCategoryOrderField struct { // Value extracts the ordering value from the given PostCategory. Value func(*PostCategory) (ent.Value, error) // contains filtered or unexported fields }
PostCategoryOrderField defines the ordering field of PostCategory.
func (PostCategoryOrderField) MarshalGQL ¶
func (f PostCategoryOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (PostCategoryOrderField) String ¶
func (f PostCategoryOrderField) String() string
String implement fmt.Stringer interface.
func (*PostCategoryOrderField) UnmarshalGQL ¶
func (f *PostCategoryOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type PostCategoryPaginateOption ¶
type PostCategoryPaginateOption func(*postcategoryPager) error
PostCategoryPaginateOption enables pagination customization.
func WithPostCategoryFilter ¶
func WithPostCategoryFilter(filter func(*PostCategoryQuery) (*PostCategoryQuery, error)) PostCategoryPaginateOption
WithPostCategoryFilter configures pagination filter.
func WithPostCategoryOrder ¶
func WithPostCategoryOrder(order *PostCategoryOrder) PostCategoryPaginateOption
WithPostCategoryOrder configures pagination ordering.
type PostCategoryQuery ¶
type PostCategoryQuery struct {
// contains filtered or unexported fields
}
PostCategoryQuery is the builder for querying PostCategory entities.
func (*PostCategoryQuery) Aggregate ¶
func (pcq *PostCategoryQuery) Aggregate(fns ...AggregateFunc) *PostCategorySelect
Aggregate returns a PostCategorySelect configured with the given aggregations.
func (*PostCategoryQuery) All ¶
func (pcq *PostCategoryQuery) All(ctx context.Context) ([]*PostCategory, error)
All executes the query and returns a list of PostCategories.
func (*PostCategoryQuery) AllX ¶
func (pcq *PostCategoryQuery) AllX(ctx context.Context) []*PostCategory
AllX is like All, but panics if an error occurs.
func (*PostCategoryQuery) Clone ¶
func (pcq *PostCategoryQuery) Clone() *PostCategoryQuery
Clone returns a duplicate of the PostCategoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PostCategoryQuery) CollectFields ¶
func (pc *PostCategoryQuery) CollectFields(ctx context.Context, satisfies ...string) (*PostCategoryQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*PostCategoryQuery) Count ¶
func (pcq *PostCategoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PostCategoryQuery) CountX ¶
func (pcq *PostCategoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PostCategoryQuery) Exist ¶
func (pcq *PostCategoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PostCategoryQuery) ExistX ¶
func (pcq *PostCategoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PostCategoryQuery) Filter ¶
func (pcq *PostCategoryQuery) Filter() *PostCategoryFilter
Filter returns a Filter implementation to apply filters on the PostCategoryQuery builder.
func (*PostCategoryQuery) First ¶
func (pcq *PostCategoryQuery) First(ctx context.Context) (*PostCategory, error)
First returns the first PostCategory entity from the query. Returns a *NotFoundError when no PostCategory was found.
func (*PostCategoryQuery) FirstID ¶
FirstID returns the first PostCategory ID from the query. Returns a *NotFoundError when no PostCategory ID was found.
func (*PostCategoryQuery) FirstIDX ¶
func (pcq *PostCategoryQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*PostCategoryQuery) FirstX ¶
func (pcq *PostCategoryQuery) FirstX(ctx context.Context) *PostCategory
FirstX is like First, but panics if an error occurs.
func (*PostCategoryQuery) ForShare ¶
func (pcq *PostCategoryQuery) ForShare(opts ...sql.LockOption) *PostCategoryQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*PostCategoryQuery) ForUpdate ¶
func (pcq *PostCategoryQuery) ForUpdate(opts ...sql.LockOption) *PostCategoryQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*PostCategoryQuery) GroupBy ¶
func (pcq *PostCategoryQuery) GroupBy(field string, fields ...string) *PostCategoryGroupBy
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 { UpdatedAt time.Time `json:"updated_at,omitempty"` Count int `json:"count,omitempty"` } client.PostCategory.Query(). GroupBy(postcategory.FieldUpdatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*PostCategoryQuery) IDsX ¶
func (pcq *PostCategoryQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*PostCategoryQuery) Limit ¶
func (pcq *PostCategoryQuery) Limit(limit int) *PostCategoryQuery
Limit the number of records to be returned by this query.
func (*PostCategoryQuery) Modify ¶
func (pcq *PostCategoryQuery) Modify(modifiers ...func(s *sql.Selector)) *PostCategorySelect
Modify adds a query modifier for attaching custom logic to queries.
func (*PostCategoryQuery) Offset ¶
func (pcq *PostCategoryQuery) Offset(offset int) *PostCategoryQuery
Offset to start from.
func (*PostCategoryQuery) Only ¶
func (pcq *PostCategoryQuery) Only(ctx context.Context) (*PostCategory, error)
Only returns a single PostCategory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PostCategory entity is found. Returns a *NotFoundError when no PostCategory entities are found.
func (*PostCategoryQuery) OnlyID ¶
OnlyID is like Only, but returns the only PostCategory ID in the query. Returns a *NotSingularError when more than one PostCategory ID is found. Returns a *NotFoundError when no entities are found.
func (*PostCategoryQuery) OnlyIDX ¶
func (pcq *PostCategoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PostCategoryQuery) OnlyX ¶
func (pcq *PostCategoryQuery) OnlyX(ctx context.Context) *PostCategory
OnlyX is like Only, but panics if an error occurs.
func (*PostCategoryQuery) Order ¶
func (pcq *PostCategoryQuery) Order(o ...postcategory.OrderOption) *PostCategoryQuery
Order specifies how the records should be ordered.
func (*PostCategoryQuery) Paginate ¶
func (pc *PostCategoryQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...PostCategoryPaginateOption, ) (*PostCategoryConnection, error)
Paginate executes the query and returns a relay based cursor connection to PostCategory.
func (*PostCategoryQuery) QueryPost ¶
func (pcq *PostCategoryQuery) QueryPost() *PostQuery
QueryPost chains the current query on the "post" edge.
func (*PostCategoryQuery) Select ¶
func (pcq *PostCategoryQuery) Select(fields ...string) *PostCategorySelect
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 { UpdatedAt time.Time `json:"updated_at,omitempty"` } client.PostCategory.Query(). Select(postcategory.FieldUpdatedAt). Scan(ctx, &v)
func (*PostCategoryQuery) Unique ¶
func (pcq *PostCategoryQuery) Unique(unique bool) *PostCategoryQuery
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 (*PostCategoryQuery) Where ¶
func (pcq *PostCategoryQuery) Where(ps ...predicate.PostCategory) *PostCategoryQuery
Where adds a new predicate for the PostCategoryQuery builder.
func (*PostCategoryQuery) WithPost ¶
func (pcq *PostCategoryQuery) WithPost(opts ...func(*PostQuery)) *PostCategoryQuery
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.
type PostCategorySelect ¶
type PostCategorySelect struct { *PostCategoryQuery // contains filtered or unexported fields }
PostCategorySelect is the builder for selecting fields of PostCategory entities.
func (*PostCategorySelect) Aggregate ¶
func (pcs *PostCategorySelect) Aggregate(fns ...AggregateFunc) *PostCategorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*PostCategorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PostCategorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PostCategorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PostCategorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PostCategorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PostCategorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PostCategorySelect) Modify ¶
func (pcs *PostCategorySelect) Modify(modifiers ...func(s *sql.Selector)) *PostCategorySelect
Modify adds a query modifier for attaching custom logic to queries.
func (*PostCategorySelect) Scan ¶
func (pcs *PostCategorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PostCategorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PostCategoryUpdate ¶
type PostCategoryUpdate struct {
// contains filtered or unexported fields
}
PostCategoryUpdate is the builder for updating PostCategory entities.
func (*PostCategoryUpdate) ClearPost ¶
func (pcu *PostCategoryUpdate) ClearPost() *PostCategoryUpdate
ClearPost clears the "post" edge to the Post entity.
func (*PostCategoryUpdate) Exec ¶
func (pcu *PostCategoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PostCategoryUpdate) ExecX ¶
func (pcu *PostCategoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostCategoryUpdate) Modify ¶
func (pcu *PostCategoryUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostCategoryUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*PostCategoryUpdate) Mutation ¶
func (pcu *PostCategoryUpdate) Mutation() *PostCategoryMutation
Mutation returns the PostCategoryMutation object of the builder.
func (*PostCategoryUpdate) Save ¶
func (pcu *PostCategoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PostCategoryUpdate) SaveX ¶
func (pcu *PostCategoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PostCategoryUpdate) SetCategory ¶
func (pcu *PostCategoryUpdate) SetCategory(po postcategory.Category) *PostCategoryUpdate
SetCategory sets the "category" field.
func (*PostCategoryUpdate) SetInput ¶
func (c *PostCategoryUpdate) SetInput(i UpdatePostCategoryInput) *PostCategoryUpdate
SetInput applies the change-set in the UpdatePostCategoryInput on the PostCategoryUpdate builder.
func (*PostCategoryUpdate) SetNillableCategory ¶
func (pcu *PostCategoryUpdate) SetNillableCategory(po *postcategory.Category) *PostCategoryUpdate
SetNillableCategory sets the "category" field if the given value is not nil.
func (*PostCategoryUpdate) SetNillablePostID ¶
func (pcu *PostCategoryUpdate) SetNillablePostID(id *uuid.UUID) *PostCategoryUpdate
SetNillablePostID sets the "post" edge to the Post entity by ID if the given value is not nil.
func (*PostCategoryUpdate) SetPost ¶
func (pcu *PostCategoryUpdate) SetPost(p *Post) *PostCategoryUpdate
SetPost sets the "post" edge to the Post entity.
func (*PostCategoryUpdate) SetPostID ¶
func (pcu *PostCategoryUpdate) SetPostID(id uuid.UUID) *PostCategoryUpdate
SetPostID sets the "post" edge to the Post entity by ID.
func (*PostCategoryUpdate) SetUpdatedAt ¶
func (pcu *PostCategoryUpdate) SetUpdatedAt(t time.Time) *PostCategoryUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PostCategoryUpdate) Where ¶
func (pcu *PostCategoryUpdate) Where(ps ...predicate.PostCategory) *PostCategoryUpdate
Where appends a list predicates to the PostCategoryUpdate builder.
type PostCategoryUpdateOne ¶
type PostCategoryUpdateOne struct {
// contains filtered or unexported fields
}
PostCategoryUpdateOne is the builder for updating a single PostCategory entity.
func (*PostCategoryUpdateOne) ClearPost ¶
func (pcuo *PostCategoryUpdateOne) ClearPost() *PostCategoryUpdateOne
ClearPost clears the "post" edge to the Post entity.
func (*PostCategoryUpdateOne) Exec ¶
func (pcuo *PostCategoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PostCategoryUpdateOne) ExecX ¶
func (pcuo *PostCategoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostCategoryUpdateOne) Modify ¶
func (pcuo *PostCategoryUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostCategoryUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*PostCategoryUpdateOne) Mutation ¶
func (pcuo *PostCategoryUpdateOne) Mutation() *PostCategoryMutation
Mutation returns the PostCategoryMutation object of the builder.
func (*PostCategoryUpdateOne) Save ¶
func (pcuo *PostCategoryUpdateOne) Save(ctx context.Context) (*PostCategory, error)
Save executes the query and returns the updated PostCategory entity.
func (*PostCategoryUpdateOne) SaveX ¶
func (pcuo *PostCategoryUpdateOne) SaveX(ctx context.Context) *PostCategory
SaveX is like Save, but panics if an error occurs.
func (*PostCategoryUpdateOne) Select ¶
func (pcuo *PostCategoryUpdateOne) Select(field string, fields ...string) *PostCategoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PostCategoryUpdateOne) SetCategory ¶
func (pcuo *PostCategoryUpdateOne) SetCategory(po postcategory.Category) *PostCategoryUpdateOne
SetCategory sets the "category" field.
func (*PostCategoryUpdateOne) SetInput ¶
func (c *PostCategoryUpdateOne) SetInput(i UpdatePostCategoryInput) *PostCategoryUpdateOne
SetInput applies the change-set in the UpdatePostCategoryInput on the PostCategoryUpdateOne builder.
func (*PostCategoryUpdateOne) SetNillableCategory ¶
func (pcuo *PostCategoryUpdateOne) SetNillableCategory(po *postcategory.Category) *PostCategoryUpdateOne
SetNillableCategory sets the "category" field if the given value is not nil.
func (*PostCategoryUpdateOne) SetNillablePostID ¶
func (pcuo *PostCategoryUpdateOne) SetNillablePostID(id *uuid.UUID) *PostCategoryUpdateOne
SetNillablePostID sets the "post" edge to the Post entity by ID if the given value is not nil.
func (*PostCategoryUpdateOne) SetPost ¶
func (pcuo *PostCategoryUpdateOne) SetPost(p *Post) *PostCategoryUpdateOne
SetPost sets the "post" edge to the Post entity.
func (*PostCategoryUpdateOne) SetPostID ¶
func (pcuo *PostCategoryUpdateOne) SetPostID(id uuid.UUID) *PostCategoryUpdateOne
SetPostID sets the "post" edge to the Post entity by ID.
func (*PostCategoryUpdateOne) SetUpdatedAt ¶
func (pcuo *PostCategoryUpdateOne) SetUpdatedAt(t time.Time) *PostCategoryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PostCategoryUpdateOne) Where ¶
func (pcuo *PostCategoryUpdateOne) Where(ps ...predicate.PostCategory) *PostCategoryUpdateOne
Where appends a list predicates to the PostCategoryUpdate builder.
type PostCategoryWhereInput ¶
type PostCategoryWhereInput struct { Predicates []predicate.PostCategory `json:"-"` Not *PostCategoryWhereInput `json:"not,omitempty"` Or []*PostCategoryWhereInput `json:"or,omitempty"` And []*PostCategoryWhereInput `json:"and,omitempty"` // "id" field predicates. ID *uuid.UUID `json:"id,omitempty"` IDNEQ *uuid.UUID `json:"idNEQ,omitempty"` IDIn []uuid.UUID `json:"idIn,omitempty"` IDNotIn []uuid.UUID `json:"idNotIn,omitempty"` IDGT *uuid.UUID `json:"idGT,omitempty"` IDGTE *uuid.UUID `json:"idGTE,omitempty"` IDLT *uuid.UUID `json:"idLT,omitempty"` IDLTE *uuid.UUID `json:"idLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "category" field predicates. Category *postcategory.Category `json:"category,omitempty"` CategoryNEQ *postcategory.Category `json:"categoryNEQ,omitempty"` CategoryIn []postcategory.Category `json:"categoryIn,omitempty"` CategoryNotIn []postcategory.Category `json:"categoryNotIn,omitempty"` // "post" edge predicates. HasPost *bool `json:"hasPost,omitempty"` HasPostWith []*PostWhereInput `json:"hasPostWith,omitempty"` }
PostCategoryWhereInput represents a where input for filtering PostCategory queries.
func (*PostCategoryWhereInput) AddPredicates ¶
func (i *PostCategoryWhereInput) AddPredicates(predicates ...predicate.PostCategory)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*PostCategoryWhereInput) Filter ¶
func (i *PostCategoryWhereInput) Filter(q *PostCategoryQuery) (*PostCategoryQuery, error)
Filter applies the PostCategoryWhereInput filter on the PostCategoryQuery builder.
func (*PostCategoryWhereInput) P ¶
func (i *PostCategoryWhereInput) P() (predicate.PostCategory, error)
P returns a predicate for filtering postcategories. An error is returned if the input is empty or invalid.
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) QueryCategories ¶
func (c *PostClient) QueryCategories(po *Post) *PostCategoryQuery
QueryCategories queries the categories edge of a Post.
func (*PostClient) QueryComments ¶
func (c *PostClient) QueryComments(po *Post) *CommentQuery
QueryComments queries the comments edge of a Post.
func (*PostClient) QueryLikedBy ¶
func (c *PostClient) QueryLikedBy(po *Post) *UserQuery
QueryLikedBy queries the liked_by edge of a Post.
func (*PostClient) QueryOwner ¶
func (c *PostClient) QueryOwner(po *Post) *UserQuery
QueryOwner queries the owner edge of a Post.
func (*PostClient) QuerySavedBy ¶
func (c *PostClient) QuerySavedBy(po *Post) *UserQuery
QuerySavedBy queries the saved_by 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 PostConnection ¶
type PostConnection struct { Edges []*PostEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
PostConnection is the connection containing edges to Post.
type PostCreate ¶
type PostCreate struct {
// contains filtered or unexported fields
}
PostCreate is the builder for creating a Post entity.
func (*PostCreate) AddCategories ¶
func (pc *PostCreate) AddCategories(p ...*PostCategory) *PostCreate
AddCategories adds the "categories" edges to the PostCategory entity.
func (*PostCreate) AddCategoryIDs ¶
func (pc *PostCreate) AddCategoryIDs(ids ...uuid.UUID) *PostCreate
AddCategoryIDs adds the "categories" edge to the PostCategory entity by IDs.
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) AddLikedBy ¶
func (pc *PostCreate) AddLikedBy(u ...*User) *PostCreate
AddLikedBy adds the "liked_by" edges to the User entity.
func (*PostCreate) AddLikedByIDs ¶
func (pc *PostCreate) AddLikedByIDs(ids ...uuid.UUID) *PostCreate
AddLikedByIDs adds the "liked_by" edge to the User entity by IDs.
func (*PostCreate) AddSavedBy ¶
func (pc *PostCreate) AddSavedBy(u ...*User) *PostCreate
AddSavedBy adds the "saved_by" edges to the User entity.
func (*PostCreate) AddSavedByIDs ¶
func (pc *PostCreate) AddSavedByIDs(ids ...uuid.UUID) *PostCreate
AddSavedByIDs adds the "saved_by" edge to the User entity by IDs.
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) SetContent ¶
func (pc *PostCreate) SetContent(s string) *PostCreate
SetContent sets the "content" field.
func (*PostCreate) SetCreatedAt ¶
func (pc *PostCreate) SetCreatedAt(t time.Time) *PostCreate
SetCreatedAt sets the "created_at" field.
func (*PostCreate) SetDeletedAt ¶
func (pc *PostCreate) SetDeletedAt(t time.Time) *PostCreate
SetDeletedAt sets the "deleted_at" field.
func (*PostCreate) SetDeletedBy ¶
func (pc *PostCreate) SetDeletedBy(s string) *PostCreate
SetDeletedBy sets the "deleted_by" field.
func (*PostCreate) SetEntityVector ¶
func (pc *PostCreate) SetEntityVector(s string) *PostCreate
SetEntityVector sets the "entity_vector" field.
func (*PostCreate) SetID ¶
func (pc *PostCreate) SetID(u uuid.UUID) *PostCreate
SetID sets the "id" field.
func (*PostCreate) SetInput ¶
func (c *PostCreate) SetInput(i CreatePostInput) *PostCreate
SetInput applies the change-set in the CreatePostInput on the PostCreate builder.
func (*PostCreate) SetIsModerated ¶
func (pc *PostCreate) SetIsModerated(b bool) *PostCreate
SetIsModerated sets the "is_moderated" field.
func (*PostCreate) SetLink ¶
func (pc *PostCreate) SetLink(s string) *PostCreate
SetLink sets the "link" field.
func (*PostCreate) SetMetadata ¶
func (pc *PostCreate) SetMetadata(em extramodel.PostMetadata) *PostCreate
SetMetadata sets the "metadata" field.
func (*PostCreate) SetModeratedAt ¶
func (pc *PostCreate) SetModeratedAt(t time.Time) *PostCreate
SetModeratedAt sets the "moderated_at" field.
func (*PostCreate) SetModerationComment ¶
func (pc *PostCreate) SetModerationComment(s string) *PostCreate
SetModerationComment sets the "moderation_comment" field.
func (*PostCreate) SetNillableContent ¶
func (pc *PostCreate) SetNillableContent(s *string) *PostCreate
SetNillableContent sets the "content" field if the given value is not nil.
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) SetNillableDeletedAt ¶
func (pc *PostCreate) SetNillableDeletedAt(t *time.Time) *PostCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PostCreate) SetNillableDeletedBy ¶
func (pc *PostCreate) SetNillableDeletedBy(s *string) *PostCreate
SetNillableDeletedBy sets the "deleted_by" field if the given value is not nil.
func (*PostCreate) SetNillableEntityVector ¶
func (pc *PostCreate) SetNillableEntityVector(s *string) *PostCreate
SetNillableEntityVector sets the "entity_vector" 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) SetNillableIsModerated ¶
func (pc *PostCreate) SetNillableIsModerated(b *bool) *PostCreate
SetNillableIsModerated sets the "is_moderated" field if the given value is not nil.
func (*PostCreate) SetNillableMetadata ¶
func (pc *PostCreate) SetNillableMetadata(em *extramodel.PostMetadata) *PostCreate
SetNillableMetadata sets the "metadata" field if the given value is not nil.
func (*PostCreate) SetNillableModeratedAt ¶
func (pc *PostCreate) SetNillableModeratedAt(t *time.Time) *PostCreate
SetNillableModeratedAt sets the "moderated_at" field if the given value is not nil.
func (*PostCreate) SetNillableModerationComment ¶
func (pc *PostCreate) SetNillableModerationComment(s *string) *PostCreate
SetNillableModerationComment sets the "moderation_comment" field if the given value is not nil.
func (*PostCreate) SetNillablePinned ¶
func (pc *PostCreate) SetNillablePinned(b *bool) *PostCreate
SetNillablePinned sets the "pinned" 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) SetOwner ¶
func (pc *PostCreate) SetOwner(u *User) *PostCreate
SetOwner sets the "owner" edge to the User entity.
func (*PostCreate) SetOwnerID ¶
func (pc *PostCreate) SetOwnerID(u uuid.UUID) *PostCreate
SetOwnerID sets the "owner_id" field.
func (*PostCreate) SetPinned ¶
func (pc *PostCreate) SetPinned(b bool) *PostCreate
SetPinned sets the "pinned" field.
func (*PostCreate) SetTitle ¶
func (pc *PostCreate) SetTitle(s string) *PostCreate
SetTitle sets the "title" 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 { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // Comments holds the value of the comments edge. Comments []*Comment `json:"comments,omitempty"` // SavedBy holds the value of the saved_by edge. SavedBy []*User `json:"saved_by,omitempty"` // LikedBy holds the value of the liked_by edge. LikedBy []*User `json:"liked_by,omitempty"` // Categories holds the value of the categories edge. Categories []*PostCategory `json:"categories,omitempty"` // contains filtered or unexported fields }
PostEdges holds the relations/edges for other nodes in the graph.
func (PostEdges) CategoriesOrErr ¶
func (e PostEdges) CategoriesOrErr() ([]*PostCategory, error)
CategoriesOrErr returns the Categories value or an error if the edge was not loaded in eager-loading.
func (PostEdges) CommentsOrErr ¶
CommentsOrErr returns the Comments value or an error if the edge was not loaded in eager-loading.
func (PostEdges) LikedByOrErr ¶
LikedByOrErr returns the LikedBy value or an error if the edge was not loaded in eager-loading.
func (PostEdges) 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 (PostEdges) SavedByOrErr ¶
SavedByOrErr returns the SavedBy value or an error if the edge was not loaded in eager-loading.
type PostFilter ¶
type PostFilter struct {
// contains filtered or unexported fields
}
PostFilter provides a generic filtering capability at runtime for PostQuery.
func (*PostFilter) Where ¶
func (f *PostFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*PostFilter) WhereContent ¶
func (f *PostFilter) WhereContent(p entql.StringP)
WhereContent applies the entql string predicate on the content field.
func (*PostFilter) WhereCreatedAt ¶
func (f *PostFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*PostFilter) WhereDeletedAt ¶
func (f *PostFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*PostFilter) WhereDeletedBy ¶
func (f *PostFilter) WhereDeletedBy(p entql.StringP)
WhereDeletedBy applies the entql string predicate on the deleted_by field.
func (*PostFilter) WhereEntityVector ¶
func (f *PostFilter) WhereEntityVector(p entql.StringP)
WhereEntityVector applies the entql string predicate on the entity_vector field.
func (*PostFilter) WhereHasCategories ¶
func (f *PostFilter) WhereHasCategories()
WhereHasCategories applies a predicate to check if query has an edge categories.
func (*PostFilter) WhereHasCategoriesWith ¶
func (f *PostFilter) WhereHasCategoriesWith(preds ...predicate.PostCategory)
WhereHasCategoriesWith applies a predicate to check if query has an edge categories with a given conditions (other predicates).
func (*PostFilter) WhereHasComments ¶
func (f *PostFilter) WhereHasComments()
WhereHasComments applies a predicate to check if query has an edge comments.
func (*PostFilter) WhereHasCommentsWith ¶
func (f *PostFilter) WhereHasCommentsWith(preds ...predicate.Comment)
WhereHasCommentsWith applies a predicate to check if query has an edge comments with a given conditions (other predicates).
func (*PostFilter) WhereHasLikedBy ¶
func (f *PostFilter) WhereHasLikedBy()
WhereHasLikedBy applies a predicate to check if query has an edge liked_by.
func (*PostFilter) WhereHasLikedByWith ¶
func (f *PostFilter) WhereHasLikedByWith(preds ...predicate.User)
WhereHasLikedByWith applies a predicate to check if query has an edge liked_by with a given conditions (other predicates).
func (*PostFilter) WhereHasOwner ¶
func (f *PostFilter) WhereHasOwner()
WhereHasOwner applies a predicate to check if query has an edge owner.
func (*PostFilter) WhereHasOwnerWith ¶
func (f *PostFilter) WhereHasOwnerWith(preds ...predicate.User)
WhereHasOwnerWith applies a predicate to check if query has an edge owner with a given conditions (other predicates).
func (*PostFilter) WhereHasSavedBy ¶
func (f *PostFilter) WhereHasSavedBy()
WhereHasSavedBy applies a predicate to check if query has an edge saved_by.
func (*PostFilter) WhereHasSavedByWith ¶
func (f *PostFilter) WhereHasSavedByWith(preds ...predicate.User)
WhereHasSavedByWith applies a predicate to check if query has an edge saved_by with a given conditions (other predicates).
func (*PostFilter) WhereID ¶
func (f *PostFilter) WhereID(p entql.ValueP)
WhereID applies the entql [16]byte predicate on the id field.
func (*PostFilter) WhereIsModerated ¶
func (f *PostFilter) WhereIsModerated(p entql.BoolP)
WhereIsModerated applies the entql bool predicate on the is_moderated field.
func (*PostFilter) WhereLink ¶
func (f *PostFilter) WhereLink(p entql.StringP)
WhereLink applies the entql string predicate on the link field.
func (*PostFilter) WhereMetadata ¶
func (f *PostFilter) WhereMetadata(p entql.BytesP)
WhereMetadata applies the entql json.RawMessage predicate on the metadata field.
func (*PostFilter) WhereModeratedAt ¶
func (f *PostFilter) WhereModeratedAt(p entql.TimeP)
WhereModeratedAt applies the entql time.Time predicate on the moderated_at field.
func (*PostFilter) WhereModerationComment ¶
func (f *PostFilter) WhereModerationComment(p entql.StringP)
WhereModerationComment applies the entql string predicate on the moderation_comment field.
func (*PostFilter) WhereOwnerID ¶
func (f *PostFilter) WhereOwnerID(p entql.ValueP)
WhereOwnerID applies the entql [16]byte predicate on the owner_id field.
func (*PostFilter) WherePinned ¶
func (f *PostFilter) WherePinned(p entql.BoolP)
WherePinned applies the entql bool predicate on the pinned field.
func (*PostFilter) WhereTitle ¶
func (f *PostFilter) WhereTitle(p entql.StringP)
WhereTitle applies the entql string predicate on the title field.
func (*PostFilter) WhereUpdatedAt ¶
func (f *PostFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
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) AddCategoryIDs ¶
func (m *PostMutation) AddCategoryIDs(ids ...uuid.UUID)
AddCategoryIDs adds the "categories" edge to the PostCategory entity by ids.
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) AddLikedByIDs ¶
func (m *PostMutation) AddLikedByIDs(ids ...uuid.UUID)
AddLikedByIDs adds the "liked_by" edge to the User entity by ids.
func (*PostMutation) AddSavedByIDs ¶
func (m *PostMutation) AddSavedByIDs(ids ...uuid.UUID)
AddSavedByIDs adds the "saved_by" edge to the User 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) CategoriesCleared ¶
func (m *PostMutation) CategoriesCleared() bool
CategoriesCleared reports if the "categories" edge to the PostCategory entity was cleared.
func (*PostMutation) CategoriesIDs ¶
func (m *PostMutation) CategoriesIDs() (ids []uuid.UUID)
CategoriesIDs returns the "categories" edge IDs in the mutation.
func (*PostMutation) ClearCategories ¶
func (m *PostMutation) ClearCategories()
ClearCategories clears the "categories" edge to the PostCategory entity.
func (*PostMutation) ClearComments ¶
func (m *PostMutation) ClearComments()
ClearComments clears the "comments" edge to the Comment entity.
func (*PostMutation) ClearContent ¶
func (m *PostMutation) ClearContent()
ClearContent clears the value of the "content" field.
func (*PostMutation) ClearDeletedAt ¶
func (m *PostMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostMutation) ClearDeletedBy ¶
func (m *PostMutation) ClearDeletedBy()
ClearDeletedBy clears the value of the "deleted_by" field.
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) ClearEntityVector ¶
func (m *PostMutation) ClearEntityVector()
ClearEntityVector clears the value of the "entity_vector" field.
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) ClearLikedBy ¶
func (m *PostMutation) ClearLikedBy()
ClearLikedBy clears the "liked_by" edge to the User entity.
func (*PostMutation) ClearMetadata ¶
func (m *PostMutation) ClearMetadata()
ClearMetadata clears the value of the "metadata" field.
func (*PostMutation) ClearModeratedAt ¶
func (m *PostMutation) ClearModeratedAt()
ClearModeratedAt clears the value of the "moderated_at" field.
func (*PostMutation) ClearModerationComment ¶
func (m *PostMutation) ClearModerationComment()
ClearModerationComment clears the value of the "moderation_comment" field.
func (*PostMutation) ClearOwner ¶
func (m *PostMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*PostMutation) ClearSavedBy ¶
func (m *PostMutation) ClearSavedBy()
ClearSavedBy clears the "saved_by" edge to the User 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) Content ¶
func (m *PostMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*PostMutation) ContentCleared ¶
func (m *PostMutation) ContentCleared() bool
ContentCleared returns if the "content" field was cleared in this 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) DeletedAt ¶
func (m *PostMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*PostMutation) DeletedAtCleared ¶
func (m *PostMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*PostMutation) DeletedBy ¶
func (m *PostMutation) DeletedBy() (r string, exists bool)
DeletedBy returns the value of the "deleted_by" field in the mutation.
func (*PostMutation) DeletedByCleared ¶
func (m *PostMutation) DeletedByCleared() bool
DeletedByCleared returns if the "deleted_by" field was cleared in this 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) EntityVector ¶
func (m *PostMutation) EntityVector() (r string, exists bool)
EntityVector returns the value of the "entity_vector" field in the mutation.
func (*PostMutation) EntityVectorCleared ¶
func (m *PostMutation) EntityVectorCleared() bool
EntityVectorCleared returns if the "entity_vector" field 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) Filter ¶
func (m *PostMutation) Filter() *PostFilter
Filter returns an entql.Where implementation to apply filters on the PostMutation builder.
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) IsModerated ¶
func (m *PostMutation) IsModerated() (r bool, exists bool)
IsModerated returns the value of the "is_moderated" field in the mutation.
func (*PostMutation) LikedByCleared ¶
func (m *PostMutation) LikedByCleared() bool
LikedByCleared reports if the "liked_by" edge to the User entity was cleared.
func (*PostMutation) LikedByIDs ¶
func (m *PostMutation) LikedByIDs() (ids []uuid.UUID)
LikedByIDs returns the "liked_by" edge IDs in the mutation.
func (*PostMutation) Link ¶
func (m *PostMutation) Link() (r string, exists bool)
Link returns the value of the "link" field in the mutation.
func (*PostMutation) Metadata ¶
func (m *PostMutation) Metadata() (r extramodel.PostMetadata, exists bool)
Metadata returns the value of the "metadata" field in the mutation.
func (*PostMutation) MetadataCleared ¶
func (m *PostMutation) MetadataCleared() bool
MetadataCleared returns if the "metadata" field was cleared in this mutation.
func (*PostMutation) ModeratedAt ¶
func (m *PostMutation) ModeratedAt() (r time.Time, exists bool)
ModeratedAt returns the value of the "moderated_at" field in the mutation.
func (*PostMutation) ModeratedAtCleared ¶
func (m *PostMutation) ModeratedAtCleared() bool
ModeratedAtCleared returns if the "moderated_at" field was cleared in this mutation.
func (*PostMutation) ModerationComment ¶
func (m *PostMutation) ModerationComment() (r string, exists bool)
ModerationComment returns the value of the "moderation_comment" field in the mutation.
func (*PostMutation) ModerationCommentCleared ¶
func (m *PostMutation) ModerationCommentCleared() bool
ModerationCommentCleared returns if the "moderation_comment" field was cleared in this mutation.
func (*PostMutation) OldContent ¶
func (m *PostMutation) OldContent(ctx context.Context) (v *string, err error)
OldContent returns the old "content" 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) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_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) OldDeletedBy ¶
func (m *PostMutation) OldDeletedBy(ctx context.Context) (v string, err error)
OldDeletedBy returns the old "deleted_by" 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) OldEntityVector ¶
func (m *PostMutation) OldEntityVector(ctx context.Context) (v string, err error)
OldEntityVector returns the old "entity_vector" 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) OldIsModerated ¶
func (m *PostMutation) OldIsModerated(ctx context.Context) (v bool, err error)
OldIsModerated returns the old "is_moderated" 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) OldLink ¶
func (m *PostMutation) OldLink(ctx context.Context) (v string, err error)
OldLink returns the old "link" 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) OldMetadata ¶
func (m *PostMutation) OldMetadata(ctx context.Context) (v extramodel.PostMetadata, err error)
OldMetadata returns the old "metadata" 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) OldModeratedAt ¶
OldModeratedAt returns the old "moderated_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) OldModerationComment ¶
func (m *PostMutation) OldModerationComment(ctx context.Context) (v string, err error)
OldModerationComment returns the old "moderation_comment" 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) OldOwnerID ¶
OldOwnerID returns the old "owner_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) OldPinned ¶
func (m *PostMutation) OldPinned(ctx context.Context) (v bool, err error)
OldPinned returns the old "pinned" 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) OldTitle ¶
func (m *PostMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" 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) OwnerCleared ¶
func (m *PostMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*PostMutation) OwnerID ¶
func (m *PostMutation) OwnerID() (r uuid.UUID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*PostMutation) OwnerIDs ¶
func (m *PostMutation) 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 (*PostMutation) Pinned ¶
func (m *PostMutation) Pinned() (r bool, exists bool)
Pinned returns the value of the "pinned" field in the mutation.
func (*PostMutation) RemoveCategoryIDs ¶
func (m *PostMutation) RemoveCategoryIDs(ids ...uuid.UUID)
RemoveCategoryIDs removes the "categories" edge to the PostCategory entity by IDs.
func (*PostMutation) RemoveCommentIDs ¶
func (m *PostMutation) RemoveCommentIDs(ids ...uuid.UUID)
RemoveCommentIDs removes the "comments" edge to the Comment entity by IDs.
func (*PostMutation) RemoveLikedByIDs ¶
func (m *PostMutation) RemoveLikedByIDs(ids ...uuid.UUID)
RemoveLikedByIDs removes the "liked_by" edge to the User entity by IDs.
func (*PostMutation) RemoveSavedByIDs ¶
func (m *PostMutation) RemoveSavedByIDs(ids ...uuid.UUID)
RemoveSavedByIDs removes the "saved_by" edge to the User entity by IDs.
func (*PostMutation) RemovedCategoriesIDs ¶
func (m *PostMutation) RemovedCategoriesIDs() (ids []uuid.UUID)
RemovedCategories returns the removed IDs of the "categories" edge to the PostCategory entity.
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) RemovedLikedByIDs ¶
func (m *PostMutation) RemovedLikedByIDs() (ids []uuid.UUID)
RemovedLikedBy returns the removed IDs of the "liked_by" edge to the User entity.
func (*PostMutation) RemovedSavedByIDs ¶
func (m *PostMutation) RemovedSavedByIDs() (ids []uuid.UUID)
RemovedSavedBy returns the removed IDs of the "saved_by" edge to the User entity.
func (*PostMutation) ResetCategories ¶
func (m *PostMutation) ResetCategories()
ResetCategories resets all changes to the "categories" edge.
func (*PostMutation) ResetComments ¶
func (m *PostMutation) ResetComments()
ResetComments resets all changes to the "comments" edge.
func (*PostMutation) ResetContent ¶
func (m *PostMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*PostMutation) ResetCreatedAt ¶
func (m *PostMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PostMutation) ResetDeletedAt ¶
func (m *PostMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*PostMutation) ResetDeletedBy ¶
func (m *PostMutation) ResetDeletedBy()
ResetDeletedBy resets all changes to the "deleted_by" 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) ResetEntityVector ¶
func (m *PostMutation) ResetEntityVector()
ResetEntityVector resets all changes to the "entity_vector" field.
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) ResetIsModerated ¶
func (m *PostMutation) ResetIsModerated()
ResetIsModerated resets all changes to the "is_moderated" field.
func (*PostMutation) ResetLikedBy ¶
func (m *PostMutation) ResetLikedBy()
ResetLikedBy resets all changes to the "liked_by" edge.
func (*PostMutation) ResetLink ¶
func (m *PostMutation) ResetLink()
ResetLink resets all changes to the "link" field.
func (*PostMutation) ResetMetadata ¶
func (m *PostMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" field.
func (*PostMutation) ResetModeratedAt ¶
func (m *PostMutation) ResetModeratedAt()
ResetModeratedAt resets all changes to the "moderated_at" field.
func (*PostMutation) ResetModerationComment ¶
func (m *PostMutation) ResetModerationComment()
ResetModerationComment resets all changes to the "moderation_comment" field.
func (*PostMutation) ResetOwner ¶
func (m *PostMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*PostMutation) ResetOwnerID ¶
func (m *PostMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*PostMutation) ResetPinned ¶
func (m *PostMutation) ResetPinned()
ResetPinned resets all changes to the "pinned" field.
func (*PostMutation) ResetSavedBy ¶
func (m *PostMutation) ResetSavedBy()
ResetSavedBy resets all changes to the "saved_by" edge.
func (*PostMutation) ResetTitle ¶
func (m *PostMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*PostMutation) ResetUpdatedAt ¶
func (m *PostMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PostMutation) SavedByCleared ¶
func (m *PostMutation) SavedByCleared() bool
SavedByCleared reports if the "saved_by" edge to the User entity was cleared.
func (*PostMutation) SavedByIDs ¶
func (m *PostMutation) SavedByIDs() (ids []uuid.UUID)
SavedByIDs returns the "saved_by" edge IDs in the mutation.
func (*PostMutation) SetContent ¶
func (m *PostMutation) SetContent(s string)
SetContent sets the "content" field.
func (*PostMutation) SetCreatedAt ¶
func (m *PostMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PostMutation) SetDeletedAt ¶
func (m *PostMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*PostMutation) SetDeletedBy ¶
func (m *PostMutation) SetDeletedBy(s string)
SetDeletedBy sets the "deleted_by" field.
func (*PostMutation) SetEntityVector ¶
func (m *PostMutation) SetEntityVector(s string)
SetEntityVector sets the "entity_vector" 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) SetIsModerated ¶
func (m *PostMutation) SetIsModerated(b bool)
SetIsModerated sets the "is_moderated" field.
func (*PostMutation) SetLink ¶
func (m *PostMutation) SetLink(s string)
SetLink sets the "link" field.
func (*PostMutation) SetMetadata ¶
func (m *PostMutation) SetMetadata(em extramodel.PostMetadata)
SetMetadata sets the "metadata" field.
func (*PostMutation) SetModeratedAt ¶
func (m *PostMutation) SetModeratedAt(t time.Time)
SetModeratedAt sets the "moderated_at" field.
func (*PostMutation) SetModerationComment ¶
func (m *PostMutation) SetModerationComment(s string)
SetModerationComment sets the "moderation_comment" field.
func (*PostMutation) SetOp ¶
func (m *PostMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PostMutation) SetOwnerID ¶
func (m *PostMutation) SetOwnerID(u uuid.UUID)
SetOwnerID sets the "owner_id" field.
func (*PostMutation) SetPinned ¶
func (m *PostMutation) SetPinned(b bool)
SetPinned sets the "pinned" field.
func (*PostMutation) SetTitle ¶
func (m *PostMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*PostMutation) SetUpdatedAt ¶
func (m *PostMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PostMutation) Title ¶
func (m *PostMutation) Title() (r string, exists bool)
Title returns the value of the "title" 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 PostOrder ¶
type PostOrder struct { Direction OrderDirection `json:"direction"` Field *PostOrderField `json:"field"` }
PostOrder defines the ordering of Post.
type PostOrderField ¶
type PostOrderField struct { // Value extracts the ordering value from the given Post. Value func(*Post) (ent.Value, error) // contains filtered or unexported fields }
PostOrderField defines the ordering field of Post.
func (PostOrderField) MarshalGQL ¶
func (f PostOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (PostOrderField) String ¶
func (f PostOrderField) String() string
String implement fmt.Stringer interface.
func (*PostOrderField) UnmarshalGQL ¶
func (f *PostOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type PostPaginateOption ¶
type PostPaginateOption func(*postPager) error
PostPaginateOption enables pagination customization.
func WithPostFilter ¶
func WithPostFilter(filter func(*PostQuery) (*PostQuery, error)) PostPaginateOption
WithPostFilter configures pagination filter.
func WithPostOrder ¶
func WithPostOrder(order *PostOrder) PostPaginateOption
WithPostOrder configures pagination ordering.
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) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*PostQuery) Filter ¶
func (pq *PostQuery) Filter() *PostFilter
Filter returns a Filter implementation to apply filters on the PostQuery builder.
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) ForShare ¶
func (pq *PostQuery) ForShare(opts ...sql.LockOption) *PostQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*PostQuery) ForUpdate ¶
func (pq *PostQuery) ForUpdate(opts ...sql.LockOption) *PostQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
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 { UpdatedAt time.Time `json:"updated_at,omitempty"` Count int `json:"count,omitempty"` } client.Post.Query(). GroupBy(post.FieldUpdatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*PostQuery) Modify ¶
func (pq *PostQuery) Modify(modifiers ...func(s *sql.Selector)) *PostSelect
Modify adds a query modifier for attaching custom logic to queries.
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) Paginate ¶
func (po *PostQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...PostPaginateOption, ) (*PostConnection, error)
Paginate executes the query and returns a relay based cursor connection to Post.
func (*PostQuery) QueryCategories ¶
func (pq *PostQuery) QueryCategories() *PostCategoryQuery
QueryCategories chains the current query on the "categories" edge.
func (*PostQuery) QueryComments ¶
func (pq *PostQuery) QueryComments() *CommentQuery
QueryComments chains the current query on the "comments" edge.
func (*PostQuery) QueryLikedBy ¶
QueryLikedBy chains the current query on the "liked_by" edge.
func (*PostQuery) QueryOwner ¶
QueryOwner chains the current query on the "owner" edge.
func (*PostQuery) QuerySavedBy ¶
QuerySavedBy chains the current query on the "saved_by" 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 { UpdatedAt time.Time `json:"updated_at,omitempty"` } client.Post.Query(). Select(post.FieldUpdatedAt). 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) WithCategories ¶
func (pq *PostQuery) WithCategories(opts ...func(*PostCategoryQuery)) *PostQuery
WithCategories tells the query-builder to eager-load the nodes that are connected to the "categories" 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) WithLikedBy ¶
WithLikedBy tells the query-builder to eager-load the nodes that are connected to the "liked_by" edge. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithNamedCategories ¶
func (pq *PostQuery) WithNamedCategories(name string, opts ...func(*PostCategoryQuery)) *PostQuery
WithNamedCategories tells the query-builder to eager-load the nodes that are connected to the "categories" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithNamedComments ¶
func (pq *PostQuery) WithNamedComments(name string, opts ...func(*CommentQuery)) *PostQuery
WithNamedComments tells the query-builder to eager-load the nodes that are connected to the "comments" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithNamedLikedBy ¶
WithNamedLikedBy tells the query-builder to eager-load the nodes that are connected to the "liked_by" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithNamedSavedBy ¶
WithNamedSavedBy tells the query-builder to eager-load the nodes that are connected to the "saved_by" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithOwner ¶
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithSavedBy ¶
WithSavedBy tells the query-builder to eager-load the nodes that are connected to the "saved_by" 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) Modify ¶
func (ps *PostSelect) Modify(modifiers ...func(s *sql.Selector)) *PostSelect
Modify adds a query modifier for attaching custom logic to queries.
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) AddCategories ¶
func (pu *PostUpdate) AddCategories(p ...*PostCategory) *PostUpdate
AddCategories adds the "categories" edges to the PostCategory entity.
func (*PostUpdate) AddCategoryIDs ¶
func (pu *PostUpdate) AddCategoryIDs(ids ...uuid.UUID) *PostUpdate
AddCategoryIDs adds the "categories" edge to the PostCategory entity by IDs.
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) AddLikedBy ¶
func (pu *PostUpdate) AddLikedBy(u ...*User) *PostUpdate
AddLikedBy adds the "liked_by" edges to the User entity.
func (*PostUpdate) AddLikedByIDs ¶
func (pu *PostUpdate) AddLikedByIDs(ids ...uuid.UUID) *PostUpdate
AddLikedByIDs adds the "liked_by" edge to the User entity by IDs.
func (*PostUpdate) AddSavedBy ¶
func (pu *PostUpdate) AddSavedBy(u ...*User) *PostUpdate
AddSavedBy adds the "saved_by" edges to the User entity.
func (*PostUpdate) AddSavedByIDs ¶
func (pu *PostUpdate) AddSavedByIDs(ids ...uuid.UUID) *PostUpdate
AddSavedByIDs adds the "saved_by" edge to the User entity by IDs.
func (*PostUpdate) ClearCategories ¶
func (pu *PostUpdate) ClearCategories() *PostUpdate
ClearCategories clears all "categories" edges to the PostCategory entity.
func (*PostUpdate) ClearComments ¶
func (pu *PostUpdate) ClearComments() *PostUpdate
ClearComments clears all "comments" edges to the Comment entity.
func (*PostUpdate) ClearContent ¶
func (pu *PostUpdate) ClearContent() *PostUpdate
ClearContent clears the value of the "content" field.
func (*PostUpdate) ClearDeletedAt ¶
func (pu *PostUpdate) ClearDeletedAt() *PostUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpdate) ClearDeletedBy ¶
func (pu *PostUpdate) ClearDeletedBy() *PostUpdate
ClearDeletedBy clears the value of the "deleted_by" field.
func (*PostUpdate) ClearLikedBy ¶
func (pu *PostUpdate) ClearLikedBy() *PostUpdate
ClearLikedBy clears all "liked_by" edges to the User entity.
func (*PostUpdate) ClearMetadata ¶
func (pu *PostUpdate) ClearMetadata() *PostUpdate
ClearMetadata clears the value of the "metadata" field.
func (*PostUpdate) ClearModeratedAt ¶
func (pu *PostUpdate) ClearModeratedAt() *PostUpdate
ClearModeratedAt clears the value of the "moderated_at" field.
func (*PostUpdate) ClearModerationComment ¶
func (pu *PostUpdate) ClearModerationComment() *PostUpdate
ClearModerationComment clears the value of the "moderation_comment" field.
func (*PostUpdate) ClearOwner ¶
func (pu *PostUpdate) ClearOwner() *PostUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*PostUpdate) ClearSavedBy ¶
func (pu *PostUpdate) ClearSavedBy() *PostUpdate
ClearSavedBy clears all "saved_by" edges to the User 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) Modify ¶
func (pu *PostUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*PostUpdate) Mutation ¶
func (pu *PostUpdate) Mutation() *PostMutation
Mutation returns the PostMutation object of the builder.
func (*PostUpdate) RemoveCategories ¶
func (pu *PostUpdate) RemoveCategories(p ...*PostCategory) *PostUpdate
RemoveCategories removes "categories" edges to PostCategory entities.
func (*PostUpdate) RemoveCategoryIDs ¶
func (pu *PostUpdate) RemoveCategoryIDs(ids ...uuid.UUID) *PostUpdate
RemoveCategoryIDs removes the "categories" edge to PostCategory entities by IDs.
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) RemoveLikedBy ¶
func (pu *PostUpdate) RemoveLikedBy(u ...*User) *PostUpdate
RemoveLikedBy removes "liked_by" edges to User entities.
func (*PostUpdate) RemoveLikedByIDs ¶
func (pu *PostUpdate) RemoveLikedByIDs(ids ...uuid.UUID) *PostUpdate
RemoveLikedByIDs removes the "liked_by" edge to User entities by IDs.
func (*PostUpdate) RemoveSavedBy ¶
func (pu *PostUpdate) RemoveSavedBy(u ...*User) *PostUpdate
RemoveSavedBy removes "saved_by" edges to User entities.
func (*PostUpdate) RemoveSavedByIDs ¶
func (pu *PostUpdate) RemoveSavedByIDs(ids ...uuid.UUID) *PostUpdate
RemoveSavedByIDs removes the "saved_by" edge to User entities by IDs.
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) SetContent ¶
func (pu *PostUpdate) SetContent(s string) *PostUpdate
SetContent sets the "content" field.
func (*PostUpdate) SetDeletedAt ¶
func (pu *PostUpdate) SetDeletedAt(t time.Time) *PostUpdate
SetDeletedAt sets the "deleted_at" field.
func (*PostUpdate) SetDeletedBy ¶
func (pu *PostUpdate) SetDeletedBy(s string) *PostUpdate
SetDeletedBy sets the "deleted_by" field.
func (*PostUpdate) SetInput ¶
func (c *PostUpdate) SetInput(i UpdatePostInput) *PostUpdate
SetInput applies the change-set in the UpdatePostInput on the PostUpdate builder.
func (*PostUpdate) SetIsModerated ¶
func (pu *PostUpdate) SetIsModerated(b bool) *PostUpdate
SetIsModerated sets the "is_moderated" field.
func (*PostUpdate) SetLink ¶
func (pu *PostUpdate) SetLink(s string) *PostUpdate
SetLink sets the "link" field.
func (*PostUpdate) SetMetadata ¶
func (pu *PostUpdate) SetMetadata(em extramodel.PostMetadata) *PostUpdate
SetMetadata sets the "metadata" field.
func (*PostUpdate) SetModeratedAt ¶
func (pu *PostUpdate) SetModeratedAt(t time.Time) *PostUpdate
SetModeratedAt sets the "moderated_at" field.
func (*PostUpdate) SetModerationComment ¶
func (pu *PostUpdate) SetModerationComment(s string) *PostUpdate
SetModerationComment sets the "moderation_comment" field.
func (*PostUpdate) SetNillableContent ¶
func (pu *PostUpdate) SetNillableContent(s *string) *PostUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*PostUpdate) SetNillableDeletedAt ¶
func (pu *PostUpdate) SetNillableDeletedAt(t *time.Time) *PostUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PostUpdate) SetNillableDeletedBy ¶
func (pu *PostUpdate) SetNillableDeletedBy(s *string) *PostUpdate
SetNillableDeletedBy sets the "deleted_by" field if the given value is not nil.
func (*PostUpdate) SetNillableIsModerated ¶
func (pu *PostUpdate) SetNillableIsModerated(b *bool) *PostUpdate
SetNillableIsModerated sets the "is_moderated" field if the given value is not nil.
func (*PostUpdate) SetNillableLink ¶
func (pu *PostUpdate) SetNillableLink(s *string) *PostUpdate
SetNillableLink sets the "link" field if the given value is not nil.
func (*PostUpdate) SetNillableMetadata ¶
func (pu *PostUpdate) SetNillableMetadata(em *extramodel.PostMetadata) *PostUpdate
SetNillableMetadata sets the "metadata" field if the given value is not nil.
func (*PostUpdate) SetNillableModeratedAt ¶
func (pu *PostUpdate) SetNillableModeratedAt(t *time.Time) *PostUpdate
SetNillableModeratedAt sets the "moderated_at" field if the given value is not nil.
func (*PostUpdate) SetNillableModerationComment ¶
func (pu *PostUpdate) SetNillableModerationComment(s *string) *PostUpdate
SetNillableModerationComment sets the "moderation_comment" field if the given value is not nil.
func (*PostUpdate) SetNillableOwnerID ¶
func (pu *PostUpdate) SetNillableOwnerID(u *uuid.UUID) *PostUpdate
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*PostUpdate) SetNillablePinned ¶
func (pu *PostUpdate) SetNillablePinned(b *bool) *PostUpdate
SetNillablePinned sets the "pinned" field if the given value is not nil.
func (*PostUpdate) SetNillableTitle ¶
func (pu *PostUpdate) SetNillableTitle(s *string) *PostUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*PostUpdate) SetOwner ¶
func (pu *PostUpdate) SetOwner(u *User) *PostUpdate
SetOwner sets the "owner" edge to the User entity.
func (*PostUpdate) SetOwnerID ¶
func (pu *PostUpdate) SetOwnerID(u uuid.UUID) *PostUpdate
SetOwnerID sets the "owner_id" field.
func (*PostUpdate) SetPinned ¶
func (pu *PostUpdate) SetPinned(b bool) *PostUpdate
SetPinned sets the "pinned" field.
func (*PostUpdate) SetTitle ¶
func (pu *PostUpdate) SetTitle(s string) *PostUpdate
SetTitle sets the "title" 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) AddCategories ¶
func (puo *PostUpdateOne) AddCategories(p ...*PostCategory) *PostUpdateOne
AddCategories adds the "categories" edges to the PostCategory entity.
func (*PostUpdateOne) AddCategoryIDs ¶
func (puo *PostUpdateOne) AddCategoryIDs(ids ...uuid.UUID) *PostUpdateOne
AddCategoryIDs adds the "categories" edge to the PostCategory entity by IDs.
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) AddLikedBy ¶
func (puo *PostUpdateOne) AddLikedBy(u ...*User) *PostUpdateOne
AddLikedBy adds the "liked_by" edges to the User entity.
func (*PostUpdateOne) AddLikedByIDs ¶
func (puo *PostUpdateOne) AddLikedByIDs(ids ...uuid.UUID) *PostUpdateOne
AddLikedByIDs adds the "liked_by" edge to the User entity by IDs.
func (*PostUpdateOne) AddSavedBy ¶
func (puo *PostUpdateOne) AddSavedBy(u ...*User) *PostUpdateOne
AddSavedBy adds the "saved_by" edges to the User entity.
func (*PostUpdateOne) AddSavedByIDs ¶
func (puo *PostUpdateOne) AddSavedByIDs(ids ...uuid.UUID) *PostUpdateOne
AddSavedByIDs adds the "saved_by" edge to the User entity by IDs.
func (*PostUpdateOne) ClearCategories ¶
func (puo *PostUpdateOne) ClearCategories() *PostUpdateOne
ClearCategories clears all "categories" edges to the PostCategory entity.
func (*PostUpdateOne) ClearComments ¶
func (puo *PostUpdateOne) ClearComments() *PostUpdateOne
ClearComments clears all "comments" edges to the Comment entity.
func (*PostUpdateOne) ClearContent ¶
func (puo *PostUpdateOne) ClearContent() *PostUpdateOne
ClearContent clears the value of the "content" field.
func (*PostUpdateOne) ClearDeletedAt ¶
func (puo *PostUpdateOne) ClearDeletedAt() *PostUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpdateOne) ClearDeletedBy ¶
func (puo *PostUpdateOne) ClearDeletedBy() *PostUpdateOne
ClearDeletedBy clears the value of the "deleted_by" field.
func (*PostUpdateOne) ClearLikedBy ¶
func (puo *PostUpdateOne) ClearLikedBy() *PostUpdateOne
ClearLikedBy clears all "liked_by" edges to the User entity.
func (*PostUpdateOne) ClearMetadata ¶
func (puo *PostUpdateOne) ClearMetadata() *PostUpdateOne
ClearMetadata clears the value of the "metadata" field.
func (*PostUpdateOne) ClearModeratedAt ¶
func (puo *PostUpdateOne) ClearModeratedAt() *PostUpdateOne
ClearModeratedAt clears the value of the "moderated_at" field.
func (*PostUpdateOne) ClearModerationComment ¶
func (puo *PostUpdateOne) ClearModerationComment() *PostUpdateOne
ClearModerationComment clears the value of the "moderation_comment" field.
func (*PostUpdateOne) ClearOwner ¶
func (puo *PostUpdateOne) ClearOwner() *PostUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*PostUpdateOne) ClearSavedBy ¶
func (puo *PostUpdateOne) ClearSavedBy() *PostUpdateOne
ClearSavedBy clears all "saved_by" edges to the User 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) Modify ¶
func (puo *PostUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*PostUpdateOne) Mutation ¶
func (puo *PostUpdateOne) Mutation() *PostMutation
Mutation returns the PostMutation object of the builder.
func (*PostUpdateOne) RemoveCategories ¶
func (puo *PostUpdateOne) RemoveCategories(p ...*PostCategory) *PostUpdateOne
RemoveCategories removes "categories" edges to PostCategory entities.
func (*PostUpdateOne) RemoveCategoryIDs ¶
func (puo *PostUpdateOne) RemoveCategoryIDs(ids ...uuid.UUID) *PostUpdateOne
RemoveCategoryIDs removes the "categories" edge to PostCategory entities by IDs.
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) RemoveLikedBy ¶
func (puo *PostUpdateOne) RemoveLikedBy(u ...*User) *PostUpdateOne
RemoveLikedBy removes "liked_by" edges to User entities.
func (*PostUpdateOne) RemoveLikedByIDs ¶
func (puo *PostUpdateOne) RemoveLikedByIDs(ids ...uuid.UUID) *PostUpdateOne
RemoveLikedByIDs removes the "liked_by" edge to User entities by IDs.
func (*PostUpdateOne) RemoveSavedBy ¶
func (puo *PostUpdateOne) RemoveSavedBy(u ...*User) *PostUpdateOne
RemoveSavedBy removes "saved_by" edges to User entities.
func (*PostUpdateOne) RemoveSavedByIDs ¶
func (puo *PostUpdateOne) RemoveSavedByIDs(ids ...uuid.UUID) *PostUpdateOne
RemoveSavedByIDs removes the "saved_by" edge to User entities by IDs.
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) SetContent ¶
func (puo *PostUpdateOne) SetContent(s string) *PostUpdateOne
SetContent sets the "content" field.
func (*PostUpdateOne) SetDeletedAt ¶
func (puo *PostUpdateOne) SetDeletedAt(t time.Time) *PostUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*PostUpdateOne) SetDeletedBy ¶
func (puo *PostUpdateOne) SetDeletedBy(s string) *PostUpdateOne
SetDeletedBy sets the "deleted_by" field.
func (*PostUpdateOne) SetInput ¶
func (c *PostUpdateOne) SetInput(i UpdatePostInput) *PostUpdateOne
SetInput applies the change-set in the UpdatePostInput on the PostUpdateOne builder.
func (*PostUpdateOne) SetIsModerated ¶
func (puo *PostUpdateOne) SetIsModerated(b bool) *PostUpdateOne
SetIsModerated sets the "is_moderated" field.
func (*PostUpdateOne) SetLink ¶
func (puo *PostUpdateOne) SetLink(s string) *PostUpdateOne
SetLink sets the "link" field.
func (*PostUpdateOne) SetMetadata ¶
func (puo *PostUpdateOne) SetMetadata(em extramodel.PostMetadata) *PostUpdateOne
SetMetadata sets the "metadata" field.
func (*PostUpdateOne) SetModeratedAt ¶
func (puo *PostUpdateOne) SetModeratedAt(t time.Time) *PostUpdateOne
SetModeratedAt sets the "moderated_at" field.
func (*PostUpdateOne) SetModerationComment ¶
func (puo *PostUpdateOne) SetModerationComment(s string) *PostUpdateOne
SetModerationComment sets the "moderation_comment" field.
func (*PostUpdateOne) SetNillableContent ¶
func (puo *PostUpdateOne) SetNillableContent(s *string) *PostUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*PostUpdateOne) SetNillableDeletedAt ¶
func (puo *PostUpdateOne) SetNillableDeletedAt(t *time.Time) *PostUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PostUpdateOne) SetNillableDeletedBy ¶
func (puo *PostUpdateOne) SetNillableDeletedBy(s *string) *PostUpdateOne
SetNillableDeletedBy sets the "deleted_by" field if the given value is not nil.
func (*PostUpdateOne) SetNillableIsModerated ¶
func (puo *PostUpdateOne) SetNillableIsModerated(b *bool) *PostUpdateOne
SetNillableIsModerated sets the "is_moderated" field if the given value is not nil.
func (*PostUpdateOne) SetNillableLink ¶
func (puo *PostUpdateOne) SetNillableLink(s *string) *PostUpdateOne
SetNillableLink sets the "link" field if the given value is not nil.
func (*PostUpdateOne) SetNillableMetadata ¶
func (puo *PostUpdateOne) SetNillableMetadata(em *extramodel.PostMetadata) *PostUpdateOne
SetNillableMetadata sets the "metadata" field if the given value is not nil.
func (*PostUpdateOne) SetNillableModeratedAt ¶
func (puo *PostUpdateOne) SetNillableModeratedAt(t *time.Time) *PostUpdateOne
SetNillableModeratedAt sets the "moderated_at" field if the given value is not nil.
func (*PostUpdateOne) SetNillableModerationComment ¶
func (puo *PostUpdateOne) SetNillableModerationComment(s *string) *PostUpdateOne
SetNillableModerationComment sets the "moderation_comment" field if the given value is not nil.
func (*PostUpdateOne) SetNillableOwnerID ¶
func (puo *PostUpdateOne) SetNillableOwnerID(u *uuid.UUID) *PostUpdateOne
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*PostUpdateOne) SetNillablePinned ¶
func (puo *PostUpdateOne) SetNillablePinned(b *bool) *PostUpdateOne
SetNillablePinned sets the "pinned" field if the given value is not nil.
func (*PostUpdateOne) SetNillableTitle ¶
func (puo *PostUpdateOne) SetNillableTitle(s *string) *PostUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*PostUpdateOne) SetOwner ¶
func (puo *PostUpdateOne) SetOwner(u *User) *PostUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*PostUpdateOne) SetOwnerID ¶
func (puo *PostUpdateOne) SetOwnerID(u uuid.UUID) *PostUpdateOne
SetOwnerID sets the "owner_id" field.
func (*PostUpdateOne) SetPinned ¶
func (puo *PostUpdateOne) SetPinned(b bool) *PostUpdateOne
SetPinned sets the "pinned" field.
func (*PostUpdateOne) SetTitle ¶
func (puo *PostUpdateOne) SetTitle(s string) *PostUpdateOne
SetTitle sets the "title" 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 PostWhereInput ¶
type PostWhereInput struct { Predicates []predicate.Post `json:"-"` Not *PostWhereInput `json:"not,omitempty"` Or []*PostWhereInput `json:"or,omitempty"` And []*PostWhereInput `json:"and,omitempty"` // "id" field predicates. ID *uuid.UUID `json:"id,omitempty"` IDNEQ *uuid.UUID `json:"idNEQ,omitempty"` IDIn []uuid.UUID `json:"idIn,omitempty"` IDNotIn []uuid.UUID `json:"idNotIn,omitempty"` IDGT *uuid.UUID `json:"idGT,omitempty"` IDGTE *uuid.UUID `json:"idGTE,omitempty"` IDLT *uuid.UUID `json:"idLT,omitempty"` IDLTE *uuid.UUID `json:"idLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` DeletedAtIsNil bool `json:"deletedAtIsNil,omitempty"` DeletedAtNotNil bool `json:"deletedAtNotNil,omitempty"` // "deleted_by" field predicates. DeletedBy *string `json:"deletedBy,omitempty"` DeletedByNEQ *string `json:"deletedByNEQ,omitempty"` DeletedByIn []string `json:"deletedByIn,omitempty"` DeletedByNotIn []string `json:"deletedByNotIn,omitempty"` DeletedByGT *string `json:"deletedByGT,omitempty"` DeletedByGTE *string `json:"deletedByGTE,omitempty"` DeletedByLT *string `json:"deletedByLT,omitempty"` DeletedByLTE *string `json:"deletedByLTE,omitempty"` DeletedByContains *string `json:"deletedByContains,omitempty"` DeletedByHasPrefix *string `json:"deletedByHasPrefix,omitempty"` DeletedByHasSuffix *string `json:"deletedByHasSuffix,omitempty"` DeletedByIsNil bool `json:"deletedByIsNil,omitempty"` DeletedByNotNil bool `json:"deletedByNotNil,omitempty"` DeletedByEqualFold *string `json:"deletedByEqualFold,omitempty"` DeletedByContainsFold *string `json:"deletedByContainsFold,omitempty"` // "pinned" field predicates. Pinned *bool `json:"pinned,omitempty"` PinnedNEQ *bool `json:"pinnedNEQ,omitempty"` // "title" field predicates. Title *string `json:"title,omitempty"` TitleNEQ *string `json:"titleNEQ,omitempty"` TitleIn []string `json:"titleIn,omitempty"` TitleNotIn []string `json:"titleNotIn,omitempty"` TitleGT *string `json:"titleGT,omitempty"` TitleGTE *string `json:"titleGTE,omitempty"` TitleLT *string `json:"titleLT,omitempty"` TitleLTE *string `json:"titleLTE,omitempty"` TitleContains *string `json:"titleContains,omitempty"` TitleHasPrefix *string `json:"titleHasPrefix,omitempty"` TitleHasSuffix *string `json:"titleHasSuffix,omitempty"` TitleEqualFold *string `json:"titleEqualFold,omitempty"` TitleContainsFold *string `json:"titleContainsFold,omitempty"` // "content" field predicates. Content *string `json:"content,omitempty"` ContentNEQ *string `json:"contentNEQ,omitempty"` ContentIn []string `json:"contentIn,omitempty"` ContentNotIn []string `json:"contentNotIn,omitempty"` ContentGT *string `json:"contentGT,omitempty"` ContentGTE *string `json:"contentGTE,omitempty"` ContentLT *string `json:"contentLT,omitempty"` ContentLTE *string `json:"contentLTE,omitempty"` ContentContains *string `json:"contentContains,omitempty"` ContentHasPrefix *string `json:"contentHasPrefix,omitempty"` ContentHasSuffix *string `json:"contentHasSuffix,omitempty"` ContentIsNil bool `json:"contentIsNil,omitempty"` ContentNotNil bool `json:"contentNotNil,omitempty"` ContentEqualFold *string `json:"contentEqualFold,omitempty"` ContentContainsFold *string `json:"contentContainsFold,omitempty"` // "link" field predicates. Link *string `json:"link,omitempty"` LinkNEQ *string `json:"linkNEQ,omitempty"` LinkIn []string `json:"linkIn,omitempty"` LinkNotIn []string `json:"linkNotIn,omitempty"` LinkGT *string `json:"linkGT,omitempty"` LinkGTE *string `json:"linkGTE,omitempty"` LinkLT *string `json:"linkLT,omitempty"` LinkLTE *string `json:"linkLTE,omitempty"` LinkContains *string `json:"linkContains,omitempty"` LinkHasPrefix *string `json:"linkHasPrefix,omitempty"` LinkHasSuffix *string `json:"linkHasSuffix,omitempty"` LinkEqualFold *string `json:"linkEqualFold,omitempty"` LinkContainsFold *string `json:"linkContainsFold,omitempty"` // "moderation_comment" field predicates. ModerationComment *string `json:"moderationComment,omitempty"` ModerationCommentNEQ *string `json:"moderationCommentNEQ,omitempty"` ModerationCommentIn []string `json:"moderationCommentIn,omitempty"` ModerationCommentNotIn []string `json:"moderationCommentNotIn,omitempty"` ModerationCommentGT *string `json:"moderationCommentGT,omitempty"` ModerationCommentGTE *string `json:"moderationCommentGTE,omitempty"` ModerationCommentLT *string `json:"moderationCommentLT,omitempty"` ModerationCommentLTE *string `json:"moderationCommentLTE,omitempty"` ModerationCommentContains *string `json:"moderationCommentContains,omitempty"` ModerationCommentHasPrefix *string `json:"moderationCommentHasPrefix,omitempty"` ModerationCommentHasSuffix *string `json:"moderationCommentHasSuffix,omitempty"` ModerationCommentIsNil bool `json:"moderationCommentIsNil,omitempty"` ModerationCommentNotNil bool `json:"moderationCommentNotNil,omitempty"` ModerationCommentEqualFold *string `json:"moderationCommentEqualFold,omitempty"` ModerationCommentContainsFold *string `json:"moderationCommentContainsFold,omitempty"` // "is_moderated" field predicates. IsModerated *bool `json:"isModerated,omitempty"` IsModeratedNEQ *bool `json:"isModeratedNEQ,omitempty"` // "moderated_at" field predicates. ModeratedAt *time.Time `json:"moderatedAt,omitempty"` ModeratedAtNEQ *time.Time `json:"moderatedAtNEQ,omitempty"` ModeratedAtIn []time.Time `json:"moderatedAtIn,omitempty"` ModeratedAtNotIn []time.Time `json:"moderatedAtNotIn,omitempty"` ModeratedAtGT *time.Time `json:"moderatedAtGT,omitempty"` ModeratedAtGTE *time.Time `json:"moderatedAtGTE,omitempty"` ModeratedAtLT *time.Time `json:"moderatedAtLT,omitempty"` ModeratedAtLTE *time.Time `json:"moderatedAtLTE,omitempty"` ModeratedAtIsNil bool `json:"moderatedAtIsNil,omitempty"` ModeratedAtNotNil bool `json:"moderatedAtNotNil,omitempty"` // "entity_vector" field predicates. EntityVector *string `json:"entityVector,omitempty"` EntityVectorNEQ *string `json:"entityVectorNEQ,omitempty"` EntityVectorIn []string `json:"entityVectorIn,omitempty"` EntityVectorNotIn []string `json:"entityVectorNotIn,omitempty"` EntityVectorGT *string `json:"entityVectorGT,omitempty"` EntityVectorGTE *string `json:"entityVectorGTE,omitempty"` EntityVectorLT *string `json:"entityVectorLT,omitempty"` EntityVectorLTE *string `json:"entityVectorLTE,omitempty"` EntityVectorContains *string `json:"entityVectorContains,omitempty"` EntityVectorHasPrefix *string `json:"entityVectorHasPrefix,omitempty"` EntityVectorHasSuffix *string `json:"entityVectorHasSuffix,omitempty"` EntityVectorIsNil bool `json:"entityVectorIsNil,omitempty"` EntityVectorNotNil bool `json:"entityVectorNotNil,omitempty"` EntityVectorEqualFold *string `json:"entityVectorEqualFold,omitempty"` EntityVectorContainsFold *string `json:"entityVectorContainsFold,omitempty"` // "owner" edge predicates. HasOwner *bool `json:"hasOwner,omitempty"` HasOwnerWith []*UserWhereInput `json:"hasOwnerWith,omitempty"` // "comments" edge predicates. HasComments *bool `json:"hasComments,omitempty"` HasCommentsWith []*CommentWhereInput `json:"hasCommentsWith,omitempty"` // "saved_by" edge predicates. HasSavedBy *bool `json:"hasSavedBy,omitempty"` HasSavedByWith []*UserWhereInput `json:"hasSavedByWith,omitempty"` // "liked_by" edge predicates. HasLikedBy *bool `json:"hasLikedBy,omitempty"` HasLikedByWith []*UserWhereInput `json:"hasLikedByWith,omitempty"` // "categories" edge predicates. HasCategories *bool `json:"hasCategories,omitempty"` HasCategoriesWith []*PostCategoryWhereInput `json:"hasCategoriesWith,omitempty"` // Deleted record filter options. IncludeDeleted *bool `json:"includeDeleted,omitempty"` IncludeDeletedOnly *bool `json:"includeDeletedOnly,omitempty"` }
PostWhereInput represents a where input for filtering Post queries.
func (*PostWhereInput) AddPredicates ¶
func (i *PostWhereInput) AddPredicates(predicates ...predicate.Post)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
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 RefreshToken ¶
type RefreshToken struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // The user id that owns the object OwnerID uuid.UUID `json:"owner_id,omitempty"` // TokenHash holds the value of the "token_hash" field. TokenHash string `json:"token_hash,omitempty"` // ExpiresAt holds the value of the "expires_at" field. ExpiresAt time.Time `json:"expires_at,omitempty"` // Revoked holds the value of the "revoked" field. Revoked bool `json:"revoked,omitempty"` // IPAddress holds the value of the "ip_address" field. IPAddress string `json:"ip_address,omitempty"` // UserAgent holds the value of the "user_agent" field. UserAgent string `json:"user_agent,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RefreshTokenQuery when eager-loading is set. Edges RefreshTokenEdges `json:"edges"` // contains filtered or unexported fields }
RefreshToken is the model entity for the RefreshToken schema.
func (*RefreshToken) IsNode ¶
func (*RefreshToken) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*RefreshToken) Node ¶
func (rt *RefreshToken) Node(ctx context.Context) (node *Node, err error)
Node implements Noder interface
func (*RefreshToken) QueryOwner ¶
func (rt *RefreshToken) QueryOwner() *UserQuery
QueryOwner queries the "owner" edge of the RefreshToken entity.
func (*RefreshToken) String ¶
func (rt *RefreshToken) String() string
String implements the fmt.Stringer.
func (*RefreshToken) ToEdge ¶
func (rt *RefreshToken) ToEdge(order *RefreshTokenOrder) *RefreshTokenEdge
ToEdge converts RefreshToken into RefreshTokenEdge.
func (*RefreshToken) Unwrap ¶
func (rt *RefreshToken) Unwrap() *RefreshToken
Unwrap unwraps the RefreshToken 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 (*RefreshToken) Update ¶
func (rt *RefreshToken) Update() *RefreshTokenUpdateOne
Update returns a builder for updating this RefreshToken. Note that you need to call RefreshToken.Unwrap() before calling this method if this RefreshToken was returned from a transaction, and the transaction was committed or rolled back.
type RefreshTokenClient ¶
type RefreshTokenClient struct {
// contains filtered or unexported fields
}
RefreshTokenClient is a client for the RefreshToken schema.
func NewRefreshTokenClient ¶
func NewRefreshTokenClient(c config) *RefreshTokenClient
NewRefreshTokenClient returns a client for the RefreshToken from the given config.
func (*RefreshTokenClient) Create ¶
func (c *RefreshTokenClient) Create() *RefreshTokenCreate
Create returns a builder for creating a RefreshToken entity.
func (*RefreshTokenClient) CreateBulk ¶
func (c *RefreshTokenClient) CreateBulk(builders ...*RefreshTokenCreate) *RefreshTokenCreateBulk
CreateBulk returns a builder for creating a bulk of RefreshToken entities.
func (*RefreshTokenClient) Delete ¶
func (c *RefreshTokenClient) Delete() *RefreshTokenDelete
Delete returns a delete builder for RefreshToken.
func (*RefreshTokenClient) DeleteOne ¶
func (c *RefreshTokenClient) DeleteOne(rt *RefreshToken) *RefreshTokenDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RefreshTokenClient) DeleteOneID ¶
func (c *RefreshTokenClient) DeleteOneID(id uuid.UUID) *RefreshTokenDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RefreshTokenClient) Get ¶
func (c *RefreshTokenClient) Get(ctx context.Context, id uuid.UUID) (*RefreshToken, error)
Get returns a RefreshToken entity by its id.
func (*RefreshTokenClient) GetX ¶
func (c *RefreshTokenClient) GetX(ctx context.Context, id uuid.UUID) *RefreshToken
GetX is like Get, but panics if an error occurs.
func (*RefreshTokenClient) Hooks ¶
func (c *RefreshTokenClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RefreshTokenClient) Intercept ¶
func (c *RefreshTokenClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `refreshtoken.Intercept(f(g(h())))`.
func (*RefreshTokenClient) Interceptors ¶
func (c *RefreshTokenClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RefreshTokenClient) MapCreateBulk ¶
func (c *RefreshTokenClient) MapCreateBulk(slice any, setFunc func(*RefreshTokenCreate, int)) *RefreshTokenCreateBulk
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 (*RefreshTokenClient) Query ¶
func (c *RefreshTokenClient) Query() *RefreshTokenQuery
Query returns a query builder for RefreshToken.
func (*RefreshTokenClient) QueryOwner ¶
func (c *RefreshTokenClient) QueryOwner(rt *RefreshToken) *UserQuery
QueryOwner queries the owner edge of a RefreshToken.
func (*RefreshTokenClient) Update ¶
func (c *RefreshTokenClient) Update() *RefreshTokenUpdate
Update returns an update builder for RefreshToken.
func (*RefreshTokenClient) UpdateOne ¶
func (c *RefreshTokenClient) UpdateOne(rt *RefreshToken) *RefreshTokenUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RefreshTokenClient) UpdateOneID ¶
func (c *RefreshTokenClient) UpdateOneID(id uuid.UUID) *RefreshTokenUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RefreshTokenClient) Use ¶
func (c *RefreshTokenClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `refreshtoken.Hooks(f(g(h())))`.
type RefreshTokenConnection ¶
type RefreshTokenConnection struct { Edges []*RefreshTokenEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
RefreshTokenConnection is the connection containing edges to RefreshToken.
type RefreshTokenCreate ¶
type RefreshTokenCreate struct {
// contains filtered or unexported fields
}
RefreshTokenCreate is the builder for creating a RefreshToken entity.
func (*RefreshTokenCreate) Exec ¶
func (rtc *RefreshTokenCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RefreshTokenCreate) ExecX ¶
func (rtc *RefreshTokenCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RefreshTokenCreate) Mutation ¶
func (rtc *RefreshTokenCreate) Mutation() *RefreshTokenMutation
Mutation returns the RefreshTokenMutation object of the builder.
func (*RefreshTokenCreate) Save ¶
func (rtc *RefreshTokenCreate) Save(ctx context.Context) (*RefreshToken, error)
Save creates the RefreshToken in the database.
func (*RefreshTokenCreate) SaveX ¶
func (rtc *RefreshTokenCreate) SaveX(ctx context.Context) *RefreshToken
SaveX calls Save and panics if Save returns an error.
func (*RefreshTokenCreate) SetCreatedAt ¶
func (rtc *RefreshTokenCreate) SetCreatedAt(t time.Time) *RefreshTokenCreate
SetCreatedAt sets the "created_at" field.
func (*RefreshTokenCreate) SetExpiresAt ¶
func (rtc *RefreshTokenCreate) SetExpiresAt(t time.Time) *RefreshTokenCreate
SetExpiresAt sets the "expires_at" field.
func (*RefreshTokenCreate) SetID ¶
func (rtc *RefreshTokenCreate) SetID(u uuid.UUID) *RefreshTokenCreate
SetID sets the "id" field.
func (*RefreshTokenCreate) SetIPAddress ¶
func (rtc *RefreshTokenCreate) SetIPAddress(s string) *RefreshTokenCreate
SetIPAddress sets the "ip_address" field.
func (*RefreshTokenCreate) SetInput ¶
func (c *RefreshTokenCreate) SetInput(i CreateRefreshTokenInput) *RefreshTokenCreate
SetInput applies the change-set in the CreateRefreshTokenInput on the RefreshTokenCreate builder.
func (*RefreshTokenCreate) SetNillableCreatedAt ¶
func (rtc *RefreshTokenCreate) SetNillableCreatedAt(t *time.Time) *RefreshTokenCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RefreshTokenCreate) SetNillableID ¶
func (rtc *RefreshTokenCreate) SetNillableID(u *uuid.UUID) *RefreshTokenCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*RefreshTokenCreate) SetNillableIPAddress ¶
func (rtc *RefreshTokenCreate) SetNillableIPAddress(s *string) *RefreshTokenCreate
SetNillableIPAddress sets the "ip_address" field if the given value is not nil.
func (*RefreshTokenCreate) SetNillableRevoked ¶
func (rtc *RefreshTokenCreate) SetNillableRevoked(b *bool) *RefreshTokenCreate
SetNillableRevoked sets the "revoked" field if the given value is not nil.
func (*RefreshTokenCreate) SetNillableUpdatedAt ¶
func (rtc *RefreshTokenCreate) SetNillableUpdatedAt(t *time.Time) *RefreshTokenCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*RefreshTokenCreate) SetNillableUserAgent ¶
func (rtc *RefreshTokenCreate) SetNillableUserAgent(s *string) *RefreshTokenCreate
SetNillableUserAgent sets the "user_agent" field if the given value is not nil.
func (*RefreshTokenCreate) SetOwner ¶
func (rtc *RefreshTokenCreate) SetOwner(u *User) *RefreshTokenCreate
SetOwner sets the "owner" edge to the User entity.
func (*RefreshTokenCreate) SetOwnerID ¶
func (rtc *RefreshTokenCreate) SetOwnerID(u uuid.UUID) *RefreshTokenCreate
SetOwnerID sets the "owner_id" field.
func (*RefreshTokenCreate) SetRevoked ¶
func (rtc *RefreshTokenCreate) SetRevoked(b bool) *RefreshTokenCreate
SetRevoked sets the "revoked" field.
func (*RefreshTokenCreate) SetTokenHash ¶
func (rtc *RefreshTokenCreate) SetTokenHash(s string) *RefreshTokenCreate
SetTokenHash sets the "token_hash" field.
func (*RefreshTokenCreate) SetUpdatedAt ¶
func (rtc *RefreshTokenCreate) SetUpdatedAt(t time.Time) *RefreshTokenCreate
SetUpdatedAt sets the "updated_at" field.
func (*RefreshTokenCreate) SetUserAgent ¶
func (rtc *RefreshTokenCreate) SetUserAgent(s string) *RefreshTokenCreate
SetUserAgent sets the "user_agent" field.
type RefreshTokenCreateBulk ¶
type RefreshTokenCreateBulk struct {
// contains filtered or unexported fields
}
RefreshTokenCreateBulk is the builder for creating many RefreshToken entities in bulk.
func (*RefreshTokenCreateBulk) Exec ¶
func (rtcb *RefreshTokenCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RefreshTokenCreateBulk) ExecX ¶
func (rtcb *RefreshTokenCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RefreshTokenCreateBulk) Save ¶
func (rtcb *RefreshTokenCreateBulk) Save(ctx context.Context) ([]*RefreshToken, error)
Save creates the RefreshToken entities in the database.
func (*RefreshTokenCreateBulk) SaveX ¶
func (rtcb *RefreshTokenCreateBulk) SaveX(ctx context.Context) []*RefreshToken
SaveX is like Save, but panics if an error occurs.
type RefreshTokenDelete ¶
type RefreshTokenDelete struct {
// contains filtered or unexported fields
}
RefreshTokenDelete is the builder for deleting a RefreshToken entity.
func (*RefreshTokenDelete) Exec ¶
func (rtd *RefreshTokenDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RefreshTokenDelete) ExecX ¶
func (rtd *RefreshTokenDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RefreshTokenDelete) Where ¶
func (rtd *RefreshTokenDelete) Where(ps ...predicate.RefreshToken) *RefreshTokenDelete
Where appends a list predicates to the RefreshTokenDelete builder.
type RefreshTokenDeleteOne ¶
type RefreshTokenDeleteOne struct {
// contains filtered or unexported fields
}
RefreshTokenDeleteOne is the builder for deleting a single RefreshToken entity.
func (*RefreshTokenDeleteOne) Exec ¶
func (rtdo *RefreshTokenDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RefreshTokenDeleteOne) ExecX ¶
func (rtdo *RefreshTokenDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RefreshTokenDeleteOne) Where ¶
func (rtdo *RefreshTokenDeleteOne) Where(ps ...predicate.RefreshToken) *RefreshTokenDeleteOne
Where appends a list predicates to the RefreshTokenDelete builder.
type RefreshTokenEdge ¶
type RefreshTokenEdge struct { Node *RefreshToken `json:"node"` Cursor Cursor `json:"cursor"` }
RefreshTokenEdge is the edge representation of RefreshToken.
type RefreshTokenEdges ¶
type RefreshTokenEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
RefreshTokenEdges holds the relations/edges for other nodes in the graph.
func (RefreshTokenEdges) OwnerOrErr ¶
func (e RefreshTokenEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RefreshTokenFilter ¶
type RefreshTokenFilter struct {
// contains filtered or unexported fields
}
RefreshTokenFilter provides a generic filtering capability at runtime for RefreshTokenQuery.
func (*RefreshTokenFilter) Where ¶
func (f *RefreshTokenFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*RefreshTokenFilter) WhereCreatedAt ¶
func (f *RefreshTokenFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*RefreshTokenFilter) WhereExpiresAt ¶
func (f *RefreshTokenFilter) WhereExpiresAt(p entql.TimeP)
WhereExpiresAt applies the entql time.Time predicate on the expires_at field.
func (*RefreshTokenFilter) WhereHasOwner ¶
func (f *RefreshTokenFilter) WhereHasOwner()
WhereHasOwner applies a predicate to check if query has an edge owner.
func (*RefreshTokenFilter) WhereHasOwnerWith ¶
func (f *RefreshTokenFilter) WhereHasOwnerWith(preds ...predicate.User)
WhereHasOwnerWith applies a predicate to check if query has an edge owner with a given conditions (other predicates).
func (*RefreshTokenFilter) WhereID ¶
func (f *RefreshTokenFilter) WhereID(p entql.ValueP)
WhereID applies the entql [16]byte predicate on the id field.
func (*RefreshTokenFilter) WhereIPAddress ¶
func (f *RefreshTokenFilter) WhereIPAddress(p entql.StringP)
WhereIPAddress applies the entql string predicate on the ip_address field.
func (*RefreshTokenFilter) WhereOwnerID ¶
func (f *RefreshTokenFilter) WhereOwnerID(p entql.ValueP)
WhereOwnerID applies the entql [16]byte predicate on the owner_id field.
func (*RefreshTokenFilter) WhereRevoked ¶
func (f *RefreshTokenFilter) WhereRevoked(p entql.BoolP)
WhereRevoked applies the entql bool predicate on the revoked field.
func (*RefreshTokenFilter) WhereTokenHash ¶
func (f *RefreshTokenFilter) WhereTokenHash(p entql.StringP)
WhereTokenHash applies the entql string predicate on the token_hash field.
func (*RefreshTokenFilter) WhereUpdatedAt ¶
func (f *RefreshTokenFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
func (*RefreshTokenFilter) WhereUserAgent ¶
func (f *RefreshTokenFilter) WhereUserAgent(p entql.StringP)
WhereUserAgent applies the entql string predicate on the user_agent field.
type RefreshTokenGroupBy ¶
type RefreshTokenGroupBy struct {
// contains filtered or unexported fields
}
RefreshTokenGroupBy is the group-by builder for RefreshToken entities.
func (*RefreshTokenGroupBy) Aggregate ¶
func (rtgb *RefreshTokenGroupBy) Aggregate(fns ...AggregateFunc) *RefreshTokenGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RefreshTokenGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RefreshTokenGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RefreshTokenGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RefreshTokenGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RefreshTokenGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RefreshTokenGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RefreshTokenGroupBy) Scan ¶
func (rtgb *RefreshTokenGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RefreshTokenGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RefreshTokenMutation ¶
type RefreshTokenMutation struct {
// contains filtered or unexported fields
}
RefreshTokenMutation represents an operation that mutates the RefreshToken nodes in the graph.
func (*RefreshTokenMutation) AddField ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) AddedEdges ¶
func (m *RefreshTokenMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RefreshTokenMutation) AddedField ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) AddedFields ¶
func (m *RefreshTokenMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RefreshTokenMutation) AddedIDs ¶
func (m *RefreshTokenMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RefreshTokenMutation) ClearEdge ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) ClearField ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) ClearIPAddress ¶
func (m *RefreshTokenMutation) ClearIPAddress()
ClearIPAddress clears the value of the "ip_address" field.
func (*RefreshTokenMutation) ClearOwner ¶
func (m *RefreshTokenMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*RefreshTokenMutation) ClearUserAgent ¶
func (m *RefreshTokenMutation) ClearUserAgent()
ClearUserAgent clears the value of the "user_agent" field.
func (*RefreshTokenMutation) ClearedEdges ¶
func (m *RefreshTokenMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RefreshTokenMutation) ClearedFields ¶
func (m *RefreshTokenMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RefreshTokenMutation) Client ¶
func (m RefreshTokenMutation) 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 (*RefreshTokenMutation) CreatedAt ¶
func (m *RefreshTokenMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RefreshTokenMutation) EdgeCleared ¶
func (m *RefreshTokenMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RefreshTokenMutation) ExpiresAt ¶
func (m *RefreshTokenMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the value of the "expires_at" field in the mutation.
func (*RefreshTokenMutation) Field ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) FieldCleared ¶
func (m *RefreshTokenMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RefreshTokenMutation) Fields ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) Filter ¶
func (m *RefreshTokenMutation) Filter() *RefreshTokenFilter
Filter returns an entql.Where implementation to apply filters on the RefreshTokenMutation builder.
func (*RefreshTokenMutation) ID ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) 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 (*RefreshTokenMutation) IPAddress ¶
func (m *RefreshTokenMutation) IPAddress() (r string, exists bool)
IPAddress returns the value of the "ip_address" field in the mutation.
func (*RefreshTokenMutation) IPAddressCleared ¶
func (m *RefreshTokenMutation) IPAddressCleared() bool
IPAddressCleared returns if the "ip_address" field was cleared in this mutation.
func (*RefreshTokenMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the RefreshToken entity. If the RefreshToken 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 (*RefreshTokenMutation) OldExpiresAt ¶
OldExpiresAt returns the old "expires_at" field's value of the RefreshToken entity. If the RefreshToken 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 (*RefreshTokenMutation) 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 (*RefreshTokenMutation) OldIPAddress ¶
func (m *RefreshTokenMutation) OldIPAddress(ctx context.Context) (v string, err error)
OldIPAddress returns the old "ip_address" field's value of the RefreshToken entity. If the RefreshToken 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 (*RefreshTokenMutation) OldOwnerID ¶
OldOwnerID returns the old "owner_id" field's value of the RefreshToken entity. If the RefreshToken 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 (*RefreshTokenMutation) OldRevoked ¶
func (m *RefreshTokenMutation) OldRevoked(ctx context.Context) (v bool, err error)
OldRevoked returns the old "revoked" field's value of the RefreshToken entity. If the RefreshToken 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 (*RefreshTokenMutation) OldTokenHash ¶
func (m *RefreshTokenMutation) OldTokenHash(ctx context.Context) (v string, err error)
OldTokenHash returns the old "token_hash" field's value of the RefreshToken entity. If the RefreshToken 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 (*RefreshTokenMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the RefreshToken entity. If the RefreshToken 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 (*RefreshTokenMutation) OldUserAgent ¶
func (m *RefreshTokenMutation) OldUserAgent(ctx context.Context) (v string, err error)
OldUserAgent returns the old "user_agent" field's value of the RefreshToken entity. If the RefreshToken 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 (*RefreshTokenMutation) Op ¶
func (m *RefreshTokenMutation) Op() Op
Op returns the operation name.
func (*RefreshTokenMutation) OwnerCleared ¶
func (m *RefreshTokenMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*RefreshTokenMutation) OwnerID ¶
func (m *RefreshTokenMutation) OwnerID() (r uuid.UUID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*RefreshTokenMutation) OwnerIDs ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) RemovedEdges ¶
func (m *RefreshTokenMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RefreshTokenMutation) RemovedIDs ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) ResetCreatedAt ¶
func (m *RefreshTokenMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RefreshTokenMutation) ResetEdge ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) ResetExpiresAt ¶
func (m *RefreshTokenMutation) ResetExpiresAt()
ResetExpiresAt resets all changes to the "expires_at" field.
func (*RefreshTokenMutation) ResetField ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) ResetIPAddress ¶
func (m *RefreshTokenMutation) ResetIPAddress()
ResetIPAddress resets all changes to the "ip_address" field.
func (*RefreshTokenMutation) ResetOwner ¶
func (m *RefreshTokenMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*RefreshTokenMutation) ResetOwnerID ¶
func (m *RefreshTokenMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*RefreshTokenMutation) ResetRevoked ¶
func (m *RefreshTokenMutation) ResetRevoked()
ResetRevoked resets all changes to the "revoked" field.
func (*RefreshTokenMutation) ResetTokenHash ¶
func (m *RefreshTokenMutation) ResetTokenHash()
ResetTokenHash resets all changes to the "token_hash" field.
func (*RefreshTokenMutation) ResetUpdatedAt ¶
func (m *RefreshTokenMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*RefreshTokenMutation) ResetUserAgent ¶
func (m *RefreshTokenMutation) ResetUserAgent()
ResetUserAgent resets all changes to the "user_agent" field.
func (*RefreshTokenMutation) Revoked ¶
func (m *RefreshTokenMutation) Revoked() (r bool, exists bool)
Revoked returns the value of the "revoked" field in the mutation.
func (*RefreshTokenMutation) SetCreatedAt ¶
func (m *RefreshTokenMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RefreshTokenMutation) SetExpiresAt ¶
func (m *RefreshTokenMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the "expires_at" field.
func (*RefreshTokenMutation) SetField ¶
func (m *RefreshTokenMutation) 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 (*RefreshTokenMutation) SetID ¶
func (m *RefreshTokenMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of RefreshToken entities.
func (*RefreshTokenMutation) SetIPAddress ¶
func (m *RefreshTokenMutation) SetIPAddress(s string)
SetIPAddress sets the "ip_address" field.
func (*RefreshTokenMutation) SetOp ¶
func (m *RefreshTokenMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RefreshTokenMutation) SetOwnerID ¶
func (m *RefreshTokenMutation) SetOwnerID(u uuid.UUID)
SetOwnerID sets the "owner_id" field.
func (*RefreshTokenMutation) SetRevoked ¶
func (m *RefreshTokenMutation) SetRevoked(b bool)
SetRevoked sets the "revoked" field.
func (*RefreshTokenMutation) SetTokenHash ¶
func (m *RefreshTokenMutation) SetTokenHash(s string)
SetTokenHash sets the "token_hash" field.
func (*RefreshTokenMutation) SetUpdatedAt ¶
func (m *RefreshTokenMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*RefreshTokenMutation) SetUserAgent ¶
func (m *RefreshTokenMutation) SetUserAgent(s string)
SetUserAgent sets the "user_agent" field.
func (*RefreshTokenMutation) TokenHash ¶
func (m *RefreshTokenMutation) TokenHash() (r string, exists bool)
TokenHash returns the value of the "token_hash" field in the mutation.
func (RefreshTokenMutation) Tx ¶
func (m RefreshTokenMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RefreshTokenMutation) Type ¶
func (m *RefreshTokenMutation) Type() string
Type returns the node type of this mutation (RefreshToken).
func (*RefreshTokenMutation) UpdatedAt ¶
func (m *RefreshTokenMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*RefreshTokenMutation) UserAgent ¶
func (m *RefreshTokenMutation) UserAgent() (r string, exists bool)
UserAgent returns the value of the "user_agent" field in the mutation.
func (*RefreshTokenMutation) UserAgentCleared ¶
func (m *RefreshTokenMutation) UserAgentCleared() bool
UserAgentCleared returns if the "user_agent" field was cleared in this mutation.
func (*RefreshTokenMutation) Where ¶
func (m *RefreshTokenMutation) Where(ps ...predicate.RefreshToken)
Where appends a list predicates to the RefreshTokenMutation builder.
func (*RefreshTokenMutation) WhereP ¶
func (m *RefreshTokenMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RefreshTokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RefreshTokenOrder ¶
type RefreshTokenOrder struct { Direction OrderDirection `json:"direction"` Field *RefreshTokenOrderField `json:"field"` }
RefreshTokenOrder defines the ordering of RefreshToken.
type RefreshTokenOrderField ¶
type RefreshTokenOrderField struct { // Value extracts the ordering value from the given RefreshToken. Value func(*RefreshToken) (ent.Value, error) // contains filtered or unexported fields }
RefreshTokenOrderField defines the ordering field of RefreshToken.
func (RefreshTokenOrderField) MarshalGQL ¶
func (f RefreshTokenOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (RefreshTokenOrderField) String ¶
func (f RefreshTokenOrderField) String() string
String implement fmt.Stringer interface.
func (*RefreshTokenOrderField) UnmarshalGQL ¶
func (f *RefreshTokenOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type RefreshTokenPaginateOption ¶
type RefreshTokenPaginateOption func(*refreshtokenPager) error
RefreshTokenPaginateOption enables pagination customization.
func WithRefreshTokenFilter ¶
func WithRefreshTokenFilter(filter func(*RefreshTokenQuery) (*RefreshTokenQuery, error)) RefreshTokenPaginateOption
WithRefreshTokenFilter configures pagination filter.
func WithRefreshTokenOrder ¶
func WithRefreshTokenOrder(order *RefreshTokenOrder) RefreshTokenPaginateOption
WithRefreshTokenOrder configures pagination ordering.
type RefreshTokenQuery ¶
type RefreshTokenQuery struct {
// contains filtered or unexported fields
}
RefreshTokenQuery is the builder for querying RefreshToken entities.
func (*RefreshTokenQuery) Aggregate ¶
func (rtq *RefreshTokenQuery) Aggregate(fns ...AggregateFunc) *RefreshTokenSelect
Aggregate returns a RefreshTokenSelect configured with the given aggregations.
func (*RefreshTokenQuery) All ¶
func (rtq *RefreshTokenQuery) All(ctx context.Context) ([]*RefreshToken, error)
All executes the query and returns a list of RefreshTokens.
func (*RefreshTokenQuery) AllX ¶
func (rtq *RefreshTokenQuery) AllX(ctx context.Context) []*RefreshToken
AllX is like All, but panics if an error occurs.
func (*RefreshTokenQuery) Clone ¶
func (rtq *RefreshTokenQuery) Clone() *RefreshTokenQuery
Clone returns a duplicate of the RefreshTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RefreshTokenQuery) CollectFields ¶
func (rt *RefreshTokenQuery) CollectFields(ctx context.Context, satisfies ...string) (*RefreshTokenQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*RefreshTokenQuery) Count ¶
func (rtq *RefreshTokenQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RefreshTokenQuery) CountX ¶
func (rtq *RefreshTokenQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RefreshTokenQuery) Exist ¶
func (rtq *RefreshTokenQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RefreshTokenQuery) ExistX ¶
func (rtq *RefreshTokenQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RefreshTokenQuery) Filter ¶
func (rtq *RefreshTokenQuery) Filter() *RefreshTokenFilter
Filter returns a Filter implementation to apply filters on the RefreshTokenQuery builder.
func (*RefreshTokenQuery) First ¶
func (rtq *RefreshTokenQuery) First(ctx context.Context) (*RefreshToken, error)
First returns the first RefreshToken entity from the query. Returns a *NotFoundError when no RefreshToken was found.
func (*RefreshTokenQuery) FirstID ¶
FirstID returns the first RefreshToken ID from the query. Returns a *NotFoundError when no RefreshToken ID was found.
func (*RefreshTokenQuery) FirstIDX ¶
func (rtq *RefreshTokenQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*RefreshTokenQuery) FirstX ¶
func (rtq *RefreshTokenQuery) FirstX(ctx context.Context) *RefreshToken
FirstX is like First, but panics if an error occurs.
func (*RefreshTokenQuery) ForShare ¶
func (rtq *RefreshTokenQuery) ForShare(opts ...sql.LockOption) *RefreshTokenQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*RefreshTokenQuery) ForUpdate ¶
func (rtq *RefreshTokenQuery) ForUpdate(opts ...sql.LockOption) *RefreshTokenQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*RefreshTokenQuery) GroupBy ¶
func (rtq *RefreshTokenQuery) GroupBy(field string, fields ...string) *RefreshTokenGroupBy
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 { UpdatedAt time.Time `json:"updated_at,omitempty"` Count int `json:"count,omitempty"` } client.RefreshToken.Query(). GroupBy(refreshtoken.FieldUpdatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*RefreshTokenQuery) IDsX ¶
func (rtq *RefreshTokenQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*RefreshTokenQuery) Limit ¶
func (rtq *RefreshTokenQuery) Limit(limit int) *RefreshTokenQuery
Limit the number of records to be returned by this query.
func (*RefreshTokenQuery) Modify ¶
func (rtq *RefreshTokenQuery) Modify(modifiers ...func(s *sql.Selector)) *RefreshTokenSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*RefreshTokenQuery) Offset ¶
func (rtq *RefreshTokenQuery) Offset(offset int) *RefreshTokenQuery
Offset to start from.
func (*RefreshTokenQuery) Only ¶
func (rtq *RefreshTokenQuery) Only(ctx context.Context) (*RefreshToken, error)
Only returns a single RefreshToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RefreshToken entity is found. Returns a *NotFoundError when no RefreshToken entities are found.
func (*RefreshTokenQuery) OnlyID ¶
OnlyID is like Only, but returns the only RefreshToken ID in the query. Returns a *NotSingularError when more than one RefreshToken ID is found. Returns a *NotFoundError when no entities are found.
func (*RefreshTokenQuery) OnlyIDX ¶
func (rtq *RefreshTokenQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RefreshTokenQuery) OnlyX ¶
func (rtq *RefreshTokenQuery) OnlyX(ctx context.Context) *RefreshToken
OnlyX is like Only, but panics if an error occurs.
func (*RefreshTokenQuery) Order ¶
func (rtq *RefreshTokenQuery) Order(o ...refreshtoken.OrderOption) *RefreshTokenQuery
Order specifies how the records should be ordered.
func (*RefreshTokenQuery) Paginate ¶
func (rt *RefreshTokenQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...RefreshTokenPaginateOption, ) (*RefreshTokenConnection, error)
Paginate executes the query and returns a relay based cursor connection to RefreshToken.
func (*RefreshTokenQuery) QueryOwner ¶
func (rtq *RefreshTokenQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*RefreshTokenQuery) Select ¶
func (rtq *RefreshTokenQuery) Select(fields ...string) *RefreshTokenSelect
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 { UpdatedAt time.Time `json:"updated_at,omitempty"` } client.RefreshToken.Query(). Select(refreshtoken.FieldUpdatedAt). Scan(ctx, &v)
func (*RefreshTokenQuery) Unique ¶
func (rtq *RefreshTokenQuery) Unique(unique bool) *RefreshTokenQuery
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 (*RefreshTokenQuery) Where ¶
func (rtq *RefreshTokenQuery) Where(ps ...predicate.RefreshToken) *RefreshTokenQuery
Where adds a new predicate for the RefreshTokenQuery builder.
func (*RefreshTokenQuery) WithOwner ¶
func (rtq *RefreshTokenQuery) WithOwner(opts ...func(*UserQuery)) *RefreshTokenQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type RefreshTokenSelect ¶
type RefreshTokenSelect struct { *RefreshTokenQuery // contains filtered or unexported fields }
RefreshTokenSelect is the builder for selecting fields of RefreshToken entities.
func (*RefreshTokenSelect) Aggregate ¶
func (rts *RefreshTokenSelect) Aggregate(fns ...AggregateFunc) *RefreshTokenSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RefreshTokenSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RefreshTokenSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RefreshTokenSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RefreshTokenSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RefreshTokenSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RefreshTokenSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RefreshTokenSelect) Modify ¶
func (rts *RefreshTokenSelect) Modify(modifiers ...func(s *sql.Selector)) *RefreshTokenSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*RefreshTokenSelect) Scan ¶
func (rts *RefreshTokenSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RefreshTokenSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RefreshTokenUpdate ¶
type RefreshTokenUpdate struct {
// contains filtered or unexported fields
}
RefreshTokenUpdate is the builder for updating RefreshToken entities.
func (*RefreshTokenUpdate) ClearIPAddress ¶
func (rtu *RefreshTokenUpdate) ClearIPAddress() *RefreshTokenUpdate
ClearIPAddress clears the value of the "ip_address" field.
func (*RefreshTokenUpdate) ClearOwner ¶
func (rtu *RefreshTokenUpdate) ClearOwner() *RefreshTokenUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*RefreshTokenUpdate) ClearUserAgent ¶
func (rtu *RefreshTokenUpdate) ClearUserAgent() *RefreshTokenUpdate
ClearUserAgent clears the value of the "user_agent" field.
func (*RefreshTokenUpdate) Exec ¶
func (rtu *RefreshTokenUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RefreshTokenUpdate) ExecX ¶
func (rtu *RefreshTokenUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RefreshTokenUpdate) Modify ¶
func (rtu *RefreshTokenUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RefreshTokenUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*RefreshTokenUpdate) Mutation ¶
func (rtu *RefreshTokenUpdate) Mutation() *RefreshTokenMutation
Mutation returns the RefreshTokenMutation object of the builder.
func (*RefreshTokenUpdate) Save ¶
func (rtu *RefreshTokenUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RefreshTokenUpdate) SaveX ¶
func (rtu *RefreshTokenUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RefreshTokenUpdate) SetExpiresAt ¶
func (rtu *RefreshTokenUpdate) SetExpiresAt(t time.Time) *RefreshTokenUpdate
SetExpiresAt sets the "expires_at" field.
func (*RefreshTokenUpdate) SetIPAddress ¶
func (rtu *RefreshTokenUpdate) SetIPAddress(s string) *RefreshTokenUpdate
SetIPAddress sets the "ip_address" field.
func (*RefreshTokenUpdate) SetInput ¶
func (c *RefreshTokenUpdate) SetInput(i UpdateRefreshTokenInput) *RefreshTokenUpdate
SetInput applies the change-set in the UpdateRefreshTokenInput on the RefreshTokenUpdate builder.
func (*RefreshTokenUpdate) SetNillableExpiresAt ¶
func (rtu *RefreshTokenUpdate) SetNillableExpiresAt(t *time.Time) *RefreshTokenUpdate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*RefreshTokenUpdate) SetNillableIPAddress ¶
func (rtu *RefreshTokenUpdate) SetNillableIPAddress(s *string) *RefreshTokenUpdate
SetNillableIPAddress sets the "ip_address" field if the given value is not nil.
func (*RefreshTokenUpdate) SetNillableOwnerID ¶
func (rtu *RefreshTokenUpdate) SetNillableOwnerID(u *uuid.UUID) *RefreshTokenUpdate
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*RefreshTokenUpdate) SetNillableRevoked ¶
func (rtu *RefreshTokenUpdate) SetNillableRevoked(b *bool) *RefreshTokenUpdate
SetNillableRevoked sets the "revoked" field if the given value is not nil.
func (*RefreshTokenUpdate) SetNillableTokenHash ¶
func (rtu *RefreshTokenUpdate) SetNillableTokenHash(s *string) *RefreshTokenUpdate
SetNillableTokenHash sets the "token_hash" field if the given value is not nil.
func (*RefreshTokenUpdate) SetNillableUserAgent ¶
func (rtu *RefreshTokenUpdate) SetNillableUserAgent(s *string) *RefreshTokenUpdate
SetNillableUserAgent sets the "user_agent" field if the given value is not nil.
func (*RefreshTokenUpdate) SetOwner ¶
func (rtu *RefreshTokenUpdate) SetOwner(u *User) *RefreshTokenUpdate
SetOwner sets the "owner" edge to the User entity.
func (*RefreshTokenUpdate) SetOwnerID ¶
func (rtu *RefreshTokenUpdate) SetOwnerID(u uuid.UUID) *RefreshTokenUpdate
SetOwnerID sets the "owner_id" field.
func (*RefreshTokenUpdate) SetRevoked ¶
func (rtu *RefreshTokenUpdate) SetRevoked(b bool) *RefreshTokenUpdate
SetRevoked sets the "revoked" field.
func (*RefreshTokenUpdate) SetTokenHash ¶
func (rtu *RefreshTokenUpdate) SetTokenHash(s string) *RefreshTokenUpdate
SetTokenHash sets the "token_hash" field.
func (*RefreshTokenUpdate) SetUpdatedAt ¶
func (rtu *RefreshTokenUpdate) SetUpdatedAt(t time.Time) *RefreshTokenUpdate
SetUpdatedAt sets the "updated_at" field.
func (*RefreshTokenUpdate) SetUserAgent ¶
func (rtu *RefreshTokenUpdate) SetUserAgent(s string) *RefreshTokenUpdate
SetUserAgent sets the "user_agent" field.
func (*RefreshTokenUpdate) Where ¶
func (rtu *RefreshTokenUpdate) Where(ps ...predicate.RefreshToken) *RefreshTokenUpdate
Where appends a list predicates to the RefreshTokenUpdate builder.
type RefreshTokenUpdateOne ¶
type RefreshTokenUpdateOne struct {
// contains filtered or unexported fields
}
RefreshTokenUpdateOne is the builder for updating a single RefreshToken entity.
func (*RefreshTokenUpdateOne) ClearIPAddress ¶
func (rtuo *RefreshTokenUpdateOne) ClearIPAddress() *RefreshTokenUpdateOne
ClearIPAddress clears the value of the "ip_address" field.
func (*RefreshTokenUpdateOne) ClearOwner ¶
func (rtuo *RefreshTokenUpdateOne) ClearOwner() *RefreshTokenUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*RefreshTokenUpdateOne) ClearUserAgent ¶
func (rtuo *RefreshTokenUpdateOne) ClearUserAgent() *RefreshTokenUpdateOne
ClearUserAgent clears the value of the "user_agent" field.
func (*RefreshTokenUpdateOne) Exec ¶
func (rtuo *RefreshTokenUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RefreshTokenUpdateOne) ExecX ¶
func (rtuo *RefreshTokenUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RefreshTokenUpdateOne) Modify ¶
func (rtuo *RefreshTokenUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RefreshTokenUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*RefreshTokenUpdateOne) Mutation ¶
func (rtuo *RefreshTokenUpdateOne) Mutation() *RefreshTokenMutation
Mutation returns the RefreshTokenMutation object of the builder.
func (*RefreshTokenUpdateOne) Save ¶
func (rtuo *RefreshTokenUpdateOne) Save(ctx context.Context) (*RefreshToken, error)
Save executes the query and returns the updated RefreshToken entity.
func (*RefreshTokenUpdateOne) SaveX ¶
func (rtuo *RefreshTokenUpdateOne) SaveX(ctx context.Context) *RefreshToken
SaveX is like Save, but panics if an error occurs.
func (*RefreshTokenUpdateOne) Select ¶
func (rtuo *RefreshTokenUpdateOne) Select(field string, fields ...string) *RefreshTokenUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RefreshTokenUpdateOne) SetExpiresAt ¶
func (rtuo *RefreshTokenUpdateOne) SetExpiresAt(t time.Time) *RefreshTokenUpdateOne
SetExpiresAt sets the "expires_at" field.
func (*RefreshTokenUpdateOne) SetIPAddress ¶
func (rtuo *RefreshTokenUpdateOne) SetIPAddress(s string) *RefreshTokenUpdateOne
SetIPAddress sets the "ip_address" field.
func (*RefreshTokenUpdateOne) SetInput ¶
func (c *RefreshTokenUpdateOne) SetInput(i UpdateRefreshTokenInput) *RefreshTokenUpdateOne
SetInput applies the change-set in the UpdateRefreshTokenInput on the RefreshTokenUpdateOne builder.
func (*RefreshTokenUpdateOne) SetNillableExpiresAt ¶
func (rtuo *RefreshTokenUpdateOne) SetNillableExpiresAt(t *time.Time) *RefreshTokenUpdateOne
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*RefreshTokenUpdateOne) SetNillableIPAddress ¶
func (rtuo *RefreshTokenUpdateOne) SetNillableIPAddress(s *string) *RefreshTokenUpdateOne
SetNillableIPAddress sets the "ip_address" field if the given value is not nil.
func (*RefreshTokenUpdateOne) SetNillableOwnerID ¶
func (rtuo *RefreshTokenUpdateOne) SetNillableOwnerID(u *uuid.UUID) *RefreshTokenUpdateOne
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*RefreshTokenUpdateOne) SetNillableRevoked ¶
func (rtuo *RefreshTokenUpdateOne) SetNillableRevoked(b *bool) *RefreshTokenUpdateOne
SetNillableRevoked sets the "revoked" field if the given value is not nil.
func (*RefreshTokenUpdateOne) SetNillableTokenHash ¶
func (rtuo *RefreshTokenUpdateOne) SetNillableTokenHash(s *string) *RefreshTokenUpdateOne
SetNillableTokenHash sets the "token_hash" field if the given value is not nil.
func (*RefreshTokenUpdateOne) SetNillableUserAgent ¶
func (rtuo *RefreshTokenUpdateOne) SetNillableUserAgent(s *string) *RefreshTokenUpdateOne
SetNillableUserAgent sets the "user_agent" field if the given value is not nil.
func (*RefreshTokenUpdateOne) SetOwner ¶
func (rtuo *RefreshTokenUpdateOne) SetOwner(u *User) *RefreshTokenUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*RefreshTokenUpdateOne) SetOwnerID ¶
func (rtuo *RefreshTokenUpdateOne) SetOwnerID(u uuid.UUID) *RefreshTokenUpdateOne
SetOwnerID sets the "owner_id" field.
func (*RefreshTokenUpdateOne) SetRevoked ¶
func (rtuo *RefreshTokenUpdateOne) SetRevoked(b bool) *RefreshTokenUpdateOne
SetRevoked sets the "revoked" field.
func (*RefreshTokenUpdateOne) SetTokenHash ¶
func (rtuo *RefreshTokenUpdateOne) SetTokenHash(s string) *RefreshTokenUpdateOne
SetTokenHash sets the "token_hash" field.
func (*RefreshTokenUpdateOne) SetUpdatedAt ¶
func (rtuo *RefreshTokenUpdateOne) SetUpdatedAt(t time.Time) *RefreshTokenUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*RefreshTokenUpdateOne) SetUserAgent ¶
func (rtuo *RefreshTokenUpdateOne) SetUserAgent(s string) *RefreshTokenUpdateOne
SetUserAgent sets the "user_agent" field.
func (*RefreshTokenUpdateOne) Where ¶
func (rtuo *RefreshTokenUpdateOne) Where(ps ...predicate.RefreshToken) *RefreshTokenUpdateOne
Where appends a list predicates to the RefreshTokenUpdate builder.
type RefreshTokenWhereInput ¶
type RefreshTokenWhereInput struct { Predicates []predicate.RefreshToken `json:"-"` Not *RefreshTokenWhereInput `json:"not,omitempty"` Or []*RefreshTokenWhereInput `json:"or,omitempty"` And []*RefreshTokenWhereInput `json:"and,omitempty"` // "id" field predicates. ID *uuid.UUID `json:"id,omitempty"` IDNEQ *uuid.UUID `json:"idNEQ,omitempty"` IDIn []uuid.UUID `json:"idIn,omitempty"` IDNotIn []uuid.UUID `json:"idNotIn,omitempty"` IDGT *uuid.UUID `json:"idGT,omitempty"` IDGTE *uuid.UUID `json:"idGTE,omitempty"` IDLT *uuid.UUID `json:"idLT,omitempty"` IDLTE *uuid.UUID `json:"idLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "expires_at" field predicates. ExpiresAt *time.Time `json:"expiresAt,omitempty"` ExpiresAtNEQ *time.Time `json:"expiresAtNEQ,omitempty"` ExpiresAtIn []time.Time `json:"expiresAtIn,omitempty"` ExpiresAtNotIn []time.Time `json:"expiresAtNotIn,omitempty"` ExpiresAtGT *time.Time `json:"expiresAtGT,omitempty"` ExpiresAtGTE *time.Time `json:"expiresAtGTE,omitempty"` ExpiresAtLT *time.Time `json:"expiresAtLT,omitempty"` ExpiresAtLTE *time.Time `json:"expiresAtLTE,omitempty"` // "revoked" field predicates. Revoked *bool `json:"revoked,omitempty"` RevokedNEQ *bool `json:"revokedNEQ,omitempty"` // "ip_address" field predicates. IPAddress *string `json:"ipAddress,omitempty"` IPAddressNEQ *string `json:"ipAddressNEQ,omitempty"` IPAddressIn []string `json:"ipAddressIn,omitempty"` IPAddressNotIn []string `json:"ipAddressNotIn,omitempty"` IPAddressGT *string `json:"ipAddressGT,omitempty"` IPAddressGTE *string `json:"ipAddressGTE,omitempty"` IPAddressLT *string `json:"ipAddressLT,omitempty"` IPAddressLTE *string `json:"ipAddressLTE,omitempty"` IPAddressContains *string `json:"ipAddressContains,omitempty"` IPAddressHasPrefix *string `json:"ipAddressHasPrefix,omitempty"` IPAddressHasSuffix *string `json:"ipAddressHasSuffix,omitempty"` IPAddressIsNil bool `json:"ipAddressIsNil,omitempty"` IPAddressNotNil bool `json:"ipAddressNotNil,omitempty"` IPAddressEqualFold *string `json:"ipAddressEqualFold,omitempty"` IPAddressContainsFold *string `json:"ipAddressContainsFold,omitempty"` // "user_agent" field predicates. UserAgent *string `json:"userAgent,omitempty"` UserAgentNEQ *string `json:"userAgentNEQ,omitempty"` UserAgentIn []string `json:"userAgentIn,omitempty"` UserAgentNotIn []string `json:"userAgentNotIn,omitempty"` UserAgentGT *string `json:"userAgentGT,omitempty"` UserAgentGTE *string `json:"userAgentGTE,omitempty"` UserAgentLT *string `json:"userAgentLT,omitempty"` UserAgentLTE *string `json:"userAgentLTE,omitempty"` UserAgentContains *string `json:"userAgentContains,omitempty"` UserAgentHasPrefix *string `json:"userAgentHasPrefix,omitempty"` UserAgentHasSuffix *string `json:"userAgentHasSuffix,omitempty"` UserAgentIsNil bool `json:"userAgentIsNil,omitempty"` UserAgentNotNil bool `json:"userAgentNotNil,omitempty"` UserAgentEqualFold *string `json:"userAgentEqualFold,omitempty"` UserAgentContainsFold *string `json:"userAgentContainsFold,omitempty"` // "owner" edge predicates. HasOwner *bool `json:"hasOwner,omitempty"` HasOwnerWith []*UserWhereInput `json:"hasOwnerWith,omitempty"` }
RefreshTokenWhereInput represents a where input for filtering RefreshToken queries.
func (*RefreshTokenWhereInput) AddPredicates ¶
func (i *RefreshTokenWhereInput) AddPredicates(predicates ...predicate.RefreshToken)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*RefreshTokenWhereInput) Filter ¶
func (i *RefreshTokenWhereInput) Filter(q *RefreshTokenQuery) (*RefreshTokenQuery, error)
Filter applies the RefreshTokenWhereInput filter on the RefreshTokenQuery builder.
func (*RefreshTokenWhereInput) P ¶
func (i *RefreshTokenWhereInput) P() (predicate.RefreshToken, error)
P returns a predicate for filtering refreshtokens. An error is returned if the input is empty or invalid.
type RefreshTokens ¶
type RefreshTokens []*RefreshToken
RefreshTokens is a parsable slice of RefreshToken.
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 TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // ApiKey is the client for interacting with the ApiKey builders. ApiKey *ApiKeyClient // Comment is the client for interacting with the Comment builders. Comment *CommentClient // Post is the client for interacting with the Post builders. Post *PostClient // PostCategory is the client for interacting with the PostCategory builders. PostCategory *PostCategoryClient // RefreshToken is the client for interacting with the RefreshToken builders. RefreshToken *RefreshTokenClient // 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 UpdateApiKeyInput ¶
UpdateApiKeyInput represents a mutation input for updating apikeys.
func (*UpdateApiKeyInput) Mutate ¶
func (i *UpdateApiKeyInput) Mutate(m *ApiKeyMutation)
Mutate applies the UpdateApiKeyInput on the ApiKeyMutation builder.
type UpdateCommentInput ¶
type UpdateCommentInput struct { Content *string OwnerID *uuid.UUID ClearPost bool PostID *uuid.UUID }
UpdateCommentInput represents a mutation input for updating comments.
func (*UpdateCommentInput) Mutate ¶
func (i *UpdateCommentInput) Mutate(m *CommentMutation)
Mutate applies the UpdateCommentInput on the CommentMutation builder.
type UpdatePostCategoryInput ¶
type UpdatePostCategoryInput struct { Category *postcategory.Category ClearPost bool PostID *uuid.UUID }
UpdatePostCategoryInput represents a mutation input for updating postcategories.
func (*UpdatePostCategoryInput) Mutate ¶
func (i *UpdatePostCategoryInput) Mutate(m *PostCategoryMutation)
Mutate applies the UpdatePostCategoryInput on the PostCategoryMutation builder.
type UpdatePostInput ¶
type UpdatePostInput struct { Pinned *bool Title *string ClearContent bool Content *string Link *string ClearModerationComment bool ModerationComment *string IsModerated *bool ClearComments bool AddCommentIDs []uuid.UUID RemoveCommentIDs []uuid.UUID ClearSavedBy bool AddSavedByIDs []uuid.UUID RemoveSavedByIDs []uuid.UUID ClearLikedBy bool AddLikedByIDs []uuid.UUID RemoveLikedByIDs []uuid.UUID ClearCategories bool AddCategoryIDs []uuid.UUID RemoveCategoryIDs []uuid.UUID }
UpdatePostInput represents a mutation input for updating posts.
func (*UpdatePostInput) Mutate ¶
func (i *UpdatePostInput) Mutate(m *PostMutation)
Mutate applies the UpdatePostInput on the PostMutation builder.
type UpdateRefreshTokenInput ¶
type UpdateRefreshTokenInput struct { ExpiresAt *time.Time Revoked *bool ClearIPAddress bool IPAddress *string ClearUserAgent bool UserAgent *string OwnerID *uuid.UUID }
UpdateRefreshTokenInput represents a mutation input for updating refreshtokens.
func (*UpdateRefreshTokenInput) Mutate ¶
func (i *UpdateRefreshTokenInput) Mutate(m *RefreshTokenMutation)
Mutate applies the UpdateRefreshTokenInput on the RefreshTokenMutation builder.
type UpdateUserInput ¶
type UpdateUserInput struct { DisplayName *string ClearAlias bool Alias *string ClearProfileImage bool ProfileImage *string AuthProvider *user.AuthProvider Role *user.Role ClearLastSeenAt bool LastSeenAt *time.Time ClearLastPostSeenCursor bool LastPostSeenCursor *string ClearAwards bool Awards []string AppendAwards []string ClearSavedPosts bool AddSavedPostIDs []uuid.UUID RemoveSavedPostIDs []uuid.UUID ClearLikedPosts bool AddLikedPostIDs []uuid.UUID RemoveLikedPostIDs []uuid.UUID ClearPublishedPosts bool AddPublishedPostIDs []uuid.UUID RemovePublishedPostIDs []uuid.UUID ClearComments bool AddCommentIDs []uuid.UUID RemoveCommentIDs []uuid.UUID ClearAPIKeys bool AddAPIKeyIDs []uuid.UUID RemoveAPIKeyIDs []uuid.UUID }
UpdateUserInput represents a mutation input for updating users.
func (*UpdateUserInput) Mutate ¶
func (i *UpdateUserInput) Mutate(m *UserMutation)
Mutate applies the UpdateUserInput on the UserMutation builder.
type User ¶
type User struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at,omitempty"` // DeletedBy holds the value of the "deleted_by" field. DeletedBy string `json:"deleted_by,omitempty"` // DisplayName holds the value of the "display_name" field. DisplayName string `json:"display_name,omitempty"` // the alias of the user is shown alongside the display name Alias string `json:"alias,omitempty"` // ProfileImage holds the value of the "profile_image" field. ProfileImage *string `json:"profile_image,omitempty"` // the auth_provider unique id of the user ExternalID string `json:"external_id,omitempty"` // AuthProvider holds the value of the "auth_provider" field. AuthProvider user.AuthProvider `json:"auth_provider,omitempty"` // the role of the user Role user.Role `json:"role,omitempty"` // the time the user was last seen LastSeenAt *time.Time `json:"last_seen_at,omitempty"` // cursor for last post seen LastPostSeenCursor *string `json:"last_post_seen_cursor,omitempty"` // Awards holds the value of the "awards" field. Awards []string `json:"awards,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) LikedPosts ¶
func (*User) NamedAPIKeys ¶
NamedAPIKeys returns the APIKeys named value or an error if the edge was not loaded in eager-loading with this name.
func (*User) NamedComments ¶
NamedComments returns the Comments named value or an error if the edge was not loaded in eager-loading with this name.
func (*User) NamedLikedPosts ¶
NamedLikedPosts returns the LikedPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (*User) NamedPublishedPosts ¶
NamedPublishedPosts returns the PublishedPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (*User) NamedRefreshTokens ¶
func (u *User) NamedRefreshTokens(name string) ([]*RefreshToken, error)
NamedRefreshTokens returns the RefreshTokens named value or an error if the edge was not loaded in eager-loading with this name.
func (*User) NamedSavedPosts ¶
NamedSavedPosts returns the SavedPosts named value or an error if the edge was not loaded in eager-loading with this name.
func (*User) PublishedPosts ¶
func (*User) QueryAPIKeys ¶
func (u *User) QueryAPIKeys() *ApiKeyQuery
QueryAPIKeys queries the "api_keys" edge of the User entity.
func (*User) QueryComments ¶
func (u *User) QueryComments() *CommentQuery
QueryComments queries the "comments" edge of the User entity.
func (*User) QueryLikedPosts ¶
QueryLikedPosts queries the "liked_posts" edge of the User entity.
func (*User) QueryPublishedPosts ¶
QueryPublishedPosts queries the "published_posts" edge of the User entity.
func (*User) QueryRefreshTokens ¶
func (u *User) QueryRefreshTokens() *RefreshTokenQuery
QueryRefreshTokens queries the "refresh_tokens" edge of the User entity.
func (*User) QuerySavedPosts ¶
QuerySavedPosts queries the "saved_posts" edge of the User entity.
func (*User) SavedPosts ¶
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) QueryAPIKeys ¶
func (c *UserClient) QueryAPIKeys(u *User) *ApiKeyQuery
QueryAPIKeys queries the api_keys edge of a User.
func (*UserClient) QueryComments ¶
func (c *UserClient) QueryComments(u *User) *CommentQuery
QueryComments queries the comments edge of a User.
func (*UserClient) QueryLikedPosts ¶
func (c *UserClient) QueryLikedPosts(u *User) *PostQuery
QueryLikedPosts queries the liked_posts edge of a User.
func (*UserClient) QueryPublishedPosts ¶
func (c *UserClient) QueryPublishedPosts(u *User) *PostQuery
QueryPublishedPosts queries the published_posts edge of a User.
func (*UserClient) QueryRefreshTokens ¶
func (c *UserClient) QueryRefreshTokens(u *User) *RefreshTokenQuery
QueryRefreshTokens queries the refresh_tokens edge of a User.
func (*UserClient) QuerySavedPosts ¶
func (c *UserClient) QuerySavedPosts(u *User) *PostQuery
QuerySavedPosts queries the saved_posts 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 UserConnection ¶
type UserConnection struct { Edges []*UserEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
UserConnection is the connection containing edges to User.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddAPIKeyIDs ¶
func (uc *UserCreate) AddAPIKeyIDs(ids ...uuid.UUID) *UserCreate
AddAPIKeyIDs adds the "api_keys" edge to the ApiKey entity by IDs.
func (*UserCreate) AddAPIKeys ¶
func (uc *UserCreate) AddAPIKeys(a ...*ApiKey) *UserCreate
AddAPIKeys adds the "api_keys" edges to the ApiKey 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) AddLikedPostIDs ¶
func (uc *UserCreate) AddLikedPostIDs(ids ...uuid.UUID) *UserCreate
AddLikedPostIDs adds the "liked_posts" edge to the Post entity by IDs.
func (*UserCreate) AddLikedPosts ¶
func (uc *UserCreate) AddLikedPosts(p ...*Post) *UserCreate
AddLikedPosts adds the "liked_posts" edges to the Post entity.
func (*UserCreate) AddPublishedPostIDs ¶
func (uc *UserCreate) AddPublishedPostIDs(ids ...uuid.UUID) *UserCreate
AddPublishedPostIDs adds the "published_posts" edge to the Post entity by IDs.
func (*UserCreate) AddPublishedPosts ¶
func (uc *UserCreate) AddPublishedPosts(p ...*Post) *UserCreate
AddPublishedPosts adds the "published_posts" edges to the Post entity.
func (*UserCreate) AddRefreshTokenIDs ¶
func (uc *UserCreate) AddRefreshTokenIDs(ids ...uuid.UUID) *UserCreate
AddRefreshTokenIDs adds the "refresh_tokens" edge to the RefreshToken entity by IDs.
func (*UserCreate) AddRefreshTokens ¶
func (uc *UserCreate) AddRefreshTokens(r ...*RefreshToken) *UserCreate
AddRefreshTokens adds the "refresh_tokens" edges to the RefreshToken entity.
func (*UserCreate) AddSavedPostIDs ¶
func (uc *UserCreate) AddSavedPostIDs(ids ...uuid.UUID) *UserCreate
AddSavedPostIDs adds the "saved_posts" edge to the Post entity by IDs.
func (*UserCreate) AddSavedPosts ¶
func (uc *UserCreate) AddSavedPosts(p ...*Post) *UserCreate
AddSavedPosts adds the "saved_posts" edges to the Post 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) SetAlias ¶
func (uc *UserCreate) SetAlias(s string) *UserCreate
SetAlias sets the "alias" field.
func (*UserCreate) SetAuthProvider ¶
func (uc *UserCreate) SetAuthProvider(up user.AuthProvider) *UserCreate
SetAuthProvider sets the "auth_provider" field.
func (*UserCreate) SetAwards ¶
func (uc *UserCreate) SetAwards(s []string) *UserCreate
SetAwards sets the "awards" field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetDeletedAt ¶
func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
SetDeletedAt sets the "deleted_at" field.
func (*UserCreate) SetDeletedBy ¶
func (uc *UserCreate) SetDeletedBy(s string) *UserCreate
SetDeletedBy sets the "deleted_by" field.
func (*UserCreate) SetDisplayName ¶
func (uc *UserCreate) SetDisplayName(s string) *UserCreate
SetDisplayName sets the "display_name" field.
func (*UserCreate) SetExternalID ¶
func (uc *UserCreate) SetExternalID(s string) *UserCreate
SetExternalID sets the "external_id" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetInput ¶
func (c *UserCreate) SetInput(i CreateUserInput) *UserCreate
SetInput applies the change-set in the CreateUserInput on the UserCreate builder.
func (*UserCreate) SetLastPostSeenCursor ¶
func (uc *UserCreate) SetLastPostSeenCursor(s string) *UserCreate
SetLastPostSeenCursor sets the "last_post_seen_cursor" field.
func (*UserCreate) SetLastSeenAt ¶
func (uc *UserCreate) SetLastSeenAt(t time.Time) *UserCreate
SetLastSeenAt sets the "last_seen_at" field.
func (*UserCreate) SetNillableAlias ¶
func (uc *UserCreate) SetNillableAlias(s *string) *UserCreate
SetNillableAlias sets the "alias" field if the given value is not nil.
func (*UserCreate) SetNillableAuthProvider ¶
func (uc *UserCreate) SetNillableAuthProvider(up *user.AuthProvider) *UserCreate
SetNillableAuthProvider sets the "auth_provider" 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) SetNillableDeletedAt ¶
func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserCreate) SetNillableDeletedBy ¶
func (uc *UserCreate) SetNillableDeletedBy(s *string) *UserCreate
SetNillableDeletedBy sets the "deleted_by" 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) SetNillableLastPostSeenCursor ¶
func (uc *UserCreate) SetNillableLastPostSeenCursor(s *string) *UserCreate
SetNillableLastPostSeenCursor sets the "last_post_seen_cursor" field if the given value is not nil.
func (*UserCreate) SetNillableLastSeenAt ¶
func (uc *UserCreate) SetNillableLastSeenAt(t *time.Time) *UserCreate
SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.
func (*UserCreate) SetNillableProfileImage ¶
func (uc *UserCreate) SetNillableProfileImage(s *string) *UserCreate
SetNillableProfileImage sets the "profile_image" field if the given value is not nil.
func (*UserCreate) SetNillableRole ¶
func (uc *UserCreate) SetNillableRole(u *user.Role) *UserCreate
SetNillableRole sets the "role" 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) SetProfileImage ¶
func (uc *UserCreate) SetProfileImage(s string) *UserCreate
SetProfileImage sets the "profile_image" field.
func (*UserCreate) SetRole ¶
func (uc *UserCreate) SetRole(u user.Role) *UserCreate
SetRole sets the "role" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" 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 { // SavedPosts holds the value of the saved_posts edge. SavedPosts []*Post `json:"saved_posts,omitempty"` // LikedPosts holds the value of the liked_posts edge. LikedPosts []*Post `json:"liked_posts,omitempty"` // PublishedPosts holds the value of the published_posts edge. PublishedPosts []*Post `json:"published_posts,omitempty"` // Comments holds the value of the comments edge. Comments []*Comment `json:"comments,omitempty"` // APIKeys holds the value of the api_keys edge. APIKeys []*ApiKey `json:"api_keys,omitempty"` // RefreshTokens holds the value of the refresh_tokens edge. RefreshTokens []*RefreshToken `json:"refresh_tokens,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) APIKeysOrErr ¶
APIKeysOrErr returns the APIKeys value or an error if the edge was not loaded in eager-loading.
func (UserEdges) CommentsOrErr ¶
CommentsOrErr returns the Comments value or an error if the edge was not loaded in eager-loading.
func (UserEdges) LikedPostsOrErr ¶
LikedPostsOrErr returns the LikedPosts value or an error if the edge was not loaded in eager-loading.
func (UserEdges) PublishedPostsOrErr ¶
PublishedPostsOrErr returns the PublishedPosts value or an error if the edge was not loaded in eager-loading.
func (UserEdges) RefreshTokensOrErr ¶
func (e UserEdges) RefreshTokensOrErr() ([]*RefreshToken, error)
RefreshTokensOrErr returns the RefreshTokens value or an error if the edge was not loaded in eager-loading.
func (UserEdges) SavedPostsOrErr ¶
SavedPostsOrErr returns the SavedPosts value or an error if the edge was not loaded in eager-loading.
type UserFilter ¶
type UserFilter struct {
// contains filtered or unexported fields
}
UserFilter provides a generic filtering capability at runtime for UserQuery.
func (*UserFilter) Where ¶
func (f *UserFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*UserFilter) WhereAlias ¶
func (f *UserFilter) WhereAlias(p entql.StringP)
WhereAlias applies the entql string predicate on the alias field.
func (*UserFilter) WhereAuthProvider ¶
func (f *UserFilter) WhereAuthProvider(p entql.StringP)
WhereAuthProvider applies the entql string predicate on the auth_provider field.
func (*UserFilter) WhereAwards ¶
func (f *UserFilter) WhereAwards(p entql.BytesP)
WhereAwards applies the entql json.RawMessage predicate on the awards field.
func (*UserFilter) WhereCreatedAt ¶
func (f *UserFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*UserFilter) WhereDeletedAt ¶
func (f *UserFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*UserFilter) WhereDeletedBy ¶
func (f *UserFilter) WhereDeletedBy(p entql.StringP)
WhereDeletedBy applies the entql string predicate on the deleted_by field.
func (*UserFilter) WhereDisplayName ¶
func (f *UserFilter) WhereDisplayName(p entql.StringP)
WhereDisplayName applies the entql string predicate on the display_name field.
func (*UserFilter) WhereExternalID ¶
func (f *UserFilter) WhereExternalID(p entql.StringP)
WhereExternalID applies the entql string predicate on the external_id field.
func (*UserFilter) WhereHasAPIKeys ¶
func (f *UserFilter) WhereHasAPIKeys()
WhereHasAPIKeys applies a predicate to check if query has an edge api_keys.
func (*UserFilter) WhereHasAPIKeysWith ¶
func (f *UserFilter) WhereHasAPIKeysWith(preds ...predicate.ApiKey)
WhereHasAPIKeysWith applies a predicate to check if query has an edge api_keys with a given conditions (other predicates).
func (*UserFilter) WhereHasComments ¶
func (f *UserFilter) WhereHasComments()
WhereHasComments applies a predicate to check if query has an edge comments.
func (*UserFilter) WhereHasCommentsWith ¶
func (f *UserFilter) WhereHasCommentsWith(preds ...predicate.Comment)
WhereHasCommentsWith applies a predicate to check if query has an edge comments with a given conditions (other predicates).
func (*UserFilter) WhereHasLikedPosts ¶
func (f *UserFilter) WhereHasLikedPosts()
WhereHasLikedPosts applies a predicate to check if query has an edge liked_posts.
func (*UserFilter) WhereHasLikedPostsWith ¶
func (f *UserFilter) WhereHasLikedPostsWith(preds ...predicate.Post)
WhereHasLikedPostsWith applies a predicate to check if query has an edge liked_posts with a given conditions (other predicates).
func (*UserFilter) WhereHasPublishedPosts ¶
func (f *UserFilter) WhereHasPublishedPosts()
WhereHasPublishedPosts applies a predicate to check if query has an edge published_posts.
func (*UserFilter) WhereHasPublishedPostsWith ¶
func (f *UserFilter) WhereHasPublishedPostsWith(preds ...predicate.Post)
WhereHasPublishedPostsWith applies a predicate to check if query has an edge published_posts with a given conditions (other predicates).
func (*UserFilter) WhereHasRefreshTokens ¶
func (f *UserFilter) WhereHasRefreshTokens()
WhereHasRefreshTokens applies a predicate to check if query has an edge refresh_tokens.
func (*UserFilter) WhereHasRefreshTokensWith ¶
func (f *UserFilter) WhereHasRefreshTokensWith(preds ...predicate.RefreshToken)
WhereHasRefreshTokensWith applies a predicate to check if query has an edge refresh_tokens with a given conditions (other predicates).
func (*UserFilter) WhereHasSavedPosts ¶
func (f *UserFilter) WhereHasSavedPosts()
WhereHasSavedPosts applies a predicate to check if query has an edge saved_posts.
func (*UserFilter) WhereHasSavedPostsWith ¶
func (f *UserFilter) WhereHasSavedPostsWith(preds ...predicate.Post)
WhereHasSavedPostsWith applies a predicate to check if query has an edge saved_posts with a given conditions (other predicates).
func (*UserFilter) WhereID ¶
func (f *UserFilter) WhereID(p entql.ValueP)
WhereID applies the entql [16]byte predicate on the id field.
func (*UserFilter) WhereLastPostSeenCursor ¶
func (f *UserFilter) WhereLastPostSeenCursor(p entql.StringP)
WhereLastPostSeenCursor applies the entql string predicate on the last_post_seen_cursor field.
func (*UserFilter) WhereLastSeenAt ¶
func (f *UserFilter) WhereLastSeenAt(p entql.TimeP)
WhereLastSeenAt applies the entql time.Time predicate on the last_seen_at field.
func (*UserFilter) WhereProfileImage ¶
func (f *UserFilter) WhereProfileImage(p entql.StringP)
WhereProfileImage applies the entql string predicate on the profile_image field.
func (*UserFilter) WhereRole ¶
func (f *UserFilter) WhereRole(p entql.StringP)
WhereRole applies the entql string predicate on the role field.
func (*UserFilter) WhereUpdatedAt ¶
func (f *UserFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
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) APIKeysCleared ¶
func (m *UserMutation) APIKeysCleared() bool
APIKeysCleared reports if the "api_keys" edge to the ApiKey entity was cleared.
func (*UserMutation) APIKeysIDs ¶
func (m *UserMutation) APIKeysIDs() (ids []uuid.UUID)
APIKeysIDs returns the "api_keys" edge IDs in the mutation.
func (*UserMutation) AddAPIKeyIDs ¶
func (m *UserMutation) AddAPIKeyIDs(ids ...uuid.UUID)
AddAPIKeyIDs adds the "api_keys" edge to the ApiKey entity by ids.
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) AddLikedPostIDs ¶
func (m *UserMutation) AddLikedPostIDs(ids ...uuid.UUID)
AddLikedPostIDs adds the "liked_posts" edge to the Post entity by ids.
func (*UserMutation) AddPublishedPostIDs ¶
func (m *UserMutation) AddPublishedPostIDs(ids ...uuid.UUID)
AddPublishedPostIDs adds the "published_posts" edge to the Post entity by ids.
func (*UserMutation) AddRefreshTokenIDs ¶
func (m *UserMutation) AddRefreshTokenIDs(ids ...uuid.UUID)
AddRefreshTokenIDs adds the "refresh_tokens" edge to the RefreshToken entity by ids.
func (*UserMutation) AddSavedPostIDs ¶
func (m *UserMutation) AddSavedPostIDs(ids ...uuid.UUID)
AddSavedPostIDs adds the "saved_posts" edge to the Post 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) Alias ¶
func (m *UserMutation) Alias() (r string, exists bool)
Alias returns the value of the "alias" field in the mutation.
func (*UserMutation) AliasCleared ¶
func (m *UserMutation) AliasCleared() bool
AliasCleared returns if the "alias" field was cleared in this mutation.
func (*UserMutation) AppendAwards ¶
func (m *UserMutation) AppendAwards(s []string)
AppendAwards adds s to the "awards" field.
func (*UserMutation) AppendedAwards ¶
func (m *UserMutation) AppendedAwards() ([]string, bool)
AppendedAwards returns the list of values that were appended to the "awards" field in this mutation.
func (*UserMutation) AuthProvider ¶
func (m *UserMutation) AuthProvider() (r user.AuthProvider, exists bool)
AuthProvider returns the value of the "auth_provider" field in the mutation.
func (*UserMutation) Awards ¶
func (m *UserMutation) Awards() (r []string, exists bool)
Awards returns the value of the "awards" field in the mutation.
func (*UserMutation) AwardsCleared ¶
func (m *UserMutation) AwardsCleared() bool
AwardsCleared returns if the "awards" field was cleared in this mutation.
func (*UserMutation) ClearAPIKeys ¶
func (m *UserMutation) ClearAPIKeys()
ClearAPIKeys clears the "api_keys" edge to the ApiKey entity.
func (*UserMutation) ClearAlias ¶
func (m *UserMutation) ClearAlias()
ClearAlias clears the value of the "alias" field.
func (*UserMutation) ClearAwards ¶
func (m *UserMutation) ClearAwards()
ClearAwards clears the value of the "awards" field.
func (*UserMutation) ClearComments ¶
func (m *UserMutation) ClearComments()
ClearComments clears the "comments" edge to the Comment entity.
func (*UserMutation) ClearDeletedAt ¶
func (m *UserMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserMutation) ClearDeletedBy ¶
func (m *UserMutation) ClearDeletedBy()
ClearDeletedBy clears the value of the "deleted_by" 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) ClearLastPostSeenCursor ¶
func (m *UserMutation) ClearLastPostSeenCursor()
ClearLastPostSeenCursor clears the value of the "last_post_seen_cursor" field.
func (*UserMutation) ClearLastSeenAt ¶
func (m *UserMutation) ClearLastSeenAt()
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*UserMutation) ClearLikedPosts ¶
func (m *UserMutation) ClearLikedPosts()
ClearLikedPosts clears the "liked_posts" edge to the Post entity.
func (*UserMutation) ClearProfileImage ¶
func (m *UserMutation) ClearProfileImage()
ClearProfileImage clears the value of the "profile_image" field.
func (*UserMutation) ClearPublishedPosts ¶
func (m *UserMutation) ClearPublishedPosts()
ClearPublishedPosts clears the "published_posts" edge to the Post entity.
func (*UserMutation) ClearRefreshTokens ¶
func (m *UserMutation) ClearRefreshTokens()
ClearRefreshTokens clears the "refresh_tokens" edge to the RefreshToken entity.
func (*UserMutation) ClearSavedPosts ¶
func (m *UserMutation) ClearSavedPosts()
ClearSavedPosts clears the "saved_posts" edge to the Post 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) DeletedAt ¶
func (m *UserMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*UserMutation) DeletedAtCleared ¶
func (m *UserMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*UserMutation) DeletedBy ¶
func (m *UserMutation) DeletedBy() (r string, exists bool)
DeletedBy returns the value of the "deleted_by" field in the mutation.
func (*UserMutation) DeletedByCleared ¶
func (m *UserMutation) DeletedByCleared() bool
DeletedByCleared returns if the "deleted_by" field was cleared in this mutation.
func (*UserMutation) DisplayName ¶
func (m *UserMutation) DisplayName() (r string, exists bool)
DisplayName returns the value of the "display_name" field in the 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) ExternalID ¶
func (m *UserMutation) ExternalID() (r string, exists bool)
ExternalID returns the value of the "external_id" 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) Filter ¶
func (m *UserMutation) Filter() *UserFilter
Filter returns an entql.Where implementation to apply filters on the UserMutation builder.
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) LastPostSeenCursor ¶
func (m *UserMutation) LastPostSeenCursor() (r string, exists bool)
LastPostSeenCursor returns the value of the "last_post_seen_cursor" field in the mutation.
func (*UserMutation) LastPostSeenCursorCleared ¶
func (m *UserMutation) LastPostSeenCursorCleared() bool
LastPostSeenCursorCleared returns if the "last_post_seen_cursor" field was cleared in this mutation.
func (*UserMutation) LastSeenAt ¶
func (m *UserMutation) LastSeenAt() (r time.Time, exists bool)
LastSeenAt returns the value of the "last_seen_at" field in the mutation.
func (*UserMutation) LastSeenAtCleared ¶
func (m *UserMutation) LastSeenAtCleared() bool
LastSeenAtCleared returns if the "last_seen_at" field was cleared in this mutation.
func (*UserMutation) LikedPostsCleared ¶
func (m *UserMutation) LikedPostsCleared() bool
LikedPostsCleared reports if the "liked_posts" edge to the Post entity was cleared.
func (*UserMutation) LikedPostsIDs ¶
func (m *UserMutation) LikedPostsIDs() (ids []uuid.UUID)
LikedPostsIDs returns the "liked_posts" edge IDs in the mutation.
func (*UserMutation) OldAlias ¶
func (m *UserMutation) OldAlias(ctx context.Context) (v string, err error)
OldAlias returns the old "alias" 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) OldAuthProvider ¶
func (m *UserMutation) OldAuthProvider(ctx context.Context) (v user.AuthProvider, err error)
OldAuthProvider returns the old "auth_provider" 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) OldAwards ¶
func (m *UserMutation) OldAwards(ctx context.Context) (v []string, err error)
OldAwards returns the old "awards" 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) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_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) OldDeletedBy ¶
func (m *UserMutation) OldDeletedBy(ctx context.Context) (v string, err error)
OldDeletedBy returns the old "deleted_by" 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) OldDisplayName ¶
func (m *UserMutation) OldDisplayName(ctx context.Context) (v string, err error)
OldDisplayName returns the old "display_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) OldExternalID ¶
func (m *UserMutation) OldExternalID(ctx context.Context) (v string, err error)
OldExternalID returns the old "external_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) 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) OldLastPostSeenCursor ¶
func (m *UserMutation) OldLastPostSeenCursor(ctx context.Context) (v *string, err error)
OldLastPostSeenCursor returns the old "last_post_seen_cursor" 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) OldLastSeenAt ¶
OldLastSeenAt returns the old "last_seen_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) OldProfileImage ¶
func (m *UserMutation) OldProfileImage(ctx context.Context) (v *string, err error)
OldProfileImage returns the old "profile_image" 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) OldRole ¶
OldRole returns the old "role" 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) ProfileImage ¶
func (m *UserMutation) ProfileImage() (r string, exists bool)
ProfileImage returns the value of the "profile_image" field in the mutation.
func (*UserMutation) ProfileImageCleared ¶
func (m *UserMutation) ProfileImageCleared() bool
ProfileImageCleared returns if the "profile_image" field was cleared in this mutation.
func (*UserMutation) PublishedPostsCleared ¶
func (m *UserMutation) PublishedPostsCleared() bool
PublishedPostsCleared reports if the "published_posts" edge to the Post entity was cleared.
func (*UserMutation) PublishedPostsIDs ¶
func (m *UserMutation) PublishedPostsIDs() (ids []uuid.UUID)
PublishedPostsIDs returns the "published_posts" edge IDs in the mutation.
func (*UserMutation) RefreshTokensCleared ¶
func (m *UserMutation) RefreshTokensCleared() bool
RefreshTokensCleared reports if the "refresh_tokens" edge to the RefreshToken entity was cleared.
func (*UserMutation) RefreshTokensIDs ¶
func (m *UserMutation) RefreshTokensIDs() (ids []uuid.UUID)
RefreshTokensIDs returns the "refresh_tokens" edge IDs in the mutation.
func (*UserMutation) RemoveAPIKeyIDs ¶
func (m *UserMutation) RemoveAPIKeyIDs(ids ...uuid.UUID)
RemoveAPIKeyIDs removes the "api_keys" edge to the ApiKey entity by IDs.
func (*UserMutation) RemoveCommentIDs ¶
func (m *UserMutation) RemoveCommentIDs(ids ...uuid.UUID)
RemoveCommentIDs removes the "comments" edge to the Comment entity by IDs.
func (*UserMutation) RemoveLikedPostIDs ¶
func (m *UserMutation) RemoveLikedPostIDs(ids ...uuid.UUID)
RemoveLikedPostIDs removes the "liked_posts" edge to the Post entity by IDs.
func (*UserMutation) RemovePublishedPostIDs ¶
func (m *UserMutation) RemovePublishedPostIDs(ids ...uuid.UUID)
RemovePublishedPostIDs removes the "published_posts" edge to the Post entity by IDs.
func (*UserMutation) RemoveRefreshTokenIDs ¶
func (m *UserMutation) RemoveRefreshTokenIDs(ids ...uuid.UUID)
RemoveRefreshTokenIDs removes the "refresh_tokens" edge to the RefreshToken entity by IDs.
func (*UserMutation) RemoveSavedPostIDs ¶
func (m *UserMutation) RemoveSavedPostIDs(ids ...uuid.UUID)
RemoveSavedPostIDs removes the "saved_posts" edge to the Post entity by IDs.
func (*UserMutation) RemovedAPIKeysIDs ¶
func (m *UserMutation) RemovedAPIKeysIDs() (ids []uuid.UUID)
RemovedAPIKeys returns the removed IDs of the "api_keys" edge to the ApiKey entity.
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) RemovedLikedPostsIDs ¶
func (m *UserMutation) RemovedLikedPostsIDs() (ids []uuid.UUID)
RemovedLikedPosts returns the removed IDs of the "liked_posts" edge to the Post entity.
func (*UserMutation) RemovedPublishedPostsIDs ¶
func (m *UserMutation) RemovedPublishedPostsIDs() (ids []uuid.UUID)
RemovedPublishedPosts returns the removed IDs of the "published_posts" edge to the Post entity.
func (*UserMutation) RemovedRefreshTokensIDs ¶
func (m *UserMutation) RemovedRefreshTokensIDs() (ids []uuid.UUID)
RemovedRefreshTokens returns the removed IDs of the "refresh_tokens" edge to the RefreshToken entity.
func (*UserMutation) RemovedSavedPostsIDs ¶
func (m *UserMutation) RemovedSavedPostsIDs() (ids []uuid.UUID)
RemovedSavedPosts returns the removed IDs of the "saved_posts" edge to the Post entity.
func (*UserMutation) ResetAPIKeys ¶
func (m *UserMutation) ResetAPIKeys()
ResetAPIKeys resets all changes to the "api_keys" edge.
func (*UserMutation) ResetAlias ¶
func (m *UserMutation) ResetAlias()
ResetAlias resets all changes to the "alias" field.
func (*UserMutation) ResetAuthProvider ¶
func (m *UserMutation) ResetAuthProvider()
ResetAuthProvider resets all changes to the "auth_provider" field.
func (*UserMutation) ResetAwards ¶
func (m *UserMutation) ResetAwards()
ResetAwards resets all changes to the "awards" 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) ResetDeletedAt ¶
func (m *UserMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*UserMutation) ResetDeletedBy ¶
func (m *UserMutation) ResetDeletedBy()
ResetDeletedBy resets all changes to the "deleted_by" field.
func (*UserMutation) ResetDisplayName ¶
func (m *UserMutation) ResetDisplayName()
ResetDisplayName resets all changes to the "display_name" 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) ResetExternalID ¶
func (m *UserMutation) ResetExternalID()
ResetExternalID resets all changes to the "external_id" 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) ResetLastPostSeenCursor ¶
func (m *UserMutation) ResetLastPostSeenCursor()
ResetLastPostSeenCursor resets all changes to the "last_post_seen_cursor" field.
func (*UserMutation) ResetLastSeenAt ¶
func (m *UserMutation) ResetLastSeenAt()
ResetLastSeenAt resets all changes to the "last_seen_at" field.
func (*UserMutation) ResetLikedPosts ¶
func (m *UserMutation) ResetLikedPosts()
ResetLikedPosts resets all changes to the "liked_posts" edge.
func (*UserMutation) ResetProfileImage ¶
func (m *UserMutation) ResetProfileImage()
ResetProfileImage resets all changes to the "profile_image" field.
func (*UserMutation) ResetPublishedPosts ¶
func (m *UserMutation) ResetPublishedPosts()
ResetPublishedPosts resets all changes to the "published_posts" edge.
func (*UserMutation) ResetRefreshTokens ¶
func (m *UserMutation) ResetRefreshTokens()
ResetRefreshTokens resets all changes to the "refresh_tokens" edge.
func (*UserMutation) ResetRole ¶
func (m *UserMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*UserMutation) ResetSavedPosts ¶
func (m *UserMutation) ResetSavedPosts()
ResetSavedPosts resets all changes to the "saved_posts" edge.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) Role ¶
func (m *UserMutation) Role() (r user.Role, exists bool)
Role returns the value of the "role" field in the mutation.
func (*UserMutation) SavedPostsCleared ¶
func (m *UserMutation) SavedPostsCleared() bool
SavedPostsCleared reports if the "saved_posts" edge to the Post entity was cleared.
func (*UserMutation) SavedPostsIDs ¶
func (m *UserMutation) SavedPostsIDs() (ids []uuid.UUID)
SavedPostsIDs returns the "saved_posts" edge IDs in the mutation.
func (*UserMutation) SetAlias ¶
func (m *UserMutation) SetAlias(s string)
SetAlias sets the "alias" field.
func (*UserMutation) SetAuthProvider ¶
func (m *UserMutation) SetAuthProvider(up user.AuthProvider)
SetAuthProvider sets the "auth_provider" field.
func (*UserMutation) SetAwards ¶
func (m *UserMutation) SetAwards(s []string)
SetAwards sets the "awards" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetDeletedAt ¶
func (m *UserMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*UserMutation) SetDeletedBy ¶
func (m *UserMutation) SetDeletedBy(s string)
SetDeletedBy sets the "deleted_by" field.
func (*UserMutation) SetDisplayName ¶
func (m *UserMutation) SetDisplayName(s string)
SetDisplayName sets the "display_name" field.
func (*UserMutation) SetExternalID ¶
func (m *UserMutation) SetExternalID(s string)
SetExternalID sets the "external_id" 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) 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) SetLastPostSeenCursor ¶
func (m *UserMutation) SetLastPostSeenCursor(s string)
SetLastPostSeenCursor sets the "last_post_seen_cursor" field.
func (*UserMutation) SetLastSeenAt ¶
func (m *UserMutation) SetLastSeenAt(t time.Time)
SetLastSeenAt sets the "last_seen_at" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetProfileImage ¶
func (m *UserMutation) SetProfileImage(s string)
SetProfileImage sets the "profile_image" field.
func (*UserMutation) SetRole ¶
func (m *UserMutation) SetRole(u user.Role)
SetRole sets the "role" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
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) 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 UserOrder ¶
type UserOrder struct { Direction OrderDirection `json:"direction"` Field *UserOrderField `json:"field"` }
UserOrder defines the ordering of User.
type UserOrderField ¶
type UserOrderField struct { // Value extracts the ordering value from the given User. Value func(*User) (ent.Value, error) // contains filtered or unexported fields }
UserOrderField defines the ordering field of User.
func (UserOrderField) MarshalGQL ¶
func (f UserOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (UserOrderField) String ¶
func (f UserOrderField) String() string
String implement fmt.Stringer interface.
func (*UserOrderField) UnmarshalGQL ¶
func (f *UserOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type UserPaginateOption ¶
type UserPaginateOption func(*userPager) error
UserPaginateOption enables pagination customization.
func WithUserFilter ¶
func WithUserFilter(filter func(*UserQuery) (*UserQuery, error)) UserPaginateOption
WithUserFilter configures pagination filter.
func WithUserOrder ¶
func WithUserOrder(order *UserOrder) UserPaginateOption
WithUserOrder configures pagination ordering.
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) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*UserQuery) Filter ¶
func (uq *UserQuery) Filter() *UserFilter
Filter returns a Filter implementation to apply filters on the UserQuery builder.
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) ForShare ¶
func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserQuery) ForUpdate ¶
func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
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 { UpdatedAt time.Time `json:"updated_at,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldUpdatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*UserQuery) Modify ¶
func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
Modify adds a query modifier for attaching custom logic to queries.
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) Paginate ¶
func (u *UserQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...UserPaginateOption, ) (*UserConnection, error)
Paginate executes the query and returns a relay based cursor connection to User.
func (*UserQuery) QueryAPIKeys ¶
func (uq *UserQuery) QueryAPIKeys() *ApiKeyQuery
QueryAPIKeys chains the current query on the "api_keys" edge.
func (*UserQuery) QueryComments ¶
func (uq *UserQuery) QueryComments() *CommentQuery
QueryComments chains the current query on the "comments" edge.
func (*UserQuery) QueryLikedPosts ¶
QueryLikedPosts chains the current query on the "liked_posts" edge.
func (*UserQuery) QueryPublishedPosts ¶
QueryPublishedPosts chains the current query on the "published_posts" edge.
func (*UserQuery) QueryRefreshTokens ¶
func (uq *UserQuery) QueryRefreshTokens() *RefreshTokenQuery
QueryRefreshTokens chains the current query on the "refresh_tokens" edge.
func (*UserQuery) QuerySavedPosts ¶
QuerySavedPosts chains the current query on the "saved_posts" 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 { UpdatedAt time.Time `json:"updated_at,omitempty"` } client.User.Query(). Select(user.FieldUpdatedAt). 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) WithAPIKeys ¶
func (uq *UserQuery) WithAPIKeys(opts ...func(*ApiKeyQuery)) *UserQuery
WithAPIKeys tells the query-builder to eager-load the nodes that are connected to the "api_keys" 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) WithLikedPosts ¶
WithLikedPosts tells the query-builder to eager-load the nodes that are connected to the "liked_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNamedAPIKeys ¶
func (uq *UserQuery) WithNamedAPIKeys(name string, opts ...func(*ApiKeyQuery)) *UserQuery
WithNamedAPIKeys tells the query-builder to eager-load the nodes that are connected to the "api_keys" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNamedComments ¶
func (uq *UserQuery) WithNamedComments(name string, opts ...func(*CommentQuery)) *UserQuery
WithNamedComments tells the query-builder to eager-load the nodes that are connected to the "comments" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNamedLikedPosts ¶
WithNamedLikedPosts tells the query-builder to eager-load the nodes that are connected to the "liked_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNamedPublishedPosts ¶
WithNamedPublishedPosts tells the query-builder to eager-load the nodes that are connected to the "published_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNamedRefreshTokens ¶
func (uq *UserQuery) WithNamedRefreshTokens(name string, opts ...func(*RefreshTokenQuery)) *UserQuery
WithNamedRefreshTokens tells the query-builder to eager-load the nodes that are connected to the "refresh_tokens" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithNamedSavedPosts ¶
WithNamedSavedPosts tells the query-builder to eager-load the nodes that are connected to the "saved_posts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithPublishedPosts ¶
WithPublishedPosts tells the query-builder to eager-load the nodes that are connected to the "published_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithRefreshTokens ¶
func (uq *UserQuery) WithRefreshTokens(opts ...func(*RefreshTokenQuery)) *UserQuery
WithRefreshTokens tells the query-builder to eager-load the nodes that are connected to the "refresh_tokens" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithSavedPosts ¶
WithSavedPosts tells the query-builder to eager-load the nodes that are connected to the "saved_posts" 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) Modify ¶
func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
Modify adds a query modifier for attaching custom logic to queries.
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) AddAPIKeyIDs ¶
func (uu *UserUpdate) AddAPIKeyIDs(ids ...uuid.UUID) *UserUpdate
AddAPIKeyIDs adds the "api_keys" edge to the ApiKey entity by IDs.
func (*UserUpdate) AddAPIKeys ¶
func (uu *UserUpdate) AddAPIKeys(a ...*ApiKey) *UserUpdate
AddAPIKeys adds the "api_keys" edges to the ApiKey entity.
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) AddLikedPostIDs ¶
func (uu *UserUpdate) AddLikedPostIDs(ids ...uuid.UUID) *UserUpdate
AddLikedPostIDs adds the "liked_posts" edge to the Post entity by IDs.
func (*UserUpdate) AddLikedPosts ¶
func (uu *UserUpdate) AddLikedPosts(p ...*Post) *UserUpdate
AddLikedPosts adds the "liked_posts" edges to the Post entity.
func (*UserUpdate) AddPublishedPostIDs ¶
func (uu *UserUpdate) AddPublishedPostIDs(ids ...uuid.UUID) *UserUpdate
AddPublishedPostIDs adds the "published_posts" edge to the Post entity by IDs.
func (*UserUpdate) AddPublishedPosts ¶
func (uu *UserUpdate) AddPublishedPosts(p ...*Post) *UserUpdate
AddPublishedPosts adds the "published_posts" edges to the Post entity.
func (*UserUpdate) AddRefreshTokenIDs ¶
func (uu *UserUpdate) AddRefreshTokenIDs(ids ...uuid.UUID) *UserUpdate
AddRefreshTokenIDs adds the "refresh_tokens" edge to the RefreshToken entity by IDs.
func (*UserUpdate) AddRefreshTokens ¶
func (uu *UserUpdate) AddRefreshTokens(r ...*RefreshToken) *UserUpdate
AddRefreshTokens adds the "refresh_tokens" edges to the RefreshToken entity.
func (*UserUpdate) AddSavedPostIDs ¶
func (uu *UserUpdate) AddSavedPostIDs(ids ...uuid.UUID) *UserUpdate
AddSavedPostIDs adds the "saved_posts" edge to the Post entity by IDs.
func (*UserUpdate) AddSavedPosts ¶
func (uu *UserUpdate) AddSavedPosts(p ...*Post) *UserUpdate
AddSavedPosts adds the "saved_posts" edges to the Post entity.
func (*UserUpdate) AppendAwards ¶
func (uu *UserUpdate) AppendAwards(s []string) *UserUpdate
AppendAwards appends s to the "awards" field.
func (*UserUpdate) ClearAPIKeys ¶
func (uu *UserUpdate) ClearAPIKeys() *UserUpdate
ClearAPIKeys clears all "api_keys" edges to the ApiKey entity.
func (*UserUpdate) ClearAlias ¶
func (uu *UserUpdate) ClearAlias() *UserUpdate
ClearAlias clears the value of the "alias" field.
func (*UserUpdate) ClearAwards ¶
func (uu *UserUpdate) ClearAwards() *UserUpdate
ClearAwards clears the value of the "awards" field.
func (*UserUpdate) ClearComments ¶
func (uu *UserUpdate) ClearComments() *UserUpdate
ClearComments clears all "comments" edges to the Comment entity.
func (*UserUpdate) ClearDeletedAt ¶
func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdate) ClearDeletedBy ¶
func (uu *UserUpdate) ClearDeletedBy() *UserUpdate
ClearDeletedBy clears the value of the "deleted_by" field.
func (*UserUpdate) ClearLastPostSeenCursor ¶
func (uu *UserUpdate) ClearLastPostSeenCursor() *UserUpdate
ClearLastPostSeenCursor clears the value of the "last_post_seen_cursor" field.
func (*UserUpdate) ClearLastSeenAt ¶
func (uu *UserUpdate) ClearLastSeenAt() *UserUpdate
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*UserUpdate) ClearLikedPosts ¶
func (uu *UserUpdate) ClearLikedPosts() *UserUpdate
ClearLikedPosts clears all "liked_posts" edges to the Post entity.
func (*UserUpdate) ClearProfileImage ¶
func (uu *UserUpdate) ClearProfileImage() *UserUpdate
ClearProfileImage clears the value of the "profile_image" field.
func (*UserUpdate) ClearPublishedPosts ¶
func (uu *UserUpdate) ClearPublishedPosts() *UserUpdate
ClearPublishedPosts clears all "published_posts" edges to the Post entity.
func (*UserUpdate) ClearRefreshTokens ¶
func (uu *UserUpdate) ClearRefreshTokens() *UserUpdate
ClearRefreshTokens clears all "refresh_tokens" edges to the RefreshToken entity.
func (*UserUpdate) ClearSavedPosts ¶
func (uu *UserUpdate) ClearSavedPosts() *UserUpdate
ClearSavedPosts clears all "saved_posts" edges to the Post 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) Modify ¶
func (uu *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveAPIKeyIDs ¶
func (uu *UserUpdate) RemoveAPIKeyIDs(ids ...uuid.UUID) *UserUpdate
RemoveAPIKeyIDs removes the "api_keys" edge to ApiKey entities by IDs.
func (*UserUpdate) RemoveAPIKeys ¶
func (uu *UserUpdate) RemoveAPIKeys(a ...*ApiKey) *UserUpdate
RemoveAPIKeys removes "api_keys" edges to ApiKey entities.
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) RemoveLikedPostIDs ¶
func (uu *UserUpdate) RemoveLikedPostIDs(ids ...uuid.UUID) *UserUpdate
RemoveLikedPostIDs removes the "liked_posts" edge to Post entities by IDs.
func (*UserUpdate) RemoveLikedPosts ¶
func (uu *UserUpdate) RemoveLikedPosts(p ...*Post) *UserUpdate
RemoveLikedPosts removes "liked_posts" edges to Post entities.
func (*UserUpdate) RemovePublishedPostIDs ¶
func (uu *UserUpdate) RemovePublishedPostIDs(ids ...uuid.UUID) *UserUpdate
RemovePublishedPostIDs removes the "published_posts" edge to Post entities by IDs.
func (*UserUpdate) RemovePublishedPosts ¶
func (uu *UserUpdate) RemovePublishedPosts(p ...*Post) *UserUpdate
RemovePublishedPosts removes "published_posts" edges to Post entities.
func (*UserUpdate) RemoveRefreshTokenIDs ¶
func (uu *UserUpdate) RemoveRefreshTokenIDs(ids ...uuid.UUID) *UserUpdate
RemoveRefreshTokenIDs removes the "refresh_tokens" edge to RefreshToken entities by IDs.
func (*UserUpdate) RemoveRefreshTokens ¶
func (uu *UserUpdate) RemoveRefreshTokens(r ...*RefreshToken) *UserUpdate
RemoveRefreshTokens removes "refresh_tokens" edges to RefreshToken entities.
func (*UserUpdate) RemoveSavedPostIDs ¶
func (uu *UserUpdate) RemoveSavedPostIDs(ids ...uuid.UUID) *UserUpdate
RemoveSavedPostIDs removes the "saved_posts" edge to Post entities by IDs.
func (*UserUpdate) RemoveSavedPosts ¶
func (uu *UserUpdate) RemoveSavedPosts(p ...*Post) *UserUpdate
RemoveSavedPosts removes "saved_posts" edges to Post 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) SetAlias ¶
func (uu *UserUpdate) SetAlias(s string) *UserUpdate
SetAlias sets the "alias" field.
func (*UserUpdate) SetAuthProvider ¶
func (uu *UserUpdate) SetAuthProvider(up user.AuthProvider) *UserUpdate
SetAuthProvider sets the "auth_provider" field.
func (*UserUpdate) SetAwards ¶
func (uu *UserUpdate) SetAwards(s []string) *UserUpdate
SetAwards sets the "awards" field.
func (*UserUpdate) SetDeletedAt ¶
func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdate) SetDeletedBy ¶
func (uu *UserUpdate) SetDeletedBy(s string) *UserUpdate
SetDeletedBy sets the "deleted_by" field.
func (*UserUpdate) SetDisplayName ¶
func (uu *UserUpdate) SetDisplayName(s string) *UserUpdate
SetDisplayName sets the "display_name" field.
func (*UserUpdate) SetExternalID ¶
func (uu *UserUpdate) SetExternalID(s string) *UserUpdate
SetExternalID sets the "external_id" field.
func (*UserUpdate) SetInput ¶
func (c *UserUpdate) SetInput(i UpdateUserInput) *UserUpdate
SetInput applies the change-set in the UpdateUserInput on the UserUpdate builder.
func (*UserUpdate) SetLastPostSeenCursor ¶
func (uu *UserUpdate) SetLastPostSeenCursor(s string) *UserUpdate
SetLastPostSeenCursor sets the "last_post_seen_cursor" field.
func (*UserUpdate) SetLastSeenAt ¶
func (uu *UserUpdate) SetLastSeenAt(t time.Time) *UserUpdate
SetLastSeenAt sets the "last_seen_at" field.
func (*UserUpdate) SetNillableAlias ¶
func (uu *UserUpdate) SetNillableAlias(s *string) *UserUpdate
SetNillableAlias sets the "alias" field if the given value is not nil.
func (*UserUpdate) SetNillableAuthProvider ¶
func (uu *UserUpdate) SetNillableAuthProvider(up *user.AuthProvider) *UserUpdate
SetNillableAuthProvider sets the "auth_provider" field if the given value is not nil.
func (*UserUpdate) SetNillableDeletedAt ¶
func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdate) SetNillableDeletedBy ¶
func (uu *UserUpdate) SetNillableDeletedBy(s *string) *UserUpdate
SetNillableDeletedBy sets the "deleted_by" field if the given value is not nil.
func (*UserUpdate) SetNillableDisplayName ¶
func (uu *UserUpdate) SetNillableDisplayName(s *string) *UserUpdate
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*UserUpdate) SetNillableExternalID ¶
func (uu *UserUpdate) SetNillableExternalID(s *string) *UserUpdate
SetNillableExternalID sets the "external_id" field if the given value is not nil.
func (*UserUpdate) SetNillableLastPostSeenCursor ¶
func (uu *UserUpdate) SetNillableLastPostSeenCursor(s *string) *UserUpdate
SetNillableLastPostSeenCursor sets the "last_post_seen_cursor" field if the given value is not nil.
func (*UserUpdate) SetNillableProfileImage ¶
func (uu *UserUpdate) SetNillableProfileImage(s *string) *UserUpdate
SetNillableProfileImage sets the "profile_image" field if the given value is not nil.
func (*UserUpdate) SetNillableRole ¶
func (uu *UserUpdate) SetNillableRole(u *user.Role) *UserUpdate
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserUpdate) SetProfileImage ¶
func (uu *UserUpdate) SetProfileImage(s string) *UserUpdate
SetProfileImage sets the "profile_image" field.
func (*UserUpdate) SetRole ¶
func (uu *UserUpdate) SetRole(u user.Role) *UserUpdate
SetRole sets the "role" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" 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) AddAPIKeyIDs ¶
func (uuo *UserUpdateOne) AddAPIKeyIDs(ids ...uuid.UUID) *UserUpdateOne
AddAPIKeyIDs adds the "api_keys" edge to the ApiKey entity by IDs.
func (*UserUpdateOne) AddAPIKeys ¶
func (uuo *UserUpdateOne) AddAPIKeys(a ...*ApiKey) *UserUpdateOne
AddAPIKeys adds the "api_keys" edges to the ApiKey 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) AddLikedPostIDs ¶
func (uuo *UserUpdateOne) AddLikedPostIDs(ids ...uuid.UUID) *UserUpdateOne
AddLikedPostIDs adds the "liked_posts" edge to the Post entity by IDs.
func (*UserUpdateOne) AddLikedPosts ¶
func (uuo *UserUpdateOne) AddLikedPosts(p ...*Post) *UserUpdateOne
AddLikedPosts adds the "liked_posts" edges to the Post entity.
func (*UserUpdateOne) AddPublishedPostIDs ¶
func (uuo *UserUpdateOne) AddPublishedPostIDs(ids ...uuid.UUID) *UserUpdateOne
AddPublishedPostIDs adds the "published_posts" edge to the Post entity by IDs.
func (*UserUpdateOne) AddPublishedPosts ¶
func (uuo *UserUpdateOne) AddPublishedPosts(p ...*Post) *UserUpdateOne
AddPublishedPosts adds the "published_posts" edges to the Post entity.
func (*UserUpdateOne) AddRefreshTokenIDs ¶
func (uuo *UserUpdateOne) AddRefreshTokenIDs(ids ...uuid.UUID) *UserUpdateOne
AddRefreshTokenIDs adds the "refresh_tokens" edge to the RefreshToken entity by IDs.
func (*UserUpdateOne) AddRefreshTokens ¶
func (uuo *UserUpdateOne) AddRefreshTokens(r ...*RefreshToken) *UserUpdateOne
AddRefreshTokens adds the "refresh_tokens" edges to the RefreshToken entity.
func (*UserUpdateOne) AddSavedPostIDs ¶
func (uuo *UserUpdateOne) AddSavedPostIDs(ids ...uuid.UUID) *UserUpdateOne
AddSavedPostIDs adds the "saved_posts" edge to the Post entity by IDs.
func (*UserUpdateOne) AddSavedPosts ¶
func (uuo *UserUpdateOne) AddSavedPosts(p ...*Post) *UserUpdateOne
AddSavedPosts adds the "saved_posts" edges to the Post entity.
func (*UserUpdateOne) AppendAwards ¶
func (uuo *UserUpdateOne) AppendAwards(s []string) *UserUpdateOne
AppendAwards appends s to the "awards" field.
func (*UserUpdateOne) ClearAPIKeys ¶
func (uuo *UserUpdateOne) ClearAPIKeys() *UserUpdateOne
ClearAPIKeys clears all "api_keys" edges to the ApiKey entity.
func (*UserUpdateOne) ClearAlias ¶
func (uuo *UserUpdateOne) ClearAlias() *UserUpdateOne
ClearAlias clears the value of the "alias" field.
func (*UserUpdateOne) ClearAwards ¶
func (uuo *UserUpdateOne) ClearAwards() *UserUpdateOne
ClearAwards clears the value of the "awards" field.
func (*UserUpdateOne) ClearComments ¶
func (uuo *UserUpdateOne) ClearComments() *UserUpdateOne
ClearComments clears all "comments" edges to the Comment entity.
func (*UserUpdateOne) ClearDeletedAt ¶
func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdateOne) ClearDeletedBy ¶
func (uuo *UserUpdateOne) ClearDeletedBy() *UserUpdateOne
ClearDeletedBy clears the value of the "deleted_by" field.
func (*UserUpdateOne) ClearLastPostSeenCursor ¶
func (uuo *UserUpdateOne) ClearLastPostSeenCursor() *UserUpdateOne
ClearLastPostSeenCursor clears the value of the "last_post_seen_cursor" field.
func (*UserUpdateOne) ClearLastSeenAt ¶
func (uuo *UserUpdateOne) ClearLastSeenAt() *UserUpdateOne
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*UserUpdateOne) ClearLikedPosts ¶
func (uuo *UserUpdateOne) ClearLikedPosts() *UserUpdateOne
ClearLikedPosts clears all "liked_posts" edges to the Post entity.
func (*UserUpdateOne) ClearProfileImage ¶
func (uuo *UserUpdateOne) ClearProfileImage() *UserUpdateOne
ClearProfileImage clears the value of the "profile_image" field.
func (*UserUpdateOne) ClearPublishedPosts ¶
func (uuo *UserUpdateOne) ClearPublishedPosts() *UserUpdateOne
ClearPublishedPosts clears all "published_posts" edges to the Post entity.
func (*UserUpdateOne) ClearRefreshTokens ¶
func (uuo *UserUpdateOne) ClearRefreshTokens() *UserUpdateOne
ClearRefreshTokens clears all "refresh_tokens" edges to the RefreshToken entity.
func (*UserUpdateOne) ClearSavedPosts ¶
func (uuo *UserUpdateOne) ClearSavedPosts() *UserUpdateOne
ClearSavedPosts clears all "saved_posts" edges to the Post 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) Modify ¶
func (uuo *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveAPIKeyIDs ¶
func (uuo *UserUpdateOne) RemoveAPIKeyIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveAPIKeyIDs removes the "api_keys" edge to ApiKey entities by IDs.
func (*UserUpdateOne) RemoveAPIKeys ¶
func (uuo *UserUpdateOne) RemoveAPIKeys(a ...*ApiKey) *UserUpdateOne
RemoveAPIKeys removes "api_keys" edges to ApiKey entities.
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) RemoveLikedPostIDs ¶
func (uuo *UserUpdateOne) RemoveLikedPostIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveLikedPostIDs removes the "liked_posts" edge to Post entities by IDs.
func (*UserUpdateOne) RemoveLikedPosts ¶
func (uuo *UserUpdateOne) RemoveLikedPosts(p ...*Post) *UserUpdateOne
RemoveLikedPosts removes "liked_posts" edges to Post entities.
func (*UserUpdateOne) RemovePublishedPostIDs ¶
func (uuo *UserUpdateOne) RemovePublishedPostIDs(ids ...uuid.UUID) *UserUpdateOne
RemovePublishedPostIDs removes the "published_posts" edge to Post entities by IDs.
func (*UserUpdateOne) RemovePublishedPosts ¶
func (uuo *UserUpdateOne) RemovePublishedPosts(p ...*Post) *UserUpdateOne
RemovePublishedPosts removes "published_posts" edges to Post entities.
func (*UserUpdateOne) RemoveRefreshTokenIDs ¶
func (uuo *UserUpdateOne) RemoveRefreshTokenIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveRefreshTokenIDs removes the "refresh_tokens" edge to RefreshToken entities by IDs.
func (*UserUpdateOne) RemoveRefreshTokens ¶
func (uuo *UserUpdateOne) RemoveRefreshTokens(r ...*RefreshToken) *UserUpdateOne
RemoveRefreshTokens removes "refresh_tokens" edges to RefreshToken entities.
func (*UserUpdateOne) RemoveSavedPostIDs ¶
func (uuo *UserUpdateOne) RemoveSavedPostIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveSavedPostIDs removes the "saved_posts" edge to Post entities by IDs.
func (*UserUpdateOne) RemoveSavedPosts ¶
func (uuo *UserUpdateOne) RemoveSavedPosts(p ...*Post) *UserUpdateOne
RemoveSavedPosts removes "saved_posts" edges to Post 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) SetAlias ¶
func (uuo *UserUpdateOne) SetAlias(s string) *UserUpdateOne
SetAlias sets the "alias" field.
func (*UserUpdateOne) SetAuthProvider ¶
func (uuo *UserUpdateOne) SetAuthProvider(up user.AuthProvider) *UserUpdateOne
SetAuthProvider sets the "auth_provider" field.
func (*UserUpdateOne) SetAwards ¶
func (uuo *UserUpdateOne) SetAwards(s []string) *UserUpdateOne
SetAwards sets the "awards" field.
func (*UserUpdateOne) SetDeletedAt ¶
func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdateOne) SetDeletedBy ¶
func (uuo *UserUpdateOne) SetDeletedBy(s string) *UserUpdateOne
SetDeletedBy sets the "deleted_by" field.
func (*UserUpdateOne) SetDisplayName ¶
func (uuo *UserUpdateOne) SetDisplayName(s string) *UserUpdateOne
SetDisplayName sets the "display_name" field.
func (*UserUpdateOne) SetExternalID ¶
func (uuo *UserUpdateOne) SetExternalID(s string) *UserUpdateOne
SetExternalID sets the "external_id" field.
func (*UserUpdateOne) SetInput ¶
func (c *UserUpdateOne) SetInput(i UpdateUserInput) *UserUpdateOne
SetInput applies the change-set in the UpdateUserInput on the UserUpdateOne builder.
func (*UserUpdateOne) SetLastPostSeenCursor ¶
func (uuo *UserUpdateOne) SetLastPostSeenCursor(s string) *UserUpdateOne
SetLastPostSeenCursor sets the "last_post_seen_cursor" field.
func (*UserUpdateOne) SetLastSeenAt ¶
func (uuo *UserUpdateOne) SetLastSeenAt(t time.Time) *UserUpdateOne
SetLastSeenAt sets the "last_seen_at" field.
func (*UserUpdateOne) SetNillableAlias ¶
func (uuo *UserUpdateOne) SetNillableAlias(s *string) *UserUpdateOne
SetNillableAlias sets the "alias" field if the given value is not nil.
func (*UserUpdateOne) SetNillableAuthProvider ¶
func (uuo *UserUpdateOne) SetNillableAuthProvider(up *user.AuthProvider) *UserUpdateOne
SetNillableAuthProvider sets the "auth_provider" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDeletedAt ¶
func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDeletedBy ¶
func (uuo *UserUpdateOne) SetNillableDeletedBy(s *string) *UserUpdateOne
SetNillableDeletedBy sets the "deleted_by" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDisplayName ¶
func (uuo *UserUpdateOne) SetNillableDisplayName(s *string) *UserUpdateOne
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableExternalID ¶
func (uuo *UserUpdateOne) SetNillableExternalID(s *string) *UserUpdateOne
SetNillableExternalID sets the "external_id" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastPostSeenCursor ¶
func (uuo *UserUpdateOne) SetNillableLastPostSeenCursor(s *string) *UserUpdateOne
SetNillableLastPostSeenCursor sets the "last_post_seen_cursor" field if the given value is not nil.
func (*UserUpdateOne) SetNillableProfileImage ¶
func (uuo *UserUpdateOne) SetNillableProfileImage(s *string) *UserUpdateOne
SetNillableProfileImage sets the "profile_image" field if the given value is not nil.
func (*UserUpdateOne) SetNillableRole ¶
func (uuo *UserUpdateOne) SetNillableRole(u *user.Role) *UserUpdateOne
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserUpdateOne) SetProfileImage ¶
func (uuo *UserUpdateOne) SetProfileImage(s string) *UserUpdateOne
SetProfileImage sets the "profile_image" field.
func (*UserUpdateOne) SetRole ¶
func (uuo *UserUpdateOne) SetRole(u user.Role) *UserUpdateOne
SetRole sets the "role" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserWhereInput ¶
type UserWhereInput struct { Predicates []predicate.User `json:"-"` Not *UserWhereInput `json:"not,omitempty"` Or []*UserWhereInput `json:"or,omitempty"` And []*UserWhereInput `json:"and,omitempty"` // "id" field predicates. ID *uuid.UUID `json:"id,omitempty"` IDNEQ *uuid.UUID `json:"idNEQ,omitempty"` IDIn []uuid.UUID `json:"idIn,omitempty"` IDNotIn []uuid.UUID `json:"idNotIn,omitempty"` IDGT *uuid.UUID `json:"idGT,omitempty"` IDGTE *uuid.UUID `json:"idGTE,omitempty"` IDLT *uuid.UUID `json:"idLT,omitempty"` IDLTE *uuid.UUID `json:"idLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` DeletedAtIsNil bool `json:"deletedAtIsNil,omitempty"` DeletedAtNotNil bool `json:"deletedAtNotNil,omitempty"` // "deleted_by" field predicates. DeletedBy *string `json:"deletedBy,omitempty"` DeletedByNEQ *string `json:"deletedByNEQ,omitempty"` DeletedByIn []string `json:"deletedByIn,omitempty"` DeletedByNotIn []string `json:"deletedByNotIn,omitempty"` DeletedByGT *string `json:"deletedByGT,omitempty"` DeletedByGTE *string `json:"deletedByGTE,omitempty"` DeletedByLT *string `json:"deletedByLT,omitempty"` DeletedByLTE *string `json:"deletedByLTE,omitempty"` DeletedByContains *string `json:"deletedByContains,omitempty"` DeletedByHasPrefix *string `json:"deletedByHasPrefix,omitempty"` DeletedByHasSuffix *string `json:"deletedByHasSuffix,omitempty"` DeletedByIsNil bool `json:"deletedByIsNil,omitempty"` DeletedByNotNil bool `json:"deletedByNotNil,omitempty"` DeletedByEqualFold *string `json:"deletedByEqualFold,omitempty"` DeletedByContainsFold *string `json:"deletedByContainsFold,omitempty"` // "display_name" field predicates. DisplayName *string `json:"displayName,omitempty"` DisplayNameNEQ *string `json:"displayNameNEQ,omitempty"` DisplayNameIn []string `json:"displayNameIn,omitempty"` DisplayNameNotIn []string `json:"displayNameNotIn,omitempty"` DisplayNameGT *string `json:"displayNameGT,omitempty"` DisplayNameGTE *string `json:"displayNameGTE,omitempty"` DisplayNameLT *string `json:"displayNameLT,omitempty"` DisplayNameLTE *string `json:"displayNameLTE,omitempty"` DisplayNameContains *string `json:"displayNameContains,omitempty"` DisplayNameHasPrefix *string `json:"displayNameHasPrefix,omitempty"` DisplayNameHasSuffix *string `json:"displayNameHasSuffix,omitempty"` DisplayNameEqualFold *string `json:"displayNameEqualFold,omitempty"` DisplayNameContainsFold *string `json:"displayNameContainsFold,omitempty"` // "alias" field predicates. Alias *string `json:"alias,omitempty"` AliasNEQ *string `json:"aliasNEQ,omitempty"` AliasIn []string `json:"aliasIn,omitempty"` AliasNotIn []string `json:"aliasNotIn,omitempty"` AliasGT *string `json:"aliasGT,omitempty"` AliasGTE *string `json:"aliasGTE,omitempty"` AliasLT *string `json:"aliasLT,omitempty"` AliasLTE *string `json:"aliasLTE,omitempty"` AliasContains *string `json:"aliasContains,omitempty"` AliasHasPrefix *string `json:"aliasHasPrefix,omitempty"` AliasHasSuffix *string `json:"aliasHasSuffix,omitempty"` AliasIsNil bool `json:"aliasIsNil,omitempty"` AliasNotNil bool `json:"aliasNotNil,omitempty"` AliasEqualFold *string `json:"aliasEqualFold,omitempty"` AliasContainsFold *string `json:"aliasContainsFold,omitempty"` // "profile_image" field predicates. ProfileImage *string `json:"profileImage,omitempty"` ProfileImageNEQ *string `json:"profileImageNEQ,omitempty"` ProfileImageIn []string `json:"profileImageIn,omitempty"` ProfileImageNotIn []string `json:"profileImageNotIn,omitempty"` ProfileImageGT *string `json:"profileImageGT,omitempty"` ProfileImageGTE *string `json:"profileImageGTE,omitempty"` ProfileImageLT *string `json:"profileImageLT,omitempty"` ProfileImageLTE *string `json:"profileImageLTE,omitempty"` ProfileImageContains *string `json:"profileImageContains,omitempty"` ProfileImageHasPrefix *string `json:"profileImageHasPrefix,omitempty"` ProfileImageHasSuffix *string `json:"profileImageHasSuffix,omitempty"` ProfileImageIsNil bool `json:"profileImageIsNil,omitempty"` ProfileImageNotNil bool `json:"profileImageNotNil,omitempty"` ProfileImageEqualFold *string `json:"profileImageEqualFold,omitempty"` ProfileImageContainsFold *string `json:"profileImageContainsFold,omitempty"` // "auth_provider" field predicates. AuthProvider *user.AuthProvider `json:"authProvider,omitempty"` AuthProviderNEQ *user.AuthProvider `json:"authProviderNEQ,omitempty"` AuthProviderIn []user.AuthProvider `json:"authProviderIn,omitempty"` AuthProviderNotIn []user.AuthProvider `json:"authProviderNotIn,omitempty"` // "role" field predicates. Role *user.Role `json:"role,omitempty"` RoleNEQ *user.Role `json:"roleNEQ,omitempty"` RoleIn []user.Role `json:"roleIn,omitempty"` RoleNotIn []user.Role `json:"roleNotIn,omitempty"` // "last_seen_at" field predicates. LastSeenAt *time.Time `json:"lastSeenAt,omitempty"` LastSeenAtNEQ *time.Time `json:"lastSeenAtNEQ,omitempty"` LastSeenAtIn []time.Time `json:"lastSeenAtIn,omitempty"` LastSeenAtNotIn []time.Time `json:"lastSeenAtNotIn,omitempty"` LastSeenAtGT *time.Time `json:"lastSeenAtGT,omitempty"` LastSeenAtGTE *time.Time `json:"lastSeenAtGTE,omitempty"` LastSeenAtLT *time.Time `json:"lastSeenAtLT,omitempty"` LastSeenAtLTE *time.Time `json:"lastSeenAtLTE,omitempty"` LastSeenAtIsNil bool `json:"lastSeenAtIsNil,omitempty"` LastSeenAtNotNil bool `json:"lastSeenAtNotNil,omitempty"` // "last_post_seen_cursor" field predicates. LastPostSeenCursor *string `json:"lastPostSeenCursor,omitempty"` LastPostSeenCursorNEQ *string `json:"lastPostSeenCursorNEQ,omitempty"` LastPostSeenCursorIn []string `json:"lastPostSeenCursorIn,omitempty"` LastPostSeenCursorNotIn []string `json:"lastPostSeenCursorNotIn,omitempty"` LastPostSeenCursorGT *string `json:"lastPostSeenCursorGT,omitempty"` LastPostSeenCursorGTE *string `json:"lastPostSeenCursorGTE,omitempty"` LastPostSeenCursorLT *string `json:"lastPostSeenCursorLT,omitempty"` LastPostSeenCursorLTE *string `json:"lastPostSeenCursorLTE,omitempty"` LastPostSeenCursorContains *string `json:"lastPostSeenCursorContains,omitempty"` LastPostSeenCursorHasPrefix *string `json:"lastPostSeenCursorHasPrefix,omitempty"` LastPostSeenCursorHasSuffix *string `json:"lastPostSeenCursorHasSuffix,omitempty"` LastPostSeenCursorIsNil bool `json:"lastPostSeenCursorIsNil,omitempty"` LastPostSeenCursorNotNil bool `json:"lastPostSeenCursorNotNil,omitempty"` LastPostSeenCursorEqualFold *string `json:"lastPostSeenCursorEqualFold,omitempty"` LastPostSeenCursorContainsFold *string `json:"lastPostSeenCursorContainsFold,omitempty"` // "saved_posts" edge predicates. HasSavedPosts *bool `json:"hasSavedPosts,omitempty"` HasSavedPostsWith []*PostWhereInput `json:"hasSavedPostsWith,omitempty"` // "liked_posts" edge predicates. HasLikedPosts *bool `json:"hasLikedPosts,omitempty"` HasLikedPostsWith []*PostWhereInput `json:"hasLikedPostsWith,omitempty"` // "published_posts" edge predicates. HasPublishedPosts *bool `json:"hasPublishedPosts,omitempty"` HasPublishedPostsWith []*PostWhereInput `json:"hasPublishedPostsWith,omitempty"` // "comments" edge predicates. HasComments *bool `json:"hasComments,omitempty"` HasCommentsWith []*CommentWhereInput `json:"hasCommentsWith,omitempty"` // "api_keys" edge predicates. HasAPIKeys *bool `json:"hasAPIKeys,omitempty"` HasAPIKeysWith []*ApiKeyWhereInput `json:"hasAPIKeysWith,omitempty"` // Deleted record filter options. IncludeDeleted *bool `json:"includeDeleted,omitempty"` IncludeDeletedOnly *bool `json:"includeDeletedOnly,omitempty"` }
UserWhereInput represents a where input for filtering User queries.
func (*UserWhereInput) AddPredicates ¶
func (i *UserWhereInput) AddPredicates(predicates ...predicate.User)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
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
¶
- apikey.go
- apikey_create.go
- apikey_delete.go
- apikey_query.go
- apikey_update.go
- client.go
- comment.go
- comment_create.go
- comment_delete.go
- comment_query.go
- comment_update.go
- edge_cleanup.go
- ent.go
- entql.go
- gql_collection.go
- gql_edge.go
- gql_mutation_input.go
- gql_node.go
- gql_node_descriptor.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- mutation.go
- post.go
- post_create.go
- post_delete.go
- post_query.go
- post_update.go
- postcategory.go
- postcategory_create.go
- postcategory_delete.go
- postcategory_query.go
- postcategory_update.go
- refreshtoken.go
- refreshtoken_create.go
- refreshtoken_delete.go
- refreshtoken_query.go
- refreshtoken_update.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go