Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Account
- func (a *Account) QueryAuthentication() *AuthenticationQuery
- func (a *Account) QueryPosts() *PostQuery
- func (a *Account) QueryReacts() *ReactQuery
- func (a *Account) QueryRoles() *RoleQuery
- func (a *Account) QuerySubscriptions() *SubscriptionQuery
- func (a *Account) QueryTags() *TagQuery
- func (a *Account) String() string
- func (a *Account) Unwrap() *Account
- func (a *Account) Update() *AccountUpdateOne
- type AccountClient
- func (c *AccountClient) Create() *AccountCreate
- func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk
- func (c *AccountClient) Delete() *AccountDelete
- func (c *AccountClient) DeleteOne(a *Account) *AccountDeleteOne
- func (c *AccountClient) DeleteOneID(id xid.ID) *AccountDeleteOne
- func (c *AccountClient) Get(ctx context.Context, id xid.ID) (*Account, error)
- func (c *AccountClient) GetX(ctx context.Context, id xid.ID) *Account
- func (c *AccountClient) Hooks() []Hook
- func (c *AccountClient) Query() *AccountQuery
- func (c *AccountClient) QueryAuthentication(a *Account) *AuthenticationQuery
- func (c *AccountClient) QueryPosts(a *Account) *PostQuery
- func (c *AccountClient) QueryReacts(a *Account) *ReactQuery
- func (c *AccountClient) QueryRoles(a *Account) *RoleQuery
- func (c *AccountClient) QuerySubscriptions(a *Account) *SubscriptionQuery
- func (c *AccountClient) QueryTags(a *Account) *TagQuery
- func (c *AccountClient) Update() *AccountUpdate
- func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne
- func (c *AccountClient) UpdateOneID(id xid.ID) *AccountUpdateOne
- func (c *AccountClient) Use(hooks ...Hook)
- type AccountCreate
- func (ac *AccountCreate) AddAuthentication(a ...*Authentication) *AccountCreate
- func (ac *AccountCreate) AddAuthenticationIDs(ids ...xid.ID) *AccountCreate
- func (ac *AccountCreate) AddPostIDs(ids ...xid.ID) *AccountCreate
- func (ac *AccountCreate) AddPosts(p ...*Post) *AccountCreate
- func (ac *AccountCreate) AddReactIDs(ids ...xid.ID) *AccountCreate
- func (ac *AccountCreate) AddReacts(r ...*React) *AccountCreate
- func (ac *AccountCreate) AddRoleIDs(ids ...xid.ID) *AccountCreate
- func (ac *AccountCreate) AddRoles(r ...*Role) *AccountCreate
- func (ac *AccountCreate) AddSubscriptionIDs(ids ...xid.ID) *AccountCreate
- func (ac *AccountCreate) AddSubscriptions(s ...*Subscription) *AccountCreate
- func (ac *AccountCreate) AddTagIDs(ids ...xid.ID) *AccountCreate
- func (ac *AccountCreate) AddTags(t ...*Tag) *AccountCreate
- func (ac *AccountCreate) Exec(ctx context.Context) error
- func (ac *AccountCreate) ExecX(ctx context.Context)
- func (ac *AccountCreate) Mutation() *AccountMutation
- func (ac *AccountCreate) OnConflict(opts ...sql.ConflictOption) *AccountUpsertOne
- func (ac *AccountCreate) OnConflictColumns(columns ...string) *AccountUpsertOne
- func (ac *AccountCreate) Save(ctx context.Context) (*Account, error)
- func (ac *AccountCreate) SaveX(ctx context.Context) *Account
- func (ac *AccountCreate) SetAdmin(b bool) *AccountCreate
- func (ac *AccountCreate) SetBio(s string) *AccountCreate
- func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetDeletedAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetEmail(s string) *AccountCreate
- func (ac *AccountCreate) SetID(x xid.ID) *AccountCreate
- func (ac *AccountCreate) SetName(s string) *AccountCreate
- func (ac *AccountCreate) SetNillableAdmin(b *bool) *AccountCreate
- func (ac *AccountCreate) SetNillableBio(s *string) *AccountCreate
- func (ac *AccountCreate) SetNillableCreatedAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetNillableDeletedAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetNillableID(x *xid.ID) *AccountCreate
- func (ac *AccountCreate) SetNillableUpdatedAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetUpdatedAt(t time.Time) *AccountCreate
- type AccountCreateBulk
- func (acb *AccountCreateBulk) Exec(ctx context.Context) error
- func (acb *AccountCreateBulk) ExecX(ctx context.Context)
- func (acb *AccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *AccountUpsertBulk
- func (acb *AccountCreateBulk) OnConflictColumns(columns ...string) *AccountUpsertBulk
- func (acb *AccountCreateBulk) Save(ctx context.Context) ([]*Account, error)
- func (acb *AccountCreateBulk) SaveX(ctx context.Context) []*Account
- type AccountDelete
- type AccountDeleteOne
- type AccountEdges
- func (e AccountEdges) AuthenticationOrErr() ([]*Authentication, error)
- func (e AccountEdges) PostsOrErr() ([]*Post, error)
- func (e AccountEdges) ReactsOrErr() ([]*React, error)
- func (e AccountEdges) RolesOrErr() ([]*Role, error)
- func (e AccountEdges) SubscriptionsOrErr() ([]*Subscription, error)
- func (e AccountEdges) TagsOrErr() ([]*Tag, error)
- type AccountGroupBy
- func (agb *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy
- func (s *AccountGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountGroupBy) BoolX(ctx context.Context) bool
- func (s *AccountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AccountGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountGroupBy) Float64X(ctx context.Context) float64
- func (s *AccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AccountGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AccountGroupBy) IntX(ctx context.Context) int
- func (s *AccountGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AccountGroupBy) IntsX(ctx context.Context) []int
- func (agb *AccountGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *AccountGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *AccountGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AccountGroupBy) StringX(ctx context.Context) string
- func (s *AccountGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AccountGroupBy) StringsX(ctx context.Context) []string
- type AccountMutation
- func (m *AccountMutation) AddAuthenticationIDs(ids ...xid.ID)
- func (m *AccountMutation) AddField(name string, value ent.Value) error
- func (m *AccountMutation) AddPostIDs(ids ...xid.ID)
- func (m *AccountMutation) AddReactIDs(ids ...xid.ID)
- func (m *AccountMutation) AddRoleIDs(ids ...xid.ID)
- func (m *AccountMutation) AddSubscriptionIDs(ids ...xid.ID)
- func (m *AccountMutation) AddTagIDs(ids ...xid.ID)
- func (m *AccountMutation) AddedEdges() []string
- func (m *AccountMutation) AddedField(name string) (ent.Value, bool)
- func (m *AccountMutation) AddedFields() []string
- func (m *AccountMutation) AddedIDs(name string) []ent.Value
- func (m *AccountMutation) Admin() (r bool, exists bool)
- func (m *AccountMutation) AuthenticationCleared() bool
- func (m *AccountMutation) AuthenticationIDs() (ids []xid.ID)
- func (m *AccountMutation) Bio() (r string, exists bool)
- func (m *AccountMutation) BioCleared() bool
- func (m *AccountMutation) ClearAuthentication()
- func (m *AccountMutation) ClearBio()
- func (m *AccountMutation) ClearDeletedAt()
- func (m *AccountMutation) ClearEdge(name string) error
- func (m *AccountMutation) ClearField(name string) error
- func (m *AccountMutation) ClearPosts()
- func (m *AccountMutation) ClearReacts()
- func (m *AccountMutation) ClearRoles()
- func (m *AccountMutation) ClearSubscriptions()
- func (m *AccountMutation) ClearTags()
- func (m *AccountMutation) ClearedEdges() []string
- func (m *AccountMutation) ClearedFields() []string
- func (m AccountMutation) Client() *Client
- func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AccountMutation) DeletedAt() (r time.Time, exists bool)
- func (m *AccountMutation) DeletedAtCleared() bool
- func (m *AccountMutation) EdgeCleared(name string) bool
- func (m *AccountMutation) Email() (r string, exists bool)
- func (m *AccountMutation) Field(name string) (ent.Value, bool)
- func (m *AccountMutation) FieldCleared(name string) bool
- func (m *AccountMutation) Fields() []string
- func (m *AccountMutation) ID() (id xid.ID, exists bool)
- func (m *AccountMutation) IDs(ctx context.Context) ([]xid.ID, error)
- func (m *AccountMutation) Name() (r string, exists bool)
- func (m *AccountMutation) OldAdmin(ctx context.Context) (v bool, err error)
- func (m *AccountMutation) OldBio(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccountMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *AccountMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AccountMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccountMutation) Op() Op
- func (m *AccountMutation) PostsCleared() bool
- func (m *AccountMutation) PostsIDs() (ids []xid.ID)
- func (m *AccountMutation) ReactsCleared() bool
- func (m *AccountMutation) ReactsIDs() (ids []xid.ID)
- func (m *AccountMutation) RemoveAuthenticationIDs(ids ...xid.ID)
- func (m *AccountMutation) RemovePostIDs(ids ...xid.ID)
- func (m *AccountMutation) RemoveReactIDs(ids ...xid.ID)
- func (m *AccountMutation) RemoveRoleIDs(ids ...xid.ID)
- func (m *AccountMutation) RemoveSubscriptionIDs(ids ...xid.ID)
- func (m *AccountMutation) RemoveTagIDs(ids ...xid.ID)
- func (m *AccountMutation) RemovedAuthenticationIDs() (ids []xid.ID)
- func (m *AccountMutation) RemovedEdges() []string
- func (m *AccountMutation) RemovedIDs(name string) []ent.Value
- func (m *AccountMutation) RemovedPostsIDs() (ids []xid.ID)
- func (m *AccountMutation) RemovedReactsIDs() (ids []xid.ID)
- func (m *AccountMutation) RemovedRolesIDs() (ids []xid.ID)
- func (m *AccountMutation) RemovedSubscriptionsIDs() (ids []xid.ID)
- func (m *AccountMutation) RemovedTagsIDs() (ids []xid.ID)
- func (m *AccountMutation) ResetAdmin()
- func (m *AccountMutation) ResetAuthentication()
- func (m *AccountMutation) ResetBio()
- func (m *AccountMutation) ResetCreatedAt()
- func (m *AccountMutation) ResetDeletedAt()
- func (m *AccountMutation) ResetEdge(name string) error
- func (m *AccountMutation) ResetEmail()
- func (m *AccountMutation) ResetField(name string) error
- func (m *AccountMutation) ResetName()
- func (m *AccountMutation) ResetPosts()
- func (m *AccountMutation) ResetReacts()
- func (m *AccountMutation) ResetRoles()
- func (m *AccountMutation) ResetSubscriptions()
- func (m *AccountMutation) ResetTags()
- func (m *AccountMutation) ResetUpdatedAt()
- func (m *AccountMutation) RolesCleared() bool
- func (m *AccountMutation) RolesIDs() (ids []xid.ID)
- func (m *AccountMutation) SetAdmin(b bool)
- func (m *AccountMutation) SetBio(s string)
- func (m *AccountMutation) SetCreatedAt(t time.Time)
- func (m *AccountMutation) SetDeletedAt(t time.Time)
- func (m *AccountMutation) SetEmail(s string)
- func (m *AccountMutation) SetField(name string, value ent.Value) error
- func (m *AccountMutation) SetID(id xid.ID)
- func (m *AccountMutation) SetName(s string)
- func (m *AccountMutation) SetUpdatedAt(t time.Time)
- func (m *AccountMutation) SubscriptionsCleared() bool
- func (m *AccountMutation) SubscriptionsIDs() (ids []xid.ID)
- func (m *AccountMutation) TagsCleared() bool
- func (m *AccountMutation) TagsIDs() (ids []xid.ID)
- func (m AccountMutation) Tx() (*Tx, error)
- func (m *AccountMutation) Type() string
- func (m *AccountMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AccountMutation) Where(ps ...predicate.Account)
- type AccountQuery
- func (aq *AccountQuery) All(ctx context.Context) ([]*Account, error)
- func (aq *AccountQuery) AllX(ctx context.Context) []*Account
- func (aq *AccountQuery) Clone() *AccountQuery
- func (aq *AccountQuery) Count(ctx context.Context) (int, error)
- func (aq *AccountQuery) CountX(ctx context.Context) int
- func (aq *AccountQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AccountQuery) ExistX(ctx context.Context) bool
- func (aq *AccountQuery) First(ctx context.Context) (*Account, error)
- func (aq *AccountQuery) FirstID(ctx context.Context) (id xid.ID, err error)
- func (aq *AccountQuery) FirstIDX(ctx context.Context) xid.ID
- func (aq *AccountQuery) FirstX(ctx context.Context) *Account
- func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy
- func (aq *AccountQuery) IDs(ctx context.Context) ([]xid.ID, error)
- func (aq *AccountQuery) IDsX(ctx context.Context) []xid.ID
- func (aq *AccountQuery) Limit(limit int) *AccountQuery
- func (aq *AccountQuery) Modify(modifiers ...func(s *sql.Selector)) *AccountSelect
- func (aq *AccountQuery) Offset(offset int) *AccountQuery
- func (aq *AccountQuery) Only(ctx context.Context) (*Account, error)
- func (aq *AccountQuery) OnlyID(ctx context.Context) (id xid.ID, err error)
- func (aq *AccountQuery) OnlyIDX(ctx context.Context) xid.ID
- func (aq *AccountQuery) OnlyX(ctx context.Context) *Account
- func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery
- func (aq *AccountQuery) QueryAuthentication() *AuthenticationQuery
- func (aq *AccountQuery) QueryPosts() *PostQuery
- func (aq *AccountQuery) QueryReacts() *ReactQuery
- func (aq *AccountQuery) QueryRoles() *RoleQuery
- func (aq *AccountQuery) QuerySubscriptions() *SubscriptionQuery
- func (aq *AccountQuery) QueryTags() *TagQuery
- func (aq *AccountQuery) Select(fields ...string) *AccountSelect
- func (aq *AccountQuery) Unique(unique bool) *AccountQuery
- func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
- func (aq *AccountQuery) WithAuthentication(opts ...func(*AuthenticationQuery)) *AccountQuery
- func (aq *AccountQuery) WithPosts(opts ...func(*PostQuery)) *AccountQuery
- func (aq *AccountQuery) WithReacts(opts ...func(*ReactQuery)) *AccountQuery
- func (aq *AccountQuery) WithRoles(opts ...func(*RoleQuery)) *AccountQuery
- func (aq *AccountQuery) WithSubscriptions(opts ...func(*SubscriptionQuery)) *AccountQuery
- func (aq *AccountQuery) WithTags(opts ...func(*TagQuery)) *AccountQuery
- type AccountSelect
- func (s *AccountSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountSelect) BoolX(ctx context.Context) bool
- func (s *AccountSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountSelect) BoolsX(ctx context.Context) []bool
- func (s *AccountSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountSelect) Float64X(ctx context.Context) float64
- func (s *AccountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountSelect) Float64sX(ctx context.Context) []float64
- func (s *AccountSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AccountSelect) IntX(ctx context.Context) int
- func (s *AccountSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AccountSelect) IntsX(ctx context.Context) []int
- func (as *AccountSelect) Modify(modifiers ...func(s *sql.Selector)) *AccountSelect
- func (as *AccountSelect) Scan(ctx context.Context, v interface{}) error
- func (s *AccountSelect) ScanX(ctx context.Context, v interface{})
- func (s *AccountSelect) String(ctx context.Context) (_ string, err error)
- func (s *AccountSelect) StringX(ctx context.Context) string
- func (s *AccountSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AccountSelect) StringsX(ctx context.Context) []string
- type AccountUpdate
- func (au *AccountUpdate) AddAuthentication(a ...*Authentication) *AccountUpdate
- func (au *AccountUpdate) AddAuthenticationIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) AddPostIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) AddPosts(p ...*Post) *AccountUpdate
- func (au *AccountUpdate) AddReactIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) AddReacts(r ...*React) *AccountUpdate
- func (au *AccountUpdate) AddRoleIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) AddRoles(r ...*Role) *AccountUpdate
- func (au *AccountUpdate) AddSubscriptionIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) AddSubscriptions(s ...*Subscription) *AccountUpdate
- func (au *AccountUpdate) AddTagIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) AddTags(t ...*Tag) *AccountUpdate
- func (au *AccountUpdate) ClearAuthentication() *AccountUpdate
- func (au *AccountUpdate) ClearBio() *AccountUpdate
- func (au *AccountUpdate) ClearDeletedAt() *AccountUpdate
- func (au *AccountUpdate) ClearPosts() *AccountUpdate
- func (au *AccountUpdate) ClearReacts() *AccountUpdate
- func (au *AccountUpdate) ClearRoles() *AccountUpdate
- func (au *AccountUpdate) ClearSubscriptions() *AccountUpdate
- func (au *AccountUpdate) ClearTags() *AccountUpdate
- func (au *AccountUpdate) Exec(ctx context.Context) error
- func (au *AccountUpdate) ExecX(ctx context.Context)
- func (au *AccountUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUpdate
- func (au *AccountUpdate) Mutation() *AccountMutation
- func (au *AccountUpdate) RemoveAuthentication(a ...*Authentication) *AccountUpdate
- func (au *AccountUpdate) RemoveAuthenticationIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) RemovePostIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) RemovePosts(p ...*Post) *AccountUpdate
- func (au *AccountUpdate) RemoveReactIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) RemoveReacts(r ...*React) *AccountUpdate
- func (au *AccountUpdate) RemoveRoleIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) RemoveRoles(r ...*Role) *AccountUpdate
- func (au *AccountUpdate) RemoveSubscriptionIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) RemoveSubscriptions(s ...*Subscription) *AccountUpdate
- func (au *AccountUpdate) RemoveTagIDs(ids ...xid.ID) *AccountUpdate
- func (au *AccountUpdate) RemoveTags(t ...*Tag) *AccountUpdate
- func (au *AccountUpdate) Save(ctx context.Context) (int, error)
- func (au *AccountUpdate) SaveX(ctx context.Context) int
- func (au *AccountUpdate) SetAdmin(b bool) *AccountUpdate
- func (au *AccountUpdate) SetBio(s string) *AccountUpdate
- func (au *AccountUpdate) SetDeletedAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) SetEmail(s string) *AccountUpdate
- func (au *AccountUpdate) SetName(s string) *AccountUpdate
- func (au *AccountUpdate) SetNillableAdmin(b *bool) *AccountUpdate
- func (au *AccountUpdate) SetNillableBio(s *string) *AccountUpdate
- func (au *AccountUpdate) SetNillableDeletedAt(t *time.Time) *AccountUpdate
- func (au *AccountUpdate) SetUpdatedAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
- type AccountUpdateOne
- func (auo *AccountUpdateOne) AddAuthentication(a ...*Authentication) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddAuthenticationIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddPostIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddPosts(p ...*Post) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddReactIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddReacts(r ...*React) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddRoleIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddRoles(r ...*Role) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddSubscriptionIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddSubscriptions(s ...*Subscription) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddTagIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) AddTags(t ...*Tag) *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearAuthentication() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearBio() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearDeletedAt() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearPosts() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearReacts() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearRoles() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearSubscriptions() *AccountUpdateOne
- func (auo *AccountUpdateOne) ClearTags() *AccountUpdateOne
- func (auo *AccountUpdateOne) Exec(ctx context.Context) error
- func (auo *AccountUpdateOne) ExecX(ctx context.Context)
- func (auo *AccountUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUpdateOne
- func (auo *AccountUpdateOne) Mutation() *AccountMutation
- func (auo *AccountUpdateOne) RemoveAuthentication(a ...*Authentication) *AccountUpdateOne
- func (auo *AccountUpdateOne) RemoveAuthenticationIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) RemovePostIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) RemovePosts(p ...*Post) *AccountUpdateOne
- func (auo *AccountUpdateOne) RemoveReactIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) RemoveReacts(r ...*React) *AccountUpdateOne
- func (auo *AccountUpdateOne) RemoveRoleIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) RemoveRoles(r ...*Role) *AccountUpdateOne
- func (auo *AccountUpdateOne) RemoveSubscriptionIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) RemoveSubscriptions(s ...*Subscription) *AccountUpdateOne
- func (auo *AccountUpdateOne) RemoveTagIDs(ids ...xid.ID) *AccountUpdateOne
- func (auo *AccountUpdateOne) RemoveTags(t ...*Tag) *AccountUpdateOne
- func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)
- func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account
- func (auo *AccountUpdateOne) Select(field string, fields ...string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetAdmin(b bool) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetBio(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetDeletedAt(t time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetEmail(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetName(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableAdmin(b *bool) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableBio(s *string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableDeletedAt(t *time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetUpdatedAt(t time.Time) *AccountUpdateOne
- type AccountUpsert
- func (u *AccountUpsert) ClearBio() *AccountUpsert
- func (u *AccountUpsert) ClearDeletedAt() *AccountUpsert
- func (u *AccountUpsert) SetAdmin(v bool) *AccountUpsert
- func (u *AccountUpsert) SetBio(v string) *AccountUpsert
- func (u *AccountUpsert) SetCreatedAt(v time.Time) *AccountUpsert
- func (u *AccountUpsert) SetDeletedAt(v time.Time) *AccountUpsert
- func (u *AccountUpsert) SetEmail(v string) *AccountUpsert
- func (u *AccountUpsert) SetName(v string) *AccountUpsert
- func (u *AccountUpsert) SetUpdatedAt(v time.Time) *AccountUpsert
- func (u *AccountUpsert) UpdateAdmin() *AccountUpsert
- func (u *AccountUpsert) UpdateBio() *AccountUpsert
- func (u *AccountUpsert) UpdateCreatedAt() *AccountUpsert
- func (u *AccountUpsert) UpdateDeletedAt() *AccountUpsert
- func (u *AccountUpsert) UpdateEmail() *AccountUpsert
- func (u *AccountUpsert) UpdateName() *AccountUpsert
- func (u *AccountUpsert) UpdateUpdatedAt() *AccountUpsert
- type AccountUpsertBulk
- func (u *AccountUpsertBulk) ClearBio() *AccountUpsertBulk
- func (u *AccountUpsertBulk) ClearDeletedAt() *AccountUpsertBulk
- func (u *AccountUpsertBulk) DoNothing() *AccountUpsertBulk
- func (u *AccountUpsertBulk) Exec(ctx context.Context) error
- func (u *AccountUpsertBulk) ExecX(ctx context.Context)
- func (u *AccountUpsertBulk) Ignore() *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetAdmin(v bool) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetBio(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetCreatedAt(v time.Time) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetDeletedAt(v time.Time) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetEmail(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetName(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetUpdatedAt(v time.Time) *AccountUpsertBulk
- func (u *AccountUpsertBulk) Update(set func(*AccountUpsert)) *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateAdmin() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateBio() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateCreatedAt() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateDeletedAt() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateEmail() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateName() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateNewValues() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateUpdatedAt() *AccountUpsertBulk
- type AccountUpsertOne
- func (u *AccountUpsertOne) ClearBio() *AccountUpsertOne
- func (u *AccountUpsertOne) ClearDeletedAt() *AccountUpsertOne
- func (u *AccountUpsertOne) DoNothing() *AccountUpsertOne
- func (u *AccountUpsertOne) Exec(ctx context.Context) error
- func (u *AccountUpsertOne) ExecX(ctx context.Context)
- func (u *AccountUpsertOne) ID(ctx context.Context) (id xid.ID, err error)
- func (u *AccountUpsertOne) IDX(ctx context.Context) xid.ID
- func (u *AccountUpsertOne) Ignore() *AccountUpsertOne
- func (u *AccountUpsertOne) SetAdmin(v bool) *AccountUpsertOne
- func (u *AccountUpsertOne) SetBio(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetCreatedAt(v time.Time) *AccountUpsertOne
- func (u *AccountUpsertOne) SetDeletedAt(v time.Time) *AccountUpsertOne
- func (u *AccountUpsertOne) SetEmail(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetName(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetUpdatedAt(v time.Time) *AccountUpsertOne
- func (u *AccountUpsertOne) Update(set func(*AccountUpsert)) *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateAdmin() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateBio() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateCreatedAt() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateDeletedAt() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateEmail() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateName() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateNewValues() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateUpdatedAt() *AccountUpsertOne
- type Accounts
- type AggregateFunc
- type Authentication
- type AuthenticationClient
- func (c *AuthenticationClient) Create() *AuthenticationCreate
- func (c *AuthenticationClient) CreateBulk(builders ...*AuthenticationCreate) *AuthenticationCreateBulk
- func (c *AuthenticationClient) Delete() *AuthenticationDelete
- func (c *AuthenticationClient) DeleteOne(a *Authentication) *AuthenticationDeleteOne
- func (c *AuthenticationClient) DeleteOneID(id xid.ID) *AuthenticationDeleteOne
- func (c *AuthenticationClient) Get(ctx context.Context, id xid.ID) (*Authentication, error)
- func (c *AuthenticationClient) GetX(ctx context.Context, id xid.ID) *Authentication
- func (c *AuthenticationClient) Hooks() []Hook
- func (c *AuthenticationClient) Query() *AuthenticationQuery
- func (c *AuthenticationClient) QueryAccount(a *Authentication) *AccountQuery
- func (c *AuthenticationClient) Update() *AuthenticationUpdate
- func (c *AuthenticationClient) UpdateOne(a *Authentication) *AuthenticationUpdateOne
- func (c *AuthenticationClient) UpdateOneID(id xid.ID) *AuthenticationUpdateOne
- func (c *AuthenticationClient) Use(hooks ...Hook)
- type AuthenticationCreate
- func (ac *AuthenticationCreate) Exec(ctx context.Context) error
- func (ac *AuthenticationCreate) ExecX(ctx context.Context)
- func (ac *AuthenticationCreate) Mutation() *AuthenticationMutation
- func (ac *AuthenticationCreate) OnConflict(opts ...sql.ConflictOption) *AuthenticationUpsertOne
- func (ac *AuthenticationCreate) OnConflictColumns(columns ...string) *AuthenticationUpsertOne
- func (ac *AuthenticationCreate) Save(ctx context.Context) (*Authentication, error)
- func (ac *AuthenticationCreate) SaveX(ctx context.Context) *Authentication
- func (ac *AuthenticationCreate) SetAccount(a *Account) *AuthenticationCreate
- func (ac *AuthenticationCreate) SetAccountID(id xid.ID) *AuthenticationCreate
- func (ac *AuthenticationCreate) SetCreatedAt(t time.Time) *AuthenticationCreate
- func (ac *AuthenticationCreate) SetID(x xid.ID) *AuthenticationCreate
- func (ac *AuthenticationCreate) SetIdentifier(s string) *AuthenticationCreate
- func (ac *AuthenticationCreate) SetMetadata(m map[string]interface{}) *AuthenticationCreate
- func (ac *AuthenticationCreate) SetNillableAccountID(id *xid.ID) *AuthenticationCreate
- func (ac *AuthenticationCreate) SetNillableCreatedAt(t *time.Time) *AuthenticationCreate
- func (ac *AuthenticationCreate) SetNillableID(x *xid.ID) *AuthenticationCreate
- func (ac *AuthenticationCreate) SetService(s string) *AuthenticationCreate
- func (ac *AuthenticationCreate) SetToken(s string) *AuthenticationCreate
- type AuthenticationCreateBulk
- func (acb *AuthenticationCreateBulk) Exec(ctx context.Context) error
- func (acb *AuthenticationCreateBulk) ExecX(ctx context.Context)
- func (acb *AuthenticationCreateBulk) OnConflict(opts ...sql.ConflictOption) *AuthenticationUpsertBulk
- func (acb *AuthenticationCreateBulk) OnConflictColumns(columns ...string) *AuthenticationUpsertBulk
- func (acb *AuthenticationCreateBulk) Save(ctx context.Context) ([]*Authentication, error)
- func (acb *AuthenticationCreateBulk) SaveX(ctx context.Context) []*Authentication
- type AuthenticationDelete
- type AuthenticationDeleteOne
- type AuthenticationEdges
- type AuthenticationGroupBy
- func (agb *AuthenticationGroupBy) Aggregate(fns ...AggregateFunc) *AuthenticationGroupBy
- func (s *AuthenticationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuthenticationGroupBy) BoolX(ctx context.Context) bool
- func (s *AuthenticationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AuthenticationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AuthenticationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuthenticationGroupBy) Float64X(ctx context.Context) float64
- func (s *AuthenticationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuthenticationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AuthenticationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AuthenticationGroupBy) IntX(ctx context.Context) int
- func (s *AuthenticationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AuthenticationGroupBy) IntsX(ctx context.Context) []int
- func (agb *AuthenticationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *AuthenticationGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *AuthenticationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AuthenticationGroupBy) StringX(ctx context.Context) string
- func (s *AuthenticationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AuthenticationGroupBy) StringsX(ctx context.Context) []string
- type AuthenticationMutation
- func (m *AuthenticationMutation) AccountCleared() bool
- func (m *AuthenticationMutation) AccountID() (id xid.ID, exists bool)
- func (m *AuthenticationMutation) AccountIDs() (ids []xid.ID)
- func (m *AuthenticationMutation) AddField(name string, value ent.Value) error
- func (m *AuthenticationMutation) AddedEdges() []string
- func (m *AuthenticationMutation) AddedField(name string) (ent.Value, bool)
- func (m *AuthenticationMutation) AddedFields() []string
- func (m *AuthenticationMutation) AddedIDs(name string) []ent.Value
- func (m *AuthenticationMutation) ClearAccount()
- func (m *AuthenticationMutation) ClearEdge(name string) error
- func (m *AuthenticationMutation) ClearField(name string) error
- func (m *AuthenticationMutation) ClearMetadata()
- func (m *AuthenticationMutation) ClearedEdges() []string
- func (m *AuthenticationMutation) ClearedFields() []string
- func (m AuthenticationMutation) Client() *Client
- func (m *AuthenticationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AuthenticationMutation) EdgeCleared(name string) bool
- func (m *AuthenticationMutation) Field(name string) (ent.Value, bool)
- func (m *AuthenticationMutation) FieldCleared(name string) bool
- func (m *AuthenticationMutation) Fields() []string
- func (m *AuthenticationMutation) ID() (id xid.ID, exists bool)
- func (m *AuthenticationMutation) IDs(ctx context.Context) ([]xid.ID, error)
- func (m *AuthenticationMutation) Identifier() (r string, exists bool)
- func (m *AuthenticationMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *AuthenticationMutation) MetadataCleared() bool
- func (m *AuthenticationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AuthenticationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AuthenticationMutation) OldIdentifier(ctx context.Context) (v string, err error)
- func (m *AuthenticationMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *AuthenticationMutation) OldService(ctx context.Context) (v string, err error)
- func (m *AuthenticationMutation) OldToken(ctx context.Context) (v string, err error)
- func (m *AuthenticationMutation) Op() Op
- func (m *AuthenticationMutation) RemovedEdges() []string
- func (m *AuthenticationMutation) RemovedIDs(name string) []ent.Value
- func (m *AuthenticationMutation) ResetAccount()
- func (m *AuthenticationMutation) ResetCreatedAt()
- func (m *AuthenticationMutation) ResetEdge(name string) error
- func (m *AuthenticationMutation) ResetField(name string) error
- func (m *AuthenticationMutation) ResetIdentifier()
- func (m *AuthenticationMutation) ResetMetadata()
- func (m *AuthenticationMutation) ResetService()
- func (m *AuthenticationMutation) ResetToken()
- func (m *AuthenticationMutation) Service() (r string, exists bool)
- func (m *AuthenticationMutation) SetAccountID(id xid.ID)
- func (m *AuthenticationMutation) SetCreatedAt(t time.Time)
- func (m *AuthenticationMutation) SetField(name string, value ent.Value) error
- func (m *AuthenticationMutation) SetID(id xid.ID)
- func (m *AuthenticationMutation) SetIdentifier(s string)
- func (m *AuthenticationMutation) SetMetadata(value map[string]interface{})
- func (m *AuthenticationMutation) SetService(s string)
- func (m *AuthenticationMutation) SetToken(s string)
- func (m *AuthenticationMutation) Token() (r string, exists bool)
- func (m AuthenticationMutation) Tx() (*Tx, error)
- func (m *AuthenticationMutation) Type() string
- func (m *AuthenticationMutation) Where(ps ...predicate.Authentication)
- type AuthenticationQuery
- func (aq *AuthenticationQuery) All(ctx context.Context) ([]*Authentication, error)
- func (aq *AuthenticationQuery) AllX(ctx context.Context) []*Authentication
- func (aq *AuthenticationQuery) Clone() *AuthenticationQuery
- func (aq *AuthenticationQuery) Count(ctx context.Context) (int, error)
- func (aq *AuthenticationQuery) CountX(ctx context.Context) int
- func (aq *AuthenticationQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AuthenticationQuery) ExistX(ctx context.Context) bool
- func (aq *AuthenticationQuery) First(ctx context.Context) (*Authentication, error)
- func (aq *AuthenticationQuery) FirstID(ctx context.Context) (id xid.ID, err error)
- func (aq *AuthenticationQuery) FirstIDX(ctx context.Context) xid.ID
- func (aq *AuthenticationQuery) FirstX(ctx context.Context) *Authentication
- func (aq *AuthenticationQuery) GroupBy(field string, fields ...string) *AuthenticationGroupBy
- func (aq *AuthenticationQuery) IDs(ctx context.Context) ([]xid.ID, error)
- func (aq *AuthenticationQuery) IDsX(ctx context.Context) []xid.ID
- func (aq *AuthenticationQuery) Limit(limit int) *AuthenticationQuery
- func (aq *AuthenticationQuery) Modify(modifiers ...func(s *sql.Selector)) *AuthenticationSelect
- func (aq *AuthenticationQuery) Offset(offset int) *AuthenticationQuery
- func (aq *AuthenticationQuery) Only(ctx context.Context) (*Authentication, error)
- func (aq *AuthenticationQuery) OnlyID(ctx context.Context) (id xid.ID, err error)
- func (aq *AuthenticationQuery) OnlyIDX(ctx context.Context) xid.ID
- func (aq *AuthenticationQuery) OnlyX(ctx context.Context) *Authentication
- func (aq *AuthenticationQuery) Order(o ...OrderFunc) *AuthenticationQuery
- func (aq *AuthenticationQuery) QueryAccount() *AccountQuery
- func (aq *AuthenticationQuery) Select(fields ...string) *AuthenticationSelect
- func (aq *AuthenticationQuery) Unique(unique bool) *AuthenticationQuery
- func (aq *AuthenticationQuery) Where(ps ...predicate.Authentication) *AuthenticationQuery
- func (aq *AuthenticationQuery) WithAccount(opts ...func(*AccountQuery)) *AuthenticationQuery
- type AuthenticationSelect
- func (s *AuthenticationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuthenticationSelect) BoolX(ctx context.Context) bool
- func (s *AuthenticationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AuthenticationSelect) BoolsX(ctx context.Context) []bool
- func (s *AuthenticationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuthenticationSelect) Float64X(ctx context.Context) float64
- func (s *AuthenticationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuthenticationSelect) Float64sX(ctx context.Context) []float64
- func (s *AuthenticationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AuthenticationSelect) IntX(ctx context.Context) int
- func (s *AuthenticationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AuthenticationSelect) IntsX(ctx context.Context) []int
- func (as *AuthenticationSelect) Modify(modifiers ...func(s *sql.Selector)) *AuthenticationSelect
- func (as *AuthenticationSelect) Scan(ctx context.Context, v interface{}) error
- func (s *AuthenticationSelect) ScanX(ctx context.Context, v interface{})
- func (s *AuthenticationSelect) String(ctx context.Context) (_ string, err error)
- func (s *AuthenticationSelect) StringX(ctx context.Context) string
- func (s *AuthenticationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AuthenticationSelect) StringsX(ctx context.Context) []string
- type AuthenticationUpdate
- func (au *AuthenticationUpdate) ClearAccount() *AuthenticationUpdate
- func (au *AuthenticationUpdate) ClearMetadata() *AuthenticationUpdate
- func (au *AuthenticationUpdate) Exec(ctx context.Context) error
- func (au *AuthenticationUpdate) ExecX(ctx context.Context)
- func (au *AuthenticationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AuthenticationUpdate
- func (au *AuthenticationUpdate) Mutation() *AuthenticationMutation
- func (au *AuthenticationUpdate) Save(ctx context.Context) (int, error)
- func (au *AuthenticationUpdate) SaveX(ctx context.Context) int
- func (au *AuthenticationUpdate) SetAccount(a *Account) *AuthenticationUpdate
- func (au *AuthenticationUpdate) SetAccountID(id xid.ID) *AuthenticationUpdate
- func (au *AuthenticationUpdate) SetIdentifier(s string) *AuthenticationUpdate
- func (au *AuthenticationUpdate) SetMetadata(m map[string]interface{}) *AuthenticationUpdate
- func (au *AuthenticationUpdate) SetNillableAccountID(id *xid.ID) *AuthenticationUpdate
- func (au *AuthenticationUpdate) SetService(s string) *AuthenticationUpdate
- func (au *AuthenticationUpdate) SetToken(s string) *AuthenticationUpdate
- func (au *AuthenticationUpdate) Where(ps ...predicate.Authentication) *AuthenticationUpdate
- type AuthenticationUpdateOne
- func (auo *AuthenticationUpdateOne) ClearAccount() *AuthenticationUpdateOne
- func (auo *AuthenticationUpdateOne) ClearMetadata() *AuthenticationUpdateOne
- func (auo *AuthenticationUpdateOne) Exec(ctx context.Context) error
- func (auo *AuthenticationUpdateOne) ExecX(ctx context.Context)
- func (auo *AuthenticationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AuthenticationUpdateOne
- func (auo *AuthenticationUpdateOne) Mutation() *AuthenticationMutation
- func (auo *AuthenticationUpdateOne) Save(ctx context.Context) (*Authentication, error)
- func (auo *AuthenticationUpdateOne) SaveX(ctx context.Context) *Authentication
- func (auo *AuthenticationUpdateOne) Select(field string, fields ...string) *AuthenticationUpdateOne
- func (auo *AuthenticationUpdateOne) SetAccount(a *Account) *AuthenticationUpdateOne
- func (auo *AuthenticationUpdateOne) SetAccountID(id xid.ID) *AuthenticationUpdateOne
- func (auo *AuthenticationUpdateOne) SetIdentifier(s string) *AuthenticationUpdateOne
- func (auo *AuthenticationUpdateOne) SetMetadata(m map[string]interface{}) *AuthenticationUpdateOne
- func (auo *AuthenticationUpdateOne) SetNillableAccountID(id *xid.ID) *AuthenticationUpdateOne
- func (auo *AuthenticationUpdateOne) SetService(s string) *AuthenticationUpdateOne
- func (auo *AuthenticationUpdateOne) SetToken(s string) *AuthenticationUpdateOne
- type AuthenticationUpsert
- func (u *AuthenticationUpsert) ClearMetadata() *AuthenticationUpsert
- func (u *AuthenticationUpsert) SetCreatedAt(v time.Time) *AuthenticationUpsert
- func (u *AuthenticationUpsert) SetIdentifier(v string) *AuthenticationUpsert
- func (u *AuthenticationUpsert) SetMetadata(v map[string]interface{}) *AuthenticationUpsert
- func (u *AuthenticationUpsert) SetService(v string) *AuthenticationUpsert
- func (u *AuthenticationUpsert) SetToken(v string) *AuthenticationUpsert
- func (u *AuthenticationUpsert) UpdateCreatedAt() *AuthenticationUpsert
- func (u *AuthenticationUpsert) UpdateIdentifier() *AuthenticationUpsert
- func (u *AuthenticationUpsert) UpdateMetadata() *AuthenticationUpsert
- func (u *AuthenticationUpsert) UpdateService() *AuthenticationUpsert
- func (u *AuthenticationUpsert) UpdateToken() *AuthenticationUpsert
- type AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) ClearMetadata() *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) DoNothing() *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) Exec(ctx context.Context) error
- func (u *AuthenticationUpsertBulk) ExecX(ctx context.Context)
- func (u *AuthenticationUpsertBulk) Ignore() *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) SetCreatedAt(v time.Time) *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) SetIdentifier(v string) *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) SetMetadata(v map[string]interface{}) *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) SetService(v string) *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) SetToken(v string) *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) Update(set func(*AuthenticationUpsert)) *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) UpdateCreatedAt() *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) UpdateIdentifier() *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) UpdateMetadata() *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) UpdateNewValues() *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) UpdateService() *AuthenticationUpsertBulk
- func (u *AuthenticationUpsertBulk) UpdateToken() *AuthenticationUpsertBulk
- type AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) ClearMetadata() *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) DoNothing() *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) Exec(ctx context.Context) error
- func (u *AuthenticationUpsertOne) ExecX(ctx context.Context)
- func (u *AuthenticationUpsertOne) ID(ctx context.Context) (id xid.ID, err error)
- func (u *AuthenticationUpsertOne) IDX(ctx context.Context) xid.ID
- func (u *AuthenticationUpsertOne) Ignore() *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) SetCreatedAt(v time.Time) *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) SetIdentifier(v string) *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) SetMetadata(v map[string]interface{}) *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) SetService(v string) *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) SetToken(v string) *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) Update(set func(*AuthenticationUpsert)) *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) UpdateCreatedAt() *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) UpdateIdentifier() *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) UpdateMetadata() *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) UpdateNewValues() *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) UpdateService() *AuthenticationUpsertOne
- func (u *AuthenticationUpsertOne) UpdateToken() *AuthenticationUpsertOne
- type Authentications
- type Categories
- type Category
- type CategoryClient
- func (c *CategoryClient) Create() *CategoryCreate
- func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk
- func (c *CategoryClient) Delete() *CategoryDelete
- func (c *CategoryClient) DeleteOne(ca *Category) *CategoryDeleteOne
- func (c *CategoryClient) DeleteOneID(id xid.ID) *CategoryDeleteOne
- func (c *CategoryClient) Get(ctx context.Context, id xid.ID) (*Category, error)
- func (c *CategoryClient) GetX(ctx context.Context, id xid.ID) *Category
- func (c *CategoryClient) Hooks() []Hook
- func (c *CategoryClient) Query() *CategoryQuery
- func (c *CategoryClient) QueryPosts(ca *Category) *PostQuery
- func (c *CategoryClient) Update() *CategoryUpdate
- func (c *CategoryClient) UpdateOne(ca *Category) *CategoryUpdateOne
- func (c *CategoryClient) UpdateOneID(id xid.ID) *CategoryUpdateOne
- func (c *CategoryClient) Use(hooks ...Hook)
- type CategoryCreate
- func (cc *CategoryCreate) AddPostIDs(ids ...xid.ID) *CategoryCreate
- func (cc *CategoryCreate) AddPosts(p ...*Post) *CategoryCreate
- func (cc *CategoryCreate) Exec(ctx context.Context) error
- func (cc *CategoryCreate) ExecX(ctx context.Context)
- func (cc *CategoryCreate) Mutation() *CategoryMutation
- func (cc *CategoryCreate) OnConflict(opts ...sql.ConflictOption) *CategoryUpsertOne
- func (cc *CategoryCreate) OnConflictColumns(columns ...string) *CategoryUpsertOne
- func (cc *CategoryCreate) Save(ctx context.Context) (*Category, error)
- func (cc *CategoryCreate) SaveX(ctx context.Context) *Category
- func (cc *CategoryCreate) SetAdmin(b bool) *CategoryCreate
- func (cc *CategoryCreate) SetColour(s string) *CategoryCreate
- func (cc *CategoryCreate) SetCreatedAt(t time.Time) *CategoryCreate
- func (cc *CategoryCreate) SetDescription(s string) *CategoryCreate
- func (cc *CategoryCreate) SetID(x xid.ID) *CategoryCreate
- func (cc *CategoryCreate) SetName(s string) *CategoryCreate
- func (cc *CategoryCreate) SetNillableAdmin(b *bool) *CategoryCreate
- func (cc *CategoryCreate) SetNillableColour(s *string) *CategoryCreate
- func (cc *CategoryCreate) SetNillableCreatedAt(t *time.Time) *CategoryCreate
- func (cc *CategoryCreate) SetNillableDescription(s *string) *CategoryCreate
- func (cc *CategoryCreate) SetNillableID(x *xid.ID) *CategoryCreate
- func (cc *CategoryCreate) SetNillableSort(i *int) *CategoryCreate
- func (cc *CategoryCreate) SetNillableUpdatedAt(t *time.Time) *CategoryCreate
- func (cc *CategoryCreate) SetSort(i int) *CategoryCreate
- func (cc *CategoryCreate) SetUpdatedAt(t time.Time) *CategoryCreate
- type CategoryCreateBulk
- func (ccb *CategoryCreateBulk) Exec(ctx context.Context) error
- func (ccb *CategoryCreateBulk) ExecX(ctx context.Context)
- func (ccb *CategoryCreateBulk) OnConflict(opts ...sql.ConflictOption) *CategoryUpsertBulk
- func (ccb *CategoryCreateBulk) OnConflictColumns(columns ...string) *CategoryUpsertBulk
- func (ccb *CategoryCreateBulk) Save(ctx context.Context) ([]*Category, error)
- func (ccb *CategoryCreateBulk) SaveX(ctx context.Context) []*Category
- type CategoryDelete
- type CategoryDeleteOne
- type CategoryEdges
- type CategoryGroupBy
- func (cgb *CategoryGroupBy) Aggregate(fns ...AggregateFunc) *CategoryGroupBy
- func (s *CategoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CategoryGroupBy) BoolX(ctx context.Context) bool
- func (s *CategoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CategoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CategoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CategoryGroupBy) Float64X(ctx context.Context) float64
- func (s *CategoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CategoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CategoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CategoryGroupBy) IntX(ctx context.Context) int
- func (s *CategoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CategoryGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CategoryGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *CategoryGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *CategoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CategoryGroupBy) StringX(ctx context.Context) string
- func (s *CategoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CategoryGroupBy) StringsX(ctx context.Context) []string
- type CategoryMutation
- func (m *CategoryMutation) AddField(name string, value ent.Value) error
- func (m *CategoryMutation) AddPostIDs(ids ...xid.ID)
- func (m *CategoryMutation) AddSort(i int)
- func (m *CategoryMutation) AddedEdges() []string
- func (m *CategoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *CategoryMutation) AddedFields() []string
- func (m *CategoryMutation) AddedIDs(name string) []ent.Value
- func (m *CategoryMutation) AddedSort() (r int, exists bool)
- func (m *CategoryMutation) Admin() (r bool, exists bool)
- func (m *CategoryMutation) ClearEdge(name string) error
- func (m *CategoryMutation) ClearField(name string) error
- func (m *CategoryMutation) ClearPosts()
- func (m *CategoryMutation) ClearedEdges() []string
- func (m *CategoryMutation) ClearedFields() []string
- func (m CategoryMutation) Client() *Client
- func (m *CategoryMutation) Colour() (r string, exists bool)
- func (m *CategoryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CategoryMutation) Description() (r string, exists bool)
- func (m *CategoryMutation) EdgeCleared(name string) bool
- func (m *CategoryMutation) Field(name string) (ent.Value, bool)
- func (m *CategoryMutation) FieldCleared(name string) bool
- func (m *CategoryMutation) Fields() []string
- func (m *CategoryMutation) ID() (id xid.ID, exists bool)
- func (m *CategoryMutation) IDs(ctx context.Context) ([]xid.ID, error)
- func (m *CategoryMutation) Name() (r string, exists bool)
- func (m *CategoryMutation) OldAdmin(ctx context.Context) (v bool, err error)
- func (m *CategoryMutation) OldColour(ctx context.Context) (v string, err error)
- func (m *CategoryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CategoryMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *CategoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CategoryMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CategoryMutation) OldSort(ctx context.Context) (v int, err error)
- func (m *CategoryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CategoryMutation) Op() Op
- func (m *CategoryMutation) PostsCleared() bool
- func (m *CategoryMutation) PostsIDs() (ids []xid.ID)
- func (m *CategoryMutation) RemovePostIDs(ids ...xid.ID)
- func (m *CategoryMutation) RemovedEdges() []string
- func (m *CategoryMutation) RemovedIDs(name string) []ent.Value
- func (m *CategoryMutation) RemovedPostsIDs() (ids []xid.ID)
- func (m *CategoryMutation) ResetAdmin()
- func (m *CategoryMutation) ResetColour()
- func (m *CategoryMutation) ResetCreatedAt()
- func (m *CategoryMutation) ResetDescription()
- func (m *CategoryMutation) ResetEdge(name string) error
- func (m *CategoryMutation) ResetField(name string) error
- func (m *CategoryMutation) ResetName()
- func (m *CategoryMutation) ResetPosts()
- func (m *CategoryMutation) ResetSort()
- func (m *CategoryMutation) ResetUpdatedAt()
- func (m *CategoryMutation) SetAdmin(b bool)
- func (m *CategoryMutation) SetColour(s string)
- func (m *CategoryMutation) SetCreatedAt(t time.Time)
- func (m *CategoryMutation) SetDescription(s string)
- func (m *CategoryMutation) SetField(name string, value ent.Value) error
- func (m *CategoryMutation) SetID(id xid.ID)
- func (m *CategoryMutation) SetName(s string)
- func (m *CategoryMutation) SetSort(i int)
- func (m *CategoryMutation) SetUpdatedAt(t time.Time)
- func (m *CategoryMutation) Sort() (r int, exists bool)
- func (m CategoryMutation) Tx() (*Tx, error)
- func (m *CategoryMutation) Type() string
- func (m *CategoryMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CategoryMutation) Where(ps ...predicate.Category)
- type CategoryQuery
- func (cq *CategoryQuery) All(ctx context.Context) ([]*Category, error)
- func (cq *CategoryQuery) AllX(ctx context.Context) []*Category
- func (cq *CategoryQuery) Clone() *CategoryQuery
- func (cq *CategoryQuery) Count(ctx context.Context) (int, error)
- func (cq *CategoryQuery) CountX(ctx context.Context) int
- func (cq *CategoryQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CategoryQuery) ExistX(ctx context.Context) bool
- func (cq *CategoryQuery) First(ctx context.Context) (*Category, error)
- func (cq *CategoryQuery) FirstID(ctx context.Context) (id xid.ID, err error)
- func (cq *CategoryQuery) FirstIDX(ctx context.Context) xid.ID
- func (cq *CategoryQuery) FirstX(ctx context.Context) *Category
- func (cq *CategoryQuery) GroupBy(field string, fields ...string) *CategoryGroupBy
- func (cq *CategoryQuery) IDs(ctx context.Context) ([]xid.ID, error)
- func (cq *CategoryQuery) IDsX(ctx context.Context) []xid.ID
- func (cq *CategoryQuery) Limit(limit int) *CategoryQuery
- func (cq *CategoryQuery) Modify(modifiers ...func(s *sql.Selector)) *CategorySelect
- func (cq *CategoryQuery) Offset(offset int) *CategoryQuery
- func (cq *CategoryQuery) Only(ctx context.Context) (*Category, error)
- func (cq *CategoryQuery) OnlyID(ctx context.Context) (id xid.ID, err error)
- func (cq *CategoryQuery) OnlyIDX(ctx context.Context) xid.ID
- func (cq *CategoryQuery) OnlyX(ctx context.Context) *Category
- func (cq *CategoryQuery) Order(o ...OrderFunc) *CategoryQuery
- func (cq *CategoryQuery) QueryPosts() *PostQuery
- func (cq *CategoryQuery) Select(fields ...string) *CategorySelect
- func (cq *CategoryQuery) Unique(unique bool) *CategoryQuery
- func (cq *CategoryQuery) Where(ps ...predicate.Category) *CategoryQuery
- func (cq *CategoryQuery) WithPosts(opts ...func(*PostQuery)) *CategoryQuery
- type CategorySelect
- func (s *CategorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CategorySelect) BoolX(ctx context.Context) bool
- func (s *CategorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CategorySelect) BoolsX(ctx context.Context) []bool
- func (s *CategorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CategorySelect) Float64X(ctx context.Context) float64
- func (s *CategorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CategorySelect) Float64sX(ctx context.Context) []float64
- func (s *CategorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *CategorySelect) IntX(ctx context.Context) int
- func (s *CategorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *CategorySelect) IntsX(ctx context.Context) []int
- func (cs *CategorySelect) Modify(modifiers ...func(s *sql.Selector)) *CategorySelect
- func (cs *CategorySelect) Scan(ctx context.Context, v interface{}) error
- func (s *CategorySelect) ScanX(ctx context.Context, v interface{})
- func (s *CategorySelect) String(ctx context.Context) (_ string, err error)
- func (s *CategorySelect) StringX(ctx context.Context) string
- func (s *CategorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *CategorySelect) StringsX(ctx context.Context) []string
- type CategoryUpdate
- func (cu *CategoryUpdate) AddPostIDs(ids ...xid.ID) *CategoryUpdate
- func (cu *CategoryUpdate) AddPosts(p ...*Post) *CategoryUpdate
- func (cu *CategoryUpdate) AddSort(i int) *CategoryUpdate
- func (cu *CategoryUpdate) ClearPosts() *CategoryUpdate
- func (cu *CategoryUpdate) Exec(ctx context.Context) error
- func (cu *CategoryUpdate) ExecX(ctx context.Context)
- func (cu *CategoryUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CategoryUpdate
- func (cu *CategoryUpdate) Mutation() *CategoryMutation
- func (cu *CategoryUpdate) RemovePostIDs(ids ...xid.ID) *CategoryUpdate
- func (cu *CategoryUpdate) RemovePosts(p ...*Post) *CategoryUpdate
- func (cu *CategoryUpdate) Save(ctx context.Context) (int, error)
- func (cu *CategoryUpdate) SaveX(ctx context.Context) int
- func (cu *CategoryUpdate) SetAdmin(b bool) *CategoryUpdate
- func (cu *CategoryUpdate) SetColour(s string) *CategoryUpdate
- func (cu *CategoryUpdate) SetDescription(s string) *CategoryUpdate
- func (cu *CategoryUpdate) SetName(s string) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableAdmin(b *bool) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableColour(s *string) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableDescription(s *string) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableSort(i *int) *CategoryUpdate
- func (cu *CategoryUpdate) SetSort(i int) *CategoryUpdate
- func (cu *CategoryUpdate) SetUpdatedAt(t time.Time) *CategoryUpdate
- func (cu *CategoryUpdate) Where(ps ...predicate.Category) *CategoryUpdate
- type CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddPostIDs(ids ...xid.ID) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddPosts(p ...*Post) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddSort(i int) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearPosts() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Exec(ctx context.Context) error
- func (cuo *CategoryUpdateOne) ExecX(ctx context.Context)
- func (cuo *CategoryUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Mutation() *CategoryMutation
- func (cuo *CategoryUpdateOne) RemovePostIDs(ids ...xid.ID) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) RemovePosts(p ...*Post) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Save(ctx context.Context) (*Category, error)
- func (cuo *CategoryUpdateOne) SaveX(ctx context.Context) *Category
- func (cuo *CategoryUpdateOne) Select(field string, fields ...string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetAdmin(b bool) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetColour(s string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetDescription(s string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetName(s string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableAdmin(b *bool) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableColour(s *string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableDescription(s *string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableSort(i *int) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetSort(i int) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetUpdatedAt(t time.Time) *CategoryUpdateOne
- type CategoryUpsert
- func (u *CategoryUpsert) AddSort(v int) *CategoryUpsert
- func (u *CategoryUpsert) SetAdmin(v bool) *CategoryUpsert
- func (u *CategoryUpsert) SetColour(v string) *CategoryUpsert
- func (u *CategoryUpsert) SetCreatedAt(v time.Time) *CategoryUpsert
- func (u *CategoryUpsert) SetDescription(v string) *CategoryUpsert
- func (u *CategoryUpsert) SetName(v string) *CategoryUpsert
- func (u *CategoryUpsert) SetSort(v int) *CategoryUpsert
- func (u *CategoryUpsert) SetUpdatedAt(v time.Time) *CategoryUpsert
- func (u *CategoryUpsert) UpdateAdmin() *CategoryUpsert
- func (u *CategoryUpsert) UpdateColour() *CategoryUpsert
- func (u *CategoryUpsert) UpdateCreatedAt() *CategoryUpsert
- func (u *CategoryUpsert) UpdateDescription() *CategoryUpsert
- func (u *CategoryUpsert) UpdateName() *CategoryUpsert
- func (u *CategoryUpsert) UpdateSort() *CategoryUpsert
- func (u *CategoryUpsert) UpdateUpdatedAt() *CategoryUpsert
- type CategoryUpsertBulk
- func (u *CategoryUpsertBulk) AddSort(v int) *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) DoNothing() *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) Exec(ctx context.Context) error
- func (u *CategoryUpsertBulk) ExecX(ctx context.Context)
- func (u *CategoryUpsertBulk) Ignore() *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) SetAdmin(v bool) *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) SetColour(v string) *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) SetCreatedAt(v time.Time) *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) SetDescription(v string) *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) SetName(v string) *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) SetSort(v int) *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) SetUpdatedAt(v time.Time) *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) Update(set func(*CategoryUpsert)) *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) UpdateAdmin() *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) UpdateColour() *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) UpdateCreatedAt() *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) UpdateDescription() *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) UpdateName() *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) UpdateNewValues() *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) UpdateSort() *CategoryUpsertBulk
- func (u *CategoryUpsertBulk) UpdateUpdatedAt() *CategoryUpsertBulk
- type CategoryUpsertOne
- func (u *CategoryUpsertOne) AddSort(v int) *CategoryUpsertOne
- func (u *CategoryUpsertOne) DoNothing() *CategoryUpsertOne
- func (u *CategoryUpsertOne) Exec(ctx context.Context) error
- func (u *CategoryUpsertOne) ExecX(ctx context.Context)
- func (u *CategoryUpsertOne) ID(ctx context.Context) (id xid.ID, err error)
- func (u *CategoryUpsertOne) IDX(ctx context.Context) xid.ID
- func (u *CategoryUpsertOne) Ignore() *CategoryUpsertOne
- func (u *CategoryUpsertOne) SetAdmin(v bool) *CategoryUpsertOne
- func (u *CategoryUpsertOne) SetColour(v string) *CategoryUpsertOne
- func (u *CategoryUpsertOne) SetCreatedAt(v time.Time) *CategoryUpsertOne
- func (u *CategoryUpsertOne) SetDescription(v string) *CategoryUpsertOne
- func (u *CategoryUpsertOne) SetName(v string) *CategoryUpsertOne
- func (u *CategoryUpsertOne) SetSort(v int) *CategoryUpsertOne
- func (u *CategoryUpsertOne) SetUpdatedAt(v time.Time) *CategoryUpsertOne
- func (u *CategoryUpsertOne) Update(set func(*CategoryUpsert)) *CategoryUpsertOne
- func (u *CategoryUpsertOne) UpdateAdmin() *CategoryUpsertOne
- func (u *CategoryUpsertOne) UpdateColour() *CategoryUpsertOne
- func (u *CategoryUpsertOne) UpdateCreatedAt() *CategoryUpsertOne
- func (u *CategoryUpsertOne) UpdateDescription() *CategoryUpsertOne
- func (u *CategoryUpsertOne) UpdateName() *CategoryUpsertOne
- func (u *CategoryUpsertOne) UpdateNewValues() *CategoryUpsertOne
- func (u *CategoryUpsertOne) UpdateSort() *CategoryUpsertOne
- func (u *CategoryUpsertOne) UpdateUpdatedAt() *CategoryUpsertOne
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Notification
- type NotificationClient
- func (c *NotificationClient) Create() *NotificationCreate
- func (c *NotificationClient) CreateBulk(builders ...*NotificationCreate) *NotificationCreateBulk
- func (c *NotificationClient) Delete() *NotificationDelete
- func (c *NotificationClient) DeleteOne(n *Notification) *NotificationDeleteOne
- func (c *NotificationClient) DeleteOneID(id xid.ID) *NotificationDeleteOne
- func (c *NotificationClient) Get(ctx context.Context, id xid.ID) (*Notification, error)
- func (c *NotificationClient) GetX(ctx context.Context, id xid.ID) *Notification
- func (c *NotificationClient) Hooks() []Hook
- func (c *NotificationClient) Query() *NotificationQuery
- func (c *NotificationClient) QuerySubscription(n *Notification) *SubscriptionQuery
- func (c *NotificationClient) Update() *NotificationUpdate
- func (c *NotificationClient) UpdateOne(n *Notification) *NotificationUpdateOne
- func (c *NotificationClient) UpdateOneID(id xid.ID) *NotificationUpdateOne
- func (c *NotificationClient) Use(hooks ...Hook)
- type NotificationCreate
- func (nc *NotificationCreate) Exec(ctx context.Context) error
- func (nc *NotificationCreate) ExecX(ctx context.Context)
- func (nc *NotificationCreate) Mutation() *NotificationMutation
- func (nc *NotificationCreate) OnConflict(opts ...sql.ConflictOption) *NotificationUpsertOne
- func (nc *NotificationCreate) OnConflictColumns(columns ...string) *NotificationUpsertOne
- func (nc *NotificationCreate) Save(ctx context.Context) (*Notification, error)
- func (nc *NotificationCreate) SaveX(ctx context.Context) *Notification
- func (nc *NotificationCreate) SetCreatedAt(t time.Time) *NotificationCreate
- func (nc *NotificationCreate) SetDescription(s string) *NotificationCreate
- func (nc *NotificationCreate) SetID(x xid.ID) *NotificationCreate
- func (nc *NotificationCreate) SetLink(s string) *NotificationCreate
- func (nc *NotificationCreate) SetNillableCreatedAt(t *time.Time) *NotificationCreate
- func (nc *NotificationCreate) SetNillableID(x *xid.ID) *NotificationCreate
- func (nc *NotificationCreate) SetNillableSubscriptionID(id *xid.ID) *NotificationCreate
- func (nc *NotificationCreate) SetRead(b bool) *NotificationCreate
- func (nc *NotificationCreate) SetSubscription(s *Subscription) *NotificationCreate
- func (nc *NotificationCreate) SetSubscriptionID(id xid.ID) *NotificationCreate
- func (nc *NotificationCreate) SetTitle(s string) *NotificationCreate
- type NotificationCreateBulk
- func (ncb *NotificationCreateBulk) Exec(ctx context.Context) error
- func (ncb *NotificationCreateBulk) ExecX(ctx context.Context)
- func (ncb *NotificationCreateBulk) OnConflict(opts ...sql.ConflictOption) *NotificationUpsertBulk
- func (ncb *NotificationCreateBulk) OnConflictColumns(columns ...string) *NotificationUpsertBulk
- func (ncb *NotificationCreateBulk) Save(ctx context.Context) ([]*Notification, error)
- func (ncb *NotificationCreateBulk) SaveX(ctx context.Context) []*Notification
- type NotificationDelete
- type NotificationDeleteOne
- type NotificationEdges
- type NotificationGroupBy
- func (ngb *NotificationGroupBy) Aggregate(fns ...AggregateFunc) *NotificationGroupBy
- func (s *NotificationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NotificationGroupBy) BoolX(ctx context.Context) bool
- func (s *NotificationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NotificationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NotificationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NotificationGroupBy) Float64X(ctx context.Context) float64
- func (s *NotificationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NotificationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NotificationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NotificationGroupBy) IntX(ctx context.Context) int
- func (s *NotificationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NotificationGroupBy) IntsX(ctx context.Context) []int
- func (ngb *NotificationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *NotificationGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *NotificationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NotificationGroupBy) StringX(ctx context.Context) string
- func (s *NotificationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NotificationGroupBy) StringsX(ctx context.Context) []string
- type NotificationMutation
- func (m *NotificationMutation) AddField(name string, value ent.Value) error
- func (m *NotificationMutation) AddedEdges() []string
- func (m *NotificationMutation) AddedField(name string) (ent.Value, bool)
- func (m *NotificationMutation) AddedFields() []string
- func (m *NotificationMutation) AddedIDs(name string) []ent.Value
- func (m *NotificationMutation) ClearEdge(name string) error
- func (m *NotificationMutation) ClearField(name string) error
- func (m *NotificationMutation) ClearSubscription()
- func (m *NotificationMutation) ClearedEdges() []string
- func (m *NotificationMutation) ClearedFields() []string
- func (m NotificationMutation) Client() *Client
- func (m *NotificationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *NotificationMutation) Description() (r string, exists bool)
- func (m *NotificationMutation) EdgeCleared(name string) bool
- func (m *NotificationMutation) Field(name string) (ent.Value, bool)
- func (m *NotificationMutation) FieldCleared(name string) bool
- func (m *NotificationMutation) Fields() []string
- func (m *NotificationMutation) ID() (id xid.ID, exists bool)
- func (m *NotificationMutation) IDs(ctx context.Context) ([]xid.ID, error)
- func (m *NotificationMutation) Link() (r string, exists bool)
- func (m *NotificationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NotificationMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *NotificationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NotificationMutation) OldLink(ctx context.Context) (v string, err error)
- func (m *NotificationMutation) OldRead(ctx context.Context) (v bool, err error)
- func (m *NotificationMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *NotificationMutation) Op() Op
- func (m *NotificationMutation) Read() (r bool, exists bool)
- func (m *NotificationMutation) RemovedEdges() []string
- func (m *NotificationMutation) RemovedIDs(name string) []ent.Value
- func (m *NotificationMutation) ResetCreatedAt()
- func (m *NotificationMutation) ResetDescription()
- func (m *NotificationMutation) ResetEdge(name string) error
- func (m *NotificationMutation) ResetField(name string) error
- func (m *NotificationMutation) ResetLink()
- func (m *NotificationMutation) ResetRead()
- func (m *NotificationMutation) ResetSubscription()
- func (m *NotificationMutation) ResetTitle()
- func (m *NotificationMutation) SetCreatedAt(t time.Time)
- func (m *NotificationMutation) SetDescription(s string)
- func (m *NotificationMutation) SetField(name string, value ent.Value) error
- func (m *NotificationMutation) SetID(id xid.ID)
- func (m *NotificationMutation) SetLink(s string)
- func (m *NotificationMutation) SetRead(b bool)
- func (m *NotificationMutation) SetSubscriptionID(id xid.ID)
- func (m *NotificationMutation) SetTitle(s string)
- func (m *NotificationMutation) SubscriptionCleared() bool
- func (m *NotificationMutation) SubscriptionID() (id xid.ID, exists bool)
- func (m *NotificationMutation) SubscriptionIDs() (ids []xid.ID)
- func (m *NotificationMutation) Title() (r string, exists bool)
- func (m NotificationMutation) Tx() (*Tx, error)
- func (m *NotificationMutation) Type() string
- func (m *NotificationMutation) Where(ps ...predicate.Notification)
- type NotificationQuery
- func (nq *NotificationQuery) All(ctx context.Context) ([]*Notification, error)
- func (nq *NotificationQuery) AllX(ctx context.Context) []*Notification
- func (nq *NotificationQuery) Clone() *NotificationQuery
- func (nq *NotificationQuery) Count(ctx context.Context) (int, error)
- func (nq *NotificationQuery) CountX(ctx context.Context) int
- func (nq *NotificationQuery) Exist(ctx context.Context) (bool, error)
- func (nq *NotificationQuery) ExistX(ctx context.Context) bool
- func (nq *NotificationQuery) First(ctx context.Context) (*Notification, error)
- func (nq *NotificationQuery) FirstID(ctx context.Context) (id xid.ID, err error)
- func (nq *NotificationQuery) FirstIDX(ctx context.Context) xid.ID
- func (nq *NotificationQuery) FirstX(ctx context.Context) *Notification
- func (nq *NotificationQuery) GroupBy(field string, fields ...string) *NotificationGroupBy
- func (nq *NotificationQuery) IDs(ctx context.Context) ([]xid.ID, error)
- func (nq *NotificationQuery) IDsX(ctx context.Context) []xid.ID
- func (nq *NotificationQuery) Limit(limit int) *NotificationQuery
- func (nq *NotificationQuery) Modify(modifiers ...func(s *sql.Selector)) *NotificationSelect
- func (nq *NotificationQuery) Offset(offset int) *NotificationQuery
- func (nq *NotificationQuery) Only(ctx context.Context) (*Notification, error)
- func (nq *NotificationQuery) OnlyID(ctx context.Context) (id xid.ID, err error)
- func (nq *NotificationQuery) OnlyIDX(ctx context.Context) xid.ID
- func (nq *NotificationQuery) OnlyX(ctx context.Context) *Notification
- func (nq *NotificationQuery) Order(o ...OrderFunc) *NotificationQuery
- func (nq *NotificationQuery) QuerySubscription() *SubscriptionQuery
- func (nq *NotificationQuery) Select(fields ...string) *NotificationSelect
- func (nq *NotificationQuery) Unique(unique bool) *NotificationQuery
- func (nq *NotificationQuery) Where(ps ...predicate.Notification) *NotificationQuery
- func (nq *NotificationQuery) WithSubscription(opts ...func(*SubscriptionQuery)) *NotificationQuery
- type NotificationSelect
- func (s *NotificationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NotificationSelect) BoolX(ctx context.Context) bool
- func (s *NotificationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NotificationSelect) BoolsX(ctx context.Context) []bool
- func (s *NotificationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NotificationSelect) Float64X(ctx context.Context) float64
- func (s *NotificationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NotificationSelect) Float64sX(ctx context.Context) []float64
- func (s *NotificationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NotificationSelect) IntX(ctx context.Context) int
- func (s *NotificationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NotificationSelect) IntsX(ctx context.Context) []int
- func (ns *NotificationSelect) Modify(modifiers ...func(s *sql.Selector)) *NotificationSelect
- func (ns *NotificationSelect) Scan(ctx context.Context, v interface{}) error
- func (s *NotificationSelect) ScanX(ctx context.Context, v interface{})
- func (s *NotificationSelect) String(ctx context.Context) (_ string, err error)
- func (s *NotificationSelect) StringX(ctx context.Context) string
- func (s *NotificationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NotificationSelect) StringsX(ctx context.Context) []string
- type NotificationUpdate
- func (nu *NotificationUpdate) ClearSubscription() *NotificationUpdate
- func (nu *NotificationUpdate) Exec(ctx context.Context) error
- func (nu *NotificationUpdate) ExecX(ctx context.Context)
- func (nu *NotificationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *NotificationUpdate
- func (nu *NotificationUpdate) Mutation() *NotificationMutation
- func (nu *NotificationUpdate) Save(ctx context.Context) (int, error)
- func (nu *NotificationUpdate) SaveX(ctx context.Context) int
- func (nu *NotificationUpdate) SetDescription(s string) *NotificationUpdate
- func (nu *NotificationUpdate) SetLink(s string) *NotificationUpdate
- func (nu *NotificationUpdate) SetNillableSubscriptionID(id *xid.ID) *NotificationUpdate
- func (nu *NotificationUpdate) SetRead(b bool) *NotificationUpdate
- func (nu *NotificationUpdate) SetSubscription(s *Subscription) *NotificationUpdate
- func (nu *NotificationUpdate) SetSubscriptionID(id xid.ID) *NotificationUpdate
- func (nu *NotificationUpdate) SetTitle(s string) *NotificationUpdate
- func (nu *NotificationUpdate) Where(ps ...predicate.Notification) *NotificationUpdate
- type NotificationUpdateOne
- func (nuo *NotificationUpdateOne) ClearSubscription() *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) Exec(ctx context.Context) error
- func (nuo *NotificationUpdateOne) ExecX(ctx context.Context)
- func (nuo *NotificationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) Mutation() *NotificationMutation
- func (nuo *NotificationUpdateOne) Save(ctx context.Context) (*Notification, error)
- func (nuo *NotificationUpdateOne) SaveX(ctx context.Context) *Notification
- func (nuo *NotificationUpdateOne) Select(field string, fields ...string) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetDescription(s string) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetLink(s string) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetNillableSubscriptionID(id *xid.ID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetRead(b bool) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetSubscription(s *Subscription) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetSubscriptionID(id xid.ID) *NotificationUpdateOne
- func (nuo *NotificationUpdateOne) SetTitle(s string) *NotificationUpdateOne
- type NotificationUpsert
- func (u *NotificationUpsert) SetCreatedAt(v time.Time) *NotificationUpsert
- func (u *NotificationUpsert) SetDescription(v string) *NotificationUpsert
- func (u *NotificationUpsert) SetLink(v string) *NotificationUpsert
- func (u *NotificationUpsert) SetRead(v bool) *NotificationUpsert
- func (u *NotificationUpsert) SetTitle(v string) *NotificationUpsert
- func (u *NotificationUpsert) UpdateCreatedAt() *NotificationUpsert
- func (u *NotificationUpsert) UpdateDescription() *NotificationUpsert
- func (u *NotificationUpsert) UpdateLink() *NotificationUpsert
- func (u *NotificationUpsert) UpdateRead() *NotificationUpsert
- func (u *NotificationUpsert) UpdateTitle() *NotificationUpsert
- type NotificationUpsertBulk
- func (u *NotificationUpsertBulk) DoNothing() *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) Exec(ctx context.Context) error
- func (u *NotificationUpsertBulk) ExecX(ctx context.Context)
- func (u *NotificationUpsertBulk) Ignore() *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) SetCreatedAt(v time.Time) *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) SetDescription(v string) *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) SetLink(v string) *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) SetRead(v bool) *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) SetTitle(v string) *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) Update(set func(*NotificationUpsert)) *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) UpdateCreatedAt() *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) UpdateDescription() *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) UpdateLink() *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) UpdateNewValues() *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) UpdateRead() *NotificationUpsertBulk
- func (u *NotificationUpsertBulk) UpdateTitle() *NotificationUpsertBulk
- type NotificationUpsertOne
- func (u *NotificationUpsertOne) DoNothing() *NotificationUpsertOne
- func (u *NotificationUpsertOne) Exec(ctx context.Context) error
- func (u *NotificationUpsertOne) ExecX(ctx context.Context)
- func (u *NotificationUpsertOne) ID(ctx context.Context) (id xid.ID, err error)
- func (u *NotificationUpsertOne) IDX(ctx context.Context) xid.ID
- func (u *NotificationUpsertOne) Ignore() *NotificationUpsertOne
- func (u *NotificationUpsertOne) SetCreatedAt(v time.Time) *NotificationUpsertOne
- func (u *NotificationUpsertOne) SetDescription(v string) *NotificationUpsertOne
- func (u *NotificationUpsertOne) SetLink(v string) *NotificationUpsertOne
- func (u *NotificationUpsertOne) SetRead(v bool) *NotificationUpsertOne
- func (u *NotificationUpsertOne) SetTitle(v string) *NotificationUpsertOne
- func (u *NotificationUpsertOne) Update(set func(*NotificationUpsert)) *NotificationUpsertOne
- func (u *NotificationUpsertOne) UpdateCreatedAt() *NotificationUpsertOne
- func (u *NotificationUpsertOne) UpdateDescription() *NotificationUpsertOne
- func (u *NotificationUpsertOne) UpdateLink() *NotificationUpsertOne
- func (u *NotificationUpsertOne) UpdateNewValues() *NotificationUpsertOne
- func (u *NotificationUpsertOne) UpdateRead() *NotificationUpsertOne
- func (u *NotificationUpsertOne) UpdateTitle() *NotificationUpsertOne
- type Notifications
- type Op
- type Option
- type OrderFunc
- type Policy
- type Post
- func (po *Post) QueryAuthor() *AccountQuery
- func (po *Post) QueryCategory() *CategoryQuery
- func (po *Post) QueryPosts() *PostQuery
- func (po *Post) QueryReacts() *ReactQuery
- func (po *Post) QueryReplies() *PostQuery
- func (po *Post) QueryReplyTo() *PostQuery
- func (po *Post) QueryRoot() *PostQuery
- func (po *Post) QueryTags() *TagQuery
- func (po *Post) String() string
- func (po *Post) Unwrap() *Post
- func (po *Post) Update() *PostUpdateOne
- 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 xid.ID) *PostDeleteOne
- func (c *PostClient) Get(ctx context.Context, id xid.ID) (*Post, error)
- func (c *PostClient) GetX(ctx context.Context, id xid.ID) *Post
- func (c *PostClient) Hooks() []Hook
- func (c *PostClient) Query() *PostQuery
- func (c *PostClient) QueryAuthor(po *Post) *AccountQuery
- func (c *PostClient) QueryCategory(po *Post) *CategoryQuery
- func (c *PostClient) QueryPosts(po *Post) *PostQuery
- func (c *PostClient) QueryReacts(po *Post) *ReactQuery
- func (c *PostClient) QueryReplies(po *Post) *PostQuery
- func (c *PostClient) QueryReplyTo(po *Post) *PostQuery
- func (c *PostClient) QueryRoot(po *Post) *PostQuery
- func (c *PostClient) QueryTags(po *Post) *TagQuery
- func (c *PostClient) Update() *PostUpdate
- func (c *PostClient) UpdateOne(po *Post) *PostUpdateOne
- func (c *PostClient) UpdateOneID(id xid.ID) *PostUpdateOne
- func (c *PostClient) Use(hooks ...Hook)
- type PostCreate
- func (pc *PostCreate) AddPostIDs(ids ...xid.ID) *PostCreate
- func (pc *PostCreate) AddPosts(p ...*Post) *PostCreate
- func (pc *PostCreate) AddReactIDs(ids ...xid.ID) *PostCreate
- func (pc *PostCreate) AddReacts(r ...*React) *PostCreate
- func (pc *PostCreate) AddReplies(p ...*Post) *PostCreate
- func (pc *PostCreate) AddReplyIDs(ids ...xid.ID) *PostCreate
- func (pc *PostCreate) AddTagIDs(ids ...xid.ID) *PostCreate
- func (pc *PostCreate) AddTags(t ...*Tag) *PostCreate
- func (pc *PostCreate) Exec(ctx context.Context) error
- func (pc *PostCreate) ExecX(ctx context.Context)
- func (pc *PostCreate) Mutation() *PostMutation
- func (pc *PostCreate) OnConflict(opts ...sql.ConflictOption) *PostUpsertOne
- func (pc *PostCreate) OnConflictColumns(columns ...string) *PostUpsertOne
- func (pc *PostCreate) Save(ctx context.Context) (*Post, error)
- func (pc *PostCreate) SaveX(ctx context.Context) *Post
- func (pc *PostCreate) SetAuthor(a *Account) *PostCreate
- func (pc *PostCreate) SetAuthorID(id xid.ID) *PostCreate
- func (pc *PostCreate) SetBody(s string) *PostCreate
- func (pc *PostCreate) SetCategory(c *Category) *PostCreate
- func (pc *PostCreate) SetCategoryID(x xid.ID) *PostCreate
- func (pc *PostCreate) SetCreatedAt(t time.Time) *PostCreate
- func (pc *PostCreate) SetDeletedAt(t time.Time) *PostCreate
- func (pc *PostCreate) SetFirst(b bool) *PostCreate
- func (pc *PostCreate) SetID(x xid.ID) *PostCreate
- func (pc *PostCreate) SetNillableCategoryID(x *xid.ID) *PostCreate
- func (pc *PostCreate) SetNillableCreatedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetNillableDeletedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetNillableID(x *xid.ID) *PostCreate
- func (pc *PostCreate) SetNillablePinned(b *bool) *PostCreate
- func (pc *PostCreate) SetNillableReplyToID(id *xid.ID) *PostCreate
- func (pc *PostCreate) SetNillableReplyToPostID(x *xid.ID) *PostCreate
- func (pc *PostCreate) SetNillableRootID(id *xid.ID) *PostCreate
- func (pc *PostCreate) SetNillableRootPostID(x *xid.ID) *PostCreate
- func (pc *PostCreate) SetNillableSlug(s *string) *PostCreate
- func (pc *PostCreate) SetNillableTitle(s *string) *PostCreate
- func (pc *PostCreate) SetNillableUpdatedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetPinned(b bool) *PostCreate
- func (pc *PostCreate) SetReplyTo(p *Post) *PostCreate
- func (pc *PostCreate) SetReplyToID(id xid.ID) *PostCreate
- func (pc *PostCreate) SetReplyToPostID(x xid.ID) *PostCreate
- func (pc *PostCreate) SetRoot(p *Post) *PostCreate
- func (pc *PostCreate) SetRootID(id xid.ID) *PostCreate
- func (pc *PostCreate) SetRootPostID(x xid.ID) *PostCreate
- func (pc *PostCreate) SetShort(s string) *PostCreate
- func (pc *PostCreate) SetSlug(s string) *PostCreate
- func (pc *PostCreate) SetTitle(s string) *PostCreate
- func (pc *PostCreate) SetUpdatedAt(t time.Time) *PostCreate
- type PostCreateBulk
- func (pcb *PostCreateBulk) Exec(ctx context.Context) error
- func (pcb *PostCreateBulk) ExecX(ctx context.Context)
- func (pcb *PostCreateBulk) OnConflict(opts ...sql.ConflictOption) *PostUpsertBulk
- func (pcb *PostCreateBulk) OnConflictColumns(columns ...string) *PostUpsertBulk
- func (pcb *PostCreateBulk) Save(ctx context.Context) ([]*Post, error)
- func (pcb *PostCreateBulk) SaveX(ctx context.Context) []*Post
- type PostDelete
- type PostDeleteOne
- type PostEdges
- func (e PostEdges) AuthorOrErr() (*Account, error)
- func (e PostEdges) CategoryOrErr() (*Category, error)
- func (e PostEdges) PostsOrErr() ([]*Post, error)
- func (e PostEdges) ReactsOrErr() ([]*React, error)
- func (e PostEdges) RepliesOrErr() ([]*Post, error)
- func (e PostEdges) ReplyToOrErr() (*Post, error)
- func (e PostEdges) RootOrErr() (*Post, error)
- func (e PostEdges) TagsOrErr() ([]*Tag, error)
- 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 interface{}) error
- func (s *PostGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *PostGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PostGroupBy) StringX(ctx context.Context) string
- func (s *PostGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PostGroupBy) StringsX(ctx context.Context) []string
- type PostMutation
- func (m *PostMutation) AddField(name string, value ent.Value) error
- func (m *PostMutation) AddPostIDs(ids ...xid.ID)
- func (m *PostMutation) AddReactIDs(ids ...xid.ID)
- func (m *PostMutation) AddReplyIDs(ids ...xid.ID)
- func (m *PostMutation) AddTagIDs(ids ...xid.ID)
- func (m *PostMutation) AddedEdges() []string
- func (m *PostMutation) AddedField(name string) (ent.Value, bool)
- func (m *PostMutation) AddedFields() []string
- func (m *PostMutation) AddedIDs(name string) []ent.Value
- func (m *PostMutation) AuthorCleared() bool
- func (m *PostMutation) AuthorID() (id xid.ID, exists bool)
- func (m *PostMutation) AuthorIDs() (ids []xid.ID)
- func (m *PostMutation) Body() (r string, exists bool)
- func (m *PostMutation) CategoryCleared() bool
- func (m *PostMutation) CategoryID() (r xid.ID, exists bool)
- func (m *PostMutation) CategoryIDCleared() bool
- func (m *PostMutation) CategoryIDs() (ids []xid.ID)
- func (m *PostMutation) ClearAuthor()
- func (m *PostMutation) ClearCategory()
- func (m *PostMutation) ClearCategoryID()
- func (m *PostMutation) ClearDeletedAt()
- func (m *PostMutation) ClearEdge(name string) error
- func (m *PostMutation) ClearField(name string) error
- func (m *PostMutation) ClearPosts()
- func (m *PostMutation) ClearReacts()
- func (m *PostMutation) ClearReplies()
- func (m *PostMutation) ClearReplyTo()
- func (m *PostMutation) ClearReplyToPostID()
- func (m *PostMutation) ClearRoot()
- func (m *PostMutation) ClearRootPostID()
- func (m *PostMutation) ClearSlug()
- func (m *PostMutation) ClearTags()
- func (m *PostMutation) ClearTitle()
- func (m *PostMutation) ClearedEdges() []string
- func (m *PostMutation) ClearedFields() []string
- func (m PostMutation) Client() *Client
- func (m *PostMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PostMutation) DeletedAt() (r time.Time, exists bool)
- func (m *PostMutation) DeletedAtCleared() bool
- func (m *PostMutation) EdgeCleared(name string) bool
- func (m *PostMutation) Field(name string) (ent.Value, bool)
- func (m *PostMutation) FieldCleared(name string) bool
- func (m *PostMutation) Fields() []string
- func (m *PostMutation) First() (r bool, exists bool)
- func (m *PostMutation) ID() (id xid.ID, exists bool)
- func (m *PostMutation) IDs(ctx context.Context) ([]xid.ID, error)
- func (m *PostMutation) OldBody(ctx context.Context) (v string, err error)
- func (m *PostMutation) OldCategoryID(ctx context.Context) (v xid.ID, 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) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PostMutation) OldFirst(ctx context.Context) (v bool, err error)
- func (m *PostMutation) OldPinned(ctx context.Context) (v bool, err error)
- func (m *PostMutation) OldReplyToPostID(ctx context.Context) (v xid.ID, err error)
- func (m *PostMutation) OldRootPostID(ctx context.Context) (v xid.ID, err error)
- func (m *PostMutation) OldShort(ctx context.Context) (v string, err error)
- func (m *PostMutation) OldSlug(ctx context.Context) (v string, 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) Pinned() (r bool, exists bool)
- func (m *PostMutation) PostsCleared() bool
- func (m *PostMutation) PostsIDs() (ids []xid.ID)
- func (m *PostMutation) ReactsCleared() bool
- func (m *PostMutation) ReactsIDs() (ids []xid.ID)
- func (m *PostMutation) RemovePostIDs(ids ...xid.ID)
- func (m *PostMutation) RemoveReactIDs(ids ...xid.ID)
- func (m *PostMutation) RemoveReplyIDs(ids ...xid.ID)
- func (m *PostMutation) RemoveTagIDs(ids ...xid.ID)
- func (m *PostMutation) RemovedEdges() []string
- func (m *PostMutation) RemovedIDs(name string) []ent.Value
- func (m *PostMutation) RemovedPostsIDs() (ids []xid.ID)
- func (m *PostMutation) RemovedReactsIDs() (ids []xid.ID)
- func (m *PostMutation) RemovedRepliesIDs() (ids []xid.ID)
- func (m *PostMutation) RemovedTagsIDs() (ids []xid.ID)
- func (m *PostMutation) RepliesCleared() bool
- func (m *PostMutation) RepliesIDs() (ids []xid.ID)
- func (m *PostMutation) ReplyToCleared() bool
- func (m *PostMutation) ReplyToID() (id xid.ID, exists bool)
- func (m *PostMutation) ReplyToIDs() (ids []xid.ID)
- func (m *PostMutation) ReplyToPostID() (r xid.ID, exists bool)
- func (m *PostMutation) ReplyToPostIDCleared() bool
- func (m *PostMutation) ResetAuthor()
- func (m *PostMutation) ResetBody()
- func (m *PostMutation) ResetCategory()
- func (m *PostMutation) ResetCategoryID()
- func (m *PostMutation) ResetCreatedAt()
- func (m *PostMutation) ResetDeletedAt()
- func (m *PostMutation) ResetEdge(name string) error
- func (m *PostMutation) ResetField(name string) error
- func (m *PostMutation) ResetFirst()
- func (m *PostMutation) ResetPinned()
- func (m *PostMutation) ResetPosts()
- func (m *PostMutation) ResetReacts()
- func (m *PostMutation) ResetReplies()
- func (m *PostMutation) ResetReplyTo()
- func (m *PostMutation) ResetReplyToPostID()
- func (m *PostMutation) ResetRoot()
- func (m *PostMutation) ResetRootPostID()
- func (m *PostMutation) ResetShort()
- func (m *PostMutation) ResetSlug()
- func (m *PostMutation) ResetTags()
- func (m *PostMutation) ResetTitle()
- func (m *PostMutation) ResetUpdatedAt()
- func (m *PostMutation) RootCleared() bool
- func (m *PostMutation) RootID() (id xid.ID, exists bool)
- func (m *PostMutation) RootIDs() (ids []xid.ID)
- func (m *PostMutation) RootPostID() (r xid.ID, exists bool)
- func (m *PostMutation) RootPostIDCleared() bool
- func (m *PostMutation) SetAuthorID(id xid.ID)
- func (m *PostMutation) SetBody(s string)
- func (m *PostMutation) SetCategoryID(x xid.ID)
- func (m *PostMutation) SetCreatedAt(t time.Time)
- func (m *PostMutation) SetDeletedAt(t time.Time)
- func (m *PostMutation) SetField(name string, value ent.Value) error
- func (m *PostMutation) SetFirst(b bool)
- func (m *PostMutation) SetID(id xid.ID)
- func (m *PostMutation) SetPinned(b bool)
- func (m *PostMutation) SetReplyToID(id xid.ID)
- func (m *PostMutation) SetReplyToPostID(x xid.ID)
- func (m *PostMutation) SetRootID(id xid.ID)
- func (m *PostMutation) SetRootPostID(x xid.ID)
- func (m *PostMutation) SetShort(s string)
- func (m *PostMutation) SetSlug(s string)
- func (m *PostMutation) SetTitle(s string)
- func (m *PostMutation) SetUpdatedAt(t time.Time)
- func (m *PostMutation) Short() (r string, exists bool)
- func (m *PostMutation) Slug() (r string, exists bool)
- func (m *PostMutation) SlugCleared() bool
- func (m *PostMutation) TagsCleared() bool
- func (m *PostMutation) TagsIDs() (ids []xid.ID)
- func (m *PostMutation) Title() (r string, exists bool)
- func (m *PostMutation) TitleCleared() 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)
- type PostQuery
- func (pq *PostQuery) All(ctx context.Context) ([]*Post, error)
- func (pq *PostQuery) AllX(ctx context.Context) []*Post
- func (pq *PostQuery) Clone() *PostQuery
- func (pq *PostQuery) Count(ctx context.Context) (int, error)
- func (pq *PostQuery) CountX(ctx context.Context) int
- func (pq *PostQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PostQuery) ExistX(ctx context.Context) bool
- func (pq *PostQuery) First(ctx context.Context) (*Post, error)
- func (pq *PostQuery) FirstID(ctx context.Context) (id xid.ID, err error)
- func (pq *PostQuery) FirstIDX(ctx context.Context) xid.ID
- func (pq *PostQuery) FirstX(ctx context.Context) *Post
- func (pq *PostQuery) GroupBy(field string, fields ...string) *PostGroupBy
- func (pq *PostQuery) IDs(ctx context.Context) ([]xid.ID, error)
- func (pq *PostQuery) IDsX(ctx context.Context) []xid.ID
- 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 xid.ID, err error)
- func (pq *PostQuery) OnlyIDX(ctx context.Context) xid.ID
- func (pq *PostQuery) OnlyX(ctx context.Context) *Post
- func (pq *PostQuery) Order(o ...OrderFunc) *PostQuery
- func (pq *PostQuery) QueryAuthor() *AccountQuery
- func (pq *PostQuery) QueryCategory() *CategoryQuery
- func (pq *PostQuery) QueryPosts() *PostQuery
- func (pq *PostQuery) QueryReacts() *ReactQuery
- func (pq *PostQuery) QueryReplies() *PostQuery
- func (pq *PostQuery) QueryReplyTo() *PostQuery
- func (pq *PostQuery) QueryRoot() *PostQuery
- func (pq *PostQuery) QueryTags() *TagQuery
- func (pq *PostQuery) Select(fields ...string) *PostSelect
- func (pq *PostQuery) Unique(unique bool) *PostQuery
- func (pq *PostQuery) Where(ps ...predicate.Post) *PostQuery
- func (pq *PostQuery) WithAuthor(opts ...func(*AccountQuery)) *PostQuery
- func (pq *PostQuery) WithCategory(opts ...func(*CategoryQuery)) *PostQuery
- func (pq *PostQuery) WithPosts(opts ...func(*PostQuery)) *PostQuery
- func (pq *PostQuery) WithReacts(opts ...func(*ReactQuery)) *PostQuery
- func (pq *PostQuery) WithReplies(opts ...func(*PostQuery)) *PostQuery
- func (pq *PostQuery) WithReplyTo(opts ...func(*PostQuery)) *PostQuery
- func (pq *PostQuery) WithRoot(opts ...func(*PostQuery)) *PostQuery
- func (pq *PostQuery) WithTags(opts ...func(*TagQuery)) *PostQuery
- type 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 interface{}) error
- func (s *PostSelect) ScanX(ctx context.Context, v interface{})
- 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) AddPostIDs(ids ...xid.ID) *PostUpdate
- func (pu *PostUpdate) AddPosts(p ...*Post) *PostUpdate
- func (pu *PostUpdate) AddReactIDs(ids ...xid.ID) *PostUpdate
- func (pu *PostUpdate) AddReacts(r ...*React) *PostUpdate
- func (pu *PostUpdate) AddReplies(p ...*Post) *PostUpdate
- func (pu *PostUpdate) AddReplyIDs(ids ...xid.ID) *PostUpdate
- func (pu *PostUpdate) AddTagIDs(ids ...xid.ID) *PostUpdate
- func (pu *PostUpdate) AddTags(t ...*Tag) *PostUpdate
- func (pu *PostUpdate) ClearAuthor() *PostUpdate
- func (pu *PostUpdate) ClearCategory() *PostUpdate
- func (pu *PostUpdate) ClearCategoryID() *PostUpdate
- func (pu *PostUpdate) ClearDeletedAt() *PostUpdate
- func (pu *PostUpdate) ClearPosts() *PostUpdate
- func (pu *PostUpdate) ClearReacts() *PostUpdate
- func (pu *PostUpdate) ClearReplies() *PostUpdate
- func (pu *PostUpdate) ClearReplyTo() *PostUpdate
- func (pu *PostUpdate) ClearReplyToPostID() *PostUpdate
- func (pu *PostUpdate) ClearRoot() *PostUpdate
- func (pu *PostUpdate) ClearRootPostID() *PostUpdate
- func (pu *PostUpdate) ClearSlug() *PostUpdate
- func (pu *PostUpdate) ClearTags() *PostUpdate
- func (pu *PostUpdate) ClearTitle() *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) RemovePostIDs(ids ...xid.ID) *PostUpdate
- func (pu *PostUpdate) RemovePosts(p ...*Post) *PostUpdate
- func (pu *PostUpdate) RemoveReactIDs(ids ...xid.ID) *PostUpdate
- func (pu *PostUpdate) RemoveReacts(r ...*React) *PostUpdate
- func (pu *PostUpdate) RemoveReplies(p ...*Post) *PostUpdate
- func (pu *PostUpdate) RemoveReplyIDs(ids ...xid.ID) *PostUpdate
- func (pu *PostUpdate) RemoveTagIDs(ids ...xid.ID) *PostUpdate
- func (pu *PostUpdate) RemoveTags(t ...*Tag) *PostUpdate
- func (pu *PostUpdate) Save(ctx context.Context) (int, error)
- func (pu *PostUpdate) SaveX(ctx context.Context) int
- func (pu *PostUpdate) SetAuthor(a *Account) *PostUpdate
- func (pu *PostUpdate) SetAuthorID(id xid.ID) *PostUpdate
- func (pu *PostUpdate) SetBody(s string) *PostUpdate
- func (pu *PostUpdate) SetCategory(c *Category) *PostUpdate
- func (pu *PostUpdate) SetCategoryID(x xid.ID) *PostUpdate
- func (pu *PostUpdate) SetDeletedAt(t time.Time) *PostUpdate
- func (pu *PostUpdate) SetFirst(b bool) *PostUpdate
- func (pu *PostUpdate) SetNillableCategoryID(x *xid.ID) *PostUpdate
- func (pu *PostUpdate) SetNillableDeletedAt(t *time.Time) *PostUpdate
- func (pu *PostUpdate) SetNillablePinned(b *bool) *PostUpdate
- func (pu *PostUpdate) SetNillableReplyToID(id *xid.ID) *PostUpdate
- func (pu *PostUpdate) SetNillableReplyToPostID(x *xid.ID) *PostUpdate
- func (pu *PostUpdate) SetNillableRootID(id *xid.ID) *PostUpdate
- func (pu *PostUpdate) SetNillableRootPostID(x *xid.ID) *PostUpdate
- func (pu *PostUpdate) SetNillableSlug(s *string) *PostUpdate
- func (pu *PostUpdate) SetNillableTitle(s *string) *PostUpdate
- func (pu *PostUpdate) SetPinned(b bool) *PostUpdate
- func (pu *PostUpdate) SetReplyTo(p *Post) *PostUpdate
- func (pu *PostUpdate) SetReplyToID(id xid.ID) *PostUpdate
- func (pu *PostUpdate) SetReplyToPostID(x xid.ID) *PostUpdate
- func (pu *PostUpdate) SetRoot(p *Post) *PostUpdate
- func (pu *PostUpdate) SetRootID(id xid.ID) *PostUpdate
- func (pu *PostUpdate) SetRootPostID(x xid.ID) *PostUpdate
- func (pu *PostUpdate) SetShort(s string) *PostUpdate
- func (pu *PostUpdate) SetSlug(s string) *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) AddPostIDs(ids ...xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) AddPosts(p ...*Post) *PostUpdateOne
- func (puo *PostUpdateOne) AddReactIDs(ids ...xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) AddReacts(r ...*React) *PostUpdateOne
- func (puo *PostUpdateOne) AddReplies(p ...*Post) *PostUpdateOne
- func (puo *PostUpdateOne) AddReplyIDs(ids ...xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) AddTagIDs(ids ...xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) AddTags(t ...*Tag) *PostUpdateOne
- func (puo *PostUpdateOne) ClearAuthor() *PostUpdateOne
- func (puo *PostUpdateOne) ClearCategory() *PostUpdateOne
- func (puo *PostUpdateOne) ClearCategoryID() *PostUpdateOne
- func (puo *PostUpdateOne) ClearDeletedAt() *PostUpdateOne
- func (puo *PostUpdateOne) ClearPosts() *PostUpdateOne
- func (puo *PostUpdateOne) ClearReacts() *PostUpdateOne
- func (puo *PostUpdateOne) ClearReplies() *PostUpdateOne
- func (puo *PostUpdateOne) ClearReplyTo() *PostUpdateOne
- func (puo *PostUpdateOne) ClearReplyToPostID() *PostUpdateOne
- func (puo *PostUpdateOne) ClearRoot() *PostUpdateOne
- func (puo *PostUpdateOne) ClearRootPostID() *PostUpdateOne
- func (puo *PostUpdateOne) ClearSlug() *PostUpdateOne
- func (puo *PostUpdateOne) ClearTags() *PostUpdateOne
- func (puo *PostUpdateOne) ClearTitle() *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) RemovePostIDs(ids ...xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) RemovePosts(p ...*Post) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveReactIDs(ids ...xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveReacts(r ...*React) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveReplies(p ...*Post) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveReplyIDs(ids ...xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveTagIDs(ids ...xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) RemoveTags(t ...*Tag) *PostUpdateOne
- func (puo *PostUpdateOne) Save(ctx context.Context) (*Post, error)
- func (puo *PostUpdateOne) SaveX(ctx context.Context) *Post
- func (puo *PostUpdateOne) Select(field string, fields ...string) *PostUpdateOne
- func (puo *PostUpdateOne) SetAuthor(a *Account) *PostUpdateOne
- func (puo *PostUpdateOne) SetAuthorID(id xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) SetBody(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetCategory(c *Category) *PostUpdateOne
- func (puo *PostUpdateOne) SetCategoryID(x xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) SetDeletedAt(t time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetFirst(b bool) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableCategoryID(x *xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableDeletedAt(t *time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillablePinned(b *bool) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableReplyToID(id *xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableReplyToPostID(x *xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableRootID(id *xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableRootPostID(x *xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableSlug(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableTitle(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetPinned(b bool) *PostUpdateOne
- func (puo *PostUpdateOne) SetReplyTo(p *Post) *PostUpdateOne
- func (puo *PostUpdateOne) SetReplyToID(id xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) SetReplyToPostID(x xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) SetRoot(p *Post) *PostUpdateOne
- func (puo *PostUpdateOne) SetRootID(id xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) SetRootPostID(x xid.ID) *PostUpdateOne
- func (puo *PostUpdateOne) SetShort(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetSlug(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetTitle(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetUpdatedAt(t time.Time) *PostUpdateOne
- type PostUpsert
- func (u *PostUpsert) ClearCategoryID() *PostUpsert
- func (u *PostUpsert) ClearDeletedAt() *PostUpsert
- func (u *PostUpsert) ClearReplyToPostID() *PostUpsert
- func (u *PostUpsert) ClearRootPostID() *PostUpsert
- func (u *PostUpsert) ClearSlug() *PostUpsert
- func (u *PostUpsert) ClearTitle() *PostUpsert
- func (u *PostUpsert) SetBody(v string) *PostUpsert
- func (u *PostUpsert) SetCategoryID(v xid.ID) *PostUpsert
- func (u *PostUpsert) SetCreatedAt(v time.Time) *PostUpsert
- func (u *PostUpsert) SetDeletedAt(v time.Time) *PostUpsert
- func (u *PostUpsert) SetFirst(v bool) *PostUpsert
- func (u *PostUpsert) SetPinned(v bool) *PostUpsert
- func (u *PostUpsert) SetReplyToPostID(v xid.ID) *PostUpsert
- func (u *PostUpsert) SetRootPostID(v xid.ID) *PostUpsert
- func (u *PostUpsert) SetShort(v string) *PostUpsert
- func (u *PostUpsert) SetSlug(v string) *PostUpsert
- func (u *PostUpsert) SetTitle(v string) *PostUpsert
- func (u *PostUpsert) SetUpdatedAt(v time.Time) *PostUpsert
- func (u *PostUpsert) UpdateBody() *PostUpsert
- func (u *PostUpsert) UpdateCategoryID() *PostUpsert
- func (u *PostUpsert) UpdateCreatedAt() *PostUpsert
- func (u *PostUpsert) UpdateDeletedAt() *PostUpsert
- func (u *PostUpsert) UpdateFirst() *PostUpsert
- func (u *PostUpsert) UpdatePinned() *PostUpsert
- func (u *PostUpsert) UpdateReplyToPostID() *PostUpsert
- func (u *PostUpsert) UpdateRootPostID() *PostUpsert
- func (u *PostUpsert) UpdateShort() *PostUpsert
- func (u *PostUpsert) UpdateSlug() *PostUpsert
- func (u *PostUpsert) UpdateTitle() *PostUpsert
- func (u *PostUpsert) UpdateUpdatedAt() *PostUpsert
- type PostUpsertBulk
- func (u *PostUpsertBulk) ClearCategoryID() *PostUpsertBulk
- func (u *PostUpsertBulk) ClearDeletedAt() *PostUpsertBulk
- func (u *PostUpsertBulk) ClearReplyToPostID() *PostUpsertBulk
- func (u *PostUpsertBulk) ClearRootPostID() *PostUpsertBulk
- func (u *PostUpsertBulk) ClearSlug() *PostUpsertBulk
- func (u *PostUpsertBulk) ClearTitle() *PostUpsertBulk
- func (u *PostUpsertBulk) DoNothing() *PostUpsertBulk
- func (u *PostUpsertBulk) Exec(ctx context.Context) error
- func (u *PostUpsertBulk) ExecX(ctx context.Context)
- func (u *PostUpsertBulk) Ignore() *PostUpsertBulk
- func (u *PostUpsertBulk) SetBody(v string) *PostUpsertBulk
- func (u *PostUpsertBulk) SetCategoryID(v xid.ID) *PostUpsertBulk
- func (u *PostUpsertBulk) SetCreatedAt(v time.Time) *PostUpsertBulk
- func (u *PostUpsertBulk) SetDeletedAt(v time.Time) *PostUpsertBulk
- func (u *PostUpsertBulk) SetFirst(v bool) *PostUpsertBulk
- func (u *PostUpsertBulk) SetPinned(v bool) *PostUpsertBulk
- func (u *PostUpsertBulk) SetReplyToPostID(v xid.ID) *PostUpsertBulk
- func (u *PostUpsertBulk) SetRootPostID(v xid.ID) *PostUpsertBulk
- func (u *PostUpsertBulk) SetShort(v string) *PostUpsertBulk
- func (u *PostUpsertBulk) SetSlug(v string) *PostUpsertBulk
- func (u *PostUpsertBulk) SetTitle(v string) *PostUpsertBulk
- func (u *PostUpsertBulk) SetUpdatedAt(v time.Time) *PostUpsertBulk
- func (u *PostUpsertBulk) Update(set func(*PostUpsert)) *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateBody() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateCategoryID() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateCreatedAt() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateDeletedAt() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateFirst() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateNewValues() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdatePinned() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateReplyToPostID() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateRootPostID() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateShort() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateSlug() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateTitle() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateUpdatedAt() *PostUpsertBulk
- type PostUpsertOne
- func (u *PostUpsertOne) ClearCategoryID() *PostUpsertOne
- func (u *PostUpsertOne) ClearDeletedAt() *PostUpsertOne
- func (u *PostUpsertOne) ClearReplyToPostID() *PostUpsertOne
- func (u *PostUpsertOne) ClearRootPostID() *PostUpsertOne
- func (u *PostUpsertOne) ClearSlug() *PostUpsertOne
- func (u *PostUpsertOne) ClearTitle() *PostUpsertOne
- func (u *PostUpsertOne) DoNothing() *PostUpsertOne
- func (u *PostUpsertOne) Exec(ctx context.Context) error
- func (u *PostUpsertOne) ExecX(ctx context.Context)
- func (u *PostUpsertOne) ID(ctx context.Context) (id xid.ID, err error)
- func (u *PostUpsertOne) IDX(ctx context.Context) xid.ID
- func (u *PostUpsertOne) Ignore() *PostUpsertOne
- func (u *PostUpsertOne) SetBody(v string) *PostUpsertOne
- func (u *PostUpsertOne) SetCategoryID(v xid.ID) *PostUpsertOne
- func (u *PostUpsertOne) SetCreatedAt(v time.Time) *PostUpsertOne
- func (u *PostUpsertOne) SetDeletedAt(v time.Time) *PostUpsertOne
- func (u *PostUpsertOne) SetFirst(v bool) *PostUpsertOne
- func (u *PostUpsertOne) SetPinned(v bool) *PostUpsertOne
- func (u *PostUpsertOne) SetReplyToPostID(v xid.ID) *PostUpsertOne
- func (u *PostUpsertOne) SetRootPostID(v xid.ID) *PostUpsertOne
- func (u *PostUpsertOne) SetShort(v string) *PostUpsertOne
- func (u *PostUpsertOne) SetSlug(v string) *PostUpsertOne
- func (u *PostUpsertOne) SetTitle(v string) *PostUpsertOne
- func (u *PostUpsertOne) SetUpdatedAt(v time.Time) *PostUpsertOne
- func (u *PostUpsertOne) Update(set func(*PostUpsert)) *PostUpsertOne
- func (u *PostUpsertOne) UpdateBody() *PostUpsertOne
- func (u *PostUpsertOne) UpdateCategoryID() *PostUpsertOne
- func (u *PostUpsertOne) UpdateCreatedAt() *PostUpsertOne
- func (u *PostUpsertOne) UpdateDeletedAt() *PostUpsertOne
- func (u *PostUpsertOne) UpdateFirst() *PostUpsertOne
- func (u *PostUpsertOne) UpdateNewValues() *PostUpsertOne
- func (u *PostUpsertOne) UpdatePinned() *PostUpsertOne
- func (u *PostUpsertOne) UpdateReplyToPostID() *PostUpsertOne
- func (u *PostUpsertOne) UpdateRootPostID() *PostUpsertOne
- func (u *PostUpsertOne) UpdateShort() *PostUpsertOne
- func (u *PostUpsertOne) UpdateSlug() *PostUpsertOne
- func (u *PostUpsertOne) UpdateTitle() *PostUpsertOne
- func (u *PostUpsertOne) UpdateUpdatedAt() *PostUpsertOne
- type Posts
- type Query
- type React
- type ReactClient
- func (c *ReactClient) Create() *ReactCreate
- func (c *ReactClient) CreateBulk(builders ...*ReactCreate) *ReactCreateBulk
- func (c *ReactClient) Delete() *ReactDelete
- func (c *ReactClient) DeleteOne(r *React) *ReactDeleteOne
- func (c *ReactClient) DeleteOneID(id xid.ID) *ReactDeleteOne
- func (c *ReactClient) Get(ctx context.Context, id xid.ID) (*React, error)
- func (c *ReactClient) GetX(ctx context.Context, id xid.ID) *React
- func (c *ReactClient) Hooks() []Hook
- func (c *ReactClient) Query() *ReactQuery
- func (c *ReactClient) QueryAccount(r *React) *AccountQuery
- func (c *ReactClient) QueryPost(r *React) *PostQuery
- func (c *ReactClient) Update() *ReactUpdate
- func (c *ReactClient) UpdateOne(r *React) *ReactUpdateOne
- func (c *ReactClient) UpdateOneID(id xid.ID) *ReactUpdateOne
- func (c *ReactClient) Use(hooks ...Hook)
- type ReactCreate
- func (rc *ReactCreate) Exec(ctx context.Context) error
- func (rc *ReactCreate) ExecX(ctx context.Context)
- func (rc *ReactCreate) Mutation() *ReactMutation
- func (rc *ReactCreate) OnConflict(opts ...sql.ConflictOption) *ReactUpsertOne
- func (rc *ReactCreate) OnConflictColumns(columns ...string) *ReactUpsertOne
- func (rc *ReactCreate) Save(ctx context.Context) (*React, error)
- func (rc *ReactCreate) SaveX(ctx context.Context) *React
- func (rc *ReactCreate) SetAccount(a *Account) *ReactCreate
- func (rc *ReactCreate) SetAccountID(id xid.ID) *ReactCreate
- func (rc *ReactCreate) SetCreatedAt(t time.Time) *ReactCreate
- func (rc *ReactCreate) SetEmoji(s string) *ReactCreate
- func (rc *ReactCreate) SetID(x xid.ID) *ReactCreate
- func (rc *ReactCreate) SetNillableAccountID(id *xid.ID) *ReactCreate
- func (rc *ReactCreate) SetNillableCreatedAt(t *time.Time) *ReactCreate
- func (rc *ReactCreate) SetNillableID(x *xid.ID) *ReactCreate
- func (rc *ReactCreate) SetNillablePostID(id *xid.ID) *ReactCreate
- func (rc *ReactCreate) SetPost(p *Post) *ReactCreate
- func (rc *ReactCreate) SetPostID(id xid.ID) *ReactCreate
- type ReactCreateBulk
- func (rcb *ReactCreateBulk) Exec(ctx context.Context) error
- func (rcb *ReactCreateBulk) ExecX(ctx context.Context)
- func (rcb *ReactCreateBulk) OnConflict(opts ...sql.ConflictOption) *ReactUpsertBulk
- func (rcb *ReactCreateBulk) OnConflictColumns(columns ...string) *ReactUpsertBulk
- func (rcb *ReactCreateBulk) Save(ctx context.Context) ([]*React, error)
- func (rcb *ReactCreateBulk) SaveX(ctx context.Context) []*React
- type ReactDelete
- type ReactDeleteOne
- type ReactEdges
- type ReactGroupBy
- func (rgb *ReactGroupBy) Aggregate(fns ...AggregateFunc) *ReactGroupBy
- func (s *ReactGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReactGroupBy) BoolX(ctx context.Context) bool
- func (s *ReactGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ReactGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ReactGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReactGroupBy) Float64X(ctx context.Context) float64
- func (s *ReactGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReactGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ReactGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ReactGroupBy) IntX(ctx context.Context) int
- func (s *ReactGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ReactGroupBy) IntsX(ctx context.Context) []int
- func (rgb *ReactGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *ReactGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *ReactGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ReactGroupBy) StringX(ctx context.Context) string
- func (s *ReactGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ReactGroupBy) StringsX(ctx context.Context) []string
- type ReactMutation
- func (m *ReactMutation) AccountCleared() bool
- func (m *ReactMutation) AccountID() (id xid.ID, exists bool)
- func (m *ReactMutation) AccountIDs() (ids []xid.ID)
- func (m *ReactMutation) AddField(name string, value ent.Value) error
- func (m *ReactMutation) AddedEdges() []string
- func (m *ReactMutation) AddedField(name string) (ent.Value, bool)
- func (m *ReactMutation) AddedFields() []string
- func (m *ReactMutation) AddedIDs(name string) []ent.Value
- func (m *ReactMutation) ClearAccount()
- func (m *ReactMutation) ClearEdge(name string) error
- func (m *ReactMutation) ClearField(name string) error
- func (m *ReactMutation) ClearPost()
- func (m *ReactMutation) ClearedEdges() []string
- func (m *ReactMutation) ClearedFields() []string
- func (m ReactMutation) Client() *Client
- func (m *ReactMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ReactMutation) EdgeCleared(name string) bool
- func (m *ReactMutation) Emoji() (r string, exists bool)
- func (m *ReactMutation) Field(name string) (ent.Value, bool)
- func (m *ReactMutation) FieldCleared(name string) bool
- func (m *ReactMutation) Fields() []string
- func (m *ReactMutation) ID() (id xid.ID, exists bool)
- func (m *ReactMutation) IDs(ctx context.Context) ([]xid.ID, error)
- func (m *ReactMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ReactMutation) OldEmoji(ctx context.Context) (v string, err error)
- func (m *ReactMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ReactMutation) Op() Op
- func (m *ReactMutation) PostCleared() bool
- func (m *ReactMutation) PostID() (id xid.ID, exists bool)
- func (m *ReactMutation) PostIDs() (ids []xid.ID)
- func (m *ReactMutation) RemovedEdges() []string
- func (m *ReactMutation) RemovedIDs(name string) []ent.Value
- func (m *ReactMutation) ResetAccount()
- func (m *ReactMutation) ResetCreatedAt()
- func (m *ReactMutation) ResetEdge(name string) error
- func (m *ReactMutation) ResetEmoji()
- func (m *ReactMutation) ResetField(name string) error
- func (m *ReactMutation) ResetPost()
- func (m *ReactMutation) SetAccountID(id xid.ID)
- func (m *ReactMutation) SetCreatedAt(t time.Time)
- func (m *ReactMutation) SetEmoji(s string)
- func (m *ReactMutation) SetField(name string, value ent.Value) error
- func (m *ReactMutation) SetID(id xid.ID)
- func (m *ReactMutation) SetPostID(id xid.ID)
- func (m ReactMutation) Tx() (*Tx, error)
- func (m *ReactMutation) Type() string
- func (m *ReactMutation) Where(ps ...predicate.React)
- type ReactQuery
- func (rq *ReactQuery) All(ctx context.Context) ([]*React, error)
- func (rq *ReactQuery) AllX(ctx context.Context) []*React
- func (rq *ReactQuery) Clone() *ReactQuery
- func (rq *ReactQuery) Count(ctx context.Context) (int, error)
- func (rq *ReactQuery) CountX(ctx context.Context) int
- func (rq *ReactQuery) Exist(ctx context.Context) (bool, error)
- func (rq *ReactQuery) ExistX(ctx context.Context) bool
- func (rq *ReactQuery) First(ctx context.Context) (*React, error)
- func (rq *ReactQuery) FirstID(ctx context.Context) (id xid.ID, err error)
- func (rq *ReactQuery) FirstIDX(ctx context.Context) xid.ID
- func (rq *ReactQuery) FirstX(ctx context.Context) *React
- func (rq *ReactQuery) GroupBy(field string, fields ...string) *ReactGroupBy
- func (rq *ReactQuery) IDs(ctx context.Context) ([]xid.ID, error)
- func (rq *ReactQuery) IDsX(ctx context.Context) []xid.ID
- func (rq *ReactQuery) Limit(limit int) *ReactQuery
- func (rq *ReactQuery) Modify(modifiers ...func(s *sql.Selector)) *ReactSelect
- func (rq *ReactQuery) Offset(offset int) *ReactQuery
- func (rq *ReactQuery) Only(ctx context.Context) (*React, error)
- func (rq *ReactQuery) OnlyID(ctx context.Context) (id xid.ID, err error)
- func (rq *ReactQuery) OnlyIDX(ctx context.Context) xid.ID
- func (rq *ReactQuery) OnlyX(ctx context.Context) *React
- func (rq *ReactQuery) Order(o ...OrderFunc) *ReactQuery
- func (rq *ReactQuery) QueryAccount() *AccountQuery
- func (rq *ReactQuery) QueryPost() *PostQuery
- func (rq *ReactQuery) Select(fields ...string) *ReactSelect
- func (rq *ReactQuery) Unique(unique bool) *ReactQuery
- func (rq *ReactQuery) Where(ps ...predicate.React) *ReactQuery
- func (rq *ReactQuery) WithAccount(opts ...func(*AccountQuery)) *ReactQuery
- func (rq *ReactQuery) WithPost(opts ...func(*PostQuery)) *ReactQuery
- type ReactSelect
- func (s *ReactSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReactSelect) BoolX(ctx context.Context) bool
- func (s *ReactSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ReactSelect) BoolsX(ctx context.Context) []bool
- func (s *ReactSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReactSelect) Float64X(ctx context.Context) float64
- func (s *ReactSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReactSelect) Float64sX(ctx context.Context) []float64
- func (s *ReactSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ReactSelect) IntX(ctx context.Context) int
- func (s *ReactSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ReactSelect) IntsX(ctx context.Context) []int
- func (rs *ReactSelect) Modify(modifiers ...func(s *sql.Selector)) *ReactSelect
- func (rs *ReactSelect) Scan(ctx context.Context, v interface{}) error
- func (s *ReactSelect) ScanX(ctx context.Context, v interface{})
- func (s *ReactSelect) String(ctx context.Context) (_ string, err error)
- func (s *ReactSelect) StringX(ctx context.Context) string
- func (s *ReactSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ReactSelect) StringsX(ctx context.Context) []string
- type ReactUpdate
- func (ru *ReactUpdate) ClearAccount() *ReactUpdate
- func (ru *ReactUpdate) ClearPost() *ReactUpdate
- func (ru *ReactUpdate) Exec(ctx context.Context) error
- func (ru *ReactUpdate) ExecX(ctx context.Context)
- func (ru *ReactUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ReactUpdate
- func (ru *ReactUpdate) Mutation() *ReactMutation
- func (ru *ReactUpdate) Save(ctx context.Context) (int, error)
- func (ru *ReactUpdate) SaveX(ctx context.Context) int
- func (ru *ReactUpdate) SetAccount(a *Account) *ReactUpdate
- func (ru *ReactUpdate) SetAccountID(id xid.ID) *ReactUpdate
- func (ru *ReactUpdate) SetEmoji(s string) *ReactUpdate
- func (ru *ReactUpdate) SetNillableAccountID(id *xid.ID) *ReactUpdate
- func (ru *ReactUpdate) SetNillablePostID(id *xid.ID) *ReactUpdate
- func (ru *ReactUpdate) SetPost(p *Post) *ReactUpdate
- func (ru *ReactUpdate) SetPostID(id xid.ID) *ReactUpdate
- func (ru *ReactUpdate) Where(ps ...predicate.React) *ReactUpdate
- type ReactUpdateOne
- func (ruo *ReactUpdateOne) ClearAccount() *ReactUpdateOne
- func (ruo *ReactUpdateOne) ClearPost() *ReactUpdateOne
- func (ruo *ReactUpdateOne) Exec(ctx context.Context) error
- func (ruo *ReactUpdateOne) ExecX(ctx context.Context)
- func (ruo *ReactUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ReactUpdateOne
- func (ruo *ReactUpdateOne) Mutation() *ReactMutation
- func (ruo *ReactUpdateOne) Save(ctx context.Context) (*React, error)
- func (ruo *ReactUpdateOne) SaveX(ctx context.Context) *React
- func (ruo *ReactUpdateOne) Select(field string, fields ...string) *ReactUpdateOne
- func (ruo *ReactUpdateOne) SetAccount(a *Account) *ReactUpdateOne
- func (ruo *ReactUpdateOne) SetAccountID(id xid.ID) *ReactUpdateOne
- func (ruo *ReactUpdateOne) SetEmoji(s string) *ReactUpdateOne
- func (ruo *ReactUpdateOne) SetNillableAccountID(id *xid.ID) *ReactUpdateOne
- func (ruo *ReactUpdateOne) SetNillablePostID(id *xid.ID) *ReactUpdateOne
- func (ruo *ReactUpdateOne) SetPost(p *Post) *ReactUpdateOne
- func (ruo *ReactUpdateOne) SetPostID(id xid.ID) *ReactUpdateOne
- type ReactUpsert
- type ReactUpsertBulk
- func (u *ReactUpsertBulk) DoNothing() *ReactUpsertBulk
- func (u *ReactUpsertBulk) Exec(ctx context.Context) error
- func (u *ReactUpsertBulk) ExecX(ctx context.Context)
- func (u *ReactUpsertBulk) Ignore() *ReactUpsertBulk
- func (u *ReactUpsertBulk) SetCreatedAt(v time.Time) *ReactUpsertBulk
- func (u *ReactUpsertBulk) SetEmoji(v string) *ReactUpsertBulk
- func (u *ReactUpsertBulk) Update(set func(*ReactUpsert)) *ReactUpsertBulk
- func (u *ReactUpsertBulk) UpdateCreatedAt() *ReactUpsertBulk
- func (u *ReactUpsertBulk) UpdateEmoji() *ReactUpsertBulk
- func (u *ReactUpsertBulk) UpdateNewValues() *ReactUpsertBulk
- type ReactUpsertOne
- func (u *ReactUpsertOne) DoNothing() *ReactUpsertOne
- func (u *ReactUpsertOne) Exec(ctx context.Context) error
- func (u *ReactUpsertOne) ExecX(ctx context.Context)
- func (u *ReactUpsertOne) ID(ctx context.Context) (id xid.ID, err error)
- func (u *ReactUpsertOne) IDX(ctx context.Context) xid.ID
- func (u *ReactUpsertOne) Ignore() *ReactUpsertOne
- func (u *ReactUpsertOne) SetCreatedAt(v time.Time) *ReactUpsertOne
- func (u *ReactUpsertOne) SetEmoji(v string) *ReactUpsertOne
- func (u *ReactUpsertOne) Update(set func(*ReactUpsert)) *ReactUpsertOne
- func (u *ReactUpsertOne) UpdateCreatedAt() *ReactUpsertOne
- func (u *ReactUpsertOne) UpdateEmoji() *ReactUpsertOne
- func (u *ReactUpsertOne) UpdateNewValues() *ReactUpsertOne
- type Reacts
- type Role
- type RoleClient
- func (c *RoleClient) Create() *RoleCreate
- func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk
- func (c *RoleClient) Delete() *RoleDelete
- func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne
- func (c *RoleClient) DeleteOneID(id xid.ID) *RoleDeleteOne
- func (c *RoleClient) Get(ctx context.Context, id xid.ID) (*Role, error)
- func (c *RoleClient) GetX(ctx context.Context, id xid.ID) *Role
- func (c *RoleClient) Hooks() []Hook
- func (c *RoleClient) Query() *RoleQuery
- func (c *RoleClient) QueryAccounts(r *Role) *AccountQuery
- func (c *RoleClient) Update() *RoleUpdate
- func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne
- func (c *RoleClient) UpdateOneID(id xid.ID) *RoleUpdateOne
- func (c *RoleClient) Use(hooks ...Hook)
- type RoleCreate
- func (rc *RoleCreate) AddAccountIDs(ids ...xid.ID) *RoleCreate
- func (rc *RoleCreate) AddAccounts(a ...*Account) *RoleCreate
- func (rc *RoleCreate) Exec(ctx context.Context) error
- func (rc *RoleCreate) ExecX(ctx context.Context)
- func (rc *RoleCreate) Mutation() *RoleMutation
- func (rc *RoleCreate) OnConflict(opts ...sql.ConflictOption) *RoleUpsertOne
- func (rc *RoleCreate) OnConflictColumns(columns ...string) *RoleUpsertOne
- func (rc *RoleCreate) Save(ctx context.Context) (*Role, error)
- func (rc *RoleCreate) SaveX(ctx context.Context) *Role
- func (rc *RoleCreate) SetCreatedAt(t time.Time) *RoleCreate
- func (rc *RoleCreate) SetID(x xid.ID) *RoleCreate
- func (rc *RoleCreate) SetName(s string) *RoleCreate
- func (rc *RoleCreate) SetNillableCreatedAt(t *time.Time) *RoleCreate
- func (rc *RoleCreate) SetNillableID(x *xid.ID) *RoleCreate
- func (rc *RoleCreate) SetNillableUpdatedAt(t *time.Time) *RoleCreate
- func (rc *RoleCreate) SetUpdatedAt(t time.Time) *RoleCreate
- type RoleCreateBulk
- func (rcb *RoleCreateBulk) Exec(ctx context.Context) error
- func (rcb *RoleCreateBulk) ExecX(ctx context.Context)
- func (rcb *RoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *RoleUpsertBulk
- func (rcb *RoleCreateBulk) OnConflictColumns(columns ...string) *RoleUpsertBulk
- func (rcb *RoleCreateBulk) Save(ctx context.Context) ([]*Role, error)
- func (rcb *RoleCreateBulk) SaveX(ctx context.Context) []*Role
- type RoleDelete
- type RoleDeleteOne
- type RoleEdges
- type RoleGroupBy
- func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy
- func (s *RoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleGroupBy) BoolX(ctx context.Context) bool
- func (s *RoleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleGroupBy) Float64X(ctx context.Context) float64
- func (s *RoleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RoleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RoleGroupBy) IntX(ctx context.Context) int
- func (s *RoleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RoleGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RoleGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *RoleGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *RoleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RoleGroupBy) StringX(ctx context.Context) string
- func (s *RoleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RoleGroupBy) StringsX(ctx context.Context) []string
- type RoleMutation
- func (m *RoleMutation) AccountsCleared() bool
- func (m *RoleMutation) AccountsIDs() (ids []xid.ID)
- func (m *RoleMutation) AddAccountIDs(ids ...xid.ID)
- func (m *RoleMutation) AddField(name string, value ent.Value) error
- func (m *RoleMutation) AddedEdges() []string
- func (m *RoleMutation) AddedField(name string) (ent.Value, bool)
- func (m *RoleMutation) AddedFields() []string
- func (m *RoleMutation) AddedIDs(name string) []ent.Value
- func (m *RoleMutation) ClearAccounts()
- func (m *RoleMutation) ClearEdge(name string) error
- func (m *RoleMutation) ClearField(name string) error
- func (m *RoleMutation) ClearedEdges() []string
- func (m *RoleMutation) ClearedFields() []string
- func (m RoleMutation) Client() *Client
- func (m *RoleMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RoleMutation) EdgeCleared(name string) bool
- func (m *RoleMutation) Field(name string) (ent.Value, bool)
- func (m *RoleMutation) FieldCleared(name string) bool
- func (m *RoleMutation) Fields() []string
- func (m *RoleMutation) ID() (id xid.ID, exists bool)
- func (m *RoleMutation) IDs(ctx context.Context) ([]xid.ID, error)
- func (m *RoleMutation) Name() (r string, exists bool)
- func (m *RoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RoleMutation) OldName(ctx context.Context) (v string, err error)
- func (m *RoleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RoleMutation) Op() Op
- func (m *RoleMutation) RemoveAccountIDs(ids ...xid.ID)
- func (m *RoleMutation) RemovedAccountsIDs() (ids []xid.ID)
- func (m *RoleMutation) RemovedEdges() []string
- func (m *RoleMutation) RemovedIDs(name string) []ent.Value
- func (m *RoleMutation) ResetAccounts()
- func (m *RoleMutation) ResetCreatedAt()
- func (m *RoleMutation) ResetEdge(name string) error
- func (m *RoleMutation) ResetField(name string) error
- func (m *RoleMutation) ResetName()
- func (m *RoleMutation) ResetUpdatedAt()
- func (m *RoleMutation) SetCreatedAt(t time.Time)
- func (m *RoleMutation) SetField(name string, value ent.Value) error
- func (m *RoleMutation) SetID(id xid.ID)
- func (m *RoleMutation) SetName(s string)
- func (m *RoleMutation) SetUpdatedAt(t time.Time)
- func (m RoleMutation) Tx() (*Tx, error)
- func (m *RoleMutation) Type() string
- func (m *RoleMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *RoleMutation) Where(ps ...predicate.Role)
- type RoleQuery
- func (rq *RoleQuery) All(ctx context.Context) ([]*Role, error)
- func (rq *RoleQuery) AllX(ctx context.Context) []*Role
- func (rq *RoleQuery) Clone() *RoleQuery
- func (rq *RoleQuery) Count(ctx context.Context) (int, error)
- func (rq *RoleQuery) CountX(ctx context.Context) int
- func (rq *RoleQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RoleQuery) ExistX(ctx context.Context) bool
- func (rq *RoleQuery) First(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) FirstID(ctx context.Context) (id xid.ID, err error)
- func (rq *RoleQuery) FirstIDX(ctx context.Context) xid.ID
- func (rq *RoleQuery) FirstX(ctx context.Context) *Role
- func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy
- func (rq *RoleQuery) IDs(ctx context.Context) ([]xid.ID, error)
- func (rq *RoleQuery) IDsX(ctx context.Context) []xid.ID
- func (rq *RoleQuery) Limit(limit int) *RoleQuery
- func (rq *RoleQuery) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect
- func (rq *RoleQuery) Offset(offset int) *RoleQuery
- func (rq *RoleQuery) Only(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) OnlyID(ctx context.Context) (id xid.ID, err error)
- func (rq *RoleQuery) OnlyIDX(ctx context.Context) xid.ID
- func (rq *RoleQuery) OnlyX(ctx context.Context) *Role
- func (rq *RoleQuery) Order(o ...OrderFunc) *RoleQuery
- func (rq *RoleQuery) QueryAccounts() *AccountQuery
- func (rq *RoleQuery) Select(fields ...string) *RoleSelect
- func (rq *RoleQuery) Unique(unique bool) *RoleQuery
- func (rq *RoleQuery) Where(ps ...predicate.Role) *RoleQuery
- func (rq *RoleQuery) WithAccounts(opts ...func(*AccountQuery)) *RoleQuery
- type RoleSelect
- func (s *RoleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleSelect) BoolX(ctx context.Context) bool
- func (s *RoleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleSelect) BoolsX(ctx context.Context) []bool
- func (s *RoleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleSelect) Float64X(ctx context.Context) float64
- func (s *RoleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleSelect) Float64sX(ctx context.Context) []float64
- func (s *RoleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RoleSelect) IntX(ctx context.Context) int
- func (s *RoleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RoleSelect) IntsX(ctx context.Context) []int
- func (rs *RoleSelect) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect
- func (rs *RoleSelect) Scan(ctx context.Context, v interface{}) error
- func (s *RoleSelect) ScanX(ctx context.Context, v interface{})
- func (s *RoleSelect) String(ctx context.Context) (_ string, err error)
- func (s *RoleSelect) StringX(ctx context.Context) string
- func (s *RoleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RoleSelect) StringsX(ctx context.Context) []string
- type RoleUpdate
- func (ru *RoleUpdate) AddAccountIDs(ids ...xid.ID) *RoleUpdate
- func (ru *RoleUpdate) AddAccounts(a ...*Account) *RoleUpdate
- func (ru *RoleUpdate) ClearAccounts() *RoleUpdate
- func (ru *RoleUpdate) Exec(ctx context.Context) error
- func (ru *RoleUpdate) ExecX(ctx context.Context)
- func (ru *RoleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdate
- func (ru *RoleUpdate) Mutation() *RoleMutation
- func (ru *RoleUpdate) RemoveAccountIDs(ids ...xid.ID) *RoleUpdate
- func (ru *RoleUpdate) RemoveAccounts(a ...*Account) *RoleUpdate
- func (ru *RoleUpdate) Save(ctx context.Context) (int, error)
- func (ru *RoleUpdate) SaveX(ctx context.Context) int
- func (ru *RoleUpdate) SetName(s string) *RoleUpdate
- func (ru *RoleUpdate) SetUpdatedAt(t time.Time) *RoleUpdate
- func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate
- type RoleUpdateOne
- func (ruo *RoleUpdateOne) AddAccountIDs(ids ...xid.ID) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddAccounts(a ...*Account) *RoleUpdateOne
- func (ruo *RoleUpdateOne) ClearAccounts() *RoleUpdateOne
- func (ruo *RoleUpdateOne) Exec(ctx context.Context) error
- func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
- func (ruo *RoleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdateOne
- func (ruo *RoleUpdateOne) Mutation() *RoleMutation
- func (ruo *RoleUpdateOne) RemoveAccountIDs(ids ...xid.ID) *RoleUpdateOne
- func (ruo *RoleUpdateOne) RemoveAccounts(a ...*Account) *RoleUpdateOne
- func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)
- func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role
- func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetName(s string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetUpdatedAt(t time.Time) *RoleUpdateOne
- type RoleUpsert
- func (u *RoleUpsert) SetCreatedAt(v time.Time) *RoleUpsert
- func (u *RoleUpsert) SetName(v string) *RoleUpsert
- func (u *RoleUpsert) SetUpdatedAt(v time.Time) *RoleUpsert
- func (u *RoleUpsert) UpdateCreatedAt() *RoleUpsert
- func (u *RoleUpsert) UpdateName() *RoleUpsert
- func (u *RoleUpsert) UpdateUpdatedAt() *RoleUpsert
- type RoleUpsertBulk
- func (u *RoleUpsertBulk) DoNothing() *RoleUpsertBulk
- func (u *RoleUpsertBulk) Exec(ctx context.Context) error
- func (u *RoleUpsertBulk) ExecX(ctx context.Context)
- func (u *RoleUpsertBulk) Ignore() *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetCreatedAt(v time.Time) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetName(v string) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetUpdatedAt(v time.Time) *RoleUpsertBulk
- func (u *RoleUpsertBulk) Update(set func(*RoleUpsert)) *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateCreatedAt() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateName() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateNewValues() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateUpdatedAt() *RoleUpsertBulk
- type RoleUpsertOne
- func (u *RoleUpsertOne) DoNothing() *RoleUpsertOne
- func (u *RoleUpsertOne) Exec(ctx context.Context) error
- func (u *RoleUpsertOne) ExecX(ctx context.Context)
- func (u *RoleUpsertOne) ID(ctx context.Context) (id xid.ID, err error)
- func (u *RoleUpsertOne) IDX(ctx context.Context) xid.ID
- func (u *RoleUpsertOne) Ignore() *RoleUpsertOne
- func (u *RoleUpsertOne) SetCreatedAt(v time.Time) *RoleUpsertOne
- func (u *RoleUpsertOne) SetName(v string) *RoleUpsertOne
- func (u *RoleUpsertOne) SetUpdatedAt(v time.Time) *RoleUpsertOne
- func (u *RoleUpsertOne) Update(set func(*RoleUpsert)) *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateCreatedAt() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateName() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateNewValues() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateUpdatedAt() *RoleUpsertOne
- type Roles
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Subscription
- type SubscriptionClient
- func (c *SubscriptionClient) Create() *SubscriptionCreate
- func (c *SubscriptionClient) CreateBulk(builders ...*SubscriptionCreate) *SubscriptionCreateBulk
- func (c *SubscriptionClient) Delete() *SubscriptionDelete
- func (c *SubscriptionClient) DeleteOne(s *Subscription) *SubscriptionDeleteOne
- func (c *SubscriptionClient) DeleteOneID(id xid.ID) *SubscriptionDeleteOne
- func (c *SubscriptionClient) Get(ctx context.Context, id xid.ID) (*Subscription, error)
- func (c *SubscriptionClient) GetX(ctx context.Context, id xid.ID) *Subscription
- func (c *SubscriptionClient) Hooks() []Hook
- func (c *SubscriptionClient) Query() *SubscriptionQuery
- func (c *SubscriptionClient) QueryAccount(s *Subscription) *AccountQuery
- func (c *SubscriptionClient) QueryNotifications(s *Subscription) *NotificationQuery
- func (c *SubscriptionClient) Update() *SubscriptionUpdate
- func (c *SubscriptionClient) UpdateOne(s *Subscription) *SubscriptionUpdateOne
- func (c *SubscriptionClient) UpdateOneID(id xid.ID) *SubscriptionUpdateOne
- func (c *SubscriptionClient) Use(hooks ...Hook)
- type SubscriptionCreate
- func (sc *SubscriptionCreate) AddNotificationIDs(ids ...xid.ID) *SubscriptionCreate
- func (sc *SubscriptionCreate) AddNotifications(n ...*Notification) *SubscriptionCreate
- func (sc *SubscriptionCreate) Exec(ctx context.Context) error
- func (sc *SubscriptionCreate) ExecX(ctx context.Context)
- func (sc *SubscriptionCreate) Mutation() *SubscriptionMutation
- func (sc *SubscriptionCreate) OnConflict(opts ...sql.ConflictOption) *SubscriptionUpsertOne
- func (sc *SubscriptionCreate) OnConflictColumns(columns ...string) *SubscriptionUpsertOne
- func (sc *SubscriptionCreate) Save(ctx context.Context) (*Subscription, error)
- func (sc *SubscriptionCreate) SaveX(ctx context.Context) *Subscription
- func (sc *SubscriptionCreate) SetAccount(a *Account) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetAccountID(id xid.ID) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetCreatedAt(t time.Time) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetID(x xid.ID) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetNillableAccountID(id *xid.ID) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetNillableCreatedAt(t *time.Time) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetNillableID(x *xid.ID) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetRefersTo(s string) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetRefersType(s string) *SubscriptionCreate
- type SubscriptionCreateBulk
- func (scb *SubscriptionCreateBulk) Exec(ctx context.Context) error
- func (scb *SubscriptionCreateBulk) ExecX(ctx context.Context)
- func (scb *SubscriptionCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubscriptionUpsertBulk
- func (scb *SubscriptionCreateBulk) OnConflictColumns(columns ...string) *SubscriptionUpsertBulk
- func (scb *SubscriptionCreateBulk) Save(ctx context.Context) ([]*Subscription, error)
- func (scb *SubscriptionCreateBulk) SaveX(ctx context.Context) []*Subscription
- type SubscriptionDelete
- type SubscriptionDeleteOne
- type SubscriptionEdges
- type SubscriptionGroupBy
- func (sgb *SubscriptionGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionGroupBy
- func (s *SubscriptionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscriptionGroupBy) BoolX(ctx context.Context) bool
- func (s *SubscriptionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscriptionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SubscriptionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscriptionGroupBy) Float64X(ctx context.Context) float64
- func (s *SubscriptionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscriptionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SubscriptionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SubscriptionGroupBy) IntX(ctx context.Context) int
- func (s *SubscriptionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SubscriptionGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SubscriptionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *SubscriptionGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *SubscriptionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SubscriptionGroupBy) StringX(ctx context.Context) string
- func (s *SubscriptionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SubscriptionGroupBy) StringsX(ctx context.Context) []string
- type SubscriptionMutation
- func (m *SubscriptionMutation) AccountCleared() bool
- func (m *SubscriptionMutation) AccountID() (id xid.ID, exists bool)
- func (m *SubscriptionMutation) AccountIDs() (ids []xid.ID)
- func (m *SubscriptionMutation) AddField(name string, value ent.Value) error
- func (m *SubscriptionMutation) AddNotificationIDs(ids ...xid.ID)
- func (m *SubscriptionMutation) AddedEdges() []string
- func (m *SubscriptionMutation) AddedField(name string) (ent.Value, bool)
- func (m *SubscriptionMutation) AddedFields() []string
- func (m *SubscriptionMutation) AddedIDs(name string) []ent.Value
- func (m *SubscriptionMutation) ClearAccount()
- func (m *SubscriptionMutation) ClearEdge(name string) error
- func (m *SubscriptionMutation) ClearField(name string) error
- func (m *SubscriptionMutation) ClearNotifications()
- func (m *SubscriptionMutation) ClearedEdges() []string
- func (m *SubscriptionMutation) ClearedFields() []string
- func (m SubscriptionMutation) Client() *Client
- func (m *SubscriptionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SubscriptionMutation) EdgeCleared(name string) bool
- func (m *SubscriptionMutation) Field(name string) (ent.Value, bool)
- func (m *SubscriptionMutation) FieldCleared(name string) bool
- func (m *SubscriptionMutation) Fields() []string
- func (m *SubscriptionMutation) ID() (id xid.ID, exists bool)
- func (m *SubscriptionMutation) IDs(ctx context.Context) ([]xid.ID, error)
- func (m *SubscriptionMutation) NotificationsCleared() bool
- func (m *SubscriptionMutation) NotificationsIDs() (ids []xid.ID)
- func (m *SubscriptionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SubscriptionMutation) OldRefersTo(ctx context.Context) (v string, err error)
- func (m *SubscriptionMutation) OldRefersType(ctx context.Context) (v string, err error)
- func (m *SubscriptionMutation) Op() Op
- func (m *SubscriptionMutation) RefersTo() (r string, exists bool)
- func (m *SubscriptionMutation) RefersType() (r string, exists bool)
- func (m *SubscriptionMutation) RemoveNotificationIDs(ids ...xid.ID)
- func (m *SubscriptionMutation) RemovedEdges() []string
- func (m *SubscriptionMutation) RemovedIDs(name string) []ent.Value
- func (m *SubscriptionMutation) RemovedNotificationsIDs() (ids []xid.ID)
- func (m *SubscriptionMutation) ResetAccount()
- func (m *SubscriptionMutation) ResetCreatedAt()
- func (m *SubscriptionMutation) ResetEdge(name string) error
- func (m *SubscriptionMutation) ResetField(name string) error
- func (m *SubscriptionMutation) ResetNotifications()
- func (m *SubscriptionMutation) ResetRefersTo()
- func (m *SubscriptionMutation) ResetRefersType()
- func (m *SubscriptionMutation) SetAccountID(id xid.ID)
- func (m *SubscriptionMutation) SetCreatedAt(t time.Time)
- func (m *SubscriptionMutation) SetField(name string, value ent.Value) error
- func (m *SubscriptionMutation) SetID(id xid.ID)
- func (m *SubscriptionMutation) SetRefersTo(s string)
- func (m *SubscriptionMutation) SetRefersType(s string)
- func (m SubscriptionMutation) Tx() (*Tx, error)
- func (m *SubscriptionMutation) Type() string
- func (m *SubscriptionMutation) Where(ps ...predicate.Subscription)
- type SubscriptionQuery
- func (sq *SubscriptionQuery) All(ctx context.Context) ([]*Subscription, error)
- func (sq *SubscriptionQuery) AllX(ctx context.Context) []*Subscription
- func (sq *SubscriptionQuery) Clone() *SubscriptionQuery
- func (sq *SubscriptionQuery) Count(ctx context.Context) (int, error)
- func (sq *SubscriptionQuery) CountX(ctx context.Context) int
- func (sq *SubscriptionQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SubscriptionQuery) ExistX(ctx context.Context) bool
- func (sq *SubscriptionQuery) First(ctx context.Context) (*Subscription, error)
- func (sq *SubscriptionQuery) FirstID(ctx context.Context) (id xid.ID, err error)
- func (sq *SubscriptionQuery) FirstIDX(ctx context.Context) xid.ID
- func (sq *SubscriptionQuery) FirstX(ctx context.Context) *Subscription
- func (sq *SubscriptionQuery) GroupBy(field string, fields ...string) *SubscriptionGroupBy
- func (sq *SubscriptionQuery) IDs(ctx context.Context) ([]xid.ID, error)
- func (sq *SubscriptionQuery) IDsX(ctx context.Context) []xid.ID
- func (sq *SubscriptionQuery) Limit(limit int) *SubscriptionQuery
- func (sq *SubscriptionQuery) Modify(modifiers ...func(s *sql.Selector)) *SubscriptionSelect
- func (sq *SubscriptionQuery) Offset(offset int) *SubscriptionQuery
- func (sq *SubscriptionQuery) Only(ctx context.Context) (*Subscription, error)
- func (sq *SubscriptionQuery) OnlyID(ctx context.Context) (id xid.ID, err error)
- func (sq *SubscriptionQuery) OnlyIDX(ctx context.Context) xid.ID
- func (sq *SubscriptionQuery) OnlyX(ctx context.Context) *Subscription
- func (sq *SubscriptionQuery) Order(o ...OrderFunc) *SubscriptionQuery
- func (sq *SubscriptionQuery) QueryAccount() *AccountQuery
- func (sq *SubscriptionQuery) QueryNotifications() *NotificationQuery
- func (sq *SubscriptionQuery) Select(fields ...string) *SubscriptionSelect
- func (sq *SubscriptionQuery) Unique(unique bool) *SubscriptionQuery
- func (sq *SubscriptionQuery) Where(ps ...predicate.Subscription) *SubscriptionQuery
- func (sq *SubscriptionQuery) WithAccount(opts ...func(*AccountQuery)) *SubscriptionQuery
- func (sq *SubscriptionQuery) WithNotifications(opts ...func(*NotificationQuery)) *SubscriptionQuery
- type SubscriptionSelect
- func (s *SubscriptionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscriptionSelect) BoolX(ctx context.Context) bool
- func (s *SubscriptionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscriptionSelect) BoolsX(ctx context.Context) []bool
- func (s *SubscriptionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscriptionSelect) Float64X(ctx context.Context) float64
- func (s *SubscriptionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscriptionSelect) Float64sX(ctx context.Context) []float64
- func (s *SubscriptionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SubscriptionSelect) IntX(ctx context.Context) int
- func (s *SubscriptionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SubscriptionSelect) IntsX(ctx context.Context) []int
- func (ss *SubscriptionSelect) Modify(modifiers ...func(s *sql.Selector)) *SubscriptionSelect
- func (ss *SubscriptionSelect) Scan(ctx context.Context, v interface{}) error
- func (s *SubscriptionSelect) ScanX(ctx context.Context, v interface{})
- func (s *SubscriptionSelect) String(ctx context.Context) (_ string, err error)
- func (s *SubscriptionSelect) StringX(ctx context.Context) string
- func (s *SubscriptionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SubscriptionSelect) StringsX(ctx context.Context) []string
- type SubscriptionUpdate
- func (su *SubscriptionUpdate) AddNotificationIDs(ids ...xid.ID) *SubscriptionUpdate
- func (su *SubscriptionUpdate) AddNotifications(n ...*Notification) *SubscriptionUpdate
- func (su *SubscriptionUpdate) ClearAccount() *SubscriptionUpdate
- func (su *SubscriptionUpdate) ClearNotifications() *SubscriptionUpdate
- func (su *SubscriptionUpdate) Exec(ctx context.Context) error
- func (su *SubscriptionUpdate) ExecX(ctx context.Context)
- func (su *SubscriptionUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SubscriptionUpdate
- func (su *SubscriptionUpdate) Mutation() *SubscriptionMutation
- func (su *SubscriptionUpdate) RemoveNotificationIDs(ids ...xid.ID) *SubscriptionUpdate
- func (su *SubscriptionUpdate) RemoveNotifications(n ...*Notification) *SubscriptionUpdate
- func (su *SubscriptionUpdate) Save(ctx context.Context) (int, error)
- func (su *SubscriptionUpdate) SaveX(ctx context.Context) int
- func (su *SubscriptionUpdate) SetAccount(a *Account) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetAccountID(id xid.ID) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetNillableAccountID(id *xid.ID) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetRefersTo(s string) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetRefersType(s string) *SubscriptionUpdate
- func (su *SubscriptionUpdate) Where(ps ...predicate.Subscription) *SubscriptionUpdate
- type SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) AddNotificationIDs(ids ...xid.ID) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) AddNotifications(n ...*Notification) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) ClearAccount() *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) ClearNotifications() *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) Exec(ctx context.Context) error
- func (suo *SubscriptionUpdateOne) ExecX(ctx context.Context)
- func (suo *SubscriptionUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) Mutation() *SubscriptionMutation
- func (suo *SubscriptionUpdateOne) RemoveNotificationIDs(ids ...xid.ID) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) RemoveNotifications(n ...*Notification) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) Save(ctx context.Context) (*Subscription, error)
- func (suo *SubscriptionUpdateOne) SaveX(ctx context.Context) *Subscription
- func (suo *SubscriptionUpdateOne) Select(field string, fields ...string) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetAccount(a *Account) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetAccountID(id xid.ID) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetNillableAccountID(id *xid.ID) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetRefersTo(s string) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetRefersType(s string) *SubscriptionUpdateOne
- type SubscriptionUpsert
- func (u *SubscriptionUpsert) SetCreatedAt(v time.Time) *SubscriptionUpsert
- func (u *SubscriptionUpsert) SetRefersTo(v string) *SubscriptionUpsert
- func (u *SubscriptionUpsert) SetRefersType(v string) *SubscriptionUpsert
- func (u *SubscriptionUpsert) UpdateCreatedAt() *SubscriptionUpsert
- func (u *SubscriptionUpsert) UpdateRefersTo() *SubscriptionUpsert
- func (u *SubscriptionUpsert) UpdateRefersType() *SubscriptionUpsert
- type SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) DoNothing() *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) Exec(ctx context.Context) error
- func (u *SubscriptionUpsertBulk) ExecX(ctx context.Context)
- func (u *SubscriptionUpsertBulk) Ignore() *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) SetCreatedAt(v time.Time) *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) SetRefersTo(v string) *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) SetRefersType(v string) *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) Update(set func(*SubscriptionUpsert)) *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) UpdateCreatedAt() *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) UpdateNewValues() *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) UpdateRefersTo() *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) UpdateRefersType() *SubscriptionUpsertBulk
- type SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) DoNothing() *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) Exec(ctx context.Context) error
- func (u *SubscriptionUpsertOne) ExecX(ctx context.Context)
- func (u *SubscriptionUpsertOne) ID(ctx context.Context) (id xid.ID, err error)
- func (u *SubscriptionUpsertOne) IDX(ctx context.Context) xid.ID
- func (u *SubscriptionUpsertOne) Ignore() *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) SetCreatedAt(v time.Time) *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) SetRefersTo(v string) *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) SetRefersType(v string) *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) Update(set func(*SubscriptionUpsert)) *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) UpdateCreatedAt() *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) UpdateNewValues() *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) UpdateRefersTo() *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) UpdateRefersType() *SubscriptionUpsertOne
- type Subscriptions
- type Tag
- type TagClient
- func (c *TagClient) Create() *TagCreate
- func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
- func (c *TagClient) Delete() *TagDelete
- func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
- func (c *TagClient) DeleteOneID(id xid.ID) *TagDeleteOne
- func (c *TagClient) Get(ctx context.Context, id xid.ID) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id xid.ID) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryAccounts(t *Tag) *AccountQuery
- func (c *TagClient) QueryPosts(t *Tag) *PostQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id xid.ID) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagCreate
- func (tc *TagCreate) AddAccountIDs(ids ...xid.ID) *TagCreate
- func (tc *TagCreate) AddAccounts(a ...*Account) *TagCreate
- func (tc *TagCreate) AddPostIDs(ids ...xid.ID) *TagCreate
- func (tc *TagCreate) AddPosts(p ...*Post) *TagCreate
- func (tc *TagCreate) Exec(ctx context.Context) error
- func (tc *TagCreate) ExecX(ctx context.Context)
- func (tc *TagCreate) Mutation() *TagMutation
- func (tc *TagCreate) OnConflict(opts ...sql.ConflictOption) *TagUpsertOne
- func (tc *TagCreate) OnConflictColumns(columns ...string) *TagUpsertOne
- func (tc *TagCreate) Save(ctx context.Context) (*Tag, error)
- func (tc *TagCreate) SaveX(ctx context.Context) *Tag
- func (tc *TagCreate) SetCreatedAt(t time.Time) *TagCreate
- func (tc *TagCreate) SetID(x xid.ID) *TagCreate
- func (tc *TagCreate) SetName(s string) *TagCreate
- func (tc *TagCreate) SetNillableCreatedAt(t *time.Time) *TagCreate
- func (tc *TagCreate) SetNillableID(x *xid.ID) *TagCreate
- type TagCreateBulk
- func (tcb *TagCreateBulk) Exec(ctx context.Context) error
- func (tcb *TagCreateBulk) ExecX(ctx context.Context)
- func (tcb *TagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TagUpsertBulk
- func (tcb *TagCreateBulk) OnConflictColumns(columns ...string) *TagUpsertBulk
- func (tcb *TagCreateBulk) Save(ctx context.Context) ([]*Tag, error)
- func (tcb *TagCreateBulk) SaveX(ctx context.Context) []*Tag
- type TagDelete
- type TagDeleteOne
- type TagEdges
- type TagGroupBy
- func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
- func (s *TagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagGroupBy) BoolX(ctx context.Context) bool
- func (s *TagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagGroupBy) Float64X(ctx context.Context) float64
- func (s *TagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TagGroupBy) IntX(ctx context.Context) int
- func (s *TagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TagGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TagGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *TagGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *TagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TagGroupBy) StringX(ctx context.Context) string
- func (s *TagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TagGroupBy) StringsX(ctx context.Context) []string
- type TagMutation
- func (m *TagMutation) AccountsCleared() bool
- func (m *TagMutation) AccountsIDs() (ids []xid.ID)
- func (m *TagMutation) AddAccountIDs(ids ...xid.ID)
- func (m *TagMutation) AddField(name string, value ent.Value) error
- func (m *TagMutation) AddPostIDs(ids ...xid.ID)
- func (m *TagMutation) AddedEdges() []string
- func (m *TagMutation) AddedField(name string) (ent.Value, bool)
- func (m *TagMutation) AddedFields() []string
- func (m *TagMutation) AddedIDs(name string) []ent.Value
- func (m *TagMutation) ClearAccounts()
- func (m *TagMutation) ClearEdge(name string) error
- func (m *TagMutation) ClearField(name string) error
- func (m *TagMutation) ClearPosts()
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TagMutation) EdgeCleared(name string) bool
- func (m *TagMutation) Field(name string) (ent.Value, bool)
- func (m *TagMutation) FieldCleared(name string) bool
- func (m *TagMutation) Fields() []string
- func (m *TagMutation) ID() (id xid.ID, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]xid.ID, error)
- func (m *TagMutation) Name() (r string, exists bool)
- func (m *TagMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TagMutation) Op() Op
- func (m *TagMutation) PostsCleared() bool
- func (m *TagMutation) PostsIDs() (ids []xid.ID)
- func (m *TagMutation) RemoveAccountIDs(ids ...xid.ID)
- func (m *TagMutation) RemovePostIDs(ids ...xid.ID)
- func (m *TagMutation) RemovedAccountsIDs() (ids []xid.ID)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) RemovedPostsIDs() (ids []xid.ID)
- func (m *TagMutation) ResetAccounts()
- func (m *TagMutation) ResetCreatedAt()
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetName()
- func (m *TagMutation) ResetPosts()
- func (m *TagMutation) SetCreatedAt(t time.Time)
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetID(id xid.ID)
- func (m *TagMutation) SetName(s string)
- func (m TagMutation) Tx() (*Tx, error)
- func (m *TagMutation) Type() string
- func (m *TagMutation) Where(ps ...predicate.Tag)
- type TagQuery
- func (tq *TagQuery) All(ctx context.Context) ([]*Tag, error)
- func (tq *TagQuery) AllX(ctx context.Context) []*Tag
- func (tq *TagQuery) Clone() *TagQuery
- func (tq *TagQuery) Count(ctx context.Context) (int, error)
- func (tq *TagQuery) CountX(ctx context.Context) int
- func (tq *TagQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TagQuery) ExistX(ctx context.Context) bool
- func (tq *TagQuery) First(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) FirstID(ctx context.Context) (id xid.ID, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) xid.ID
- func (tq *TagQuery) FirstX(ctx context.Context) *Tag
- func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
- func (tq *TagQuery) IDs(ctx context.Context) ([]xid.ID, error)
- func (tq *TagQuery) IDsX(ctx context.Context) []xid.ID
- func (tq *TagQuery) Limit(limit int) *TagQuery
- func (tq *TagQuery) Modify(modifiers ...func(s *sql.Selector)) *TagSelect
- func (tq *TagQuery) Offset(offset int) *TagQuery
- func (tq *TagQuery) Only(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) OnlyID(ctx context.Context) (id xid.ID, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) xid.ID
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...OrderFunc) *TagQuery
- func (tq *TagQuery) QueryAccounts() *AccountQuery
- func (tq *TagQuery) QueryPosts() *PostQuery
- func (tq *TagQuery) Select(fields ...string) *TagSelect
- func (tq *TagQuery) Unique(unique bool) *TagQuery
- func (tq *TagQuery) Where(ps ...predicate.Tag) *TagQuery
- func (tq *TagQuery) WithAccounts(opts ...func(*AccountQuery)) *TagQuery
- func (tq *TagQuery) WithPosts(opts ...func(*PostQuery)) *TagQuery
- type TagSelect
- func (s *TagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagSelect) BoolX(ctx context.Context) bool
- func (s *TagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TagSelect) BoolsX(ctx context.Context) []bool
- func (s *TagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagSelect) Float64X(ctx context.Context) float64
- func (s *TagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagSelect) Float64sX(ctx context.Context) []float64
- func (s *TagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TagSelect) IntX(ctx context.Context) int
- func (s *TagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TagSelect) IntsX(ctx context.Context) []int
- func (ts *TagSelect) Modify(modifiers ...func(s *sql.Selector)) *TagSelect
- func (ts *TagSelect) Scan(ctx context.Context, v interface{}) error
- func (s *TagSelect) ScanX(ctx context.Context, v interface{})
- func (s *TagSelect) String(ctx context.Context) (_ string, err error)
- func (s *TagSelect) StringX(ctx context.Context) string
- func (s *TagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TagSelect) StringsX(ctx context.Context) []string
- type TagUpdate
- func (tu *TagUpdate) AddAccountIDs(ids ...xid.ID) *TagUpdate
- func (tu *TagUpdate) AddAccounts(a ...*Account) *TagUpdate
- func (tu *TagUpdate) AddPostIDs(ids ...xid.ID) *TagUpdate
- func (tu *TagUpdate) AddPosts(p ...*Post) *TagUpdate
- func (tu *TagUpdate) ClearAccounts() *TagUpdate
- func (tu *TagUpdate) ClearPosts() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TagUpdate
- func (tu *TagUpdate) Mutation() *TagMutation
- func (tu *TagUpdate) RemoveAccountIDs(ids ...xid.ID) *TagUpdate
- func (tu *TagUpdate) RemoveAccounts(a ...*Account) *TagUpdate
- func (tu *TagUpdate) RemovePostIDs(ids ...xid.ID) *TagUpdate
- func (tu *TagUpdate) RemovePosts(p ...*Post) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddAccountIDs(ids ...xid.ID) *TagUpdateOne
- func (tuo *TagUpdateOne) AddAccounts(a ...*Account) *TagUpdateOne
- func (tuo *TagUpdateOne) AddPostIDs(ids ...xid.ID) *TagUpdateOne
- func (tuo *TagUpdateOne) AddPosts(p ...*Post) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearAccounts() *TagUpdateOne
- func (tuo *TagUpdateOne) ClearPosts() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TagUpdateOne
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (tuo *TagUpdateOne) RemoveAccountIDs(ids ...xid.ID) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveAccounts(a ...*Account) *TagUpdateOne
- func (tuo *TagUpdateOne) RemovePostIDs(ids ...xid.ID) *TagUpdateOne
- func (tuo *TagUpdateOne) RemovePosts(p ...*Post) *TagUpdateOne
- func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
- func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
- func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
- type TagUpsert
- type TagUpsertBulk
- func (u *TagUpsertBulk) DoNothing() *TagUpsertBulk
- func (u *TagUpsertBulk) Exec(ctx context.Context) error
- func (u *TagUpsertBulk) ExecX(ctx context.Context)
- func (u *TagUpsertBulk) Ignore() *TagUpsertBulk
- func (u *TagUpsertBulk) SetCreatedAt(v time.Time) *TagUpsertBulk
- func (u *TagUpsertBulk) SetName(v string) *TagUpsertBulk
- func (u *TagUpsertBulk) Update(set func(*TagUpsert)) *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateCreatedAt() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateName() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateNewValues() *TagUpsertBulk
- type TagUpsertOne
- func (u *TagUpsertOne) DoNothing() *TagUpsertOne
- func (u *TagUpsertOne) Exec(ctx context.Context) error
- func (u *TagUpsertOne) ExecX(ctx context.Context)
- func (u *TagUpsertOne) ID(ctx context.Context) (id xid.ID, err error)
- func (u *TagUpsertOne) IDX(ctx context.Context) xid.ID
- func (u *TagUpsertOne) Ignore() *TagUpsertOne
- func (u *TagUpsertOne) SetCreatedAt(v time.Time) *TagUpsertOne
- func (u *TagUpsertOne) SetName(v string) *TagUpsertOne
- func (u *TagUpsertOne) Update(set func(*TagUpsert)) *TagUpsertOne
- func (u *TagUpsertOne) UpdateCreatedAt() *TagUpsertOne
- func (u *TagUpsertOne) UpdateName() *TagUpsertOne
- func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne
- type Tags
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAccount = "Account" TypeAuthentication = "Authentication" TypeCategory = "Category" TypeNotification = "Notification" TypePost = "Post" TypeReact = "React" TypeRole = "Role" TypeSubscription = "Subscription" TypeTag = "Tag" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Account ¶
type Account struct { // ID of the ent. ID xid.ID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt *time.Time `json:"deleted_at,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Bio holds the value of the "bio" field. Bio string `json:"bio,omitempty"` // Admin holds the value of the "admin" field. Admin bool `json:"admin,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AccountQuery when eager-loading is set. Edges AccountEdges `json:"edges"` // contains filtered or unexported fields }
Account is the model entity for the Account schema.
func (*Account) QueryAuthentication ¶
func (a *Account) QueryAuthentication() *AuthenticationQuery
QueryAuthentication queries the "authentication" edge of the Account entity.
func (*Account) QueryPosts ¶
QueryPosts queries the "posts" edge of the Account entity.
func (*Account) QueryReacts ¶
func (a *Account) QueryReacts() *ReactQuery
QueryReacts queries the "reacts" edge of the Account entity.
func (*Account) QueryRoles ¶
QueryRoles queries the "roles" edge of the Account entity.
func (*Account) QuerySubscriptions ¶
func (a *Account) QuerySubscriptions() *SubscriptionQuery
QuerySubscriptions queries the "subscriptions" edge of the Account entity.
func (*Account) Unwrap ¶
Unwrap unwraps the Account entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Account) Update ¶
func (a *Account) Update() *AccountUpdateOne
Update returns a builder for updating this Account. Note that you need to call Account.Unwrap() before calling this method if this Account was returned from a transaction, and the transaction was committed or rolled back.
type AccountClient ¶
type AccountClient struct {
// contains filtered or unexported fields
}
AccountClient is a client for the Account schema.
func NewAccountClient ¶
func NewAccountClient(c config) *AccountClient
NewAccountClient returns a client for the Account from the given config.
func (*AccountClient) Create ¶
func (c *AccountClient) Create() *AccountCreate
Create returns a builder for creating a Account entity.
func (*AccountClient) CreateBulk ¶
func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk
CreateBulk returns a builder for creating a bulk of Account entities.
func (*AccountClient) Delete ¶
func (c *AccountClient) Delete() *AccountDelete
Delete returns a delete builder for Account.
func (*AccountClient) DeleteOne ¶
func (c *AccountClient) DeleteOne(a *Account) *AccountDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AccountClient) DeleteOneID ¶
func (c *AccountClient) DeleteOneID(id xid.ID) *AccountDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*AccountClient) Hooks ¶
func (c *AccountClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AccountClient) Query ¶
func (c *AccountClient) Query() *AccountQuery
Query returns a query builder for Account.
func (*AccountClient) QueryAuthentication ¶
func (c *AccountClient) QueryAuthentication(a *Account) *AuthenticationQuery
QueryAuthentication queries the authentication edge of a Account.
func (*AccountClient) QueryPosts ¶
func (c *AccountClient) QueryPosts(a *Account) *PostQuery
QueryPosts queries the posts edge of a Account.
func (*AccountClient) QueryReacts ¶
func (c *AccountClient) QueryReacts(a *Account) *ReactQuery
QueryReacts queries the reacts edge of a Account.
func (*AccountClient) QueryRoles ¶
func (c *AccountClient) QueryRoles(a *Account) *RoleQuery
QueryRoles queries the roles edge of a Account.
func (*AccountClient) QuerySubscriptions ¶
func (c *AccountClient) QuerySubscriptions(a *Account) *SubscriptionQuery
QuerySubscriptions queries the subscriptions edge of a Account.
func (*AccountClient) QueryTags ¶
func (c *AccountClient) QueryTags(a *Account) *TagQuery
QueryTags queries the tags edge of a Account.
func (*AccountClient) Update ¶
func (c *AccountClient) Update() *AccountUpdate
Update returns an update builder for Account.
func (*AccountClient) UpdateOne ¶
func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AccountClient) UpdateOneID ¶
func (c *AccountClient) UpdateOneID(id xid.ID) *AccountUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AccountClient) Use ¶
func (c *AccountClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `account.Hooks(f(g(h())))`.
type AccountCreate ¶
type AccountCreate struct {
// contains filtered or unexported fields
}
AccountCreate is the builder for creating a Account entity.
func (*AccountCreate) AddAuthentication ¶
func (ac *AccountCreate) AddAuthentication(a ...*Authentication) *AccountCreate
AddAuthentication adds the "authentication" edges to the Authentication entity.
func (*AccountCreate) AddAuthenticationIDs ¶
func (ac *AccountCreate) AddAuthenticationIDs(ids ...xid.ID) *AccountCreate
AddAuthenticationIDs adds the "authentication" edge to the Authentication entity by IDs.
func (*AccountCreate) AddPostIDs ¶
func (ac *AccountCreate) AddPostIDs(ids ...xid.ID) *AccountCreate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*AccountCreate) AddPosts ¶
func (ac *AccountCreate) AddPosts(p ...*Post) *AccountCreate
AddPosts adds the "posts" edges to the Post entity.
func (*AccountCreate) AddReactIDs ¶
func (ac *AccountCreate) AddReactIDs(ids ...xid.ID) *AccountCreate
AddReactIDs adds the "reacts" edge to the React entity by IDs.
func (*AccountCreate) AddReacts ¶
func (ac *AccountCreate) AddReacts(r ...*React) *AccountCreate
AddReacts adds the "reacts" edges to the React entity.
func (*AccountCreate) AddRoleIDs ¶
func (ac *AccountCreate) AddRoleIDs(ids ...xid.ID) *AccountCreate
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*AccountCreate) AddRoles ¶
func (ac *AccountCreate) AddRoles(r ...*Role) *AccountCreate
AddRoles adds the "roles" edges to the Role entity.
func (*AccountCreate) AddSubscriptionIDs ¶
func (ac *AccountCreate) AddSubscriptionIDs(ids ...xid.ID) *AccountCreate
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*AccountCreate) AddSubscriptions ¶
func (ac *AccountCreate) AddSubscriptions(s ...*Subscription) *AccountCreate
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*AccountCreate) AddTagIDs ¶
func (ac *AccountCreate) AddTagIDs(ids ...xid.ID) *AccountCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*AccountCreate) AddTags ¶
func (ac *AccountCreate) AddTags(t ...*Tag) *AccountCreate
AddTags adds the "tags" edges to the Tag entity.
func (*AccountCreate) Exec ¶
func (ac *AccountCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountCreate) ExecX ¶
func (ac *AccountCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountCreate) Mutation ¶
func (ac *AccountCreate) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountCreate) OnConflict ¶
func (ac *AccountCreate) OnConflict(opts ...sql.ConflictOption) *AccountUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Account.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AccountUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*AccountCreate) OnConflictColumns ¶
func (ac *AccountCreate) OnConflictColumns(columns ...string) *AccountUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Account.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AccountCreate) Save ¶
func (ac *AccountCreate) Save(ctx context.Context) (*Account, error)
Save creates the Account in the database.
func (*AccountCreate) SaveX ¶
func (ac *AccountCreate) SaveX(ctx context.Context) *Account
SaveX calls Save and panics if Save returns an error.
func (*AccountCreate) SetAdmin ¶
func (ac *AccountCreate) SetAdmin(b bool) *AccountCreate
SetAdmin sets the "admin" field.
func (*AccountCreate) SetBio ¶
func (ac *AccountCreate) SetBio(s string) *AccountCreate
SetBio sets the "bio" field.
func (*AccountCreate) SetCreatedAt ¶
func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate
SetCreatedAt sets the "created_at" field.
func (*AccountCreate) SetDeletedAt ¶
func (ac *AccountCreate) SetDeletedAt(t time.Time) *AccountCreate
SetDeletedAt sets the "deleted_at" field.
func (*AccountCreate) SetEmail ¶
func (ac *AccountCreate) SetEmail(s string) *AccountCreate
SetEmail sets the "email" field.
func (*AccountCreate) SetID ¶
func (ac *AccountCreate) SetID(x xid.ID) *AccountCreate
SetID sets the "id" field.
func (*AccountCreate) SetName ¶
func (ac *AccountCreate) SetName(s string) *AccountCreate
SetName sets the "name" field.
func (*AccountCreate) SetNillableAdmin ¶
func (ac *AccountCreate) SetNillableAdmin(b *bool) *AccountCreate
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*AccountCreate) SetNillableBio ¶
func (ac *AccountCreate) SetNillableBio(s *string) *AccountCreate
SetNillableBio sets the "bio" field if the given value is not nil.
func (*AccountCreate) SetNillableCreatedAt ¶
func (ac *AccountCreate) SetNillableCreatedAt(t *time.Time) *AccountCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccountCreate) SetNillableDeletedAt ¶
func (ac *AccountCreate) SetNillableDeletedAt(t *time.Time) *AccountCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*AccountCreate) SetNillableID ¶
func (ac *AccountCreate) SetNillableID(x *xid.ID) *AccountCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AccountCreate) SetNillableUpdatedAt ¶
func (ac *AccountCreate) SetNillableUpdatedAt(t *time.Time) *AccountCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*AccountCreate) SetUpdatedAt ¶
func (ac *AccountCreate) SetUpdatedAt(t time.Time) *AccountCreate
SetUpdatedAt sets the "updated_at" field.
type AccountCreateBulk ¶
type AccountCreateBulk struct {
// contains filtered or unexported fields
}
AccountCreateBulk is the builder for creating many Account entities in bulk.
func (*AccountCreateBulk) Exec ¶
func (acb *AccountCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountCreateBulk) ExecX ¶
func (acb *AccountCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountCreateBulk) OnConflict ¶
func (acb *AccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *AccountUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Account.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AccountUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*AccountCreateBulk) OnConflictColumns ¶
func (acb *AccountCreateBulk) OnConflictColumns(columns ...string) *AccountUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Account.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type AccountDelete ¶
type AccountDelete struct {
// contains filtered or unexported fields
}
AccountDelete is the builder for deleting a Account entity.
func (*AccountDelete) Exec ¶
func (ad *AccountDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AccountDelete) ExecX ¶
func (ad *AccountDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AccountDelete) Where ¶
func (ad *AccountDelete) Where(ps ...predicate.Account) *AccountDelete
Where appends a list predicates to the AccountDelete builder.
type AccountDeleteOne ¶
type AccountDeleteOne struct {
// contains filtered or unexported fields
}
AccountDeleteOne is the builder for deleting a single Account entity.
func (*AccountDeleteOne) Exec ¶
func (ado *AccountDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AccountDeleteOne) ExecX ¶
func (ado *AccountDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AccountEdges ¶
type AccountEdges struct { // Posts holds the value of the posts edge. Posts []*Post `json:"posts,omitempty"` // Reacts holds the value of the reacts edge. Reacts []*React `json:"reacts,omitempty"` // Roles holds the value of the roles edge. Roles []*Role `json:"roles,omitempty"` // Subscriptions holds the value of the subscriptions edge. Subscriptions []*Subscription `json:"subscriptions,omitempty"` // Authentication holds the value of the authentication edge. Authentication []*Authentication `json:"authentication,omitempty"` // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // contains filtered or unexported fields }
AccountEdges holds the relations/edges for other nodes in the graph.
func (AccountEdges) AuthenticationOrErr ¶
func (e AccountEdges) AuthenticationOrErr() ([]*Authentication, error)
AuthenticationOrErr returns the Authentication value or an error if the edge was not loaded in eager-loading.
func (AccountEdges) PostsOrErr ¶
func (e AccountEdges) PostsOrErr() ([]*Post, error)
PostsOrErr returns the Posts value or an error if the edge was not loaded in eager-loading.
func (AccountEdges) ReactsOrErr ¶
func (e AccountEdges) ReactsOrErr() ([]*React, error)
ReactsOrErr returns the Reacts value or an error if the edge was not loaded in eager-loading.
func (AccountEdges) RolesOrErr ¶
func (e AccountEdges) RolesOrErr() ([]*Role, error)
RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading.
func (AccountEdges) SubscriptionsOrErr ¶
func (e AccountEdges) SubscriptionsOrErr() ([]*Subscription, error)
SubscriptionsOrErr returns the Subscriptions value or an error if the edge was not loaded in eager-loading.
func (AccountEdges) TagsOrErr ¶
func (e AccountEdges) TagsOrErr() ([]*Tag, error)
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.
type AccountGroupBy ¶
type AccountGroupBy struct {
// contains filtered or unexported fields
}
AccountGroupBy is the group-by builder for Account entities.
func (*AccountGroupBy) Aggregate ¶
func (agb *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AccountGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Scan ¶
func (agb *AccountGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*AccountGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccountMutation ¶
type AccountMutation struct {
// contains filtered or unexported fields
}
AccountMutation represents an operation that mutates the Account nodes in the graph.
func (*AccountMutation) AddAuthenticationIDs ¶
func (m *AccountMutation) AddAuthenticationIDs(ids ...xid.ID)
AddAuthenticationIDs adds the "authentication" edge to the Authentication entity by ids.
func (*AccountMutation) AddField ¶
func (m *AccountMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AccountMutation) AddPostIDs ¶
func (m *AccountMutation) AddPostIDs(ids ...xid.ID)
AddPostIDs adds the "posts" edge to the Post entity by ids.
func (*AccountMutation) AddReactIDs ¶
func (m *AccountMutation) AddReactIDs(ids ...xid.ID)
AddReactIDs adds the "reacts" edge to the React entity by ids.
func (*AccountMutation) AddRoleIDs ¶
func (m *AccountMutation) AddRoleIDs(ids ...xid.ID)
AddRoleIDs adds the "roles" edge to the Role entity by ids.
func (*AccountMutation) AddSubscriptionIDs ¶
func (m *AccountMutation) AddSubscriptionIDs(ids ...xid.ID)
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by ids.
func (*AccountMutation) AddTagIDs ¶
func (m *AccountMutation) AddTagIDs(ids ...xid.ID)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*AccountMutation) AddedEdges ¶
func (m *AccountMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AccountMutation) AddedField ¶
func (m *AccountMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AccountMutation) AddedFields ¶
func (m *AccountMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AccountMutation) AddedIDs ¶
func (m *AccountMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AccountMutation) Admin ¶
func (m *AccountMutation) Admin() (r bool, exists bool)
Admin returns the value of the "admin" field in the mutation.
func (*AccountMutation) AuthenticationCleared ¶
func (m *AccountMutation) AuthenticationCleared() bool
AuthenticationCleared reports if the "authentication" edge to the Authentication entity was cleared.
func (*AccountMutation) AuthenticationIDs ¶
func (m *AccountMutation) AuthenticationIDs() (ids []xid.ID)
AuthenticationIDs returns the "authentication" edge IDs in the mutation.
func (*AccountMutation) Bio ¶
func (m *AccountMutation) Bio() (r string, exists bool)
Bio returns the value of the "bio" field in the mutation.
func (*AccountMutation) BioCleared ¶
func (m *AccountMutation) BioCleared() bool
BioCleared returns if the "bio" field was cleared in this mutation.
func (*AccountMutation) ClearAuthentication ¶
func (m *AccountMutation) ClearAuthentication()
ClearAuthentication clears the "authentication" edge to the Authentication entity.
func (*AccountMutation) ClearBio ¶
func (m *AccountMutation) ClearBio()
ClearBio clears the value of the "bio" field.
func (*AccountMutation) ClearDeletedAt ¶
func (m *AccountMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AccountMutation) ClearEdge ¶
func (m *AccountMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*AccountMutation) ClearField ¶
func (m *AccountMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*AccountMutation) ClearPosts ¶
func (m *AccountMutation) ClearPosts()
ClearPosts clears the "posts" edge to the Post entity.
func (*AccountMutation) ClearReacts ¶
func (m *AccountMutation) ClearReacts()
ClearReacts clears the "reacts" edge to the React entity.
func (*AccountMutation) ClearRoles ¶
func (m *AccountMutation) ClearRoles()
ClearRoles clears the "roles" edge to the Role entity.
func (*AccountMutation) ClearSubscriptions ¶
func (m *AccountMutation) ClearSubscriptions()
ClearSubscriptions clears the "subscriptions" edge to the Subscription entity.
func (*AccountMutation) ClearTags ¶
func (m *AccountMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*AccountMutation) ClearedEdges ¶
func (m *AccountMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AccountMutation) ClearedFields ¶
func (m *AccountMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AccountMutation) Client ¶
func (m AccountMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*AccountMutation) CreatedAt ¶
func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AccountMutation) DeletedAt ¶
func (m *AccountMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*AccountMutation) DeletedAtCleared ¶
func (m *AccountMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*AccountMutation) EdgeCleared ¶
func (m *AccountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AccountMutation) Email ¶
func (m *AccountMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*AccountMutation) Field ¶
func (m *AccountMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AccountMutation) FieldCleared ¶
func (m *AccountMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AccountMutation) Fields ¶
func (m *AccountMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*AccountMutation) ID ¶
func (m *AccountMutation) ID() (id xid.ID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AccountMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AccountMutation) Name ¶
func (m *AccountMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*AccountMutation) OldAdmin ¶
func (m *AccountMutation) OldAdmin(ctx context.Context) (v bool, err error)
OldAdmin returns the old "admin" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldBio ¶
func (m *AccountMutation) OldBio(ctx context.Context) (v string, err error)
OldBio returns the old "bio" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldEmail ¶
func (m *AccountMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*AccountMutation) OldName ¶
func (m *AccountMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) PostsCleared ¶
func (m *AccountMutation) PostsCleared() bool
PostsCleared reports if the "posts" edge to the Post entity was cleared.
func (*AccountMutation) PostsIDs ¶
func (m *AccountMutation) PostsIDs() (ids []xid.ID)
PostsIDs returns the "posts" edge IDs in the mutation.
func (*AccountMutation) ReactsCleared ¶
func (m *AccountMutation) ReactsCleared() bool
ReactsCleared reports if the "reacts" edge to the React entity was cleared.
func (*AccountMutation) ReactsIDs ¶
func (m *AccountMutation) ReactsIDs() (ids []xid.ID)
ReactsIDs returns the "reacts" edge IDs in the mutation.
func (*AccountMutation) RemoveAuthenticationIDs ¶
func (m *AccountMutation) RemoveAuthenticationIDs(ids ...xid.ID)
RemoveAuthenticationIDs removes the "authentication" edge to the Authentication entity by IDs.
func (*AccountMutation) RemovePostIDs ¶
func (m *AccountMutation) RemovePostIDs(ids ...xid.ID)
RemovePostIDs removes the "posts" edge to the Post entity by IDs.
func (*AccountMutation) RemoveReactIDs ¶
func (m *AccountMutation) RemoveReactIDs(ids ...xid.ID)
RemoveReactIDs removes the "reacts" edge to the React entity by IDs.
func (*AccountMutation) RemoveRoleIDs ¶
func (m *AccountMutation) RemoveRoleIDs(ids ...xid.ID)
RemoveRoleIDs removes the "roles" edge to the Role entity by IDs.
func (*AccountMutation) RemoveSubscriptionIDs ¶
func (m *AccountMutation) RemoveSubscriptionIDs(ids ...xid.ID)
RemoveSubscriptionIDs removes the "subscriptions" edge to the Subscription entity by IDs.
func (*AccountMutation) RemoveTagIDs ¶
func (m *AccountMutation) RemoveTagIDs(ids ...xid.ID)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*AccountMutation) RemovedAuthenticationIDs ¶
func (m *AccountMutation) RemovedAuthenticationIDs() (ids []xid.ID)
RemovedAuthentication returns the removed IDs of the "authentication" edge to the Authentication entity.
func (*AccountMutation) RemovedEdges ¶
func (m *AccountMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AccountMutation) RemovedIDs ¶
func (m *AccountMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*AccountMutation) RemovedPostsIDs ¶
func (m *AccountMutation) RemovedPostsIDs() (ids []xid.ID)
RemovedPosts returns the removed IDs of the "posts" edge to the Post entity.
func (*AccountMutation) RemovedReactsIDs ¶
func (m *AccountMutation) RemovedReactsIDs() (ids []xid.ID)
RemovedReacts returns the removed IDs of the "reacts" edge to the React entity.
func (*AccountMutation) RemovedRolesIDs ¶
func (m *AccountMutation) RemovedRolesIDs() (ids []xid.ID)
RemovedRoles returns the removed IDs of the "roles" edge to the Role entity.
func (*AccountMutation) RemovedSubscriptionsIDs ¶
func (m *AccountMutation) RemovedSubscriptionsIDs() (ids []xid.ID)
RemovedSubscriptions returns the removed IDs of the "subscriptions" edge to the Subscription entity.
func (*AccountMutation) RemovedTagsIDs ¶
func (m *AccountMutation) RemovedTagsIDs() (ids []xid.ID)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*AccountMutation) ResetAdmin ¶
func (m *AccountMutation) ResetAdmin()
ResetAdmin resets all changes to the "admin" field.
func (*AccountMutation) ResetAuthentication ¶
func (m *AccountMutation) ResetAuthentication()
ResetAuthentication resets all changes to the "authentication" edge.
func (*AccountMutation) ResetBio ¶
func (m *AccountMutation) ResetBio()
ResetBio resets all changes to the "bio" field.
func (*AccountMutation) ResetCreatedAt ¶
func (m *AccountMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AccountMutation) ResetDeletedAt ¶
func (m *AccountMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*AccountMutation) ResetEdge ¶
func (m *AccountMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*AccountMutation) ResetEmail ¶
func (m *AccountMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*AccountMutation) ResetField ¶
func (m *AccountMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*AccountMutation) ResetName ¶
func (m *AccountMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*AccountMutation) ResetPosts ¶
func (m *AccountMutation) ResetPosts()
ResetPosts resets all changes to the "posts" edge.
func (*AccountMutation) ResetReacts ¶
func (m *AccountMutation) ResetReacts()
ResetReacts resets all changes to the "reacts" edge.
func (*AccountMutation) ResetRoles ¶
func (m *AccountMutation) ResetRoles()
ResetRoles resets all changes to the "roles" edge.
func (*AccountMutation) ResetSubscriptions ¶
func (m *AccountMutation) ResetSubscriptions()
ResetSubscriptions resets all changes to the "subscriptions" edge.
func (*AccountMutation) ResetTags ¶
func (m *AccountMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*AccountMutation) ResetUpdatedAt ¶
func (m *AccountMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AccountMutation) RolesCleared ¶
func (m *AccountMutation) RolesCleared() bool
RolesCleared reports if the "roles" edge to the Role entity was cleared.
func (*AccountMutation) RolesIDs ¶
func (m *AccountMutation) RolesIDs() (ids []xid.ID)
RolesIDs returns the "roles" edge IDs in the mutation.
func (*AccountMutation) SetAdmin ¶
func (m *AccountMutation) SetAdmin(b bool)
SetAdmin sets the "admin" field.
func (*AccountMutation) SetBio ¶
func (m *AccountMutation) SetBio(s string)
SetBio sets the "bio" field.
func (*AccountMutation) SetCreatedAt ¶
func (m *AccountMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AccountMutation) SetDeletedAt ¶
func (m *AccountMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*AccountMutation) SetEmail ¶
func (m *AccountMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*AccountMutation) SetField ¶
func (m *AccountMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AccountMutation) SetID ¶
func (m *AccountMutation) SetID(id xid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Account entities.
func (*AccountMutation) SetName ¶
func (m *AccountMutation) SetName(s string)
SetName sets the "name" field.
func (*AccountMutation) SetUpdatedAt ¶
func (m *AccountMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*AccountMutation) SubscriptionsCleared ¶
func (m *AccountMutation) SubscriptionsCleared() bool
SubscriptionsCleared reports if the "subscriptions" edge to the Subscription entity was cleared.
func (*AccountMutation) SubscriptionsIDs ¶
func (m *AccountMutation) SubscriptionsIDs() (ids []xid.ID)
SubscriptionsIDs returns the "subscriptions" edge IDs in the mutation.
func (*AccountMutation) TagsCleared ¶
func (m *AccountMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*AccountMutation) TagsIDs ¶
func (m *AccountMutation) TagsIDs() (ids []xid.ID)
TagsIDs returns the "tags" edge IDs in the mutation.
func (AccountMutation) Tx ¶
func (m AccountMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AccountMutation) Type ¶
func (m *AccountMutation) Type() string
Type returns the node type of this mutation (Account).
func (*AccountMutation) UpdatedAt ¶
func (m *AccountMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AccountMutation) Where ¶
func (m *AccountMutation) Where(ps ...predicate.Account)
Where appends a list predicates to the AccountMutation builder.
type AccountQuery ¶
type AccountQuery struct {
// contains filtered or unexported fields
}
AccountQuery is the builder for querying Account entities.
func (*AccountQuery) All ¶
func (aq *AccountQuery) All(ctx context.Context) ([]*Account, error)
All executes the query and returns a list of Accounts.
func (*AccountQuery) AllX ¶
func (aq *AccountQuery) AllX(ctx context.Context) []*Account
AllX is like All, but panics if an error occurs.
func (*AccountQuery) Clone ¶
func (aq *AccountQuery) Clone() *AccountQuery
Clone returns a duplicate of the AccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AccountQuery) Count ¶
func (aq *AccountQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AccountQuery) CountX ¶
func (aq *AccountQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AccountQuery) Exist ¶
func (aq *AccountQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AccountQuery) ExistX ¶
func (aq *AccountQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AccountQuery) First ¶
func (aq *AccountQuery) First(ctx context.Context) (*Account, error)
First returns the first Account entity from the query. Returns a *NotFoundError when no Account was found.
func (*AccountQuery) FirstID ¶
FirstID returns the first Account ID from the query. Returns a *NotFoundError when no Account ID was found.
func (*AccountQuery) FirstIDX ¶
func (aq *AccountQuery) FirstIDX(ctx context.Context) xid.ID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AccountQuery) FirstX ¶
func (aq *AccountQuery) FirstX(ctx context.Context) *Account
FirstX is like First, but panics if an error occurs.
func (*AccountQuery) GroupBy ¶
func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Account.Query(). GroupBy(account.FieldCreatedAt). Aggregate(model.Count()). Scan(ctx, &v)
func (*AccountQuery) IDsX ¶
func (aq *AccountQuery) IDsX(ctx context.Context) []xid.ID
IDsX is like IDs, but panics if an error occurs.
func (*AccountQuery) Limit ¶
func (aq *AccountQuery) Limit(limit int) *AccountQuery
Limit adds a limit step to the query.
func (*AccountQuery) Modify ¶
func (aq *AccountQuery) Modify(modifiers ...func(s *sql.Selector)) *AccountSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*AccountQuery) Offset ¶
func (aq *AccountQuery) Offset(offset int) *AccountQuery
Offset adds an offset step to the query.
func (*AccountQuery) Only ¶
func (aq *AccountQuery) Only(ctx context.Context) (*Account, error)
Only returns a single Account entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Account entity is found. Returns a *NotFoundError when no Account entities are found.
func (*AccountQuery) OnlyID ¶
OnlyID is like Only, but returns the only Account ID in the query. Returns a *NotSingularError when more than one Account ID is found. Returns a *NotFoundError when no entities are found.
func (*AccountQuery) OnlyIDX ¶
func (aq *AccountQuery) OnlyIDX(ctx context.Context) xid.ID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AccountQuery) OnlyX ¶
func (aq *AccountQuery) OnlyX(ctx context.Context) *Account
OnlyX is like Only, but panics if an error occurs.
func (*AccountQuery) Order ¶
func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery
Order adds an order step to the query.
func (*AccountQuery) QueryAuthentication ¶
func (aq *AccountQuery) QueryAuthentication() *AuthenticationQuery
QueryAuthentication chains the current query on the "authentication" edge.
func (*AccountQuery) QueryPosts ¶
func (aq *AccountQuery) QueryPosts() *PostQuery
QueryPosts chains the current query on the "posts" edge.
func (*AccountQuery) QueryReacts ¶
func (aq *AccountQuery) QueryReacts() *ReactQuery
QueryReacts chains the current query on the "reacts" edge.
func (*AccountQuery) QueryRoles ¶
func (aq *AccountQuery) QueryRoles() *RoleQuery
QueryRoles chains the current query on the "roles" edge.
func (*AccountQuery) QuerySubscriptions ¶
func (aq *AccountQuery) QuerySubscriptions() *SubscriptionQuery
QuerySubscriptions chains the current query on the "subscriptions" edge.
func (*AccountQuery) QueryTags ¶
func (aq *AccountQuery) QueryTags() *TagQuery
QueryTags chains the current query on the "tags" edge.
func (*AccountQuery) Select ¶
func (aq *AccountQuery) Select(fields ...string) *AccountSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Account.Query(). Select(account.FieldCreatedAt). Scan(ctx, &v)
func (*AccountQuery) Unique ¶
func (aq *AccountQuery) Unique(unique bool) *AccountQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*AccountQuery) Where ¶
func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
Where adds a new predicate for the AccountQuery builder.
func (*AccountQuery) WithAuthentication ¶
func (aq *AccountQuery) WithAuthentication(opts ...func(*AuthenticationQuery)) *AccountQuery
WithAuthentication tells the query-builder to eager-load the nodes that are connected to the "authentication" edge. The optional arguments are used to configure the query builder of the edge.
func (*AccountQuery) WithPosts ¶
func (aq *AccountQuery) WithPosts(opts ...func(*PostQuery)) *AccountQuery
WithPosts tells the query-builder to eager-load the nodes that are connected to the "posts" edge. The optional arguments are used to configure the query builder of the edge.
func (*AccountQuery) WithReacts ¶
func (aq *AccountQuery) WithReacts(opts ...func(*ReactQuery)) *AccountQuery
WithReacts tells the query-builder to eager-load the nodes that are connected to the "reacts" edge. The optional arguments are used to configure the query builder of the edge.
func (*AccountQuery) WithRoles ¶
func (aq *AccountQuery) WithRoles(opts ...func(*RoleQuery)) *AccountQuery
WithRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge. The optional arguments are used to configure the query builder of the edge.
func (*AccountQuery) WithSubscriptions ¶
func (aq *AccountQuery) WithSubscriptions(opts ...func(*SubscriptionQuery)) *AccountQuery
WithSubscriptions tells the query-builder to eager-load the nodes that are connected to the "subscriptions" edge. The optional arguments are used to configure the query builder of the edge.
func (*AccountQuery) WithTags ¶
func (aq *AccountQuery) WithTags(opts ...func(*TagQuery)) *AccountQuery
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
type AccountSelect ¶
type AccountSelect struct { *AccountQuery // contains filtered or unexported fields }
AccountSelect is the builder for selecting fields of Account entities.
func (*AccountSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Modify ¶
func (as *AccountSelect) Modify(modifiers ...func(s *sql.Selector)) *AccountSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*AccountSelect) Scan ¶
func (as *AccountSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*AccountSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccountUpdate ¶
type AccountUpdate struct {
// contains filtered or unexported fields
}
AccountUpdate is the builder for updating Account entities.
func (*AccountUpdate) AddAuthentication ¶
func (au *AccountUpdate) AddAuthentication(a ...*Authentication) *AccountUpdate
AddAuthentication adds the "authentication" edges to the Authentication entity.
func (*AccountUpdate) AddAuthenticationIDs ¶
func (au *AccountUpdate) AddAuthenticationIDs(ids ...xid.ID) *AccountUpdate
AddAuthenticationIDs adds the "authentication" edge to the Authentication entity by IDs.
func (*AccountUpdate) AddPostIDs ¶
func (au *AccountUpdate) AddPostIDs(ids ...xid.ID) *AccountUpdate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*AccountUpdate) AddPosts ¶
func (au *AccountUpdate) AddPosts(p ...*Post) *AccountUpdate
AddPosts adds the "posts" edges to the Post entity.
func (*AccountUpdate) AddReactIDs ¶
func (au *AccountUpdate) AddReactIDs(ids ...xid.ID) *AccountUpdate
AddReactIDs adds the "reacts" edge to the React entity by IDs.
func (*AccountUpdate) AddReacts ¶
func (au *AccountUpdate) AddReacts(r ...*React) *AccountUpdate
AddReacts adds the "reacts" edges to the React entity.
func (*AccountUpdate) AddRoleIDs ¶
func (au *AccountUpdate) AddRoleIDs(ids ...xid.ID) *AccountUpdate
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*AccountUpdate) AddRoles ¶
func (au *AccountUpdate) AddRoles(r ...*Role) *AccountUpdate
AddRoles adds the "roles" edges to the Role entity.
func (*AccountUpdate) AddSubscriptionIDs ¶
func (au *AccountUpdate) AddSubscriptionIDs(ids ...xid.ID) *AccountUpdate
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*AccountUpdate) AddSubscriptions ¶
func (au *AccountUpdate) AddSubscriptions(s ...*Subscription) *AccountUpdate
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*AccountUpdate) AddTagIDs ¶
func (au *AccountUpdate) AddTagIDs(ids ...xid.ID) *AccountUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*AccountUpdate) AddTags ¶
func (au *AccountUpdate) AddTags(t ...*Tag) *AccountUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*AccountUpdate) ClearAuthentication ¶
func (au *AccountUpdate) ClearAuthentication() *AccountUpdate
ClearAuthentication clears all "authentication" edges to the Authentication entity.
func (*AccountUpdate) ClearBio ¶
func (au *AccountUpdate) ClearBio() *AccountUpdate
ClearBio clears the value of the "bio" field.
func (*AccountUpdate) ClearDeletedAt ¶
func (au *AccountUpdate) ClearDeletedAt() *AccountUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AccountUpdate) ClearPosts ¶
func (au *AccountUpdate) ClearPosts() *AccountUpdate
ClearPosts clears all "posts" edges to the Post entity.
func (*AccountUpdate) ClearReacts ¶
func (au *AccountUpdate) ClearReacts() *AccountUpdate
ClearReacts clears all "reacts" edges to the React entity.
func (*AccountUpdate) ClearRoles ¶
func (au *AccountUpdate) ClearRoles() *AccountUpdate
ClearRoles clears all "roles" edges to the Role entity.
func (*AccountUpdate) ClearSubscriptions ¶
func (au *AccountUpdate) ClearSubscriptions() *AccountUpdate
ClearSubscriptions clears all "subscriptions" edges to the Subscription entity.
func (*AccountUpdate) ClearTags ¶
func (au *AccountUpdate) ClearTags() *AccountUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*AccountUpdate) Exec ¶
func (au *AccountUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUpdate) ExecX ¶
func (au *AccountUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpdate) Modify ¶
func (au *AccountUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*AccountUpdate) Mutation ¶
func (au *AccountUpdate) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountUpdate) RemoveAuthentication ¶
func (au *AccountUpdate) RemoveAuthentication(a ...*Authentication) *AccountUpdate
RemoveAuthentication removes "authentication" edges to Authentication entities.
func (*AccountUpdate) RemoveAuthenticationIDs ¶
func (au *AccountUpdate) RemoveAuthenticationIDs(ids ...xid.ID) *AccountUpdate
RemoveAuthenticationIDs removes the "authentication" edge to Authentication entities by IDs.
func (*AccountUpdate) RemovePostIDs ¶
func (au *AccountUpdate) RemovePostIDs(ids ...xid.ID) *AccountUpdate
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*AccountUpdate) RemovePosts ¶
func (au *AccountUpdate) RemovePosts(p ...*Post) *AccountUpdate
RemovePosts removes "posts" edges to Post entities.
func (*AccountUpdate) RemoveReactIDs ¶
func (au *AccountUpdate) RemoveReactIDs(ids ...xid.ID) *AccountUpdate
RemoveReactIDs removes the "reacts" edge to React entities by IDs.
func (*AccountUpdate) RemoveReacts ¶
func (au *AccountUpdate) RemoveReacts(r ...*React) *AccountUpdate
RemoveReacts removes "reacts" edges to React entities.
func (*AccountUpdate) RemoveRoleIDs ¶
func (au *AccountUpdate) RemoveRoleIDs(ids ...xid.ID) *AccountUpdate
RemoveRoleIDs removes the "roles" edge to Role entities by IDs.
func (*AccountUpdate) RemoveRoles ¶
func (au *AccountUpdate) RemoveRoles(r ...*Role) *AccountUpdate
RemoveRoles removes "roles" edges to Role entities.
func (*AccountUpdate) RemoveSubscriptionIDs ¶
func (au *AccountUpdate) RemoveSubscriptionIDs(ids ...xid.ID) *AccountUpdate
RemoveSubscriptionIDs removes the "subscriptions" edge to Subscription entities by IDs.
func (*AccountUpdate) RemoveSubscriptions ¶
func (au *AccountUpdate) RemoveSubscriptions(s ...*Subscription) *AccountUpdate
RemoveSubscriptions removes "subscriptions" edges to Subscription entities.
func (*AccountUpdate) RemoveTagIDs ¶
func (au *AccountUpdate) RemoveTagIDs(ids ...xid.ID) *AccountUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*AccountUpdate) RemoveTags ¶
func (au *AccountUpdate) RemoveTags(t ...*Tag) *AccountUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*AccountUpdate) Save ¶
func (au *AccountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AccountUpdate) SaveX ¶
func (au *AccountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdate) SetAdmin ¶
func (au *AccountUpdate) SetAdmin(b bool) *AccountUpdate
SetAdmin sets the "admin" field.
func (*AccountUpdate) SetBio ¶
func (au *AccountUpdate) SetBio(s string) *AccountUpdate
SetBio sets the "bio" field.
func (*AccountUpdate) SetDeletedAt ¶
func (au *AccountUpdate) SetDeletedAt(t time.Time) *AccountUpdate
SetDeletedAt sets the "deleted_at" field.
func (*AccountUpdate) SetEmail ¶
func (au *AccountUpdate) SetEmail(s string) *AccountUpdate
SetEmail sets the "email" field.
func (*AccountUpdate) SetName ¶
func (au *AccountUpdate) SetName(s string) *AccountUpdate
SetName sets the "name" field.
func (*AccountUpdate) SetNillableAdmin ¶
func (au *AccountUpdate) SetNillableAdmin(b *bool) *AccountUpdate
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*AccountUpdate) SetNillableBio ¶
func (au *AccountUpdate) SetNillableBio(s *string) *AccountUpdate
SetNillableBio sets the "bio" field if the given value is not nil.
func (*AccountUpdate) SetNillableDeletedAt ¶
func (au *AccountUpdate) SetNillableDeletedAt(t *time.Time) *AccountUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*AccountUpdate) SetUpdatedAt ¶
func (au *AccountUpdate) SetUpdatedAt(t time.Time) *AccountUpdate
SetUpdatedAt sets the "updated_at" field.
func (*AccountUpdate) Where ¶
func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
Where appends a list predicates to the AccountUpdate builder.
type AccountUpdateOne ¶
type AccountUpdateOne struct {
// contains filtered or unexported fields
}
AccountUpdateOne is the builder for updating a single Account entity.
func (*AccountUpdateOne) AddAuthentication ¶
func (auo *AccountUpdateOne) AddAuthentication(a ...*Authentication) *AccountUpdateOne
AddAuthentication adds the "authentication" edges to the Authentication entity.
func (*AccountUpdateOne) AddAuthenticationIDs ¶
func (auo *AccountUpdateOne) AddAuthenticationIDs(ids ...xid.ID) *AccountUpdateOne
AddAuthenticationIDs adds the "authentication" edge to the Authentication entity by IDs.
func (*AccountUpdateOne) AddPostIDs ¶
func (auo *AccountUpdateOne) AddPostIDs(ids ...xid.ID) *AccountUpdateOne
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*AccountUpdateOne) AddPosts ¶
func (auo *AccountUpdateOne) AddPosts(p ...*Post) *AccountUpdateOne
AddPosts adds the "posts" edges to the Post entity.
func (*AccountUpdateOne) AddReactIDs ¶
func (auo *AccountUpdateOne) AddReactIDs(ids ...xid.ID) *AccountUpdateOne
AddReactIDs adds the "reacts" edge to the React entity by IDs.
func (*AccountUpdateOne) AddReacts ¶
func (auo *AccountUpdateOne) AddReacts(r ...*React) *AccountUpdateOne
AddReacts adds the "reacts" edges to the React entity.
func (*AccountUpdateOne) AddRoleIDs ¶
func (auo *AccountUpdateOne) AddRoleIDs(ids ...xid.ID) *AccountUpdateOne
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*AccountUpdateOne) AddRoles ¶
func (auo *AccountUpdateOne) AddRoles(r ...*Role) *AccountUpdateOne
AddRoles adds the "roles" edges to the Role entity.
func (*AccountUpdateOne) AddSubscriptionIDs ¶
func (auo *AccountUpdateOne) AddSubscriptionIDs(ids ...xid.ID) *AccountUpdateOne
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*AccountUpdateOne) AddSubscriptions ¶
func (auo *AccountUpdateOne) AddSubscriptions(s ...*Subscription) *AccountUpdateOne
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*AccountUpdateOne) AddTagIDs ¶
func (auo *AccountUpdateOne) AddTagIDs(ids ...xid.ID) *AccountUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*AccountUpdateOne) AddTags ¶
func (auo *AccountUpdateOne) AddTags(t ...*Tag) *AccountUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*AccountUpdateOne) ClearAuthentication ¶
func (auo *AccountUpdateOne) ClearAuthentication() *AccountUpdateOne
ClearAuthentication clears all "authentication" edges to the Authentication entity.
func (*AccountUpdateOne) ClearBio ¶
func (auo *AccountUpdateOne) ClearBio() *AccountUpdateOne
ClearBio clears the value of the "bio" field.
func (*AccountUpdateOne) ClearDeletedAt ¶
func (auo *AccountUpdateOne) ClearDeletedAt() *AccountUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AccountUpdateOne) ClearPosts ¶
func (auo *AccountUpdateOne) ClearPosts() *AccountUpdateOne
ClearPosts clears all "posts" edges to the Post entity.
func (*AccountUpdateOne) ClearReacts ¶
func (auo *AccountUpdateOne) ClearReacts() *AccountUpdateOne
ClearReacts clears all "reacts" edges to the React entity.
func (*AccountUpdateOne) ClearRoles ¶
func (auo *AccountUpdateOne) ClearRoles() *AccountUpdateOne
ClearRoles clears all "roles" edges to the Role entity.
func (*AccountUpdateOne) ClearSubscriptions ¶
func (auo *AccountUpdateOne) ClearSubscriptions() *AccountUpdateOne
ClearSubscriptions clears all "subscriptions" edges to the Subscription entity.
func (*AccountUpdateOne) ClearTags ¶
func (auo *AccountUpdateOne) ClearTags() *AccountUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*AccountUpdateOne) Exec ¶
func (auo *AccountUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AccountUpdateOne) ExecX ¶
func (auo *AccountUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpdateOne) Modify ¶
func (auo *AccountUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*AccountUpdateOne) Mutation ¶
func (auo *AccountUpdateOne) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountUpdateOne) RemoveAuthentication ¶
func (auo *AccountUpdateOne) RemoveAuthentication(a ...*Authentication) *AccountUpdateOne
RemoveAuthentication removes "authentication" edges to Authentication entities.
func (*AccountUpdateOne) RemoveAuthenticationIDs ¶
func (auo *AccountUpdateOne) RemoveAuthenticationIDs(ids ...xid.ID) *AccountUpdateOne
RemoveAuthenticationIDs removes the "authentication" edge to Authentication entities by IDs.
func (*AccountUpdateOne) RemovePostIDs ¶
func (auo *AccountUpdateOne) RemovePostIDs(ids ...xid.ID) *AccountUpdateOne
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*AccountUpdateOne) RemovePosts ¶
func (auo *AccountUpdateOne) RemovePosts(p ...*Post) *AccountUpdateOne
RemovePosts removes "posts" edges to Post entities.
func (*AccountUpdateOne) RemoveReactIDs ¶
func (auo *AccountUpdateOne) RemoveReactIDs(ids ...xid.ID) *AccountUpdateOne
RemoveReactIDs removes the "reacts" edge to React entities by IDs.
func (*AccountUpdateOne) RemoveReacts ¶
func (auo *AccountUpdateOne) RemoveReacts(r ...*React) *AccountUpdateOne
RemoveReacts removes "reacts" edges to React entities.
func (*AccountUpdateOne) RemoveRoleIDs ¶
func (auo *AccountUpdateOne) RemoveRoleIDs(ids ...xid.ID) *AccountUpdateOne
RemoveRoleIDs removes the "roles" edge to Role entities by IDs.
func (*AccountUpdateOne) RemoveRoles ¶
func (auo *AccountUpdateOne) RemoveRoles(r ...*Role) *AccountUpdateOne
RemoveRoles removes "roles" edges to Role entities.
func (*AccountUpdateOne) RemoveSubscriptionIDs ¶
func (auo *AccountUpdateOne) RemoveSubscriptionIDs(ids ...xid.ID) *AccountUpdateOne
RemoveSubscriptionIDs removes the "subscriptions" edge to Subscription entities by IDs.
func (*AccountUpdateOne) RemoveSubscriptions ¶
func (auo *AccountUpdateOne) RemoveSubscriptions(s ...*Subscription) *AccountUpdateOne
RemoveSubscriptions removes "subscriptions" edges to Subscription entities.
func (*AccountUpdateOne) RemoveTagIDs ¶
func (auo *AccountUpdateOne) RemoveTagIDs(ids ...xid.ID) *AccountUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*AccountUpdateOne) RemoveTags ¶
func (auo *AccountUpdateOne) RemoveTags(t ...*Tag) *AccountUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*AccountUpdateOne) Save ¶
func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)
Save executes the query and returns the updated Account entity.
func (*AccountUpdateOne) SaveX ¶
func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdateOne) Select ¶
func (auo *AccountUpdateOne) Select(field string, fields ...string) *AccountUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AccountUpdateOne) SetAdmin ¶
func (auo *AccountUpdateOne) SetAdmin(b bool) *AccountUpdateOne
SetAdmin sets the "admin" field.
func (*AccountUpdateOne) SetBio ¶
func (auo *AccountUpdateOne) SetBio(s string) *AccountUpdateOne
SetBio sets the "bio" field.
func (*AccountUpdateOne) SetDeletedAt ¶
func (auo *AccountUpdateOne) SetDeletedAt(t time.Time) *AccountUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*AccountUpdateOne) SetEmail ¶
func (auo *AccountUpdateOne) SetEmail(s string) *AccountUpdateOne
SetEmail sets the "email" field.
func (*AccountUpdateOne) SetName ¶
func (auo *AccountUpdateOne) SetName(s string) *AccountUpdateOne
SetName sets the "name" field.
func (*AccountUpdateOne) SetNillableAdmin ¶
func (auo *AccountUpdateOne) SetNillableAdmin(b *bool) *AccountUpdateOne
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableBio ¶
func (auo *AccountUpdateOne) SetNillableBio(s *string) *AccountUpdateOne
SetNillableBio sets the "bio" field if the given value is not nil.
func (*AccountUpdateOne) SetNillableDeletedAt ¶
func (auo *AccountUpdateOne) SetNillableDeletedAt(t *time.Time) *AccountUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*AccountUpdateOne) SetUpdatedAt ¶
func (auo *AccountUpdateOne) SetUpdatedAt(t time.Time) *AccountUpdateOne
SetUpdatedAt sets the "updated_at" field.
type AccountUpsert ¶
AccountUpsert is the "OnConflict" setter.
func (*AccountUpsert) ClearBio ¶
func (u *AccountUpsert) ClearBio() *AccountUpsert
ClearBio clears the value of the "bio" field.
func (*AccountUpsert) ClearDeletedAt ¶
func (u *AccountUpsert) ClearDeletedAt() *AccountUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AccountUpsert) SetAdmin ¶
func (u *AccountUpsert) SetAdmin(v bool) *AccountUpsert
SetAdmin sets the "admin" field.
func (*AccountUpsert) SetBio ¶
func (u *AccountUpsert) SetBio(v string) *AccountUpsert
SetBio sets the "bio" field.
func (*AccountUpsert) SetCreatedAt ¶
func (u *AccountUpsert) SetCreatedAt(v time.Time) *AccountUpsert
SetCreatedAt sets the "created_at" field.
func (*AccountUpsert) SetDeletedAt ¶
func (u *AccountUpsert) SetDeletedAt(v time.Time) *AccountUpsert
SetDeletedAt sets the "deleted_at" field.
func (*AccountUpsert) SetEmail ¶
func (u *AccountUpsert) SetEmail(v string) *AccountUpsert
SetEmail sets the "email" field.
func (*AccountUpsert) SetName ¶
func (u *AccountUpsert) SetName(v string) *AccountUpsert
SetName sets the "name" field.
func (*AccountUpsert) SetUpdatedAt ¶
func (u *AccountUpsert) SetUpdatedAt(v time.Time) *AccountUpsert
SetUpdatedAt sets the "updated_at" field.
func (*AccountUpsert) UpdateAdmin ¶
func (u *AccountUpsert) UpdateAdmin() *AccountUpsert
UpdateAdmin sets the "admin" field to the value that was provided on create.
func (*AccountUpsert) UpdateBio ¶
func (u *AccountUpsert) UpdateBio() *AccountUpsert
UpdateBio sets the "bio" field to the value that was provided on create.
func (*AccountUpsert) UpdateCreatedAt ¶
func (u *AccountUpsert) UpdateCreatedAt() *AccountUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AccountUpsert) UpdateDeletedAt ¶
func (u *AccountUpsert) UpdateDeletedAt() *AccountUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*AccountUpsert) UpdateEmail ¶
func (u *AccountUpsert) UpdateEmail() *AccountUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AccountUpsert) UpdateName ¶
func (u *AccountUpsert) UpdateName() *AccountUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*AccountUpsert) UpdateUpdatedAt ¶
func (u *AccountUpsert) UpdateUpdatedAt() *AccountUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type AccountUpsertBulk ¶
type AccountUpsertBulk struct {
// contains filtered or unexported fields
}
AccountUpsertBulk is the builder for "upsert"-ing a bulk of Account nodes.
func (*AccountUpsertBulk) ClearBio ¶
func (u *AccountUpsertBulk) ClearBio() *AccountUpsertBulk
ClearBio clears the value of the "bio" field.
func (*AccountUpsertBulk) ClearDeletedAt ¶
func (u *AccountUpsertBulk) ClearDeletedAt() *AccountUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AccountUpsertBulk) DoNothing ¶
func (u *AccountUpsertBulk) DoNothing() *AccountUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AccountUpsertBulk) Exec ¶
func (u *AccountUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUpsertBulk) ExecX ¶
func (u *AccountUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpsertBulk) Ignore ¶
func (u *AccountUpsertBulk) Ignore() *AccountUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Account.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AccountUpsertBulk) SetAdmin ¶
func (u *AccountUpsertBulk) SetAdmin(v bool) *AccountUpsertBulk
SetAdmin sets the "admin" field.
func (*AccountUpsertBulk) SetBio ¶
func (u *AccountUpsertBulk) SetBio(v string) *AccountUpsertBulk
SetBio sets the "bio" field.
func (*AccountUpsertBulk) SetCreatedAt ¶
func (u *AccountUpsertBulk) SetCreatedAt(v time.Time) *AccountUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*AccountUpsertBulk) SetDeletedAt ¶
func (u *AccountUpsertBulk) SetDeletedAt(v time.Time) *AccountUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*AccountUpsertBulk) SetEmail ¶
func (u *AccountUpsertBulk) SetEmail(v string) *AccountUpsertBulk
SetEmail sets the "email" field.
func (*AccountUpsertBulk) SetName ¶
func (u *AccountUpsertBulk) SetName(v string) *AccountUpsertBulk
SetName sets the "name" field.
func (*AccountUpsertBulk) SetUpdatedAt ¶
func (u *AccountUpsertBulk) SetUpdatedAt(v time.Time) *AccountUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*AccountUpsertBulk) Update ¶
func (u *AccountUpsertBulk) Update(set func(*AccountUpsert)) *AccountUpsertBulk
Update allows overriding fields `UPDATE` values. See the AccountCreateBulk.OnConflict documentation for more info.
func (*AccountUpsertBulk) UpdateAdmin ¶
func (u *AccountUpsertBulk) UpdateAdmin() *AccountUpsertBulk
UpdateAdmin sets the "admin" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateBio ¶
func (u *AccountUpsertBulk) UpdateBio() *AccountUpsertBulk
UpdateBio sets the "bio" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateCreatedAt ¶
func (u *AccountUpsertBulk) UpdateCreatedAt() *AccountUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateDeletedAt ¶
func (u *AccountUpsertBulk) UpdateDeletedAt() *AccountUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateEmail ¶
func (u *AccountUpsertBulk) UpdateEmail() *AccountUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateName ¶
func (u *AccountUpsertBulk) UpdateName() *AccountUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateNewValues ¶
func (u *AccountUpsertBulk) UpdateNewValues() *AccountUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Account.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(account.FieldID) }), ). Exec(ctx)
func (*AccountUpsertBulk) UpdateUpdatedAt ¶
func (u *AccountUpsertBulk) UpdateUpdatedAt() *AccountUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type AccountUpsertOne ¶
type AccountUpsertOne struct {
// contains filtered or unexported fields
}
AccountUpsertOne is the builder for "upsert"-ing
one Account node.
func (*AccountUpsertOne) ClearBio ¶
func (u *AccountUpsertOne) ClearBio() *AccountUpsertOne
ClearBio clears the value of the "bio" field.
func (*AccountUpsertOne) ClearDeletedAt ¶
func (u *AccountUpsertOne) ClearDeletedAt() *AccountUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AccountUpsertOne) DoNothing ¶
func (u *AccountUpsertOne) DoNothing() *AccountUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AccountUpsertOne) Exec ¶
func (u *AccountUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUpsertOne) ExecX ¶
func (u *AccountUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpsertOne) IDX ¶
func (u *AccountUpsertOne) IDX(ctx context.Context) xid.ID
IDX is like ID, but panics if an error occurs.
func (*AccountUpsertOne) Ignore ¶
func (u *AccountUpsertOne) Ignore() *AccountUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Account.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AccountUpsertOne) SetAdmin ¶
func (u *AccountUpsertOne) SetAdmin(v bool) *AccountUpsertOne
SetAdmin sets the "admin" field.
func (*AccountUpsertOne) SetBio ¶
func (u *AccountUpsertOne) SetBio(v string) *AccountUpsertOne
SetBio sets the "bio" field.
func (*AccountUpsertOne) SetCreatedAt ¶
func (u *AccountUpsertOne) SetCreatedAt(v time.Time) *AccountUpsertOne
SetCreatedAt sets the "created_at" field.
func (*AccountUpsertOne) SetDeletedAt ¶
func (u *AccountUpsertOne) SetDeletedAt(v time.Time) *AccountUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*AccountUpsertOne) SetEmail ¶
func (u *AccountUpsertOne) SetEmail(v string) *AccountUpsertOne
SetEmail sets the "email" field.
func (*AccountUpsertOne) SetName ¶
func (u *AccountUpsertOne) SetName(v string) *AccountUpsertOne
SetName sets the "name" field.
func (*AccountUpsertOne) SetUpdatedAt ¶
func (u *AccountUpsertOne) SetUpdatedAt(v time.Time) *AccountUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*AccountUpsertOne) Update ¶
func (u *AccountUpsertOne) Update(set func(*AccountUpsert)) *AccountUpsertOne
Update allows overriding fields `UPDATE` values. See the AccountCreate.OnConflict documentation for more info.
func (*AccountUpsertOne) UpdateAdmin ¶
func (u *AccountUpsertOne) UpdateAdmin() *AccountUpsertOne
UpdateAdmin sets the "admin" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateBio ¶
func (u *AccountUpsertOne) UpdateBio() *AccountUpsertOne
UpdateBio sets the "bio" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateCreatedAt ¶
func (u *AccountUpsertOne) UpdateCreatedAt() *AccountUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateDeletedAt ¶
func (u *AccountUpsertOne) UpdateDeletedAt() *AccountUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateEmail ¶
func (u *AccountUpsertOne) UpdateEmail() *AccountUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateName ¶
func (u *AccountUpsertOne) UpdateName() *AccountUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateNewValues ¶
func (u *AccountUpsertOne) UpdateNewValues() *AccountUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Account.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(account.FieldID) }), ). Exec(ctx)
func (*AccountUpsertOne) UpdateUpdatedAt ¶
func (u *AccountUpsertOne) UpdateUpdatedAt() *AccountUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
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(model.As(model.Sum(field1), "sum_field1"), (model.As(model.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 Authentication ¶
type Authentication struct { // ID of the ent. ID xid.ID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // The authentication service name, such as GitHub, Twitter, Discord, etc. Or, 'password' for password auth and 'api_token' for token auth Service string `json:"service,omitempty"` // The identifier, usually a user/account ID on some OAuth service or API token name. If it's a password, this is blank. Identifier string `json:"identifier,omitempty"` // The actual authentication token/password/key/etc. If OAuth, it'll be the access_token value, if it's a password, a hash and if it's an api_token type then the API token string. Token string `json:"-"` // Any necessary metadata specific to the authentication method. Metadata map[string]interface{} `json:"metadata,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AuthenticationQuery when eager-loading is set. Edges AuthenticationEdges `json:"edges"` // contains filtered or unexported fields }
Authentication is the model entity for the Authentication schema.
func (*Authentication) QueryAccount ¶
func (a *Authentication) QueryAccount() *AccountQuery
QueryAccount queries the "account" edge of the Authentication entity.
func (*Authentication) String ¶
func (a *Authentication) String() string
String implements the fmt.Stringer.
func (*Authentication) Unwrap ¶
func (a *Authentication) Unwrap() *Authentication
Unwrap unwraps the Authentication 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 (*Authentication) Update ¶
func (a *Authentication) Update() *AuthenticationUpdateOne
Update returns a builder for updating this Authentication. Note that you need to call Authentication.Unwrap() before calling this method if this Authentication was returned from a transaction, and the transaction was committed or rolled back.
type AuthenticationClient ¶
type AuthenticationClient struct {
// contains filtered or unexported fields
}
AuthenticationClient is a client for the Authentication schema.
func NewAuthenticationClient ¶
func NewAuthenticationClient(c config) *AuthenticationClient
NewAuthenticationClient returns a client for the Authentication from the given config.
func (*AuthenticationClient) Create ¶
func (c *AuthenticationClient) Create() *AuthenticationCreate
Create returns a builder for creating a Authentication entity.
func (*AuthenticationClient) CreateBulk ¶
func (c *AuthenticationClient) CreateBulk(builders ...*AuthenticationCreate) *AuthenticationCreateBulk
CreateBulk returns a builder for creating a bulk of Authentication entities.
func (*AuthenticationClient) Delete ¶
func (c *AuthenticationClient) Delete() *AuthenticationDelete
Delete returns a delete builder for Authentication.
func (*AuthenticationClient) DeleteOne ¶
func (c *AuthenticationClient) DeleteOne(a *Authentication) *AuthenticationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AuthenticationClient) DeleteOneID ¶
func (c *AuthenticationClient) DeleteOneID(id xid.ID) *AuthenticationDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*AuthenticationClient) Get ¶
func (c *AuthenticationClient) Get(ctx context.Context, id xid.ID) (*Authentication, error)
Get returns a Authentication entity by its id.
func (*AuthenticationClient) GetX ¶
func (c *AuthenticationClient) GetX(ctx context.Context, id xid.ID) *Authentication
GetX is like Get, but panics if an error occurs.
func (*AuthenticationClient) Hooks ¶
func (c *AuthenticationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AuthenticationClient) Query ¶
func (c *AuthenticationClient) Query() *AuthenticationQuery
Query returns a query builder for Authentication.
func (*AuthenticationClient) QueryAccount ¶
func (c *AuthenticationClient) QueryAccount(a *Authentication) *AccountQuery
QueryAccount queries the account edge of a Authentication.
func (*AuthenticationClient) Update ¶
func (c *AuthenticationClient) Update() *AuthenticationUpdate
Update returns an update builder for Authentication.
func (*AuthenticationClient) UpdateOne ¶
func (c *AuthenticationClient) UpdateOne(a *Authentication) *AuthenticationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AuthenticationClient) UpdateOneID ¶
func (c *AuthenticationClient) UpdateOneID(id xid.ID) *AuthenticationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AuthenticationClient) Use ¶
func (c *AuthenticationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `authentication.Hooks(f(g(h())))`.
type AuthenticationCreate ¶
type AuthenticationCreate struct {
// contains filtered or unexported fields
}
AuthenticationCreate is the builder for creating a Authentication entity.
func (*AuthenticationCreate) Exec ¶
func (ac *AuthenticationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthenticationCreate) ExecX ¶
func (ac *AuthenticationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthenticationCreate) Mutation ¶
func (ac *AuthenticationCreate) Mutation() *AuthenticationMutation
Mutation returns the AuthenticationMutation object of the builder.
func (*AuthenticationCreate) OnConflict ¶
func (ac *AuthenticationCreate) OnConflict(opts ...sql.ConflictOption) *AuthenticationUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Authentication.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AuthenticationUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*AuthenticationCreate) OnConflictColumns ¶
func (ac *AuthenticationCreate) OnConflictColumns(columns ...string) *AuthenticationUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Authentication.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AuthenticationCreate) Save ¶
func (ac *AuthenticationCreate) Save(ctx context.Context) (*Authentication, error)
Save creates the Authentication in the database.
func (*AuthenticationCreate) SaveX ¶
func (ac *AuthenticationCreate) SaveX(ctx context.Context) *Authentication
SaveX calls Save and panics if Save returns an error.
func (*AuthenticationCreate) SetAccount ¶
func (ac *AuthenticationCreate) SetAccount(a *Account) *AuthenticationCreate
SetAccount sets the "account" edge to the Account entity.
func (*AuthenticationCreate) SetAccountID ¶
func (ac *AuthenticationCreate) SetAccountID(id xid.ID) *AuthenticationCreate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*AuthenticationCreate) SetCreatedAt ¶
func (ac *AuthenticationCreate) SetCreatedAt(t time.Time) *AuthenticationCreate
SetCreatedAt sets the "created_at" field.
func (*AuthenticationCreate) SetID ¶
func (ac *AuthenticationCreate) SetID(x xid.ID) *AuthenticationCreate
SetID sets the "id" field.
func (*AuthenticationCreate) SetIdentifier ¶
func (ac *AuthenticationCreate) SetIdentifier(s string) *AuthenticationCreate
SetIdentifier sets the "identifier" field.
func (*AuthenticationCreate) SetMetadata ¶
func (ac *AuthenticationCreate) SetMetadata(m map[string]interface{}) *AuthenticationCreate
SetMetadata sets the "metadata" field.
func (*AuthenticationCreate) SetNillableAccountID ¶
func (ac *AuthenticationCreate) SetNillableAccountID(id *xid.ID) *AuthenticationCreate
SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.
func (*AuthenticationCreate) SetNillableCreatedAt ¶
func (ac *AuthenticationCreate) SetNillableCreatedAt(t *time.Time) *AuthenticationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AuthenticationCreate) SetNillableID ¶
func (ac *AuthenticationCreate) SetNillableID(x *xid.ID) *AuthenticationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AuthenticationCreate) SetService ¶
func (ac *AuthenticationCreate) SetService(s string) *AuthenticationCreate
SetService sets the "service" field.
func (*AuthenticationCreate) SetToken ¶
func (ac *AuthenticationCreate) SetToken(s string) *AuthenticationCreate
SetToken sets the "token" field.
type AuthenticationCreateBulk ¶
type AuthenticationCreateBulk struct {
// contains filtered or unexported fields
}
AuthenticationCreateBulk is the builder for creating many Authentication entities in bulk.
func (*AuthenticationCreateBulk) Exec ¶
func (acb *AuthenticationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthenticationCreateBulk) ExecX ¶
func (acb *AuthenticationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthenticationCreateBulk) OnConflict ¶
func (acb *AuthenticationCreateBulk) OnConflict(opts ...sql.ConflictOption) *AuthenticationUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Authentication.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AuthenticationUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*AuthenticationCreateBulk) OnConflictColumns ¶
func (acb *AuthenticationCreateBulk) OnConflictColumns(columns ...string) *AuthenticationUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Authentication.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AuthenticationCreateBulk) Save ¶
func (acb *AuthenticationCreateBulk) Save(ctx context.Context) ([]*Authentication, error)
Save creates the Authentication entities in the database.
func (*AuthenticationCreateBulk) SaveX ¶
func (acb *AuthenticationCreateBulk) SaveX(ctx context.Context) []*Authentication
SaveX is like Save, but panics if an error occurs.
type AuthenticationDelete ¶
type AuthenticationDelete struct {
// contains filtered or unexported fields
}
AuthenticationDelete is the builder for deleting a Authentication entity.
func (*AuthenticationDelete) Exec ¶
func (ad *AuthenticationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AuthenticationDelete) ExecX ¶
func (ad *AuthenticationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AuthenticationDelete) Where ¶
func (ad *AuthenticationDelete) Where(ps ...predicate.Authentication) *AuthenticationDelete
Where appends a list predicates to the AuthenticationDelete builder.
type AuthenticationDeleteOne ¶
type AuthenticationDeleteOne struct {
// contains filtered or unexported fields
}
AuthenticationDeleteOne is the builder for deleting a single Authentication entity.
func (*AuthenticationDeleteOne) Exec ¶
func (ado *AuthenticationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AuthenticationDeleteOne) ExecX ¶
func (ado *AuthenticationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AuthenticationEdges ¶
type AuthenticationEdges struct { // Account holds the value of the account edge. Account *Account `json:"account,omitempty"` // contains filtered or unexported fields }
AuthenticationEdges holds the relations/edges for other nodes in the graph.
func (AuthenticationEdges) AccountOrErr ¶
func (e AuthenticationEdges) AccountOrErr() (*Account, error)
AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AuthenticationGroupBy ¶
type AuthenticationGroupBy struct {
// contains filtered or unexported fields
}
AuthenticationGroupBy is the group-by builder for Authentication entities.
func (*AuthenticationGroupBy) Aggregate ¶
func (agb *AuthenticationGroupBy) Aggregate(fns ...AggregateFunc) *AuthenticationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AuthenticationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuthenticationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuthenticationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuthenticationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuthenticationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*AuthenticationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuthenticationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuthenticationGroupBy) Scan ¶
func (agb *AuthenticationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*AuthenticationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuthenticationMutation ¶
type AuthenticationMutation struct {
// contains filtered or unexported fields
}
AuthenticationMutation represents an operation that mutates the Authentication nodes in the graph.
func (*AuthenticationMutation) AccountCleared ¶
func (m *AuthenticationMutation) AccountCleared() bool
AccountCleared reports if the "account" edge to the Account entity was cleared.
func (*AuthenticationMutation) AccountID ¶
func (m *AuthenticationMutation) AccountID() (id xid.ID, exists bool)
AccountID returns the "account" edge ID in the mutation.
func (*AuthenticationMutation) AccountIDs ¶
func (m *AuthenticationMutation) AccountIDs() (ids []xid.ID)
AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.
func (*AuthenticationMutation) AddField ¶
func (m *AuthenticationMutation) 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 (*AuthenticationMutation) AddedEdges ¶
func (m *AuthenticationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AuthenticationMutation) AddedField ¶
func (m *AuthenticationMutation) 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 (*AuthenticationMutation) AddedFields ¶
func (m *AuthenticationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AuthenticationMutation) AddedIDs ¶
func (m *AuthenticationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AuthenticationMutation) ClearAccount ¶
func (m *AuthenticationMutation) ClearAccount()
ClearAccount clears the "account" edge to the Account entity.
func (*AuthenticationMutation) ClearEdge ¶
func (m *AuthenticationMutation) 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 (*AuthenticationMutation) ClearField ¶
func (m *AuthenticationMutation) 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 (*AuthenticationMutation) ClearMetadata ¶
func (m *AuthenticationMutation) ClearMetadata()
ClearMetadata clears the value of the "metadata" field.
func (*AuthenticationMutation) ClearedEdges ¶
func (m *AuthenticationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AuthenticationMutation) ClearedFields ¶
func (m *AuthenticationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AuthenticationMutation) Client ¶
func (m AuthenticationMutation) 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 (*AuthenticationMutation) CreatedAt ¶
func (m *AuthenticationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AuthenticationMutation) EdgeCleared ¶
func (m *AuthenticationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AuthenticationMutation) Field ¶
func (m *AuthenticationMutation) 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 (*AuthenticationMutation) FieldCleared ¶
func (m *AuthenticationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AuthenticationMutation) Fields ¶
func (m *AuthenticationMutation) 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 (*AuthenticationMutation) ID ¶
func (m *AuthenticationMutation) ID() (id xid.ID, 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 (*AuthenticationMutation) 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 (*AuthenticationMutation) Identifier ¶
func (m *AuthenticationMutation) Identifier() (r string, exists bool)
Identifier returns the value of the "identifier" field in the mutation.
func (*AuthenticationMutation) Metadata ¶
func (m *AuthenticationMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the value of the "metadata" field in the mutation.
func (*AuthenticationMutation) MetadataCleared ¶
func (m *AuthenticationMutation) MetadataCleared() bool
MetadataCleared returns if the "metadata" field was cleared in this mutation.
func (*AuthenticationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Authentication entity. If the Authentication 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 (*AuthenticationMutation) 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 (*AuthenticationMutation) OldIdentifier ¶
func (m *AuthenticationMutation) OldIdentifier(ctx context.Context) (v string, err error)
OldIdentifier returns the old "identifier" field's value of the Authentication entity. If the Authentication 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 (*AuthenticationMutation) OldMetadata ¶
func (m *AuthenticationMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old "metadata" field's value of the Authentication entity. If the Authentication 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 (*AuthenticationMutation) OldService ¶
func (m *AuthenticationMutation) OldService(ctx context.Context) (v string, err error)
OldService returns the old "service" field's value of the Authentication entity. If the Authentication 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 (*AuthenticationMutation) OldToken ¶
func (m *AuthenticationMutation) OldToken(ctx context.Context) (v string, err error)
OldToken returns the old "token" field's value of the Authentication entity. If the Authentication 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 (*AuthenticationMutation) Op ¶
func (m *AuthenticationMutation) Op() Op
Op returns the operation name.
func (*AuthenticationMutation) RemovedEdges ¶
func (m *AuthenticationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AuthenticationMutation) RemovedIDs ¶
func (m *AuthenticationMutation) 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 (*AuthenticationMutation) ResetAccount ¶
func (m *AuthenticationMutation) ResetAccount()
ResetAccount resets all changes to the "account" edge.
func (*AuthenticationMutation) ResetCreatedAt ¶
func (m *AuthenticationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AuthenticationMutation) ResetEdge ¶
func (m *AuthenticationMutation) 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 (*AuthenticationMutation) ResetField ¶
func (m *AuthenticationMutation) 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 (*AuthenticationMutation) ResetIdentifier ¶
func (m *AuthenticationMutation) ResetIdentifier()
ResetIdentifier resets all changes to the "identifier" field.
func (*AuthenticationMutation) ResetMetadata ¶
func (m *AuthenticationMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" field.
func (*AuthenticationMutation) ResetService ¶
func (m *AuthenticationMutation) ResetService()
ResetService resets all changes to the "service" field.
func (*AuthenticationMutation) ResetToken ¶
func (m *AuthenticationMutation) ResetToken()
ResetToken resets all changes to the "token" field.
func (*AuthenticationMutation) Service ¶
func (m *AuthenticationMutation) Service() (r string, exists bool)
Service returns the value of the "service" field in the mutation.
func (*AuthenticationMutation) SetAccountID ¶
func (m *AuthenticationMutation) SetAccountID(id xid.ID)
SetAccountID sets the "account" edge to the Account entity by id.
func (*AuthenticationMutation) SetCreatedAt ¶
func (m *AuthenticationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AuthenticationMutation) SetField ¶
func (m *AuthenticationMutation) 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 (*AuthenticationMutation) SetID ¶
func (m *AuthenticationMutation) SetID(id xid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Authentication entities.
func (*AuthenticationMutation) SetIdentifier ¶
func (m *AuthenticationMutation) SetIdentifier(s string)
SetIdentifier sets the "identifier" field.
func (*AuthenticationMutation) SetMetadata ¶
func (m *AuthenticationMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the "metadata" field.
func (*AuthenticationMutation) SetService ¶
func (m *AuthenticationMutation) SetService(s string)
SetService sets the "service" field.
func (*AuthenticationMutation) SetToken ¶
func (m *AuthenticationMutation) SetToken(s string)
SetToken sets the "token" field.
func (*AuthenticationMutation) Token ¶
func (m *AuthenticationMutation) Token() (r string, exists bool)
Token returns the value of the "token" field in the mutation.
func (AuthenticationMutation) Tx ¶
func (m AuthenticationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AuthenticationMutation) Type ¶
func (m *AuthenticationMutation) Type() string
Type returns the node type of this mutation (Authentication).
func (*AuthenticationMutation) Where ¶
func (m *AuthenticationMutation) Where(ps ...predicate.Authentication)
Where appends a list predicates to the AuthenticationMutation builder.
type AuthenticationQuery ¶
type AuthenticationQuery struct {
// contains filtered or unexported fields
}
AuthenticationQuery is the builder for querying Authentication entities.
func (*AuthenticationQuery) All ¶
func (aq *AuthenticationQuery) All(ctx context.Context) ([]*Authentication, error)
All executes the query and returns a list of Authentications.
func (*AuthenticationQuery) AllX ¶
func (aq *AuthenticationQuery) AllX(ctx context.Context) []*Authentication
AllX is like All, but panics if an error occurs.
func (*AuthenticationQuery) Clone ¶
func (aq *AuthenticationQuery) Clone() *AuthenticationQuery
Clone returns a duplicate of the AuthenticationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AuthenticationQuery) Count ¶
func (aq *AuthenticationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AuthenticationQuery) CountX ¶
func (aq *AuthenticationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AuthenticationQuery) Exist ¶
func (aq *AuthenticationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AuthenticationQuery) ExistX ¶
func (aq *AuthenticationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AuthenticationQuery) First ¶
func (aq *AuthenticationQuery) First(ctx context.Context) (*Authentication, error)
First returns the first Authentication entity from the query. Returns a *NotFoundError when no Authentication was found.
func (*AuthenticationQuery) FirstID ¶
FirstID returns the first Authentication ID from the query. Returns a *NotFoundError when no Authentication ID was found.
func (*AuthenticationQuery) FirstIDX ¶
func (aq *AuthenticationQuery) FirstIDX(ctx context.Context) xid.ID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AuthenticationQuery) FirstX ¶
func (aq *AuthenticationQuery) FirstX(ctx context.Context) *Authentication
FirstX is like First, but panics if an error occurs.
func (*AuthenticationQuery) GroupBy ¶
func (aq *AuthenticationQuery) GroupBy(field string, fields ...string) *AuthenticationGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Authentication.Query(). GroupBy(authentication.FieldCreatedAt). Aggregate(model.Count()). Scan(ctx, &v)
func (*AuthenticationQuery) IDsX ¶
func (aq *AuthenticationQuery) IDsX(ctx context.Context) []xid.ID
IDsX is like IDs, but panics if an error occurs.
func (*AuthenticationQuery) Limit ¶
func (aq *AuthenticationQuery) Limit(limit int) *AuthenticationQuery
Limit adds a limit step to the query.
func (*AuthenticationQuery) Modify ¶
func (aq *AuthenticationQuery) Modify(modifiers ...func(s *sql.Selector)) *AuthenticationSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*AuthenticationQuery) Offset ¶
func (aq *AuthenticationQuery) Offset(offset int) *AuthenticationQuery
Offset adds an offset step to the query.
func (*AuthenticationQuery) Only ¶
func (aq *AuthenticationQuery) Only(ctx context.Context) (*Authentication, error)
Only returns a single Authentication entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Authentication entity is found. Returns a *NotFoundError when no Authentication entities are found.
func (*AuthenticationQuery) OnlyID ¶
OnlyID is like Only, but returns the only Authentication ID in the query. Returns a *NotSingularError when more than one Authentication ID is found. Returns a *NotFoundError when no entities are found.
func (*AuthenticationQuery) OnlyIDX ¶
func (aq *AuthenticationQuery) OnlyIDX(ctx context.Context) xid.ID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AuthenticationQuery) OnlyX ¶
func (aq *AuthenticationQuery) OnlyX(ctx context.Context) *Authentication
OnlyX is like Only, but panics if an error occurs.
func (*AuthenticationQuery) Order ¶
func (aq *AuthenticationQuery) Order(o ...OrderFunc) *AuthenticationQuery
Order adds an order step to the query.
func (*AuthenticationQuery) QueryAccount ¶
func (aq *AuthenticationQuery) QueryAccount() *AccountQuery
QueryAccount chains the current query on the "account" edge.
func (*AuthenticationQuery) Select ¶
func (aq *AuthenticationQuery) Select(fields ...string) *AuthenticationSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Authentication.Query(). Select(authentication.FieldCreatedAt). Scan(ctx, &v)
func (*AuthenticationQuery) Unique ¶
func (aq *AuthenticationQuery) Unique(unique bool) *AuthenticationQuery
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 (*AuthenticationQuery) Where ¶
func (aq *AuthenticationQuery) Where(ps ...predicate.Authentication) *AuthenticationQuery
Where adds a new predicate for the AuthenticationQuery builder.
func (*AuthenticationQuery) WithAccount ¶
func (aq *AuthenticationQuery) WithAccount(opts ...func(*AccountQuery)) *AuthenticationQuery
WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.
type AuthenticationSelect ¶
type AuthenticationSelect struct { *AuthenticationQuery // contains filtered or unexported fields }
AuthenticationSelect is the builder for selecting fields of Authentication entities.
func (*AuthenticationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuthenticationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuthenticationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuthenticationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuthenticationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuthenticationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuthenticationSelect) Modify ¶
func (as *AuthenticationSelect) Modify(modifiers ...func(s *sql.Selector)) *AuthenticationSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*AuthenticationSelect) Scan ¶
func (as *AuthenticationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*AuthenticationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuthenticationUpdate ¶
type AuthenticationUpdate struct {
// contains filtered or unexported fields
}
AuthenticationUpdate is the builder for updating Authentication entities.
func (*AuthenticationUpdate) ClearAccount ¶
func (au *AuthenticationUpdate) ClearAccount() *AuthenticationUpdate
ClearAccount clears the "account" edge to the Account entity.
func (*AuthenticationUpdate) ClearMetadata ¶
func (au *AuthenticationUpdate) ClearMetadata() *AuthenticationUpdate
ClearMetadata clears the value of the "metadata" field.
func (*AuthenticationUpdate) Exec ¶
func (au *AuthenticationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthenticationUpdate) ExecX ¶
func (au *AuthenticationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthenticationUpdate) Modify ¶
func (au *AuthenticationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AuthenticationUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*AuthenticationUpdate) Mutation ¶
func (au *AuthenticationUpdate) Mutation() *AuthenticationMutation
Mutation returns the AuthenticationMutation object of the builder.
func (*AuthenticationUpdate) Save ¶
func (au *AuthenticationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AuthenticationUpdate) SaveX ¶
func (au *AuthenticationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AuthenticationUpdate) SetAccount ¶
func (au *AuthenticationUpdate) SetAccount(a *Account) *AuthenticationUpdate
SetAccount sets the "account" edge to the Account entity.
func (*AuthenticationUpdate) SetAccountID ¶
func (au *AuthenticationUpdate) SetAccountID(id xid.ID) *AuthenticationUpdate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*AuthenticationUpdate) SetIdentifier ¶
func (au *AuthenticationUpdate) SetIdentifier(s string) *AuthenticationUpdate
SetIdentifier sets the "identifier" field.
func (*AuthenticationUpdate) SetMetadata ¶
func (au *AuthenticationUpdate) SetMetadata(m map[string]interface{}) *AuthenticationUpdate
SetMetadata sets the "metadata" field.
func (*AuthenticationUpdate) SetNillableAccountID ¶
func (au *AuthenticationUpdate) SetNillableAccountID(id *xid.ID) *AuthenticationUpdate
SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.
func (*AuthenticationUpdate) SetService ¶
func (au *AuthenticationUpdate) SetService(s string) *AuthenticationUpdate
SetService sets the "service" field.
func (*AuthenticationUpdate) SetToken ¶
func (au *AuthenticationUpdate) SetToken(s string) *AuthenticationUpdate
SetToken sets the "token" field.
func (*AuthenticationUpdate) Where ¶
func (au *AuthenticationUpdate) Where(ps ...predicate.Authentication) *AuthenticationUpdate
Where appends a list predicates to the AuthenticationUpdate builder.
type AuthenticationUpdateOne ¶
type AuthenticationUpdateOne struct {
// contains filtered or unexported fields
}
AuthenticationUpdateOne is the builder for updating a single Authentication entity.
func (*AuthenticationUpdateOne) ClearAccount ¶
func (auo *AuthenticationUpdateOne) ClearAccount() *AuthenticationUpdateOne
ClearAccount clears the "account" edge to the Account entity.
func (*AuthenticationUpdateOne) ClearMetadata ¶
func (auo *AuthenticationUpdateOne) ClearMetadata() *AuthenticationUpdateOne
ClearMetadata clears the value of the "metadata" field.
func (*AuthenticationUpdateOne) Exec ¶
func (auo *AuthenticationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AuthenticationUpdateOne) ExecX ¶
func (auo *AuthenticationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthenticationUpdateOne) Modify ¶
func (auo *AuthenticationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AuthenticationUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*AuthenticationUpdateOne) Mutation ¶
func (auo *AuthenticationUpdateOne) Mutation() *AuthenticationMutation
Mutation returns the AuthenticationMutation object of the builder.
func (*AuthenticationUpdateOne) Save ¶
func (auo *AuthenticationUpdateOne) Save(ctx context.Context) (*Authentication, error)
Save executes the query and returns the updated Authentication entity.
func (*AuthenticationUpdateOne) SaveX ¶
func (auo *AuthenticationUpdateOne) SaveX(ctx context.Context) *Authentication
SaveX is like Save, but panics if an error occurs.
func (*AuthenticationUpdateOne) Select ¶
func (auo *AuthenticationUpdateOne) Select(field string, fields ...string) *AuthenticationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AuthenticationUpdateOne) SetAccount ¶
func (auo *AuthenticationUpdateOne) SetAccount(a *Account) *AuthenticationUpdateOne
SetAccount sets the "account" edge to the Account entity.
func (*AuthenticationUpdateOne) SetAccountID ¶
func (auo *AuthenticationUpdateOne) SetAccountID(id xid.ID) *AuthenticationUpdateOne
SetAccountID sets the "account" edge to the Account entity by ID.
func (*AuthenticationUpdateOne) SetIdentifier ¶
func (auo *AuthenticationUpdateOne) SetIdentifier(s string) *AuthenticationUpdateOne
SetIdentifier sets the "identifier" field.
func (*AuthenticationUpdateOne) SetMetadata ¶
func (auo *AuthenticationUpdateOne) SetMetadata(m map[string]interface{}) *AuthenticationUpdateOne
SetMetadata sets the "metadata" field.
func (*AuthenticationUpdateOne) SetNillableAccountID ¶
func (auo *AuthenticationUpdateOne) SetNillableAccountID(id *xid.ID) *AuthenticationUpdateOne
SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.
func (*AuthenticationUpdateOne) SetService ¶
func (auo *AuthenticationUpdateOne) SetService(s string) *AuthenticationUpdateOne
SetService sets the "service" field.
func (*AuthenticationUpdateOne) SetToken ¶
func (auo *AuthenticationUpdateOne) SetToken(s string) *AuthenticationUpdateOne
SetToken sets the "token" field.
type AuthenticationUpsert ¶
AuthenticationUpsert is the "OnConflict" setter.
func (*AuthenticationUpsert) ClearMetadata ¶
func (u *AuthenticationUpsert) ClearMetadata() *AuthenticationUpsert
ClearMetadata clears the value of the "metadata" field.
func (*AuthenticationUpsert) SetCreatedAt ¶
func (u *AuthenticationUpsert) SetCreatedAt(v time.Time) *AuthenticationUpsert
SetCreatedAt sets the "created_at" field.
func (*AuthenticationUpsert) SetIdentifier ¶
func (u *AuthenticationUpsert) SetIdentifier(v string) *AuthenticationUpsert
SetIdentifier sets the "identifier" field.
func (*AuthenticationUpsert) SetMetadata ¶
func (u *AuthenticationUpsert) SetMetadata(v map[string]interface{}) *AuthenticationUpsert
SetMetadata sets the "metadata" field.
func (*AuthenticationUpsert) SetService ¶
func (u *AuthenticationUpsert) SetService(v string) *AuthenticationUpsert
SetService sets the "service" field.
func (*AuthenticationUpsert) SetToken ¶
func (u *AuthenticationUpsert) SetToken(v string) *AuthenticationUpsert
SetToken sets the "token" field.
func (*AuthenticationUpsert) UpdateCreatedAt ¶
func (u *AuthenticationUpsert) UpdateCreatedAt() *AuthenticationUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AuthenticationUpsert) UpdateIdentifier ¶
func (u *AuthenticationUpsert) UpdateIdentifier() *AuthenticationUpsert
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
func (*AuthenticationUpsert) UpdateMetadata ¶
func (u *AuthenticationUpsert) UpdateMetadata() *AuthenticationUpsert
UpdateMetadata sets the "metadata" field to the value that was provided on create.
func (*AuthenticationUpsert) UpdateService ¶
func (u *AuthenticationUpsert) UpdateService() *AuthenticationUpsert
UpdateService sets the "service" field to the value that was provided on create.
func (*AuthenticationUpsert) UpdateToken ¶
func (u *AuthenticationUpsert) UpdateToken() *AuthenticationUpsert
UpdateToken sets the "token" field to the value that was provided on create.
type AuthenticationUpsertBulk ¶
type AuthenticationUpsertBulk struct {
// contains filtered or unexported fields
}
AuthenticationUpsertBulk is the builder for "upsert"-ing a bulk of Authentication nodes.
func (*AuthenticationUpsertBulk) ClearMetadata ¶
func (u *AuthenticationUpsertBulk) ClearMetadata() *AuthenticationUpsertBulk
ClearMetadata clears the value of the "metadata" field.
func (*AuthenticationUpsertBulk) DoNothing ¶
func (u *AuthenticationUpsertBulk) DoNothing() *AuthenticationUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AuthenticationUpsertBulk) Exec ¶
func (u *AuthenticationUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthenticationUpsertBulk) ExecX ¶
func (u *AuthenticationUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthenticationUpsertBulk) Ignore ¶
func (u *AuthenticationUpsertBulk) Ignore() *AuthenticationUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Authentication.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AuthenticationUpsertBulk) SetCreatedAt ¶
func (u *AuthenticationUpsertBulk) SetCreatedAt(v time.Time) *AuthenticationUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*AuthenticationUpsertBulk) SetIdentifier ¶
func (u *AuthenticationUpsertBulk) SetIdentifier(v string) *AuthenticationUpsertBulk
SetIdentifier sets the "identifier" field.
func (*AuthenticationUpsertBulk) SetMetadata ¶
func (u *AuthenticationUpsertBulk) SetMetadata(v map[string]interface{}) *AuthenticationUpsertBulk
SetMetadata sets the "metadata" field.
func (*AuthenticationUpsertBulk) SetService ¶
func (u *AuthenticationUpsertBulk) SetService(v string) *AuthenticationUpsertBulk
SetService sets the "service" field.
func (*AuthenticationUpsertBulk) SetToken ¶
func (u *AuthenticationUpsertBulk) SetToken(v string) *AuthenticationUpsertBulk
SetToken sets the "token" field.
func (*AuthenticationUpsertBulk) Update ¶
func (u *AuthenticationUpsertBulk) Update(set func(*AuthenticationUpsert)) *AuthenticationUpsertBulk
Update allows overriding fields `UPDATE` values. See the AuthenticationCreateBulk.OnConflict documentation for more info.
func (*AuthenticationUpsertBulk) UpdateCreatedAt ¶
func (u *AuthenticationUpsertBulk) UpdateCreatedAt() *AuthenticationUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AuthenticationUpsertBulk) UpdateIdentifier ¶
func (u *AuthenticationUpsertBulk) UpdateIdentifier() *AuthenticationUpsertBulk
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
func (*AuthenticationUpsertBulk) UpdateMetadata ¶
func (u *AuthenticationUpsertBulk) UpdateMetadata() *AuthenticationUpsertBulk
UpdateMetadata sets the "metadata" field to the value that was provided on create.
func (*AuthenticationUpsertBulk) UpdateNewValues ¶
func (u *AuthenticationUpsertBulk) UpdateNewValues() *AuthenticationUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Authentication.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(authentication.FieldID) }), ). Exec(ctx)
func (*AuthenticationUpsertBulk) UpdateService ¶
func (u *AuthenticationUpsertBulk) UpdateService() *AuthenticationUpsertBulk
UpdateService sets the "service" field to the value that was provided on create.
func (*AuthenticationUpsertBulk) UpdateToken ¶
func (u *AuthenticationUpsertBulk) UpdateToken() *AuthenticationUpsertBulk
UpdateToken sets the "token" field to the value that was provided on create.
type AuthenticationUpsertOne ¶
type AuthenticationUpsertOne struct {
// contains filtered or unexported fields
}
AuthenticationUpsertOne is the builder for "upsert"-ing
one Authentication node.
func (*AuthenticationUpsertOne) ClearMetadata ¶
func (u *AuthenticationUpsertOne) ClearMetadata() *AuthenticationUpsertOne
ClearMetadata clears the value of the "metadata" field.
func (*AuthenticationUpsertOne) DoNothing ¶
func (u *AuthenticationUpsertOne) DoNothing() *AuthenticationUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AuthenticationUpsertOne) Exec ¶
func (u *AuthenticationUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthenticationUpsertOne) ExecX ¶
func (u *AuthenticationUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthenticationUpsertOne) ID ¶
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*AuthenticationUpsertOne) IDX ¶
func (u *AuthenticationUpsertOne) IDX(ctx context.Context) xid.ID
IDX is like ID, but panics if an error occurs.
func (*AuthenticationUpsertOne) Ignore ¶
func (u *AuthenticationUpsertOne) Ignore() *AuthenticationUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Authentication.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AuthenticationUpsertOne) SetCreatedAt ¶
func (u *AuthenticationUpsertOne) SetCreatedAt(v time.Time) *AuthenticationUpsertOne
SetCreatedAt sets the "created_at" field.
func (*AuthenticationUpsertOne) SetIdentifier ¶
func (u *AuthenticationUpsertOne) SetIdentifier(v string) *AuthenticationUpsertOne
SetIdentifier sets the "identifier" field.
func (*AuthenticationUpsertOne) SetMetadata ¶
func (u *AuthenticationUpsertOne) SetMetadata(v map[string]interface{}) *AuthenticationUpsertOne
SetMetadata sets the "metadata" field.
func (*AuthenticationUpsertOne) SetService ¶
func (u *AuthenticationUpsertOne) SetService(v string) *AuthenticationUpsertOne
SetService sets the "service" field.
func (*AuthenticationUpsertOne) SetToken ¶
func (u *AuthenticationUpsertOne) SetToken(v string) *AuthenticationUpsertOne
SetToken sets the "token" field.
func (*AuthenticationUpsertOne) Update ¶
func (u *AuthenticationUpsertOne) Update(set func(*AuthenticationUpsert)) *AuthenticationUpsertOne
Update allows overriding fields `UPDATE` values. See the AuthenticationCreate.OnConflict documentation for more info.
func (*AuthenticationUpsertOne) UpdateCreatedAt ¶
func (u *AuthenticationUpsertOne) UpdateCreatedAt() *AuthenticationUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AuthenticationUpsertOne) UpdateIdentifier ¶
func (u *AuthenticationUpsertOne) UpdateIdentifier() *AuthenticationUpsertOne
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
func (*AuthenticationUpsertOne) UpdateMetadata ¶
func (u *AuthenticationUpsertOne) UpdateMetadata() *AuthenticationUpsertOne
UpdateMetadata sets the "metadata" field to the value that was provided on create.
func (*AuthenticationUpsertOne) UpdateNewValues ¶
func (u *AuthenticationUpsertOne) UpdateNewValues() *AuthenticationUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Authentication.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(authentication.FieldID) }), ). Exec(ctx)
func (*AuthenticationUpsertOne) UpdateService ¶
func (u *AuthenticationUpsertOne) UpdateService() *AuthenticationUpsertOne
UpdateService sets the "service" field to the value that was provided on create.
func (*AuthenticationUpsertOne) UpdateToken ¶
func (u *AuthenticationUpsertOne) UpdateToken() *AuthenticationUpsertOne
UpdateToken sets the "token" field to the value that was provided on create.
type Authentications ¶
type Authentications []*Authentication
Authentications is a parsable slice of Authentication.
type Category ¶
type Category struct { // ID of the ent. ID xid.ID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Colour holds the value of the "colour" field. Colour string `json:"colour,omitempty"` // Sort holds the value of the "sort" field. Sort int `json:"sort,omitempty"` // Admin holds the value of the "admin" field. Admin bool `json:"admin,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CategoryQuery when eager-loading is set. Edges CategoryEdges `json:"edges"` // contains filtered or unexported fields }
Category is the model entity for the Category schema.
func (*Category) QueryPosts ¶
QueryPosts queries the "posts" edge of the Category entity.
func (*Category) Unwrap ¶
Unwrap unwraps the Category 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 (*Category) Update ¶
func (c *Category) Update() *CategoryUpdateOne
Update returns a builder for updating this Category. Note that you need to call Category.Unwrap() before calling this method if this Category was returned from a transaction, and the transaction was committed or rolled back.
type CategoryClient ¶
type CategoryClient struct {
// contains filtered or unexported fields
}
CategoryClient is a client for the Category schema.
func NewCategoryClient ¶
func NewCategoryClient(c config) *CategoryClient
NewCategoryClient returns a client for the Category from the given config.
func (*CategoryClient) Create ¶
func (c *CategoryClient) Create() *CategoryCreate
Create returns a builder for creating a Category entity.
func (*CategoryClient) CreateBulk ¶
func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk
CreateBulk returns a builder for creating a bulk of Category entities.
func (*CategoryClient) Delete ¶
func (c *CategoryClient) Delete() *CategoryDelete
Delete returns a delete builder for Category.
func (*CategoryClient) DeleteOne ¶
func (c *CategoryClient) DeleteOne(ca *Category) *CategoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CategoryClient) DeleteOneID ¶
func (c *CategoryClient) DeleteOneID(id xid.ID) *CategoryDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*CategoryClient) Hooks ¶
func (c *CategoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CategoryClient) Query ¶
func (c *CategoryClient) Query() *CategoryQuery
Query returns a query builder for Category.
func (*CategoryClient) QueryPosts ¶
func (c *CategoryClient) QueryPosts(ca *Category) *PostQuery
QueryPosts queries the posts edge of a Category.
func (*CategoryClient) Update ¶
func (c *CategoryClient) Update() *CategoryUpdate
Update returns an update builder for Category.
func (*CategoryClient) UpdateOne ¶
func (c *CategoryClient) UpdateOne(ca *Category) *CategoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CategoryClient) UpdateOneID ¶
func (c *CategoryClient) UpdateOneID(id xid.ID) *CategoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CategoryClient) Use ¶
func (c *CategoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `category.Hooks(f(g(h())))`.
type CategoryCreate ¶
type CategoryCreate struct {
// contains filtered or unexported fields
}
CategoryCreate is the builder for creating a Category entity.
func (*CategoryCreate) AddPostIDs ¶
func (cc *CategoryCreate) AddPostIDs(ids ...xid.ID) *CategoryCreate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*CategoryCreate) AddPosts ¶
func (cc *CategoryCreate) AddPosts(p ...*Post) *CategoryCreate
AddPosts adds the "posts" edges to the Post entity.
func (*CategoryCreate) Exec ¶
func (cc *CategoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryCreate) ExecX ¶
func (cc *CategoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryCreate) Mutation ¶
func (cc *CategoryCreate) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryCreate) OnConflict ¶
func (cc *CategoryCreate) OnConflict(opts ...sql.ConflictOption) *CategoryUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Category.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.CategoryUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*CategoryCreate) OnConflictColumns ¶
func (cc *CategoryCreate) OnConflictColumns(columns ...string) *CategoryUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Category.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*CategoryCreate) Save ¶
func (cc *CategoryCreate) Save(ctx context.Context) (*Category, error)
Save creates the Category in the database.
func (*CategoryCreate) SaveX ¶
func (cc *CategoryCreate) SaveX(ctx context.Context) *Category
SaveX calls Save and panics if Save returns an error.
func (*CategoryCreate) SetAdmin ¶
func (cc *CategoryCreate) SetAdmin(b bool) *CategoryCreate
SetAdmin sets the "admin" field.
func (*CategoryCreate) SetColour ¶
func (cc *CategoryCreate) SetColour(s string) *CategoryCreate
SetColour sets the "colour" field.
func (*CategoryCreate) SetCreatedAt ¶
func (cc *CategoryCreate) SetCreatedAt(t time.Time) *CategoryCreate
SetCreatedAt sets the "created_at" field.
func (*CategoryCreate) SetDescription ¶
func (cc *CategoryCreate) SetDescription(s string) *CategoryCreate
SetDescription sets the "description" field.
func (*CategoryCreate) SetID ¶
func (cc *CategoryCreate) SetID(x xid.ID) *CategoryCreate
SetID sets the "id" field.
func (*CategoryCreate) SetName ¶
func (cc *CategoryCreate) SetName(s string) *CategoryCreate
SetName sets the "name" field.
func (*CategoryCreate) SetNillableAdmin ¶
func (cc *CategoryCreate) SetNillableAdmin(b *bool) *CategoryCreate
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*CategoryCreate) SetNillableColour ¶
func (cc *CategoryCreate) SetNillableColour(s *string) *CategoryCreate
SetNillableColour sets the "colour" field if the given value is not nil.
func (*CategoryCreate) SetNillableCreatedAt ¶
func (cc *CategoryCreate) SetNillableCreatedAt(t *time.Time) *CategoryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CategoryCreate) SetNillableDescription ¶
func (cc *CategoryCreate) SetNillableDescription(s *string) *CategoryCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*CategoryCreate) SetNillableID ¶
func (cc *CategoryCreate) SetNillableID(x *xid.ID) *CategoryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CategoryCreate) SetNillableSort ¶
func (cc *CategoryCreate) SetNillableSort(i *int) *CategoryCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*CategoryCreate) SetNillableUpdatedAt ¶
func (cc *CategoryCreate) SetNillableUpdatedAt(t *time.Time) *CategoryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CategoryCreate) SetSort ¶
func (cc *CategoryCreate) SetSort(i int) *CategoryCreate
SetSort sets the "sort" field.
func (*CategoryCreate) SetUpdatedAt ¶
func (cc *CategoryCreate) SetUpdatedAt(t time.Time) *CategoryCreate
SetUpdatedAt sets the "updated_at" field.
type CategoryCreateBulk ¶
type CategoryCreateBulk struct {
// contains filtered or unexported fields
}
CategoryCreateBulk is the builder for creating many Category entities in bulk.
func (*CategoryCreateBulk) Exec ¶
func (ccb *CategoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryCreateBulk) ExecX ¶
func (ccb *CategoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryCreateBulk) OnConflict ¶
func (ccb *CategoryCreateBulk) OnConflict(opts ...sql.ConflictOption) *CategoryUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Category.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.CategoryUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*CategoryCreateBulk) OnConflictColumns ¶
func (ccb *CategoryCreateBulk) OnConflictColumns(columns ...string) *CategoryUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Category.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type CategoryDelete ¶
type CategoryDelete struct {
// contains filtered or unexported fields
}
CategoryDelete is the builder for deleting a Category entity.
func (*CategoryDelete) Exec ¶
func (cd *CategoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CategoryDelete) ExecX ¶
func (cd *CategoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CategoryDelete) Where ¶
func (cd *CategoryDelete) Where(ps ...predicate.Category) *CategoryDelete
Where appends a list predicates to the CategoryDelete builder.
type CategoryDeleteOne ¶
type CategoryDeleteOne struct {
// contains filtered or unexported fields
}
CategoryDeleteOne is the builder for deleting a single Category entity.
func (*CategoryDeleteOne) Exec ¶
func (cdo *CategoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CategoryDeleteOne) ExecX ¶
func (cdo *CategoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CategoryEdges ¶
type CategoryEdges struct { // Posts holds the value of the posts edge. Posts []*Post `json:"posts,omitempty"` // contains filtered or unexported fields }
CategoryEdges holds the relations/edges for other nodes in the graph.
func (CategoryEdges) PostsOrErr ¶
func (e CategoryEdges) PostsOrErr() ([]*Post, error)
PostsOrErr returns the Posts value or an error if the edge was not loaded in eager-loading.
type CategoryGroupBy ¶
type CategoryGroupBy struct {
// contains filtered or unexported fields
}
CategoryGroupBy is the group-by builder for Category entities.
func (*CategoryGroupBy) Aggregate ¶
func (cgb *CategoryGroupBy) Aggregate(fns ...AggregateFunc) *CategoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CategoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Scan ¶
func (cgb *CategoryGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*CategoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CategoryMutation ¶
type CategoryMutation struct {
// contains filtered or unexported fields
}
CategoryMutation represents an operation that mutates the Category nodes in the graph.
func (*CategoryMutation) AddField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) AddPostIDs ¶
func (m *CategoryMutation) AddPostIDs(ids ...xid.ID)
AddPostIDs adds the "posts" edge to the Post entity by ids.
func (*CategoryMutation) AddSort ¶
func (m *CategoryMutation) AddSort(i int)
AddSort adds i to the "sort" field.
func (*CategoryMutation) AddedEdges ¶
func (m *CategoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CategoryMutation) AddedField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) AddedFields ¶
func (m *CategoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CategoryMutation) AddedIDs ¶
func (m *CategoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CategoryMutation) AddedSort ¶
func (m *CategoryMutation) AddedSort() (r int, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*CategoryMutation) Admin ¶
func (m *CategoryMutation) Admin() (r bool, exists bool)
Admin returns the value of the "admin" field in the mutation.
func (*CategoryMutation) ClearEdge ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ClearField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ClearPosts ¶
func (m *CategoryMutation) ClearPosts()
ClearPosts clears the "posts" edge to the Post entity.
func (*CategoryMutation) ClearedEdges ¶
func (m *CategoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CategoryMutation) ClearedFields ¶
func (m *CategoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CategoryMutation) Client ¶
func (m CategoryMutation) 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 (*CategoryMutation) Colour ¶
func (m *CategoryMutation) Colour() (r string, exists bool)
Colour returns the value of the "colour" field in the mutation.
func (*CategoryMutation) CreatedAt ¶
func (m *CategoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CategoryMutation) Description ¶
func (m *CategoryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*CategoryMutation) EdgeCleared ¶
func (m *CategoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CategoryMutation) Field ¶
func (m *CategoryMutation) 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 (*CategoryMutation) FieldCleared ¶
func (m *CategoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CategoryMutation) Fields ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ID ¶
func (m *CategoryMutation) ID() (id xid.ID, 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 (*CategoryMutation) 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 (*CategoryMutation) Name ¶
func (m *CategoryMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CategoryMutation) OldAdmin ¶
func (m *CategoryMutation) OldAdmin(ctx context.Context) (v bool, err error)
OldAdmin returns the old "admin" field's value of the Category entity. If the Category 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 (*CategoryMutation) OldColour ¶
func (m *CategoryMutation) OldColour(ctx context.Context) (v string, err error)
OldColour returns the old "colour" field's value of the Category entity. If the Category 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 (*CategoryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Category entity. If the Category 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 (*CategoryMutation) OldDescription ¶
func (m *CategoryMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Category entity. If the Category 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 (*CategoryMutation) 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 (*CategoryMutation) OldName ¶
func (m *CategoryMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Category entity. If the Category 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 (*CategoryMutation) OldSort ¶
func (m *CategoryMutation) OldSort(ctx context.Context) (v int, err error)
OldSort returns the old "sort" field's value of the Category entity. If the Category 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 (*CategoryMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Category entity. If the Category 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 (*CategoryMutation) PostsCleared ¶
func (m *CategoryMutation) PostsCleared() bool
PostsCleared reports if the "posts" edge to the Post entity was cleared.
func (*CategoryMutation) PostsIDs ¶
func (m *CategoryMutation) PostsIDs() (ids []xid.ID)
PostsIDs returns the "posts" edge IDs in the mutation.
func (*CategoryMutation) RemovePostIDs ¶
func (m *CategoryMutation) RemovePostIDs(ids ...xid.ID)
RemovePostIDs removes the "posts" edge to the Post entity by IDs.
func (*CategoryMutation) RemovedEdges ¶
func (m *CategoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CategoryMutation) RemovedIDs ¶
func (m *CategoryMutation) 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 (*CategoryMutation) RemovedPostsIDs ¶
func (m *CategoryMutation) RemovedPostsIDs() (ids []xid.ID)
RemovedPosts returns the removed IDs of the "posts" edge to the Post entity.
func (*CategoryMutation) ResetAdmin ¶
func (m *CategoryMutation) ResetAdmin()
ResetAdmin resets all changes to the "admin" field.
func (*CategoryMutation) ResetColour ¶
func (m *CategoryMutation) ResetColour()
ResetColour resets all changes to the "colour" field.
func (*CategoryMutation) ResetCreatedAt ¶
func (m *CategoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CategoryMutation) ResetDescription ¶
func (m *CategoryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*CategoryMutation) ResetEdge ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ResetField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ResetName ¶
func (m *CategoryMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CategoryMutation) ResetPosts ¶
func (m *CategoryMutation) ResetPosts()
ResetPosts resets all changes to the "posts" edge.
func (*CategoryMutation) ResetSort ¶
func (m *CategoryMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*CategoryMutation) ResetUpdatedAt ¶
func (m *CategoryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CategoryMutation) SetAdmin ¶
func (m *CategoryMutation) SetAdmin(b bool)
SetAdmin sets the "admin" field.
func (*CategoryMutation) SetColour ¶
func (m *CategoryMutation) SetColour(s string)
SetColour sets the "colour" field.
func (*CategoryMutation) SetCreatedAt ¶
func (m *CategoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CategoryMutation) SetDescription ¶
func (m *CategoryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*CategoryMutation) SetField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) SetID ¶
func (m *CategoryMutation) SetID(id xid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Category entities.
func (*CategoryMutation) SetName ¶
func (m *CategoryMutation) SetName(s string)
SetName sets the "name" field.
func (*CategoryMutation) SetSort ¶
func (m *CategoryMutation) SetSort(i int)
SetSort sets the "sort" field.
func (*CategoryMutation) SetUpdatedAt ¶
func (m *CategoryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CategoryMutation) Sort ¶
func (m *CategoryMutation) Sort() (r int, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (CategoryMutation) Tx ¶
func (m CategoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CategoryMutation) Type ¶
func (m *CategoryMutation) Type() string
Type returns the node type of this mutation (Category).
func (*CategoryMutation) UpdatedAt ¶
func (m *CategoryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CategoryMutation) Where ¶
func (m *CategoryMutation) Where(ps ...predicate.Category)
Where appends a list predicates to the CategoryMutation builder.
type CategoryQuery ¶
type CategoryQuery struct {
// contains filtered or unexported fields
}
CategoryQuery is the builder for querying Category entities.
func (*CategoryQuery) All ¶
func (cq *CategoryQuery) All(ctx context.Context) ([]*Category, error)
All executes the query and returns a list of Categories.
func (*CategoryQuery) AllX ¶
func (cq *CategoryQuery) AllX(ctx context.Context) []*Category
AllX is like All, but panics if an error occurs.
func (*CategoryQuery) Clone ¶
func (cq *CategoryQuery) Clone() *CategoryQuery
Clone returns a duplicate of the CategoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CategoryQuery) Count ¶
func (cq *CategoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CategoryQuery) CountX ¶
func (cq *CategoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CategoryQuery) Exist ¶
func (cq *CategoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CategoryQuery) ExistX ¶
func (cq *CategoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CategoryQuery) First ¶
func (cq *CategoryQuery) First(ctx context.Context) (*Category, error)
First returns the first Category entity from the query. Returns a *NotFoundError when no Category was found.
func (*CategoryQuery) FirstID ¶
FirstID returns the first Category ID from the query. Returns a *NotFoundError when no Category ID was found.
func (*CategoryQuery) FirstIDX ¶
func (cq *CategoryQuery) FirstIDX(ctx context.Context) xid.ID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CategoryQuery) FirstX ¶
func (cq *CategoryQuery) FirstX(ctx context.Context) *Category
FirstX is like First, but panics if an error occurs.
func (*CategoryQuery) GroupBy ¶
func (cq *CategoryQuery) GroupBy(field string, fields ...string) *CategoryGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Category.Query(). GroupBy(category.FieldCreatedAt). Aggregate(model.Count()). Scan(ctx, &v)
func (*CategoryQuery) IDsX ¶
func (cq *CategoryQuery) IDsX(ctx context.Context) []xid.ID
IDsX is like IDs, but panics if an error occurs.
func (*CategoryQuery) Limit ¶
func (cq *CategoryQuery) Limit(limit int) *CategoryQuery
Limit adds a limit step to the query.
func (*CategoryQuery) Modify ¶
func (cq *CategoryQuery) Modify(modifiers ...func(s *sql.Selector)) *CategorySelect
Modify adds a query modifier for attaching custom logic to queries.
func (*CategoryQuery) Offset ¶
func (cq *CategoryQuery) Offset(offset int) *CategoryQuery
Offset adds an offset step to the query.
func (*CategoryQuery) Only ¶
func (cq *CategoryQuery) Only(ctx context.Context) (*Category, error)
Only returns a single Category entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Category entity is found. Returns a *NotFoundError when no Category entities are found.
func (*CategoryQuery) OnlyID ¶
OnlyID is like Only, but returns the only Category ID in the query. Returns a *NotSingularError when more than one Category ID is found. Returns a *NotFoundError when no entities are found.
func (*CategoryQuery) OnlyIDX ¶
func (cq *CategoryQuery) OnlyIDX(ctx context.Context) xid.ID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CategoryQuery) OnlyX ¶
func (cq *CategoryQuery) OnlyX(ctx context.Context) *Category
OnlyX is like Only, but panics if an error occurs.
func (*CategoryQuery) Order ¶
func (cq *CategoryQuery) Order(o ...OrderFunc) *CategoryQuery
Order adds an order step to the query.
func (*CategoryQuery) QueryPosts ¶
func (cq *CategoryQuery) QueryPosts() *PostQuery
QueryPosts chains the current query on the "posts" edge.
func (*CategoryQuery) Select ¶
func (cq *CategoryQuery) Select(fields ...string) *CategorySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Category.Query(). Select(category.FieldCreatedAt). Scan(ctx, &v)
func (*CategoryQuery) Unique ¶
func (cq *CategoryQuery) Unique(unique bool) *CategoryQuery
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 (*CategoryQuery) Where ¶
func (cq *CategoryQuery) Where(ps ...predicate.Category) *CategoryQuery
Where adds a new predicate for the CategoryQuery builder.
func (*CategoryQuery) WithPosts ¶
func (cq *CategoryQuery) WithPosts(opts ...func(*PostQuery)) *CategoryQuery
WithPosts tells the query-builder to eager-load the nodes that are connected to the "posts" edge. The optional arguments are used to configure the query builder of the edge.
type CategorySelect ¶
type CategorySelect struct { *CategoryQuery // contains filtered or unexported fields }
CategorySelect is the builder for selecting fields of Category entities.
func (*CategorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Modify ¶
func (cs *CategorySelect) Modify(modifiers ...func(s *sql.Selector)) *CategorySelect
Modify adds a query modifier for attaching custom logic to queries.
func (*CategorySelect) Scan ¶
func (cs *CategorySelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*CategorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CategoryUpdate ¶
type CategoryUpdate struct {
// contains filtered or unexported fields
}
CategoryUpdate is the builder for updating Category entities.
func (*CategoryUpdate) AddPostIDs ¶
func (cu *CategoryUpdate) AddPostIDs(ids ...xid.ID) *CategoryUpdate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*CategoryUpdate) AddPosts ¶
func (cu *CategoryUpdate) AddPosts(p ...*Post) *CategoryUpdate
AddPosts adds the "posts" edges to the Post entity.
func (*CategoryUpdate) AddSort ¶
func (cu *CategoryUpdate) AddSort(i int) *CategoryUpdate
AddSort adds i to the "sort" field.
func (*CategoryUpdate) ClearPosts ¶
func (cu *CategoryUpdate) ClearPosts() *CategoryUpdate
ClearPosts clears all "posts" edges to the Post entity.
func (*CategoryUpdate) Exec ¶
func (cu *CategoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryUpdate) ExecX ¶
func (cu *CategoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryUpdate) Modify ¶
func (cu *CategoryUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CategoryUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*CategoryUpdate) Mutation ¶
func (cu *CategoryUpdate) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryUpdate) RemovePostIDs ¶
func (cu *CategoryUpdate) RemovePostIDs(ids ...xid.ID) *CategoryUpdate
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*CategoryUpdate) RemovePosts ¶
func (cu *CategoryUpdate) RemovePosts(p ...*Post) *CategoryUpdate
RemovePosts removes "posts" edges to Post entities.
func (*CategoryUpdate) Save ¶
func (cu *CategoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CategoryUpdate) SaveX ¶
func (cu *CategoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CategoryUpdate) SetAdmin ¶
func (cu *CategoryUpdate) SetAdmin(b bool) *CategoryUpdate
SetAdmin sets the "admin" field.
func (*CategoryUpdate) SetColour ¶
func (cu *CategoryUpdate) SetColour(s string) *CategoryUpdate
SetColour sets the "colour" field.
func (*CategoryUpdate) SetDescription ¶
func (cu *CategoryUpdate) SetDescription(s string) *CategoryUpdate
SetDescription sets the "description" field.
func (*CategoryUpdate) SetName ¶
func (cu *CategoryUpdate) SetName(s string) *CategoryUpdate
SetName sets the "name" field.
func (*CategoryUpdate) SetNillableAdmin ¶
func (cu *CategoryUpdate) SetNillableAdmin(b *bool) *CategoryUpdate
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*CategoryUpdate) SetNillableColour ¶
func (cu *CategoryUpdate) SetNillableColour(s *string) *CategoryUpdate
SetNillableColour sets the "colour" field if the given value is not nil.
func (*CategoryUpdate) SetNillableDescription ¶
func (cu *CategoryUpdate) SetNillableDescription(s *string) *CategoryUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*CategoryUpdate) SetNillableSort ¶
func (cu *CategoryUpdate) SetNillableSort(i *int) *CategoryUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*CategoryUpdate) SetSort ¶
func (cu *CategoryUpdate) SetSort(i int) *CategoryUpdate
SetSort sets the "sort" field.
func (*CategoryUpdate) SetUpdatedAt ¶
func (cu *CategoryUpdate) SetUpdatedAt(t time.Time) *CategoryUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CategoryUpdate) Where ¶
func (cu *CategoryUpdate) Where(ps ...predicate.Category) *CategoryUpdate
Where appends a list predicates to the CategoryUpdate builder.
type CategoryUpdateOne ¶
type CategoryUpdateOne struct {
// contains filtered or unexported fields
}
CategoryUpdateOne is the builder for updating a single Category entity.
func (*CategoryUpdateOne) AddPostIDs ¶
func (cuo *CategoryUpdateOne) AddPostIDs(ids ...xid.ID) *CategoryUpdateOne
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*CategoryUpdateOne) AddPosts ¶
func (cuo *CategoryUpdateOne) AddPosts(p ...*Post) *CategoryUpdateOne
AddPosts adds the "posts" edges to the Post entity.
func (*CategoryUpdateOne) AddSort ¶
func (cuo *CategoryUpdateOne) AddSort(i int) *CategoryUpdateOne
AddSort adds i to the "sort" field.
func (*CategoryUpdateOne) ClearPosts ¶
func (cuo *CategoryUpdateOne) ClearPosts() *CategoryUpdateOne
ClearPosts clears all "posts" edges to the Post entity.
func (*CategoryUpdateOne) Exec ¶
func (cuo *CategoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CategoryUpdateOne) ExecX ¶
func (cuo *CategoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryUpdateOne) Modify ¶
func (cuo *CategoryUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CategoryUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*CategoryUpdateOne) Mutation ¶
func (cuo *CategoryUpdateOne) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryUpdateOne) RemovePostIDs ¶
func (cuo *CategoryUpdateOne) RemovePostIDs(ids ...xid.ID) *CategoryUpdateOne
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*CategoryUpdateOne) RemovePosts ¶
func (cuo *CategoryUpdateOne) RemovePosts(p ...*Post) *CategoryUpdateOne
RemovePosts removes "posts" edges to Post entities.
func (*CategoryUpdateOne) Save ¶
func (cuo *CategoryUpdateOne) Save(ctx context.Context) (*Category, error)
Save executes the query and returns the updated Category entity.
func (*CategoryUpdateOne) SaveX ¶
func (cuo *CategoryUpdateOne) SaveX(ctx context.Context) *Category
SaveX is like Save, but panics if an error occurs.
func (*CategoryUpdateOne) Select ¶
func (cuo *CategoryUpdateOne) Select(field string, fields ...string) *CategoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CategoryUpdateOne) SetAdmin ¶
func (cuo *CategoryUpdateOne) SetAdmin(b bool) *CategoryUpdateOne
SetAdmin sets the "admin" field.
func (*CategoryUpdateOne) SetColour ¶
func (cuo *CategoryUpdateOne) SetColour(s string) *CategoryUpdateOne
SetColour sets the "colour" field.
func (*CategoryUpdateOne) SetDescription ¶
func (cuo *CategoryUpdateOne) SetDescription(s string) *CategoryUpdateOne
SetDescription sets the "description" field.
func (*CategoryUpdateOne) SetName ¶
func (cuo *CategoryUpdateOne) SetName(s string) *CategoryUpdateOne
SetName sets the "name" field.
func (*CategoryUpdateOne) SetNillableAdmin ¶
func (cuo *CategoryUpdateOne) SetNillableAdmin(b *bool) *CategoryUpdateOne
SetNillableAdmin sets the "admin" field if the given value is not nil.
func (*CategoryUpdateOne) SetNillableColour ¶
func (cuo *CategoryUpdateOne) SetNillableColour(s *string) *CategoryUpdateOne
SetNillableColour sets the "colour" field if the given value is not nil.
func (*CategoryUpdateOne) SetNillableDescription ¶
func (cuo *CategoryUpdateOne) SetNillableDescription(s *string) *CategoryUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*CategoryUpdateOne) SetNillableSort ¶
func (cuo *CategoryUpdateOne) SetNillableSort(i *int) *CategoryUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*CategoryUpdateOne) SetSort ¶
func (cuo *CategoryUpdateOne) SetSort(i int) *CategoryUpdateOne
SetSort sets the "sort" field.
func (*CategoryUpdateOne) SetUpdatedAt ¶
func (cuo *CategoryUpdateOne) SetUpdatedAt(t time.Time) *CategoryUpdateOne
SetUpdatedAt sets the "updated_at" field.
type CategoryUpsert ¶
CategoryUpsert is the "OnConflict" setter.
func (*CategoryUpsert) AddSort ¶
func (u *CategoryUpsert) AddSort(v int) *CategoryUpsert
AddSort adds v to the "sort" field.
func (*CategoryUpsert) SetAdmin ¶
func (u *CategoryUpsert) SetAdmin(v bool) *CategoryUpsert
SetAdmin sets the "admin" field.
func (*CategoryUpsert) SetColour ¶
func (u *CategoryUpsert) SetColour(v string) *CategoryUpsert
SetColour sets the "colour" field.
func (*CategoryUpsert) SetCreatedAt ¶
func (u *CategoryUpsert) SetCreatedAt(v time.Time) *CategoryUpsert
SetCreatedAt sets the "created_at" field.
func (*CategoryUpsert) SetDescription ¶
func (u *CategoryUpsert) SetDescription(v string) *CategoryUpsert
SetDescription sets the "description" field.
func (*CategoryUpsert) SetName ¶
func (u *CategoryUpsert) SetName(v string) *CategoryUpsert
SetName sets the "name" field.
func (*CategoryUpsert) SetSort ¶
func (u *CategoryUpsert) SetSort(v int) *CategoryUpsert
SetSort sets the "sort" field.
func (*CategoryUpsert) SetUpdatedAt ¶
func (u *CategoryUpsert) SetUpdatedAt(v time.Time) *CategoryUpsert
SetUpdatedAt sets the "updated_at" field.
func (*CategoryUpsert) UpdateAdmin ¶
func (u *CategoryUpsert) UpdateAdmin() *CategoryUpsert
UpdateAdmin sets the "admin" field to the value that was provided on create.
func (*CategoryUpsert) UpdateColour ¶
func (u *CategoryUpsert) UpdateColour() *CategoryUpsert
UpdateColour sets the "colour" field to the value that was provided on create.
func (*CategoryUpsert) UpdateCreatedAt ¶
func (u *CategoryUpsert) UpdateCreatedAt() *CategoryUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*CategoryUpsert) UpdateDescription ¶
func (u *CategoryUpsert) UpdateDescription() *CategoryUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*CategoryUpsert) UpdateName ¶
func (u *CategoryUpsert) UpdateName() *CategoryUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*CategoryUpsert) UpdateSort ¶
func (u *CategoryUpsert) UpdateSort() *CategoryUpsert
UpdateSort sets the "sort" field to the value that was provided on create.
func (*CategoryUpsert) UpdateUpdatedAt ¶
func (u *CategoryUpsert) UpdateUpdatedAt() *CategoryUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type CategoryUpsertBulk ¶
type CategoryUpsertBulk struct {
// contains filtered or unexported fields
}
CategoryUpsertBulk is the builder for "upsert"-ing a bulk of Category nodes.
func (*CategoryUpsertBulk) AddSort ¶
func (u *CategoryUpsertBulk) AddSort(v int) *CategoryUpsertBulk
AddSort adds v to the "sort" field.
func (*CategoryUpsertBulk) DoNothing ¶
func (u *CategoryUpsertBulk) DoNothing() *CategoryUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CategoryUpsertBulk) Exec ¶
func (u *CategoryUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryUpsertBulk) ExecX ¶
func (u *CategoryUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryUpsertBulk) Ignore ¶
func (u *CategoryUpsertBulk) Ignore() *CategoryUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Category.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CategoryUpsertBulk) SetAdmin ¶
func (u *CategoryUpsertBulk) SetAdmin(v bool) *CategoryUpsertBulk
SetAdmin sets the "admin" field.
func (*CategoryUpsertBulk) SetColour ¶
func (u *CategoryUpsertBulk) SetColour(v string) *CategoryUpsertBulk
SetColour sets the "colour" field.
func (*CategoryUpsertBulk) SetCreatedAt ¶
func (u *CategoryUpsertBulk) SetCreatedAt(v time.Time) *CategoryUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*CategoryUpsertBulk) SetDescription ¶
func (u *CategoryUpsertBulk) SetDescription(v string) *CategoryUpsertBulk
SetDescription sets the "description" field.
func (*CategoryUpsertBulk) SetName ¶
func (u *CategoryUpsertBulk) SetName(v string) *CategoryUpsertBulk
SetName sets the "name" field.
func (*CategoryUpsertBulk) SetSort ¶
func (u *CategoryUpsertBulk) SetSort(v int) *CategoryUpsertBulk
SetSort sets the "sort" field.
func (*CategoryUpsertBulk) SetUpdatedAt ¶
func (u *CategoryUpsertBulk) SetUpdatedAt(v time.Time) *CategoryUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*CategoryUpsertBulk) Update ¶
func (u *CategoryUpsertBulk) Update(set func(*CategoryUpsert)) *CategoryUpsertBulk
Update allows overriding fields `UPDATE` values. See the CategoryCreateBulk.OnConflict documentation for more info.
func (*CategoryUpsertBulk) UpdateAdmin ¶
func (u *CategoryUpsertBulk) UpdateAdmin() *CategoryUpsertBulk
UpdateAdmin sets the "admin" field to the value that was provided on create.
func (*CategoryUpsertBulk) UpdateColour ¶
func (u *CategoryUpsertBulk) UpdateColour() *CategoryUpsertBulk
UpdateColour sets the "colour" field to the value that was provided on create.
func (*CategoryUpsertBulk) UpdateCreatedAt ¶
func (u *CategoryUpsertBulk) UpdateCreatedAt() *CategoryUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*CategoryUpsertBulk) UpdateDescription ¶
func (u *CategoryUpsertBulk) UpdateDescription() *CategoryUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*CategoryUpsertBulk) UpdateName ¶
func (u *CategoryUpsertBulk) UpdateName() *CategoryUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*CategoryUpsertBulk) UpdateNewValues ¶
func (u *CategoryUpsertBulk) UpdateNewValues() *CategoryUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Category.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(category.FieldID) }), ). Exec(ctx)
func (*CategoryUpsertBulk) UpdateSort ¶
func (u *CategoryUpsertBulk) UpdateSort() *CategoryUpsertBulk
UpdateSort sets the "sort" field to the value that was provided on create.
func (*CategoryUpsertBulk) UpdateUpdatedAt ¶
func (u *CategoryUpsertBulk) UpdateUpdatedAt() *CategoryUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type CategoryUpsertOne ¶
type CategoryUpsertOne struct {
// contains filtered or unexported fields
}
CategoryUpsertOne is the builder for "upsert"-ing
one Category node.
func (*CategoryUpsertOne) AddSort ¶
func (u *CategoryUpsertOne) AddSort(v int) *CategoryUpsertOne
AddSort adds v to the "sort" field.
func (*CategoryUpsertOne) DoNothing ¶
func (u *CategoryUpsertOne) DoNothing() *CategoryUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CategoryUpsertOne) Exec ¶
func (u *CategoryUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryUpsertOne) ExecX ¶
func (u *CategoryUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryUpsertOne) IDX ¶
func (u *CategoryUpsertOne) IDX(ctx context.Context) xid.ID
IDX is like ID, but panics if an error occurs.
func (*CategoryUpsertOne) Ignore ¶
func (u *CategoryUpsertOne) Ignore() *CategoryUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Category.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CategoryUpsertOne) SetAdmin ¶
func (u *CategoryUpsertOne) SetAdmin(v bool) *CategoryUpsertOne
SetAdmin sets the "admin" field.
func (*CategoryUpsertOne) SetColour ¶
func (u *CategoryUpsertOne) SetColour(v string) *CategoryUpsertOne
SetColour sets the "colour" field.
func (*CategoryUpsertOne) SetCreatedAt ¶
func (u *CategoryUpsertOne) SetCreatedAt(v time.Time) *CategoryUpsertOne
SetCreatedAt sets the "created_at" field.
func (*CategoryUpsertOne) SetDescription ¶
func (u *CategoryUpsertOne) SetDescription(v string) *CategoryUpsertOne
SetDescription sets the "description" field.
func (*CategoryUpsertOne) SetName ¶
func (u *CategoryUpsertOne) SetName(v string) *CategoryUpsertOne
SetName sets the "name" field.
func (*CategoryUpsertOne) SetSort ¶
func (u *CategoryUpsertOne) SetSort(v int) *CategoryUpsertOne
SetSort sets the "sort" field.
func (*CategoryUpsertOne) SetUpdatedAt ¶
func (u *CategoryUpsertOne) SetUpdatedAt(v time.Time) *CategoryUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*CategoryUpsertOne) Update ¶
func (u *CategoryUpsertOne) Update(set func(*CategoryUpsert)) *CategoryUpsertOne
Update allows overriding fields `UPDATE` values. See the CategoryCreate.OnConflict documentation for more info.
func (*CategoryUpsertOne) UpdateAdmin ¶
func (u *CategoryUpsertOne) UpdateAdmin() *CategoryUpsertOne
UpdateAdmin sets the "admin" field to the value that was provided on create.
func (*CategoryUpsertOne) UpdateColour ¶
func (u *CategoryUpsertOne) UpdateColour() *CategoryUpsertOne
UpdateColour sets the "colour" field to the value that was provided on create.
func (*CategoryUpsertOne) UpdateCreatedAt ¶
func (u *CategoryUpsertOne) UpdateCreatedAt() *CategoryUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*CategoryUpsertOne) UpdateDescription ¶
func (u *CategoryUpsertOne) UpdateDescription() *CategoryUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*CategoryUpsertOne) UpdateName ¶
func (u *CategoryUpsertOne) UpdateName() *CategoryUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*CategoryUpsertOne) UpdateNewValues ¶
func (u *CategoryUpsertOne) UpdateNewValues() *CategoryUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Category.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(category.FieldID) }), ). Exec(ctx)
func (*CategoryUpsertOne) UpdateSort ¶
func (u *CategoryUpsertOne) UpdateSort() *CategoryUpsertOne
UpdateSort sets the "sort" field to the value that was provided on create.
func (*CategoryUpsertOne) UpdateUpdatedAt ¶
func (u *CategoryUpsertOne) UpdateUpdatedAt() *CategoryUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Account is the client for interacting with the Account builders. Account *AccountClient // Authentication is the client for interacting with the Authentication builders. Authentication *AuthenticationClient // Category is the client for interacting with the Category builders. Category *CategoryClient // Notification is the client for interacting with the Notification builders. Notification *NotificationClient // Post is the client for interacting with the Post builders. Post *PostClient // React is the client for interacting with the React builders. React *ReactClient // Role is the client for interacting with the Role builders. Role *RoleClient // Subscription is the client for interacting with the Subscription builders. Subscription *SubscriptionClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Account. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type Notification ¶
type Notification struct { // ID of the ent. ID xid.ID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Link holds the value of the "link" field. Link string `json:"link,omitempty"` // Read holds the value of the "read" field. Read bool `json:"read,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NotificationQuery when eager-loading is set. Edges NotificationEdges `json:"edges"` // contains filtered or unexported fields }
Notification is the model entity for the Notification schema.
func (*Notification) QuerySubscription ¶
func (n *Notification) QuerySubscription() *SubscriptionQuery
QuerySubscription queries the "subscription" edge of the Notification entity.
func (*Notification) String ¶
func (n *Notification) String() string
String implements the fmt.Stringer.
func (*Notification) Unwrap ¶
func (n *Notification) Unwrap() *Notification
Unwrap unwraps the Notification entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Notification) Update ¶
func (n *Notification) Update() *NotificationUpdateOne
Update returns a builder for updating this Notification. Note that you need to call Notification.Unwrap() before calling this method if this Notification was returned from a transaction, and the transaction was committed or rolled back.
type NotificationClient ¶
type NotificationClient struct {
// contains filtered or unexported fields
}
NotificationClient is a client for the Notification schema.
func NewNotificationClient ¶
func NewNotificationClient(c config) *NotificationClient
NewNotificationClient returns a client for the Notification from the given config.
func (*NotificationClient) Create ¶
func (c *NotificationClient) Create() *NotificationCreate
Create returns a builder for creating a Notification entity.
func (*NotificationClient) CreateBulk ¶
func (c *NotificationClient) CreateBulk(builders ...*NotificationCreate) *NotificationCreateBulk
CreateBulk returns a builder for creating a bulk of Notification entities.
func (*NotificationClient) Delete ¶
func (c *NotificationClient) Delete() *NotificationDelete
Delete returns a delete builder for Notification.
func (*NotificationClient) DeleteOne ¶
func (c *NotificationClient) DeleteOne(n *Notification) *NotificationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NotificationClient) DeleteOneID ¶
func (c *NotificationClient) DeleteOneID(id xid.ID) *NotificationDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*NotificationClient) Get ¶
func (c *NotificationClient) Get(ctx context.Context, id xid.ID) (*Notification, error)
Get returns a Notification entity by its id.
func (*NotificationClient) GetX ¶
func (c *NotificationClient) GetX(ctx context.Context, id xid.ID) *Notification
GetX is like Get, but panics if an error occurs.
func (*NotificationClient) Hooks ¶
func (c *NotificationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NotificationClient) Query ¶
func (c *NotificationClient) Query() *NotificationQuery
Query returns a query builder for Notification.
func (*NotificationClient) QuerySubscription ¶
func (c *NotificationClient) QuerySubscription(n *Notification) *SubscriptionQuery
QuerySubscription queries the subscription edge of a Notification.
func (*NotificationClient) Update ¶
func (c *NotificationClient) Update() *NotificationUpdate
Update returns an update builder for Notification.
func (*NotificationClient) UpdateOne ¶
func (c *NotificationClient) UpdateOne(n *Notification) *NotificationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NotificationClient) UpdateOneID ¶
func (c *NotificationClient) UpdateOneID(id xid.ID) *NotificationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NotificationClient) Use ¶
func (c *NotificationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `notification.Hooks(f(g(h())))`.
type NotificationCreate ¶
type NotificationCreate struct {
// contains filtered or unexported fields
}
NotificationCreate is the builder for creating a Notification entity.
func (*NotificationCreate) Exec ¶
func (nc *NotificationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NotificationCreate) ExecX ¶
func (nc *NotificationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationCreate) Mutation ¶
func (nc *NotificationCreate) Mutation() *NotificationMutation
Mutation returns the NotificationMutation object of the builder.
func (*NotificationCreate) OnConflict ¶
func (nc *NotificationCreate) OnConflict(opts ...sql.ConflictOption) *NotificationUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Notification.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.NotificationUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*NotificationCreate) OnConflictColumns ¶
func (nc *NotificationCreate) OnConflictColumns(columns ...string) *NotificationUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Notification.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*NotificationCreate) Save ¶
func (nc *NotificationCreate) Save(ctx context.Context) (*Notification, error)
Save creates the Notification in the database.
func (*NotificationCreate) SaveX ¶
func (nc *NotificationCreate) SaveX(ctx context.Context) *Notification
SaveX calls Save and panics if Save returns an error.
func (*NotificationCreate) SetCreatedAt ¶
func (nc *NotificationCreate) SetCreatedAt(t time.Time) *NotificationCreate
SetCreatedAt sets the "created_at" field.
func (*NotificationCreate) SetDescription ¶
func (nc *NotificationCreate) SetDescription(s string) *NotificationCreate
SetDescription sets the "description" field.
func (*NotificationCreate) SetID ¶
func (nc *NotificationCreate) SetID(x xid.ID) *NotificationCreate
SetID sets the "id" field.
func (*NotificationCreate) SetLink ¶
func (nc *NotificationCreate) SetLink(s string) *NotificationCreate
SetLink sets the "link" field.
func (*NotificationCreate) SetNillableCreatedAt ¶
func (nc *NotificationCreate) SetNillableCreatedAt(t *time.Time) *NotificationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*NotificationCreate) SetNillableID ¶
func (nc *NotificationCreate) SetNillableID(x *xid.ID) *NotificationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*NotificationCreate) SetNillableSubscriptionID ¶
func (nc *NotificationCreate) SetNillableSubscriptionID(id *xid.ID) *NotificationCreate
SetNillableSubscriptionID sets the "subscription" edge to the Subscription entity by ID if the given value is not nil.
func (*NotificationCreate) SetRead ¶
func (nc *NotificationCreate) SetRead(b bool) *NotificationCreate
SetRead sets the "read" field.
func (*NotificationCreate) SetSubscription ¶
func (nc *NotificationCreate) SetSubscription(s *Subscription) *NotificationCreate
SetSubscription sets the "subscription" edge to the Subscription entity.
func (*NotificationCreate) SetSubscriptionID ¶
func (nc *NotificationCreate) SetSubscriptionID(id xid.ID) *NotificationCreate
SetSubscriptionID sets the "subscription" edge to the Subscription entity by ID.
func (*NotificationCreate) SetTitle ¶
func (nc *NotificationCreate) SetTitle(s string) *NotificationCreate
SetTitle sets the "title" field.
type NotificationCreateBulk ¶
type NotificationCreateBulk struct {
// contains filtered or unexported fields
}
NotificationCreateBulk is the builder for creating many Notification entities in bulk.
func (*NotificationCreateBulk) Exec ¶
func (ncb *NotificationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NotificationCreateBulk) ExecX ¶
func (ncb *NotificationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationCreateBulk) OnConflict ¶
func (ncb *NotificationCreateBulk) OnConflict(opts ...sql.ConflictOption) *NotificationUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Notification.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.NotificationUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*NotificationCreateBulk) OnConflictColumns ¶
func (ncb *NotificationCreateBulk) OnConflictColumns(columns ...string) *NotificationUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Notification.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*NotificationCreateBulk) Save ¶
func (ncb *NotificationCreateBulk) Save(ctx context.Context) ([]*Notification, error)
Save creates the Notification entities in the database.
func (*NotificationCreateBulk) SaveX ¶
func (ncb *NotificationCreateBulk) SaveX(ctx context.Context) []*Notification
SaveX is like Save, but panics if an error occurs.
type NotificationDelete ¶
type NotificationDelete struct {
// contains filtered or unexported fields
}
NotificationDelete is the builder for deleting a Notification entity.
func (*NotificationDelete) Exec ¶
func (nd *NotificationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NotificationDelete) ExecX ¶
func (nd *NotificationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NotificationDelete) Where ¶
func (nd *NotificationDelete) Where(ps ...predicate.Notification) *NotificationDelete
Where appends a list predicates to the NotificationDelete builder.
type NotificationDeleteOne ¶
type NotificationDeleteOne struct {
// contains filtered or unexported fields
}
NotificationDeleteOne is the builder for deleting a single Notification entity.
func (*NotificationDeleteOne) Exec ¶
func (ndo *NotificationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NotificationDeleteOne) ExecX ¶
func (ndo *NotificationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NotificationEdges ¶
type NotificationEdges struct { // Subscription holds the value of the subscription edge. Subscription *Subscription `json:"subscription,omitempty"` // contains filtered or unexported fields }
NotificationEdges holds the relations/edges for other nodes in the graph.
func (NotificationEdges) SubscriptionOrErr ¶
func (e NotificationEdges) SubscriptionOrErr() (*Subscription, error)
SubscriptionOrErr returns the Subscription value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NotificationGroupBy ¶
type NotificationGroupBy struct {
// contains filtered or unexported fields
}
NotificationGroupBy is the group-by builder for Notification entities.
func (*NotificationGroupBy) Aggregate ¶
func (ngb *NotificationGroupBy) Aggregate(fns ...AggregateFunc) *NotificationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NotificationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NotificationGroupBy) Scan ¶
func (ngb *NotificationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*NotificationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NotificationMutation ¶
type NotificationMutation struct {
// contains filtered or unexported fields
}
NotificationMutation represents an operation that mutates the Notification nodes in the graph.
func (*NotificationMutation) AddField ¶
func (m *NotificationMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*NotificationMutation) AddedEdges ¶
func (m *NotificationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NotificationMutation) AddedField ¶
func (m *NotificationMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*NotificationMutation) AddedFields ¶
func (m *NotificationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NotificationMutation) AddedIDs ¶
func (m *NotificationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NotificationMutation) ClearEdge ¶
func (m *NotificationMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*NotificationMutation) ClearField ¶
func (m *NotificationMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*NotificationMutation) ClearSubscription ¶
func (m *NotificationMutation) ClearSubscription()
ClearSubscription clears the "subscription" edge to the Subscription entity.
func (*NotificationMutation) ClearedEdges ¶
func (m *NotificationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NotificationMutation) ClearedFields ¶
func (m *NotificationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NotificationMutation) Client ¶
func (m NotificationMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*NotificationMutation) CreatedAt ¶
func (m *NotificationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*NotificationMutation) Description ¶
func (m *NotificationMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*NotificationMutation) EdgeCleared ¶
func (m *NotificationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NotificationMutation) Field ¶
func (m *NotificationMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*NotificationMutation) FieldCleared ¶
func (m *NotificationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NotificationMutation) Fields ¶
func (m *NotificationMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*NotificationMutation) ID ¶
func (m *NotificationMutation) ID() (id xid.ID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*NotificationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*NotificationMutation) Link ¶
func (m *NotificationMutation) Link() (r string, exists bool)
Link returns the value of the "link" field in the mutation.
func (*NotificationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Notification entity. If the Notification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NotificationMutation) OldDescription ¶
func (m *NotificationMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Notification entity. If the Notification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NotificationMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*NotificationMutation) OldLink ¶
func (m *NotificationMutation) OldLink(ctx context.Context) (v string, err error)
OldLink returns the old "link" field's value of the Notification entity. If the Notification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NotificationMutation) OldRead ¶
func (m *NotificationMutation) OldRead(ctx context.Context) (v bool, err error)
OldRead returns the old "read" field's value of the Notification entity. If the Notification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NotificationMutation) OldTitle ¶
func (m *NotificationMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Notification entity. If the Notification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NotificationMutation) Op ¶
func (m *NotificationMutation) Op() Op
Op returns the operation name.
func (*NotificationMutation) Read ¶
func (m *NotificationMutation) Read() (r bool, exists bool)
Read returns the value of the "read" field in the mutation.
func (*NotificationMutation) RemovedEdges ¶
func (m *NotificationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NotificationMutation) RemovedIDs ¶
func (m *NotificationMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*NotificationMutation) ResetCreatedAt ¶
func (m *NotificationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*NotificationMutation) ResetDescription ¶
func (m *NotificationMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*NotificationMutation) ResetEdge ¶
func (m *NotificationMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*NotificationMutation) ResetField ¶
func (m *NotificationMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*NotificationMutation) ResetLink ¶
func (m *NotificationMutation) ResetLink()
ResetLink resets all changes to the "link" field.
func (*NotificationMutation) ResetRead ¶
func (m *NotificationMutation) ResetRead()
ResetRead resets all changes to the "read" field.
func (*NotificationMutation) ResetSubscription ¶
func (m *NotificationMutation) ResetSubscription()
ResetSubscription resets all changes to the "subscription" edge.
func (*NotificationMutation) ResetTitle ¶
func (m *NotificationMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*NotificationMutation) SetCreatedAt ¶
func (m *NotificationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*NotificationMutation) SetDescription ¶
func (m *NotificationMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*NotificationMutation) SetField ¶
func (m *NotificationMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*NotificationMutation) SetID ¶
func (m *NotificationMutation) SetID(id xid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Notification entities.
func (*NotificationMutation) SetLink ¶
func (m *NotificationMutation) SetLink(s string)
SetLink sets the "link" field.
func (*NotificationMutation) SetRead ¶
func (m *NotificationMutation) SetRead(b bool)
SetRead sets the "read" field.
func (*NotificationMutation) SetSubscriptionID ¶
func (m *NotificationMutation) SetSubscriptionID(id xid.ID)
SetSubscriptionID sets the "subscription" edge to the Subscription entity by id.
func (*NotificationMutation) SetTitle ¶
func (m *NotificationMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*NotificationMutation) SubscriptionCleared ¶
func (m *NotificationMutation) SubscriptionCleared() bool
SubscriptionCleared reports if the "subscription" edge to the Subscription entity was cleared.
func (*NotificationMutation) SubscriptionID ¶
func (m *NotificationMutation) SubscriptionID() (id xid.ID, exists bool)
SubscriptionID returns the "subscription" edge ID in the mutation.
func (*NotificationMutation) SubscriptionIDs ¶
func (m *NotificationMutation) SubscriptionIDs() (ids []xid.ID)
SubscriptionIDs returns the "subscription" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SubscriptionID instead. It exists only for internal usage by the builders.
func (*NotificationMutation) Title ¶
func (m *NotificationMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (NotificationMutation) Tx ¶
func (m NotificationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NotificationMutation) Type ¶
func (m *NotificationMutation) Type() string
Type returns the node type of this mutation (Notification).
func (*NotificationMutation) Where ¶
func (m *NotificationMutation) Where(ps ...predicate.Notification)
Where appends a list predicates to the NotificationMutation builder.
type NotificationQuery ¶
type NotificationQuery struct {
// contains filtered or unexported fields
}
NotificationQuery is the builder for querying Notification entities.
func (*NotificationQuery) All ¶
func (nq *NotificationQuery) All(ctx context.Context) ([]*Notification, error)
All executes the query and returns a list of Notifications.
func (*NotificationQuery) AllX ¶
func (nq *NotificationQuery) AllX(ctx context.Context) []*Notification
AllX is like All, but panics if an error occurs.
func (*NotificationQuery) Clone ¶
func (nq *NotificationQuery) Clone() *NotificationQuery
Clone returns a duplicate of the NotificationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NotificationQuery) Count ¶
func (nq *NotificationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NotificationQuery) CountX ¶
func (nq *NotificationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NotificationQuery) Exist ¶
func (nq *NotificationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NotificationQuery) ExistX ¶
func (nq *NotificationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NotificationQuery) First ¶
func (nq *NotificationQuery) First(ctx context.Context) (*Notification, error)
First returns the first Notification entity from the query. Returns a *NotFoundError when no Notification was found.
func (*NotificationQuery) FirstID ¶
FirstID returns the first Notification ID from the query. Returns a *NotFoundError when no Notification ID was found.
func (*NotificationQuery) FirstIDX ¶
func (nq *NotificationQuery) FirstIDX(ctx context.Context) xid.ID
FirstIDX is like FirstID, but panics if an error occurs.
func (*NotificationQuery) FirstX ¶
func (nq *NotificationQuery) FirstX(ctx context.Context) *Notification
FirstX is like First, but panics if an error occurs.
func (*NotificationQuery) GroupBy ¶
func (nq *NotificationQuery) GroupBy(field string, fields ...string) *NotificationGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Notification.Query(). GroupBy(notification.FieldCreatedAt). Aggregate(model.Count()). Scan(ctx, &v)
func (*NotificationQuery) IDsX ¶
func (nq *NotificationQuery) IDsX(ctx context.Context) []xid.ID
IDsX is like IDs, but panics if an error occurs.
func (*NotificationQuery) Limit ¶
func (nq *NotificationQuery) Limit(limit int) *NotificationQuery
Limit adds a limit step to the query.
func (*NotificationQuery) Modify ¶
func (nq *NotificationQuery) Modify(modifiers ...func(s *sql.Selector)) *NotificationSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*NotificationQuery) Offset ¶
func (nq *NotificationQuery) Offset(offset int) *NotificationQuery
Offset adds an offset step to the query.
func (*NotificationQuery) Only ¶
func (nq *NotificationQuery) Only(ctx context.Context) (*Notification, error)
Only returns a single Notification entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Notification entity is found. Returns a *NotFoundError when no Notification entities are found.
func (*NotificationQuery) OnlyID ¶
OnlyID is like Only, but returns the only Notification ID in the query. Returns a *NotSingularError when more than one Notification ID is found. Returns a *NotFoundError when no entities are found.
func (*NotificationQuery) OnlyIDX ¶
func (nq *NotificationQuery) OnlyIDX(ctx context.Context) xid.ID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NotificationQuery) OnlyX ¶
func (nq *NotificationQuery) OnlyX(ctx context.Context) *Notification
OnlyX is like Only, but panics if an error occurs.
func (*NotificationQuery) Order ¶
func (nq *NotificationQuery) Order(o ...OrderFunc) *NotificationQuery
Order adds an order step to the query.
func (*NotificationQuery) QuerySubscription ¶
func (nq *NotificationQuery) QuerySubscription() *SubscriptionQuery
QuerySubscription chains the current query on the "subscription" edge.
func (*NotificationQuery) Select ¶
func (nq *NotificationQuery) Select(fields ...string) *NotificationSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Notification.Query(). Select(notification.FieldCreatedAt). Scan(ctx, &v)
func (*NotificationQuery) Unique ¶
func (nq *NotificationQuery) Unique(unique bool) *NotificationQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*NotificationQuery) Where ¶
func (nq *NotificationQuery) Where(ps ...predicate.Notification) *NotificationQuery
Where adds a new predicate for the NotificationQuery builder.
func (*NotificationQuery) WithSubscription ¶
func (nq *NotificationQuery) WithSubscription(opts ...func(*SubscriptionQuery)) *NotificationQuery
WithSubscription tells the query-builder to eager-load the nodes that are connected to the "subscription" edge. The optional arguments are used to configure the query builder of the edge.
type NotificationSelect ¶
type NotificationSelect struct { *NotificationQuery // contains filtered or unexported fields }
NotificationSelect is the builder for selecting fields of Notification entities.
func (*NotificationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NotificationSelect) Modify ¶
func (ns *NotificationSelect) Modify(modifiers ...func(s *sql.Selector)) *NotificationSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*NotificationSelect) Scan ¶
func (ns *NotificationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*NotificationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NotificationUpdate ¶
type NotificationUpdate struct {
// contains filtered or unexported fields
}
NotificationUpdate is the builder for updating Notification entities.
func (*NotificationUpdate) ClearSubscription ¶
func (nu *NotificationUpdate) ClearSubscription() *NotificationUpdate
ClearSubscription clears the "subscription" edge to the Subscription entity.
func (*NotificationUpdate) Exec ¶
func (nu *NotificationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NotificationUpdate) ExecX ¶
func (nu *NotificationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationUpdate) Modify ¶
func (nu *NotificationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *NotificationUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*NotificationUpdate) Mutation ¶
func (nu *NotificationUpdate) Mutation() *NotificationMutation
Mutation returns the NotificationMutation object of the builder.
func (*NotificationUpdate) Save ¶
func (nu *NotificationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NotificationUpdate) SaveX ¶
func (nu *NotificationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NotificationUpdate) SetDescription ¶
func (nu *NotificationUpdate) SetDescription(s string) *NotificationUpdate
SetDescription sets the "description" field.
func (*NotificationUpdate) SetLink ¶
func (nu *NotificationUpdate) SetLink(s string) *NotificationUpdate
SetLink sets the "link" field.
func (*NotificationUpdate) SetNillableSubscriptionID ¶
func (nu *NotificationUpdate) SetNillableSubscriptionID(id *xid.ID) *NotificationUpdate
SetNillableSubscriptionID sets the "subscription" edge to the Subscription entity by ID if the given value is not nil.
func (*NotificationUpdate) SetRead ¶
func (nu *NotificationUpdate) SetRead(b bool) *NotificationUpdate
SetRead sets the "read" field.
func (*NotificationUpdate) SetSubscription ¶
func (nu *NotificationUpdate) SetSubscription(s *Subscription) *NotificationUpdate
SetSubscription sets the "subscription" edge to the Subscription entity.
func (*NotificationUpdate) SetSubscriptionID ¶
func (nu *NotificationUpdate) SetSubscriptionID(id xid.ID) *NotificationUpdate
SetSubscriptionID sets the "subscription" edge to the Subscription entity by ID.
func (*NotificationUpdate) SetTitle ¶
func (nu *NotificationUpdate) SetTitle(s string) *NotificationUpdate
SetTitle sets the "title" field.
func (*NotificationUpdate) Where ¶
func (nu *NotificationUpdate) Where(ps ...predicate.Notification) *NotificationUpdate
Where appends a list predicates to the NotificationUpdate builder.
type NotificationUpdateOne ¶
type NotificationUpdateOne struct {
// contains filtered or unexported fields
}
NotificationUpdateOne is the builder for updating a single Notification entity.
func (*NotificationUpdateOne) ClearSubscription ¶
func (nuo *NotificationUpdateOne) ClearSubscription() *NotificationUpdateOne
ClearSubscription clears the "subscription" edge to the Subscription entity.
func (*NotificationUpdateOne) Exec ¶
func (nuo *NotificationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NotificationUpdateOne) ExecX ¶
func (nuo *NotificationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationUpdateOne) Modify ¶
func (nuo *NotificationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *NotificationUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*NotificationUpdateOne) Mutation ¶
func (nuo *NotificationUpdateOne) Mutation() *NotificationMutation
Mutation returns the NotificationMutation object of the builder.
func (*NotificationUpdateOne) Save ¶
func (nuo *NotificationUpdateOne) Save(ctx context.Context) (*Notification, error)
Save executes the query and returns the updated Notification entity.
func (*NotificationUpdateOne) SaveX ¶
func (nuo *NotificationUpdateOne) SaveX(ctx context.Context) *Notification
SaveX is like Save, but panics if an error occurs.
func (*NotificationUpdateOne) Select ¶
func (nuo *NotificationUpdateOne) Select(field string, fields ...string) *NotificationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NotificationUpdateOne) SetDescription ¶
func (nuo *NotificationUpdateOne) SetDescription(s string) *NotificationUpdateOne
SetDescription sets the "description" field.
func (*NotificationUpdateOne) SetLink ¶
func (nuo *NotificationUpdateOne) SetLink(s string) *NotificationUpdateOne
SetLink sets the "link" field.
func (*NotificationUpdateOne) SetNillableSubscriptionID ¶
func (nuo *NotificationUpdateOne) SetNillableSubscriptionID(id *xid.ID) *NotificationUpdateOne
SetNillableSubscriptionID sets the "subscription" edge to the Subscription entity by ID if the given value is not nil.
func (*NotificationUpdateOne) SetRead ¶
func (nuo *NotificationUpdateOne) SetRead(b bool) *NotificationUpdateOne
SetRead sets the "read" field.
func (*NotificationUpdateOne) SetSubscription ¶
func (nuo *NotificationUpdateOne) SetSubscription(s *Subscription) *NotificationUpdateOne
SetSubscription sets the "subscription" edge to the Subscription entity.
func (*NotificationUpdateOne) SetSubscriptionID ¶
func (nuo *NotificationUpdateOne) SetSubscriptionID(id xid.ID) *NotificationUpdateOne
SetSubscriptionID sets the "subscription" edge to the Subscription entity by ID.
func (*NotificationUpdateOne) SetTitle ¶
func (nuo *NotificationUpdateOne) SetTitle(s string) *NotificationUpdateOne
SetTitle sets the "title" field.
type NotificationUpsert ¶
NotificationUpsert is the "OnConflict" setter.
func (*NotificationUpsert) SetCreatedAt ¶
func (u *NotificationUpsert) SetCreatedAt(v time.Time) *NotificationUpsert
SetCreatedAt sets the "created_at" field.
func (*NotificationUpsert) SetDescription ¶
func (u *NotificationUpsert) SetDescription(v string) *NotificationUpsert
SetDescription sets the "description" field.
func (*NotificationUpsert) SetLink ¶
func (u *NotificationUpsert) SetLink(v string) *NotificationUpsert
SetLink sets the "link" field.
func (*NotificationUpsert) SetRead ¶
func (u *NotificationUpsert) SetRead(v bool) *NotificationUpsert
SetRead sets the "read" field.
func (*NotificationUpsert) SetTitle ¶
func (u *NotificationUpsert) SetTitle(v string) *NotificationUpsert
SetTitle sets the "title" field.
func (*NotificationUpsert) UpdateCreatedAt ¶
func (u *NotificationUpsert) UpdateCreatedAt() *NotificationUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*NotificationUpsert) UpdateDescription ¶
func (u *NotificationUpsert) UpdateDescription() *NotificationUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*NotificationUpsert) UpdateLink ¶
func (u *NotificationUpsert) UpdateLink() *NotificationUpsert
UpdateLink sets the "link" field to the value that was provided on create.
func (*NotificationUpsert) UpdateRead ¶
func (u *NotificationUpsert) UpdateRead() *NotificationUpsert
UpdateRead sets the "read" field to the value that was provided on create.
func (*NotificationUpsert) UpdateTitle ¶
func (u *NotificationUpsert) UpdateTitle() *NotificationUpsert
UpdateTitle sets the "title" field to the value that was provided on create.
type NotificationUpsertBulk ¶
type NotificationUpsertBulk struct {
// contains filtered or unexported fields
}
NotificationUpsertBulk is the builder for "upsert"-ing a bulk of Notification nodes.
func (*NotificationUpsertBulk) DoNothing ¶
func (u *NotificationUpsertBulk) DoNothing() *NotificationUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*NotificationUpsertBulk) Exec ¶
func (u *NotificationUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NotificationUpsertBulk) ExecX ¶
func (u *NotificationUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationUpsertBulk) Ignore ¶
func (u *NotificationUpsertBulk) Ignore() *NotificationUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Notification.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*NotificationUpsertBulk) SetCreatedAt ¶
func (u *NotificationUpsertBulk) SetCreatedAt(v time.Time) *NotificationUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*NotificationUpsertBulk) SetDescription ¶
func (u *NotificationUpsertBulk) SetDescription(v string) *NotificationUpsertBulk
SetDescription sets the "description" field.
func (*NotificationUpsertBulk) SetLink ¶
func (u *NotificationUpsertBulk) SetLink(v string) *NotificationUpsertBulk
SetLink sets the "link" field.
func (*NotificationUpsertBulk) SetRead ¶
func (u *NotificationUpsertBulk) SetRead(v bool) *NotificationUpsertBulk
SetRead sets the "read" field.
func (*NotificationUpsertBulk) SetTitle ¶
func (u *NotificationUpsertBulk) SetTitle(v string) *NotificationUpsertBulk
SetTitle sets the "title" field.
func (*NotificationUpsertBulk) Update ¶
func (u *NotificationUpsertBulk) Update(set func(*NotificationUpsert)) *NotificationUpsertBulk
Update allows overriding fields `UPDATE` values. See the NotificationCreateBulk.OnConflict documentation for more info.
func (*NotificationUpsertBulk) UpdateCreatedAt ¶
func (u *NotificationUpsertBulk) UpdateCreatedAt() *NotificationUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*NotificationUpsertBulk) UpdateDescription ¶
func (u *NotificationUpsertBulk) UpdateDescription() *NotificationUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*NotificationUpsertBulk) UpdateLink ¶
func (u *NotificationUpsertBulk) UpdateLink() *NotificationUpsertBulk
UpdateLink sets the "link" field to the value that was provided on create.
func (*NotificationUpsertBulk) UpdateNewValues ¶
func (u *NotificationUpsertBulk) UpdateNewValues() *NotificationUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Notification.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(notification.FieldID) }), ). Exec(ctx)
func (*NotificationUpsertBulk) UpdateRead ¶
func (u *NotificationUpsertBulk) UpdateRead() *NotificationUpsertBulk
UpdateRead sets the "read" field to the value that was provided on create.
func (*NotificationUpsertBulk) UpdateTitle ¶
func (u *NotificationUpsertBulk) UpdateTitle() *NotificationUpsertBulk
UpdateTitle sets the "title" field to the value that was provided on create.
type NotificationUpsertOne ¶
type NotificationUpsertOne struct {
// contains filtered or unexported fields
}
NotificationUpsertOne is the builder for "upsert"-ing
one Notification node.
func (*NotificationUpsertOne) DoNothing ¶
func (u *NotificationUpsertOne) DoNothing() *NotificationUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*NotificationUpsertOne) Exec ¶
func (u *NotificationUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*NotificationUpsertOne) ExecX ¶
func (u *NotificationUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationUpsertOne) ID ¶
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*NotificationUpsertOne) IDX ¶
func (u *NotificationUpsertOne) IDX(ctx context.Context) xid.ID
IDX is like ID, but panics if an error occurs.
func (*NotificationUpsertOne) Ignore ¶
func (u *NotificationUpsertOne) Ignore() *NotificationUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Notification.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*NotificationUpsertOne) SetCreatedAt ¶
func (u *NotificationUpsertOne) SetCreatedAt(v time.Time) *NotificationUpsertOne
SetCreatedAt sets the "created_at" field.
func (*NotificationUpsertOne) SetDescription ¶
func (u *NotificationUpsertOne) SetDescription(v string) *NotificationUpsertOne
SetDescription sets the "description" field.
func (*NotificationUpsertOne) SetLink ¶
func (u *NotificationUpsertOne) SetLink(v string) *NotificationUpsertOne
SetLink sets the "link" field.
func (*NotificationUpsertOne) SetRead ¶
func (u *NotificationUpsertOne) SetRead(v bool) *NotificationUpsertOne
SetRead sets the "read" field.
func (*NotificationUpsertOne) SetTitle ¶
func (u *NotificationUpsertOne) SetTitle(v string) *NotificationUpsertOne
SetTitle sets the "title" field.
func (*NotificationUpsertOne) Update ¶
func (u *NotificationUpsertOne) Update(set func(*NotificationUpsert)) *NotificationUpsertOne
Update allows overriding fields `UPDATE` values. See the NotificationCreate.OnConflict documentation for more info.
func (*NotificationUpsertOne) UpdateCreatedAt ¶
func (u *NotificationUpsertOne) UpdateCreatedAt() *NotificationUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*NotificationUpsertOne) UpdateDescription ¶
func (u *NotificationUpsertOne) UpdateDescription() *NotificationUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*NotificationUpsertOne) UpdateLink ¶
func (u *NotificationUpsertOne) UpdateLink() *NotificationUpsertOne
UpdateLink sets the "link" field to the value that was provided on create.
func (*NotificationUpsertOne) UpdateNewValues ¶
func (u *NotificationUpsertOne) UpdateNewValues() *NotificationUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Notification.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(notification.FieldID) }), ). Exec(ctx)
func (*NotificationUpsertOne) UpdateRead ¶
func (u *NotificationUpsertOne) UpdateRead() *NotificationUpsertOne
UpdateRead sets the "read" field to the value that was provided on create.
func (*NotificationUpsertOne) UpdateTitle ¶
func (u *NotificationUpsertOne) UpdateTitle() *NotificationUpsertOne
UpdateTitle sets the "title" field to the value that was provided on create.
type Notifications ¶
type Notifications []*Notification
Notifications is a parsable slice of Notification.
type Post ¶
type Post struct { // ID of the ent. ID xid.ID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt *time.Time `json:"deleted_at,omitempty"` // First holds the value of the "first" field. First bool `json:"first,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Slug holds the value of the "slug" field. Slug string `json:"slug,omitempty"` // Pinned holds the value of the "pinned" field. Pinned bool `json:"pinned,omitempty"` // RootPostID holds the value of the "root_post_id" field. RootPostID xid.ID `json:"root_post_id,omitempty"` // ReplyToPostID holds the value of the "reply_to_post_id" field. ReplyToPostID xid.ID `json:"reply_to_post_id,omitempty"` // Body holds the value of the "body" field. Body string `json:"body,omitempty"` // Short holds the value of the "short" field. Short string `json:"short,omitempty"` // CategoryID holds the value of the "category_id" field. CategoryID xid.ID `json:"category_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PostQuery when eager-loading is set. Edges PostEdges `json:"edges"` // contains filtered or unexported fields }
Post is the model entity for the Post schema.
func (*Post) QueryAuthor ¶
func (po *Post) QueryAuthor() *AccountQuery
QueryAuthor queries the "author" edge of the Post entity.
func (*Post) QueryCategory ¶
func (po *Post) QueryCategory() *CategoryQuery
QueryCategory queries the "category" edge of the Post entity.
func (*Post) QueryPosts ¶
QueryPosts queries the "posts" edge of the Post entity.
func (*Post) QueryReacts ¶
func (po *Post) QueryReacts() *ReactQuery
QueryReacts queries the "reacts" edge of the Post entity.
func (*Post) QueryReplies ¶
QueryReplies queries the "replies" edge of the Post entity.
func (*Post) QueryReplyTo ¶
QueryReplyTo queries the "replyTo" edge of the Post entity.
func (*Post) Unwrap ¶
Unwrap unwraps the Post entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Post) Update ¶
func (po *Post) Update() *PostUpdateOne
Update returns a builder for updating this Post. Note that you need to call Post.Unwrap() before calling this method if this Post was returned from a transaction, and the transaction was committed or rolled back.
type PostClient ¶
type PostClient struct {
// contains filtered or unexported fields
}
PostClient is a client for the Post schema.
func NewPostClient ¶
func NewPostClient(c config) *PostClient
NewPostClient returns a client for the Post from the given config.
func (*PostClient) Create ¶
func (c *PostClient) Create() *PostCreate
Create returns a builder for creating a Post entity.
func (*PostClient) CreateBulk ¶
func (c *PostClient) CreateBulk(builders ...*PostCreate) *PostCreateBulk
CreateBulk returns a builder for creating a bulk of Post entities.
func (*PostClient) Delete ¶
func (c *PostClient) Delete() *PostDelete
Delete returns a delete builder for Post.
func (*PostClient) DeleteOne ¶
func (c *PostClient) DeleteOne(po *Post) *PostDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PostClient) DeleteOneID ¶
func (c *PostClient) DeleteOneID(id xid.ID) *PostDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*PostClient) Query ¶
func (c *PostClient) Query() *PostQuery
Query returns a query builder for Post.
func (*PostClient) QueryAuthor ¶
func (c *PostClient) QueryAuthor(po *Post) *AccountQuery
QueryAuthor queries the author edge of a Post.
func (*PostClient) QueryCategory ¶
func (c *PostClient) QueryCategory(po *Post) *CategoryQuery
QueryCategory queries the category edge of a Post.
func (*PostClient) QueryPosts ¶
func (c *PostClient) QueryPosts(po *Post) *PostQuery
QueryPosts queries the posts edge of a Post.
func (*PostClient) QueryReacts ¶
func (c *PostClient) QueryReacts(po *Post) *ReactQuery
QueryReacts queries the reacts edge of a Post.
func (*PostClient) QueryReplies ¶
func (c *PostClient) QueryReplies(po *Post) *PostQuery
QueryReplies queries the replies edge of a Post.
func (*PostClient) QueryReplyTo ¶
func (c *PostClient) QueryReplyTo(po *Post) *PostQuery
QueryReplyTo queries the replyTo edge of a Post.
func (*PostClient) QueryRoot ¶
func (c *PostClient) QueryRoot(po *Post) *PostQuery
QueryRoot queries the root edge of a Post.
func (*PostClient) QueryTags ¶
func (c *PostClient) QueryTags(po *Post) *TagQuery
QueryTags queries the tags 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 xid.ID) *PostUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PostClient) Use ¶
func (c *PostClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `post.Hooks(f(g(h())))`.
type PostCreate ¶
type PostCreate struct {
// contains filtered or unexported fields
}
PostCreate is the builder for creating a Post entity.
func (*PostCreate) AddPostIDs ¶
func (pc *PostCreate) AddPostIDs(ids ...xid.ID) *PostCreate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*PostCreate) AddPosts ¶
func (pc *PostCreate) AddPosts(p ...*Post) *PostCreate
AddPosts adds the "posts" edges to the Post entity.
func (*PostCreate) AddReactIDs ¶
func (pc *PostCreate) AddReactIDs(ids ...xid.ID) *PostCreate
AddReactIDs adds the "reacts" edge to the React entity by IDs.
func (*PostCreate) AddReacts ¶
func (pc *PostCreate) AddReacts(r ...*React) *PostCreate
AddReacts adds the "reacts" edges to the React entity.
func (*PostCreate) AddReplies ¶
func (pc *PostCreate) AddReplies(p ...*Post) *PostCreate
AddReplies adds the "replies" edges to the Post entity.
func (*PostCreate) AddReplyIDs ¶
func (pc *PostCreate) AddReplyIDs(ids ...xid.ID) *PostCreate
AddReplyIDs adds the "replies" edge to the Post entity by IDs.
func (*PostCreate) AddTagIDs ¶
func (pc *PostCreate) AddTagIDs(ids ...xid.ID) *PostCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*PostCreate) AddTags ¶
func (pc *PostCreate) AddTags(t ...*Tag) *PostCreate
AddTags adds the "tags" edges to the Tag entity.
func (*PostCreate) Exec ¶
func (pc *PostCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PostCreate) ExecX ¶
func (pc *PostCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostCreate) Mutation ¶
func (pc *PostCreate) Mutation() *PostMutation
Mutation returns the PostMutation object of the builder.
func (*PostCreate) OnConflict ¶
func (pc *PostCreate) OnConflict(opts ...sql.ConflictOption) *PostUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Post.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.PostUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*PostCreate) OnConflictColumns ¶
func (pc *PostCreate) OnConflictColumns(columns ...string) *PostUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Post.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*PostCreate) Save ¶
func (pc *PostCreate) Save(ctx context.Context) (*Post, error)
Save creates the Post in the database.
func (*PostCreate) SaveX ¶
func (pc *PostCreate) SaveX(ctx context.Context) *Post
SaveX calls Save and panics if Save returns an error.
func (*PostCreate) SetAuthor ¶
func (pc *PostCreate) SetAuthor(a *Account) *PostCreate
SetAuthor sets the "author" edge to the Account entity.
func (*PostCreate) SetAuthorID ¶
func (pc *PostCreate) SetAuthorID(id xid.ID) *PostCreate
SetAuthorID sets the "author" edge to the Account entity by ID.
func (*PostCreate) SetBody ¶
func (pc *PostCreate) SetBody(s string) *PostCreate
SetBody sets the "body" field.
func (*PostCreate) SetCategory ¶
func (pc *PostCreate) SetCategory(c *Category) *PostCreate
SetCategory sets the "category" edge to the Category entity.
func (*PostCreate) SetCategoryID ¶
func (pc *PostCreate) SetCategoryID(x xid.ID) *PostCreate
SetCategoryID sets the "category_id" 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) SetFirst ¶
func (pc *PostCreate) SetFirst(b bool) *PostCreate
SetFirst sets the "first" field.
func (*PostCreate) SetID ¶
func (pc *PostCreate) SetID(x xid.ID) *PostCreate
SetID sets the "id" field.
func (*PostCreate) SetNillableCategoryID ¶
func (pc *PostCreate) SetNillableCategoryID(x *xid.ID) *PostCreate
SetNillableCategoryID sets the "category_id" 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) SetNillableID ¶
func (pc *PostCreate) SetNillableID(x *xid.ID) *PostCreate
SetNillableID sets the "id" 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) SetNillableReplyToID ¶
func (pc *PostCreate) SetNillableReplyToID(id *xid.ID) *PostCreate
SetNillableReplyToID sets the "replyTo" edge to the Post entity by ID if the given value is not nil.
func (*PostCreate) SetNillableReplyToPostID ¶
func (pc *PostCreate) SetNillableReplyToPostID(x *xid.ID) *PostCreate
SetNillableReplyToPostID sets the "reply_to_post_id" field if the given value is not nil.
func (*PostCreate) SetNillableRootID ¶
func (pc *PostCreate) SetNillableRootID(id *xid.ID) *PostCreate
SetNillableRootID sets the "root" edge to the Post entity by ID if the given value is not nil.
func (*PostCreate) SetNillableRootPostID ¶
func (pc *PostCreate) SetNillableRootPostID(x *xid.ID) *PostCreate
SetNillableRootPostID sets the "root_post_id" field if the given value is not nil.
func (*PostCreate) SetNillableSlug ¶
func (pc *PostCreate) SetNillableSlug(s *string) *PostCreate
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*PostCreate) SetNillableTitle ¶
func (pc *PostCreate) SetNillableTitle(s *string) *PostCreate
SetNillableTitle sets the "title" 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) SetPinned ¶
func (pc *PostCreate) SetPinned(b bool) *PostCreate
SetPinned sets the "pinned" field.
func (*PostCreate) SetReplyTo ¶
func (pc *PostCreate) SetReplyTo(p *Post) *PostCreate
SetReplyTo sets the "replyTo" edge to the Post entity.
func (*PostCreate) SetReplyToID ¶
func (pc *PostCreate) SetReplyToID(id xid.ID) *PostCreate
SetReplyToID sets the "replyTo" edge to the Post entity by ID.
func (*PostCreate) SetReplyToPostID ¶
func (pc *PostCreate) SetReplyToPostID(x xid.ID) *PostCreate
SetReplyToPostID sets the "reply_to_post_id" field.
func (*PostCreate) SetRoot ¶
func (pc *PostCreate) SetRoot(p *Post) *PostCreate
SetRoot sets the "root" edge to the Post entity.
func (*PostCreate) SetRootID ¶
func (pc *PostCreate) SetRootID(id xid.ID) *PostCreate
SetRootID sets the "root" edge to the Post entity by ID.
func (*PostCreate) SetRootPostID ¶
func (pc *PostCreate) SetRootPostID(x xid.ID) *PostCreate
SetRootPostID sets the "root_post_id" field.
func (*PostCreate) SetShort ¶
func (pc *PostCreate) SetShort(s string) *PostCreate
SetShort sets the "short" field.
func (*PostCreate) SetSlug ¶
func (pc *PostCreate) SetSlug(s string) *PostCreate
SetSlug sets the "slug" 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.
func (*PostCreateBulk) OnConflict ¶
func (pcb *PostCreateBulk) OnConflict(opts ...sql.ConflictOption) *PostUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Post.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.PostUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*PostCreateBulk) OnConflictColumns ¶
func (pcb *PostCreateBulk) OnConflictColumns(columns ...string) *PostUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Post.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type PostDelete ¶
type PostDelete struct {
// contains filtered or unexported fields
}
PostDelete is the builder for deleting a Post entity.
func (*PostDelete) Exec ¶
func (pd *PostDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PostDelete) ExecX ¶
func (pd *PostDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PostDelete) Where ¶
func (pd *PostDelete) Where(ps ...predicate.Post) *PostDelete
Where appends a list predicates to the PostDelete builder.
type PostDeleteOne ¶
type PostDeleteOne struct {
// contains filtered or unexported fields
}
PostDeleteOne is the builder for deleting a single Post entity.
func (*PostDeleteOne) Exec ¶
func (pdo *PostDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PostDeleteOne) ExecX ¶
func (pdo *PostDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PostEdges ¶
type PostEdges struct { // Author holds the value of the author edge. Author *Account `json:"author,omitempty"` // Category is only required for root posts. It should never be added to a child post. Category *Category `json:"category,omitempty"` // Tags are only required for root posts. It should never be added to a child post. Tags []*Tag `json:"tags,omitempty"` // A many-to-many recursive self reference. The root post is the first post in the thread. Root *Post `json:"root,omitempty"` // Posts holds the value of the posts edge. Posts []*Post `json:"posts,omitempty"` // A many-to-many recursive self reference. The replyTo post is an optional post that this post is in reply to. ReplyTo *Post `json:"replyTo,omitempty"` // Replies holds the value of the replies edge. Replies []*Post `json:"replies,omitempty"` // Reacts holds the value of the reacts edge. Reacts []*React `json:"reacts,omitempty"` // contains filtered or unexported fields }
PostEdges holds the relations/edges for other nodes in the graph.
func (PostEdges) AuthorOrErr ¶
AuthorOrErr returns the Author value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PostEdges) CategoryOrErr ¶
CategoryOrErr returns the Category value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PostEdges) PostsOrErr ¶
PostsOrErr returns the Posts value or an error if the edge was not loaded in eager-loading.
func (PostEdges) ReactsOrErr ¶
ReactsOrErr returns the Reacts value or an error if the edge was not loaded in eager-loading.
func (PostEdges) RepliesOrErr ¶
RepliesOrErr returns the Replies value or an error if the edge was not loaded in eager-loading.
func (PostEdges) ReplyToOrErr ¶
ReplyToOrErr returns the ReplyTo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
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 interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*PostGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PostMutation ¶
type PostMutation struct {
// contains filtered or unexported fields
}
PostMutation represents an operation that mutates the Post nodes in the graph.
func (*PostMutation) AddField ¶
func (m *PostMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PostMutation) AddPostIDs ¶
func (m *PostMutation) AddPostIDs(ids ...xid.ID)
AddPostIDs adds the "posts" edge to the Post entity by ids.
func (*PostMutation) AddReactIDs ¶
func (m *PostMutation) AddReactIDs(ids ...xid.ID)
AddReactIDs adds the "reacts" edge to the React entity by ids.
func (*PostMutation) AddReplyIDs ¶
func (m *PostMutation) AddReplyIDs(ids ...xid.ID)
AddReplyIDs adds the "replies" edge to the Post entity by ids.
func (*PostMutation) AddTagIDs ¶
func (m *PostMutation) AddTagIDs(ids ...xid.ID)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*PostMutation) AddedEdges ¶
func (m *PostMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PostMutation) AddedField ¶
func (m *PostMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PostMutation) AddedFields ¶
func (m *PostMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PostMutation) AddedIDs ¶
func (m *PostMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PostMutation) AuthorCleared ¶
func (m *PostMutation) AuthorCleared() bool
AuthorCleared reports if the "author" edge to the Account entity was cleared.
func (*PostMutation) AuthorID ¶
func (m *PostMutation) AuthorID() (id xid.ID, exists bool)
AuthorID returns the "author" edge ID in the mutation.
func (*PostMutation) AuthorIDs ¶
func (m *PostMutation) AuthorIDs() (ids []xid.ID)
AuthorIDs returns the "author" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AuthorID instead. It exists only for internal usage by the builders.
func (*PostMutation) Body ¶
func (m *PostMutation) Body() (r string, exists bool)
Body returns the value of the "body" field in the mutation.
func (*PostMutation) CategoryCleared ¶
func (m *PostMutation) CategoryCleared() bool
CategoryCleared reports if the "category" edge to the Category entity was cleared.
func (*PostMutation) CategoryID ¶
func (m *PostMutation) CategoryID() (r xid.ID, exists bool)
CategoryID returns the value of the "category_id" field in the mutation.
func (*PostMutation) CategoryIDCleared ¶
func (m *PostMutation) CategoryIDCleared() bool
CategoryIDCleared returns if the "category_id" field was cleared in this mutation.
func (*PostMutation) CategoryIDs ¶
func (m *PostMutation) CategoryIDs() (ids []xid.ID)
CategoryIDs returns the "category" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CategoryID instead. It exists only for internal usage by the builders.
func (*PostMutation) ClearAuthor ¶
func (m *PostMutation) ClearAuthor()
ClearAuthor clears the "author" edge to the Account entity.
func (*PostMutation) ClearCategory ¶
func (m *PostMutation) ClearCategory()
ClearCategory clears the "category" edge to the Category entity.
func (*PostMutation) ClearCategoryID ¶
func (m *PostMutation) ClearCategoryID()
ClearCategoryID clears the value of the "category_id" field.
func (*PostMutation) ClearDeletedAt ¶
func (m *PostMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" 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) 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) ClearPosts ¶
func (m *PostMutation) ClearPosts()
ClearPosts clears the "posts" edge to the Post entity.
func (*PostMutation) ClearReacts ¶
func (m *PostMutation) ClearReacts()
ClearReacts clears the "reacts" edge to the React entity.
func (*PostMutation) ClearReplies ¶
func (m *PostMutation) ClearReplies()
ClearReplies clears the "replies" edge to the Post entity.
func (*PostMutation) ClearReplyTo ¶
func (m *PostMutation) ClearReplyTo()
ClearReplyTo clears the "replyTo" edge to the Post entity.
func (*PostMutation) ClearReplyToPostID ¶
func (m *PostMutation) ClearReplyToPostID()
ClearReplyToPostID clears the value of the "reply_to_post_id" field.
func (*PostMutation) ClearRoot ¶
func (m *PostMutation) ClearRoot()
ClearRoot clears the "root" edge to the Post entity.
func (*PostMutation) ClearRootPostID ¶
func (m *PostMutation) ClearRootPostID()
ClearRootPostID clears the value of the "root_post_id" field.
func (*PostMutation) ClearSlug ¶
func (m *PostMutation) ClearSlug()
ClearSlug clears the value of the "slug" field.
func (*PostMutation) ClearTags ¶
func (m *PostMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*PostMutation) ClearTitle ¶
func (m *PostMutation) ClearTitle()
ClearTitle clears the value of the "title" field.
func (*PostMutation) ClearedEdges ¶
func (m *PostMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PostMutation) ClearedFields ¶
func (m *PostMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PostMutation) Client ¶
func (m PostMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*PostMutation) CreatedAt ¶
func (m *PostMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PostMutation) 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) EdgeCleared ¶
func (m *PostMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PostMutation) Field ¶
func (m *PostMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PostMutation) FieldCleared ¶
func (m *PostMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PostMutation) Fields ¶
func (m *PostMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*PostMutation) First ¶
func (m *PostMutation) First() (r bool, exists bool)
First returns the value of the "first" field in the mutation.
func (*PostMutation) ID ¶
func (m *PostMutation) ID() (id xid.ID, 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) OldBody ¶
func (m *PostMutation) OldBody(ctx context.Context) (v string, err error)
OldBody returns the old "body" 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) OldCategoryID ¶
OldCategoryID returns the old "category_id" field's value of the Post entity. If the Post object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PostMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Post entity. If the Post object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PostMutation) 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) 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) OldFirst ¶
func (m *PostMutation) OldFirst(ctx context.Context) (v bool, err error)
OldFirst returns the old "first" 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) OldReplyToPostID ¶
OldReplyToPostID returns the old "reply_to_post_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) OldRootPostID ¶
OldRootPostID returns the old "root_post_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) OldShort ¶
func (m *PostMutation) OldShort(ctx context.Context) (v string, err error)
OldShort returns the old "short" field's value of the Post entity. If the Post object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PostMutation) OldSlug ¶
func (m *PostMutation) OldSlug(ctx context.Context) (v string, err error)
OldSlug returns the old "slug" field's value of the Post entity. If the Post object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PostMutation) 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) Pinned ¶
func (m *PostMutation) Pinned() (r bool, exists bool)
Pinned returns the value of the "pinned" field in the mutation.
func (*PostMutation) PostsCleared ¶
func (m *PostMutation) PostsCleared() bool
PostsCleared reports if the "posts" edge to the Post entity was cleared.
func (*PostMutation) PostsIDs ¶
func (m *PostMutation) PostsIDs() (ids []xid.ID)
PostsIDs returns the "posts" edge IDs in the mutation.
func (*PostMutation) ReactsCleared ¶
func (m *PostMutation) ReactsCleared() bool
ReactsCleared reports if the "reacts" edge to the React entity was cleared.
func (*PostMutation) ReactsIDs ¶
func (m *PostMutation) ReactsIDs() (ids []xid.ID)
ReactsIDs returns the "reacts" edge IDs in the mutation.
func (*PostMutation) RemovePostIDs ¶
func (m *PostMutation) RemovePostIDs(ids ...xid.ID)
RemovePostIDs removes the "posts" edge to the Post entity by IDs.
func (*PostMutation) RemoveReactIDs ¶
func (m *PostMutation) RemoveReactIDs(ids ...xid.ID)
RemoveReactIDs removes the "reacts" edge to the React entity by IDs.
func (*PostMutation) RemoveReplyIDs ¶
func (m *PostMutation) RemoveReplyIDs(ids ...xid.ID)
RemoveReplyIDs removes the "replies" edge to the Post entity by IDs.
func (*PostMutation) RemoveTagIDs ¶
func (m *PostMutation) RemoveTagIDs(ids ...xid.ID)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
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) RemovedPostsIDs ¶
func (m *PostMutation) RemovedPostsIDs() (ids []xid.ID)
RemovedPosts returns the removed IDs of the "posts" edge to the Post entity.
func (*PostMutation) RemovedReactsIDs ¶
func (m *PostMutation) RemovedReactsIDs() (ids []xid.ID)
RemovedReacts returns the removed IDs of the "reacts" edge to the React entity.
func (*PostMutation) RemovedRepliesIDs ¶
func (m *PostMutation) RemovedRepliesIDs() (ids []xid.ID)
RemovedReplies returns the removed IDs of the "replies" edge to the Post entity.
func (*PostMutation) RemovedTagsIDs ¶
func (m *PostMutation) RemovedTagsIDs() (ids []xid.ID)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*PostMutation) RepliesCleared ¶
func (m *PostMutation) RepliesCleared() bool
RepliesCleared reports if the "replies" edge to the Post entity was cleared.
func (*PostMutation) RepliesIDs ¶
func (m *PostMutation) RepliesIDs() (ids []xid.ID)
RepliesIDs returns the "replies" edge IDs in the mutation.
func (*PostMutation) ReplyToCleared ¶
func (m *PostMutation) ReplyToCleared() bool
ReplyToCleared reports if the "replyTo" edge to the Post entity was cleared.
func (*PostMutation) ReplyToID ¶
func (m *PostMutation) ReplyToID() (id xid.ID, exists bool)
ReplyToID returns the "replyTo" edge ID in the mutation.
func (*PostMutation) ReplyToIDs ¶
func (m *PostMutation) ReplyToIDs() (ids []xid.ID)
ReplyToIDs returns the "replyTo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ReplyToID instead. It exists only for internal usage by the builders.
func (*PostMutation) ReplyToPostID ¶
func (m *PostMutation) ReplyToPostID() (r xid.ID, exists bool)
ReplyToPostID returns the value of the "reply_to_post_id" field in the mutation.
func (*PostMutation) ReplyToPostIDCleared ¶
func (m *PostMutation) ReplyToPostIDCleared() bool
ReplyToPostIDCleared returns if the "reply_to_post_id" field was cleared in this mutation.
func (*PostMutation) ResetAuthor ¶
func (m *PostMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" edge.
func (*PostMutation) ResetBody ¶
func (m *PostMutation) ResetBody()
ResetBody resets all changes to the "body" field.
func (*PostMutation) ResetCategory ¶
func (m *PostMutation) ResetCategory()
ResetCategory resets all changes to the "category" edge.
func (*PostMutation) ResetCategoryID ¶
func (m *PostMutation) ResetCategoryID()
ResetCategoryID resets all changes to the "category_id" 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) ResetEdge ¶
func (m *PostMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*PostMutation) ResetField ¶
func (m *PostMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*PostMutation) ResetFirst ¶
func (m *PostMutation) ResetFirst()
ResetFirst resets all changes to the "first" field.
func (*PostMutation) ResetPinned ¶
func (m *PostMutation) ResetPinned()
ResetPinned resets all changes to the "pinned" field.
func (*PostMutation) ResetPosts ¶
func (m *PostMutation) ResetPosts()
ResetPosts resets all changes to the "posts" edge.
func (*PostMutation) ResetReacts ¶
func (m *PostMutation) ResetReacts()
ResetReacts resets all changes to the "reacts" edge.
func (*PostMutation) ResetReplies ¶
func (m *PostMutation) ResetReplies()
ResetReplies resets all changes to the "replies" edge.
func (*PostMutation) ResetReplyTo ¶
func (m *PostMutation) ResetReplyTo()
ResetReplyTo resets all changes to the "replyTo" edge.
func (*PostMutation) ResetReplyToPostID ¶
func (m *PostMutation) ResetReplyToPostID()
ResetReplyToPostID resets all changes to the "reply_to_post_id" field.
func (*PostMutation) ResetRoot ¶
func (m *PostMutation) ResetRoot()
ResetRoot resets all changes to the "root" edge.
func (*PostMutation) ResetRootPostID ¶
func (m *PostMutation) ResetRootPostID()
ResetRootPostID resets all changes to the "root_post_id" field.
func (*PostMutation) ResetShort ¶
func (m *PostMutation) ResetShort()
ResetShort resets all changes to the "short" field.
func (*PostMutation) ResetSlug ¶
func (m *PostMutation) ResetSlug()
ResetSlug resets all changes to the "slug" field.
func (*PostMutation) ResetTags ¶
func (m *PostMutation) ResetTags()
ResetTags resets all changes to the "tags" 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) RootCleared ¶
func (m *PostMutation) RootCleared() bool
RootCleared reports if the "root" edge to the Post entity was cleared.
func (*PostMutation) RootID ¶
func (m *PostMutation) RootID() (id xid.ID, exists bool)
RootID returns the "root" edge ID in the mutation.
func (*PostMutation) RootIDs ¶
func (m *PostMutation) RootIDs() (ids []xid.ID)
RootIDs returns the "root" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RootID instead. It exists only for internal usage by the builders.
func (*PostMutation) RootPostID ¶
func (m *PostMutation) RootPostID() (r xid.ID, exists bool)
RootPostID returns the value of the "root_post_id" field in the mutation.
func (*PostMutation) RootPostIDCleared ¶
func (m *PostMutation) RootPostIDCleared() bool
RootPostIDCleared returns if the "root_post_id" field was cleared in this mutation.
func (*PostMutation) SetAuthorID ¶
func (m *PostMutation) SetAuthorID(id xid.ID)
SetAuthorID sets the "author" edge to the Account entity by id.
func (*PostMutation) SetBody ¶
func (m *PostMutation) SetBody(s string)
SetBody sets the "body" field.
func (*PostMutation) SetCategoryID ¶
func (m *PostMutation) SetCategoryID(x xid.ID)
SetCategoryID sets the "category_id" 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) 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) SetFirst ¶
func (m *PostMutation) SetFirst(b bool)
SetFirst sets the "first" field.
func (*PostMutation) SetID ¶
func (m *PostMutation) SetID(id xid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Post entities.
func (*PostMutation) SetPinned ¶
func (m *PostMutation) SetPinned(b bool)
SetPinned sets the "pinned" field.
func (*PostMutation) SetReplyToID ¶
func (m *PostMutation) SetReplyToID(id xid.ID)
SetReplyToID sets the "replyTo" edge to the Post entity by id.
func (*PostMutation) SetReplyToPostID ¶
func (m *PostMutation) SetReplyToPostID(x xid.ID)
SetReplyToPostID sets the "reply_to_post_id" field.
func (*PostMutation) SetRootID ¶
func (m *PostMutation) SetRootID(id xid.ID)
SetRootID sets the "root" edge to the Post entity by id.
func (*PostMutation) SetRootPostID ¶
func (m *PostMutation) SetRootPostID(x xid.ID)
SetRootPostID sets the "root_post_id" field.
func (*PostMutation) SetShort ¶
func (m *PostMutation) SetShort(s string)
SetShort sets the "short" field.
func (*PostMutation) SetSlug ¶
func (m *PostMutation) SetSlug(s string)
SetSlug sets the "slug" 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) Short ¶
func (m *PostMutation) Short() (r string, exists bool)
Short returns the value of the "short" field in the mutation.
func (*PostMutation) Slug ¶
func (m *PostMutation) Slug() (r string, exists bool)
Slug returns the value of the "slug" field in the mutation.
func (*PostMutation) SlugCleared ¶
func (m *PostMutation) SlugCleared() bool
SlugCleared returns if the "slug" field was cleared in this mutation.
func (*PostMutation) TagsCleared ¶
func (m *PostMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*PostMutation) TagsIDs ¶
func (m *PostMutation) TagsIDs() (ids []xid.ID)
TagsIDs returns the "tags" edge IDs in the mutation.
func (*PostMutation) Title ¶
func (m *PostMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (*PostMutation) TitleCleared ¶
func (m *PostMutation) TitleCleared() bool
TitleCleared returns if the "title" field was cleared in this 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.
type PostQuery ¶
type PostQuery struct {
// contains filtered or unexported fields
}
PostQuery is the builder for querying Post entities.
func (*PostQuery) Clone ¶
Clone returns a duplicate of the PostQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PostQuery) First ¶
First returns the first Post entity from the query. Returns a *NotFoundError when no Post was found.
func (*PostQuery) FirstID ¶
FirstID returns the first Post ID from the query. Returns a *NotFoundError when no Post ID was found.
func (*PostQuery) GroupBy ¶
func (pq *PostQuery) GroupBy(field string, fields ...string) *PostGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Post.Query(). GroupBy(post.FieldCreatedAt). Aggregate(model.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) QueryAuthor ¶
func (pq *PostQuery) QueryAuthor() *AccountQuery
QueryAuthor chains the current query on the "author" edge.
func (*PostQuery) QueryCategory ¶
func (pq *PostQuery) QueryCategory() *CategoryQuery
QueryCategory chains the current query on the "category" edge.
func (*PostQuery) QueryPosts ¶
QueryPosts chains the current query on the "posts" edge.
func (*PostQuery) QueryReacts ¶
func (pq *PostQuery) QueryReacts() *ReactQuery
QueryReacts chains the current query on the "reacts" edge.
func (*PostQuery) QueryReplies ¶
QueryReplies chains the current query on the "replies" edge.
func (*PostQuery) QueryReplyTo ¶
QueryReplyTo chains the current query on the "replyTo" edge.
func (*PostQuery) Select ¶
func (pq *PostQuery) Select(fields ...string) *PostSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Post.Query(). Select(post.FieldCreatedAt). Scan(ctx, &v)
func (*PostQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PostQuery) WithAuthor ¶
func (pq *PostQuery) WithAuthor(opts ...func(*AccountQuery)) *PostQuery
WithAuthor tells the query-builder to eager-load the nodes that are connected to the "author" edge. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithCategory ¶
func (pq *PostQuery) WithCategory(opts ...func(*CategoryQuery)) *PostQuery
WithCategory tells the query-builder to eager-load the nodes that are connected to the "category" edge. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithPosts ¶
WithPosts tells the query-builder to eager-load the nodes that are connected to the "posts" edge. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithReacts ¶
func (pq *PostQuery) WithReacts(opts ...func(*ReactQuery)) *PostQuery
WithReacts tells the query-builder to eager-load the nodes that are connected to the "reacts" edge. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithReplies ¶
WithReplies tells the query-builder to eager-load the nodes that are connected to the "replies" edge. The optional arguments are used to configure the query builder of the edge.
func (*PostQuery) WithReplyTo ¶
WithReplyTo tells the query-builder to eager-load the nodes that are connected to the "replyTo" 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) 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 interface{}) 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) AddPostIDs ¶
func (pu *PostUpdate) AddPostIDs(ids ...xid.ID) *PostUpdate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*PostUpdate) AddPosts ¶
func (pu *PostUpdate) AddPosts(p ...*Post) *PostUpdate
AddPosts adds the "posts" edges to the Post entity.
func (*PostUpdate) AddReactIDs ¶
func (pu *PostUpdate) AddReactIDs(ids ...xid.ID) *PostUpdate
AddReactIDs adds the "reacts" edge to the React entity by IDs.
func (*PostUpdate) AddReacts ¶
func (pu *PostUpdate) AddReacts(r ...*React) *PostUpdate
AddReacts adds the "reacts" edges to the React entity.
func (*PostUpdate) AddReplies ¶
func (pu *PostUpdate) AddReplies(p ...*Post) *PostUpdate
AddReplies adds the "replies" edges to the Post entity.
func (*PostUpdate) AddReplyIDs ¶
func (pu *PostUpdate) AddReplyIDs(ids ...xid.ID) *PostUpdate
AddReplyIDs adds the "replies" edge to the Post entity by IDs.
func (*PostUpdate) AddTagIDs ¶
func (pu *PostUpdate) AddTagIDs(ids ...xid.ID) *PostUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*PostUpdate) AddTags ¶
func (pu *PostUpdate) AddTags(t ...*Tag) *PostUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*PostUpdate) ClearAuthor ¶
func (pu *PostUpdate) ClearAuthor() *PostUpdate
ClearAuthor clears the "author" edge to the Account entity.
func (*PostUpdate) ClearCategory ¶
func (pu *PostUpdate) ClearCategory() *PostUpdate
ClearCategory clears the "category" edge to the Category entity.
func (*PostUpdate) ClearCategoryID ¶
func (pu *PostUpdate) ClearCategoryID() *PostUpdate
ClearCategoryID clears the value of the "category_id" field.
func (*PostUpdate) ClearDeletedAt ¶
func (pu *PostUpdate) ClearDeletedAt() *PostUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpdate) ClearPosts ¶
func (pu *PostUpdate) ClearPosts() *PostUpdate
ClearPosts clears all "posts" edges to the Post entity.
func (*PostUpdate) ClearReacts ¶
func (pu *PostUpdate) ClearReacts() *PostUpdate
ClearReacts clears all "reacts" edges to the React entity.
func (*PostUpdate) ClearReplies ¶
func (pu *PostUpdate) ClearReplies() *PostUpdate
ClearReplies clears all "replies" edges to the Post entity.
func (*PostUpdate) ClearReplyTo ¶
func (pu *PostUpdate) ClearReplyTo() *PostUpdate
ClearReplyTo clears the "replyTo" edge to the Post entity.
func (*PostUpdate) ClearReplyToPostID ¶
func (pu *PostUpdate) ClearReplyToPostID() *PostUpdate
ClearReplyToPostID clears the value of the "reply_to_post_id" field.
func (*PostUpdate) ClearRoot ¶
func (pu *PostUpdate) ClearRoot() *PostUpdate
ClearRoot clears the "root" edge to the Post entity.
func (*PostUpdate) ClearRootPostID ¶
func (pu *PostUpdate) ClearRootPostID() *PostUpdate
ClearRootPostID clears the value of the "root_post_id" field.
func (*PostUpdate) ClearSlug ¶
func (pu *PostUpdate) ClearSlug() *PostUpdate
ClearSlug clears the value of the "slug" field.
func (*PostUpdate) ClearTags ¶
func (pu *PostUpdate) ClearTags() *PostUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*PostUpdate) ClearTitle ¶
func (pu *PostUpdate) ClearTitle() *PostUpdate
ClearTitle clears the value of the "title" field.
func (*PostUpdate) Exec ¶
func (pu *PostUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PostUpdate) ExecX ¶
func (pu *PostUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostUpdate) 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) RemovePostIDs ¶
func (pu *PostUpdate) RemovePostIDs(ids ...xid.ID) *PostUpdate
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*PostUpdate) RemovePosts ¶
func (pu *PostUpdate) RemovePosts(p ...*Post) *PostUpdate
RemovePosts removes "posts" edges to Post entities.
func (*PostUpdate) RemoveReactIDs ¶
func (pu *PostUpdate) RemoveReactIDs(ids ...xid.ID) *PostUpdate
RemoveReactIDs removes the "reacts" edge to React entities by IDs.
func (*PostUpdate) RemoveReacts ¶
func (pu *PostUpdate) RemoveReacts(r ...*React) *PostUpdate
RemoveReacts removes "reacts" edges to React entities.
func (*PostUpdate) RemoveReplies ¶
func (pu *PostUpdate) RemoveReplies(p ...*Post) *PostUpdate
RemoveReplies removes "replies" edges to Post entities.
func (*PostUpdate) RemoveReplyIDs ¶
func (pu *PostUpdate) RemoveReplyIDs(ids ...xid.ID) *PostUpdate
RemoveReplyIDs removes the "replies" edge to Post entities by IDs.
func (*PostUpdate) RemoveTagIDs ¶
func (pu *PostUpdate) RemoveTagIDs(ids ...xid.ID) *PostUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*PostUpdate) RemoveTags ¶
func (pu *PostUpdate) RemoveTags(t ...*Tag) *PostUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*PostUpdate) Save ¶
func (pu *PostUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PostUpdate) SaveX ¶
func (pu *PostUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PostUpdate) SetAuthor ¶
func (pu *PostUpdate) SetAuthor(a *Account) *PostUpdate
SetAuthor sets the "author" edge to the Account entity.
func (*PostUpdate) SetAuthorID ¶
func (pu *PostUpdate) SetAuthorID(id xid.ID) *PostUpdate
SetAuthorID sets the "author" edge to the Account entity by ID.
func (*PostUpdate) SetBody ¶
func (pu *PostUpdate) SetBody(s string) *PostUpdate
SetBody sets the "body" field.
func (*PostUpdate) SetCategory ¶
func (pu *PostUpdate) SetCategory(c *Category) *PostUpdate
SetCategory sets the "category" edge to the Category entity.
func (*PostUpdate) SetCategoryID ¶
func (pu *PostUpdate) SetCategoryID(x xid.ID) *PostUpdate
SetCategoryID sets the "category_id" field.
func (*PostUpdate) SetDeletedAt ¶
func (pu *PostUpdate) SetDeletedAt(t time.Time) *PostUpdate
SetDeletedAt sets the "deleted_at" field.
func (*PostUpdate) SetFirst ¶
func (pu *PostUpdate) SetFirst(b bool) *PostUpdate
SetFirst sets the "first" field.
func (*PostUpdate) SetNillableCategoryID ¶
func (pu *PostUpdate) SetNillableCategoryID(x *xid.ID) *PostUpdate
SetNillableCategoryID sets the "category_id" 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) SetNillablePinned ¶
func (pu *PostUpdate) SetNillablePinned(b *bool) *PostUpdate
SetNillablePinned sets the "pinned" field if the given value is not nil.
func (*PostUpdate) SetNillableReplyToID ¶
func (pu *PostUpdate) SetNillableReplyToID(id *xid.ID) *PostUpdate
SetNillableReplyToID sets the "replyTo" edge to the Post entity by ID if the given value is not nil.
func (*PostUpdate) SetNillableReplyToPostID ¶
func (pu *PostUpdate) SetNillableReplyToPostID(x *xid.ID) *PostUpdate
SetNillableReplyToPostID sets the "reply_to_post_id" field if the given value is not nil.
func (*PostUpdate) SetNillableRootID ¶
func (pu *PostUpdate) SetNillableRootID(id *xid.ID) *PostUpdate
SetNillableRootID sets the "root" edge to the Post entity by ID if the given value is not nil.
func (*PostUpdate) SetNillableRootPostID ¶
func (pu *PostUpdate) SetNillableRootPostID(x *xid.ID) *PostUpdate
SetNillableRootPostID sets the "root_post_id" field if the given value is not nil.
func (*PostUpdate) SetNillableSlug ¶
func (pu *PostUpdate) SetNillableSlug(s *string) *PostUpdate
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*PostUpdate) SetNillableTitle ¶
func (pu *PostUpdate) SetNillableTitle(s *string) *PostUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*PostUpdate) SetPinned ¶
func (pu *PostUpdate) SetPinned(b bool) *PostUpdate
SetPinned sets the "pinned" field.
func (*PostUpdate) SetReplyTo ¶
func (pu *PostUpdate) SetReplyTo(p *Post) *PostUpdate
SetReplyTo sets the "replyTo" edge to the Post entity.
func (*PostUpdate) SetReplyToID ¶
func (pu *PostUpdate) SetReplyToID(id xid.ID) *PostUpdate
SetReplyToID sets the "replyTo" edge to the Post entity by ID.
func (*PostUpdate) SetReplyToPostID ¶
func (pu *PostUpdate) SetReplyToPostID(x xid.ID) *PostUpdate
SetReplyToPostID sets the "reply_to_post_id" field.
func (*PostUpdate) SetRoot ¶
func (pu *PostUpdate) SetRoot(p *Post) *PostUpdate
SetRoot sets the "root" edge to the Post entity.
func (*PostUpdate) SetRootID ¶
func (pu *PostUpdate) SetRootID(id xid.ID) *PostUpdate
SetRootID sets the "root" edge to the Post entity by ID.
func (*PostUpdate) SetRootPostID ¶
func (pu *PostUpdate) SetRootPostID(x xid.ID) *PostUpdate
SetRootPostID sets the "root_post_id" field.
func (*PostUpdate) SetShort ¶
func (pu *PostUpdate) SetShort(s string) *PostUpdate
SetShort sets the "short" field.
func (*PostUpdate) SetSlug ¶
func (pu *PostUpdate) SetSlug(s string) *PostUpdate
SetSlug sets the "slug" 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) AddPostIDs ¶
func (puo *PostUpdateOne) AddPostIDs(ids ...xid.ID) *PostUpdateOne
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*PostUpdateOne) AddPosts ¶
func (puo *PostUpdateOne) AddPosts(p ...*Post) *PostUpdateOne
AddPosts adds the "posts" edges to the Post entity.
func (*PostUpdateOne) AddReactIDs ¶
func (puo *PostUpdateOne) AddReactIDs(ids ...xid.ID) *PostUpdateOne
AddReactIDs adds the "reacts" edge to the React entity by IDs.
func (*PostUpdateOne) AddReacts ¶
func (puo *PostUpdateOne) AddReacts(r ...*React) *PostUpdateOne
AddReacts adds the "reacts" edges to the React entity.
func (*PostUpdateOne) AddReplies ¶
func (puo *PostUpdateOne) AddReplies(p ...*Post) *PostUpdateOne
AddReplies adds the "replies" edges to the Post entity.
func (*PostUpdateOne) AddReplyIDs ¶
func (puo *PostUpdateOne) AddReplyIDs(ids ...xid.ID) *PostUpdateOne
AddReplyIDs adds the "replies" edge to the Post entity by IDs.
func (*PostUpdateOne) AddTagIDs ¶
func (puo *PostUpdateOne) AddTagIDs(ids ...xid.ID) *PostUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*PostUpdateOne) AddTags ¶
func (puo *PostUpdateOne) AddTags(t ...*Tag) *PostUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*PostUpdateOne) ClearAuthor ¶
func (puo *PostUpdateOne) ClearAuthor() *PostUpdateOne
ClearAuthor clears the "author" edge to the Account entity.
func (*PostUpdateOne) ClearCategory ¶
func (puo *PostUpdateOne) ClearCategory() *PostUpdateOne
ClearCategory clears the "category" edge to the Category entity.
func (*PostUpdateOne) ClearCategoryID ¶
func (puo *PostUpdateOne) ClearCategoryID() *PostUpdateOne
ClearCategoryID clears the value of the "category_id" field.
func (*PostUpdateOne) ClearDeletedAt ¶
func (puo *PostUpdateOne) ClearDeletedAt() *PostUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpdateOne) ClearPosts ¶
func (puo *PostUpdateOne) ClearPosts() *PostUpdateOne
ClearPosts clears all "posts" edges to the Post entity.
func (*PostUpdateOne) ClearReacts ¶
func (puo *PostUpdateOne) ClearReacts() *PostUpdateOne
ClearReacts clears all "reacts" edges to the React entity.
func (*PostUpdateOne) ClearReplies ¶
func (puo *PostUpdateOne) ClearReplies() *PostUpdateOne
ClearReplies clears all "replies" edges to the Post entity.
func (*PostUpdateOne) ClearReplyTo ¶
func (puo *PostUpdateOne) ClearReplyTo() *PostUpdateOne
ClearReplyTo clears the "replyTo" edge to the Post entity.
func (*PostUpdateOne) ClearReplyToPostID ¶
func (puo *PostUpdateOne) ClearReplyToPostID() *PostUpdateOne
ClearReplyToPostID clears the value of the "reply_to_post_id" field.
func (*PostUpdateOne) ClearRoot ¶
func (puo *PostUpdateOne) ClearRoot() *PostUpdateOne
ClearRoot clears the "root" edge to the Post entity.
func (*PostUpdateOne) ClearRootPostID ¶
func (puo *PostUpdateOne) ClearRootPostID() *PostUpdateOne
ClearRootPostID clears the value of the "root_post_id" field.
func (*PostUpdateOne) ClearSlug ¶
func (puo *PostUpdateOne) ClearSlug() *PostUpdateOne
ClearSlug clears the value of the "slug" field.
func (*PostUpdateOne) ClearTags ¶
func (puo *PostUpdateOne) ClearTags() *PostUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*PostUpdateOne) ClearTitle ¶
func (puo *PostUpdateOne) ClearTitle() *PostUpdateOne
ClearTitle clears the value of the "title" field.
func (*PostUpdateOne) Exec ¶
func (puo *PostUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PostUpdateOne) ExecX ¶
func (puo *PostUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostUpdateOne) 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) RemovePostIDs ¶
func (puo *PostUpdateOne) RemovePostIDs(ids ...xid.ID) *PostUpdateOne
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*PostUpdateOne) RemovePosts ¶
func (puo *PostUpdateOne) RemovePosts(p ...*Post) *PostUpdateOne
RemovePosts removes "posts" edges to Post entities.
func (*PostUpdateOne) RemoveReactIDs ¶
func (puo *PostUpdateOne) RemoveReactIDs(ids ...xid.ID) *PostUpdateOne
RemoveReactIDs removes the "reacts" edge to React entities by IDs.
func (*PostUpdateOne) RemoveReacts ¶
func (puo *PostUpdateOne) RemoveReacts(r ...*React) *PostUpdateOne
RemoveReacts removes "reacts" edges to React entities.
func (*PostUpdateOne) RemoveReplies ¶
func (puo *PostUpdateOne) RemoveReplies(p ...*Post) *PostUpdateOne
RemoveReplies removes "replies" edges to Post entities.
func (*PostUpdateOne) RemoveReplyIDs ¶
func (puo *PostUpdateOne) RemoveReplyIDs(ids ...xid.ID) *PostUpdateOne
RemoveReplyIDs removes the "replies" edge to Post entities by IDs.
func (*PostUpdateOne) RemoveTagIDs ¶
func (puo *PostUpdateOne) RemoveTagIDs(ids ...xid.ID) *PostUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*PostUpdateOne) RemoveTags ¶
func (puo *PostUpdateOne) RemoveTags(t ...*Tag) *PostUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*PostUpdateOne) Save ¶
func (puo *PostUpdateOne) Save(ctx context.Context) (*Post, error)
Save executes the query and returns the updated Post entity.
func (*PostUpdateOne) SaveX ¶
func (puo *PostUpdateOne) SaveX(ctx context.Context) *Post
SaveX is like Save, but panics if an error occurs.
func (*PostUpdateOne) Select ¶
func (puo *PostUpdateOne) Select(field string, fields ...string) *PostUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PostUpdateOne) SetAuthor ¶
func (puo *PostUpdateOne) SetAuthor(a *Account) *PostUpdateOne
SetAuthor sets the "author" edge to the Account entity.
func (*PostUpdateOne) SetAuthorID ¶
func (puo *PostUpdateOne) SetAuthorID(id xid.ID) *PostUpdateOne
SetAuthorID sets the "author" edge to the Account entity by ID.
func (*PostUpdateOne) SetBody ¶
func (puo *PostUpdateOne) SetBody(s string) *PostUpdateOne
SetBody sets the "body" field.
func (*PostUpdateOne) SetCategory ¶
func (puo *PostUpdateOne) SetCategory(c *Category) *PostUpdateOne
SetCategory sets the "category" edge to the Category entity.
func (*PostUpdateOne) SetCategoryID ¶
func (puo *PostUpdateOne) SetCategoryID(x xid.ID) *PostUpdateOne
SetCategoryID sets the "category_id" field.
func (*PostUpdateOne) SetDeletedAt ¶
func (puo *PostUpdateOne) SetDeletedAt(t time.Time) *PostUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*PostUpdateOne) SetFirst ¶
func (puo *PostUpdateOne) SetFirst(b bool) *PostUpdateOne
SetFirst sets the "first" field.
func (*PostUpdateOne) SetNillableCategoryID ¶
func (puo *PostUpdateOne) SetNillableCategoryID(x *xid.ID) *PostUpdateOne
SetNillableCategoryID sets the "category_id" 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) SetNillablePinned ¶
func (puo *PostUpdateOne) SetNillablePinned(b *bool) *PostUpdateOne
SetNillablePinned sets the "pinned" field if the given value is not nil.
func (*PostUpdateOne) SetNillableReplyToID ¶
func (puo *PostUpdateOne) SetNillableReplyToID(id *xid.ID) *PostUpdateOne
SetNillableReplyToID sets the "replyTo" edge to the Post entity by ID if the given value is not nil.
func (*PostUpdateOne) SetNillableReplyToPostID ¶
func (puo *PostUpdateOne) SetNillableReplyToPostID(x *xid.ID) *PostUpdateOne
SetNillableReplyToPostID sets the "reply_to_post_id" field if the given value is not nil.
func (*PostUpdateOne) SetNillableRootID ¶
func (puo *PostUpdateOne) SetNillableRootID(id *xid.ID) *PostUpdateOne
SetNillableRootID sets the "root" edge to the Post entity by ID if the given value is not nil.
func (*PostUpdateOne) SetNillableRootPostID ¶
func (puo *PostUpdateOne) SetNillableRootPostID(x *xid.ID) *PostUpdateOne
SetNillableRootPostID sets the "root_post_id" field if the given value is not nil.
func (*PostUpdateOne) SetNillableSlug ¶
func (puo *PostUpdateOne) SetNillableSlug(s *string) *PostUpdateOne
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*PostUpdateOne) SetNillableTitle ¶
func (puo *PostUpdateOne) SetNillableTitle(s *string) *PostUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*PostUpdateOne) SetPinned ¶
func (puo *PostUpdateOne) SetPinned(b bool) *PostUpdateOne
SetPinned sets the "pinned" field.
func (*PostUpdateOne) SetReplyTo ¶
func (puo *PostUpdateOne) SetReplyTo(p *Post) *PostUpdateOne
SetReplyTo sets the "replyTo" edge to the Post entity.
func (*PostUpdateOne) SetReplyToID ¶
func (puo *PostUpdateOne) SetReplyToID(id xid.ID) *PostUpdateOne
SetReplyToID sets the "replyTo" edge to the Post entity by ID.
func (*PostUpdateOne) SetReplyToPostID ¶
func (puo *PostUpdateOne) SetReplyToPostID(x xid.ID) *PostUpdateOne
SetReplyToPostID sets the "reply_to_post_id" field.
func (*PostUpdateOne) SetRoot ¶
func (puo *PostUpdateOne) SetRoot(p *Post) *PostUpdateOne
SetRoot sets the "root" edge to the Post entity.
func (*PostUpdateOne) SetRootID ¶
func (puo *PostUpdateOne) SetRootID(id xid.ID) *PostUpdateOne
SetRootID sets the "root" edge to the Post entity by ID.
func (*PostUpdateOne) SetRootPostID ¶
func (puo *PostUpdateOne) SetRootPostID(x xid.ID) *PostUpdateOne
SetRootPostID sets the "root_post_id" field.
func (*PostUpdateOne) SetShort ¶
func (puo *PostUpdateOne) SetShort(s string) *PostUpdateOne
SetShort sets the "short" field.
func (*PostUpdateOne) SetSlug ¶
func (puo *PostUpdateOne) SetSlug(s string) *PostUpdateOne
SetSlug sets the "slug" 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.
type PostUpsert ¶
PostUpsert is the "OnConflict" setter.
func (*PostUpsert) ClearCategoryID ¶
func (u *PostUpsert) ClearCategoryID() *PostUpsert
ClearCategoryID clears the value of the "category_id" field.
func (*PostUpsert) ClearDeletedAt ¶
func (u *PostUpsert) ClearDeletedAt() *PostUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpsert) ClearReplyToPostID ¶
func (u *PostUpsert) ClearReplyToPostID() *PostUpsert
ClearReplyToPostID clears the value of the "reply_to_post_id" field.
func (*PostUpsert) ClearRootPostID ¶
func (u *PostUpsert) ClearRootPostID() *PostUpsert
ClearRootPostID clears the value of the "root_post_id" field.
func (*PostUpsert) ClearSlug ¶
func (u *PostUpsert) ClearSlug() *PostUpsert
ClearSlug clears the value of the "slug" field.
func (*PostUpsert) ClearTitle ¶
func (u *PostUpsert) ClearTitle() *PostUpsert
ClearTitle clears the value of the "title" field.
func (*PostUpsert) SetBody ¶
func (u *PostUpsert) SetBody(v string) *PostUpsert
SetBody sets the "body" field.
func (*PostUpsert) SetCategoryID ¶
func (u *PostUpsert) SetCategoryID(v xid.ID) *PostUpsert
SetCategoryID sets the "category_id" field.
func (*PostUpsert) SetCreatedAt ¶
func (u *PostUpsert) SetCreatedAt(v time.Time) *PostUpsert
SetCreatedAt sets the "created_at" field.
func (*PostUpsert) SetDeletedAt ¶
func (u *PostUpsert) SetDeletedAt(v time.Time) *PostUpsert
SetDeletedAt sets the "deleted_at" field.
func (*PostUpsert) SetFirst ¶
func (u *PostUpsert) SetFirst(v bool) *PostUpsert
SetFirst sets the "first" field.
func (*PostUpsert) SetPinned ¶
func (u *PostUpsert) SetPinned(v bool) *PostUpsert
SetPinned sets the "pinned" field.
func (*PostUpsert) SetReplyToPostID ¶
func (u *PostUpsert) SetReplyToPostID(v xid.ID) *PostUpsert
SetReplyToPostID sets the "reply_to_post_id" field.
func (*PostUpsert) SetRootPostID ¶
func (u *PostUpsert) SetRootPostID(v xid.ID) *PostUpsert
SetRootPostID sets the "root_post_id" field.
func (*PostUpsert) SetShort ¶
func (u *PostUpsert) SetShort(v string) *PostUpsert
SetShort sets the "short" field.
func (*PostUpsert) SetSlug ¶
func (u *PostUpsert) SetSlug(v string) *PostUpsert
SetSlug sets the "slug" field.
func (*PostUpsert) SetTitle ¶
func (u *PostUpsert) SetTitle(v string) *PostUpsert
SetTitle sets the "title" field.
func (*PostUpsert) SetUpdatedAt ¶
func (u *PostUpsert) SetUpdatedAt(v time.Time) *PostUpsert
SetUpdatedAt sets the "updated_at" field.
func (*PostUpsert) UpdateBody ¶
func (u *PostUpsert) UpdateBody() *PostUpsert
UpdateBody sets the "body" field to the value that was provided on create.
func (*PostUpsert) UpdateCategoryID ¶
func (u *PostUpsert) UpdateCategoryID() *PostUpsert
UpdateCategoryID sets the "category_id" field to the value that was provided on create.
func (*PostUpsert) UpdateCreatedAt ¶
func (u *PostUpsert) UpdateCreatedAt() *PostUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*PostUpsert) UpdateDeletedAt ¶
func (u *PostUpsert) UpdateDeletedAt() *PostUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PostUpsert) UpdateFirst ¶
func (u *PostUpsert) UpdateFirst() *PostUpsert
UpdateFirst sets the "first" field to the value that was provided on create.
func (*PostUpsert) UpdatePinned ¶
func (u *PostUpsert) UpdatePinned() *PostUpsert
UpdatePinned sets the "pinned" field to the value that was provided on create.
func (*PostUpsert) UpdateReplyToPostID ¶
func (u *PostUpsert) UpdateReplyToPostID() *PostUpsert
UpdateReplyToPostID sets the "reply_to_post_id" field to the value that was provided on create.
func (*PostUpsert) UpdateRootPostID ¶
func (u *PostUpsert) UpdateRootPostID() *PostUpsert
UpdateRootPostID sets the "root_post_id" field to the value that was provided on create.
func (*PostUpsert) UpdateShort ¶
func (u *PostUpsert) UpdateShort() *PostUpsert
UpdateShort sets the "short" field to the value that was provided on create.
func (*PostUpsert) UpdateSlug ¶
func (u *PostUpsert) UpdateSlug() *PostUpsert
UpdateSlug sets the "slug" field to the value that was provided on create.
func (*PostUpsert) UpdateTitle ¶
func (u *PostUpsert) UpdateTitle() *PostUpsert
UpdateTitle sets the "title" field to the value that was provided on create.
func (*PostUpsert) UpdateUpdatedAt ¶
func (u *PostUpsert) UpdateUpdatedAt() *PostUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type PostUpsertBulk ¶
type PostUpsertBulk struct {
// contains filtered or unexported fields
}
PostUpsertBulk is the builder for "upsert"-ing a bulk of Post nodes.
func (*PostUpsertBulk) ClearCategoryID ¶
func (u *PostUpsertBulk) ClearCategoryID() *PostUpsertBulk
ClearCategoryID clears the value of the "category_id" field.
func (*PostUpsertBulk) ClearDeletedAt ¶
func (u *PostUpsertBulk) ClearDeletedAt() *PostUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpsertBulk) ClearReplyToPostID ¶
func (u *PostUpsertBulk) ClearReplyToPostID() *PostUpsertBulk
ClearReplyToPostID clears the value of the "reply_to_post_id" field.
func (*PostUpsertBulk) ClearRootPostID ¶
func (u *PostUpsertBulk) ClearRootPostID() *PostUpsertBulk
ClearRootPostID clears the value of the "root_post_id" field.
func (*PostUpsertBulk) ClearSlug ¶
func (u *PostUpsertBulk) ClearSlug() *PostUpsertBulk
ClearSlug clears the value of the "slug" field.
func (*PostUpsertBulk) ClearTitle ¶
func (u *PostUpsertBulk) ClearTitle() *PostUpsertBulk
ClearTitle clears the value of the "title" field.
func (*PostUpsertBulk) DoNothing ¶
func (u *PostUpsertBulk) DoNothing() *PostUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PostUpsertBulk) Exec ¶
func (u *PostUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PostUpsertBulk) ExecX ¶
func (u *PostUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostUpsertBulk) Ignore ¶
func (u *PostUpsertBulk) Ignore() *PostUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Post.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*PostUpsertBulk) SetBody ¶
func (u *PostUpsertBulk) SetBody(v string) *PostUpsertBulk
SetBody sets the "body" field.
func (*PostUpsertBulk) SetCategoryID ¶
func (u *PostUpsertBulk) SetCategoryID(v xid.ID) *PostUpsertBulk
SetCategoryID sets the "category_id" field.
func (*PostUpsertBulk) SetCreatedAt ¶
func (u *PostUpsertBulk) SetCreatedAt(v time.Time) *PostUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*PostUpsertBulk) SetDeletedAt ¶
func (u *PostUpsertBulk) SetDeletedAt(v time.Time) *PostUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*PostUpsertBulk) SetFirst ¶
func (u *PostUpsertBulk) SetFirst(v bool) *PostUpsertBulk
SetFirst sets the "first" field.
func (*PostUpsertBulk) SetPinned ¶
func (u *PostUpsertBulk) SetPinned(v bool) *PostUpsertBulk
SetPinned sets the "pinned" field.
func (*PostUpsertBulk) SetReplyToPostID ¶
func (u *PostUpsertBulk) SetReplyToPostID(v xid.ID) *PostUpsertBulk
SetReplyToPostID sets the "reply_to_post_id" field.
func (*PostUpsertBulk) SetRootPostID ¶
func (u *PostUpsertBulk) SetRootPostID(v xid.ID) *PostUpsertBulk
SetRootPostID sets the "root_post_id" field.
func (*PostUpsertBulk) SetShort ¶
func (u *PostUpsertBulk) SetShort(v string) *PostUpsertBulk
SetShort sets the "short" field.
func (*PostUpsertBulk) SetSlug ¶
func (u *PostUpsertBulk) SetSlug(v string) *PostUpsertBulk
SetSlug sets the "slug" field.
func (*PostUpsertBulk) SetTitle ¶
func (u *PostUpsertBulk) SetTitle(v string) *PostUpsertBulk
SetTitle sets the "title" field.
func (*PostUpsertBulk) SetUpdatedAt ¶
func (u *PostUpsertBulk) SetUpdatedAt(v time.Time) *PostUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*PostUpsertBulk) Update ¶
func (u *PostUpsertBulk) Update(set func(*PostUpsert)) *PostUpsertBulk
Update allows overriding fields `UPDATE` values. See the PostCreateBulk.OnConflict documentation for more info.
func (*PostUpsertBulk) UpdateBody ¶
func (u *PostUpsertBulk) UpdateBody() *PostUpsertBulk
UpdateBody sets the "body" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateCategoryID ¶
func (u *PostUpsertBulk) UpdateCategoryID() *PostUpsertBulk
UpdateCategoryID sets the "category_id" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateCreatedAt ¶
func (u *PostUpsertBulk) UpdateCreatedAt() *PostUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateDeletedAt ¶
func (u *PostUpsertBulk) UpdateDeletedAt() *PostUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateFirst ¶
func (u *PostUpsertBulk) UpdateFirst() *PostUpsertBulk
UpdateFirst sets the "first" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateNewValues ¶
func (u *PostUpsertBulk) UpdateNewValues() *PostUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Post.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(post.FieldID) }), ). Exec(ctx)
func (*PostUpsertBulk) UpdatePinned ¶
func (u *PostUpsertBulk) UpdatePinned() *PostUpsertBulk
UpdatePinned sets the "pinned" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateReplyToPostID ¶
func (u *PostUpsertBulk) UpdateReplyToPostID() *PostUpsertBulk
UpdateReplyToPostID sets the "reply_to_post_id" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateRootPostID ¶
func (u *PostUpsertBulk) UpdateRootPostID() *PostUpsertBulk
UpdateRootPostID sets the "root_post_id" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateShort ¶
func (u *PostUpsertBulk) UpdateShort() *PostUpsertBulk
UpdateShort sets the "short" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateSlug ¶
func (u *PostUpsertBulk) UpdateSlug() *PostUpsertBulk
UpdateSlug sets the "slug" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateTitle ¶
func (u *PostUpsertBulk) UpdateTitle() *PostUpsertBulk
UpdateTitle sets the "title" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateUpdatedAt ¶
func (u *PostUpsertBulk) UpdateUpdatedAt() *PostUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type PostUpsertOne ¶
type PostUpsertOne struct {
// contains filtered or unexported fields
}
PostUpsertOne is the builder for "upsert"-ing
one Post node.
func (*PostUpsertOne) ClearCategoryID ¶
func (u *PostUpsertOne) ClearCategoryID() *PostUpsertOne
ClearCategoryID clears the value of the "category_id" field.
func (*PostUpsertOne) ClearDeletedAt ¶
func (u *PostUpsertOne) ClearDeletedAt() *PostUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpsertOne) ClearReplyToPostID ¶
func (u *PostUpsertOne) ClearReplyToPostID() *PostUpsertOne
ClearReplyToPostID clears the value of the "reply_to_post_id" field.
func (*PostUpsertOne) ClearRootPostID ¶
func (u *PostUpsertOne) ClearRootPostID() *PostUpsertOne
ClearRootPostID clears the value of the "root_post_id" field.
func (*PostUpsertOne) ClearSlug ¶
func (u *PostUpsertOne) ClearSlug() *PostUpsertOne
ClearSlug clears the value of the "slug" field.
func (*PostUpsertOne) ClearTitle ¶
func (u *PostUpsertOne) ClearTitle() *PostUpsertOne
ClearTitle clears the value of the "title" field.
func (*PostUpsertOne) DoNothing ¶
func (u *PostUpsertOne) DoNothing() *PostUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PostUpsertOne) Exec ¶
func (u *PostUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*PostUpsertOne) ExecX ¶
func (u *PostUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostUpsertOne) IDX ¶
func (u *PostUpsertOne) IDX(ctx context.Context) xid.ID
IDX is like ID, but panics if an error occurs.
func (*PostUpsertOne) Ignore ¶
func (u *PostUpsertOne) Ignore() *PostUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Post.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*PostUpsertOne) SetBody ¶
func (u *PostUpsertOne) SetBody(v string) *PostUpsertOne
SetBody sets the "body" field.
func (*PostUpsertOne) SetCategoryID ¶
func (u *PostUpsertOne) SetCategoryID(v xid.ID) *PostUpsertOne
SetCategoryID sets the "category_id" field.
func (*PostUpsertOne) SetCreatedAt ¶
func (u *PostUpsertOne) SetCreatedAt(v time.Time) *PostUpsertOne
SetCreatedAt sets the "created_at" field.
func (*PostUpsertOne) SetDeletedAt ¶
func (u *PostUpsertOne) SetDeletedAt(v time.Time) *PostUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*PostUpsertOne) SetFirst ¶
func (u *PostUpsertOne) SetFirst(v bool) *PostUpsertOne
SetFirst sets the "first" field.
func (*PostUpsertOne) SetPinned ¶
func (u *PostUpsertOne) SetPinned(v bool) *PostUpsertOne
SetPinned sets the "pinned" field.
func (*PostUpsertOne) SetReplyToPostID ¶
func (u *PostUpsertOne) SetReplyToPostID(v xid.ID) *PostUpsertOne
SetReplyToPostID sets the "reply_to_post_id" field.
func (*PostUpsertOne) SetRootPostID ¶
func (u *PostUpsertOne) SetRootPostID(v xid.ID) *PostUpsertOne
SetRootPostID sets the "root_post_id" field.
func (*PostUpsertOne) SetShort ¶
func (u *PostUpsertOne) SetShort(v string) *PostUpsertOne
SetShort sets the "short" field.
func (*PostUpsertOne) SetSlug ¶
func (u *PostUpsertOne) SetSlug(v string) *PostUpsertOne
SetSlug sets the "slug" field.
func (*PostUpsertOne) SetTitle ¶
func (u *PostUpsertOne) SetTitle(v string) *PostUpsertOne
SetTitle sets the "title" field.
func (*PostUpsertOne) SetUpdatedAt ¶
func (u *PostUpsertOne) SetUpdatedAt(v time.Time) *PostUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*PostUpsertOne) Update ¶
func (u *PostUpsertOne) Update(set func(*PostUpsert)) *PostUpsertOne
Update allows overriding fields `UPDATE` values. See the PostCreate.OnConflict documentation for more info.
func (*PostUpsertOne) UpdateBody ¶
func (u *PostUpsertOne) UpdateBody() *PostUpsertOne
UpdateBody sets the "body" field to the value that was provided on create.
func (*PostUpsertOne) UpdateCategoryID ¶
func (u *PostUpsertOne) UpdateCategoryID() *PostUpsertOne
UpdateCategoryID sets the "category_id" field to the value that was provided on create.
func (*PostUpsertOne) UpdateCreatedAt ¶
func (u *PostUpsertOne) UpdateCreatedAt() *PostUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*PostUpsertOne) UpdateDeletedAt ¶
func (u *PostUpsertOne) UpdateDeletedAt() *PostUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PostUpsertOne) UpdateFirst ¶
func (u *PostUpsertOne) UpdateFirst() *PostUpsertOne
UpdateFirst sets the "first" field to the value that was provided on create.
func (*PostUpsertOne) UpdateNewValues ¶
func (u *PostUpsertOne) UpdateNewValues() *PostUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Post.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(post.FieldID) }), ). Exec(ctx)
func (*PostUpsertOne) UpdatePinned ¶
func (u *PostUpsertOne) UpdatePinned() *PostUpsertOne
UpdatePinned sets the "pinned" field to the value that was provided on create.
func (*PostUpsertOne) UpdateReplyToPostID ¶
func (u *PostUpsertOne) UpdateReplyToPostID() *PostUpsertOne
UpdateReplyToPostID sets the "reply_to_post_id" field to the value that was provided on create.
func (*PostUpsertOne) UpdateRootPostID ¶
func (u *PostUpsertOne) UpdateRootPostID() *PostUpsertOne
UpdateRootPostID sets the "root_post_id" field to the value that was provided on create.
func (*PostUpsertOne) UpdateShort ¶
func (u *PostUpsertOne) UpdateShort() *PostUpsertOne
UpdateShort sets the "short" field to the value that was provided on create.
func (*PostUpsertOne) UpdateSlug ¶
func (u *PostUpsertOne) UpdateSlug() *PostUpsertOne
UpdateSlug sets the "slug" field to the value that was provided on create.
func (*PostUpsertOne) UpdateTitle ¶
func (u *PostUpsertOne) UpdateTitle() *PostUpsertOne
UpdateTitle sets the "title" field to the value that was provided on create.
func (*PostUpsertOne) UpdateUpdatedAt ¶
func (u *PostUpsertOne) UpdateUpdatedAt() *PostUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type React ¶
type React struct { // ID of the ent. ID xid.ID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Emoji holds the value of the "emoji" field. Emoji string `json:"emoji,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ReactQuery when eager-loading is set. Edges ReactEdges `json:"edges"` // contains filtered or unexported fields }
React is the model entity for the React schema.
func (*React) QueryAccount ¶
func (r *React) QueryAccount() *AccountQuery
QueryAccount queries the "account" edge of the React entity.
func (*React) Unwrap ¶
Unwrap unwraps the React 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 (*React) Update ¶
func (r *React) Update() *ReactUpdateOne
Update returns a builder for updating this React. Note that you need to call React.Unwrap() before calling this method if this React was returned from a transaction, and the transaction was committed or rolled back.
type ReactClient ¶
type ReactClient struct {
// contains filtered or unexported fields
}
ReactClient is a client for the React schema.
func NewReactClient ¶
func NewReactClient(c config) *ReactClient
NewReactClient returns a client for the React from the given config.
func (*ReactClient) Create ¶
func (c *ReactClient) Create() *ReactCreate
Create returns a builder for creating a React entity.
func (*ReactClient) CreateBulk ¶
func (c *ReactClient) CreateBulk(builders ...*ReactCreate) *ReactCreateBulk
CreateBulk returns a builder for creating a bulk of React entities.
func (*ReactClient) Delete ¶
func (c *ReactClient) Delete() *ReactDelete
Delete returns a delete builder for React.
func (*ReactClient) DeleteOne ¶
func (c *ReactClient) DeleteOne(r *React) *ReactDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ReactClient) DeleteOneID ¶
func (c *ReactClient) DeleteOneID(id xid.ID) *ReactDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*ReactClient) Query ¶
func (c *ReactClient) Query() *ReactQuery
Query returns a query builder for React.
func (*ReactClient) QueryAccount ¶
func (c *ReactClient) QueryAccount(r *React) *AccountQuery
QueryAccount queries the account edge of a React.
func (*ReactClient) QueryPost ¶
func (c *ReactClient) QueryPost(r *React) *PostQuery
QueryPost queries the Post edge of a React.
func (*ReactClient) Update ¶
func (c *ReactClient) Update() *ReactUpdate
Update returns an update builder for React.
func (*ReactClient) UpdateOne ¶
func (c *ReactClient) UpdateOne(r *React) *ReactUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ReactClient) UpdateOneID ¶
func (c *ReactClient) UpdateOneID(id xid.ID) *ReactUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ReactClient) Use ¶
func (c *ReactClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `react.Hooks(f(g(h())))`.
type ReactCreate ¶
type ReactCreate struct {
// contains filtered or unexported fields
}
ReactCreate is the builder for creating a React entity.
func (*ReactCreate) Exec ¶
func (rc *ReactCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactCreate) ExecX ¶
func (rc *ReactCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactCreate) Mutation ¶
func (rc *ReactCreate) Mutation() *ReactMutation
Mutation returns the ReactMutation object of the builder.
func (*ReactCreate) OnConflict ¶
func (rc *ReactCreate) OnConflict(opts ...sql.ConflictOption) *ReactUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.React.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ReactUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*ReactCreate) OnConflictColumns ¶
func (rc *ReactCreate) OnConflictColumns(columns ...string) *ReactUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.React.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ReactCreate) Save ¶
func (rc *ReactCreate) Save(ctx context.Context) (*React, error)
Save creates the React in the database.
func (*ReactCreate) SaveX ¶
func (rc *ReactCreate) SaveX(ctx context.Context) *React
SaveX calls Save and panics if Save returns an error.
func (*ReactCreate) SetAccount ¶
func (rc *ReactCreate) SetAccount(a *Account) *ReactCreate
SetAccount sets the "account" edge to the Account entity.
func (*ReactCreate) SetAccountID ¶
func (rc *ReactCreate) SetAccountID(id xid.ID) *ReactCreate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*ReactCreate) SetCreatedAt ¶
func (rc *ReactCreate) SetCreatedAt(t time.Time) *ReactCreate
SetCreatedAt sets the "created_at" field.
func (*ReactCreate) SetEmoji ¶
func (rc *ReactCreate) SetEmoji(s string) *ReactCreate
SetEmoji sets the "emoji" field.
func (*ReactCreate) SetID ¶
func (rc *ReactCreate) SetID(x xid.ID) *ReactCreate
SetID sets the "id" field.
func (*ReactCreate) SetNillableAccountID ¶
func (rc *ReactCreate) SetNillableAccountID(id *xid.ID) *ReactCreate
SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.
func (*ReactCreate) SetNillableCreatedAt ¶
func (rc *ReactCreate) SetNillableCreatedAt(t *time.Time) *ReactCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReactCreate) SetNillableID ¶
func (rc *ReactCreate) SetNillableID(x *xid.ID) *ReactCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ReactCreate) SetNillablePostID ¶
func (rc *ReactCreate) SetNillablePostID(id *xid.ID) *ReactCreate
SetNillablePostID sets the "Post" edge to the Post entity by ID if the given value is not nil.
func (*ReactCreate) SetPost ¶
func (rc *ReactCreate) SetPost(p *Post) *ReactCreate
SetPost sets the "Post" edge to the Post entity.
func (*ReactCreate) SetPostID ¶
func (rc *ReactCreate) SetPostID(id xid.ID) *ReactCreate
SetPostID sets the "Post" edge to the Post entity by ID.
type ReactCreateBulk ¶
type ReactCreateBulk struct {
// contains filtered or unexported fields
}
ReactCreateBulk is the builder for creating many React entities in bulk.
func (*ReactCreateBulk) Exec ¶
func (rcb *ReactCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactCreateBulk) ExecX ¶
func (rcb *ReactCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactCreateBulk) OnConflict ¶
func (rcb *ReactCreateBulk) OnConflict(opts ...sql.ConflictOption) *ReactUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.React.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ReactUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*ReactCreateBulk) OnConflictColumns ¶
func (rcb *ReactCreateBulk) OnConflictColumns(columns ...string) *ReactUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.React.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ReactDelete ¶
type ReactDelete struct {
// contains filtered or unexported fields
}
ReactDelete is the builder for deleting a React entity.
func (*ReactDelete) Exec ¶
func (rd *ReactDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ReactDelete) ExecX ¶
func (rd *ReactDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ReactDelete) Where ¶
func (rd *ReactDelete) Where(ps ...predicate.React) *ReactDelete
Where appends a list predicates to the ReactDelete builder.
type ReactDeleteOne ¶
type ReactDeleteOne struct {
// contains filtered or unexported fields
}
ReactDeleteOne is the builder for deleting a single React entity.
func (*ReactDeleteOne) Exec ¶
func (rdo *ReactDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ReactDeleteOne) ExecX ¶
func (rdo *ReactDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ReactEdges ¶
type ReactEdges struct { // Account holds the value of the account edge. Account *Account `json:"account,omitempty"` // Post holds the value of the Post edge. Post *Post `json:"Post,omitempty"` // contains filtered or unexported fields }
ReactEdges holds the relations/edges for other nodes in the graph.
func (ReactEdges) AccountOrErr ¶
func (e ReactEdges) AccountOrErr() (*Account, error)
AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ReactEdges) PostOrErr ¶
func (e ReactEdges) 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 ReactGroupBy ¶
type ReactGroupBy struct {
// contains filtered or unexported fields
}
ReactGroupBy is the group-by builder for React entities.
func (*ReactGroupBy) Aggregate ¶
func (rgb *ReactGroupBy) Aggregate(fns ...AggregateFunc) *ReactGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ReactGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReactGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReactGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReactGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReactGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReactGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReactGroupBy) Scan ¶
func (rgb *ReactGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ReactGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReactMutation ¶
type ReactMutation struct {
// contains filtered or unexported fields
}
ReactMutation represents an operation that mutates the React nodes in the graph.
func (*ReactMutation) AccountCleared ¶
func (m *ReactMutation) AccountCleared() bool
AccountCleared reports if the "account" edge to the Account entity was cleared.
func (*ReactMutation) AccountID ¶
func (m *ReactMutation) AccountID() (id xid.ID, exists bool)
AccountID returns the "account" edge ID in the mutation.
func (*ReactMutation) AccountIDs ¶
func (m *ReactMutation) AccountIDs() (ids []xid.ID)
AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.
func (*ReactMutation) AddField ¶
func (m *ReactMutation) 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 (*ReactMutation) AddedEdges ¶
func (m *ReactMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ReactMutation) AddedField ¶
func (m *ReactMutation) 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 (*ReactMutation) AddedFields ¶
func (m *ReactMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ReactMutation) AddedIDs ¶
func (m *ReactMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ReactMutation) ClearAccount ¶
func (m *ReactMutation) ClearAccount()
ClearAccount clears the "account" edge to the Account entity.
func (*ReactMutation) ClearEdge ¶
func (m *ReactMutation) 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 (*ReactMutation) ClearField ¶
func (m *ReactMutation) 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 (*ReactMutation) ClearPost ¶
func (m *ReactMutation) ClearPost()
ClearPost clears the "Post" edge to the Post entity.
func (*ReactMutation) ClearedEdges ¶
func (m *ReactMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ReactMutation) ClearedFields ¶
func (m *ReactMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ReactMutation) Client ¶
func (m ReactMutation) 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 (*ReactMutation) CreatedAt ¶
func (m *ReactMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ReactMutation) EdgeCleared ¶
func (m *ReactMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ReactMutation) Emoji ¶
func (m *ReactMutation) Emoji() (r string, exists bool)
Emoji returns the value of the "emoji" field in the mutation.
func (*ReactMutation) Field ¶
func (m *ReactMutation) 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 (*ReactMutation) FieldCleared ¶
func (m *ReactMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ReactMutation) Fields ¶
func (m *ReactMutation) 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 (*ReactMutation) ID ¶
func (m *ReactMutation) ID() (id xid.ID, 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 (*ReactMutation) 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 (*ReactMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the React entity. If the React 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 (*ReactMutation) OldEmoji ¶
func (m *ReactMutation) OldEmoji(ctx context.Context) (v string, err error)
OldEmoji returns the old "emoji" field's value of the React entity. If the React 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 (*ReactMutation) 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 (*ReactMutation) PostCleared ¶
func (m *ReactMutation) PostCleared() bool
PostCleared reports if the "Post" edge to the Post entity was cleared.
func (*ReactMutation) PostID ¶
func (m *ReactMutation) PostID() (id xid.ID, exists bool)
PostID returns the "Post" edge ID in the mutation.
func (*ReactMutation) PostIDs ¶
func (m *ReactMutation) PostIDs() (ids []xid.ID)
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 (*ReactMutation) RemovedEdges ¶
func (m *ReactMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ReactMutation) RemovedIDs ¶
func (m *ReactMutation) 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 (*ReactMutation) ResetAccount ¶
func (m *ReactMutation) ResetAccount()
ResetAccount resets all changes to the "account" edge.
func (*ReactMutation) ResetCreatedAt ¶
func (m *ReactMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ReactMutation) ResetEdge ¶
func (m *ReactMutation) 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 (*ReactMutation) ResetEmoji ¶
func (m *ReactMutation) ResetEmoji()
ResetEmoji resets all changes to the "emoji" field.
func (*ReactMutation) ResetField ¶
func (m *ReactMutation) 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 (*ReactMutation) ResetPost ¶
func (m *ReactMutation) ResetPost()
ResetPost resets all changes to the "Post" edge.
func (*ReactMutation) SetAccountID ¶
func (m *ReactMutation) SetAccountID(id xid.ID)
SetAccountID sets the "account" edge to the Account entity by id.
func (*ReactMutation) SetCreatedAt ¶
func (m *ReactMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ReactMutation) SetEmoji ¶
func (m *ReactMutation) SetEmoji(s string)
SetEmoji sets the "emoji" field.
func (*ReactMutation) SetField ¶
func (m *ReactMutation) 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 (*ReactMutation) SetID ¶
func (m *ReactMutation) SetID(id xid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of React entities.
func (*ReactMutation) SetPostID ¶
func (m *ReactMutation) SetPostID(id xid.ID)
SetPostID sets the "Post" edge to the Post entity by id.
func (ReactMutation) Tx ¶
func (m ReactMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ReactMutation) Type ¶
func (m *ReactMutation) Type() string
Type returns the node type of this mutation (React).
func (*ReactMutation) Where ¶
func (m *ReactMutation) Where(ps ...predicate.React)
Where appends a list predicates to the ReactMutation builder.
type ReactQuery ¶
type ReactQuery struct {
// contains filtered or unexported fields
}
ReactQuery is the builder for querying React entities.
func (*ReactQuery) All ¶
func (rq *ReactQuery) All(ctx context.Context) ([]*React, error)
All executes the query and returns a list of Reacts.
func (*ReactQuery) AllX ¶
func (rq *ReactQuery) AllX(ctx context.Context) []*React
AllX is like All, but panics if an error occurs.
func (*ReactQuery) Clone ¶
func (rq *ReactQuery) Clone() *ReactQuery
Clone returns a duplicate of the ReactQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ReactQuery) Count ¶
func (rq *ReactQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ReactQuery) CountX ¶
func (rq *ReactQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ReactQuery) Exist ¶
func (rq *ReactQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ReactQuery) ExistX ¶
func (rq *ReactQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ReactQuery) First ¶
func (rq *ReactQuery) First(ctx context.Context) (*React, error)
First returns the first React entity from the query. Returns a *NotFoundError when no React was found.
func (*ReactQuery) FirstID ¶
FirstID returns the first React ID from the query. Returns a *NotFoundError when no React ID was found.
func (*ReactQuery) FirstIDX ¶
func (rq *ReactQuery) FirstIDX(ctx context.Context) xid.ID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ReactQuery) FirstX ¶
func (rq *ReactQuery) FirstX(ctx context.Context) *React
FirstX is like First, but panics if an error occurs.
func (*ReactQuery) GroupBy ¶
func (rq *ReactQuery) GroupBy(field string, fields ...string) *ReactGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.React.Query(). GroupBy(react.FieldCreatedAt). Aggregate(model.Count()). Scan(ctx, &v)
func (*ReactQuery) IDsX ¶
func (rq *ReactQuery) IDsX(ctx context.Context) []xid.ID
IDsX is like IDs, but panics if an error occurs.
func (*ReactQuery) Limit ¶
func (rq *ReactQuery) Limit(limit int) *ReactQuery
Limit adds a limit step to the query.
func (*ReactQuery) Modify ¶
func (rq *ReactQuery) Modify(modifiers ...func(s *sql.Selector)) *ReactSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ReactQuery) Offset ¶
func (rq *ReactQuery) Offset(offset int) *ReactQuery
Offset adds an offset step to the query.
func (*ReactQuery) Only ¶
func (rq *ReactQuery) Only(ctx context.Context) (*React, error)
Only returns a single React entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one React entity is found. Returns a *NotFoundError when no React entities are found.
func (*ReactQuery) OnlyID ¶
OnlyID is like Only, but returns the only React ID in the query. Returns a *NotSingularError when more than one React ID is found. Returns a *NotFoundError when no entities are found.
func (*ReactQuery) OnlyIDX ¶
func (rq *ReactQuery) OnlyIDX(ctx context.Context) xid.ID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ReactQuery) OnlyX ¶
func (rq *ReactQuery) OnlyX(ctx context.Context) *React
OnlyX is like Only, but panics if an error occurs.
func (*ReactQuery) Order ¶
func (rq *ReactQuery) Order(o ...OrderFunc) *ReactQuery
Order adds an order step to the query.
func (*ReactQuery) QueryAccount ¶
func (rq *ReactQuery) QueryAccount() *AccountQuery
QueryAccount chains the current query on the "account" edge.
func (*ReactQuery) QueryPost ¶
func (rq *ReactQuery) QueryPost() *PostQuery
QueryPost chains the current query on the "Post" edge.
func (*ReactQuery) Select ¶
func (rq *ReactQuery) Select(fields ...string) *ReactSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.React.Query(). Select(react.FieldCreatedAt). Scan(ctx, &v)
func (*ReactQuery) Unique ¶
func (rq *ReactQuery) Unique(unique bool) *ReactQuery
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 (*ReactQuery) Where ¶
func (rq *ReactQuery) Where(ps ...predicate.React) *ReactQuery
Where adds a new predicate for the ReactQuery builder.
func (*ReactQuery) WithAccount ¶
func (rq *ReactQuery) WithAccount(opts ...func(*AccountQuery)) *ReactQuery
WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.
func (*ReactQuery) WithPost ¶
func (rq *ReactQuery) WithPost(opts ...func(*PostQuery)) *ReactQuery
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 ReactSelect ¶
type ReactSelect struct { *ReactQuery // contains filtered or unexported fields }
ReactSelect is the builder for selecting fields of React entities.
func (*ReactSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReactSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReactSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReactSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReactSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReactSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReactSelect) Modify ¶
func (rs *ReactSelect) Modify(modifiers ...func(s *sql.Selector)) *ReactSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ReactSelect) Scan ¶
func (rs *ReactSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ReactSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReactUpdate ¶
type ReactUpdate struct {
// contains filtered or unexported fields
}
ReactUpdate is the builder for updating React entities.
func (*ReactUpdate) ClearAccount ¶
func (ru *ReactUpdate) ClearAccount() *ReactUpdate
ClearAccount clears the "account" edge to the Account entity.
func (*ReactUpdate) ClearPost ¶
func (ru *ReactUpdate) ClearPost() *ReactUpdate
ClearPost clears the "Post" edge to the Post entity.
func (*ReactUpdate) Exec ¶
func (ru *ReactUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactUpdate) ExecX ¶
func (ru *ReactUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactUpdate) Modify ¶
func (ru *ReactUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ReactUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ReactUpdate) Mutation ¶
func (ru *ReactUpdate) Mutation() *ReactMutation
Mutation returns the ReactMutation object of the builder.
func (*ReactUpdate) Save ¶
func (ru *ReactUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ReactUpdate) SaveX ¶
func (ru *ReactUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ReactUpdate) SetAccount ¶
func (ru *ReactUpdate) SetAccount(a *Account) *ReactUpdate
SetAccount sets the "account" edge to the Account entity.
func (*ReactUpdate) SetAccountID ¶
func (ru *ReactUpdate) SetAccountID(id xid.ID) *ReactUpdate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*ReactUpdate) SetEmoji ¶
func (ru *ReactUpdate) SetEmoji(s string) *ReactUpdate
SetEmoji sets the "emoji" field.
func (*ReactUpdate) SetNillableAccountID ¶
func (ru *ReactUpdate) SetNillableAccountID(id *xid.ID) *ReactUpdate
SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.
func (*ReactUpdate) SetNillablePostID ¶
func (ru *ReactUpdate) SetNillablePostID(id *xid.ID) *ReactUpdate
SetNillablePostID sets the "Post" edge to the Post entity by ID if the given value is not nil.
func (*ReactUpdate) SetPost ¶
func (ru *ReactUpdate) SetPost(p *Post) *ReactUpdate
SetPost sets the "Post" edge to the Post entity.
func (*ReactUpdate) SetPostID ¶
func (ru *ReactUpdate) SetPostID(id xid.ID) *ReactUpdate
SetPostID sets the "Post" edge to the Post entity by ID.
func (*ReactUpdate) Where ¶
func (ru *ReactUpdate) Where(ps ...predicate.React) *ReactUpdate
Where appends a list predicates to the ReactUpdate builder.
type ReactUpdateOne ¶
type ReactUpdateOne struct {
// contains filtered or unexported fields
}
ReactUpdateOne is the builder for updating a single React entity.
func (*ReactUpdateOne) ClearAccount ¶
func (ruo *ReactUpdateOne) ClearAccount() *ReactUpdateOne
ClearAccount clears the "account" edge to the Account entity.
func (*ReactUpdateOne) ClearPost ¶
func (ruo *ReactUpdateOne) ClearPost() *ReactUpdateOne
ClearPost clears the "Post" edge to the Post entity.
func (*ReactUpdateOne) Exec ¶
func (ruo *ReactUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ReactUpdateOne) ExecX ¶
func (ruo *ReactUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactUpdateOne) Modify ¶
func (ruo *ReactUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ReactUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ReactUpdateOne) Mutation ¶
func (ruo *ReactUpdateOne) Mutation() *ReactMutation
Mutation returns the ReactMutation object of the builder.
func (*ReactUpdateOne) Save ¶
func (ruo *ReactUpdateOne) Save(ctx context.Context) (*React, error)
Save executes the query and returns the updated React entity.
func (*ReactUpdateOne) SaveX ¶
func (ruo *ReactUpdateOne) SaveX(ctx context.Context) *React
SaveX is like Save, but panics if an error occurs.
func (*ReactUpdateOne) Select ¶
func (ruo *ReactUpdateOne) Select(field string, fields ...string) *ReactUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ReactUpdateOne) SetAccount ¶
func (ruo *ReactUpdateOne) SetAccount(a *Account) *ReactUpdateOne
SetAccount sets the "account" edge to the Account entity.
func (*ReactUpdateOne) SetAccountID ¶
func (ruo *ReactUpdateOne) SetAccountID(id xid.ID) *ReactUpdateOne
SetAccountID sets the "account" edge to the Account entity by ID.
func (*ReactUpdateOne) SetEmoji ¶
func (ruo *ReactUpdateOne) SetEmoji(s string) *ReactUpdateOne
SetEmoji sets the "emoji" field.
func (*ReactUpdateOne) SetNillableAccountID ¶
func (ruo *ReactUpdateOne) SetNillableAccountID(id *xid.ID) *ReactUpdateOne
SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.
func (*ReactUpdateOne) SetNillablePostID ¶
func (ruo *ReactUpdateOne) SetNillablePostID(id *xid.ID) *ReactUpdateOne
SetNillablePostID sets the "Post" edge to the Post entity by ID if the given value is not nil.
func (*ReactUpdateOne) SetPost ¶
func (ruo *ReactUpdateOne) SetPost(p *Post) *ReactUpdateOne
SetPost sets the "Post" edge to the Post entity.
func (*ReactUpdateOne) SetPostID ¶
func (ruo *ReactUpdateOne) SetPostID(id xid.ID) *ReactUpdateOne
SetPostID sets the "Post" edge to the Post entity by ID.
type ReactUpsert ¶
ReactUpsert is the "OnConflict" setter.
func (*ReactUpsert) SetCreatedAt ¶
func (u *ReactUpsert) SetCreatedAt(v time.Time) *ReactUpsert
SetCreatedAt sets the "created_at" field.
func (*ReactUpsert) SetEmoji ¶
func (u *ReactUpsert) SetEmoji(v string) *ReactUpsert
SetEmoji sets the "emoji" field.
func (*ReactUpsert) UpdateCreatedAt ¶
func (u *ReactUpsert) UpdateCreatedAt() *ReactUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*ReactUpsert) UpdateEmoji ¶
func (u *ReactUpsert) UpdateEmoji() *ReactUpsert
UpdateEmoji sets the "emoji" field to the value that was provided on create.
type ReactUpsertBulk ¶
type ReactUpsertBulk struct {
// contains filtered or unexported fields
}
ReactUpsertBulk is the builder for "upsert"-ing a bulk of React nodes.
func (*ReactUpsertBulk) DoNothing ¶
func (u *ReactUpsertBulk) DoNothing() *ReactUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ReactUpsertBulk) Exec ¶
func (u *ReactUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactUpsertBulk) ExecX ¶
func (u *ReactUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactUpsertBulk) Ignore ¶
func (u *ReactUpsertBulk) Ignore() *ReactUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.React.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ReactUpsertBulk) SetCreatedAt ¶
func (u *ReactUpsertBulk) SetCreatedAt(v time.Time) *ReactUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*ReactUpsertBulk) SetEmoji ¶
func (u *ReactUpsertBulk) SetEmoji(v string) *ReactUpsertBulk
SetEmoji sets the "emoji" field.
func (*ReactUpsertBulk) Update ¶
func (u *ReactUpsertBulk) Update(set func(*ReactUpsert)) *ReactUpsertBulk
Update allows overriding fields `UPDATE` values. See the ReactCreateBulk.OnConflict documentation for more info.
func (*ReactUpsertBulk) UpdateCreatedAt ¶
func (u *ReactUpsertBulk) UpdateCreatedAt() *ReactUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*ReactUpsertBulk) UpdateEmoji ¶
func (u *ReactUpsertBulk) UpdateEmoji() *ReactUpsertBulk
UpdateEmoji sets the "emoji" field to the value that was provided on create.
func (*ReactUpsertBulk) UpdateNewValues ¶
func (u *ReactUpsertBulk) UpdateNewValues() *ReactUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.React.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(react.FieldID) }), ). Exec(ctx)
type ReactUpsertOne ¶
type ReactUpsertOne struct {
// contains filtered or unexported fields
}
ReactUpsertOne is the builder for "upsert"-ing
one React node.
func (*ReactUpsertOne) DoNothing ¶
func (u *ReactUpsertOne) DoNothing() *ReactUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ReactUpsertOne) Exec ¶
func (u *ReactUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactUpsertOne) ExecX ¶
func (u *ReactUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactUpsertOne) IDX ¶
func (u *ReactUpsertOne) IDX(ctx context.Context) xid.ID
IDX is like ID, but panics if an error occurs.
func (*ReactUpsertOne) Ignore ¶
func (u *ReactUpsertOne) Ignore() *ReactUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.React.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ReactUpsertOne) SetCreatedAt ¶
func (u *ReactUpsertOne) SetCreatedAt(v time.Time) *ReactUpsertOne
SetCreatedAt sets the "created_at" field.
func (*ReactUpsertOne) SetEmoji ¶
func (u *ReactUpsertOne) SetEmoji(v string) *ReactUpsertOne
SetEmoji sets the "emoji" field.
func (*ReactUpsertOne) Update ¶
func (u *ReactUpsertOne) Update(set func(*ReactUpsert)) *ReactUpsertOne
Update allows overriding fields `UPDATE` values. See the ReactCreate.OnConflict documentation for more info.
func (*ReactUpsertOne) UpdateCreatedAt ¶
func (u *ReactUpsertOne) UpdateCreatedAt() *ReactUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*ReactUpsertOne) UpdateEmoji ¶
func (u *ReactUpsertOne) UpdateEmoji() *ReactUpsertOne
UpdateEmoji sets the "emoji" field to the value that was provided on create.
func (*ReactUpsertOne) UpdateNewValues ¶
func (u *ReactUpsertOne) UpdateNewValues() *ReactUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.React.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(react.FieldID) }), ). Exec(ctx)
type Role ¶
type Role struct { // ID of the ent. ID xid.ID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RoleQuery when eager-loading is set. Edges RoleEdges `json:"edges"` // contains filtered or unexported fields }
Role is the model entity for the Role schema.
func (*Role) QueryAccounts ¶
func (r *Role) QueryAccounts() *AccountQuery
QueryAccounts queries the "accounts" edge of the Role entity.
func (*Role) Unwrap ¶
Unwrap unwraps the Role 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 (*Role) Update ¶
func (r *Role) Update() *RoleUpdateOne
Update returns a builder for updating this Role. Note that you need to call Role.Unwrap() before calling this method if this Role was returned from a transaction, and the transaction was committed or rolled back.
type RoleClient ¶
type RoleClient struct {
// contains filtered or unexported fields
}
RoleClient is a client for the Role schema.
func NewRoleClient ¶
func NewRoleClient(c config) *RoleClient
NewRoleClient returns a client for the Role from the given config.
func (*RoleClient) Create ¶
func (c *RoleClient) Create() *RoleCreate
Create returns a builder for creating a Role entity.
func (*RoleClient) CreateBulk ¶
func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk
CreateBulk returns a builder for creating a bulk of Role entities.
func (*RoleClient) Delete ¶
func (c *RoleClient) Delete() *RoleDelete
Delete returns a delete builder for Role.
func (*RoleClient) DeleteOne ¶
func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RoleClient) DeleteOneID ¶
func (c *RoleClient) DeleteOneID(id xid.ID) *RoleDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*RoleClient) Query ¶
func (c *RoleClient) Query() *RoleQuery
Query returns a query builder for Role.
func (*RoleClient) QueryAccounts ¶
func (c *RoleClient) QueryAccounts(r *Role) *AccountQuery
QueryAccounts queries the accounts edge of a Role.
func (*RoleClient) Update ¶
func (c *RoleClient) Update() *RoleUpdate
Update returns an update builder for Role.
func (*RoleClient) UpdateOne ¶
func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RoleClient) UpdateOneID ¶
func (c *RoleClient) UpdateOneID(id xid.ID) *RoleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RoleClient) Use ¶
func (c *RoleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `role.Hooks(f(g(h())))`.
type RoleCreate ¶
type RoleCreate struct {
// contains filtered or unexported fields
}
RoleCreate is the builder for creating a Role entity.
func (*RoleCreate) AddAccountIDs ¶
func (rc *RoleCreate) AddAccountIDs(ids ...xid.ID) *RoleCreate
AddAccountIDs adds the "accounts" edge to the Account entity by IDs.
func (*RoleCreate) AddAccounts ¶
func (rc *RoleCreate) AddAccounts(a ...*Account) *RoleCreate
AddAccounts adds the "accounts" edges to the Account entity.
func (*RoleCreate) Exec ¶
func (rc *RoleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleCreate) ExecX ¶
func (rc *RoleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleCreate) Mutation ¶
func (rc *RoleCreate) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleCreate) OnConflict ¶
func (rc *RoleCreate) OnConflict(opts ...sql.ConflictOption) *RoleUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Role.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RoleUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*RoleCreate) OnConflictColumns ¶
func (rc *RoleCreate) OnConflictColumns(columns ...string) *RoleUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RoleCreate) Save ¶
func (rc *RoleCreate) Save(ctx context.Context) (*Role, error)
Save creates the Role in the database.
func (*RoleCreate) SaveX ¶
func (rc *RoleCreate) SaveX(ctx context.Context) *Role
SaveX calls Save and panics if Save returns an error.
func (*RoleCreate) SetCreatedAt ¶
func (rc *RoleCreate) SetCreatedAt(t time.Time) *RoleCreate
SetCreatedAt sets the "created_at" field.
func (*RoleCreate) SetID ¶
func (rc *RoleCreate) SetID(x xid.ID) *RoleCreate
SetID sets the "id" field.
func (*RoleCreate) SetName ¶
func (rc *RoleCreate) SetName(s string) *RoleCreate
SetName sets the "name" field.
func (*RoleCreate) SetNillableCreatedAt ¶
func (rc *RoleCreate) SetNillableCreatedAt(t *time.Time) *RoleCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RoleCreate) SetNillableID ¶
func (rc *RoleCreate) SetNillableID(x *xid.ID) *RoleCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*RoleCreate) SetNillableUpdatedAt ¶
func (rc *RoleCreate) SetNillableUpdatedAt(t *time.Time) *RoleCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*RoleCreate) SetUpdatedAt ¶
func (rc *RoleCreate) SetUpdatedAt(t time.Time) *RoleCreate
SetUpdatedAt sets the "updated_at" field.
type RoleCreateBulk ¶
type RoleCreateBulk struct {
// contains filtered or unexported fields
}
RoleCreateBulk is the builder for creating many Role entities in bulk.
func (*RoleCreateBulk) Exec ¶
func (rcb *RoleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleCreateBulk) ExecX ¶
func (rcb *RoleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleCreateBulk) OnConflict ¶
func (rcb *RoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *RoleUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Role.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RoleUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*RoleCreateBulk) OnConflictColumns ¶
func (rcb *RoleCreateBulk) OnConflictColumns(columns ...string) *RoleUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type RoleDelete ¶
type RoleDelete struct {
// contains filtered or unexported fields
}
RoleDelete is the builder for deleting a Role entity.
func (*RoleDelete) Exec ¶
func (rd *RoleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RoleDelete) ExecX ¶
func (rd *RoleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RoleDelete) Where ¶
func (rd *RoleDelete) Where(ps ...predicate.Role) *RoleDelete
Where appends a list predicates to the RoleDelete builder.
type RoleDeleteOne ¶
type RoleDeleteOne struct {
// contains filtered or unexported fields
}
RoleDeleteOne is the builder for deleting a single Role entity.
func (*RoleDeleteOne) Exec ¶
func (rdo *RoleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RoleDeleteOne) ExecX ¶
func (rdo *RoleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RoleEdges ¶
type RoleEdges struct { // Accounts holds the value of the accounts edge. Accounts []*Account `json:"accounts,omitempty"` // contains filtered or unexported fields }
RoleEdges holds the relations/edges for other nodes in the graph.
func (RoleEdges) AccountsOrErr ¶
AccountsOrErr returns the Accounts value or an error if the edge was not loaded in eager-loading.
type RoleGroupBy ¶
type RoleGroupBy struct {
// contains filtered or unexported fields
}
RoleGroupBy is the group-by builder for Role entities.
func (*RoleGroupBy) Aggregate ¶
func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RoleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Scan ¶
func (rgb *RoleGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*RoleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoleMutation ¶
type RoleMutation struct {
// contains filtered or unexported fields
}
RoleMutation represents an operation that mutates the Role nodes in the graph.
func (*RoleMutation) AccountsCleared ¶
func (m *RoleMutation) AccountsCleared() bool
AccountsCleared reports if the "accounts" edge to the Account entity was cleared.
func (*RoleMutation) AccountsIDs ¶
func (m *RoleMutation) AccountsIDs() (ids []xid.ID)
AccountsIDs returns the "accounts" edge IDs in the mutation.
func (*RoleMutation) AddAccountIDs ¶
func (m *RoleMutation) AddAccountIDs(ids ...xid.ID)
AddAccountIDs adds the "accounts" edge to the Account entity by ids.
func (*RoleMutation) AddField ¶
func (m *RoleMutation) 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 (*RoleMutation) AddedEdges ¶
func (m *RoleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RoleMutation) AddedField ¶
func (m *RoleMutation) 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 (*RoleMutation) AddedFields ¶
func (m *RoleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RoleMutation) AddedIDs ¶
func (m *RoleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RoleMutation) ClearAccounts ¶
func (m *RoleMutation) ClearAccounts()
ClearAccounts clears the "accounts" edge to the Account entity.
func (*RoleMutation) ClearEdge ¶
func (m *RoleMutation) 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 (*RoleMutation) ClearField ¶
func (m *RoleMutation) 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 (*RoleMutation) ClearedEdges ¶
func (m *RoleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RoleMutation) ClearedFields ¶
func (m *RoleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RoleMutation) Client ¶
func (m RoleMutation) 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 (*RoleMutation) CreatedAt ¶
func (m *RoleMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RoleMutation) EdgeCleared ¶
func (m *RoleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RoleMutation) Field ¶
func (m *RoleMutation) 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 (*RoleMutation) FieldCleared ¶
func (m *RoleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RoleMutation) Fields ¶
func (m *RoleMutation) 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 (*RoleMutation) ID ¶
func (m *RoleMutation) ID() (id xid.ID, 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 (*RoleMutation) 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 (*RoleMutation) Name ¶
func (m *RoleMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*RoleMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Role entity. If the Role 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 (*RoleMutation) 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 (*RoleMutation) OldName ¶
func (m *RoleMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Role entity. If the Role 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 (*RoleMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Role entity. If the Role 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 (*RoleMutation) RemoveAccountIDs ¶
func (m *RoleMutation) RemoveAccountIDs(ids ...xid.ID)
RemoveAccountIDs removes the "accounts" edge to the Account entity by IDs.
func (*RoleMutation) RemovedAccountsIDs ¶
func (m *RoleMutation) RemovedAccountsIDs() (ids []xid.ID)
RemovedAccounts returns the removed IDs of the "accounts" edge to the Account entity.
func (*RoleMutation) RemovedEdges ¶
func (m *RoleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RoleMutation) RemovedIDs ¶
func (m *RoleMutation) 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 (*RoleMutation) ResetAccounts ¶
func (m *RoleMutation) ResetAccounts()
ResetAccounts resets all changes to the "accounts" edge.
func (*RoleMutation) ResetCreatedAt ¶
func (m *RoleMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RoleMutation) ResetEdge ¶
func (m *RoleMutation) 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 (*RoleMutation) ResetField ¶
func (m *RoleMutation) 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 (*RoleMutation) ResetName ¶
func (m *RoleMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*RoleMutation) ResetUpdatedAt ¶
func (m *RoleMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*RoleMutation) SetCreatedAt ¶
func (m *RoleMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RoleMutation) SetField ¶
func (m *RoleMutation) 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 (*RoleMutation) SetID ¶
func (m *RoleMutation) SetID(id xid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Role entities.
func (*RoleMutation) SetName ¶
func (m *RoleMutation) SetName(s string)
SetName sets the "name" field.
func (*RoleMutation) SetUpdatedAt ¶
func (m *RoleMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (RoleMutation) Tx ¶
func (m RoleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RoleMutation) Type ¶
func (m *RoleMutation) Type() string
Type returns the node type of this mutation (Role).
func (*RoleMutation) UpdatedAt ¶
func (m *RoleMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*RoleMutation) Where ¶
func (m *RoleMutation) Where(ps ...predicate.Role)
Where appends a list predicates to the RoleMutation builder.
type RoleQuery ¶
type RoleQuery struct {
// contains filtered or unexported fields
}
RoleQuery is the builder for querying Role entities.
func (*RoleQuery) Clone ¶
Clone returns a duplicate of the RoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RoleQuery) First ¶
First returns the first Role entity from the query. Returns a *NotFoundError when no Role was found.
func (*RoleQuery) FirstID ¶
FirstID returns the first Role ID from the query. Returns a *NotFoundError when no Role ID was found.
func (*RoleQuery) GroupBy ¶
func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Role.Query(). GroupBy(role.FieldCreatedAt). Aggregate(model.Count()). Scan(ctx, &v)
func (*RoleQuery) Modify ¶
func (rq *RoleQuery) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*RoleQuery) Only ¶
Only returns a single Role entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Role entity is found. Returns a *NotFoundError when no Role entities are found.
func (*RoleQuery) OnlyID ¶
OnlyID is like Only, but returns the only Role ID in the query. Returns a *NotSingularError when more than one Role ID is found. Returns a *NotFoundError when no entities are found.
func (*RoleQuery) QueryAccounts ¶
func (rq *RoleQuery) QueryAccounts() *AccountQuery
QueryAccounts chains the current query on the "accounts" edge.
func (*RoleQuery) Select ¶
func (rq *RoleQuery) Select(fields ...string) *RoleSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Role.Query(). Select(role.FieldCreatedAt). Scan(ctx, &v)
func (*RoleQuery) 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 (*RoleQuery) WithAccounts ¶
func (rq *RoleQuery) WithAccounts(opts ...func(*AccountQuery)) *RoleQuery
WithAccounts tells the query-builder to eager-load the nodes that are connected to the "accounts" edge. The optional arguments are used to configure the query builder of the edge.
type RoleSelect ¶
type RoleSelect struct { *RoleQuery // contains filtered or unexported fields }
RoleSelect is the builder for selecting fields of Role entities.
func (*RoleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Modify ¶
func (rs *RoleSelect) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*RoleSelect) Scan ¶
func (rs *RoleSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*RoleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoleUpdate ¶
type RoleUpdate struct {
// contains filtered or unexported fields
}
RoleUpdate is the builder for updating Role entities.
func (*RoleUpdate) AddAccountIDs ¶
func (ru *RoleUpdate) AddAccountIDs(ids ...xid.ID) *RoleUpdate
AddAccountIDs adds the "accounts" edge to the Account entity by IDs.
func (*RoleUpdate) AddAccounts ¶
func (ru *RoleUpdate) AddAccounts(a ...*Account) *RoleUpdate
AddAccounts adds the "accounts" edges to the Account entity.
func (*RoleUpdate) ClearAccounts ¶
func (ru *RoleUpdate) ClearAccounts() *RoleUpdate
ClearAccounts clears all "accounts" edges to the Account entity.
func (*RoleUpdate) Exec ¶
func (ru *RoleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUpdate) ExecX ¶
func (ru *RoleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdate) Modify ¶
func (ru *RoleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*RoleUpdate) Mutation ¶
func (ru *RoleUpdate) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdate) RemoveAccountIDs ¶
func (ru *RoleUpdate) RemoveAccountIDs(ids ...xid.ID) *RoleUpdate
RemoveAccountIDs removes the "accounts" edge to Account entities by IDs.
func (*RoleUpdate) RemoveAccounts ¶
func (ru *RoleUpdate) RemoveAccounts(a ...*Account) *RoleUpdate
RemoveAccounts removes "accounts" edges to Account entities.
func (*RoleUpdate) Save ¶
func (ru *RoleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RoleUpdate) SaveX ¶
func (ru *RoleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RoleUpdate) SetName ¶
func (ru *RoleUpdate) SetName(s string) *RoleUpdate
SetName sets the "name" field.
func (*RoleUpdate) SetUpdatedAt ¶
func (ru *RoleUpdate) SetUpdatedAt(t time.Time) *RoleUpdate
SetUpdatedAt sets the "updated_at" field.
func (*RoleUpdate) Where ¶
func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate
Where appends a list predicates to the RoleUpdate builder.
type RoleUpdateOne ¶
type RoleUpdateOne struct {
// contains filtered or unexported fields
}
RoleUpdateOne is the builder for updating a single Role entity.
func (*RoleUpdateOne) AddAccountIDs ¶
func (ruo *RoleUpdateOne) AddAccountIDs(ids ...xid.ID) *RoleUpdateOne
AddAccountIDs adds the "accounts" edge to the Account entity by IDs.
func (*RoleUpdateOne) AddAccounts ¶
func (ruo *RoleUpdateOne) AddAccounts(a ...*Account) *RoleUpdateOne
AddAccounts adds the "accounts" edges to the Account entity.
func (*RoleUpdateOne) ClearAccounts ¶
func (ruo *RoleUpdateOne) ClearAccounts() *RoleUpdateOne
ClearAccounts clears all "accounts" edges to the Account entity.
func (*RoleUpdateOne) Exec ¶
func (ruo *RoleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RoleUpdateOne) ExecX ¶
func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdateOne) Modify ¶
func (ruo *RoleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*RoleUpdateOne) Mutation ¶
func (ruo *RoleUpdateOne) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdateOne) RemoveAccountIDs ¶
func (ruo *RoleUpdateOne) RemoveAccountIDs(ids ...xid.ID) *RoleUpdateOne
RemoveAccountIDs removes the "accounts" edge to Account entities by IDs.
func (*RoleUpdateOne) RemoveAccounts ¶
func (ruo *RoleUpdateOne) RemoveAccounts(a ...*Account) *RoleUpdateOne
RemoveAccounts removes "accounts" edges to Account entities.
func (*RoleUpdateOne) Save ¶
func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)
Save executes the query and returns the updated Role entity.
func (*RoleUpdateOne) SaveX ¶
func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role
SaveX is like Save, but panics if an error occurs.
func (*RoleUpdateOne) Select ¶
func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RoleUpdateOne) SetName ¶
func (ruo *RoleUpdateOne) SetName(s string) *RoleUpdateOne
SetName sets the "name" field.
func (*RoleUpdateOne) SetUpdatedAt ¶
func (ruo *RoleUpdateOne) SetUpdatedAt(t time.Time) *RoleUpdateOne
SetUpdatedAt sets the "updated_at" field.
type RoleUpsert ¶
RoleUpsert is the "OnConflict" setter.
func (*RoleUpsert) SetCreatedAt ¶
func (u *RoleUpsert) SetCreatedAt(v time.Time) *RoleUpsert
SetCreatedAt sets the "created_at" field.
func (*RoleUpsert) SetName ¶
func (u *RoleUpsert) SetName(v string) *RoleUpsert
SetName sets the "name" field.
func (*RoleUpsert) SetUpdatedAt ¶
func (u *RoleUpsert) SetUpdatedAt(v time.Time) *RoleUpsert
SetUpdatedAt sets the "updated_at" field.
func (*RoleUpsert) UpdateCreatedAt ¶
func (u *RoleUpsert) UpdateCreatedAt() *RoleUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*RoleUpsert) UpdateName ¶
func (u *RoleUpsert) UpdateName() *RoleUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*RoleUpsert) UpdateUpdatedAt ¶
func (u *RoleUpsert) UpdateUpdatedAt() *RoleUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type RoleUpsertBulk ¶
type RoleUpsertBulk struct {
// contains filtered or unexported fields
}
RoleUpsertBulk is the builder for "upsert"-ing a bulk of Role nodes.
func (*RoleUpsertBulk) DoNothing ¶
func (u *RoleUpsertBulk) DoNothing() *RoleUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RoleUpsertBulk) Exec ¶
func (u *RoleUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUpsertBulk) ExecX ¶
func (u *RoleUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpsertBulk) Ignore ¶
func (u *RoleUpsertBulk) Ignore() *RoleUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RoleUpsertBulk) SetCreatedAt ¶
func (u *RoleUpsertBulk) SetCreatedAt(v time.Time) *RoleUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*RoleUpsertBulk) SetName ¶
func (u *RoleUpsertBulk) SetName(v string) *RoleUpsertBulk
SetName sets the "name" field.
func (*RoleUpsertBulk) SetUpdatedAt ¶
func (u *RoleUpsertBulk) SetUpdatedAt(v time.Time) *RoleUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*RoleUpsertBulk) Update ¶
func (u *RoleUpsertBulk) Update(set func(*RoleUpsert)) *RoleUpsertBulk
Update allows overriding fields `UPDATE` values. See the RoleCreateBulk.OnConflict documentation for more info.
func (*RoleUpsertBulk) UpdateCreatedAt ¶
func (u *RoleUpsertBulk) UpdateCreatedAt() *RoleUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateName ¶
func (u *RoleUpsertBulk) UpdateName() *RoleUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateNewValues ¶
func (u *RoleUpsertBulk) UpdateNewValues() *RoleUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Role.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(role.FieldID) }), ). Exec(ctx)
func (*RoleUpsertBulk) UpdateUpdatedAt ¶
func (u *RoleUpsertBulk) UpdateUpdatedAt() *RoleUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type RoleUpsertOne ¶
type RoleUpsertOne struct {
// contains filtered or unexported fields
}
RoleUpsertOne is the builder for "upsert"-ing
one Role node.
func (*RoleUpsertOne) DoNothing ¶
func (u *RoleUpsertOne) DoNothing() *RoleUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RoleUpsertOne) Exec ¶
func (u *RoleUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUpsertOne) ExecX ¶
func (u *RoleUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpsertOne) IDX ¶
func (u *RoleUpsertOne) IDX(ctx context.Context) xid.ID
IDX is like ID, but panics if an error occurs.
func (*RoleUpsertOne) Ignore ¶
func (u *RoleUpsertOne) Ignore() *RoleUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RoleUpsertOne) SetCreatedAt ¶
func (u *RoleUpsertOne) SetCreatedAt(v time.Time) *RoleUpsertOne
SetCreatedAt sets the "created_at" field.
func (*RoleUpsertOne) SetName ¶
func (u *RoleUpsertOne) SetName(v string) *RoleUpsertOne
SetName sets the "name" field.
func (*RoleUpsertOne) SetUpdatedAt ¶
func (u *RoleUpsertOne) SetUpdatedAt(v time.Time) *RoleUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*RoleUpsertOne) Update ¶
func (u *RoleUpsertOne) Update(set func(*RoleUpsert)) *RoleUpsertOne
Update allows overriding fields `UPDATE` values. See the RoleCreate.OnConflict documentation for more info.
func (*RoleUpsertOne) UpdateCreatedAt ¶
func (u *RoleUpsertOne) UpdateCreatedAt() *RoleUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateName ¶
func (u *RoleUpsertOne) UpdateName() *RoleUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateNewValues ¶
func (u *RoleUpsertOne) UpdateNewValues() *RoleUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Role.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(role.FieldID) }), ). Exec(ctx)
func (*RoleUpsertOne) UpdateUpdatedAt ¶
func (u *RoleUpsertOne) UpdateUpdatedAt() *RoleUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
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 Subscription ¶
type Subscription struct { // ID of the ent. ID xid.ID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // RefersType holds the value of the "refers_type" field. RefersType string `json:"refers_type,omitempty"` // RefersTo holds the value of the "refers_to" field. RefersTo string `json:"refers_to,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SubscriptionQuery when eager-loading is set. Edges SubscriptionEdges `json:"edges"` // contains filtered or unexported fields }
Subscription is the model entity for the Subscription schema.
func (*Subscription) QueryAccount ¶
func (s *Subscription) QueryAccount() *AccountQuery
QueryAccount queries the "account" edge of the Subscription entity.
func (*Subscription) QueryNotifications ¶
func (s *Subscription) QueryNotifications() *NotificationQuery
QueryNotifications queries the "notifications" edge of the Subscription entity.
func (*Subscription) String ¶
func (s *Subscription) String() string
String implements the fmt.Stringer.
func (*Subscription) Unwrap ¶
func (s *Subscription) Unwrap() *Subscription
Unwrap unwraps the Subscription 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 (*Subscription) Update ¶
func (s *Subscription) Update() *SubscriptionUpdateOne
Update returns a builder for updating this Subscription. Note that you need to call Subscription.Unwrap() before calling this method if this Subscription was returned from a transaction, and the transaction was committed or rolled back.
type SubscriptionClient ¶
type SubscriptionClient struct {
// contains filtered or unexported fields
}
SubscriptionClient is a client for the Subscription schema.
func NewSubscriptionClient ¶
func NewSubscriptionClient(c config) *SubscriptionClient
NewSubscriptionClient returns a client for the Subscription from the given config.
func (*SubscriptionClient) Create ¶
func (c *SubscriptionClient) Create() *SubscriptionCreate
Create returns a builder for creating a Subscription entity.
func (*SubscriptionClient) CreateBulk ¶
func (c *SubscriptionClient) CreateBulk(builders ...*SubscriptionCreate) *SubscriptionCreateBulk
CreateBulk returns a builder for creating a bulk of Subscription entities.
func (*SubscriptionClient) Delete ¶
func (c *SubscriptionClient) Delete() *SubscriptionDelete
Delete returns a delete builder for Subscription.
func (*SubscriptionClient) DeleteOne ¶
func (c *SubscriptionClient) DeleteOne(s *Subscription) *SubscriptionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SubscriptionClient) DeleteOneID ¶
func (c *SubscriptionClient) DeleteOneID(id xid.ID) *SubscriptionDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*SubscriptionClient) Get ¶
func (c *SubscriptionClient) Get(ctx context.Context, id xid.ID) (*Subscription, error)
Get returns a Subscription entity by its id.
func (*SubscriptionClient) GetX ¶
func (c *SubscriptionClient) GetX(ctx context.Context, id xid.ID) *Subscription
GetX is like Get, but panics if an error occurs.
func (*SubscriptionClient) Hooks ¶
func (c *SubscriptionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SubscriptionClient) Query ¶
func (c *SubscriptionClient) Query() *SubscriptionQuery
Query returns a query builder for Subscription.
func (*SubscriptionClient) QueryAccount ¶
func (c *SubscriptionClient) QueryAccount(s *Subscription) *AccountQuery
QueryAccount queries the account edge of a Subscription.
func (*SubscriptionClient) QueryNotifications ¶
func (c *SubscriptionClient) QueryNotifications(s *Subscription) *NotificationQuery
QueryNotifications queries the notifications edge of a Subscription.
func (*SubscriptionClient) Update ¶
func (c *SubscriptionClient) Update() *SubscriptionUpdate
Update returns an update builder for Subscription.
func (*SubscriptionClient) UpdateOne ¶
func (c *SubscriptionClient) UpdateOne(s *Subscription) *SubscriptionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SubscriptionClient) UpdateOneID ¶
func (c *SubscriptionClient) UpdateOneID(id xid.ID) *SubscriptionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SubscriptionClient) Use ¶
func (c *SubscriptionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `subscription.Hooks(f(g(h())))`.
type SubscriptionCreate ¶
type SubscriptionCreate struct {
// contains filtered or unexported fields
}
SubscriptionCreate is the builder for creating a Subscription entity.
func (*SubscriptionCreate) AddNotificationIDs ¶
func (sc *SubscriptionCreate) AddNotificationIDs(ids ...xid.ID) *SubscriptionCreate
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*SubscriptionCreate) AddNotifications ¶
func (sc *SubscriptionCreate) AddNotifications(n ...*Notification) *SubscriptionCreate
AddNotifications adds the "notifications" edges to the Notification entity.
func (*SubscriptionCreate) Exec ¶
func (sc *SubscriptionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionCreate) ExecX ¶
func (sc *SubscriptionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionCreate) Mutation ¶
func (sc *SubscriptionCreate) Mutation() *SubscriptionMutation
Mutation returns the SubscriptionMutation object of the builder.
func (*SubscriptionCreate) OnConflict ¶
func (sc *SubscriptionCreate) OnConflict(opts ...sql.ConflictOption) *SubscriptionUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Subscription.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.SubscriptionUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*SubscriptionCreate) OnConflictColumns ¶
func (sc *SubscriptionCreate) OnConflictColumns(columns ...string) *SubscriptionUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Subscription.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SubscriptionCreate) Save ¶
func (sc *SubscriptionCreate) Save(ctx context.Context) (*Subscription, error)
Save creates the Subscription in the database.
func (*SubscriptionCreate) SaveX ¶
func (sc *SubscriptionCreate) SaveX(ctx context.Context) *Subscription
SaveX calls Save and panics if Save returns an error.
func (*SubscriptionCreate) SetAccount ¶
func (sc *SubscriptionCreate) SetAccount(a *Account) *SubscriptionCreate
SetAccount sets the "account" edge to the Account entity.
func (*SubscriptionCreate) SetAccountID ¶
func (sc *SubscriptionCreate) SetAccountID(id xid.ID) *SubscriptionCreate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*SubscriptionCreate) SetCreatedAt ¶
func (sc *SubscriptionCreate) SetCreatedAt(t time.Time) *SubscriptionCreate
SetCreatedAt sets the "created_at" field.
func (*SubscriptionCreate) SetID ¶
func (sc *SubscriptionCreate) SetID(x xid.ID) *SubscriptionCreate
SetID sets the "id" field.
func (*SubscriptionCreate) SetNillableAccountID ¶
func (sc *SubscriptionCreate) SetNillableAccountID(id *xid.ID) *SubscriptionCreate
SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.
func (*SubscriptionCreate) SetNillableCreatedAt ¶
func (sc *SubscriptionCreate) SetNillableCreatedAt(t *time.Time) *SubscriptionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableID ¶
func (sc *SubscriptionCreate) SetNillableID(x *xid.ID) *SubscriptionCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SubscriptionCreate) SetRefersTo ¶
func (sc *SubscriptionCreate) SetRefersTo(s string) *SubscriptionCreate
SetRefersTo sets the "refers_to" field.
func (*SubscriptionCreate) SetRefersType ¶
func (sc *SubscriptionCreate) SetRefersType(s string) *SubscriptionCreate
SetRefersType sets the "refers_type" field.
type SubscriptionCreateBulk ¶
type SubscriptionCreateBulk struct {
// contains filtered or unexported fields
}
SubscriptionCreateBulk is the builder for creating many Subscription entities in bulk.
func (*SubscriptionCreateBulk) Exec ¶
func (scb *SubscriptionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionCreateBulk) ExecX ¶
func (scb *SubscriptionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionCreateBulk) OnConflict ¶
func (scb *SubscriptionCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubscriptionUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Subscription.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.SubscriptionUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*SubscriptionCreateBulk) OnConflictColumns ¶
func (scb *SubscriptionCreateBulk) OnConflictColumns(columns ...string) *SubscriptionUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Subscription.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SubscriptionCreateBulk) Save ¶
func (scb *SubscriptionCreateBulk) Save(ctx context.Context) ([]*Subscription, error)
Save creates the Subscription entities in the database.
func (*SubscriptionCreateBulk) SaveX ¶
func (scb *SubscriptionCreateBulk) SaveX(ctx context.Context) []*Subscription
SaveX is like Save, but panics if an error occurs.
type SubscriptionDelete ¶
type SubscriptionDelete struct {
// contains filtered or unexported fields
}
SubscriptionDelete is the builder for deleting a Subscription entity.
func (*SubscriptionDelete) Exec ¶
func (sd *SubscriptionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SubscriptionDelete) ExecX ¶
func (sd *SubscriptionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionDelete) Where ¶
func (sd *SubscriptionDelete) Where(ps ...predicate.Subscription) *SubscriptionDelete
Where appends a list predicates to the SubscriptionDelete builder.
type SubscriptionDeleteOne ¶
type SubscriptionDeleteOne struct {
// contains filtered or unexported fields
}
SubscriptionDeleteOne is the builder for deleting a single Subscription entity.
func (*SubscriptionDeleteOne) Exec ¶
func (sdo *SubscriptionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SubscriptionDeleteOne) ExecX ¶
func (sdo *SubscriptionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SubscriptionEdges ¶
type SubscriptionEdges struct { // Account holds the value of the account edge. Account *Account `json:"account,omitempty"` // Notifications holds the value of the notifications edge. Notifications []*Notification `json:"notifications,omitempty"` // contains filtered or unexported fields }
SubscriptionEdges holds the relations/edges for other nodes in the graph.
func (SubscriptionEdges) AccountOrErr ¶
func (e SubscriptionEdges) AccountOrErr() (*Account, error)
AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SubscriptionEdges) NotificationsOrErr ¶
func (e SubscriptionEdges) NotificationsOrErr() ([]*Notification, error)
NotificationsOrErr returns the Notifications value or an error if the edge was not loaded in eager-loading.
type SubscriptionGroupBy ¶
type SubscriptionGroupBy struct {
// contains filtered or unexported fields
}
SubscriptionGroupBy is the group-by builder for Subscription entities.
func (*SubscriptionGroupBy) Aggregate ¶
func (sgb *SubscriptionGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SubscriptionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Scan ¶
func (sgb *SubscriptionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SubscriptionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscriptionMutation ¶
type SubscriptionMutation struct {
// contains filtered or unexported fields
}
SubscriptionMutation represents an operation that mutates the Subscription nodes in the graph.
func (*SubscriptionMutation) AccountCleared ¶
func (m *SubscriptionMutation) AccountCleared() bool
AccountCleared reports if the "account" edge to the Account entity was cleared.
func (*SubscriptionMutation) AccountID ¶
func (m *SubscriptionMutation) AccountID() (id xid.ID, exists bool)
AccountID returns the "account" edge ID in the mutation.
func (*SubscriptionMutation) AccountIDs ¶
func (m *SubscriptionMutation) AccountIDs() (ids []xid.ID)
AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.
func (*SubscriptionMutation) AddField ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) AddNotificationIDs ¶
func (m *SubscriptionMutation) AddNotificationIDs(ids ...xid.ID)
AddNotificationIDs adds the "notifications" edge to the Notification entity by ids.
func (*SubscriptionMutation) AddedEdges ¶
func (m *SubscriptionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SubscriptionMutation) AddedField ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) AddedFields ¶
func (m *SubscriptionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SubscriptionMutation) AddedIDs ¶
func (m *SubscriptionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SubscriptionMutation) ClearAccount ¶
func (m *SubscriptionMutation) ClearAccount()
ClearAccount clears the "account" edge to the Account entity.
func (*SubscriptionMutation) ClearEdge ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) ClearField ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) ClearNotifications ¶
func (m *SubscriptionMutation) ClearNotifications()
ClearNotifications clears the "notifications" edge to the Notification entity.
func (*SubscriptionMutation) ClearedEdges ¶
func (m *SubscriptionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SubscriptionMutation) ClearedFields ¶
func (m *SubscriptionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SubscriptionMutation) Client ¶
func (m SubscriptionMutation) 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 (*SubscriptionMutation) CreatedAt ¶
func (m *SubscriptionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SubscriptionMutation) EdgeCleared ¶
func (m *SubscriptionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SubscriptionMutation) Field ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) FieldCleared ¶
func (m *SubscriptionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SubscriptionMutation) Fields ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) ID ¶
func (m *SubscriptionMutation) ID() (id xid.ID, 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 (*SubscriptionMutation) 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 (*SubscriptionMutation) NotificationsCleared ¶
func (m *SubscriptionMutation) NotificationsCleared() bool
NotificationsCleared reports if the "notifications" edge to the Notification entity was cleared.
func (*SubscriptionMutation) NotificationsIDs ¶
func (m *SubscriptionMutation) NotificationsIDs() (ids []xid.ID)
NotificationsIDs returns the "notifications" edge IDs in the mutation.
func (*SubscriptionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Subscription entity. If the Subscription 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 (*SubscriptionMutation) 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 (*SubscriptionMutation) OldRefersTo ¶
func (m *SubscriptionMutation) OldRefersTo(ctx context.Context) (v string, err error)
OldRefersTo returns the old "refers_to" field's value of the Subscription entity. If the Subscription 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 (*SubscriptionMutation) OldRefersType ¶
func (m *SubscriptionMutation) OldRefersType(ctx context.Context) (v string, err error)
OldRefersType returns the old "refers_type" field's value of the Subscription entity. If the Subscription 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 (*SubscriptionMutation) Op ¶
func (m *SubscriptionMutation) Op() Op
Op returns the operation name.
func (*SubscriptionMutation) RefersTo ¶
func (m *SubscriptionMutation) RefersTo() (r string, exists bool)
RefersTo returns the value of the "refers_to" field in the mutation.
func (*SubscriptionMutation) RefersType ¶
func (m *SubscriptionMutation) RefersType() (r string, exists bool)
RefersType returns the value of the "refers_type" field in the mutation.
func (*SubscriptionMutation) RemoveNotificationIDs ¶
func (m *SubscriptionMutation) RemoveNotificationIDs(ids ...xid.ID)
RemoveNotificationIDs removes the "notifications" edge to the Notification entity by IDs.
func (*SubscriptionMutation) RemovedEdges ¶
func (m *SubscriptionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SubscriptionMutation) RemovedIDs ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) RemovedNotificationsIDs ¶
func (m *SubscriptionMutation) RemovedNotificationsIDs() (ids []xid.ID)
RemovedNotifications returns the removed IDs of the "notifications" edge to the Notification entity.
func (*SubscriptionMutation) ResetAccount ¶
func (m *SubscriptionMutation) ResetAccount()
ResetAccount resets all changes to the "account" edge.
func (*SubscriptionMutation) ResetCreatedAt ¶
func (m *SubscriptionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SubscriptionMutation) ResetEdge ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) ResetField ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) ResetNotifications ¶
func (m *SubscriptionMutation) ResetNotifications()
ResetNotifications resets all changes to the "notifications" edge.
func (*SubscriptionMutation) ResetRefersTo ¶
func (m *SubscriptionMutation) ResetRefersTo()
ResetRefersTo resets all changes to the "refers_to" field.
func (*SubscriptionMutation) ResetRefersType ¶
func (m *SubscriptionMutation) ResetRefersType()
ResetRefersType resets all changes to the "refers_type" field.
func (*SubscriptionMutation) SetAccountID ¶
func (m *SubscriptionMutation) SetAccountID(id xid.ID)
SetAccountID sets the "account" edge to the Account entity by id.
func (*SubscriptionMutation) SetCreatedAt ¶
func (m *SubscriptionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SubscriptionMutation) SetField ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) SetID ¶
func (m *SubscriptionMutation) SetID(id xid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Subscription entities.
func (*SubscriptionMutation) SetRefersTo ¶
func (m *SubscriptionMutation) SetRefersTo(s string)
SetRefersTo sets the "refers_to" field.
func (*SubscriptionMutation) SetRefersType ¶
func (m *SubscriptionMutation) SetRefersType(s string)
SetRefersType sets the "refers_type" field.
func (SubscriptionMutation) Tx ¶
func (m SubscriptionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SubscriptionMutation) Type ¶
func (m *SubscriptionMutation) Type() string
Type returns the node type of this mutation (Subscription).
func (*SubscriptionMutation) Where ¶
func (m *SubscriptionMutation) Where(ps ...predicate.Subscription)
Where appends a list predicates to the SubscriptionMutation builder.
type SubscriptionQuery ¶
type SubscriptionQuery struct {
// contains filtered or unexported fields
}
SubscriptionQuery is the builder for querying Subscription entities.
func (*SubscriptionQuery) All ¶
func (sq *SubscriptionQuery) All(ctx context.Context) ([]*Subscription, error)
All executes the query and returns a list of Subscriptions.
func (*SubscriptionQuery) AllX ¶
func (sq *SubscriptionQuery) AllX(ctx context.Context) []*Subscription
AllX is like All, but panics if an error occurs.
func (*SubscriptionQuery) Clone ¶
func (sq *SubscriptionQuery) Clone() *SubscriptionQuery
Clone returns a duplicate of the SubscriptionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SubscriptionQuery) Count ¶
func (sq *SubscriptionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SubscriptionQuery) CountX ¶
func (sq *SubscriptionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SubscriptionQuery) Exist ¶
func (sq *SubscriptionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SubscriptionQuery) ExistX ¶
func (sq *SubscriptionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SubscriptionQuery) First ¶
func (sq *SubscriptionQuery) First(ctx context.Context) (*Subscription, error)
First returns the first Subscription entity from the query. Returns a *NotFoundError when no Subscription was found.
func (*SubscriptionQuery) FirstID ¶
FirstID returns the first Subscription ID from the query. Returns a *NotFoundError when no Subscription ID was found.
func (*SubscriptionQuery) FirstIDX ¶
func (sq *SubscriptionQuery) FirstIDX(ctx context.Context) xid.ID
FirstIDX is like FirstID, but panics if an error occurs.
func (*SubscriptionQuery) FirstX ¶
func (sq *SubscriptionQuery) FirstX(ctx context.Context) *Subscription
FirstX is like First, but panics if an error occurs.
func (*SubscriptionQuery) GroupBy ¶
func (sq *SubscriptionQuery) GroupBy(field string, fields ...string) *SubscriptionGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Subscription.Query(). GroupBy(subscription.FieldCreatedAt). Aggregate(model.Count()). Scan(ctx, &v)
func (*SubscriptionQuery) IDsX ¶
func (sq *SubscriptionQuery) IDsX(ctx context.Context) []xid.ID
IDsX is like IDs, but panics if an error occurs.
func (*SubscriptionQuery) Limit ¶
func (sq *SubscriptionQuery) Limit(limit int) *SubscriptionQuery
Limit adds a limit step to the query.
func (*SubscriptionQuery) Modify ¶
func (sq *SubscriptionQuery) Modify(modifiers ...func(s *sql.Selector)) *SubscriptionSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*SubscriptionQuery) Offset ¶
func (sq *SubscriptionQuery) Offset(offset int) *SubscriptionQuery
Offset adds an offset step to the query.
func (*SubscriptionQuery) Only ¶
func (sq *SubscriptionQuery) Only(ctx context.Context) (*Subscription, error)
Only returns a single Subscription entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Subscription entity is found. Returns a *NotFoundError when no Subscription entities are found.
func (*SubscriptionQuery) OnlyID ¶
OnlyID is like Only, but returns the only Subscription ID in the query. Returns a *NotSingularError when more than one Subscription ID is found. Returns a *NotFoundError when no entities are found.
func (*SubscriptionQuery) OnlyIDX ¶
func (sq *SubscriptionQuery) OnlyIDX(ctx context.Context) xid.ID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SubscriptionQuery) OnlyX ¶
func (sq *SubscriptionQuery) OnlyX(ctx context.Context) *Subscription
OnlyX is like Only, but panics if an error occurs.
func (*SubscriptionQuery) Order ¶
func (sq *SubscriptionQuery) Order(o ...OrderFunc) *SubscriptionQuery
Order adds an order step to the query.
func (*SubscriptionQuery) QueryAccount ¶
func (sq *SubscriptionQuery) QueryAccount() *AccountQuery
QueryAccount chains the current query on the "account" edge.
func (*SubscriptionQuery) QueryNotifications ¶
func (sq *SubscriptionQuery) QueryNotifications() *NotificationQuery
QueryNotifications chains the current query on the "notifications" edge.
func (*SubscriptionQuery) Select ¶
func (sq *SubscriptionQuery) Select(fields ...string) *SubscriptionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Subscription.Query(). Select(subscription.FieldCreatedAt). Scan(ctx, &v)
func (*SubscriptionQuery) Unique ¶
func (sq *SubscriptionQuery) Unique(unique bool) *SubscriptionQuery
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 (*SubscriptionQuery) Where ¶
func (sq *SubscriptionQuery) Where(ps ...predicate.Subscription) *SubscriptionQuery
Where adds a new predicate for the SubscriptionQuery builder.
func (*SubscriptionQuery) WithAccount ¶
func (sq *SubscriptionQuery) WithAccount(opts ...func(*AccountQuery)) *SubscriptionQuery
WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.
func (*SubscriptionQuery) WithNotifications ¶
func (sq *SubscriptionQuery) WithNotifications(opts ...func(*NotificationQuery)) *SubscriptionQuery
WithNotifications tells the query-builder to eager-load the nodes that are connected to the "notifications" edge. The optional arguments are used to configure the query builder of the edge.
type SubscriptionSelect ¶
type SubscriptionSelect struct { *SubscriptionQuery // contains filtered or unexported fields }
SubscriptionSelect is the builder for selecting fields of Subscription entities.
func (*SubscriptionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Modify ¶
func (ss *SubscriptionSelect) Modify(modifiers ...func(s *sql.Selector)) *SubscriptionSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*SubscriptionSelect) Scan ¶
func (ss *SubscriptionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SubscriptionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscriptionUpdate ¶
type SubscriptionUpdate struct {
// contains filtered or unexported fields
}
SubscriptionUpdate is the builder for updating Subscription entities.
func (*SubscriptionUpdate) AddNotificationIDs ¶
func (su *SubscriptionUpdate) AddNotificationIDs(ids ...xid.ID) *SubscriptionUpdate
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*SubscriptionUpdate) AddNotifications ¶
func (su *SubscriptionUpdate) AddNotifications(n ...*Notification) *SubscriptionUpdate
AddNotifications adds the "notifications" edges to the Notification entity.
func (*SubscriptionUpdate) ClearAccount ¶
func (su *SubscriptionUpdate) ClearAccount() *SubscriptionUpdate
ClearAccount clears the "account" edge to the Account entity.
func (*SubscriptionUpdate) ClearNotifications ¶
func (su *SubscriptionUpdate) ClearNotifications() *SubscriptionUpdate
ClearNotifications clears all "notifications" edges to the Notification entity.
func (*SubscriptionUpdate) Exec ¶
func (su *SubscriptionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionUpdate) ExecX ¶
func (su *SubscriptionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionUpdate) Modify ¶
func (su *SubscriptionUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SubscriptionUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*SubscriptionUpdate) Mutation ¶
func (su *SubscriptionUpdate) Mutation() *SubscriptionMutation
Mutation returns the SubscriptionMutation object of the builder.
func (*SubscriptionUpdate) RemoveNotificationIDs ¶
func (su *SubscriptionUpdate) RemoveNotificationIDs(ids ...xid.ID) *SubscriptionUpdate
RemoveNotificationIDs removes the "notifications" edge to Notification entities by IDs.
func (*SubscriptionUpdate) RemoveNotifications ¶
func (su *SubscriptionUpdate) RemoveNotifications(n ...*Notification) *SubscriptionUpdate
RemoveNotifications removes "notifications" edges to Notification entities.
func (*SubscriptionUpdate) Save ¶
func (su *SubscriptionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SubscriptionUpdate) SaveX ¶
func (su *SubscriptionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SubscriptionUpdate) SetAccount ¶
func (su *SubscriptionUpdate) SetAccount(a *Account) *SubscriptionUpdate
SetAccount sets the "account" edge to the Account entity.
func (*SubscriptionUpdate) SetAccountID ¶
func (su *SubscriptionUpdate) SetAccountID(id xid.ID) *SubscriptionUpdate
SetAccountID sets the "account" edge to the Account entity by ID.
func (*SubscriptionUpdate) SetNillableAccountID ¶
func (su *SubscriptionUpdate) SetNillableAccountID(id *xid.ID) *SubscriptionUpdate
SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.
func (*SubscriptionUpdate) SetRefersTo ¶
func (su *SubscriptionUpdate) SetRefersTo(s string) *SubscriptionUpdate
SetRefersTo sets the "refers_to" field.
func (*SubscriptionUpdate) SetRefersType ¶
func (su *SubscriptionUpdate) SetRefersType(s string) *SubscriptionUpdate
SetRefersType sets the "refers_type" field.
func (*SubscriptionUpdate) Where ¶
func (su *SubscriptionUpdate) Where(ps ...predicate.Subscription) *SubscriptionUpdate
Where appends a list predicates to the SubscriptionUpdate builder.
type SubscriptionUpdateOne ¶
type SubscriptionUpdateOne struct {
// contains filtered or unexported fields
}
SubscriptionUpdateOne is the builder for updating a single Subscription entity.
func (*SubscriptionUpdateOne) AddNotificationIDs ¶
func (suo *SubscriptionUpdateOne) AddNotificationIDs(ids ...xid.ID) *SubscriptionUpdateOne
AddNotificationIDs adds the "notifications" edge to the Notification entity by IDs.
func (*SubscriptionUpdateOne) AddNotifications ¶
func (suo *SubscriptionUpdateOne) AddNotifications(n ...*Notification) *SubscriptionUpdateOne
AddNotifications adds the "notifications" edges to the Notification entity.
func (*SubscriptionUpdateOne) ClearAccount ¶
func (suo *SubscriptionUpdateOne) ClearAccount() *SubscriptionUpdateOne
ClearAccount clears the "account" edge to the Account entity.
func (*SubscriptionUpdateOne) ClearNotifications ¶
func (suo *SubscriptionUpdateOne) ClearNotifications() *SubscriptionUpdateOne
ClearNotifications clears all "notifications" edges to the Notification entity.
func (*SubscriptionUpdateOne) Exec ¶
func (suo *SubscriptionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SubscriptionUpdateOne) ExecX ¶
func (suo *SubscriptionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionUpdateOne) Modify ¶
func (suo *SubscriptionUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SubscriptionUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*SubscriptionUpdateOne) Mutation ¶
func (suo *SubscriptionUpdateOne) Mutation() *SubscriptionMutation
Mutation returns the SubscriptionMutation object of the builder.
func (*SubscriptionUpdateOne) RemoveNotificationIDs ¶
func (suo *SubscriptionUpdateOne) RemoveNotificationIDs(ids ...xid.ID) *SubscriptionUpdateOne
RemoveNotificationIDs removes the "notifications" edge to Notification entities by IDs.
func (*SubscriptionUpdateOne) RemoveNotifications ¶
func (suo *SubscriptionUpdateOne) RemoveNotifications(n ...*Notification) *SubscriptionUpdateOne
RemoveNotifications removes "notifications" edges to Notification entities.
func (*SubscriptionUpdateOne) Save ¶
func (suo *SubscriptionUpdateOne) Save(ctx context.Context) (*Subscription, error)
Save executes the query and returns the updated Subscription entity.
func (*SubscriptionUpdateOne) SaveX ¶
func (suo *SubscriptionUpdateOne) SaveX(ctx context.Context) *Subscription
SaveX is like Save, but panics if an error occurs.
func (*SubscriptionUpdateOne) Select ¶
func (suo *SubscriptionUpdateOne) Select(field string, fields ...string) *SubscriptionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SubscriptionUpdateOne) SetAccount ¶
func (suo *SubscriptionUpdateOne) SetAccount(a *Account) *SubscriptionUpdateOne
SetAccount sets the "account" edge to the Account entity.
func (*SubscriptionUpdateOne) SetAccountID ¶
func (suo *SubscriptionUpdateOne) SetAccountID(id xid.ID) *SubscriptionUpdateOne
SetAccountID sets the "account" edge to the Account entity by ID.
func (*SubscriptionUpdateOne) SetNillableAccountID ¶
func (suo *SubscriptionUpdateOne) SetNillableAccountID(id *xid.ID) *SubscriptionUpdateOne
SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.
func (*SubscriptionUpdateOne) SetRefersTo ¶
func (suo *SubscriptionUpdateOne) SetRefersTo(s string) *SubscriptionUpdateOne
SetRefersTo sets the "refers_to" field.
func (*SubscriptionUpdateOne) SetRefersType ¶
func (suo *SubscriptionUpdateOne) SetRefersType(s string) *SubscriptionUpdateOne
SetRefersType sets the "refers_type" field.
type SubscriptionUpsert ¶
SubscriptionUpsert is the "OnConflict" setter.
func (*SubscriptionUpsert) SetCreatedAt ¶
func (u *SubscriptionUpsert) SetCreatedAt(v time.Time) *SubscriptionUpsert
SetCreatedAt sets the "created_at" field.
func (*SubscriptionUpsert) SetRefersTo ¶
func (u *SubscriptionUpsert) SetRefersTo(v string) *SubscriptionUpsert
SetRefersTo sets the "refers_to" field.
func (*SubscriptionUpsert) SetRefersType ¶
func (u *SubscriptionUpsert) SetRefersType(v string) *SubscriptionUpsert
SetRefersType sets the "refers_type" field.
func (*SubscriptionUpsert) UpdateCreatedAt ¶
func (u *SubscriptionUpsert) UpdateCreatedAt() *SubscriptionUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*SubscriptionUpsert) UpdateRefersTo ¶
func (u *SubscriptionUpsert) UpdateRefersTo() *SubscriptionUpsert
UpdateRefersTo sets the "refers_to" field to the value that was provided on create.
func (*SubscriptionUpsert) UpdateRefersType ¶
func (u *SubscriptionUpsert) UpdateRefersType() *SubscriptionUpsert
UpdateRefersType sets the "refers_type" field to the value that was provided on create.
type SubscriptionUpsertBulk ¶
type SubscriptionUpsertBulk struct {
// contains filtered or unexported fields
}
SubscriptionUpsertBulk is the builder for "upsert"-ing a bulk of Subscription nodes.
func (*SubscriptionUpsertBulk) DoNothing ¶
func (u *SubscriptionUpsertBulk) DoNothing() *SubscriptionUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SubscriptionUpsertBulk) Exec ¶
func (u *SubscriptionUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionUpsertBulk) ExecX ¶
func (u *SubscriptionUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionUpsertBulk) Ignore ¶
func (u *SubscriptionUpsertBulk) Ignore() *SubscriptionUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Subscription.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*SubscriptionUpsertBulk) SetCreatedAt ¶
func (u *SubscriptionUpsertBulk) SetCreatedAt(v time.Time) *SubscriptionUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*SubscriptionUpsertBulk) SetRefersTo ¶
func (u *SubscriptionUpsertBulk) SetRefersTo(v string) *SubscriptionUpsertBulk
SetRefersTo sets the "refers_to" field.
func (*SubscriptionUpsertBulk) SetRefersType ¶
func (u *SubscriptionUpsertBulk) SetRefersType(v string) *SubscriptionUpsertBulk
SetRefersType sets the "refers_type" field.
func (*SubscriptionUpsertBulk) Update ¶
func (u *SubscriptionUpsertBulk) Update(set func(*SubscriptionUpsert)) *SubscriptionUpsertBulk
Update allows overriding fields `UPDATE` values. See the SubscriptionCreateBulk.OnConflict documentation for more info.
func (*SubscriptionUpsertBulk) UpdateCreatedAt ¶
func (u *SubscriptionUpsertBulk) UpdateCreatedAt() *SubscriptionUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*SubscriptionUpsertBulk) UpdateNewValues ¶
func (u *SubscriptionUpsertBulk) UpdateNewValues() *SubscriptionUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Subscription.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(subscription.FieldID) }), ). Exec(ctx)
func (*SubscriptionUpsertBulk) UpdateRefersTo ¶
func (u *SubscriptionUpsertBulk) UpdateRefersTo() *SubscriptionUpsertBulk
UpdateRefersTo sets the "refers_to" field to the value that was provided on create.
func (*SubscriptionUpsertBulk) UpdateRefersType ¶
func (u *SubscriptionUpsertBulk) UpdateRefersType() *SubscriptionUpsertBulk
UpdateRefersType sets the "refers_type" field to the value that was provided on create.
type SubscriptionUpsertOne ¶
type SubscriptionUpsertOne struct {
// contains filtered or unexported fields
}
SubscriptionUpsertOne is the builder for "upsert"-ing
one Subscription node.
func (*SubscriptionUpsertOne) DoNothing ¶
func (u *SubscriptionUpsertOne) DoNothing() *SubscriptionUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SubscriptionUpsertOne) Exec ¶
func (u *SubscriptionUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionUpsertOne) ExecX ¶
func (u *SubscriptionUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionUpsertOne) ID ¶
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*SubscriptionUpsertOne) IDX ¶
func (u *SubscriptionUpsertOne) IDX(ctx context.Context) xid.ID
IDX is like ID, but panics if an error occurs.
func (*SubscriptionUpsertOne) Ignore ¶
func (u *SubscriptionUpsertOne) Ignore() *SubscriptionUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Subscription.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*SubscriptionUpsertOne) SetCreatedAt ¶
func (u *SubscriptionUpsertOne) SetCreatedAt(v time.Time) *SubscriptionUpsertOne
SetCreatedAt sets the "created_at" field.
func (*SubscriptionUpsertOne) SetRefersTo ¶
func (u *SubscriptionUpsertOne) SetRefersTo(v string) *SubscriptionUpsertOne
SetRefersTo sets the "refers_to" field.
func (*SubscriptionUpsertOne) SetRefersType ¶
func (u *SubscriptionUpsertOne) SetRefersType(v string) *SubscriptionUpsertOne
SetRefersType sets the "refers_type" field.
func (*SubscriptionUpsertOne) Update ¶
func (u *SubscriptionUpsertOne) Update(set func(*SubscriptionUpsert)) *SubscriptionUpsertOne
Update allows overriding fields `UPDATE` values. See the SubscriptionCreate.OnConflict documentation for more info.
func (*SubscriptionUpsertOne) UpdateCreatedAt ¶
func (u *SubscriptionUpsertOne) UpdateCreatedAt() *SubscriptionUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*SubscriptionUpsertOne) UpdateNewValues ¶
func (u *SubscriptionUpsertOne) UpdateNewValues() *SubscriptionUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Subscription.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(subscription.FieldID) }), ). Exec(ctx)
func (*SubscriptionUpsertOne) UpdateRefersTo ¶
func (u *SubscriptionUpsertOne) UpdateRefersTo() *SubscriptionUpsertOne
UpdateRefersTo sets the "refers_to" field to the value that was provided on create.
func (*SubscriptionUpsertOne) UpdateRefersType ¶
func (u *SubscriptionUpsertOne) UpdateRefersType() *SubscriptionUpsertOne
UpdateRefersType sets the "refers_type" field to the value that was provided on create.
type Subscriptions ¶
type Subscriptions []*Subscription
Subscriptions is a parsable slice of Subscription.
type Tag ¶
type Tag struct { // ID of the ent. ID xid.ID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TagQuery when eager-loading is set. Edges TagEdges `json:"edges"` // contains filtered or unexported fields }
Tag is the model entity for the Tag schema.
func (*Tag) QueryAccounts ¶
func (t *Tag) QueryAccounts() *AccountQuery
QueryAccounts queries the "accounts" edge of the Tag entity.
func (*Tag) QueryPosts ¶
QueryPosts queries the "posts" edge of the Tag entity.
func (*Tag) Unwrap ¶
Unwrap unwraps the Tag 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 (*Tag) Update ¶
func (t *Tag) Update() *TagUpdateOne
Update returns a builder for updating this Tag. Note that you need to call Tag.Unwrap() before calling this method if this Tag was returned from a transaction, and the transaction was committed or rolled back.
type TagClient ¶
type TagClient struct {
// contains filtered or unexported fields
}
TagClient is a client for the Tag schema.
func NewTagClient ¶
func NewTagClient(c config) *TagClient
NewTagClient returns a client for the Tag from the given config.
func (*TagClient) CreateBulk ¶
func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
CreateBulk returns a builder for creating a bulk of Tag entities.
func (*TagClient) DeleteOne ¶
func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TagClient) DeleteOneID ¶
func (c *TagClient) DeleteOneID(id xid.ID) *TagDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*TagClient) QueryAccounts ¶
func (c *TagClient) QueryAccounts(t *Tag) *AccountQuery
QueryAccounts queries the accounts edge of a Tag.
func (*TagClient) QueryPosts ¶
QueryPosts queries the posts edge of a Tag.
func (*TagClient) UpdateOne ¶
func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TagClient) UpdateOneID ¶
func (c *TagClient) UpdateOneID(id xid.ID) *TagUpdateOne
UpdateOneID returns an update builder for the given id.
type TagCreate ¶
type TagCreate struct {
// contains filtered or unexported fields
}
TagCreate is the builder for creating a Tag entity.
func (*TagCreate) AddAccountIDs ¶
AddAccountIDs adds the "accounts" edge to the Account entity by IDs.
func (*TagCreate) AddAccounts ¶
AddAccounts adds the "accounts" edges to the Account entity.
func (*TagCreate) AddPostIDs ¶
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*TagCreate) Mutation ¶
func (tc *TagCreate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagCreate) OnConflict ¶
func (tc *TagCreate) OnConflict(opts ...sql.ConflictOption) *TagUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tag.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TagUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*TagCreate) OnConflictColumns ¶
func (tc *TagCreate) OnConflictColumns(columns ...string) *TagUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TagCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*TagCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
type TagCreateBulk ¶
type TagCreateBulk struct {
// contains filtered or unexported fields
}
TagCreateBulk is the builder for creating many Tag entities in bulk.
func (*TagCreateBulk) Exec ¶
func (tcb *TagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagCreateBulk) ExecX ¶
func (tcb *TagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagCreateBulk) OnConflict ¶
func (tcb *TagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TagUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tag.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TagUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*TagCreateBulk) OnConflictColumns ¶
func (tcb *TagCreateBulk) OnConflictColumns(columns ...string) *TagUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TagDelete ¶
type TagDelete struct {
// contains filtered or unexported fields
}
TagDelete is the builder for deleting a Tag entity.
func (*TagDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type TagDeleteOne ¶
type TagDeleteOne struct {
// contains filtered or unexported fields
}
TagDeleteOne is the builder for deleting a single Tag entity.
func (*TagDeleteOne) Exec ¶
func (tdo *TagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TagDeleteOne) ExecX ¶
func (tdo *TagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TagEdges ¶
type TagEdges struct { // Posts holds the value of the posts edge. Posts []*Post `json:"posts,omitempty"` // Accounts holds the value of the accounts edge. Accounts []*Account `json:"accounts,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
func (TagEdges) AccountsOrErr ¶
AccountsOrErr returns the Accounts value or an error if the edge was not loaded in eager-loading.
func (TagEdges) PostsOrErr ¶
PostsOrErr returns the Posts value or an error if the edge was not loaded in eager-loading.
type TagGroupBy ¶
type TagGroupBy struct {
// contains filtered or unexported fields
}
TagGroupBy is the group-by builder for Tag entities.
func (*TagGroupBy) Aggregate ¶
func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Scan ¶
func (tgb *TagGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagMutation ¶
type TagMutation struct {
// contains filtered or unexported fields
}
TagMutation represents an operation that mutates the Tag nodes in the graph.
func (*TagMutation) AccountsCleared ¶
func (m *TagMutation) AccountsCleared() bool
AccountsCleared reports if the "accounts" edge to the Account entity was cleared.
func (*TagMutation) AccountsIDs ¶
func (m *TagMutation) AccountsIDs() (ids []xid.ID)
AccountsIDs returns the "accounts" edge IDs in the mutation.
func (*TagMutation) AddAccountIDs ¶
func (m *TagMutation) AddAccountIDs(ids ...xid.ID)
AddAccountIDs adds the "accounts" edge to the Account entity by ids.
func (*TagMutation) AddField ¶
func (m *TagMutation) 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 (*TagMutation) AddPostIDs ¶
func (m *TagMutation) AddPostIDs(ids ...xid.ID)
AddPostIDs adds the "posts" edge to the Post entity by ids.
func (*TagMutation) AddedEdges ¶
func (m *TagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TagMutation) AddedField ¶
func (m *TagMutation) 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 (*TagMutation) AddedFields ¶
func (m *TagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TagMutation) AddedIDs ¶
func (m *TagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TagMutation) ClearAccounts ¶
func (m *TagMutation) ClearAccounts()
ClearAccounts clears the "accounts" edge to the Account entity.
func (*TagMutation) ClearEdge ¶
func (m *TagMutation) 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 (*TagMutation) ClearField ¶
func (m *TagMutation) 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 (*TagMutation) ClearPosts ¶
func (m *TagMutation) ClearPosts()
ClearPosts clears the "posts" edge to the Post entity.
func (*TagMutation) ClearedEdges ¶
func (m *TagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TagMutation) ClearedFields ¶
func (m *TagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TagMutation) Client ¶
func (m TagMutation) 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 (*TagMutation) CreatedAt ¶
func (m *TagMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TagMutation) EdgeCleared ¶
func (m *TagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TagMutation) Field ¶
func (m *TagMutation) 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 (*TagMutation) FieldCleared ¶
func (m *TagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TagMutation) Fields ¶
func (m *TagMutation) 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 (*TagMutation) ID ¶
func (m *TagMutation) ID() (id xid.ID, 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 (*TagMutation) 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 (*TagMutation) Name ¶
func (m *TagMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*TagMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Tag entity. If the Tag 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 (*TagMutation) 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 (*TagMutation) OldName ¶
func (m *TagMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Tag entity. If the Tag 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 (*TagMutation) PostsCleared ¶
func (m *TagMutation) PostsCleared() bool
PostsCleared reports if the "posts" edge to the Post entity was cleared.
func (*TagMutation) PostsIDs ¶
func (m *TagMutation) PostsIDs() (ids []xid.ID)
PostsIDs returns the "posts" edge IDs in the mutation.
func (*TagMutation) RemoveAccountIDs ¶
func (m *TagMutation) RemoveAccountIDs(ids ...xid.ID)
RemoveAccountIDs removes the "accounts" edge to the Account entity by IDs.
func (*TagMutation) RemovePostIDs ¶
func (m *TagMutation) RemovePostIDs(ids ...xid.ID)
RemovePostIDs removes the "posts" edge to the Post entity by IDs.
func (*TagMutation) RemovedAccountsIDs ¶
func (m *TagMutation) RemovedAccountsIDs() (ids []xid.ID)
RemovedAccounts returns the removed IDs of the "accounts" edge to the Account entity.
func (*TagMutation) RemovedEdges ¶
func (m *TagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TagMutation) RemovedIDs ¶
func (m *TagMutation) 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 (*TagMutation) RemovedPostsIDs ¶
func (m *TagMutation) RemovedPostsIDs() (ids []xid.ID)
RemovedPosts returns the removed IDs of the "posts" edge to the Post entity.
func (*TagMutation) ResetAccounts ¶
func (m *TagMutation) ResetAccounts()
ResetAccounts resets all changes to the "accounts" edge.
func (*TagMutation) ResetCreatedAt ¶
func (m *TagMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TagMutation) ResetEdge ¶
func (m *TagMutation) 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 (*TagMutation) ResetField ¶
func (m *TagMutation) 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 (*TagMutation) ResetName ¶
func (m *TagMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TagMutation) ResetPosts ¶
func (m *TagMutation) ResetPosts()
ResetPosts resets all changes to the "posts" edge.
func (*TagMutation) SetCreatedAt ¶
func (m *TagMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TagMutation) SetField ¶
func (m *TagMutation) 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 (*TagMutation) SetID ¶
func (m *TagMutation) SetID(id xid.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Tag entities.
func (*TagMutation) SetName ¶
func (m *TagMutation) SetName(s string)
SetName sets the "name" field.
func (TagMutation) Tx ¶
func (m TagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TagMutation) Type ¶
func (m *TagMutation) Type() string
Type returns the node type of this mutation (Tag).
func (*TagMutation) Where ¶
func (m *TagMutation) Where(ps ...predicate.Tag)
Where appends a list predicates to the TagMutation builder.
type TagQuery ¶
type TagQuery struct {
// contains filtered or unexported fields
}
TagQuery is the builder for querying Tag entities.
func (*TagQuery) Clone ¶
Clone returns a duplicate of the TagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TagQuery) First ¶
First returns the first Tag entity from the query. Returns a *NotFoundError when no Tag was found.
func (*TagQuery) FirstID ¶
FirstID returns the first Tag ID from the query. Returns a *NotFoundError when no Tag ID was found.
func (*TagQuery) GroupBy ¶
func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Tag.Query(). GroupBy(tag.FieldCreatedAt). Aggregate(model.Count()). Scan(ctx, &v)
func (*TagQuery) Only ¶
Only returns a single Tag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tag entity is found. Returns a *NotFoundError when no Tag entities are found.
func (*TagQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tag ID in the query. Returns a *NotSingularError when more than one Tag ID is found. Returns a *NotFoundError when no entities are found.
func (*TagQuery) QueryAccounts ¶
func (tq *TagQuery) QueryAccounts() *AccountQuery
QueryAccounts chains the current query on the "accounts" edge.
func (*TagQuery) QueryPosts ¶
QueryPosts chains the current query on the "posts" edge.
func (*TagQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Tag.Query(). Select(tag.FieldCreatedAt). Scan(ctx, &v)
func (*TagQuery) 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 (*TagQuery) WithAccounts ¶
func (tq *TagQuery) WithAccounts(opts ...func(*AccountQuery)) *TagQuery
WithAccounts tells the query-builder to eager-load the nodes that are connected to the "accounts" edge. The optional arguments are used to configure the query builder of the edge.
type TagSelect ¶
type TagSelect struct { *TagQuery // contains filtered or unexported fields }
TagSelect is the builder for selecting fields of Tag entities.
func (*TagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagUpdate ¶
type TagUpdate struct {
// contains filtered or unexported fields
}
TagUpdate is the builder for updating Tag entities.
func (*TagUpdate) AddAccountIDs ¶
AddAccountIDs adds the "accounts" edge to the Account entity by IDs.
func (*TagUpdate) AddAccounts ¶
AddAccounts adds the "accounts" edges to the Account entity.
func (*TagUpdate) AddPostIDs ¶
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*TagUpdate) ClearAccounts ¶
ClearAccounts clears all "accounts" edges to the Account entity.
func (*TagUpdate) ClearPosts ¶
ClearPosts clears all "posts" edges to the Post entity.
func (*TagUpdate) Modify ¶
func (tu *TagUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TagUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) RemoveAccountIDs ¶
RemoveAccountIDs removes the "accounts" edge to Account entities by IDs.
func (*TagUpdate) RemoveAccounts ¶
RemoveAccounts removes "accounts" edges to Account entities.
func (*TagUpdate) RemovePostIDs ¶
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*TagUpdate) RemovePosts ¶
RemovePosts removes "posts" edges to Post entities.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddAccountIDs ¶
func (tuo *TagUpdateOne) AddAccountIDs(ids ...xid.ID) *TagUpdateOne
AddAccountIDs adds the "accounts" edge to the Account entity by IDs.
func (*TagUpdateOne) AddAccounts ¶
func (tuo *TagUpdateOne) AddAccounts(a ...*Account) *TagUpdateOne
AddAccounts adds the "accounts" edges to the Account entity.
func (*TagUpdateOne) AddPostIDs ¶
func (tuo *TagUpdateOne) AddPostIDs(ids ...xid.ID) *TagUpdateOne
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*TagUpdateOne) AddPosts ¶
func (tuo *TagUpdateOne) AddPosts(p ...*Post) *TagUpdateOne
AddPosts adds the "posts" edges to the Post entity.
func (*TagUpdateOne) ClearAccounts ¶
func (tuo *TagUpdateOne) ClearAccounts() *TagUpdateOne
ClearAccounts clears all "accounts" edges to the Account entity.
func (*TagUpdateOne) ClearPosts ¶
func (tuo *TagUpdateOne) ClearPosts() *TagUpdateOne
ClearPosts clears all "posts" edges to the Post entity.
func (*TagUpdateOne) Exec ¶
func (tuo *TagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TagUpdateOne) ExecX ¶
func (tuo *TagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpdateOne) Modify ¶
func (tuo *TagUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TagUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*TagUpdateOne) Mutation ¶
func (tuo *TagUpdateOne) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdateOne) RemoveAccountIDs ¶
func (tuo *TagUpdateOne) RemoveAccountIDs(ids ...xid.ID) *TagUpdateOne
RemoveAccountIDs removes the "accounts" edge to Account entities by IDs.
func (*TagUpdateOne) RemoveAccounts ¶
func (tuo *TagUpdateOne) RemoveAccounts(a ...*Account) *TagUpdateOne
RemoveAccounts removes "accounts" edges to Account entities.
func (*TagUpdateOne) RemovePostIDs ¶
func (tuo *TagUpdateOne) RemovePostIDs(ids ...xid.ID) *TagUpdateOne
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*TagUpdateOne) RemovePosts ¶
func (tuo *TagUpdateOne) RemovePosts(p ...*Post) *TagUpdateOne
RemovePosts removes "posts" edges to Post entities.
func (*TagUpdateOne) Save ¶
func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
Save executes the query and returns the updated Tag entity.
func (*TagUpdateOne) SaveX ¶
func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
SaveX is like Save, but panics if an error occurs.
func (*TagUpdateOne) Select ¶
func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
type TagUpsert ¶
TagUpsert is the "OnConflict" setter.
func (*TagUpsert) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*TagUpsert) UpdateCreatedAt ¶
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*TagUpsert) UpdateName ¶
UpdateName sets the "name" field to the value that was provided on create.
type TagUpsertBulk ¶
type TagUpsertBulk struct {
// contains filtered or unexported fields
}
TagUpsertBulk is the builder for "upsert"-ing a bulk of Tag nodes.
func (*TagUpsertBulk) DoNothing ¶
func (u *TagUpsertBulk) DoNothing() *TagUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TagUpsertBulk) Exec ¶
func (u *TagUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagUpsertBulk) ExecX ¶
func (u *TagUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpsertBulk) Ignore ¶
func (u *TagUpsertBulk) Ignore() *TagUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TagUpsertBulk) SetCreatedAt ¶
func (u *TagUpsertBulk) SetCreatedAt(v time.Time) *TagUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*TagUpsertBulk) SetName ¶
func (u *TagUpsertBulk) SetName(v string) *TagUpsertBulk
SetName sets the "name" field.
func (*TagUpsertBulk) Update ¶
func (u *TagUpsertBulk) Update(set func(*TagUpsert)) *TagUpsertBulk
Update allows overriding fields `UPDATE` values. See the TagCreateBulk.OnConflict documentation for more info.
func (*TagUpsertBulk) UpdateCreatedAt ¶
func (u *TagUpsertBulk) UpdateCreatedAt() *TagUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*TagUpsertBulk) UpdateName ¶
func (u *TagUpsertBulk) UpdateName() *TagUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*TagUpsertBulk) UpdateNewValues ¶
func (u *TagUpsertBulk) UpdateNewValues() *TagUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Tag.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(tag.FieldID) }), ). Exec(ctx)
type TagUpsertOne ¶
type TagUpsertOne struct {
// contains filtered or unexported fields
}
TagUpsertOne is the builder for "upsert"-ing
one Tag node.
func (*TagUpsertOne) DoNothing ¶
func (u *TagUpsertOne) DoNothing() *TagUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TagUpsertOne) Exec ¶
func (u *TagUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TagUpsertOne) ExecX ¶
func (u *TagUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpsertOne) IDX ¶
func (u *TagUpsertOne) IDX(ctx context.Context) xid.ID
IDX is like ID, but panics if an error occurs.
func (*TagUpsertOne) Ignore ¶
func (u *TagUpsertOne) Ignore() *TagUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TagUpsertOne) SetCreatedAt ¶
func (u *TagUpsertOne) SetCreatedAt(v time.Time) *TagUpsertOne
SetCreatedAt sets the "created_at" field.
func (*TagUpsertOne) SetName ¶
func (u *TagUpsertOne) SetName(v string) *TagUpsertOne
SetName sets the "name" field.
func (*TagUpsertOne) Update ¶
func (u *TagUpsertOne) Update(set func(*TagUpsert)) *TagUpsertOne
Update allows overriding fields `UPDATE` values. See the TagCreate.OnConflict documentation for more info.
func (*TagUpsertOne) UpdateCreatedAt ¶
func (u *TagUpsertOne) UpdateCreatedAt() *TagUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*TagUpsertOne) UpdateName ¶
func (u *TagUpsertOne) UpdateName() *TagUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*TagUpsertOne) UpdateNewValues ¶
func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Tag.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(tag.FieldID) }), ). Exec(ctx)
type Tx ¶
type Tx struct { // Account is the client for interacting with the Account builders. Account *AccountClient // Authentication is the client for interacting with the Authentication builders. Authentication *AuthenticationClient // Category is the client for interacting with the Category builders. Category *CategoryClient // Notification is the client for interacting with the Notification builders. Notification *NotificationClient // Post is the client for interacting with the Post builders. Post *PostClient // React is the client for interacting with the React builders. React *ReactClient // Role is the client for interacting with the Role builders. Role *RoleClient // Subscription is the client for interacting with the Subscription builders. Subscription *SubscriptionClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- account.go
- account_create.go
- account_delete.go
- account_query.go
- account_update.go
- authentication.go
- authentication_create.go
- authentication_delete.go
- authentication_query.go
- authentication_update.go
- category.go
- category_create.go
- category_delete.go
- category_query.go
- category_update.go
- client.go
- config.go
- context.go
- ent.go
- mutation.go
- notification.go
- notification_create.go
- notification_delete.go
- notification_query.go
- notification_update.go
- post.go
- post_create.go
- post_delete.go
- post_query.go
- post_update.go
- react.go
- react_create.go
- react_delete.go
- react_query.go
- react_update.go
- role.go
- role_create.go
- role_delete.go
- role_query.go
- role_update.go
- runtime.go
- subscription.go
- subscription_create.go
- subscription_delete.go
- subscription_query.go
- subscription_update.go
- tag.go
- tag_create.go
- tag_delete.go
- tag_query.go
- tag_update.go
- tx.go