Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type Collaboration
- func (c *Collaboration) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Collaboration) QueryCollaborator() *UserQuery
- func (c *Collaboration) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *Collaboration) QueryMemo() *MemoQuery
- func (c *Collaboration) String() string
- func (c *Collaboration) Unwrap() *Collaboration
- func (c *Collaboration) Update() *CollaborationUpdateOne
- func (c *Collaboration) Value(name string) (ent.Value, error)
- type CollaborationClient
- func (c *CollaborationClient) Create() *CollaborationCreate
- func (c *CollaborationClient) CreateBulk(builders ...*CollaborationCreate) *CollaborationCreateBulk
- func (c *CollaborationClient) Delete() *CollaborationDelete
- func (c *CollaborationClient) DeleteOne(co *Collaboration) *CollaborationDeleteOne
- func (c *CollaborationClient) DeleteOneID(id int) *CollaborationDeleteOne
- func (c *CollaborationClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *CollaborationClient) Get(ctx context.Context, id int) (*Collaboration, error)
- func (c *CollaborationClient) GetX(ctx context.Context, id int) *Collaboration
- func (c *CollaborationClient) Hooks() []Hook
- func (c *CollaborationClient) Intercept(interceptors ...Interceptor)
- func (c *CollaborationClient) Interceptors() []Interceptor
- func (c *CollaborationClient) MapCreateBulk(slice any, setFunc func(*CollaborationCreate, int)) *CollaborationCreateBulk
- func (c *CollaborationClient) Query() *CollaborationQuery
- func (c *CollaborationClient) QueryCollaborator(co *Collaboration) *UserQuery
- func (c *CollaborationClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *CollaborationClient) QueryMemo(co *Collaboration) *MemoQuery
- func (c *CollaborationClient) Update() *CollaborationUpdate
- func (c *CollaborationClient) UpdateOne(co *Collaboration) *CollaborationUpdateOne
- func (c *CollaborationClient) UpdateOneID(id int) *CollaborationUpdateOne
- func (c *CollaborationClient) Use(hooks ...Hook)
- type CollaborationCreate
- func (cc *CollaborationCreate) Exec(ctx context.Context) error
- func (c *CollaborationCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cc *CollaborationCreate) ExecX(ctx context.Context)
- func (cc *CollaborationCreate) Mutation() *CollaborationMutation
- func (cc *CollaborationCreate) OnConflict(opts ...sql.ConflictOption) *CollaborationUpsertOne
- func (cc *CollaborationCreate) OnConflictColumns(columns ...string) *CollaborationUpsertOne
- func (c *CollaborationCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cc *CollaborationCreate) Save(ctx context.Context) (*Collaboration, error)
- func (cc *CollaborationCreate) SaveX(ctx context.Context) *Collaboration
- func (cc *CollaborationCreate) SetApproved(b bool) *CollaborationCreate
- func (cc *CollaborationCreate) SetCollaborator(u *User) *CollaborationCreate
- func (cc *CollaborationCreate) SetCollaboratorID(id uuid.UUID) *CollaborationCreate
- func (cc *CollaborationCreate) SetCreateTime(t time.Time) *CollaborationCreate
- func (cc *CollaborationCreate) SetMemo(m *Memo) *CollaborationCreate
- func (cc *CollaborationCreate) SetMemoID(u uuid.UUID) *CollaborationCreate
- func (cc *CollaborationCreate) SetNillableApproved(b *bool) *CollaborationCreate
- func (cc *CollaborationCreate) SetNillableCreateTime(t *time.Time) *CollaborationCreate
- func (cc *CollaborationCreate) SetNillableUpdateTime(t *time.Time) *CollaborationCreate
- func (cc *CollaborationCreate) SetUpdateTime(t time.Time) *CollaborationCreate
- func (cc *CollaborationCreate) SetUserID(u uuid.UUID) *CollaborationCreate
- type CollaborationCreateBulk
- func (ccb *CollaborationCreateBulk) Exec(ctx context.Context) error
- func (c *CollaborationCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ccb *CollaborationCreateBulk) ExecX(ctx context.Context)
- func (ccb *CollaborationCreateBulk) OnConflict(opts ...sql.ConflictOption) *CollaborationUpsertBulk
- func (ccb *CollaborationCreateBulk) OnConflictColumns(columns ...string) *CollaborationUpsertBulk
- func (c *CollaborationCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ccb *CollaborationCreateBulk) Save(ctx context.Context) ([]*Collaboration, error)
- func (ccb *CollaborationCreateBulk) SaveX(ctx context.Context) []*Collaboration
- type CollaborationDelete
- func (cd *CollaborationDelete) Exec(ctx context.Context) (int, error)
- func (c *CollaborationDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cd *CollaborationDelete) ExecX(ctx context.Context) int
- func (c *CollaborationDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cd *CollaborationDelete) Where(ps ...predicate.Collaboration) *CollaborationDelete
- type CollaborationDeleteOne
- type CollaborationEdges
- type CollaborationGroupBy
- func (cgb *CollaborationGroupBy) Aggregate(fns ...AggregateFunc) *CollaborationGroupBy
- func (s *CollaborationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CollaborationGroupBy) BoolX(ctx context.Context) bool
- func (s *CollaborationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CollaborationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CollaborationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CollaborationGroupBy) Float64X(ctx context.Context) float64
- func (s *CollaborationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CollaborationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CollaborationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CollaborationGroupBy) IntX(ctx context.Context) int
- func (s *CollaborationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CollaborationGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CollaborationGroupBy) Scan(ctx context.Context, v any) error
- func (s *CollaborationGroupBy) ScanX(ctx context.Context, v any)
- func (s *CollaborationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CollaborationGroupBy) StringX(ctx context.Context) string
- func (s *CollaborationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CollaborationGroupBy) StringsX(ctx context.Context) []string
- type CollaborationMutation
- func (m *CollaborationMutation) AddField(name string, value ent.Value) error
- func (m *CollaborationMutation) AddedEdges() []string
- func (m *CollaborationMutation) AddedField(name string) (ent.Value, bool)
- func (m *CollaborationMutation) AddedFields() []string
- func (m *CollaborationMutation) AddedIDs(name string) []ent.Value
- func (m *CollaborationMutation) Approved() (r bool, exists bool)
- func (m *CollaborationMutation) ClearCollaborator()
- func (m *CollaborationMutation) ClearEdge(name string) error
- func (m *CollaborationMutation) ClearField(name string) error
- func (m *CollaborationMutation) ClearMemo()
- func (m *CollaborationMutation) ClearedEdges() []string
- func (m *CollaborationMutation) ClearedFields() []string
- func (m CollaborationMutation) Client() *Client
- func (m *CollaborationMutation) CollaboratorCleared() bool
- func (m *CollaborationMutation) CollaboratorID() (id uuid.UUID, exists bool)
- func (m *CollaborationMutation) CollaboratorIDs() (ids []uuid.UUID)
- func (m *CollaborationMutation) CreateTime() (r time.Time, exists bool)
- func (m *CollaborationMutation) EdgeCleared(name string) bool
- func (c *CollaborationMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *CollaborationMutation) Field(name string) (ent.Value, bool)
- func (m *CollaborationMutation) FieldCleared(name string) bool
- func (m *CollaborationMutation) Fields() []string
- func (m *CollaborationMutation) ID() (id int, exists bool)
- func (m *CollaborationMutation) IDs(ctx context.Context) ([]int, error)
- func (m *CollaborationMutation) MemoCleared() bool
- func (m *CollaborationMutation) MemoID() (r uuid.UUID, exists bool)
- func (m *CollaborationMutation) MemoIDs() (ids []uuid.UUID)
- func (m *CollaborationMutation) OldApproved(ctx context.Context) (v bool, err error)
- func (m *CollaborationMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *CollaborationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CollaborationMutation) OldMemoID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CollaborationMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *CollaborationMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CollaborationMutation) Op() Op
- func (c *CollaborationMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *CollaborationMutation) RemovedEdges() []string
- func (m *CollaborationMutation) RemovedIDs(name string) []ent.Value
- func (m *CollaborationMutation) ResetApproved()
- func (m *CollaborationMutation) ResetCollaborator()
- func (m *CollaborationMutation) ResetCreateTime()
- func (m *CollaborationMutation) ResetEdge(name string) error
- func (m *CollaborationMutation) ResetField(name string) error
- func (m *CollaborationMutation) ResetMemo()
- func (m *CollaborationMutation) ResetMemoID()
- func (m *CollaborationMutation) ResetUpdateTime()
- func (m *CollaborationMutation) ResetUserID()
- func (m *CollaborationMutation) SetApproved(b bool)
- func (m *CollaborationMutation) SetCollaboratorID(id uuid.UUID)
- func (m *CollaborationMutation) SetCreateTime(t time.Time)
- func (m *CollaborationMutation) SetField(name string, value ent.Value) error
- func (m *CollaborationMutation) SetMemoID(u uuid.UUID)
- func (m *CollaborationMutation) SetOp(op Op)
- func (m *CollaborationMutation) SetUpdateTime(t time.Time)
- func (m *CollaborationMutation) SetUserID(u uuid.UUID)
- func (m CollaborationMutation) Tx() (*Tx, error)
- func (m *CollaborationMutation) Type() string
- func (m *CollaborationMutation) UpdateTime() (r time.Time, exists bool)
- func (m *CollaborationMutation) UserID() (r uuid.UUID, exists bool)
- func (m *CollaborationMutation) Where(ps ...predicate.Collaboration)
- func (m *CollaborationMutation) WhereP(ps ...func(*sql.Selector))
- type CollaborationQuery
- func (cq *CollaborationQuery) Aggregate(fns ...AggregateFunc) *CollaborationSelect
- func (cq *CollaborationQuery) All(ctx context.Context) ([]*Collaboration, error)
- func (cq *CollaborationQuery) AllX(ctx context.Context) []*Collaboration
- func (cq *CollaborationQuery) Clone() *CollaborationQuery
- func (cq *CollaborationQuery) Count(ctx context.Context) (int, error)
- func (cq *CollaborationQuery) CountX(ctx context.Context) int
- func (c *CollaborationQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cq *CollaborationQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CollaborationQuery) ExistX(ctx context.Context) bool
- func (cq *CollaborationQuery) First(ctx context.Context) (*Collaboration, error)
- func (cq *CollaborationQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *CollaborationQuery) FirstIDX(ctx context.Context) int
- func (cq *CollaborationQuery) FirstX(ctx context.Context) *Collaboration
- func (cq *CollaborationQuery) GroupBy(field string, fields ...string) *CollaborationGroupBy
- func (cq *CollaborationQuery) IDs(ctx context.Context) (ids []int, err error)
- func (cq *CollaborationQuery) IDsX(ctx context.Context) []int
- func (cq *CollaborationQuery) Limit(limit int) *CollaborationQuery
- func (cq *CollaborationQuery) Offset(offset int) *CollaborationQuery
- func (cq *CollaborationQuery) Only(ctx context.Context) (*Collaboration, error)
- func (cq *CollaborationQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *CollaborationQuery) OnlyIDX(ctx context.Context) int
- func (cq *CollaborationQuery) OnlyX(ctx context.Context) *Collaboration
- func (cq *CollaborationQuery) Order(o ...collaboration.OrderOption) *CollaborationQuery
- func (cq *CollaborationQuery) QueryCollaborator() *UserQuery
- func (c *CollaborationQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cq *CollaborationQuery) QueryMemo() *MemoQuery
- func (cq *CollaborationQuery) Select(fields ...string) *CollaborationSelect
- func (cq *CollaborationQuery) Unique(unique bool) *CollaborationQuery
- func (cq *CollaborationQuery) Where(ps ...predicate.Collaboration) *CollaborationQuery
- func (cq *CollaborationQuery) WithCollaborator(opts ...func(*UserQuery)) *CollaborationQuery
- func (cq *CollaborationQuery) WithMemo(opts ...func(*MemoQuery)) *CollaborationQuery
- type CollaborationSelect
- func (cs *CollaborationSelect) Aggregate(fns ...AggregateFunc) *CollaborationSelect
- func (s *CollaborationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CollaborationSelect) BoolX(ctx context.Context) bool
- func (s *CollaborationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CollaborationSelect) BoolsX(ctx context.Context) []bool
- func (c CollaborationSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *CollaborationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CollaborationSelect) Float64X(ctx context.Context) float64
- func (s *CollaborationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CollaborationSelect) Float64sX(ctx context.Context) []float64
- func (s *CollaborationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CollaborationSelect) IntX(ctx context.Context) int
- func (s *CollaborationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CollaborationSelect) IntsX(ctx context.Context) []int
- func (c CollaborationSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cs *CollaborationSelect) Scan(ctx context.Context, v any) error
- func (s *CollaborationSelect) ScanX(ctx context.Context, v any)
- func (s *CollaborationSelect) String(ctx context.Context) (_ string, err error)
- func (s *CollaborationSelect) StringX(ctx context.Context) string
- func (s *CollaborationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CollaborationSelect) StringsX(ctx context.Context) []string
- type CollaborationUpdate
- func (cu *CollaborationUpdate) ClearCollaborator() *CollaborationUpdate
- func (cu *CollaborationUpdate) ClearMemo() *CollaborationUpdate
- func (cu *CollaborationUpdate) Exec(ctx context.Context) error
- func (c *CollaborationUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cu *CollaborationUpdate) ExecX(ctx context.Context)
- func (cu *CollaborationUpdate) Mutation() *CollaborationMutation
- func (c *CollaborationUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cu *CollaborationUpdate) Save(ctx context.Context) (int, error)
- func (cu *CollaborationUpdate) SaveX(ctx context.Context) int
- func (cu *CollaborationUpdate) SetApproved(b bool) *CollaborationUpdate
- func (cu *CollaborationUpdate) SetCollaborator(u *User) *CollaborationUpdate
- func (cu *CollaborationUpdate) SetCollaboratorID(id uuid.UUID) *CollaborationUpdate
- func (cu *CollaborationUpdate) SetMemo(m *Memo) *CollaborationUpdate
- func (cu *CollaborationUpdate) SetMemoID(u uuid.UUID) *CollaborationUpdate
- func (cu *CollaborationUpdate) SetNillableApproved(b *bool) *CollaborationUpdate
- func (cu *CollaborationUpdate) SetNillableMemoID(u *uuid.UUID) *CollaborationUpdate
- func (cu *CollaborationUpdate) SetNillableUpdateTime(t *time.Time) *CollaborationUpdate
- func (cu *CollaborationUpdate) SetNillableUserID(u *uuid.UUID) *CollaborationUpdate
- func (cu *CollaborationUpdate) SetUpdateTime(t time.Time) *CollaborationUpdate
- func (cu *CollaborationUpdate) SetUserID(u uuid.UUID) *CollaborationUpdate
- func (cu *CollaborationUpdate) Where(ps ...predicate.Collaboration) *CollaborationUpdate
- type CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) ClearCollaborator() *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) ClearMemo() *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) Exec(ctx context.Context) error
- func (c *CollaborationUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cuo *CollaborationUpdateOne) ExecX(ctx context.Context)
- func (cuo *CollaborationUpdateOne) Mutation() *CollaborationMutation
- func (c *CollaborationUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cuo *CollaborationUpdateOne) Save(ctx context.Context) (*Collaboration, error)
- func (cuo *CollaborationUpdateOne) SaveX(ctx context.Context) *Collaboration
- func (cuo *CollaborationUpdateOne) Select(field string, fields ...string) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) SetApproved(b bool) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) SetCollaborator(u *User) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) SetCollaboratorID(id uuid.UUID) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) SetMemo(m *Memo) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) SetMemoID(u uuid.UUID) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) SetNillableApproved(b *bool) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) SetNillableMemoID(u *uuid.UUID) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) SetNillableUpdateTime(t *time.Time) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) SetNillableUserID(u *uuid.UUID) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) SetUpdateTime(t time.Time) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) SetUserID(u uuid.UUID) *CollaborationUpdateOne
- func (cuo *CollaborationUpdateOne) Where(ps ...predicate.Collaboration) *CollaborationUpdateOne
- type CollaborationUpsert
- func (u *CollaborationUpsert) SetApproved(v bool) *CollaborationUpsert
- func (u *CollaborationUpsert) SetMemoID(v uuid.UUID) *CollaborationUpsert
- func (u *CollaborationUpsert) SetUpdateTime(v time.Time) *CollaborationUpsert
- func (u *CollaborationUpsert) SetUserID(v uuid.UUID) *CollaborationUpsert
- func (u *CollaborationUpsert) UpdateApproved() *CollaborationUpsert
- func (u *CollaborationUpsert) UpdateMemoID() *CollaborationUpsert
- func (u *CollaborationUpsert) UpdateUpdateTime() *CollaborationUpsert
- func (u *CollaborationUpsert) UpdateUserID() *CollaborationUpsert
- type CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) DoNothing() *CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) Exec(ctx context.Context) error
- func (u *CollaborationUpsertBulk) ExecX(ctx context.Context)
- func (u *CollaborationUpsertBulk) Ignore() *CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) SetApproved(v bool) *CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) SetMemoID(v uuid.UUID) *CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) SetUpdateTime(v time.Time) *CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) SetUserID(v uuid.UUID) *CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) Update(set func(*CollaborationUpsert)) *CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) UpdateApproved() *CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) UpdateMemoID() *CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) UpdateNewValues() *CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) UpdateUpdateTime() *CollaborationUpsertBulk
- func (u *CollaborationUpsertBulk) UpdateUserID() *CollaborationUpsertBulk
- type CollaborationUpsertOne
- func (u *CollaborationUpsertOne) DoNothing() *CollaborationUpsertOne
- func (u *CollaborationUpsertOne) Exec(ctx context.Context) error
- func (u *CollaborationUpsertOne) ExecX(ctx context.Context)
- func (u *CollaborationUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *CollaborationUpsertOne) IDX(ctx context.Context) int
- func (u *CollaborationUpsertOne) Ignore() *CollaborationUpsertOne
- func (u *CollaborationUpsertOne) SetApproved(v bool) *CollaborationUpsertOne
- func (u *CollaborationUpsertOne) SetMemoID(v uuid.UUID) *CollaborationUpsertOne
- func (u *CollaborationUpsertOne) SetUpdateTime(v time.Time) *CollaborationUpsertOne
- func (u *CollaborationUpsertOne) SetUserID(v uuid.UUID) *CollaborationUpsertOne
- func (u *CollaborationUpsertOne) Update(set func(*CollaborationUpsert)) *CollaborationUpsertOne
- func (u *CollaborationUpsertOne) UpdateApproved() *CollaborationUpsertOne
- func (u *CollaborationUpsertOne) UpdateMemoID() *CollaborationUpsertOne
- func (u *CollaborationUpsertOne) UpdateNewValues() *CollaborationUpsertOne
- func (u *CollaborationUpsertOne) UpdateUpdateTime() *CollaborationUpsertOne
- func (u *CollaborationUpsertOne) UpdateUserID() *CollaborationUpsertOne
- type Collaborations
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type Memo
- func (c *Memo) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *Memo) QueryCollaborations() *CollaborationQuery
- func (m *Memo) QueryCollaborators() *UserQuery
- func (c *Memo) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *Memo) QueryOwner() *UserQuery
- func (m *Memo) QuerySubscribers() *UserQuery
- func (m *Memo) QuerySubscriptions() *SubscriptionQuery
- func (m *Memo) QueryTags() *TagQuery
- func (m *Memo) String() string
- func (m *Memo) Unwrap() *Memo
- func (m *Memo) Update() *MemoUpdateOne
- func (m *Memo) Value(name string) (ent.Value, error)
- type MemoClient
- func (c *MemoClient) Create() *MemoCreate
- func (c *MemoClient) CreateBulk(builders ...*MemoCreate) *MemoCreateBulk
- func (c *MemoClient) Delete() *MemoDelete
- func (c *MemoClient) DeleteOne(m *Memo) *MemoDeleteOne
- func (c *MemoClient) DeleteOneID(id uuid.UUID) *MemoDeleteOne
- func (c *MemoClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *MemoClient) Get(ctx context.Context, id uuid.UUID) (*Memo, error)
- func (c *MemoClient) GetX(ctx context.Context, id uuid.UUID) *Memo
- func (c *MemoClient) Hooks() []Hook
- func (c *MemoClient) Intercept(interceptors ...Interceptor)
- func (c *MemoClient) Interceptors() []Interceptor
- func (c *MemoClient) MapCreateBulk(slice any, setFunc func(*MemoCreate, int)) *MemoCreateBulk
- func (c *MemoClient) Query() *MemoQuery
- func (c *MemoClient) QueryCollaborations(m *Memo) *CollaborationQuery
- func (c *MemoClient) QueryCollaborators(m *Memo) *UserQuery
- func (c *MemoClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *MemoClient) QueryOwner(m *Memo) *UserQuery
- func (c *MemoClient) QuerySubscribers(m *Memo) *UserQuery
- func (c *MemoClient) QuerySubscriptions(m *Memo) *SubscriptionQuery
- func (c *MemoClient) QueryTags(m *Memo) *TagQuery
- func (c *MemoClient) Update() *MemoUpdate
- func (c *MemoClient) UpdateOne(m *Memo) *MemoUpdateOne
- func (c *MemoClient) UpdateOneID(id uuid.UUID) *MemoUpdateOne
- func (c *MemoClient) Use(hooks ...Hook)
- type MemoCreate
- func (mc *MemoCreate) AddCollaborationIDs(ids ...int) *MemoCreate
- func (mc *MemoCreate) AddCollaborations(c ...*Collaboration) *MemoCreate
- func (mc *MemoCreate) AddCollaboratorIDs(ids ...uuid.UUID) *MemoCreate
- func (mc *MemoCreate) AddCollaborators(u ...*User) *MemoCreate
- func (mc *MemoCreate) AddSubscriberIDs(ids ...uuid.UUID) *MemoCreate
- func (mc *MemoCreate) AddSubscribers(u ...*User) *MemoCreate
- func (mc *MemoCreate) AddSubscriptionIDs(ids ...int) *MemoCreate
- func (mc *MemoCreate) AddSubscriptions(s ...*Subscription) *MemoCreate
- func (mc *MemoCreate) AddTagIDs(ids ...int) *MemoCreate
- func (mc *MemoCreate) AddTags(t ...*Tag) *MemoCreate
- func (mc *MemoCreate) Exec(ctx context.Context) error
- func (c *MemoCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mc *MemoCreate) ExecX(ctx context.Context)
- func (mc *MemoCreate) Mutation() *MemoMutation
- func (mc *MemoCreate) OnConflict(opts ...sql.ConflictOption) *MemoUpsertOne
- func (mc *MemoCreate) OnConflictColumns(columns ...string) *MemoUpsertOne
- func (c *MemoCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mc *MemoCreate) Save(ctx context.Context) (*Memo, error)
- func (mc *MemoCreate) SaveX(ctx context.Context) *Memo
- func (mc *MemoCreate) SetContent(s string) *MemoCreate
- func (mc *MemoCreate) SetCreateTime(t time.Time) *MemoCreate
- func (mc *MemoCreate) SetID(u uuid.UUID) *MemoCreate
- func (mc *MemoCreate) SetIsPublished(b bool) *MemoCreate
- func (mc *MemoCreate) SetNillableCreateTime(t *time.Time) *MemoCreate
- func (mc *MemoCreate) SetNillableID(u *uuid.UUID) *MemoCreate
- func (mc *MemoCreate) SetNillableIsPublished(b *bool) *MemoCreate
- func (mc *MemoCreate) SetNillableUpdateTime(t *time.Time) *MemoCreate
- func (mc *MemoCreate) SetNillableVersion(i *int) *MemoCreate
- func (mc *MemoCreate) SetOwner(u *User) *MemoCreate
- func (mc *MemoCreate) SetOwnerID(u uuid.UUID) *MemoCreate
- func (mc *MemoCreate) SetTitle(s string) *MemoCreate
- func (mc *MemoCreate) SetUpdateTime(t time.Time) *MemoCreate
- func (mc *MemoCreate) SetVersion(i int) *MemoCreate
- type MemoCreateBulk
- func (mcb *MemoCreateBulk) Exec(ctx context.Context) error
- func (c *MemoCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mcb *MemoCreateBulk) ExecX(ctx context.Context)
- func (mcb *MemoCreateBulk) OnConflict(opts ...sql.ConflictOption) *MemoUpsertBulk
- func (mcb *MemoCreateBulk) OnConflictColumns(columns ...string) *MemoUpsertBulk
- func (c *MemoCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mcb *MemoCreateBulk) Save(ctx context.Context) ([]*Memo, error)
- func (mcb *MemoCreateBulk) SaveX(ctx context.Context) []*Memo
- type MemoDelete
- func (md *MemoDelete) Exec(ctx context.Context) (int, error)
- func (c *MemoDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (md *MemoDelete) ExecX(ctx context.Context) int
- func (c *MemoDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (md *MemoDelete) Where(ps ...predicate.Memo) *MemoDelete
- type MemoDeleteOne
- type MemoEdges
- func (e MemoEdges) CollaborationsOrErr() ([]*Collaboration, error)
- func (e MemoEdges) CollaboratorsOrErr() ([]*User, error)
- func (e MemoEdges) OwnerOrErr() (*User, error)
- func (e MemoEdges) SubscribersOrErr() ([]*User, error)
- func (e MemoEdges) SubscriptionsOrErr() ([]*Subscription, error)
- func (e MemoEdges) TagsOrErr() ([]*Tag, error)
- type MemoGroupBy
- func (mgb *MemoGroupBy) Aggregate(fns ...AggregateFunc) *MemoGroupBy
- func (s *MemoGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MemoGroupBy) BoolX(ctx context.Context) bool
- func (s *MemoGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MemoGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MemoGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MemoGroupBy) Float64X(ctx context.Context) float64
- func (s *MemoGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MemoGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MemoGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MemoGroupBy) IntX(ctx context.Context) int
- func (s *MemoGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MemoGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MemoGroupBy) Scan(ctx context.Context, v any) error
- func (s *MemoGroupBy) ScanX(ctx context.Context, v any)
- func (s *MemoGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MemoGroupBy) StringX(ctx context.Context) string
- func (s *MemoGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MemoGroupBy) StringsX(ctx context.Context) []string
- type MemoMutation
- func (m *MemoMutation) AddCollaborationIDs(ids ...int)
- func (m *MemoMutation) AddCollaboratorIDs(ids ...uuid.UUID)
- func (m *MemoMutation) AddField(name string, value ent.Value) error
- func (m *MemoMutation) AddSubscriberIDs(ids ...uuid.UUID)
- func (m *MemoMutation) AddSubscriptionIDs(ids ...int)
- func (m *MemoMutation) AddTagIDs(ids ...int)
- func (m *MemoMutation) AddVersion(i int)
- func (m *MemoMutation) AddedEdges() []string
- func (m *MemoMutation) AddedField(name string) (ent.Value, bool)
- func (m *MemoMutation) AddedFields() []string
- func (m *MemoMutation) AddedIDs(name string) []ent.Value
- func (m *MemoMutation) AddedVersion() (r int, exists bool)
- func (m *MemoMutation) ClearCollaborations()
- func (m *MemoMutation) ClearCollaborators()
- func (m *MemoMutation) ClearEdge(name string) error
- func (m *MemoMutation) ClearField(name string) error
- func (m *MemoMutation) ClearOwner()
- func (m *MemoMutation) ClearSubscribers()
- func (m *MemoMutation) ClearSubscriptions()
- func (m *MemoMutation) ClearTags()
- func (m *MemoMutation) ClearedEdges() []string
- func (m *MemoMutation) ClearedFields() []string
- func (m MemoMutation) Client() *Client
- func (m *MemoMutation) CollaborationsCleared() bool
- func (m *MemoMutation) CollaborationsIDs() (ids []int)
- func (m *MemoMutation) CollaboratorsCleared() bool
- func (m *MemoMutation) CollaboratorsIDs() (ids []uuid.UUID)
- func (m *MemoMutation) Content() (r string, exists bool)
- func (m *MemoMutation) CreateTime() (r time.Time, exists bool)
- func (m *MemoMutation) EdgeCleared(name string) bool
- func (c *MemoMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *MemoMutation) Field(name string) (ent.Value, bool)
- func (m *MemoMutation) FieldCleared(name string) bool
- func (m *MemoMutation) Fields() []string
- func (m *MemoMutation) ID() (id uuid.UUID, exists bool)
- func (m *MemoMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *MemoMutation) IsPublished() (r bool, exists bool)
- func (m *MemoMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *MemoMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *MemoMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MemoMutation) OldIsPublished(ctx context.Context) (v bool, err error)
- func (m *MemoMutation) OldOwnerID(ctx context.Context) (v uuid.UUID, err error)
- func (m *MemoMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *MemoMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *MemoMutation) OldVersion(ctx context.Context) (v int, err error)
- func (m *MemoMutation) Op() Op
- func (m *MemoMutation) OwnerCleared() bool
- func (m *MemoMutation) OwnerID() (r uuid.UUID, exists bool)
- func (m *MemoMutation) OwnerIDs() (ids []uuid.UUID)
- func (c *MemoMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *MemoMutation) RemoveCollaborationIDs(ids ...int)
- func (m *MemoMutation) RemoveCollaboratorIDs(ids ...uuid.UUID)
- func (m *MemoMutation) RemoveSubscriberIDs(ids ...uuid.UUID)
- func (m *MemoMutation) RemoveSubscriptionIDs(ids ...int)
- func (m *MemoMutation) RemoveTagIDs(ids ...int)
- func (m *MemoMutation) RemovedCollaborationsIDs() (ids []int)
- func (m *MemoMutation) RemovedCollaboratorsIDs() (ids []uuid.UUID)
- func (m *MemoMutation) RemovedEdges() []string
- func (m *MemoMutation) RemovedIDs(name string) []ent.Value
- func (m *MemoMutation) RemovedSubscribersIDs() (ids []uuid.UUID)
- func (m *MemoMutation) RemovedSubscriptionsIDs() (ids []int)
- func (m *MemoMutation) RemovedTagsIDs() (ids []int)
- func (m *MemoMutation) ResetCollaborations()
- func (m *MemoMutation) ResetCollaborators()
- func (m *MemoMutation) ResetContent()
- func (m *MemoMutation) ResetCreateTime()
- func (m *MemoMutation) ResetEdge(name string) error
- func (m *MemoMutation) ResetField(name string) error
- func (m *MemoMutation) ResetIsPublished()
- func (m *MemoMutation) ResetOwner()
- func (m *MemoMutation) ResetOwnerID()
- func (m *MemoMutation) ResetSubscribers()
- func (m *MemoMutation) ResetSubscriptions()
- func (m *MemoMutation) ResetTags()
- func (m *MemoMutation) ResetTitle()
- func (m *MemoMutation) ResetUpdateTime()
- func (m *MemoMutation) ResetVersion()
- func (m *MemoMutation) SetContent(s string)
- func (m *MemoMutation) SetCreateTime(t time.Time)
- func (m *MemoMutation) SetField(name string, value ent.Value) error
- func (m *MemoMutation) SetID(id uuid.UUID)
- func (m *MemoMutation) SetIsPublished(b bool)
- func (m *MemoMutation) SetOp(op Op)
- func (m *MemoMutation) SetOwnerID(u uuid.UUID)
- func (m *MemoMutation) SetTitle(s string)
- func (m *MemoMutation) SetUpdateTime(t time.Time)
- func (m *MemoMutation) SetVersion(i int)
- func (m *MemoMutation) SubscribersCleared() bool
- func (m *MemoMutation) SubscribersIDs() (ids []uuid.UUID)
- func (m *MemoMutation) SubscriptionsCleared() bool
- func (m *MemoMutation) SubscriptionsIDs() (ids []int)
- func (m *MemoMutation) TagsCleared() bool
- func (m *MemoMutation) TagsIDs() (ids []int)
- func (m *MemoMutation) Title() (r string, exists bool)
- func (m MemoMutation) Tx() (*Tx, error)
- func (m *MemoMutation) Type() string
- func (m *MemoMutation) UpdateTime() (r time.Time, exists bool)
- func (m *MemoMutation) Version() (r int, exists bool)
- func (m *MemoMutation) Where(ps ...predicate.Memo)
- func (m *MemoMutation) WhereP(ps ...func(*sql.Selector))
- type MemoQuery
- func (mq *MemoQuery) Aggregate(fns ...AggregateFunc) *MemoSelect
- func (mq *MemoQuery) All(ctx context.Context) ([]*Memo, error)
- func (mq *MemoQuery) AllX(ctx context.Context) []*Memo
- func (mq *MemoQuery) Clone() *MemoQuery
- func (mq *MemoQuery) Count(ctx context.Context) (int, error)
- func (mq *MemoQuery) CountX(ctx context.Context) int
- func (c *MemoQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mq *MemoQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MemoQuery) ExistX(ctx context.Context) bool
- func (mq *MemoQuery) First(ctx context.Context) (*Memo, error)
- func (mq *MemoQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (mq *MemoQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (mq *MemoQuery) FirstX(ctx context.Context) *Memo
- func (mq *MemoQuery) GroupBy(field string, fields ...string) *MemoGroupBy
- func (mq *MemoQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (mq *MemoQuery) IDsX(ctx context.Context) []uuid.UUID
- func (mq *MemoQuery) Limit(limit int) *MemoQuery
- func (mq *MemoQuery) Offset(offset int) *MemoQuery
- func (mq *MemoQuery) Only(ctx context.Context) (*Memo, error)
- func (mq *MemoQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (mq *MemoQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (mq *MemoQuery) OnlyX(ctx context.Context) *Memo
- func (mq *MemoQuery) Order(o ...memo.OrderOption) *MemoQuery
- func (mq *MemoQuery) QueryCollaborations() *CollaborationQuery
- func (mq *MemoQuery) QueryCollaborators() *UserQuery
- func (c *MemoQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mq *MemoQuery) QueryOwner() *UserQuery
- func (mq *MemoQuery) QuerySubscribers() *UserQuery
- func (mq *MemoQuery) QuerySubscriptions() *SubscriptionQuery
- func (mq *MemoQuery) QueryTags() *TagQuery
- func (mq *MemoQuery) Select(fields ...string) *MemoSelect
- func (mq *MemoQuery) Unique(unique bool) *MemoQuery
- func (mq *MemoQuery) Where(ps ...predicate.Memo) *MemoQuery
- func (mq *MemoQuery) WithCollaborations(opts ...func(*CollaborationQuery)) *MemoQuery
- func (mq *MemoQuery) WithCollaborators(opts ...func(*UserQuery)) *MemoQuery
- func (mq *MemoQuery) WithOwner(opts ...func(*UserQuery)) *MemoQuery
- func (mq *MemoQuery) WithSubscribers(opts ...func(*UserQuery)) *MemoQuery
- func (mq *MemoQuery) WithSubscriptions(opts ...func(*SubscriptionQuery)) *MemoQuery
- func (mq *MemoQuery) WithTags(opts ...func(*TagQuery)) *MemoQuery
- type MemoSelect
- func (ms *MemoSelect) Aggregate(fns ...AggregateFunc) *MemoSelect
- func (s *MemoSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MemoSelect) BoolX(ctx context.Context) bool
- func (s *MemoSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MemoSelect) BoolsX(ctx context.Context) []bool
- func (c MemoSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *MemoSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MemoSelect) Float64X(ctx context.Context) float64
- func (s *MemoSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MemoSelect) Float64sX(ctx context.Context) []float64
- func (s *MemoSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MemoSelect) IntX(ctx context.Context) int
- func (s *MemoSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MemoSelect) IntsX(ctx context.Context) []int
- func (c MemoSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ms *MemoSelect) Scan(ctx context.Context, v any) error
- func (s *MemoSelect) ScanX(ctx context.Context, v any)
- func (s *MemoSelect) String(ctx context.Context) (_ string, err error)
- func (s *MemoSelect) StringX(ctx context.Context) string
- func (s *MemoSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MemoSelect) StringsX(ctx context.Context) []string
- type MemoUpdate
- func (mu *MemoUpdate) AddCollaborationIDs(ids ...int) *MemoUpdate
- func (mu *MemoUpdate) AddCollaborations(c ...*Collaboration) *MemoUpdate
- func (mu *MemoUpdate) AddCollaboratorIDs(ids ...uuid.UUID) *MemoUpdate
- func (mu *MemoUpdate) AddCollaborators(u ...*User) *MemoUpdate
- func (mu *MemoUpdate) AddSubscriberIDs(ids ...uuid.UUID) *MemoUpdate
- func (mu *MemoUpdate) AddSubscribers(u ...*User) *MemoUpdate
- func (mu *MemoUpdate) AddSubscriptionIDs(ids ...int) *MemoUpdate
- func (mu *MemoUpdate) AddSubscriptions(s ...*Subscription) *MemoUpdate
- func (mu *MemoUpdate) AddTagIDs(ids ...int) *MemoUpdate
- func (mu *MemoUpdate) AddTags(t ...*Tag) *MemoUpdate
- func (mu *MemoUpdate) AddVersion(i int) *MemoUpdate
- func (mu *MemoUpdate) ClearCollaborations() *MemoUpdate
- func (mu *MemoUpdate) ClearCollaborators() *MemoUpdate
- func (mu *MemoUpdate) ClearOwner() *MemoUpdate
- func (mu *MemoUpdate) ClearSubscribers() *MemoUpdate
- func (mu *MemoUpdate) ClearSubscriptions() *MemoUpdate
- func (mu *MemoUpdate) ClearTags() *MemoUpdate
- func (mu *MemoUpdate) Exec(ctx context.Context) error
- func (c *MemoUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mu *MemoUpdate) ExecX(ctx context.Context)
- func (mu *MemoUpdate) Mutation() *MemoMutation
- func (c *MemoUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mu *MemoUpdate) RemoveCollaborationIDs(ids ...int) *MemoUpdate
- func (mu *MemoUpdate) RemoveCollaborations(c ...*Collaboration) *MemoUpdate
- func (mu *MemoUpdate) RemoveCollaboratorIDs(ids ...uuid.UUID) *MemoUpdate
- func (mu *MemoUpdate) RemoveCollaborators(u ...*User) *MemoUpdate
- func (mu *MemoUpdate) RemoveSubscriberIDs(ids ...uuid.UUID) *MemoUpdate
- func (mu *MemoUpdate) RemoveSubscribers(u ...*User) *MemoUpdate
- func (mu *MemoUpdate) RemoveSubscriptionIDs(ids ...int) *MemoUpdate
- func (mu *MemoUpdate) RemoveSubscriptions(s ...*Subscription) *MemoUpdate
- func (mu *MemoUpdate) RemoveTagIDs(ids ...int) *MemoUpdate
- func (mu *MemoUpdate) RemoveTags(t ...*Tag) *MemoUpdate
- func (mu *MemoUpdate) Save(ctx context.Context) (int, error)
- func (mu *MemoUpdate) SaveX(ctx context.Context) int
- func (mu *MemoUpdate) SetContent(s string) *MemoUpdate
- func (mu *MemoUpdate) SetIsPublished(b bool) *MemoUpdate
- func (mu *MemoUpdate) SetNillableContent(s *string) *MemoUpdate
- func (mu *MemoUpdate) SetNillableIsPublished(b *bool) *MemoUpdate
- func (mu *MemoUpdate) SetNillableOwnerID(u *uuid.UUID) *MemoUpdate
- func (mu *MemoUpdate) SetNillableTitle(s *string) *MemoUpdate
- func (mu *MemoUpdate) SetNillableUpdateTime(t *time.Time) *MemoUpdate
- func (mu *MemoUpdate) SetNillableVersion(i *int) *MemoUpdate
- func (mu *MemoUpdate) SetOwner(u *User) *MemoUpdate
- func (mu *MemoUpdate) SetOwnerID(u uuid.UUID) *MemoUpdate
- func (mu *MemoUpdate) SetTitle(s string) *MemoUpdate
- func (mu *MemoUpdate) SetUpdateTime(t time.Time) *MemoUpdate
- func (mu *MemoUpdate) SetVersion(i int) *MemoUpdate
- func (mu *MemoUpdate) Where(ps ...predicate.Memo) *MemoUpdate
- type MemoUpdateOne
- func (muo *MemoUpdateOne) AddCollaborationIDs(ids ...int) *MemoUpdateOne
- func (muo *MemoUpdateOne) AddCollaborations(c ...*Collaboration) *MemoUpdateOne
- func (muo *MemoUpdateOne) AddCollaboratorIDs(ids ...uuid.UUID) *MemoUpdateOne
- func (muo *MemoUpdateOne) AddCollaborators(u ...*User) *MemoUpdateOne
- func (muo *MemoUpdateOne) AddSubscriberIDs(ids ...uuid.UUID) *MemoUpdateOne
- func (muo *MemoUpdateOne) AddSubscribers(u ...*User) *MemoUpdateOne
- func (muo *MemoUpdateOne) AddSubscriptionIDs(ids ...int) *MemoUpdateOne
- func (muo *MemoUpdateOne) AddSubscriptions(s ...*Subscription) *MemoUpdateOne
- func (muo *MemoUpdateOne) AddTagIDs(ids ...int) *MemoUpdateOne
- func (muo *MemoUpdateOne) AddTags(t ...*Tag) *MemoUpdateOne
- func (muo *MemoUpdateOne) AddVersion(i int) *MemoUpdateOne
- func (muo *MemoUpdateOne) ClearCollaborations() *MemoUpdateOne
- func (muo *MemoUpdateOne) ClearCollaborators() *MemoUpdateOne
- func (muo *MemoUpdateOne) ClearOwner() *MemoUpdateOne
- func (muo *MemoUpdateOne) ClearSubscribers() *MemoUpdateOne
- func (muo *MemoUpdateOne) ClearSubscriptions() *MemoUpdateOne
- func (muo *MemoUpdateOne) ClearTags() *MemoUpdateOne
- func (muo *MemoUpdateOne) Exec(ctx context.Context) error
- func (c *MemoUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (muo *MemoUpdateOne) ExecX(ctx context.Context)
- func (muo *MemoUpdateOne) Mutation() *MemoMutation
- func (c *MemoUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (muo *MemoUpdateOne) RemoveCollaborationIDs(ids ...int) *MemoUpdateOne
- func (muo *MemoUpdateOne) RemoveCollaborations(c ...*Collaboration) *MemoUpdateOne
- func (muo *MemoUpdateOne) RemoveCollaboratorIDs(ids ...uuid.UUID) *MemoUpdateOne
- func (muo *MemoUpdateOne) RemoveCollaborators(u ...*User) *MemoUpdateOne
- func (muo *MemoUpdateOne) RemoveSubscriberIDs(ids ...uuid.UUID) *MemoUpdateOne
- func (muo *MemoUpdateOne) RemoveSubscribers(u ...*User) *MemoUpdateOne
- func (muo *MemoUpdateOne) RemoveSubscriptionIDs(ids ...int) *MemoUpdateOne
- func (muo *MemoUpdateOne) RemoveSubscriptions(s ...*Subscription) *MemoUpdateOne
- func (muo *MemoUpdateOne) RemoveTagIDs(ids ...int) *MemoUpdateOne
- func (muo *MemoUpdateOne) RemoveTags(t ...*Tag) *MemoUpdateOne
- func (muo *MemoUpdateOne) Save(ctx context.Context) (*Memo, error)
- func (muo *MemoUpdateOne) SaveX(ctx context.Context) *Memo
- func (muo *MemoUpdateOne) Select(field string, fields ...string) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetContent(s string) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetIsPublished(b bool) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetNillableContent(s *string) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetNillableIsPublished(b *bool) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetNillableOwnerID(u *uuid.UUID) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetNillableTitle(s *string) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetNillableUpdateTime(t *time.Time) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetNillableVersion(i *int) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetOwner(u *User) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetOwnerID(u uuid.UUID) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetTitle(s string) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetUpdateTime(t time.Time) *MemoUpdateOne
- func (muo *MemoUpdateOne) SetVersion(i int) *MemoUpdateOne
- func (muo *MemoUpdateOne) Where(ps ...predicate.Memo) *MemoUpdateOne
- type MemoUpsert
- func (u *MemoUpsert) AddVersion(v int) *MemoUpsert
- func (u *MemoUpsert) SetContent(v string) *MemoUpsert
- func (u *MemoUpsert) SetIsPublished(v bool) *MemoUpsert
- func (u *MemoUpsert) SetOwnerID(v uuid.UUID) *MemoUpsert
- func (u *MemoUpsert) SetTitle(v string) *MemoUpsert
- func (u *MemoUpsert) SetUpdateTime(v time.Time) *MemoUpsert
- func (u *MemoUpsert) SetVersion(v int) *MemoUpsert
- func (u *MemoUpsert) UpdateContent() *MemoUpsert
- func (u *MemoUpsert) UpdateIsPublished() *MemoUpsert
- func (u *MemoUpsert) UpdateOwnerID() *MemoUpsert
- func (u *MemoUpsert) UpdateTitle() *MemoUpsert
- func (u *MemoUpsert) UpdateUpdateTime() *MemoUpsert
- func (u *MemoUpsert) UpdateVersion() *MemoUpsert
- type MemoUpsertBulk
- func (u *MemoUpsertBulk) AddVersion(v int) *MemoUpsertBulk
- func (u *MemoUpsertBulk) DoNothing() *MemoUpsertBulk
- func (u *MemoUpsertBulk) Exec(ctx context.Context) error
- func (u *MemoUpsertBulk) ExecX(ctx context.Context)
- func (u *MemoUpsertBulk) Ignore() *MemoUpsertBulk
- func (u *MemoUpsertBulk) SetContent(v string) *MemoUpsertBulk
- func (u *MemoUpsertBulk) SetIsPublished(v bool) *MemoUpsertBulk
- func (u *MemoUpsertBulk) SetOwnerID(v uuid.UUID) *MemoUpsertBulk
- func (u *MemoUpsertBulk) SetTitle(v string) *MemoUpsertBulk
- func (u *MemoUpsertBulk) SetUpdateTime(v time.Time) *MemoUpsertBulk
- func (u *MemoUpsertBulk) SetVersion(v int) *MemoUpsertBulk
- func (u *MemoUpsertBulk) Update(set func(*MemoUpsert)) *MemoUpsertBulk
- func (u *MemoUpsertBulk) UpdateContent() *MemoUpsertBulk
- func (u *MemoUpsertBulk) UpdateIsPublished() *MemoUpsertBulk
- func (u *MemoUpsertBulk) UpdateNewValues() *MemoUpsertBulk
- func (u *MemoUpsertBulk) UpdateOwnerID() *MemoUpsertBulk
- func (u *MemoUpsertBulk) UpdateTitle() *MemoUpsertBulk
- func (u *MemoUpsertBulk) UpdateUpdateTime() *MemoUpsertBulk
- func (u *MemoUpsertBulk) UpdateVersion() *MemoUpsertBulk
- type MemoUpsertOne
- func (u *MemoUpsertOne) AddVersion(v int) *MemoUpsertOne
- func (u *MemoUpsertOne) DoNothing() *MemoUpsertOne
- func (u *MemoUpsertOne) Exec(ctx context.Context) error
- func (u *MemoUpsertOne) ExecX(ctx context.Context)
- func (u *MemoUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *MemoUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *MemoUpsertOne) Ignore() *MemoUpsertOne
- func (u *MemoUpsertOne) SetContent(v string) *MemoUpsertOne
- func (u *MemoUpsertOne) SetIsPublished(v bool) *MemoUpsertOne
- func (u *MemoUpsertOne) SetOwnerID(v uuid.UUID) *MemoUpsertOne
- func (u *MemoUpsertOne) SetTitle(v string) *MemoUpsertOne
- func (u *MemoUpsertOne) SetUpdateTime(v time.Time) *MemoUpsertOne
- func (u *MemoUpsertOne) SetVersion(v int) *MemoUpsertOne
- func (u *MemoUpsertOne) Update(set func(*MemoUpsert)) *MemoUpsertOne
- func (u *MemoUpsertOne) UpdateContent() *MemoUpsertOne
- func (u *MemoUpsertOne) UpdateIsPublished() *MemoUpsertOne
- func (u *MemoUpsertOne) UpdateNewValues() *MemoUpsertOne
- func (u *MemoUpsertOne) UpdateOwnerID() *MemoUpsertOne
- func (u *MemoUpsertOne) UpdateTitle() *MemoUpsertOne
- func (u *MemoUpsertOne) UpdateUpdateTime() *MemoUpsertOne
- func (u *MemoUpsertOne) UpdateVersion() *MemoUpsertOne
- type Memos
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Subscription
- func (c *Subscription) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Subscription) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (s *Subscription) QueryMemo() *MemoQuery
- func (s *Subscription) QuerySubscriber() *UserQuery
- func (s *Subscription) String() string
- func (s *Subscription) Unwrap() *Subscription
- func (s *Subscription) Update() *SubscriptionUpdateOne
- func (s *Subscription) Value(name string) (ent.Value, error)
- 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 int) *SubscriptionDeleteOne
- func (c *SubscriptionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *SubscriptionClient) Get(ctx context.Context, id int) (*Subscription, error)
- func (c *SubscriptionClient) GetX(ctx context.Context, id int) *Subscription
- func (c *SubscriptionClient) Hooks() []Hook
- func (c *SubscriptionClient) Intercept(interceptors ...Interceptor)
- func (c *SubscriptionClient) Interceptors() []Interceptor
- func (c *SubscriptionClient) MapCreateBulk(slice any, setFunc func(*SubscriptionCreate, int)) *SubscriptionCreateBulk
- func (c *SubscriptionClient) Query() *SubscriptionQuery
- func (c *SubscriptionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *SubscriptionClient) QueryMemo(s *Subscription) *MemoQuery
- func (c *SubscriptionClient) QuerySubscriber(s *Subscription) *UserQuery
- func (c *SubscriptionClient) Update() *SubscriptionUpdate
- func (c *SubscriptionClient) UpdateOne(s *Subscription) *SubscriptionUpdateOne
- func (c *SubscriptionClient) UpdateOneID(id int) *SubscriptionUpdateOne
- func (c *SubscriptionClient) Use(hooks ...Hook)
- type SubscriptionCreate
- func (sc *SubscriptionCreate) Exec(ctx context.Context) error
- func (c *SubscriptionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, 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 (c *SubscriptionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sc *SubscriptionCreate) Save(ctx context.Context) (*Subscription, error)
- func (sc *SubscriptionCreate) SaveX(ctx context.Context) *Subscription
- func (sc *SubscriptionCreate) SetCreateTime(t time.Time) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetMemo(m *Memo) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetMemoID(u uuid.UUID) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetNillableCreateTime(t *time.Time) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetSubscriber(u *User) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetSubscriberID(id uuid.UUID) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetUserID(u uuid.UUID) *SubscriptionCreate
- type SubscriptionCreateBulk
- func (scb *SubscriptionCreateBulk) Exec(ctx context.Context) error
- func (c *SubscriptionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (scb *SubscriptionCreateBulk) ExecX(ctx context.Context)
- func (scb *SubscriptionCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubscriptionUpsertBulk
- func (scb *SubscriptionCreateBulk) OnConflictColumns(columns ...string) *SubscriptionUpsertBulk
- func (c *SubscriptionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (scb *SubscriptionCreateBulk) Save(ctx context.Context) ([]*Subscription, error)
- func (scb *SubscriptionCreateBulk) SaveX(ctx context.Context) []*Subscription
- type SubscriptionDelete
- func (sd *SubscriptionDelete) Exec(ctx context.Context) (int, error)
- func (c *SubscriptionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sd *SubscriptionDelete) ExecX(ctx context.Context) int
- func (c *SubscriptionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sd *SubscriptionDelete) Where(ps ...predicate.Subscription) *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 any) error
- func (s *SubscriptionGroupBy) ScanX(ctx context.Context, v any)
- 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) AddField(name string, value ent.Value) error
- 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) ClearEdge(name string) error
- func (m *SubscriptionMutation) ClearField(name string) error
- func (m *SubscriptionMutation) ClearMemo()
- func (m *SubscriptionMutation) ClearSubscriber()
- func (m *SubscriptionMutation) ClearedEdges() []string
- func (m *SubscriptionMutation) ClearedFields() []string
- func (m SubscriptionMutation) Client() *Client
- func (m *SubscriptionMutation) CreateTime() (r time.Time, exists bool)
- func (m *SubscriptionMutation) EdgeCleared(name string) bool
- func (c *SubscriptionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 int, exists bool)
- func (m *SubscriptionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SubscriptionMutation) MemoCleared() bool
- func (m *SubscriptionMutation) MemoID() (r uuid.UUID, exists bool)
- func (m *SubscriptionMutation) MemoIDs() (ids []uuid.UUID)
- func (m *SubscriptionMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SubscriptionMutation) OldMemoID(ctx context.Context) (v uuid.UUID, err error)
- func (m *SubscriptionMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *SubscriptionMutation) Op() Op
- func (c *SubscriptionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *SubscriptionMutation) RemovedEdges() []string
- func (m *SubscriptionMutation) RemovedIDs(name string) []ent.Value
- func (m *SubscriptionMutation) ResetCreateTime()
- func (m *SubscriptionMutation) ResetEdge(name string) error
- func (m *SubscriptionMutation) ResetField(name string) error
- func (m *SubscriptionMutation) ResetMemo()
- func (m *SubscriptionMutation) ResetMemoID()
- func (m *SubscriptionMutation) ResetSubscriber()
- func (m *SubscriptionMutation) ResetUserID()
- func (m *SubscriptionMutation) SetCreateTime(t time.Time)
- func (m *SubscriptionMutation) SetField(name string, value ent.Value) error
- func (m *SubscriptionMutation) SetMemoID(u uuid.UUID)
- func (m *SubscriptionMutation) SetOp(op Op)
- func (m *SubscriptionMutation) SetSubscriberID(id uuid.UUID)
- func (m *SubscriptionMutation) SetUserID(u uuid.UUID)
- func (m *SubscriptionMutation) SubscriberCleared() bool
- func (m *SubscriptionMutation) SubscriberID() (id uuid.UUID, exists bool)
- func (m *SubscriptionMutation) SubscriberIDs() (ids []uuid.UUID)
- func (m SubscriptionMutation) Tx() (*Tx, error)
- func (m *SubscriptionMutation) Type() string
- func (m *SubscriptionMutation) UserID() (r uuid.UUID, exists bool)
- func (m *SubscriptionMutation) Where(ps ...predicate.Subscription)
- func (m *SubscriptionMutation) WhereP(ps ...func(*sql.Selector))
- type SubscriptionQuery
- func (sq *SubscriptionQuery) Aggregate(fns ...AggregateFunc) *SubscriptionSelect
- 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 (c *SubscriptionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 int, err error)
- func (sq *SubscriptionQuery) FirstIDX(ctx context.Context) int
- func (sq *SubscriptionQuery) FirstX(ctx context.Context) *Subscription
- func (sq *SubscriptionQuery) GroupBy(field string, fields ...string) *SubscriptionGroupBy
- func (sq *SubscriptionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (sq *SubscriptionQuery) IDsX(ctx context.Context) []int
- func (sq *SubscriptionQuery) Limit(limit int) *SubscriptionQuery
- func (sq *SubscriptionQuery) Offset(offset int) *SubscriptionQuery
- func (sq *SubscriptionQuery) Only(ctx context.Context) (*Subscription, error)
- func (sq *SubscriptionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *SubscriptionQuery) OnlyIDX(ctx context.Context) int
- func (sq *SubscriptionQuery) OnlyX(ctx context.Context) *Subscription
- func (sq *SubscriptionQuery) Order(o ...subscription.OrderOption) *SubscriptionQuery
- func (c *SubscriptionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sq *SubscriptionQuery) QueryMemo() *MemoQuery
- func (sq *SubscriptionQuery) QuerySubscriber() *UserQuery
- 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) WithMemo(opts ...func(*MemoQuery)) *SubscriptionQuery
- func (sq *SubscriptionQuery) WithSubscriber(opts ...func(*UserQuery)) *SubscriptionQuery
- type SubscriptionSelect
- func (ss *SubscriptionSelect) Aggregate(fns ...AggregateFunc) *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 (c SubscriptionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 (c SubscriptionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ss *SubscriptionSelect) Scan(ctx context.Context, v any) error
- func (s *SubscriptionSelect) ScanX(ctx context.Context, v any)
- 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) ClearMemo() *SubscriptionUpdate
- func (su *SubscriptionUpdate) ClearSubscriber() *SubscriptionUpdate
- func (su *SubscriptionUpdate) Exec(ctx context.Context) error
- func (c *SubscriptionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (su *SubscriptionUpdate) ExecX(ctx context.Context)
- func (su *SubscriptionUpdate) Mutation() *SubscriptionMutation
- func (c *SubscriptionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (su *SubscriptionUpdate) Save(ctx context.Context) (int, error)
- func (su *SubscriptionUpdate) SaveX(ctx context.Context) int
- func (su *SubscriptionUpdate) SetMemo(m *Memo) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetMemoID(u uuid.UUID) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetNillableMemoID(u *uuid.UUID) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetNillableUserID(u *uuid.UUID) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetSubscriber(u *User) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetSubscriberID(id uuid.UUID) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetUserID(u uuid.UUID) *SubscriptionUpdate
- func (su *SubscriptionUpdate) Where(ps ...predicate.Subscription) *SubscriptionUpdate
- type SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) ClearMemo() *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) ClearSubscriber() *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) Exec(ctx context.Context) error
- func (c *SubscriptionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (suo *SubscriptionUpdateOne) ExecX(ctx context.Context)
- func (suo *SubscriptionUpdateOne) Mutation() *SubscriptionMutation
- func (c *SubscriptionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- 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) SetMemo(m *Memo) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetMemoID(u uuid.UUID) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetNillableMemoID(u *uuid.UUID) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetNillableUserID(u *uuid.UUID) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetSubscriber(u *User) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetSubscriberID(id uuid.UUID) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetUserID(u uuid.UUID) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) Where(ps ...predicate.Subscription) *SubscriptionUpdateOne
- type 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) SetMemoID(v uuid.UUID) *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) SetUserID(v uuid.UUID) *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) Update(set func(*SubscriptionUpsert)) *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) UpdateMemoID() *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) UpdateNewValues() *SubscriptionUpsertBulk
- func (u *SubscriptionUpsertBulk) UpdateUserID() *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 int, err error)
- func (u *SubscriptionUpsertOne) IDX(ctx context.Context) int
- func (u *SubscriptionUpsertOne) Ignore() *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) SetMemoID(v uuid.UUID) *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) SetUserID(v uuid.UUID) *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) Update(set func(*SubscriptionUpsert)) *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) UpdateMemoID() *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) UpdateNewValues() *SubscriptionUpsertOne
- func (u *SubscriptionUpsertOne) UpdateUserID() *SubscriptionUpsertOne
- type Subscriptions
- type Tag
- func (c *Tag) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Tag) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (t *Tag) QueryMemos() *MemoQuery
- func (t *Tag) String() string
- func (t *Tag) Unwrap() *Tag
- func (t *Tag) Update() *TagUpdateOne
- func (t *Tag) Value(name string) (ent.Value, error)
- 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 int) *TagDeleteOne
- func (c *TagClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *TagClient) Get(ctx context.Context, id int) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id int) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Intercept(interceptors ...Interceptor)
- func (c *TagClient) Interceptors() []Interceptor
- func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *TagClient) QueryMemos(t *Tag) *MemoQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id int) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagCreate
- func (tc *TagCreate) AddMemoIDs(ids ...uuid.UUID) *TagCreate
- func (tc *TagCreate) AddMemos(m ...*Memo) *TagCreate
- func (tc *TagCreate) Exec(ctx context.Context) error
- func (c *TagCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, 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 (c *TagCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tc *TagCreate) Save(ctx context.Context) (*Tag, error)
- func (tc *TagCreate) SaveX(ctx context.Context) *Tag
- func (tc *TagCreate) SetCreateTime(t time.Time) *TagCreate
- func (tc *TagCreate) SetName(s string) *TagCreate
- func (tc *TagCreate) SetNillableCreateTime(t *time.Time) *TagCreate
- func (tc *TagCreate) SetNillableUpdateTime(t *time.Time) *TagCreate
- func (tc *TagCreate) SetUpdateTime(t time.Time) *TagCreate
- type TagCreateBulk
- func (tcb *TagCreateBulk) Exec(ctx context.Context) error
- func (c *TagCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tcb *TagCreateBulk) ExecX(ctx context.Context)
- func (tcb *TagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TagUpsertBulk
- func (tcb *TagCreateBulk) OnConflictColumns(columns ...string) *TagUpsertBulk
- func (c *TagCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tcb *TagCreateBulk) Save(ctx context.Context) ([]*Tag, error)
- func (tcb *TagCreateBulk) SaveX(ctx context.Context) []*Tag
- type TagDelete
- func (td *TagDelete) Exec(ctx context.Context) (int, error)
- func (c *TagDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (td *TagDelete) ExecX(ctx context.Context) int
- func (c *TagDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (td *TagDelete) Where(ps ...predicate.Tag) *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 any) error
- func (s *TagGroupBy) ScanX(ctx context.Context, v any)
- 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) AddField(name string, value ent.Value) error
- func (m *TagMutation) AddMemoIDs(ids ...uuid.UUID)
- 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) ClearEdge(name string) error
- func (m *TagMutation) ClearField(name string) error
- func (m *TagMutation) ClearMemos()
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) CreateTime() (r time.Time, exists bool)
- func (m *TagMutation) EdgeCleared(name string) bool
- func (c *TagMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 int, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TagMutation) MemosCleared() bool
- func (m *TagMutation) MemosIDs() (ids []uuid.UUID)
- func (m *TagMutation) Name() (r string, exists bool)
- func (m *TagMutation) OldCreateTime(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) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *TagMutation) Op() Op
- func (c *TagMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *TagMutation) RemoveMemoIDs(ids ...uuid.UUID)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) RemovedMemosIDs() (ids []uuid.UUID)
- func (m *TagMutation) ResetCreateTime()
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetMemos()
- func (m *TagMutation) ResetName()
- func (m *TagMutation) ResetUpdateTime()
- func (m *TagMutation) SetCreateTime(t time.Time)
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetName(s string)
- func (m *TagMutation) SetOp(op Op)
- func (m *TagMutation) SetUpdateTime(t time.Time)
- func (m TagMutation) Tx() (*Tx, error)
- func (m *TagMutation) Type() string
- func (m *TagMutation) UpdateTime() (r time.Time, exists bool)
- func (m *TagMutation) Where(ps ...predicate.Tag)
- func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
- type TagQuery
- func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
- 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 (c *TagQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 int, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) int
- func (tq *TagQuery) FirstX(ctx context.Context) *Tag
- func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
- func (tq *TagQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tq *TagQuery) IDsX(ctx context.Context) []int
- func (tq *TagQuery) Limit(limit int) *TagQuery
- func (tq *TagQuery) Offset(offset int) *TagQuery
- func (tq *TagQuery) Only(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) int
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
- func (c *TagQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tq *TagQuery) QueryMemos() *MemoQuery
- 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) WithMemos(opts ...func(*MemoQuery)) *TagQuery
- type TagSelect
- func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *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 (c TagSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 (c TagSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ts *TagSelect) Scan(ctx context.Context, v any) error
- func (s *TagSelect) ScanX(ctx context.Context, v any)
- 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) AddMemoIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) AddMemos(m ...*Memo) *TagUpdate
- func (tu *TagUpdate) ClearMemos() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (c *TagUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Mutation() *TagMutation
- func (c *TagUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tu *TagUpdate) RemoveMemoIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) RemoveMemos(m ...*Memo) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (tu *TagUpdate) SetName(s string) *TagUpdate
- func (tu *TagUpdate) SetNillableName(s *string) *TagUpdate
- func (tu *TagUpdate) SetUpdateTime(t time.Time) *TagUpdate
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddMemoIDs(ids ...uuid.UUID) *TagUpdateOne
- func (tuo *TagUpdateOne) AddMemos(m ...*Memo) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearMemos() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (c *TagUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (c *TagUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tuo *TagUpdateOne) RemoveMemoIDs(ids ...uuid.UUID) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveMemos(m ...*Memo) *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
- func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillableName(s *string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetUpdateTime(t time.Time) *TagUpdateOne
- func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *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) SetName(v string) *TagUpsertBulk
- func (u *TagUpsertBulk) SetUpdateTime(v time.Time) *TagUpsertBulk
- func (u *TagUpsertBulk) Update(set func(*TagUpsert)) *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateName() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateNewValues() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateUpdateTime() *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 int, err error)
- func (u *TagUpsertOne) IDX(ctx context.Context) int
- func (u *TagUpsertOne) Ignore() *TagUpsertOne
- func (u *TagUpsertOne) SetName(v string) *TagUpsertOne
- func (u *TagUpsertOne) SetUpdateTime(v time.Time) *TagUpsertOne
- func (u *TagUpsertOne) Update(set func(*TagUpsert)) *TagUpsertOne
- func (u *TagUpsertOne) UpdateName() *TagUpsertOne
- func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne
- func (u *TagUpsertOne) UpdateUpdateTime() *TagUpsertOne
- type Tags
- type TraverseFunc
- type Traverser
- type Tx
- func (tx *Tx) Client() *Client
- func (tx *Tx) Commit() error
- func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tx *Tx) OnCommit(f CommitHook)
- func (tx *Tx) OnRollback(f RollbackHook)
- func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tx *Tx) Rollback() error
- type User
- func (c *User) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (u *User) QueryCollaboratingMemos() *MemoQuery
- func (u *User) QueryCollaborations() *CollaborationQuery
- func (c *User) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (u *User) QueryMemos() *MemoQuery
- func (u *User) QuerySubscribingMemos() *MemoQuery
- func (u *User) QuerySubscriptions() *SubscriptionQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
- func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryCollaboratingMemos(u *User) *MemoQuery
- func (c *UserClient) QueryCollaborations(u *User) *CollaborationQuery
- func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *UserClient) QueryMemos(u *User) *MemoQuery
- func (c *UserClient) QuerySubscribingMemos(u *User) *MemoQuery
- func (c *UserClient) QuerySubscriptions(u *User) *SubscriptionQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddCollaboratingMemoIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddCollaboratingMemos(m ...*Memo) *UserCreate
- func (uc *UserCreate) AddCollaborationIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddCollaborations(c ...*Collaboration) *UserCreate
- func (uc *UserCreate) AddMemoIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddMemos(m ...*Memo) *UserCreate
- func (uc *UserCreate) AddSubscribingMemoIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddSubscribingMemos(m ...*Memo) *UserCreate
- func (uc *UserCreate) AddSubscriptionIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddSubscriptions(s ...*Subscription) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetFamilyName(s string) *UserCreate
- func (uc *UserCreate) SetGivenName(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableFamilyName(s *string) *UserCreate
- func (uc *UserCreate) SetNillableGivenName(s *string) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillablePhotoURL(s *string) *UserCreate
- func (uc *UserCreate) SetNillableType(et *enum.UserType) *UserCreate
- func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPhotoURL(s string) *UserCreate
- func (uc *UserCreate) SetType(et enum.UserType) *UserCreate
- func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetUserName(s string) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- func (ud *UserDelete) Exec(ctx context.Context) (int, error)
- func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ud *UserDelete) ExecX(ctx context.Context) int
- func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
- type UserDeleteOne
- type UserEdges
- func (e UserEdges) CollaboratingMemosOrErr() ([]*Memo, error)
- func (e UserEdges) CollaborationsOrErr() ([]*Collaboration, error)
- func (e UserEdges) MemosOrErr() ([]*Memo, error)
- func (e UserEdges) SubscribingMemosOrErr() ([]*Memo, error)
- func (e UserEdges) SubscriptionsOrErr() ([]*Subscription, error)
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddCollaboratingMemoIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddCollaborationIDs(ids ...int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddMemoIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddSubscribingMemoIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddSubscriptionIDs(ids ...int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearCollaboratingMemos()
- func (m *UserMutation) ClearCollaborations()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearFamilyName()
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearGivenName()
- func (m *UserMutation) ClearMemos()
- func (m *UserMutation) ClearPhotoURL()
- func (m *UserMutation) ClearSubscribingMemos()
- func (m *UserMutation) ClearSubscriptions()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CollaboratingMemosCleared() bool
- func (m *UserMutation) CollaboratingMemosIDs() (ids []uuid.UUID)
- func (m *UserMutation) CollaborationsCleared() bool
- func (m *UserMutation) CollaborationsIDs() (ids []int)
- func (m *UserMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *UserMutation) FamilyName() (r string, exists bool)
- func (m *UserMutation) FamilyNameCleared() bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) GetType() (r enum.UserType, exists bool)
- func (m *UserMutation) GivenName() (r string, exists bool)
- func (m *UserMutation) GivenNameCleared() bool
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) MemosCleared() bool
- func (m *UserMutation) MemosIDs() (ids []uuid.UUID)
- func (m *UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldFamilyName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldGivenName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPhotoURL(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldType(ctx context.Context) (v enum.UserType, err error)
- func (m *UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUserName(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) PhotoURL() (r string, exists bool)
- func (m *UserMutation) PhotoURLCleared() bool
- func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *UserMutation) RemoveCollaboratingMemoIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveCollaborationIDs(ids ...int)
- func (m *UserMutation) RemoveMemoIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveSubscribingMemoIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveSubscriptionIDs(ids ...int)
- func (m *UserMutation) RemovedCollaboratingMemosIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedCollaborationsIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedMemosIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedSubscribingMemosIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedSubscriptionsIDs() (ids []int)
- func (m *UserMutation) ResetCollaboratingMemos()
- func (m *UserMutation) ResetCollaborations()
- func (m *UserMutation) ResetCreateTime()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetFamilyName()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetGivenName()
- func (m *UserMutation) ResetMemos()
- func (m *UserMutation) ResetPhotoURL()
- func (m *UserMutation) ResetSubscribingMemos()
- func (m *UserMutation) ResetSubscriptions()
- func (m *UserMutation) ResetType()
- func (m *UserMutation) ResetUpdateTime()
- func (m *UserMutation) ResetUserName()
- func (m *UserMutation) SetCreateTime(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetFamilyName(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetGivenName(s string)
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPhotoURL(s string)
- func (m *UserMutation) SetType(et enum.UserType)
- func (m *UserMutation) SetUpdateTime(t time.Time)
- func (m *UserMutation) SetUserName(s string)
- func (m *UserMutation) SubscribingMemosCleared() bool
- func (m *UserMutation) SubscribingMemosIDs() (ids []uuid.UUID)
- func (m *UserMutation) SubscriptionsCleared() bool
- func (m *UserMutation) SubscriptionsIDs() (ids []int)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserMutation) UserName() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryCollaboratingMemos() *MemoQuery
- func (uq *UserQuery) QueryCollaborations() *CollaborationQuery
- func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uq *UserQuery) QueryMemos() *MemoQuery
- func (uq *UserQuery) QuerySubscribingMemos() *MemoQuery
- func (uq *UserQuery) QuerySubscriptions() *SubscriptionQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithCollaboratingMemos(opts ...func(*MemoQuery)) *UserQuery
- func (uq *UserQuery) WithCollaborations(opts ...func(*CollaborationQuery)) *UserQuery
- func (uq *UserQuery) WithMemos(opts ...func(*MemoQuery)) *UserQuery
- func (uq *UserQuery) WithSubscribingMemos(opts ...func(*MemoQuery)) *UserQuery
- func (uq *UserQuery) WithSubscriptions(opts ...func(*SubscriptionQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddCollaboratingMemoIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddCollaboratingMemos(m ...*Memo) *UserUpdate
- func (uu *UserUpdate) AddCollaborationIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddCollaborations(c ...*Collaboration) *UserUpdate
- func (uu *UserUpdate) AddMemoIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddMemos(m ...*Memo) *UserUpdate
- func (uu *UserUpdate) AddSubscribingMemoIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddSubscribingMemos(m ...*Memo) *UserUpdate
- func (uu *UserUpdate) AddSubscriptionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddSubscriptions(s ...*Subscription) *UserUpdate
- func (uu *UserUpdate) ClearCollaboratingMemos() *UserUpdate
- func (uu *UserUpdate) ClearCollaborations() *UserUpdate
- func (uu *UserUpdate) ClearFamilyName() *UserUpdate
- func (uu *UserUpdate) ClearGivenName() *UserUpdate
- func (uu *UserUpdate) ClearMemos() *UserUpdate
- func (uu *UserUpdate) ClearPhotoURL() *UserUpdate
- func (uu *UserUpdate) ClearSubscribingMemos() *UserUpdate
- func (uu *UserUpdate) ClearSubscriptions() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uu *UserUpdate) RemoveCollaboratingMemoIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveCollaboratingMemos(m ...*Memo) *UserUpdate
- func (uu *UserUpdate) RemoveCollaborationIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveCollaborations(c ...*Collaboration) *UserUpdate
- func (uu *UserUpdate) RemoveMemoIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveMemos(m ...*Memo) *UserUpdate
- func (uu *UserUpdate) RemoveSubscribingMemoIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveSubscribingMemos(m ...*Memo) *UserUpdate
- func (uu *UserUpdate) RemoveSubscriptionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveSubscriptions(s ...*Subscription) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetFamilyName(s string) *UserUpdate
- func (uu *UserUpdate) SetGivenName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableFamilyName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableGivenName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePhotoURL(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableType(et *enum.UserType) *UserUpdate
- func (uu *UserUpdate) SetNillableUserName(s *string) *UserUpdate
- func (uu *UserUpdate) SetPhotoURL(s string) *UserUpdate
- func (uu *UserUpdate) SetType(et enum.UserType) *UserUpdate
- func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUserName(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddCollaboratingMemoIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCollaboratingMemos(m ...*Memo) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCollaborationIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCollaborations(c ...*Collaboration) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMemoIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMemos(m ...*Memo) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSubscribingMemoIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSubscribingMemos(m ...*Memo) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSubscriptionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSubscriptions(s ...*Subscription) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCollaboratingMemos() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCollaborations() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFamilyName() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGivenName() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMemos() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPhotoURL() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearSubscribingMemos() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearSubscriptions() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uuo *UserUpdateOne) RemoveCollaboratingMemoIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveCollaboratingMemos(m ...*Memo) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveCollaborationIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveCollaborations(c ...*Collaboration) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMemoIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMemos(m ...*Memo) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSubscribingMemoIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSubscribingMemos(m ...*Memo) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSubscriptionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSubscriptions(s ...*Subscription) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFamilyName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGivenName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableFamilyName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableGivenName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePhotoURL(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableType(et *enum.UserType) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUserName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPhotoURL(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetType(et enum.UserType) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUserName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) ClearFamilyName() *UserUpsert
- func (u *UserUpsert) ClearGivenName() *UserUpsert
- func (u *UserUpsert) ClearPhotoURL() *UserUpsert
- func (u *UserUpsert) SetEmail(v string) *UserUpsert
- func (u *UserUpsert) SetFamilyName(v string) *UserUpsert
- func (u *UserUpsert) SetGivenName(v string) *UserUpsert
- func (u *UserUpsert) SetPhotoURL(v string) *UserUpsert
- func (u *UserUpsert) SetType(v enum.UserType) *UserUpsert
- func (u *UserUpsert) SetUpdateTime(v time.Time) *UserUpsert
- func (u *UserUpsert) SetUserName(v string) *UserUpsert
- func (u *UserUpsert) UpdateEmail() *UserUpsert
- func (u *UserUpsert) UpdateFamilyName() *UserUpsert
- func (u *UserUpsert) UpdateGivenName() *UserUpsert
- func (u *UserUpsert) UpdatePhotoURL() *UserUpsert
- func (u *UserUpsert) UpdateType() *UserUpsert
- func (u *UserUpsert) UpdateUpdateTime() *UserUpsert
- func (u *UserUpsert) UpdateUserName() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) ClearFamilyName() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearGivenName() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearPhotoURL() *UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetFamilyName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetGivenName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPhotoURL(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetType(v enum.UserType) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUpdateTime(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUserName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateFamilyName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateGivenName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePhotoURL() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateType() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUpdateTime() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUserName() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) ClearFamilyName() *UserUpsertOne
- func (u *UserUpsertOne) ClearGivenName() *UserUpsertOne
- func (u *UserUpsertOne) ClearPhotoURL() *UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetFamilyName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetGivenName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetPhotoURL(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetType(v enum.UserType) *UserUpsertOne
- func (u *UserUpsertOne) SetUpdateTime(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetUserName(v string) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
- func (u *UserUpsertOne) UpdateFamilyName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateGivenName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePhotoURL() *UserUpsertOne
- func (u *UserUpsertOne) UpdateType() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUpdateTime() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUserName() *UserUpsertOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeCollaboration = "Collaboration" TypeMemo = "Memo" TypeSubscription = "Subscription" TypeTag = "Tag" TypeUser = "User" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Collaboration is the client for interacting with the Collaboration builders. Collaboration *CollaborationClient // Memo is the client for interacting with the Memo builders. Memo *MemoClient // Subscription is the client for interacting with the Subscription builders. Subscription *SubscriptionClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Collaboration. Query(). Count(ctx)
func (*Client) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
func (*Client) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type Collaboration ¶
type Collaboration struct { // ID of the ent. ID int `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID uuid.UUID `json:"user_id,omitempty"` // MemoID holds the value of the "memo_id" field. MemoID uuid.UUID `json:"memo_id,omitempty"` // Approved holds the value of the "approved" field. Approved bool `json:"approved,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CollaborationQuery when eager-loading is set. Edges CollaborationEdges `json:"edges"` // contains filtered or unexported fields }
Collaboration is the model entity for the Collaboration schema.
func (*Collaboration) ExecContext ¶
func (c *Collaboration) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Collaboration) QueryCollaborator ¶
func (c *Collaboration) QueryCollaborator() *UserQuery
QueryCollaborator queries the "collaborator" edge of the Collaboration entity.
func (*Collaboration) QueryContext ¶
func (c *Collaboration) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Collaboration) QueryMemo ¶
func (c *Collaboration) QueryMemo() *MemoQuery
QueryMemo queries the "memo" edge of the Collaboration entity.
func (*Collaboration) String ¶
func (c *Collaboration) String() string
String implements the fmt.Stringer.
func (*Collaboration) Unwrap ¶
func (c *Collaboration) Unwrap() *Collaboration
Unwrap unwraps the Collaboration 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 (*Collaboration) Update ¶
func (c *Collaboration) Update() *CollaborationUpdateOne
Update returns a builder for updating this Collaboration. Note that you need to call Collaboration.Unwrap() before calling this method if this Collaboration was returned from a transaction, and the transaction was committed or rolled back.
type CollaborationClient ¶
type CollaborationClient struct {
// contains filtered or unexported fields
}
CollaborationClient is a client for the Collaboration schema.
func NewCollaborationClient ¶
func NewCollaborationClient(c config) *CollaborationClient
NewCollaborationClient returns a client for the Collaboration from the given config.
func (*CollaborationClient) Create ¶
func (c *CollaborationClient) Create() *CollaborationCreate
Create returns a builder for creating a Collaboration entity.
func (*CollaborationClient) CreateBulk ¶
func (c *CollaborationClient) CreateBulk(builders ...*CollaborationCreate) *CollaborationCreateBulk
CreateBulk returns a builder for creating a bulk of Collaboration entities.
func (*CollaborationClient) Delete ¶
func (c *CollaborationClient) Delete() *CollaborationDelete
Delete returns a delete builder for Collaboration.
func (*CollaborationClient) DeleteOne ¶
func (c *CollaborationClient) DeleteOne(co *Collaboration) *CollaborationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CollaborationClient) DeleteOneID ¶
func (c *CollaborationClient) DeleteOneID(id int) *CollaborationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CollaborationClient) ExecContext ¶
func (c *CollaborationClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CollaborationClient) Get ¶
func (c *CollaborationClient) Get(ctx context.Context, id int) (*Collaboration, error)
Get returns a Collaboration entity by its id.
func (*CollaborationClient) GetX ¶
func (c *CollaborationClient) GetX(ctx context.Context, id int) *Collaboration
GetX is like Get, but panics if an error occurs.
func (*CollaborationClient) Hooks ¶
func (c *CollaborationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CollaborationClient) Intercept ¶
func (c *CollaborationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `collaboration.Intercept(f(g(h())))`.
func (*CollaborationClient) Interceptors ¶
func (c *CollaborationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CollaborationClient) MapCreateBulk ¶
func (c *CollaborationClient) MapCreateBulk(slice any, setFunc func(*CollaborationCreate, int)) *CollaborationCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CollaborationClient) Query ¶
func (c *CollaborationClient) Query() *CollaborationQuery
Query returns a query builder for Collaboration.
func (*CollaborationClient) QueryCollaborator ¶
func (c *CollaborationClient) QueryCollaborator(co *Collaboration) *UserQuery
QueryCollaborator queries the collaborator edge of a Collaboration.
func (*CollaborationClient) QueryContext ¶
func (c *CollaborationClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CollaborationClient) QueryMemo ¶
func (c *CollaborationClient) QueryMemo(co *Collaboration) *MemoQuery
QueryMemo queries the memo edge of a Collaboration.
func (*CollaborationClient) Update ¶
func (c *CollaborationClient) Update() *CollaborationUpdate
Update returns an update builder for Collaboration.
func (*CollaborationClient) UpdateOne ¶
func (c *CollaborationClient) UpdateOne(co *Collaboration) *CollaborationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CollaborationClient) UpdateOneID ¶
func (c *CollaborationClient) UpdateOneID(id int) *CollaborationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CollaborationClient) Use ¶
func (c *CollaborationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `collaboration.Hooks(f(g(h())))`.
type CollaborationCreate ¶
type CollaborationCreate struct {
// contains filtered or unexported fields
}
CollaborationCreate is the builder for creating a Collaboration entity.
func (*CollaborationCreate) Exec ¶
func (cc *CollaborationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CollaborationCreate) ExecContext ¶
func (c *CollaborationCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CollaborationCreate) ExecX ¶
func (cc *CollaborationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CollaborationCreate) Mutation ¶
func (cc *CollaborationCreate) Mutation() *CollaborationMutation
Mutation returns the CollaborationMutation object of the builder.
func (*CollaborationCreate) OnConflict ¶
func (cc *CollaborationCreate) OnConflict(opts ...sql.ConflictOption) *CollaborationUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Collaboration.Create(). SetUserID(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.CollaborationUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*CollaborationCreate) OnConflictColumns ¶
func (cc *CollaborationCreate) OnConflictColumns(columns ...string) *CollaborationUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Collaboration.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*CollaborationCreate) QueryContext ¶
func (c *CollaborationCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CollaborationCreate) Save ¶
func (cc *CollaborationCreate) Save(ctx context.Context) (*Collaboration, error)
Save creates the Collaboration in the database.
func (*CollaborationCreate) SaveX ¶
func (cc *CollaborationCreate) SaveX(ctx context.Context) *Collaboration
SaveX calls Save and panics if Save returns an error.
func (*CollaborationCreate) SetApproved ¶
func (cc *CollaborationCreate) SetApproved(b bool) *CollaborationCreate
SetApproved sets the "approved" field.
func (*CollaborationCreate) SetCollaborator ¶
func (cc *CollaborationCreate) SetCollaborator(u *User) *CollaborationCreate
SetCollaborator sets the "collaborator" edge to the User entity.
func (*CollaborationCreate) SetCollaboratorID ¶
func (cc *CollaborationCreate) SetCollaboratorID(id uuid.UUID) *CollaborationCreate
SetCollaboratorID sets the "collaborator" edge to the User entity by ID.
func (*CollaborationCreate) SetCreateTime ¶
func (cc *CollaborationCreate) SetCreateTime(t time.Time) *CollaborationCreate
SetCreateTime sets the "create_time" field.
func (*CollaborationCreate) SetMemo ¶
func (cc *CollaborationCreate) SetMemo(m *Memo) *CollaborationCreate
SetMemo sets the "memo" edge to the Memo entity.
func (*CollaborationCreate) SetMemoID ¶
func (cc *CollaborationCreate) SetMemoID(u uuid.UUID) *CollaborationCreate
SetMemoID sets the "memo_id" field.
func (*CollaborationCreate) SetNillableApproved ¶
func (cc *CollaborationCreate) SetNillableApproved(b *bool) *CollaborationCreate
SetNillableApproved sets the "approved" field if the given value is not nil.
func (*CollaborationCreate) SetNillableCreateTime ¶
func (cc *CollaborationCreate) SetNillableCreateTime(t *time.Time) *CollaborationCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*CollaborationCreate) SetNillableUpdateTime ¶
func (cc *CollaborationCreate) SetNillableUpdateTime(t *time.Time) *CollaborationCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*CollaborationCreate) SetUpdateTime ¶
func (cc *CollaborationCreate) SetUpdateTime(t time.Time) *CollaborationCreate
SetUpdateTime sets the "update_time" field.
func (*CollaborationCreate) SetUserID ¶
func (cc *CollaborationCreate) SetUserID(u uuid.UUID) *CollaborationCreate
SetUserID sets the "user_id" field.
type CollaborationCreateBulk ¶
type CollaborationCreateBulk struct {
// contains filtered or unexported fields
}
CollaborationCreateBulk is the builder for creating many Collaboration entities in bulk.
func (*CollaborationCreateBulk) Exec ¶
func (ccb *CollaborationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CollaborationCreateBulk) ExecContext ¶
func (c *CollaborationCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CollaborationCreateBulk) ExecX ¶
func (ccb *CollaborationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CollaborationCreateBulk) OnConflict ¶
func (ccb *CollaborationCreateBulk) OnConflict(opts ...sql.ConflictOption) *CollaborationUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Collaboration.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.CollaborationUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*CollaborationCreateBulk) OnConflictColumns ¶
func (ccb *CollaborationCreateBulk) OnConflictColumns(columns ...string) *CollaborationUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Collaboration.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*CollaborationCreateBulk) QueryContext ¶
func (c *CollaborationCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CollaborationCreateBulk) Save ¶
func (ccb *CollaborationCreateBulk) Save(ctx context.Context) ([]*Collaboration, error)
Save creates the Collaboration entities in the database.
func (*CollaborationCreateBulk) SaveX ¶
func (ccb *CollaborationCreateBulk) SaveX(ctx context.Context) []*Collaboration
SaveX is like Save, but panics if an error occurs.
type CollaborationDelete ¶
type CollaborationDelete struct {
// contains filtered or unexported fields
}
CollaborationDelete is the builder for deleting a Collaboration entity.
func (*CollaborationDelete) Exec ¶
func (cd *CollaborationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CollaborationDelete) ExecContext ¶
func (c *CollaborationDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CollaborationDelete) ExecX ¶
func (cd *CollaborationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CollaborationDelete) QueryContext ¶
func (c *CollaborationDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CollaborationDelete) Where ¶
func (cd *CollaborationDelete) Where(ps ...predicate.Collaboration) *CollaborationDelete
Where appends a list predicates to the CollaborationDelete builder.
type CollaborationDeleteOne ¶
type CollaborationDeleteOne struct {
// contains filtered or unexported fields
}
CollaborationDeleteOne is the builder for deleting a single Collaboration entity.
func (*CollaborationDeleteOne) Exec ¶
func (cdo *CollaborationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CollaborationDeleteOne) ExecX ¶
func (cdo *CollaborationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CollaborationDeleteOne) Where ¶
func (cdo *CollaborationDeleteOne) Where(ps ...predicate.Collaboration) *CollaborationDeleteOne
Where appends a list predicates to the CollaborationDelete builder.
type CollaborationEdges ¶
type CollaborationEdges struct { // Collaborator holds the value of the collaborator edge. Collaborator *User `json:"collaborator,omitempty"` // Memo holds the value of the memo edge. Memo *Memo `json:"memo,omitempty"` // contains filtered or unexported fields }
CollaborationEdges holds the relations/edges for other nodes in the graph.
func (CollaborationEdges) CollaboratorOrErr ¶
func (e CollaborationEdges) CollaboratorOrErr() (*User, error)
CollaboratorOrErr returns the Collaborator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CollaborationEdges) MemoOrErr ¶
func (e CollaborationEdges) MemoOrErr() (*Memo, error)
MemoOrErr returns the Memo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type CollaborationGroupBy ¶
type CollaborationGroupBy struct {
// contains filtered or unexported fields
}
CollaborationGroupBy is the group-by builder for Collaboration entities.
func (*CollaborationGroupBy) Aggregate ¶
func (cgb *CollaborationGroupBy) Aggregate(fns ...AggregateFunc) *CollaborationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CollaborationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CollaborationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CollaborationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CollaborationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CollaborationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CollaborationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CollaborationGroupBy) Scan ¶
func (cgb *CollaborationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CollaborationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CollaborationMutation ¶
type CollaborationMutation struct {
// contains filtered or unexported fields
}
CollaborationMutation represents an operation that mutates the Collaboration nodes in the graph.
func (*CollaborationMutation) AddField ¶
func (m *CollaborationMutation) 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 (*CollaborationMutation) AddedEdges ¶
func (m *CollaborationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CollaborationMutation) AddedField ¶
func (m *CollaborationMutation) 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 (*CollaborationMutation) AddedFields ¶
func (m *CollaborationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CollaborationMutation) AddedIDs ¶
func (m *CollaborationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CollaborationMutation) Approved ¶
func (m *CollaborationMutation) Approved() (r bool, exists bool)
Approved returns the value of the "approved" field in the mutation.
func (*CollaborationMutation) ClearCollaborator ¶
func (m *CollaborationMutation) ClearCollaborator()
ClearCollaborator clears the "collaborator" edge to the User entity.
func (*CollaborationMutation) ClearEdge ¶
func (m *CollaborationMutation) 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 (*CollaborationMutation) ClearField ¶
func (m *CollaborationMutation) 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 (*CollaborationMutation) ClearMemo ¶
func (m *CollaborationMutation) ClearMemo()
ClearMemo clears the "memo" edge to the Memo entity.
func (*CollaborationMutation) ClearedEdges ¶
func (m *CollaborationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CollaborationMutation) ClearedFields ¶
func (m *CollaborationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CollaborationMutation) Client ¶
func (m CollaborationMutation) 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 (*CollaborationMutation) CollaboratorCleared ¶
func (m *CollaborationMutation) CollaboratorCleared() bool
CollaboratorCleared reports if the "collaborator" edge to the User entity was cleared.
func (*CollaborationMutation) CollaboratorID ¶
func (m *CollaborationMutation) CollaboratorID() (id uuid.UUID, exists bool)
CollaboratorID returns the "collaborator" edge ID in the mutation.
func (*CollaborationMutation) CollaboratorIDs ¶
func (m *CollaborationMutation) CollaboratorIDs() (ids []uuid.UUID)
CollaboratorIDs returns the "collaborator" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CollaboratorID instead. It exists only for internal usage by the builders.
func (*CollaborationMutation) CreateTime ¶
func (m *CollaborationMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*CollaborationMutation) EdgeCleared ¶
func (m *CollaborationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CollaborationMutation) ExecContext ¶
func (c *CollaborationMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CollaborationMutation) Field ¶
func (m *CollaborationMutation) 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 (*CollaborationMutation) FieldCleared ¶
func (m *CollaborationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CollaborationMutation) Fields ¶
func (m *CollaborationMutation) 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 (*CollaborationMutation) ID ¶
func (m *CollaborationMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CollaborationMutation) IDs ¶
func (m *CollaborationMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CollaborationMutation) MemoCleared ¶
func (m *CollaborationMutation) MemoCleared() bool
MemoCleared reports if the "memo" edge to the Memo entity was cleared.
func (*CollaborationMutation) MemoID ¶
func (m *CollaborationMutation) MemoID() (r uuid.UUID, exists bool)
MemoID returns the value of the "memo_id" field in the mutation.
func (*CollaborationMutation) MemoIDs ¶
func (m *CollaborationMutation) MemoIDs() (ids []uuid.UUID)
MemoIDs returns the "memo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MemoID instead. It exists only for internal usage by the builders.
func (*CollaborationMutation) OldApproved ¶
func (m *CollaborationMutation) OldApproved(ctx context.Context) (v bool, err error)
OldApproved returns the old "approved" field's value of the Collaboration entity. If the Collaboration object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CollaborationMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Collaboration entity. If the Collaboration object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CollaborationMutation) 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 (*CollaborationMutation) OldMemoID ¶
OldMemoID returns the old "memo_id" field's value of the Collaboration entity. If the Collaboration object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CollaborationMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Collaboration entity. If the Collaboration object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CollaborationMutation) OldUserID ¶
OldUserID returns the old "user_id" field's value of the Collaboration entity. If the Collaboration object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CollaborationMutation) Op ¶
func (m *CollaborationMutation) Op() Op
Op returns the operation name.
func (*CollaborationMutation) QueryContext ¶
func (c *CollaborationMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CollaborationMutation) RemovedEdges ¶
func (m *CollaborationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CollaborationMutation) RemovedIDs ¶
func (m *CollaborationMutation) 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 (*CollaborationMutation) ResetApproved ¶
func (m *CollaborationMutation) ResetApproved()
ResetApproved resets all changes to the "approved" field.
func (*CollaborationMutation) ResetCollaborator ¶
func (m *CollaborationMutation) ResetCollaborator()
ResetCollaborator resets all changes to the "collaborator" edge.
func (*CollaborationMutation) ResetCreateTime ¶
func (m *CollaborationMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*CollaborationMutation) ResetEdge ¶
func (m *CollaborationMutation) 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 (*CollaborationMutation) ResetField ¶
func (m *CollaborationMutation) 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 (*CollaborationMutation) ResetMemo ¶
func (m *CollaborationMutation) ResetMemo()
ResetMemo resets all changes to the "memo" edge.
func (*CollaborationMutation) ResetMemoID ¶
func (m *CollaborationMutation) ResetMemoID()
ResetMemoID resets all changes to the "memo_id" field.
func (*CollaborationMutation) ResetUpdateTime ¶
func (m *CollaborationMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*CollaborationMutation) ResetUserID ¶
func (m *CollaborationMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*CollaborationMutation) SetApproved ¶
func (m *CollaborationMutation) SetApproved(b bool)
SetApproved sets the "approved" field.
func (*CollaborationMutation) SetCollaboratorID ¶
func (m *CollaborationMutation) SetCollaboratorID(id uuid.UUID)
SetCollaboratorID sets the "collaborator" edge to the User entity by id.
func (*CollaborationMutation) SetCreateTime ¶
func (m *CollaborationMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*CollaborationMutation) SetField ¶
func (m *CollaborationMutation) 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 (*CollaborationMutation) SetMemoID ¶
func (m *CollaborationMutation) SetMemoID(u uuid.UUID)
SetMemoID sets the "memo_id" field.
func (*CollaborationMutation) SetOp ¶
func (m *CollaborationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CollaborationMutation) SetUpdateTime ¶
func (m *CollaborationMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*CollaborationMutation) SetUserID ¶
func (m *CollaborationMutation) SetUserID(u uuid.UUID)
SetUserID sets the "user_id" field.
func (CollaborationMutation) Tx ¶
func (m CollaborationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CollaborationMutation) Type ¶
func (m *CollaborationMutation) Type() string
Type returns the node type of this mutation (Collaboration).
func (*CollaborationMutation) UpdateTime ¶
func (m *CollaborationMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*CollaborationMutation) UserID ¶
func (m *CollaborationMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*CollaborationMutation) Where ¶
func (m *CollaborationMutation) Where(ps ...predicate.Collaboration)
Where appends a list predicates to the CollaborationMutation builder.
func (*CollaborationMutation) WhereP ¶
func (m *CollaborationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CollaborationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CollaborationQuery ¶
type CollaborationQuery struct {
// contains filtered or unexported fields
}
CollaborationQuery is the builder for querying Collaboration entities.
func (*CollaborationQuery) Aggregate ¶
func (cq *CollaborationQuery) Aggregate(fns ...AggregateFunc) *CollaborationSelect
Aggregate returns a CollaborationSelect configured with the given aggregations.
func (*CollaborationQuery) All ¶
func (cq *CollaborationQuery) All(ctx context.Context) ([]*Collaboration, error)
All executes the query and returns a list of Collaborations.
func (*CollaborationQuery) AllX ¶
func (cq *CollaborationQuery) AllX(ctx context.Context) []*Collaboration
AllX is like All, but panics if an error occurs.
func (*CollaborationQuery) Clone ¶
func (cq *CollaborationQuery) Clone() *CollaborationQuery
Clone returns a duplicate of the CollaborationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CollaborationQuery) Count ¶
func (cq *CollaborationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CollaborationQuery) CountX ¶
func (cq *CollaborationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CollaborationQuery) ExecContext ¶
func (c *CollaborationQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CollaborationQuery) Exist ¶
func (cq *CollaborationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CollaborationQuery) ExistX ¶
func (cq *CollaborationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CollaborationQuery) First ¶
func (cq *CollaborationQuery) First(ctx context.Context) (*Collaboration, error)
First returns the first Collaboration entity from the query. Returns a *NotFoundError when no Collaboration was found.
func (*CollaborationQuery) FirstID ¶
func (cq *CollaborationQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Collaboration ID from the query. Returns a *NotFoundError when no Collaboration ID was found.
func (*CollaborationQuery) FirstIDX ¶
func (cq *CollaborationQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*CollaborationQuery) FirstX ¶
func (cq *CollaborationQuery) FirstX(ctx context.Context) *Collaboration
FirstX is like First, but panics if an error occurs.
func (*CollaborationQuery) GroupBy ¶
func (cq *CollaborationQuery) GroupBy(field string, fields ...string) *CollaborationGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UserID uuid.UUID `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.Collaboration.Query(). GroupBy(collaboration.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CollaborationQuery) IDs ¶
func (cq *CollaborationQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Collaboration IDs.
func (*CollaborationQuery) IDsX ¶
func (cq *CollaborationQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*CollaborationQuery) Limit ¶
func (cq *CollaborationQuery) Limit(limit int) *CollaborationQuery
Limit the number of records to be returned by this query.
func (*CollaborationQuery) Offset ¶
func (cq *CollaborationQuery) Offset(offset int) *CollaborationQuery
Offset to start from.
func (*CollaborationQuery) Only ¶
func (cq *CollaborationQuery) Only(ctx context.Context) (*Collaboration, error)
Only returns a single Collaboration entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Collaboration entity is found. Returns a *NotFoundError when no Collaboration entities are found.
func (*CollaborationQuery) OnlyID ¶
func (cq *CollaborationQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Collaboration ID in the query. Returns a *NotSingularError when more than one Collaboration ID is found. Returns a *NotFoundError when no entities are found.
func (*CollaborationQuery) OnlyIDX ¶
func (cq *CollaborationQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CollaborationQuery) OnlyX ¶
func (cq *CollaborationQuery) OnlyX(ctx context.Context) *Collaboration
OnlyX is like Only, but panics if an error occurs.
func (*CollaborationQuery) Order ¶
func (cq *CollaborationQuery) Order(o ...collaboration.OrderOption) *CollaborationQuery
Order specifies how the records should be ordered.
func (*CollaborationQuery) QueryCollaborator ¶
func (cq *CollaborationQuery) QueryCollaborator() *UserQuery
QueryCollaborator chains the current query on the "collaborator" edge.
func (*CollaborationQuery) QueryContext ¶
func (c *CollaborationQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CollaborationQuery) QueryMemo ¶
func (cq *CollaborationQuery) QueryMemo() *MemoQuery
QueryMemo chains the current query on the "memo" edge.
func (*CollaborationQuery) Select ¶
func (cq *CollaborationQuery) Select(fields ...string) *CollaborationSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UserID uuid.UUID `json:"user_id,omitempty"` } client.Collaboration.Query(). Select(collaboration.FieldUserID). Scan(ctx, &v)
func (*CollaborationQuery) Unique ¶
func (cq *CollaborationQuery) Unique(unique bool) *CollaborationQuery
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 (*CollaborationQuery) Where ¶
func (cq *CollaborationQuery) Where(ps ...predicate.Collaboration) *CollaborationQuery
Where adds a new predicate for the CollaborationQuery builder.
func (*CollaborationQuery) WithCollaborator ¶
func (cq *CollaborationQuery) WithCollaborator(opts ...func(*UserQuery)) *CollaborationQuery
WithCollaborator tells the query-builder to eager-load the nodes that are connected to the "collaborator" edge. The optional arguments are used to configure the query builder of the edge.
func (*CollaborationQuery) WithMemo ¶
func (cq *CollaborationQuery) WithMemo(opts ...func(*MemoQuery)) *CollaborationQuery
WithMemo tells the query-builder to eager-load the nodes that are connected to the "memo" edge. The optional arguments are used to configure the query builder of the edge.
type CollaborationSelect ¶
type CollaborationSelect struct { *CollaborationQuery // contains filtered or unexported fields }
CollaborationSelect is the builder for selecting fields of Collaboration entities.
func (*CollaborationSelect) Aggregate ¶
func (cs *CollaborationSelect) Aggregate(fns ...AggregateFunc) *CollaborationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CollaborationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CollaborationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (CollaborationSelect) ExecContext ¶
func (c CollaborationSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CollaborationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CollaborationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CollaborationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CollaborationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (CollaborationSelect) QueryContext ¶
func (c CollaborationSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CollaborationSelect) Scan ¶
func (cs *CollaborationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CollaborationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CollaborationUpdate ¶
type CollaborationUpdate struct {
// contains filtered or unexported fields
}
CollaborationUpdate is the builder for updating Collaboration entities.
func (*CollaborationUpdate) ClearCollaborator ¶
func (cu *CollaborationUpdate) ClearCollaborator() *CollaborationUpdate
ClearCollaborator clears the "collaborator" edge to the User entity.
func (*CollaborationUpdate) ClearMemo ¶
func (cu *CollaborationUpdate) ClearMemo() *CollaborationUpdate
ClearMemo clears the "memo" edge to the Memo entity.
func (*CollaborationUpdate) Exec ¶
func (cu *CollaborationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CollaborationUpdate) ExecContext ¶
func (c *CollaborationUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CollaborationUpdate) ExecX ¶
func (cu *CollaborationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CollaborationUpdate) Mutation ¶
func (cu *CollaborationUpdate) Mutation() *CollaborationMutation
Mutation returns the CollaborationMutation object of the builder.
func (*CollaborationUpdate) QueryContext ¶
func (c *CollaborationUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CollaborationUpdate) Save ¶
func (cu *CollaborationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CollaborationUpdate) SaveX ¶
func (cu *CollaborationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CollaborationUpdate) SetApproved ¶
func (cu *CollaborationUpdate) SetApproved(b bool) *CollaborationUpdate
SetApproved sets the "approved" field.
func (*CollaborationUpdate) SetCollaborator ¶
func (cu *CollaborationUpdate) SetCollaborator(u *User) *CollaborationUpdate
SetCollaborator sets the "collaborator" edge to the User entity.
func (*CollaborationUpdate) SetCollaboratorID ¶
func (cu *CollaborationUpdate) SetCollaboratorID(id uuid.UUID) *CollaborationUpdate
SetCollaboratorID sets the "collaborator" edge to the User entity by ID.
func (*CollaborationUpdate) SetMemo ¶
func (cu *CollaborationUpdate) SetMemo(m *Memo) *CollaborationUpdate
SetMemo sets the "memo" edge to the Memo entity.
func (*CollaborationUpdate) SetMemoID ¶
func (cu *CollaborationUpdate) SetMemoID(u uuid.UUID) *CollaborationUpdate
SetMemoID sets the "memo_id" field.
func (*CollaborationUpdate) SetNillableApproved ¶
func (cu *CollaborationUpdate) SetNillableApproved(b *bool) *CollaborationUpdate
SetNillableApproved sets the "approved" field if the given value is not nil.
func (*CollaborationUpdate) SetNillableMemoID ¶
func (cu *CollaborationUpdate) SetNillableMemoID(u *uuid.UUID) *CollaborationUpdate
SetNillableMemoID sets the "memo_id" field if the given value is not nil.
func (*CollaborationUpdate) SetNillableUpdateTime ¶
func (cu *CollaborationUpdate) SetNillableUpdateTime(t *time.Time) *CollaborationUpdate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*CollaborationUpdate) SetNillableUserID ¶
func (cu *CollaborationUpdate) SetNillableUserID(u *uuid.UUID) *CollaborationUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*CollaborationUpdate) SetUpdateTime ¶
func (cu *CollaborationUpdate) SetUpdateTime(t time.Time) *CollaborationUpdate
SetUpdateTime sets the "update_time" field.
func (*CollaborationUpdate) SetUserID ¶
func (cu *CollaborationUpdate) SetUserID(u uuid.UUID) *CollaborationUpdate
SetUserID sets the "user_id" field.
func (*CollaborationUpdate) Where ¶
func (cu *CollaborationUpdate) Where(ps ...predicate.Collaboration) *CollaborationUpdate
Where appends a list predicates to the CollaborationUpdate builder.
type CollaborationUpdateOne ¶
type CollaborationUpdateOne struct {
// contains filtered or unexported fields
}
CollaborationUpdateOne is the builder for updating a single Collaboration entity.
func (*CollaborationUpdateOne) ClearCollaborator ¶
func (cuo *CollaborationUpdateOne) ClearCollaborator() *CollaborationUpdateOne
ClearCollaborator clears the "collaborator" edge to the User entity.
func (*CollaborationUpdateOne) ClearMemo ¶
func (cuo *CollaborationUpdateOne) ClearMemo() *CollaborationUpdateOne
ClearMemo clears the "memo" edge to the Memo entity.
func (*CollaborationUpdateOne) Exec ¶
func (cuo *CollaborationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CollaborationUpdateOne) ExecContext ¶
func (c *CollaborationUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CollaborationUpdateOne) ExecX ¶
func (cuo *CollaborationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CollaborationUpdateOne) Mutation ¶
func (cuo *CollaborationUpdateOne) Mutation() *CollaborationMutation
Mutation returns the CollaborationMutation object of the builder.
func (*CollaborationUpdateOne) QueryContext ¶
func (c *CollaborationUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CollaborationUpdateOne) Save ¶
func (cuo *CollaborationUpdateOne) Save(ctx context.Context) (*Collaboration, error)
Save executes the query and returns the updated Collaboration entity.
func (*CollaborationUpdateOne) SaveX ¶
func (cuo *CollaborationUpdateOne) SaveX(ctx context.Context) *Collaboration
SaveX is like Save, but panics if an error occurs.
func (*CollaborationUpdateOne) Select ¶
func (cuo *CollaborationUpdateOne) Select(field string, fields ...string) *CollaborationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CollaborationUpdateOne) SetApproved ¶
func (cuo *CollaborationUpdateOne) SetApproved(b bool) *CollaborationUpdateOne
SetApproved sets the "approved" field.
func (*CollaborationUpdateOne) SetCollaborator ¶
func (cuo *CollaborationUpdateOne) SetCollaborator(u *User) *CollaborationUpdateOne
SetCollaborator sets the "collaborator" edge to the User entity.
func (*CollaborationUpdateOne) SetCollaboratorID ¶
func (cuo *CollaborationUpdateOne) SetCollaboratorID(id uuid.UUID) *CollaborationUpdateOne
SetCollaboratorID sets the "collaborator" edge to the User entity by ID.
func (*CollaborationUpdateOne) SetMemo ¶
func (cuo *CollaborationUpdateOne) SetMemo(m *Memo) *CollaborationUpdateOne
SetMemo sets the "memo" edge to the Memo entity.
func (*CollaborationUpdateOne) SetMemoID ¶
func (cuo *CollaborationUpdateOne) SetMemoID(u uuid.UUID) *CollaborationUpdateOne
SetMemoID sets the "memo_id" field.
func (*CollaborationUpdateOne) SetNillableApproved ¶
func (cuo *CollaborationUpdateOne) SetNillableApproved(b *bool) *CollaborationUpdateOne
SetNillableApproved sets the "approved" field if the given value is not nil.
func (*CollaborationUpdateOne) SetNillableMemoID ¶
func (cuo *CollaborationUpdateOne) SetNillableMemoID(u *uuid.UUID) *CollaborationUpdateOne
SetNillableMemoID sets the "memo_id" field if the given value is not nil.
func (*CollaborationUpdateOne) SetNillableUpdateTime ¶
func (cuo *CollaborationUpdateOne) SetNillableUpdateTime(t *time.Time) *CollaborationUpdateOne
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*CollaborationUpdateOne) SetNillableUserID ¶
func (cuo *CollaborationUpdateOne) SetNillableUserID(u *uuid.UUID) *CollaborationUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*CollaborationUpdateOne) SetUpdateTime ¶
func (cuo *CollaborationUpdateOne) SetUpdateTime(t time.Time) *CollaborationUpdateOne
SetUpdateTime sets the "update_time" field.
func (*CollaborationUpdateOne) SetUserID ¶
func (cuo *CollaborationUpdateOne) SetUserID(u uuid.UUID) *CollaborationUpdateOne
SetUserID sets the "user_id" field.
func (*CollaborationUpdateOne) Where ¶
func (cuo *CollaborationUpdateOne) Where(ps ...predicate.Collaboration) *CollaborationUpdateOne
Where appends a list predicates to the CollaborationUpdate builder.
type CollaborationUpsert ¶
CollaborationUpsert is the "OnConflict" setter.
func (*CollaborationUpsert) SetApproved ¶
func (u *CollaborationUpsert) SetApproved(v bool) *CollaborationUpsert
SetApproved sets the "approved" field.
func (*CollaborationUpsert) SetMemoID ¶
func (u *CollaborationUpsert) SetMemoID(v uuid.UUID) *CollaborationUpsert
SetMemoID sets the "memo_id" field.
func (*CollaborationUpsert) SetUpdateTime ¶
func (u *CollaborationUpsert) SetUpdateTime(v time.Time) *CollaborationUpsert
SetUpdateTime sets the "update_time" field.
func (*CollaborationUpsert) SetUserID ¶
func (u *CollaborationUpsert) SetUserID(v uuid.UUID) *CollaborationUpsert
SetUserID sets the "user_id" field.
func (*CollaborationUpsert) UpdateApproved ¶
func (u *CollaborationUpsert) UpdateApproved() *CollaborationUpsert
UpdateApproved sets the "approved" field to the value that was provided on create.
func (*CollaborationUpsert) UpdateMemoID ¶
func (u *CollaborationUpsert) UpdateMemoID() *CollaborationUpsert
UpdateMemoID sets the "memo_id" field to the value that was provided on create.
func (*CollaborationUpsert) UpdateUpdateTime ¶
func (u *CollaborationUpsert) UpdateUpdateTime() *CollaborationUpsert
UpdateUpdateTime sets the "update_time" field to the value that was provided on create.
func (*CollaborationUpsert) UpdateUserID ¶
func (u *CollaborationUpsert) UpdateUserID() *CollaborationUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type CollaborationUpsertBulk ¶
type CollaborationUpsertBulk struct {
// contains filtered or unexported fields
}
CollaborationUpsertBulk is the builder for "upsert"-ing a bulk of Collaboration nodes.
func (*CollaborationUpsertBulk) DoNothing ¶
func (u *CollaborationUpsertBulk) DoNothing() *CollaborationUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CollaborationUpsertBulk) Exec ¶
func (u *CollaborationUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CollaborationUpsertBulk) ExecX ¶
func (u *CollaborationUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CollaborationUpsertBulk) Ignore ¶
func (u *CollaborationUpsertBulk) Ignore() *CollaborationUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Collaboration.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CollaborationUpsertBulk) SetApproved ¶
func (u *CollaborationUpsertBulk) SetApproved(v bool) *CollaborationUpsertBulk
SetApproved sets the "approved" field.
func (*CollaborationUpsertBulk) SetMemoID ¶
func (u *CollaborationUpsertBulk) SetMemoID(v uuid.UUID) *CollaborationUpsertBulk
SetMemoID sets the "memo_id" field.
func (*CollaborationUpsertBulk) SetUpdateTime ¶
func (u *CollaborationUpsertBulk) SetUpdateTime(v time.Time) *CollaborationUpsertBulk
SetUpdateTime sets the "update_time" field.
func (*CollaborationUpsertBulk) SetUserID ¶
func (u *CollaborationUpsertBulk) SetUserID(v uuid.UUID) *CollaborationUpsertBulk
SetUserID sets the "user_id" field.
func (*CollaborationUpsertBulk) Update ¶
func (u *CollaborationUpsertBulk) Update(set func(*CollaborationUpsert)) *CollaborationUpsertBulk
Update allows overriding fields `UPDATE` values. See the CollaborationCreateBulk.OnConflict documentation for more info.
func (*CollaborationUpsertBulk) UpdateApproved ¶
func (u *CollaborationUpsertBulk) UpdateApproved() *CollaborationUpsertBulk
UpdateApproved sets the "approved" field to the value that was provided on create.
func (*CollaborationUpsertBulk) UpdateMemoID ¶
func (u *CollaborationUpsertBulk) UpdateMemoID() *CollaborationUpsertBulk
UpdateMemoID sets the "memo_id" field to the value that was provided on create.
func (*CollaborationUpsertBulk) UpdateNewValues ¶
func (u *CollaborationUpsertBulk) UpdateNewValues() *CollaborationUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Collaboration.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*CollaborationUpsertBulk) UpdateUpdateTime ¶
func (u *CollaborationUpsertBulk) UpdateUpdateTime() *CollaborationUpsertBulk
UpdateUpdateTime sets the "update_time" field to the value that was provided on create.
func (*CollaborationUpsertBulk) UpdateUserID ¶
func (u *CollaborationUpsertBulk) UpdateUserID() *CollaborationUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type CollaborationUpsertOne ¶
type CollaborationUpsertOne struct {
// contains filtered or unexported fields
}
CollaborationUpsertOne is the builder for "upsert"-ing
one Collaboration node.
func (*CollaborationUpsertOne) DoNothing ¶
func (u *CollaborationUpsertOne) DoNothing() *CollaborationUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CollaborationUpsertOne) Exec ¶
func (u *CollaborationUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*CollaborationUpsertOne) ExecX ¶
func (u *CollaborationUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CollaborationUpsertOne) ID ¶
func (u *CollaborationUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*CollaborationUpsertOne) IDX ¶
func (u *CollaborationUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*CollaborationUpsertOne) Ignore ¶
func (u *CollaborationUpsertOne) Ignore() *CollaborationUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Collaboration.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CollaborationUpsertOne) SetApproved ¶
func (u *CollaborationUpsertOne) SetApproved(v bool) *CollaborationUpsertOne
SetApproved sets the "approved" field.
func (*CollaborationUpsertOne) SetMemoID ¶
func (u *CollaborationUpsertOne) SetMemoID(v uuid.UUID) *CollaborationUpsertOne
SetMemoID sets the "memo_id" field.
func (*CollaborationUpsertOne) SetUpdateTime ¶
func (u *CollaborationUpsertOne) SetUpdateTime(v time.Time) *CollaborationUpsertOne
SetUpdateTime sets the "update_time" field.
func (*CollaborationUpsertOne) SetUserID ¶
func (u *CollaborationUpsertOne) SetUserID(v uuid.UUID) *CollaborationUpsertOne
SetUserID sets the "user_id" field.
func (*CollaborationUpsertOne) Update ¶
func (u *CollaborationUpsertOne) Update(set func(*CollaborationUpsert)) *CollaborationUpsertOne
Update allows overriding fields `UPDATE` values. See the CollaborationCreate.OnConflict documentation for more info.
func (*CollaborationUpsertOne) UpdateApproved ¶
func (u *CollaborationUpsertOne) UpdateApproved() *CollaborationUpsertOne
UpdateApproved sets the "approved" field to the value that was provided on create.
func (*CollaborationUpsertOne) UpdateMemoID ¶
func (u *CollaborationUpsertOne) UpdateMemoID() *CollaborationUpsertOne
UpdateMemoID sets the "memo_id" field to the value that was provided on create.
func (*CollaborationUpsertOne) UpdateNewValues ¶
func (u *CollaborationUpsertOne) UpdateNewValues() *CollaborationUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Collaboration.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*CollaborationUpsertOne) UpdateUpdateTime ¶
func (u *CollaborationUpsertOne) UpdateUpdateTime() *CollaborationUpsertOne
UpdateUpdateTime sets the "update_time" field to the value that was provided on create.
func (*CollaborationUpsertOne) UpdateUserID ¶
func (u *CollaborationUpsertOne) UpdateUserID() *CollaborationUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type Collaborations ¶
type Collaborations []*Collaboration
Collaborations is a parsable slice of Collaboration.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type Memo ¶
type Memo struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID uuid.UUID `json:"owner_id,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,omitempty"` // IsPublished holds the value of the "is_published" field. IsPublished bool `json:"is_published,omitempty"` // Version holds the value of the "version" field. Version int `json:"version,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MemoQuery when eager-loading is set. Edges MemoEdges `json:"edges"` // contains filtered or unexported fields }
Memo is the model entity for the Memo schema.
func (*Memo) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Memo) QueryCollaborations ¶
func (m *Memo) QueryCollaborations() *CollaborationQuery
QueryCollaborations queries the "collaborations" edge of the Memo entity.
func (*Memo) QueryCollaborators ¶
QueryCollaborators queries the "collaborators" edge of the Memo entity.
func (*Memo) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Memo) QueryOwner ¶
QueryOwner queries the "owner" edge of the Memo entity.
func (*Memo) QuerySubscribers ¶
QuerySubscribers queries the "subscribers" edge of the Memo entity.
func (*Memo) QuerySubscriptions ¶
func (m *Memo) QuerySubscriptions() *SubscriptionQuery
QuerySubscriptions queries the "subscriptions" edge of the Memo entity.
func (*Memo) Unwrap ¶
Unwrap unwraps the Memo 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 (*Memo) Update ¶
func (m *Memo) Update() *MemoUpdateOne
Update returns a builder for updating this Memo. Note that you need to call Memo.Unwrap() before calling this method if this Memo was returned from a transaction, and the transaction was committed or rolled back.
type MemoClient ¶
type MemoClient struct {
// contains filtered or unexported fields
}
MemoClient is a client for the Memo schema.
func NewMemoClient ¶
func NewMemoClient(c config) *MemoClient
NewMemoClient returns a client for the Memo from the given config.
func (*MemoClient) Create ¶
func (c *MemoClient) Create() *MemoCreate
Create returns a builder for creating a Memo entity.
func (*MemoClient) CreateBulk ¶
func (c *MemoClient) CreateBulk(builders ...*MemoCreate) *MemoCreateBulk
CreateBulk returns a builder for creating a bulk of Memo entities.
func (*MemoClient) Delete ¶
func (c *MemoClient) Delete() *MemoDelete
Delete returns a delete builder for Memo.
func (*MemoClient) DeleteOne ¶
func (c *MemoClient) DeleteOne(m *Memo) *MemoDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MemoClient) DeleteOneID ¶
func (c *MemoClient) DeleteOneID(id uuid.UUID) *MemoDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MemoClient) ExecContext ¶
func (c *MemoClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MemoClient) Intercept ¶
func (c *MemoClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `memo.Intercept(f(g(h())))`.
func (*MemoClient) Interceptors ¶
func (c *MemoClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MemoClient) MapCreateBulk ¶
func (c *MemoClient) MapCreateBulk(slice any, setFunc func(*MemoCreate, int)) *MemoCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*MemoClient) Query ¶
func (c *MemoClient) Query() *MemoQuery
Query returns a query builder for Memo.
func (*MemoClient) QueryCollaborations ¶
func (c *MemoClient) QueryCollaborations(m *Memo) *CollaborationQuery
QueryCollaborations queries the collaborations edge of a Memo.
func (*MemoClient) QueryCollaborators ¶
func (c *MemoClient) QueryCollaborators(m *Memo) *UserQuery
QueryCollaborators queries the collaborators edge of a Memo.
func (*MemoClient) QueryContext ¶
func (c *MemoClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MemoClient) QueryOwner ¶
func (c *MemoClient) QueryOwner(m *Memo) *UserQuery
QueryOwner queries the owner edge of a Memo.
func (*MemoClient) QuerySubscribers ¶
func (c *MemoClient) QuerySubscribers(m *Memo) *UserQuery
QuerySubscribers queries the subscribers edge of a Memo.
func (*MemoClient) QuerySubscriptions ¶
func (c *MemoClient) QuerySubscriptions(m *Memo) *SubscriptionQuery
QuerySubscriptions queries the subscriptions edge of a Memo.
func (*MemoClient) QueryTags ¶
func (c *MemoClient) QueryTags(m *Memo) *TagQuery
QueryTags queries the tags edge of a Memo.
func (*MemoClient) Update ¶
func (c *MemoClient) Update() *MemoUpdate
Update returns an update builder for Memo.
func (*MemoClient) UpdateOne ¶
func (c *MemoClient) UpdateOne(m *Memo) *MemoUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MemoClient) UpdateOneID ¶
func (c *MemoClient) UpdateOneID(id uuid.UUID) *MemoUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MemoClient) Use ¶
func (c *MemoClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `memo.Hooks(f(g(h())))`.
type MemoCreate ¶
type MemoCreate struct {
// contains filtered or unexported fields
}
MemoCreate is the builder for creating a Memo entity.
func (*MemoCreate) AddCollaborationIDs ¶
func (mc *MemoCreate) AddCollaborationIDs(ids ...int) *MemoCreate
AddCollaborationIDs adds the "collaborations" edge to the Collaboration entity by IDs.
func (*MemoCreate) AddCollaborations ¶
func (mc *MemoCreate) AddCollaborations(c ...*Collaboration) *MemoCreate
AddCollaborations adds the "collaborations" edges to the Collaboration entity.
func (*MemoCreate) AddCollaboratorIDs ¶
func (mc *MemoCreate) AddCollaboratorIDs(ids ...uuid.UUID) *MemoCreate
AddCollaboratorIDs adds the "collaborators" edge to the User entity by IDs.
func (*MemoCreate) AddCollaborators ¶
func (mc *MemoCreate) AddCollaborators(u ...*User) *MemoCreate
AddCollaborators adds the "collaborators" edges to the User entity.
func (*MemoCreate) AddSubscriberIDs ¶
func (mc *MemoCreate) AddSubscriberIDs(ids ...uuid.UUID) *MemoCreate
AddSubscriberIDs adds the "subscribers" edge to the User entity by IDs.
func (*MemoCreate) AddSubscribers ¶
func (mc *MemoCreate) AddSubscribers(u ...*User) *MemoCreate
AddSubscribers adds the "subscribers" edges to the User entity.
func (*MemoCreate) AddSubscriptionIDs ¶
func (mc *MemoCreate) AddSubscriptionIDs(ids ...int) *MemoCreate
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*MemoCreate) AddSubscriptions ¶
func (mc *MemoCreate) AddSubscriptions(s ...*Subscription) *MemoCreate
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*MemoCreate) AddTagIDs ¶
func (mc *MemoCreate) AddTagIDs(ids ...int) *MemoCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*MemoCreate) AddTags ¶
func (mc *MemoCreate) AddTags(t ...*Tag) *MemoCreate
AddTags adds the "tags" edges to the Tag entity.
func (*MemoCreate) Exec ¶
func (mc *MemoCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MemoCreate) ExecContext ¶
func (c *MemoCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MemoCreate) ExecX ¶
func (mc *MemoCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemoCreate) Mutation ¶
func (mc *MemoCreate) Mutation() *MemoMutation
Mutation returns the MemoMutation object of the builder.
func (*MemoCreate) OnConflict ¶
func (mc *MemoCreate) OnConflict(opts ...sql.ConflictOption) *MemoUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Memo.Create(). SetOwnerID(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.MemoUpsert) { SetOwnerID(v+v). }). Exec(ctx)
func (*MemoCreate) OnConflictColumns ¶
func (mc *MemoCreate) OnConflictColumns(columns ...string) *MemoUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Memo.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*MemoCreate) QueryContext ¶
func (c *MemoCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MemoCreate) Save ¶
func (mc *MemoCreate) Save(ctx context.Context) (*Memo, error)
Save creates the Memo in the database.
func (*MemoCreate) SaveX ¶
func (mc *MemoCreate) SaveX(ctx context.Context) *Memo
SaveX calls Save and panics if Save returns an error.
func (*MemoCreate) SetContent ¶
func (mc *MemoCreate) SetContent(s string) *MemoCreate
SetContent sets the "content" field.
func (*MemoCreate) SetCreateTime ¶
func (mc *MemoCreate) SetCreateTime(t time.Time) *MemoCreate
SetCreateTime sets the "create_time" field.
func (*MemoCreate) SetID ¶
func (mc *MemoCreate) SetID(u uuid.UUID) *MemoCreate
SetID sets the "id" field.
func (*MemoCreate) SetIsPublished ¶
func (mc *MemoCreate) SetIsPublished(b bool) *MemoCreate
SetIsPublished sets the "is_published" field.
func (*MemoCreate) SetNillableCreateTime ¶
func (mc *MemoCreate) SetNillableCreateTime(t *time.Time) *MemoCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*MemoCreate) SetNillableID ¶
func (mc *MemoCreate) SetNillableID(u *uuid.UUID) *MemoCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*MemoCreate) SetNillableIsPublished ¶
func (mc *MemoCreate) SetNillableIsPublished(b *bool) *MemoCreate
SetNillableIsPublished sets the "is_published" field if the given value is not nil.
func (*MemoCreate) SetNillableUpdateTime ¶
func (mc *MemoCreate) SetNillableUpdateTime(t *time.Time) *MemoCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*MemoCreate) SetNillableVersion ¶
func (mc *MemoCreate) SetNillableVersion(i *int) *MemoCreate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*MemoCreate) SetOwner ¶
func (mc *MemoCreate) SetOwner(u *User) *MemoCreate
SetOwner sets the "owner" edge to the User entity.
func (*MemoCreate) SetOwnerID ¶
func (mc *MemoCreate) SetOwnerID(u uuid.UUID) *MemoCreate
SetOwnerID sets the "owner_id" field.
func (*MemoCreate) SetTitle ¶
func (mc *MemoCreate) SetTitle(s string) *MemoCreate
SetTitle sets the "title" field.
func (*MemoCreate) SetUpdateTime ¶
func (mc *MemoCreate) SetUpdateTime(t time.Time) *MemoCreate
SetUpdateTime sets the "update_time" field.
func (*MemoCreate) SetVersion ¶
func (mc *MemoCreate) SetVersion(i int) *MemoCreate
SetVersion sets the "version" field.
type MemoCreateBulk ¶
type MemoCreateBulk struct {
// contains filtered or unexported fields
}
MemoCreateBulk is the builder for creating many Memo entities in bulk.
func (*MemoCreateBulk) Exec ¶
func (mcb *MemoCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MemoCreateBulk) ExecContext ¶
func (c *MemoCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MemoCreateBulk) ExecX ¶
func (mcb *MemoCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemoCreateBulk) OnConflict ¶
func (mcb *MemoCreateBulk) OnConflict(opts ...sql.ConflictOption) *MemoUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Memo.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.MemoUpsert) { SetOwnerID(v+v). }). Exec(ctx)
func (*MemoCreateBulk) OnConflictColumns ¶
func (mcb *MemoCreateBulk) OnConflictColumns(columns ...string) *MemoUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Memo.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*MemoCreateBulk) QueryContext ¶
func (c *MemoCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type MemoDelete ¶
type MemoDelete struct {
// contains filtered or unexported fields
}
MemoDelete is the builder for deleting a Memo entity.
func (*MemoDelete) Exec ¶
func (md *MemoDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MemoDelete) ExecContext ¶
func (c *MemoDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MemoDelete) ExecX ¶
func (md *MemoDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MemoDelete) QueryContext ¶
func (c *MemoDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MemoDelete) Where ¶
func (md *MemoDelete) Where(ps ...predicate.Memo) *MemoDelete
Where appends a list predicates to the MemoDelete builder.
type MemoDeleteOne ¶
type MemoDeleteOne struct {
// contains filtered or unexported fields
}
MemoDeleteOne is the builder for deleting a single Memo entity.
func (*MemoDeleteOne) Exec ¶
func (mdo *MemoDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MemoDeleteOne) ExecX ¶
func (mdo *MemoDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemoDeleteOne) Where ¶
func (mdo *MemoDeleteOne) Where(ps ...predicate.Memo) *MemoDeleteOne
Where appends a list predicates to the MemoDelete builder.
type MemoEdges ¶
type MemoEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // Subscribers holds the value of the subscribers edge. Subscribers []*User `json:"subscribers,omitempty"` // Collaborators holds the value of the collaborators edge. Collaborators []*User `json:"collaborators,omitempty"` // Subscriptions holds the value of the subscriptions edge. Subscriptions []*Subscription `json:"subscriptions,omitempty"` // Collaborations holds the value of the collaborations edge. Collaborations []*Collaboration `json:"collaborations,omitempty"` // contains filtered or unexported fields }
MemoEdges holds the relations/edges for other nodes in the graph.
func (MemoEdges) CollaborationsOrErr ¶
func (e MemoEdges) CollaborationsOrErr() ([]*Collaboration, error)
CollaborationsOrErr returns the Collaborations value or an error if the edge was not loaded in eager-loading.
func (MemoEdges) CollaboratorsOrErr ¶
CollaboratorsOrErr returns the Collaborators value or an error if the edge was not loaded in eager-loading.
func (MemoEdges) OwnerOrErr ¶
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MemoEdges) SubscribersOrErr ¶
SubscribersOrErr returns the Subscribers value or an error if the edge was not loaded in eager-loading.
func (MemoEdges) SubscriptionsOrErr ¶
func (e MemoEdges) SubscriptionsOrErr() ([]*Subscription, error)
SubscriptionsOrErr returns the Subscriptions value or an error if the edge was not loaded in eager-loading.
type MemoGroupBy ¶
type MemoGroupBy struct {
// contains filtered or unexported fields
}
MemoGroupBy is the group-by builder for Memo entities.
func (*MemoGroupBy) Aggregate ¶
func (mgb *MemoGroupBy) Aggregate(fns ...AggregateFunc) *MemoGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MemoGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MemoGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MemoGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MemoGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MemoGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MemoGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MemoGroupBy) Scan ¶
func (mgb *MemoGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MemoGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MemoMutation ¶
type MemoMutation struct {
// contains filtered or unexported fields
}
MemoMutation represents an operation that mutates the Memo nodes in the graph.
func (*MemoMutation) AddCollaborationIDs ¶
func (m *MemoMutation) AddCollaborationIDs(ids ...int)
AddCollaborationIDs adds the "collaborations" edge to the Collaboration entity by ids.
func (*MemoMutation) AddCollaboratorIDs ¶
func (m *MemoMutation) AddCollaboratorIDs(ids ...uuid.UUID)
AddCollaboratorIDs adds the "collaborators" edge to the User entity by ids.
func (*MemoMutation) AddField ¶
func (m *MemoMutation) 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 (*MemoMutation) AddSubscriberIDs ¶
func (m *MemoMutation) AddSubscriberIDs(ids ...uuid.UUID)
AddSubscriberIDs adds the "subscribers" edge to the User entity by ids.
func (*MemoMutation) AddSubscriptionIDs ¶
func (m *MemoMutation) AddSubscriptionIDs(ids ...int)
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by ids.
func (*MemoMutation) AddTagIDs ¶
func (m *MemoMutation) AddTagIDs(ids ...int)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*MemoMutation) AddVersion ¶
func (m *MemoMutation) AddVersion(i int)
AddVersion adds i to the "version" field.
func (*MemoMutation) AddedEdges ¶
func (m *MemoMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MemoMutation) AddedField ¶
func (m *MemoMutation) 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 (*MemoMutation) AddedFields ¶
func (m *MemoMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MemoMutation) AddedIDs ¶
func (m *MemoMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MemoMutation) AddedVersion ¶
func (m *MemoMutation) AddedVersion() (r int, exists bool)
AddedVersion returns the value that was added to the "version" field in this mutation.
func (*MemoMutation) ClearCollaborations ¶
func (m *MemoMutation) ClearCollaborations()
ClearCollaborations clears the "collaborations" edge to the Collaboration entity.
func (*MemoMutation) ClearCollaborators ¶
func (m *MemoMutation) ClearCollaborators()
ClearCollaborators clears the "collaborators" edge to the User entity.
func (*MemoMutation) ClearEdge ¶
func (m *MemoMutation) 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 (*MemoMutation) ClearField ¶
func (m *MemoMutation) 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 (*MemoMutation) ClearOwner ¶
func (m *MemoMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*MemoMutation) ClearSubscribers ¶
func (m *MemoMutation) ClearSubscribers()
ClearSubscribers clears the "subscribers" edge to the User entity.
func (*MemoMutation) ClearSubscriptions ¶
func (m *MemoMutation) ClearSubscriptions()
ClearSubscriptions clears the "subscriptions" edge to the Subscription entity.
func (*MemoMutation) ClearTags ¶
func (m *MemoMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*MemoMutation) ClearedEdges ¶
func (m *MemoMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MemoMutation) ClearedFields ¶
func (m *MemoMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MemoMutation) Client ¶
func (m MemoMutation) 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 (*MemoMutation) CollaborationsCleared ¶
func (m *MemoMutation) CollaborationsCleared() bool
CollaborationsCleared reports if the "collaborations" edge to the Collaboration entity was cleared.
func (*MemoMutation) CollaborationsIDs ¶
func (m *MemoMutation) CollaborationsIDs() (ids []int)
CollaborationsIDs returns the "collaborations" edge IDs in the mutation.
func (*MemoMutation) CollaboratorsCleared ¶
func (m *MemoMutation) CollaboratorsCleared() bool
CollaboratorsCleared reports if the "collaborators" edge to the User entity was cleared.
func (*MemoMutation) CollaboratorsIDs ¶
func (m *MemoMutation) CollaboratorsIDs() (ids []uuid.UUID)
CollaboratorsIDs returns the "collaborators" edge IDs in the mutation.
func (*MemoMutation) Content ¶
func (m *MemoMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*MemoMutation) CreateTime ¶
func (m *MemoMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*MemoMutation) EdgeCleared ¶
func (m *MemoMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MemoMutation) ExecContext ¶
func (c *MemoMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MemoMutation) Field ¶
func (m *MemoMutation) 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 (*MemoMutation) FieldCleared ¶
func (m *MemoMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MemoMutation) Fields ¶
func (m *MemoMutation) 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 (*MemoMutation) ID ¶
func (m *MemoMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MemoMutation) 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 (*MemoMutation) IsPublished ¶
func (m *MemoMutation) IsPublished() (r bool, exists bool)
IsPublished returns the value of the "is_published" field in the mutation.
func (*MemoMutation) OldContent ¶
func (m *MemoMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Memo entity. If the Memo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemoMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Memo entity. If the Memo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemoMutation) 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 (*MemoMutation) OldIsPublished ¶
func (m *MemoMutation) OldIsPublished(ctx context.Context) (v bool, err error)
OldIsPublished returns the old "is_published" field's value of the Memo entity. If the Memo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemoMutation) OldOwnerID ¶
OldOwnerID returns the old "owner_id" field's value of the Memo entity. If the Memo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemoMutation) OldTitle ¶
func (m *MemoMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Memo entity. If the Memo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemoMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Memo entity. If the Memo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemoMutation) OldVersion ¶
func (m *MemoMutation) OldVersion(ctx context.Context) (v int, err error)
OldVersion returns the old "version" field's value of the Memo entity. If the Memo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MemoMutation) OwnerCleared ¶
func (m *MemoMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*MemoMutation) OwnerID ¶
func (m *MemoMutation) OwnerID() (r uuid.UUID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*MemoMutation) OwnerIDs ¶
func (m *MemoMutation) OwnerIDs() (ids []uuid.UUID)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*MemoMutation) QueryContext ¶
func (c *MemoMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MemoMutation) RemoveCollaborationIDs ¶
func (m *MemoMutation) RemoveCollaborationIDs(ids ...int)
RemoveCollaborationIDs removes the "collaborations" edge to the Collaboration entity by IDs.
func (*MemoMutation) RemoveCollaboratorIDs ¶
func (m *MemoMutation) RemoveCollaboratorIDs(ids ...uuid.UUID)
RemoveCollaboratorIDs removes the "collaborators" edge to the User entity by IDs.
func (*MemoMutation) RemoveSubscriberIDs ¶
func (m *MemoMutation) RemoveSubscriberIDs(ids ...uuid.UUID)
RemoveSubscriberIDs removes the "subscribers" edge to the User entity by IDs.
func (*MemoMutation) RemoveSubscriptionIDs ¶
func (m *MemoMutation) RemoveSubscriptionIDs(ids ...int)
RemoveSubscriptionIDs removes the "subscriptions" edge to the Subscription entity by IDs.
func (*MemoMutation) RemoveTagIDs ¶
func (m *MemoMutation) RemoveTagIDs(ids ...int)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*MemoMutation) RemovedCollaborationsIDs ¶
func (m *MemoMutation) RemovedCollaborationsIDs() (ids []int)
RemovedCollaborations returns the removed IDs of the "collaborations" edge to the Collaboration entity.
func (*MemoMutation) RemovedCollaboratorsIDs ¶
func (m *MemoMutation) RemovedCollaboratorsIDs() (ids []uuid.UUID)
RemovedCollaborators returns the removed IDs of the "collaborators" edge to the User entity.
func (*MemoMutation) RemovedEdges ¶
func (m *MemoMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MemoMutation) RemovedIDs ¶
func (m *MemoMutation) 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 (*MemoMutation) RemovedSubscribersIDs ¶
func (m *MemoMutation) RemovedSubscribersIDs() (ids []uuid.UUID)
RemovedSubscribers returns the removed IDs of the "subscribers" edge to the User entity.
func (*MemoMutation) RemovedSubscriptionsIDs ¶
func (m *MemoMutation) RemovedSubscriptionsIDs() (ids []int)
RemovedSubscriptions returns the removed IDs of the "subscriptions" edge to the Subscription entity.
func (*MemoMutation) RemovedTagsIDs ¶
func (m *MemoMutation) RemovedTagsIDs() (ids []int)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*MemoMutation) ResetCollaborations ¶
func (m *MemoMutation) ResetCollaborations()
ResetCollaborations resets all changes to the "collaborations" edge.
func (*MemoMutation) ResetCollaborators ¶
func (m *MemoMutation) ResetCollaborators()
ResetCollaborators resets all changes to the "collaborators" edge.
func (*MemoMutation) ResetContent ¶
func (m *MemoMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*MemoMutation) ResetCreateTime ¶
func (m *MemoMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*MemoMutation) ResetEdge ¶
func (m *MemoMutation) 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 (*MemoMutation) ResetField ¶
func (m *MemoMutation) 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 (*MemoMutation) ResetIsPublished ¶
func (m *MemoMutation) ResetIsPublished()
ResetIsPublished resets all changes to the "is_published" field.
func (*MemoMutation) ResetOwner ¶
func (m *MemoMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*MemoMutation) ResetOwnerID ¶
func (m *MemoMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*MemoMutation) ResetSubscribers ¶
func (m *MemoMutation) ResetSubscribers()
ResetSubscribers resets all changes to the "subscribers" edge.
func (*MemoMutation) ResetSubscriptions ¶
func (m *MemoMutation) ResetSubscriptions()
ResetSubscriptions resets all changes to the "subscriptions" edge.
func (*MemoMutation) ResetTags ¶
func (m *MemoMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*MemoMutation) ResetTitle ¶
func (m *MemoMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*MemoMutation) ResetUpdateTime ¶
func (m *MemoMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*MemoMutation) ResetVersion ¶
func (m *MemoMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*MemoMutation) SetContent ¶
func (m *MemoMutation) SetContent(s string)
SetContent sets the "content" field.
func (*MemoMutation) SetCreateTime ¶
func (m *MemoMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*MemoMutation) SetField ¶
func (m *MemoMutation) 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 (*MemoMutation) SetID ¶
func (m *MemoMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Memo entities.
func (*MemoMutation) SetIsPublished ¶
func (m *MemoMutation) SetIsPublished(b bool)
SetIsPublished sets the "is_published" field.
func (*MemoMutation) SetOp ¶
func (m *MemoMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MemoMutation) SetOwnerID ¶
func (m *MemoMutation) SetOwnerID(u uuid.UUID)
SetOwnerID sets the "owner_id" field.
func (*MemoMutation) SetTitle ¶
func (m *MemoMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*MemoMutation) SetUpdateTime ¶
func (m *MemoMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*MemoMutation) SetVersion ¶
func (m *MemoMutation) SetVersion(i int)
SetVersion sets the "version" field.
func (*MemoMutation) SubscribersCleared ¶
func (m *MemoMutation) SubscribersCleared() bool
SubscribersCleared reports if the "subscribers" edge to the User entity was cleared.
func (*MemoMutation) SubscribersIDs ¶
func (m *MemoMutation) SubscribersIDs() (ids []uuid.UUID)
SubscribersIDs returns the "subscribers" edge IDs in the mutation.
func (*MemoMutation) SubscriptionsCleared ¶
func (m *MemoMutation) SubscriptionsCleared() bool
SubscriptionsCleared reports if the "subscriptions" edge to the Subscription entity was cleared.
func (*MemoMutation) SubscriptionsIDs ¶
func (m *MemoMutation) SubscriptionsIDs() (ids []int)
SubscriptionsIDs returns the "subscriptions" edge IDs in the mutation.
func (*MemoMutation) TagsCleared ¶
func (m *MemoMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*MemoMutation) TagsIDs ¶
func (m *MemoMutation) TagsIDs() (ids []int)
TagsIDs returns the "tags" edge IDs in the mutation.
func (*MemoMutation) Title ¶
func (m *MemoMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (MemoMutation) Tx ¶
func (m MemoMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MemoMutation) Type ¶
func (m *MemoMutation) Type() string
Type returns the node type of this mutation (Memo).
func (*MemoMutation) UpdateTime ¶
func (m *MemoMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*MemoMutation) Version ¶
func (m *MemoMutation) Version() (r int, exists bool)
Version returns the value of the "version" field in the mutation.
func (*MemoMutation) Where ¶
func (m *MemoMutation) Where(ps ...predicate.Memo)
Where appends a list predicates to the MemoMutation builder.
func (*MemoMutation) WhereP ¶
func (m *MemoMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MemoMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MemoQuery ¶
type MemoQuery struct {
// contains filtered or unexported fields
}
MemoQuery is the builder for querying Memo entities.
func (*MemoQuery) Aggregate ¶
func (mq *MemoQuery) Aggregate(fns ...AggregateFunc) *MemoSelect
Aggregate returns a MemoSelect configured with the given aggregations.
func (*MemoQuery) Clone ¶
Clone returns a duplicate of the MemoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MemoQuery) ExecContext ¶
func (c *MemoQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MemoQuery) First ¶
First returns the first Memo entity from the query. Returns a *NotFoundError when no Memo was found.
func (*MemoQuery) FirstID ¶
FirstID returns the first Memo ID from the query. Returns a *NotFoundError when no Memo ID was found.
func (*MemoQuery) GroupBy ¶
func (mq *MemoQuery) GroupBy(field string, fields ...string) *MemoGroupBy
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 { OwnerID uuid.UUID `json:"owner_id,omitempty"` Count int `json:"count,omitempty"` } client.Memo.Query(). GroupBy(memo.FieldOwnerID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MemoQuery) Only ¶
Only returns a single Memo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Memo entity is found. Returns a *NotFoundError when no Memo entities are found.
func (*MemoQuery) OnlyID ¶
OnlyID is like Only, but returns the only Memo ID in the query. Returns a *NotSingularError when more than one Memo ID is found. Returns a *NotFoundError when no entities are found.
func (*MemoQuery) Order ¶
func (mq *MemoQuery) Order(o ...memo.OrderOption) *MemoQuery
Order specifies how the records should be ordered.
func (*MemoQuery) QueryCollaborations ¶
func (mq *MemoQuery) QueryCollaborations() *CollaborationQuery
QueryCollaborations chains the current query on the "collaborations" edge.
func (*MemoQuery) QueryCollaborators ¶
QueryCollaborators chains the current query on the "collaborators" edge.
func (*MemoQuery) QueryContext ¶
func (c *MemoQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MemoQuery) QueryOwner ¶
QueryOwner chains the current query on the "owner" edge.
func (*MemoQuery) QuerySubscribers ¶
QuerySubscribers chains the current query on the "subscribers" edge.
func (*MemoQuery) QuerySubscriptions ¶
func (mq *MemoQuery) QuerySubscriptions() *SubscriptionQuery
QuerySubscriptions chains the current query on the "subscriptions" edge.
func (*MemoQuery) Select ¶
func (mq *MemoQuery) Select(fields ...string) *MemoSelect
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 { OwnerID uuid.UUID `json:"owner_id,omitempty"` } client.Memo.Query(). Select(memo.FieldOwnerID). Scan(ctx, &v)
func (*MemoQuery) 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 (*MemoQuery) WithCollaborations ¶
func (mq *MemoQuery) WithCollaborations(opts ...func(*CollaborationQuery)) *MemoQuery
WithCollaborations tells the query-builder to eager-load the nodes that are connected to the "collaborations" edge. The optional arguments are used to configure the query builder of the edge.
func (*MemoQuery) WithCollaborators ¶
WithCollaborators tells the query-builder to eager-load the nodes that are connected to the "collaborators" edge. The optional arguments are used to configure the query builder of the edge.
func (*MemoQuery) WithOwner ¶
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
func (*MemoQuery) WithSubscribers ¶
WithSubscribers tells the query-builder to eager-load the nodes that are connected to the "subscribers" edge. The optional arguments are used to configure the query builder of the edge.
func (*MemoQuery) WithSubscriptions ¶
func (mq *MemoQuery) WithSubscriptions(opts ...func(*SubscriptionQuery)) *MemoQuery
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.
type MemoSelect ¶
type MemoSelect struct { *MemoQuery // contains filtered or unexported fields }
MemoSelect is the builder for selecting fields of Memo entities.
func (*MemoSelect) Aggregate ¶
func (ms *MemoSelect) Aggregate(fns ...AggregateFunc) *MemoSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MemoSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MemoSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (MemoSelect) ExecContext ¶
func (c MemoSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MemoSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MemoSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MemoSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MemoSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (MemoSelect) QueryContext ¶
func (c MemoSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MemoSelect) Scan ¶
func (ms *MemoSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MemoSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MemoUpdate ¶
type MemoUpdate struct {
// contains filtered or unexported fields
}
MemoUpdate is the builder for updating Memo entities.
func (*MemoUpdate) AddCollaborationIDs ¶
func (mu *MemoUpdate) AddCollaborationIDs(ids ...int) *MemoUpdate
AddCollaborationIDs adds the "collaborations" edge to the Collaboration entity by IDs.
func (*MemoUpdate) AddCollaborations ¶
func (mu *MemoUpdate) AddCollaborations(c ...*Collaboration) *MemoUpdate
AddCollaborations adds the "collaborations" edges to the Collaboration entity.
func (*MemoUpdate) AddCollaboratorIDs ¶
func (mu *MemoUpdate) AddCollaboratorIDs(ids ...uuid.UUID) *MemoUpdate
AddCollaboratorIDs adds the "collaborators" edge to the User entity by IDs.
func (*MemoUpdate) AddCollaborators ¶
func (mu *MemoUpdate) AddCollaborators(u ...*User) *MemoUpdate
AddCollaborators adds the "collaborators" edges to the User entity.
func (*MemoUpdate) AddSubscriberIDs ¶
func (mu *MemoUpdate) AddSubscriberIDs(ids ...uuid.UUID) *MemoUpdate
AddSubscriberIDs adds the "subscribers" edge to the User entity by IDs.
func (*MemoUpdate) AddSubscribers ¶
func (mu *MemoUpdate) AddSubscribers(u ...*User) *MemoUpdate
AddSubscribers adds the "subscribers" edges to the User entity.
func (*MemoUpdate) AddSubscriptionIDs ¶
func (mu *MemoUpdate) AddSubscriptionIDs(ids ...int) *MemoUpdate
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*MemoUpdate) AddSubscriptions ¶
func (mu *MemoUpdate) AddSubscriptions(s ...*Subscription) *MemoUpdate
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*MemoUpdate) AddTagIDs ¶
func (mu *MemoUpdate) AddTagIDs(ids ...int) *MemoUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*MemoUpdate) AddTags ¶
func (mu *MemoUpdate) AddTags(t ...*Tag) *MemoUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*MemoUpdate) AddVersion ¶
func (mu *MemoUpdate) AddVersion(i int) *MemoUpdate
AddVersion adds i to the "version" field.
func (*MemoUpdate) ClearCollaborations ¶
func (mu *MemoUpdate) ClearCollaborations() *MemoUpdate
ClearCollaborations clears all "collaborations" edges to the Collaboration entity.
func (*MemoUpdate) ClearCollaborators ¶
func (mu *MemoUpdate) ClearCollaborators() *MemoUpdate
ClearCollaborators clears all "collaborators" edges to the User entity.
func (*MemoUpdate) ClearOwner ¶
func (mu *MemoUpdate) ClearOwner() *MemoUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*MemoUpdate) ClearSubscribers ¶
func (mu *MemoUpdate) ClearSubscribers() *MemoUpdate
ClearSubscribers clears all "subscribers" edges to the User entity.
func (*MemoUpdate) ClearSubscriptions ¶
func (mu *MemoUpdate) ClearSubscriptions() *MemoUpdate
ClearSubscriptions clears all "subscriptions" edges to the Subscription entity.
func (*MemoUpdate) ClearTags ¶
func (mu *MemoUpdate) ClearTags() *MemoUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*MemoUpdate) Exec ¶
func (mu *MemoUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MemoUpdate) ExecContext ¶
func (c *MemoUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MemoUpdate) ExecX ¶
func (mu *MemoUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemoUpdate) Mutation ¶
func (mu *MemoUpdate) Mutation() *MemoMutation
Mutation returns the MemoMutation object of the builder.
func (*MemoUpdate) QueryContext ¶
func (c *MemoUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MemoUpdate) RemoveCollaborationIDs ¶
func (mu *MemoUpdate) RemoveCollaborationIDs(ids ...int) *MemoUpdate
RemoveCollaborationIDs removes the "collaborations" edge to Collaboration entities by IDs.
func (*MemoUpdate) RemoveCollaborations ¶
func (mu *MemoUpdate) RemoveCollaborations(c ...*Collaboration) *MemoUpdate
RemoveCollaborations removes "collaborations" edges to Collaboration entities.
func (*MemoUpdate) RemoveCollaboratorIDs ¶
func (mu *MemoUpdate) RemoveCollaboratorIDs(ids ...uuid.UUID) *MemoUpdate
RemoveCollaboratorIDs removes the "collaborators" edge to User entities by IDs.
func (*MemoUpdate) RemoveCollaborators ¶
func (mu *MemoUpdate) RemoveCollaborators(u ...*User) *MemoUpdate
RemoveCollaborators removes "collaborators" edges to User entities.
func (*MemoUpdate) RemoveSubscriberIDs ¶
func (mu *MemoUpdate) RemoveSubscriberIDs(ids ...uuid.UUID) *MemoUpdate
RemoveSubscriberIDs removes the "subscribers" edge to User entities by IDs.
func (*MemoUpdate) RemoveSubscribers ¶
func (mu *MemoUpdate) RemoveSubscribers(u ...*User) *MemoUpdate
RemoveSubscribers removes "subscribers" edges to User entities.
func (*MemoUpdate) RemoveSubscriptionIDs ¶
func (mu *MemoUpdate) RemoveSubscriptionIDs(ids ...int) *MemoUpdate
RemoveSubscriptionIDs removes the "subscriptions" edge to Subscription entities by IDs.
func (*MemoUpdate) RemoveSubscriptions ¶
func (mu *MemoUpdate) RemoveSubscriptions(s ...*Subscription) *MemoUpdate
RemoveSubscriptions removes "subscriptions" edges to Subscription entities.
func (*MemoUpdate) RemoveTagIDs ¶
func (mu *MemoUpdate) RemoveTagIDs(ids ...int) *MemoUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*MemoUpdate) RemoveTags ¶
func (mu *MemoUpdate) RemoveTags(t ...*Tag) *MemoUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*MemoUpdate) Save ¶
func (mu *MemoUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MemoUpdate) SaveX ¶
func (mu *MemoUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MemoUpdate) SetContent ¶
func (mu *MemoUpdate) SetContent(s string) *MemoUpdate
SetContent sets the "content" field.
func (*MemoUpdate) SetIsPublished ¶
func (mu *MemoUpdate) SetIsPublished(b bool) *MemoUpdate
SetIsPublished sets the "is_published" field.
func (*MemoUpdate) SetNillableContent ¶
func (mu *MemoUpdate) SetNillableContent(s *string) *MemoUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*MemoUpdate) SetNillableIsPublished ¶
func (mu *MemoUpdate) SetNillableIsPublished(b *bool) *MemoUpdate
SetNillableIsPublished sets the "is_published" field if the given value is not nil.
func (*MemoUpdate) SetNillableOwnerID ¶
func (mu *MemoUpdate) SetNillableOwnerID(u *uuid.UUID) *MemoUpdate
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*MemoUpdate) SetNillableTitle ¶
func (mu *MemoUpdate) SetNillableTitle(s *string) *MemoUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*MemoUpdate) SetNillableUpdateTime ¶
func (mu *MemoUpdate) SetNillableUpdateTime(t *time.Time) *MemoUpdate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*MemoUpdate) SetNillableVersion ¶
func (mu *MemoUpdate) SetNillableVersion(i *int) *MemoUpdate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*MemoUpdate) SetOwner ¶
func (mu *MemoUpdate) SetOwner(u *User) *MemoUpdate
SetOwner sets the "owner" edge to the User entity.
func (*MemoUpdate) SetOwnerID ¶
func (mu *MemoUpdate) SetOwnerID(u uuid.UUID) *MemoUpdate
SetOwnerID sets the "owner_id" field.
func (*MemoUpdate) SetTitle ¶
func (mu *MemoUpdate) SetTitle(s string) *MemoUpdate
SetTitle sets the "title" field.
func (*MemoUpdate) SetUpdateTime ¶
func (mu *MemoUpdate) SetUpdateTime(t time.Time) *MemoUpdate
SetUpdateTime sets the "update_time" field.
func (*MemoUpdate) SetVersion ¶
func (mu *MemoUpdate) SetVersion(i int) *MemoUpdate
SetVersion sets the "version" field.
func (*MemoUpdate) Where ¶
func (mu *MemoUpdate) Where(ps ...predicate.Memo) *MemoUpdate
Where appends a list predicates to the MemoUpdate builder.
type MemoUpdateOne ¶
type MemoUpdateOne struct {
// contains filtered or unexported fields
}
MemoUpdateOne is the builder for updating a single Memo entity.
func (*MemoUpdateOne) AddCollaborationIDs ¶
func (muo *MemoUpdateOne) AddCollaborationIDs(ids ...int) *MemoUpdateOne
AddCollaborationIDs adds the "collaborations" edge to the Collaboration entity by IDs.
func (*MemoUpdateOne) AddCollaborations ¶
func (muo *MemoUpdateOne) AddCollaborations(c ...*Collaboration) *MemoUpdateOne
AddCollaborations adds the "collaborations" edges to the Collaboration entity.
func (*MemoUpdateOne) AddCollaboratorIDs ¶
func (muo *MemoUpdateOne) AddCollaboratorIDs(ids ...uuid.UUID) *MemoUpdateOne
AddCollaboratorIDs adds the "collaborators" edge to the User entity by IDs.
func (*MemoUpdateOne) AddCollaborators ¶
func (muo *MemoUpdateOne) AddCollaborators(u ...*User) *MemoUpdateOne
AddCollaborators adds the "collaborators" edges to the User entity.
func (*MemoUpdateOne) AddSubscriberIDs ¶
func (muo *MemoUpdateOne) AddSubscriberIDs(ids ...uuid.UUID) *MemoUpdateOne
AddSubscriberIDs adds the "subscribers" edge to the User entity by IDs.
func (*MemoUpdateOne) AddSubscribers ¶
func (muo *MemoUpdateOne) AddSubscribers(u ...*User) *MemoUpdateOne
AddSubscribers adds the "subscribers" edges to the User entity.
func (*MemoUpdateOne) AddSubscriptionIDs ¶
func (muo *MemoUpdateOne) AddSubscriptionIDs(ids ...int) *MemoUpdateOne
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*MemoUpdateOne) AddSubscriptions ¶
func (muo *MemoUpdateOne) AddSubscriptions(s ...*Subscription) *MemoUpdateOne
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*MemoUpdateOne) AddTagIDs ¶
func (muo *MemoUpdateOne) AddTagIDs(ids ...int) *MemoUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*MemoUpdateOne) AddTags ¶
func (muo *MemoUpdateOne) AddTags(t ...*Tag) *MemoUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*MemoUpdateOne) AddVersion ¶
func (muo *MemoUpdateOne) AddVersion(i int) *MemoUpdateOne
AddVersion adds i to the "version" field.
func (*MemoUpdateOne) ClearCollaborations ¶
func (muo *MemoUpdateOne) ClearCollaborations() *MemoUpdateOne
ClearCollaborations clears all "collaborations" edges to the Collaboration entity.
func (*MemoUpdateOne) ClearCollaborators ¶
func (muo *MemoUpdateOne) ClearCollaborators() *MemoUpdateOne
ClearCollaborators clears all "collaborators" edges to the User entity.
func (*MemoUpdateOne) ClearOwner ¶
func (muo *MemoUpdateOne) ClearOwner() *MemoUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*MemoUpdateOne) ClearSubscribers ¶
func (muo *MemoUpdateOne) ClearSubscribers() *MemoUpdateOne
ClearSubscribers clears all "subscribers" edges to the User entity.
func (*MemoUpdateOne) ClearSubscriptions ¶
func (muo *MemoUpdateOne) ClearSubscriptions() *MemoUpdateOne
ClearSubscriptions clears all "subscriptions" edges to the Subscription entity.
func (*MemoUpdateOne) ClearTags ¶
func (muo *MemoUpdateOne) ClearTags() *MemoUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*MemoUpdateOne) Exec ¶
func (muo *MemoUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MemoUpdateOne) ExecContext ¶
func (c *MemoUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MemoUpdateOne) ExecX ¶
func (muo *MemoUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemoUpdateOne) Mutation ¶
func (muo *MemoUpdateOne) Mutation() *MemoMutation
Mutation returns the MemoMutation object of the builder.
func (*MemoUpdateOne) QueryContext ¶
func (c *MemoUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MemoUpdateOne) RemoveCollaborationIDs ¶
func (muo *MemoUpdateOne) RemoveCollaborationIDs(ids ...int) *MemoUpdateOne
RemoveCollaborationIDs removes the "collaborations" edge to Collaboration entities by IDs.
func (*MemoUpdateOne) RemoveCollaborations ¶
func (muo *MemoUpdateOne) RemoveCollaborations(c ...*Collaboration) *MemoUpdateOne
RemoveCollaborations removes "collaborations" edges to Collaboration entities.
func (*MemoUpdateOne) RemoveCollaboratorIDs ¶
func (muo *MemoUpdateOne) RemoveCollaboratorIDs(ids ...uuid.UUID) *MemoUpdateOne
RemoveCollaboratorIDs removes the "collaborators" edge to User entities by IDs.
func (*MemoUpdateOne) RemoveCollaborators ¶
func (muo *MemoUpdateOne) RemoveCollaborators(u ...*User) *MemoUpdateOne
RemoveCollaborators removes "collaborators" edges to User entities.
func (*MemoUpdateOne) RemoveSubscriberIDs ¶
func (muo *MemoUpdateOne) RemoveSubscriberIDs(ids ...uuid.UUID) *MemoUpdateOne
RemoveSubscriberIDs removes the "subscribers" edge to User entities by IDs.
func (*MemoUpdateOne) RemoveSubscribers ¶
func (muo *MemoUpdateOne) RemoveSubscribers(u ...*User) *MemoUpdateOne
RemoveSubscribers removes "subscribers" edges to User entities.
func (*MemoUpdateOne) RemoveSubscriptionIDs ¶
func (muo *MemoUpdateOne) RemoveSubscriptionIDs(ids ...int) *MemoUpdateOne
RemoveSubscriptionIDs removes the "subscriptions" edge to Subscription entities by IDs.
func (*MemoUpdateOne) RemoveSubscriptions ¶
func (muo *MemoUpdateOne) RemoveSubscriptions(s ...*Subscription) *MemoUpdateOne
RemoveSubscriptions removes "subscriptions" edges to Subscription entities.
func (*MemoUpdateOne) RemoveTagIDs ¶
func (muo *MemoUpdateOne) RemoveTagIDs(ids ...int) *MemoUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*MemoUpdateOne) RemoveTags ¶
func (muo *MemoUpdateOne) RemoveTags(t ...*Tag) *MemoUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*MemoUpdateOne) Save ¶
func (muo *MemoUpdateOne) Save(ctx context.Context) (*Memo, error)
Save executes the query and returns the updated Memo entity.
func (*MemoUpdateOne) SaveX ¶
func (muo *MemoUpdateOne) SaveX(ctx context.Context) *Memo
SaveX is like Save, but panics if an error occurs.
func (*MemoUpdateOne) Select ¶
func (muo *MemoUpdateOne) Select(field string, fields ...string) *MemoUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MemoUpdateOne) SetContent ¶
func (muo *MemoUpdateOne) SetContent(s string) *MemoUpdateOne
SetContent sets the "content" field.
func (*MemoUpdateOne) SetIsPublished ¶
func (muo *MemoUpdateOne) SetIsPublished(b bool) *MemoUpdateOne
SetIsPublished sets the "is_published" field.
func (*MemoUpdateOne) SetNillableContent ¶
func (muo *MemoUpdateOne) SetNillableContent(s *string) *MemoUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*MemoUpdateOne) SetNillableIsPublished ¶
func (muo *MemoUpdateOne) SetNillableIsPublished(b *bool) *MemoUpdateOne
SetNillableIsPublished sets the "is_published" field if the given value is not nil.
func (*MemoUpdateOne) SetNillableOwnerID ¶
func (muo *MemoUpdateOne) SetNillableOwnerID(u *uuid.UUID) *MemoUpdateOne
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*MemoUpdateOne) SetNillableTitle ¶
func (muo *MemoUpdateOne) SetNillableTitle(s *string) *MemoUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*MemoUpdateOne) SetNillableUpdateTime ¶
func (muo *MemoUpdateOne) SetNillableUpdateTime(t *time.Time) *MemoUpdateOne
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*MemoUpdateOne) SetNillableVersion ¶
func (muo *MemoUpdateOne) SetNillableVersion(i *int) *MemoUpdateOne
SetNillableVersion sets the "version" field if the given value is not nil.
func (*MemoUpdateOne) SetOwner ¶
func (muo *MemoUpdateOne) SetOwner(u *User) *MemoUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*MemoUpdateOne) SetOwnerID ¶
func (muo *MemoUpdateOne) SetOwnerID(u uuid.UUID) *MemoUpdateOne
SetOwnerID sets the "owner_id" field.
func (*MemoUpdateOne) SetTitle ¶
func (muo *MemoUpdateOne) SetTitle(s string) *MemoUpdateOne
SetTitle sets the "title" field.
func (*MemoUpdateOne) SetUpdateTime ¶
func (muo *MemoUpdateOne) SetUpdateTime(t time.Time) *MemoUpdateOne
SetUpdateTime sets the "update_time" field.
func (*MemoUpdateOne) SetVersion ¶
func (muo *MemoUpdateOne) SetVersion(i int) *MemoUpdateOne
SetVersion sets the "version" field.
func (*MemoUpdateOne) Where ¶
func (muo *MemoUpdateOne) Where(ps ...predicate.Memo) *MemoUpdateOne
Where appends a list predicates to the MemoUpdate builder.
type MemoUpsert ¶
MemoUpsert is the "OnConflict" setter.
func (*MemoUpsert) AddVersion ¶
func (u *MemoUpsert) AddVersion(v int) *MemoUpsert
AddVersion adds v to the "version" field.
func (*MemoUpsert) SetContent ¶
func (u *MemoUpsert) SetContent(v string) *MemoUpsert
SetContent sets the "content" field.
func (*MemoUpsert) SetIsPublished ¶
func (u *MemoUpsert) SetIsPublished(v bool) *MemoUpsert
SetIsPublished sets the "is_published" field.
func (*MemoUpsert) SetOwnerID ¶
func (u *MemoUpsert) SetOwnerID(v uuid.UUID) *MemoUpsert
SetOwnerID sets the "owner_id" field.
func (*MemoUpsert) SetTitle ¶
func (u *MemoUpsert) SetTitle(v string) *MemoUpsert
SetTitle sets the "title" field.
func (*MemoUpsert) SetUpdateTime ¶
func (u *MemoUpsert) SetUpdateTime(v time.Time) *MemoUpsert
SetUpdateTime sets the "update_time" field.
func (*MemoUpsert) SetVersion ¶
func (u *MemoUpsert) SetVersion(v int) *MemoUpsert
SetVersion sets the "version" field.
func (*MemoUpsert) UpdateContent ¶
func (u *MemoUpsert) UpdateContent() *MemoUpsert
UpdateContent sets the "content" field to the value that was provided on create.
func (*MemoUpsert) UpdateIsPublished ¶
func (u *MemoUpsert) UpdateIsPublished() *MemoUpsert
UpdateIsPublished sets the "is_published" field to the value that was provided on create.
func (*MemoUpsert) UpdateOwnerID ¶
func (u *MemoUpsert) UpdateOwnerID() *MemoUpsert
UpdateOwnerID sets the "owner_id" field to the value that was provided on create.
func (*MemoUpsert) UpdateTitle ¶
func (u *MemoUpsert) UpdateTitle() *MemoUpsert
UpdateTitle sets the "title" field to the value that was provided on create.
func (*MemoUpsert) UpdateUpdateTime ¶
func (u *MemoUpsert) UpdateUpdateTime() *MemoUpsert
UpdateUpdateTime sets the "update_time" field to the value that was provided on create.
func (*MemoUpsert) UpdateVersion ¶
func (u *MemoUpsert) UpdateVersion() *MemoUpsert
UpdateVersion sets the "version" field to the value that was provided on create.
type MemoUpsertBulk ¶
type MemoUpsertBulk struct {
// contains filtered or unexported fields
}
MemoUpsertBulk is the builder for "upsert"-ing a bulk of Memo nodes.
func (*MemoUpsertBulk) AddVersion ¶
func (u *MemoUpsertBulk) AddVersion(v int) *MemoUpsertBulk
AddVersion adds v to the "version" field.
func (*MemoUpsertBulk) DoNothing ¶
func (u *MemoUpsertBulk) DoNothing() *MemoUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MemoUpsertBulk) Exec ¶
func (u *MemoUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MemoUpsertBulk) ExecX ¶
func (u *MemoUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemoUpsertBulk) Ignore ¶
func (u *MemoUpsertBulk) Ignore() *MemoUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Memo.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MemoUpsertBulk) SetContent ¶
func (u *MemoUpsertBulk) SetContent(v string) *MemoUpsertBulk
SetContent sets the "content" field.
func (*MemoUpsertBulk) SetIsPublished ¶
func (u *MemoUpsertBulk) SetIsPublished(v bool) *MemoUpsertBulk
SetIsPublished sets the "is_published" field.
func (*MemoUpsertBulk) SetOwnerID ¶
func (u *MemoUpsertBulk) SetOwnerID(v uuid.UUID) *MemoUpsertBulk
SetOwnerID sets the "owner_id" field.
func (*MemoUpsertBulk) SetTitle ¶
func (u *MemoUpsertBulk) SetTitle(v string) *MemoUpsertBulk
SetTitle sets the "title" field.
func (*MemoUpsertBulk) SetUpdateTime ¶
func (u *MemoUpsertBulk) SetUpdateTime(v time.Time) *MemoUpsertBulk
SetUpdateTime sets the "update_time" field.
func (*MemoUpsertBulk) SetVersion ¶
func (u *MemoUpsertBulk) SetVersion(v int) *MemoUpsertBulk
SetVersion sets the "version" field.
func (*MemoUpsertBulk) Update ¶
func (u *MemoUpsertBulk) Update(set func(*MemoUpsert)) *MemoUpsertBulk
Update allows overriding fields `UPDATE` values. See the MemoCreateBulk.OnConflict documentation for more info.
func (*MemoUpsertBulk) UpdateContent ¶
func (u *MemoUpsertBulk) UpdateContent() *MemoUpsertBulk
UpdateContent sets the "content" field to the value that was provided on create.
func (*MemoUpsertBulk) UpdateIsPublished ¶
func (u *MemoUpsertBulk) UpdateIsPublished() *MemoUpsertBulk
UpdateIsPublished sets the "is_published" field to the value that was provided on create.
func (*MemoUpsertBulk) UpdateNewValues ¶
func (u *MemoUpsertBulk) UpdateNewValues() *MemoUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Memo.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(memo.FieldID) }), ). Exec(ctx)
func (*MemoUpsertBulk) UpdateOwnerID ¶
func (u *MemoUpsertBulk) UpdateOwnerID() *MemoUpsertBulk
UpdateOwnerID sets the "owner_id" field to the value that was provided on create.
func (*MemoUpsertBulk) UpdateTitle ¶
func (u *MemoUpsertBulk) UpdateTitle() *MemoUpsertBulk
UpdateTitle sets the "title" field to the value that was provided on create.
func (*MemoUpsertBulk) UpdateUpdateTime ¶
func (u *MemoUpsertBulk) UpdateUpdateTime() *MemoUpsertBulk
UpdateUpdateTime sets the "update_time" field to the value that was provided on create.
func (*MemoUpsertBulk) UpdateVersion ¶
func (u *MemoUpsertBulk) UpdateVersion() *MemoUpsertBulk
UpdateVersion sets the "version" field to the value that was provided on create.
type MemoUpsertOne ¶
type MemoUpsertOne struct {
// contains filtered or unexported fields
}
MemoUpsertOne is the builder for "upsert"-ing
one Memo node.
func (*MemoUpsertOne) AddVersion ¶
func (u *MemoUpsertOne) AddVersion(v int) *MemoUpsertOne
AddVersion adds v to the "version" field.
func (*MemoUpsertOne) DoNothing ¶
func (u *MemoUpsertOne) DoNothing() *MemoUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MemoUpsertOne) Exec ¶
func (u *MemoUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*MemoUpsertOne) ExecX ¶
func (u *MemoUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemoUpsertOne) IDX ¶
func (u *MemoUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*MemoUpsertOne) Ignore ¶
func (u *MemoUpsertOne) Ignore() *MemoUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Memo.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MemoUpsertOne) SetContent ¶
func (u *MemoUpsertOne) SetContent(v string) *MemoUpsertOne
SetContent sets the "content" field.
func (*MemoUpsertOne) SetIsPublished ¶
func (u *MemoUpsertOne) SetIsPublished(v bool) *MemoUpsertOne
SetIsPublished sets the "is_published" field.
func (*MemoUpsertOne) SetOwnerID ¶
func (u *MemoUpsertOne) SetOwnerID(v uuid.UUID) *MemoUpsertOne
SetOwnerID sets the "owner_id" field.
func (*MemoUpsertOne) SetTitle ¶
func (u *MemoUpsertOne) SetTitle(v string) *MemoUpsertOne
SetTitle sets the "title" field.
func (*MemoUpsertOne) SetUpdateTime ¶
func (u *MemoUpsertOne) SetUpdateTime(v time.Time) *MemoUpsertOne
SetUpdateTime sets the "update_time" field.
func (*MemoUpsertOne) SetVersion ¶
func (u *MemoUpsertOne) SetVersion(v int) *MemoUpsertOne
SetVersion sets the "version" field.
func (*MemoUpsertOne) Update ¶
func (u *MemoUpsertOne) Update(set func(*MemoUpsert)) *MemoUpsertOne
Update allows overriding fields `UPDATE` values. See the MemoCreate.OnConflict documentation for more info.
func (*MemoUpsertOne) UpdateContent ¶
func (u *MemoUpsertOne) UpdateContent() *MemoUpsertOne
UpdateContent sets the "content" field to the value that was provided on create.
func (*MemoUpsertOne) UpdateIsPublished ¶
func (u *MemoUpsertOne) UpdateIsPublished() *MemoUpsertOne
UpdateIsPublished sets the "is_published" field to the value that was provided on create.
func (*MemoUpsertOne) UpdateNewValues ¶
func (u *MemoUpsertOne) UpdateNewValues() *MemoUpsertOne
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.Memo.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(memo.FieldID) }), ). Exec(ctx)
func (*MemoUpsertOne) UpdateOwnerID ¶
func (u *MemoUpsertOne) UpdateOwnerID() *MemoUpsertOne
UpdateOwnerID sets the "owner_id" field to the value that was provided on create.
func (*MemoUpsertOne) UpdateTitle ¶
func (u *MemoUpsertOne) UpdateTitle() *MemoUpsertOne
UpdateTitle sets the "title" field to the value that was provided on create.
func (*MemoUpsertOne) UpdateUpdateTime ¶
func (u *MemoUpsertOne) UpdateUpdateTime() *MemoUpsertOne
UpdateUpdateTime sets the "update_time" field to the value that was provided on create.
func (*MemoUpsertOne) UpdateVersion ¶
func (u *MemoUpsertOne) UpdateVersion() *MemoUpsertOne
UpdateVersion sets the "version" field to the value that was provided on create.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Subscription ¶
type Subscription struct { // ID of the ent. ID int `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID uuid.UUID `json:"user_id,omitempty"` // MemoID holds the value of the "memo_id" field. MemoID uuid.UUID `json:"memo_id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,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) ExecContext ¶
func (c *Subscription) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Subscription) QueryContext ¶
func (c *Subscription) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Subscription) QueryMemo ¶
func (s *Subscription) QueryMemo() *MemoQuery
QueryMemo queries the "memo" edge of the Subscription entity.
func (*Subscription) QuerySubscriber ¶
func (s *Subscription) QuerySubscriber() *UserQuery
QuerySubscriber queries the "subscriber" 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 int) *SubscriptionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SubscriptionClient) ExecContext ¶
func (c *SubscriptionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SubscriptionClient) Get ¶
func (c *SubscriptionClient) Get(ctx context.Context, id int) (*Subscription, error)
Get returns a Subscription entity by its id.
func (*SubscriptionClient) GetX ¶
func (c *SubscriptionClient) GetX(ctx context.Context, id int) *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) Intercept ¶
func (c *SubscriptionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `subscription.Intercept(f(g(h())))`.
func (*SubscriptionClient) Interceptors ¶
func (c *SubscriptionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SubscriptionClient) MapCreateBulk ¶
func (c *SubscriptionClient) MapCreateBulk(slice any, setFunc func(*SubscriptionCreate, int)) *SubscriptionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SubscriptionClient) Query ¶
func (c *SubscriptionClient) Query() *SubscriptionQuery
Query returns a query builder for Subscription.
func (*SubscriptionClient) QueryContext ¶
func (c *SubscriptionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SubscriptionClient) QueryMemo ¶
func (c *SubscriptionClient) QueryMemo(s *Subscription) *MemoQuery
QueryMemo queries the memo edge of a Subscription.
func (*SubscriptionClient) QuerySubscriber ¶
func (c *SubscriptionClient) QuerySubscriber(s *Subscription) *UserQuery
QuerySubscriber queries the subscriber 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 int) *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) Exec ¶
func (sc *SubscriptionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionCreate) ExecContext ¶
func (c *SubscriptionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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(). SetUserID(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) { SetUserID(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) QueryContext ¶
func (c *SubscriptionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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) SetCreateTime ¶
func (sc *SubscriptionCreate) SetCreateTime(t time.Time) *SubscriptionCreate
SetCreateTime sets the "create_time" field.
func (*SubscriptionCreate) SetMemo ¶
func (sc *SubscriptionCreate) SetMemo(m *Memo) *SubscriptionCreate
SetMemo sets the "memo" edge to the Memo entity.
func (*SubscriptionCreate) SetMemoID ¶
func (sc *SubscriptionCreate) SetMemoID(u uuid.UUID) *SubscriptionCreate
SetMemoID sets the "memo_id" field.
func (*SubscriptionCreate) SetNillableCreateTime ¶
func (sc *SubscriptionCreate) SetNillableCreateTime(t *time.Time) *SubscriptionCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*SubscriptionCreate) SetSubscriber ¶
func (sc *SubscriptionCreate) SetSubscriber(u *User) *SubscriptionCreate
SetSubscriber sets the "subscriber" edge to the User entity.
func (*SubscriptionCreate) SetSubscriberID ¶
func (sc *SubscriptionCreate) SetSubscriberID(id uuid.UUID) *SubscriptionCreate
SetSubscriberID sets the "subscriber" edge to the User entity by ID.
func (*SubscriptionCreate) SetUserID ¶
func (sc *SubscriptionCreate) SetUserID(u uuid.UUID) *SubscriptionCreate
SetUserID sets the "user_id" 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) ExecContext ¶
func (c *SubscriptionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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) { SetUserID(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) QueryContext ¶
func (c *SubscriptionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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) ExecContext ¶
func (c *SubscriptionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SubscriptionDelete) ExecX ¶
func (sd *SubscriptionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionDelete) QueryContext ¶
func (c *SubscriptionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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.
func (*SubscriptionDeleteOne) Where ¶
func (sdo *SubscriptionDeleteOne) Where(ps ...predicate.Subscription) *SubscriptionDeleteOne
Where appends a list predicates to the SubscriptionDelete builder.
type SubscriptionEdges ¶
type SubscriptionEdges struct { // Subscriber holds the value of the subscriber edge. Subscriber *User `json:"subscriber,omitempty"` // Memo holds the value of the memo edge. Memo *Memo `json:"memo,omitempty"` // contains filtered or unexported fields }
SubscriptionEdges holds the relations/edges for other nodes in the graph.
func (SubscriptionEdges) MemoOrErr ¶
func (e SubscriptionEdges) MemoOrErr() (*Memo, error)
MemoOrErr returns the Memo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SubscriptionEdges) SubscriberOrErr ¶
func (e SubscriptionEdges) SubscriberOrErr() (*User, error)
SubscriberOrErr returns the Subscriber value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
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 any) error
Scan applies the selector 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) 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) 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) 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) ClearMemo ¶
func (m *SubscriptionMutation) ClearMemo()
ClearMemo clears the "memo" edge to the Memo entity.
func (*SubscriptionMutation) ClearSubscriber ¶
func (m *SubscriptionMutation) ClearSubscriber()
ClearSubscriber clears the "subscriber" edge to the User 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) CreateTime ¶
func (m *SubscriptionMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" 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) ExecContext ¶
func (c *SubscriptionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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 int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SubscriptionMutation) IDs ¶
func (m *SubscriptionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SubscriptionMutation) MemoCleared ¶
func (m *SubscriptionMutation) MemoCleared() bool
MemoCleared reports if the "memo" edge to the Memo entity was cleared.
func (*SubscriptionMutation) MemoID ¶
func (m *SubscriptionMutation) MemoID() (r uuid.UUID, exists bool)
MemoID returns the value of the "memo_id" field in the mutation.
func (*SubscriptionMutation) MemoIDs ¶
func (m *SubscriptionMutation) MemoIDs() (ids []uuid.UUID)
MemoIDs returns the "memo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MemoID instead. It exists only for internal usage by the builders.
func (*SubscriptionMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" 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) OldMemoID ¶
OldMemoID returns the old "memo_id" 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) OldUserID ¶
OldUserID returns the old "user_id" 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) QueryContext ¶
func (c *SubscriptionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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) ResetCreateTime ¶
func (m *SubscriptionMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" 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) ResetMemo ¶
func (m *SubscriptionMutation) ResetMemo()
ResetMemo resets all changes to the "memo" edge.
func (*SubscriptionMutation) ResetMemoID ¶
func (m *SubscriptionMutation) ResetMemoID()
ResetMemoID resets all changes to the "memo_id" field.
func (*SubscriptionMutation) ResetSubscriber ¶
func (m *SubscriptionMutation) ResetSubscriber()
ResetSubscriber resets all changes to the "subscriber" edge.
func (*SubscriptionMutation) ResetUserID ¶
func (m *SubscriptionMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*SubscriptionMutation) SetCreateTime ¶
func (m *SubscriptionMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" 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) SetMemoID ¶
func (m *SubscriptionMutation) SetMemoID(u uuid.UUID)
SetMemoID sets the "memo_id" field.
func (*SubscriptionMutation) SetOp ¶
func (m *SubscriptionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SubscriptionMutation) SetSubscriberID ¶
func (m *SubscriptionMutation) SetSubscriberID(id uuid.UUID)
SetSubscriberID sets the "subscriber" edge to the User entity by id.
func (*SubscriptionMutation) SetUserID ¶
func (m *SubscriptionMutation) SetUserID(u uuid.UUID)
SetUserID sets the "user_id" field.
func (*SubscriptionMutation) SubscriberCleared ¶
func (m *SubscriptionMutation) SubscriberCleared() bool
SubscriberCleared reports if the "subscriber" edge to the User entity was cleared.
func (*SubscriptionMutation) SubscriberID ¶
func (m *SubscriptionMutation) SubscriberID() (id uuid.UUID, exists bool)
SubscriberID returns the "subscriber" edge ID in the mutation.
func (*SubscriptionMutation) SubscriberIDs ¶
func (m *SubscriptionMutation) SubscriberIDs() (ids []uuid.UUID)
SubscriberIDs returns the "subscriber" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SubscriberID instead. It exists only for internal usage by the builders.
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) UserID ¶
func (m *SubscriptionMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*SubscriptionMutation) Where ¶
func (m *SubscriptionMutation) Where(ps ...predicate.Subscription)
Where appends a list predicates to the SubscriptionMutation builder.
func (*SubscriptionMutation) WhereP ¶
func (m *SubscriptionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SubscriptionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SubscriptionQuery ¶
type SubscriptionQuery struct {
// contains filtered or unexported fields
}
SubscriptionQuery is the builder for querying Subscription entities.
func (*SubscriptionQuery) Aggregate ¶
func (sq *SubscriptionQuery) Aggregate(fns ...AggregateFunc) *SubscriptionSelect
Aggregate returns a SubscriptionSelect configured with the given aggregations.
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) ExecContext ¶
func (c *SubscriptionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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 ¶
func (sq *SubscriptionQuery) FirstID(ctx context.Context) (id int, err error)
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) int
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 { UserID uuid.UUID `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.Subscription.Query(). GroupBy(subscription.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SubscriptionQuery) IDs ¶
func (sq *SubscriptionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Subscription IDs.
func (*SubscriptionQuery) IDsX ¶
func (sq *SubscriptionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SubscriptionQuery) Limit ¶
func (sq *SubscriptionQuery) Limit(limit int) *SubscriptionQuery
Limit the number of records to be returned by this query.
func (*SubscriptionQuery) Offset ¶
func (sq *SubscriptionQuery) Offset(offset int) *SubscriptionQuery
Offset to start from.
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 ¶
func (sq *SubscriptionQuery) OnlyID(ctx context.Context) (id int, err error)
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) int
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 ...subscription.OrderOption) *SubscriptionQuery
Order specifies how the records should be ordered.
func (*SubscriptionQuery) QueryContext ¶
func (c *SubscriptionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SubscriptionQuery) QueryMemo ¶
func (sq *SubscriptionQuery) QueryMemo() *MemoQuery
QueryMemo chains the current query on the "memo" edge.
func (*SubscriptionQuery) QuerySubscriber ¶
func (sq *SubscriptionQuery) QuerySubscriber() *UserQuery
QuerySubscriber chains the current query on the "subscriber" 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 { UserID uuid.UUID `json:"user_id,omitempty"` } client.Subscription.Query(). Select(subscription.FieldUserID). 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) WithMemo ¶
func (sq *SubscriptionQuery) WithMemo(opts ...func(*MemoQuery)) *SubscriptionQuery
WithMemo tells the query-builder to eager-load the nodes that are connected to the "memo" edge. The optional arguments are used to configure the query builder of the edge.
func (*SubscriptionQuery) WithSubscriber ¶
func (sq *SubscriptionQuery) WithSubscriber(opts ...func(*UserQuery)) *SubscriptionQuery
WithSubscriber tells the query-builder to eager-load the nodes that are connected to the "subscriber" 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) Aggregate ¶
func (ss *SubscriptionSelect) Aggregate(fns ...AggregateFunc) *SubscriptionSelect
Aggregate adds the given aggregation functions to the selector query.
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) ExecContext ¶
func (c SubscriptionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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) QueryContext ¶
func (c SubscriptionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SubscriptionSelect) Scan ¶
func (ss *SubscriptionSelect) Scan(ctx context.Context, v any) 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) ClearMemo ¶
func (su *SubscriptionUpdate) ClearMemo() *SubscriptionUpdate
ClearMemo clears the "memo" edge to the Memo entity.
func (*SubscriptionUpdate) ClearSubscriber ¶
func (su *SubscriptionUpdate) ClearSubscriber() *SubscriptionUpdate
ClearSubscriber clears the "subscriber" edge to the User entity.
func (*SubscriptionUpdate) Exec ¶
func (su *SubscriptionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionUpdate) ExecContext ¶
func (c *SubscriptionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SubscriptionUpdate) ExecX ¶
func (su *SubscriptionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionUpdate) Mutation ¶
func (su *SubscriptionUpdate) Mutation() *SubscriptionMutation
Mutation returns the SubscriptionMutation object of the builder.
func (*SubscriptionUpdate) QueryContext ¶
func (c *SubscriptionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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) SetMemo ¶
func (su *SubscriptionUpdate) SetMemo(m *Memo) *SubscriptionUpdate
SetMemo sets the "memo" edge to the Memo entity.
func (*SubscriptionUpdate) SetMemoID ¶
func (su *SubscriptionUpdate) SetMemoID(u uuid.UUID) *SubscriptionUpdate
SetMemoID sets the "memo_id" field.
func (*SubscriptionUpdate) SetNillableMemoID ¶
func (su *SubscriptionUpdate) SetNillableMemoID(u *uuid.UUID) *SubscriptionUpdate
SetNillableMemoID sets the "memo_id" field if the given value is not nil.
func (*SubscriptionUpdate) SetNillableUserID ¶
func (su *SubscriptionUpdate) SetNillableUserID(u *uuid.UUID) *SubscriptionUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*SubscriptionUpdate) SetSubscriber ¶
func (su *SubscriptionUpdate) SetSubscriber(u *User) *SubscriptionUpdate
SetSubscriber sets the "subscriber" edge to the User entity.
func (*SubscriptionUpdate) SetSubscriberID ¶
func (su *SubscriptionUpdate) SetSubscriberID(id uuid.UUID) *SubscriptionUpdate
SetSubscriberID sets the "subscriber" edge to the User entity by ID.
func (*SubscriptionUpdate) SetUserID ¶
func (su *SubscriptionUpdate) SetUserID(u uuid.UUID) *SubscriptionUpdate
SetUserID sets the "user_id" 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) ClearMemo ¶
func (suo *SubscriptionUpdateOne) ClearMemo() *SubscriptionUpdateOne
ClearMemo clears the "memo" edge to the Memo entity.
func (*SubscriptionUpdateOne) ClearSubscriber ¶
func (suo *SubscriptionUpdateOne) ClearSubscriber() *SubscriptionUpdateOne
ClearSubscriber clears the "subscriber" edge to the User entity.
func (*SubscriptionUpdateOne) Exec ¶
func (suo *SubscriptionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SubscriptionUpdateOne) ExecContext ¶
func (c *SubscriptionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SubscriptionUpdateOne) ExecX ¶
func (suo *SubscriptionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionUpdateOne) Mutation ¶
func (suo *SubscriptionUpdateOne) Mutation() *SubscriptionMutation
Mutation returns the SubscriptionMutation object of the builder.
func (*SubscriptionUpdateOne) QueryContext ¶
func (c *SubscriptionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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) SetMemo ¶
func (suo *SubscriptionUpdateOne) SetMemo(m *Memo) *SubscriptionUpdateOne
SetMemo sets the "memo" edge to the Memo entity.
func (*SubscriptionUpdateOne) SetMemoID ¶
func (suo *SubscriptionUpdateOne) SetMemoID(u uuid.UUID) *SubscriptionUpdateOne
SetMemoID sets the "memo_id" field.
func (*SubscriptionUpdateOne) SetNillableMemoID ¶
func (suo *SubscriptionUpdateOne) SetNillableMemoID(u *uuid.UUID) *SubscriptionUpdateOne
SetNillableMemoID sets the "memo_id" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetNillableUserID ¶
func (suo *SubscriptionUpdateOne) SetNillableUserID(u *uuid.UUID) *SubscriptionUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*SubscriptionUpdateOne) SetSubscriber ¶
func (suo *SubscriptionUpdateOne) SetSubscriber(u *User) *SubscriptionUpdateOne
SetSubscriber sets the "subscriber" edge to the User entity.
func (*SubscriptionUpdateOne) SetSubscriberID ¶
func (suo *SubscriptionUpdateOne) SetSubscriberID(id uuid.UUID) *SubscriptionUpdateOne
SetSubscriberID sets the "subscriber" edge to the User entity by ID.
func (*SubscriptionUpdateOne) SetUserID ¶
func (suo *SubscriptionUpdateOne) SetUserID(u uuid.UUID) *SubscriptionUpdateOne
SetUserID sets the "user_id" field.
func (*SubscriptionUpdateOne) Where ¶
func (suo *SubscriptionUpdateOne) Where(ps ...predicate.Subscription) *SubscriptionUpdateOne
Where appends a list predicates to the SubscriptionUpdate builder.
type SubscriptionUpsert ¶
SubscriptionUpsert is the "OnConflict" setter.
func (*SubscriptionUpsert) SetMemoID ¶
func (u *SubscriptionUpsert) SetMemoID(v uuid.UUID) *SubscriptionUpsert
SetMemoID sets the "memo_id" field.
func (*SubscriptionUpsert) SetUserID ¶
func (u *SubscriptionUpsert) SetUserID(v uuid.UUID) *SubscriptionUpsert
SetUserID sets the "user_id" field.
func (*SubscriptionUpsert) UpdateMemoID ¶
func (u *SubscriptionUpsert) UpdateMemoID() *SubscriptionUpsert
UpdateMemoID sets the "memo_id" field to the value that was provided on create.
func (*SubscriptionUpsert) UpdateUserID ¶
func (u *SubscriptionUpsert) UpdateUserID() *SubscriptionUpsert
UpdateUserID sets the "user_id" 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) SetMemoID ¶
func (u *SubscriptionUpsertBulk) SetMemoID(v uuid.UUID) *SubscriptionUpsertBulk
SetMemoID sets the "memo_id" field.
func (*SubscriptionUpsertBulk) SetUserID ¶
func (u *SubscriptionUpsertBulk) SetUserID(v uuid.UUID) *SubscriptionUpsertBulk
SetUserID sets the "user_id" 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) UpdateMemoID ¶
func (u *SubscriptionUpsertBulk) UpdateMemoID() *SubscriptionUpsertBulk
UpdateMemoID sets the "memo_id" 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(), ). Exec(ctx)
func (*SubscriptionUpsertBulk) UpdateUserID ¶
func (u *SubscriptionUpsertBulk) UpdateUserID() *SubscriptionUpsertBulk
UpdateUserID sets the "user_id" 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 ¶
func (u *SubscriptionUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*SubscriptionUpsertOne) IDX ¶
func (u *SubscriptionUpsertOne) IDX(ctx context.Context) int
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) SetMemoID ¶
func (u *SubscriptionUpsertOne) SetMemoID(v uuid.UUID) *SubscriptionUpsertOne
SetMemoID sets the "memo_id" field.
func (*SubscriptionUpsertOne) SetUserID ¶
func (u *SubscriptionUpsertOne) SetUserID(v uuid.UUID) *SubscriptionUpsertOne
SetUserID sets the "user_id" 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) UpdateMemoID ¶
func (u *SubscriptionUpsertOne) UpdateMemoID() *SubscriptionUpsertOne
UpdateMemoID sets the "memo_id" 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. Using this option is equivalent to using:
client.Subscription.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*SubscriptionUpsertOne) UpdateUserID ¶
func (u *SubscriptionUpsertOne) UpdateUserID() *SubscriptionUpsertOne
UpdateUserID sets the "user_id" 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 int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,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) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tag) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Tag) QueryMemos ¶
QueryMemos queries the "memos" 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 int) *TagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TagClient) ExecContext ¶
func (c *TagClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TagClient) Intercept ¶
func (c *TagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tag.Intercept(f(g(h())))`.
func (*TagClient) Interceptors ¶
func (c *TagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TagClient) MapCreateBulk ¶
func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TagClient) QueryContext ¶
func (c *TagClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagClient) QueryMemos ¶
QueryMemos queries the memos 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 int) *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) AddMemoIDs ¶
AddMemoIDs adds the "memos" edge to the Memo entity by IDs.
func (*TagCreate) ExecContext ¶
func (c *TagCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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(). SetCreateTime(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) { SetCreateTime(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) QueryContext ¶
func (c *TagCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagCreate) SetCreateTime ¶
SetCreateTime sets the "create_time" field.
func (*TagCreate) SetNillableCreateTime ¶
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*TagCreate) SetNillableUpdateTime ¶
SetNillableUpdateTime sets the "update_time" 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) ExecContext ¶
func (c *TagCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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) { SetCreateTime(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)
func (*TagCreateBulk) QueryContext ¶
func (c *TagCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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.
func (*TagDelete) ExecContext ¶
func (c *TagDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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.
func (*TagDeleteOne) Where ¶
func (tdo *TagDeleteOne) Where(ps ...predicate.Tag) *TagDeleteOne
Where appends a list predicates to the TagDelete builder.
type TagEdges ¶
type TagEdges struct { // Memos holds the value of the memos edge. Memos []*Memo `json:"memos,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
func (TagEdges) MemosOrErr ¶
MemosOrErr returns the Memos 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 any) error
Scan applies the selector 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) 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) AddMemoIDs ¶
func (m *TagMutation) AddMemoIDs(ids ...uuid.UUID)
AddMemoIDs adds the "memos" edge to the Memo 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) 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) ClearMemos ¶
func (m *TagMutation) ClearMemos()
ClearMemos clears the "memos" edge to the Memo 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) CreateTime ¶
func (m *TagMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" 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) ExecContext ¶
func (c *TagMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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 int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TagMutation) IDs ¶
func (m *TagMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TagMutation) MemosCleared ¶
func (m *TagMutation) MemosCleared() bool
MemosCleared reports if the "memos" edge to the Memo entity was cleared.
func (*TagMutation) MemosIDs ¶
func (m *TagMutation) MemosIDs() (ids []uuid.UUID)
MemosIDs returns the "memos" edge IDs in 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) OldCreateTime ¶
OldCreateTime returns the old "create_time" 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) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" 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) QueryContext ¶
func (c *TagMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagMutation) RemoveMemoIDs ¶
func (m *TagMutation) RemoveMemoIDs(ids ...uuid.UUID)
RemoveMemoIDs removes the "memos" edge to the Memo entity by IDs.
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) RemovedMemosIDs ¶
func (m *TagMutation) RemovedMemosIDs() (ids []uuid.UUID)
RemovedMemos returns the removed IDs of the "memos" edge to the Memo entity.
func (*TagMutation) ResetCreateTime ¶
func (m *TagMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" 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) ResetMemos ¶
func (m *TagMutation) ResetMemos()
ResetMemos resets all changes to the "memos" edge.
func (*TagMutation) ResetName ¶
func (m *TagMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TagMutation) ResetUpdateTime ¶
func (m *TagMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*TagMutation) SetCreateTime ¶
func (m *TagMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" 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) SetName ¶
func (m *TagMutation) SetName(s string)
SetName sets the "name" field.
func (*TagMutation) SetOp ¶
func (m *TagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TagMutation) SetUpdateTime ¶
func (m *TagMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" 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) UpdateTime ¶
func (m *TagMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*TagMutation) Where ¶
func (m *TagMutation) Where(ps ...predicate.Tag)
Where appends a list predicates to the TagMutation builder.
func (*TagMutation) WhereP ¶
func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TagQuery ¶
type TagQuery struct {
// contains filtered or unexported fields
}
TagQuery is the builder for querying Tag entities.
func (*TagQuery) Aggregate ¶
func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate returns a TagSelect configured with the given aggregations.
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) ExecContext ¶
func (c *TagQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Tag.Query(). GroupBy(tag.FieldCreateTime). Aggregate(ent.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) Order ¶
func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
Order specifies how the records should be ordered.
func (*TagQuery) QueryContext ¶
func (c *TagQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagQuery) QueryMemos ¶
QueryMemos chains the current query on the "memos" 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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Tag.Query(). Select(tag.FieldCreateTime). 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.
type TagSelect ¶
type TagSelect struct { *TagQuery // contains filtered or unexported fields }
TagSelect is the builder for selecting fields of Tag entities.
func (*TagSelect) Aggregate ¶
func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate adds the given aggregation functions to the selector query.
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) ExecContext ¶
func (c TagSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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) QueryContext ¶
func (c TagSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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) AddMemoIDs ¶
AddMemoIDs adds the "memos" edge to the Memo entity by IDs.
func (*TagUpdate) ClearMemos ¶
ClearMemos clears all "memos" edges to the Memo entity.
func (*TagUpdate) ExecContext ¶
func (c *TagUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) QueryContext ¶
func (c *TagUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagUpdate) RemoveMemoIDs ¶
RemoveMemoIDs removes the "memos" edge to Memo entities by IDs.
func (*TagUpdate) RemoveMemos ¶
RemoveMemos removes "memos" edges to Memo entities.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*TagUpdate) SetNillableName ¶
SetNillableName sets the "name" field if the given value is not nil.
func (*TagUpdate) SetUpdateTime ¶
SetUpdateTime sets the "update_time" field.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddMemoIDs ¶
func (tuo *TagUpdateOne) AddMemoIDs(ids ...uuid.UUID) *TagUpdateOne
AddMemoIDs adds the "memos" edge to the Memo entity by IDs.
func (*TagUpdateOne) AddMemos ¶
func (tuo *TagUpdateOne) AddMemos(m ...*Memo) *TagUpdateOne
AddMemos adds the "memos" edges to the Memo entity.
func (*TagUpdateOne) ClearMemos ¶
func (tuo *TagUpdateOne) ClearMemos() *TagUpdateOne
ClearMemos clears all "memos" edges to the Memo entity.
func (*TagUpdateOne) Exec ¶
func (tuo *TagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TagUpdateOne) ExecContext ¶
func (c *TagUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TagUpdateOne) ExecX ¶
func (tuo *TagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpdateOne) Mutation ¶
func (tuo *TagUpdateOne) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdateOne) QueryContext ¶
func (c *TagUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagUpdateOne) RemoveMemoIDs ¶
func (tuo *TagUpdateOne) RemoveMemoIDs(ids ...uuid.UUID) *TagUpdateOne
RemoveMemoIDs removes the "memos" edge to Memo entities by IDs.
func (*TagUpdateOne) RemoveMemos ¶
func (tuo *TagUpdateOne) RemoveMemos(m ...*Memo) *TagUpdateOne
RemoveMemos removes "memos" edges to Memo 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.
func (*TagUpdateOne) SetName ¶
func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
SetName sets the "name" field.
func (*TagUpdateOne) SetNillableName ¶
func (tuo *TagUpdateOne) SetNillableName(s *string) *TagUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*TagUpdateOne) SetUpdateTime ¶
func (tuo *TagUpdateOne) SetUpdateTime(t time.Time) *TagUpdateOne
SetUpdateTime sets the "update_time" field.
func (*TagUpdateOne) Where ¶
func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
Where appends a list predicates to the TagUpdate builder.
type TagUpsert ¶
TagUpsert is the "OnConflict" setter.
func (*TagUpsert) SetUpdateTime ¶
SetUpdateTime sets the "update_time" field.
func (*TagUpsert) UpdateName ¶
UpdateName sets the "name" field to the value that was provided on create.
func (*TagUpsert) UpdateUpdateTime ¶
UpdateUpdateTime sets the "update_time" 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) SetName ¶
func (u *TagUpsertBulk) SetName(v string) *TagUpsertBulk
SetName sets the "name" field.
func (*TagUpsertBulk) SetUpdateTime ¶
func (u *TagUpsertBulk) SetUpdateTime(v time.Time) *TagUpsertBulk
SetUpdateTime sets the "update_time" 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) 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(), ). Exec(ctx)
func (*TagUpsertBulk) UpdateUpdateTime ¶
func (u *TagUpsertBulk) UpdateUpdateTime() *TagUpsertBulk
UpdateUpdateTime sets the "update_time" field to the value that was provided on create.
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) ID ¶
func (u *TagUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TagUpsertOne) IDX ¶
func (u *TagUpsertOne) IDX(ctx context.Context) int
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) SetName ¶
func (u *TagUpsertOne) SetName(v string) *TagUpsertOne
SetName sets the "name" field.
func (*TagUpsertOne) SetUpdateTime ¶
func (u *TagUpsertOne) SetUpdateTime(v time.Time) *TagUpsertOne
SetUpdateTime sets the "update_time" 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) 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. Using this option is equivalent to using:
client.Tag.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TagUpsertOne) UpdateUpdateTime ¶
func (u *TagUpsertOne) UpdateUpdateTime() *TagUpsertOne
UpdateUpdateTime sets the "update_time" field to the value that was provided on create.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Collaboration is the client for interacting with the Collaboration builders. Collaboration *CollaborationClient // Memo is the client for interacting with the Memo builders. Memo *MemoClient // Subscription is the client for interacting with the Subscription builders. Subscription *SubscriptionClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (*Tx) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type User ¶
type User struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // UserName holds the value of the "user_name" field. UserName string `json:"user_name,omitempty"` // GivenName holds the value of the "given_name" field. GivenName string `json:"given_name,omitempty"` // FamilyName holds the value of the "family_name" field. FamilyName string `json:"family_name,omitempty"` // PhotoURL holds the value of the "photo_url" field. PhotoURL string `json:"photo_url,omitempty"` // Type holds the value of the "type" field. Type enum.UserType `json:"type,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*User) QueryCollaboratingMemos ¶
QueryCollaboratingMemos queries the "collaborating_memos" edge of the User entity.
func (*User) QueryCollaborations ¶
func (u *User) QueryCollaborations() *CollaborationQuery
QueryCollaborations queries the "collaborations" edge of the User entity.
func (*User) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*User) QueryMemos ¶
QueryMemos queries the "memos" edge of the User entity.
func (*User) QuerySubscribingMemos ¶
QuerySubscribingMemos queries the "subscribing_memos" edge of the User entity.
func (*User) QuerySubscriptions ¶
func (u *User) QuerySubscriptions() *SubscriptionQuery
QuerySubscriptions queries the "subscriptions" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) ExecContext ¶
func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryCollaboratingMemos ¶
func (c *UserClient) QueryCollaboratingMemos(u *User) *MemoQuery
QueryCollaboratingMemos queries the collaborating_memos edge of a User.
func (*UserClient) QueryCollaborations ¶
func (c *UserClient) QueryCollaborations(u *User) *CollaborationQuery
QueryCollaborations queries the collaborations edge of a User.
func (*UserClient) QueryContext ¶
func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserClient) QueryMemos ¶
func (c *UserClient) QueryMemos(u *User) *MemoQuery
QueryMemos queries the memos edge of a User.
func (*UserClient) QuerySubscribingMemos ¶
func (c *UserClient) QuerySubscribingMemos(u *User) *MemoQuery
QuerySubscribingMemos queries the subscribing_memos edge of a User.
func (*UserClient) QuerySubscriptions ¶
func (c *UserClient) QuerySubscriptions(u *User) *SubscriptionQuery
QuerySubscriptions queries the subscriptions edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddCollaboratingMemoIDs ¶
func (uc *UserCreate) AddCollaboratingMemoIDs(ids ...uuid.UUID) *UserCreate
AddCollaboratingMemoIDs adds the "collaborating_memos" edge to the Memo entity by IDs.
func (*UserCreate) AddCollaboratingMemos ¶
func (uc *UserCreate) AddCollaboratingMemos(m ...*Memo) *UserCreate
AddCollaboratingMemos adds the "collaborating_memos" edges to the Memo entity.
func (*UserCreate) AddCollaborationIDs ¶
func (uc *UserCreate) AddCollaborationIDs(ids ...int) *UserCreate
AddCollaborationIDs adds the "collaborations" edge to the Collaboration entity by IDs.
func (*UserCreate) AddCollaborations ¶
func (uc *UserCreate) AddCollaborations(c ...*Collaboration) *UserCreate
AddCollaborations adds the "collaborations" edges to the Collaboration entity.
func (*UserCreate) AddMemoIDs ¶
func (uc *UserCreate) AddMemoIDs(ids ...uuid.UUID) *UserCreate
AddMemoIDs adds the "memos" edge to the Memo entity by IDs.
func (*UserCreate) AddMemos ¶
func (uc *UserCreate) AddMemos(m ...*Memo) *UserCreate
AddMemos adds the "memos" edges to the Memo entity.
func (*UserCreate) AddSubscribingMemoIDs ¶
func (uc *UserCreate) AddSubscribingMemoIDs(ids ...uuid.UUID) *UserCreate
AddSubscribingMemoIDs adds the "subscribing_memos" edge to the Memo entity by IDs.
func (*UserCreate) AddSubscribingMemos ¶
func (uc *UserCreate) AddSubscribingMemos(m ...*Memo) *UserCreate
AddSubscribingMemos adds the "subscribing_memos" edges to the Memo entity.
func (*UserCreate) AddSubscriptionIDs ¶
func (uc *UserCreate) AddSubscriptionIDs(ids ...int) *UserCreate
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*UserCreate) AddSubscriptions ¶
func (uc *UserCreate) AddSubscriptions(s ...*Subscription) *UserCreate
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecContext ¶
func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetCreateTime(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.UserUpsert) { SetCreateTime(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) QueryContext ¶
func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreateTime ¶
func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
SetCreateTime sets the "create_time" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetFamilyName ¶
func (uc *UserCreate) SetFamilyName(s string) *UserCreate
SetFamilyName sets the "family_name" field.
func (*UserCreate) SetGivenName ¶
func (uc *UserCreate) SetGivenName(s string) *UserCreate
SetGivenName sets the "given_name" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetNillableCreateTime ¶
func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserCreate) SetNillableFamilyName ¶
func (uc *UserCreate) SetNillableFamilyName(s *string) *UserCreate
SetNillableFamilyName sets the "family_name" field if the given value is not nil.
func (*UserCreate) SetNillableGivenName ¶
func (uc *UserCreate) SetNillableGivenName(s *string) *UserCreate
SetNillableGivenName sets the "given_name" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillablePhotoURL ¶
func (uc *UserCreate) SetNillablePhotoURL(s *string) *UserCreate
SetNillablePhotoURL sets the "photo_url" field if the given value is not nil.
func (*UserCreate) SetNillableType ¶
func (uc *UserCreate) SetNillableType(et *enum.UserType) *UserCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*UserCreate) SetNillableUpdateTime ¶
func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserCreate) SetPhotoURL ¶
func (uc *UserCreate) SetPhotoURL(s string) *UserCreate
SetPhotoURL sets the "photo_url" field.
func (*UserCreate) SetType ¶
func (uc *UserCreate) SetType(et enum.UserType) *UserCreate
SetType sets the "type" field.
func (*UserCreate) SetUpdateTime ¶
func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
SetUpdateTime sets the "update_time" field.
func (*UserCreate) SetUserName ¶
func (uc *UserCreate) SetUserName(s string) *UserCreate
SetUserName sets the "user_name" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecContext ¶
func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.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.UserUpsert) { SetCreateTime(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreateBulk) QueryContext ¶
func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecContext ¶
func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) QueryContext ¶
func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Memos holds the value of the memos edge. Memos []*Memo `json:"memos,omitempty"` // SubscribingMemos holds the value of the subscribing_memos edge. SubscribingMemos []*Memo `json:"subscribing_memos,omitempty"` // CollaboratingMemos holds the value of the collaborating_memos edge. CollaboratingMemos []*Memo `json:"collaborating_memos,omitempty"` // Subscriptions holds the value of the subscriptions edge. Subscriptions []*Subscription `json:"subscriptions,omitempty"` // Collaborations holds the value of the collaborations edge. Collaborations []*Collaboration `json:"collaborations,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) CollaboratingMemosOrErr ¶
CollaboratingMemosOrErr returns the CollaboratingMemos value or an error if the edge was not loaded in eager-loading.
func (UserEdges) CollaborationsOrErr ¶
func (e UserEdges) CollaborationsOrErr() ([]*Collaboration, error)
CollaborationsOrErr returns the Collaborations value or an error if the edge was not loaded in eager-loading.
func (UserEdges) MemosOrErr ¶
MemosOrErr returns the Memos value or an error if the edge was not loaded in eager-loading.
func (UserEdges) SubscribingMemosOrErr ¶
SubscribingMemosOrErr returns the SubscribingMemos value or an error if the edge was not loaded in eager-loading.
func (UserEdges) SubscriptionsOrErr ¶
func (e UserEdges) SubscriptionsOrErr() ([]*Subscription, error)
SubscriptionsOrErr returns the Subscriptions value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddCollaboratingMemoIDs ¶
func (m *UserMutation) AddCollaboratingMemoIDs(ids ...uuid.UUID)
AddCollaboratingMemoIDs adds the "collaborating_memos" edge to the Memo entity by ids.
func (*UserMutation) AddCollaborationIDs ¶
func (m *UserMutation) AddCollaborationIDs(ids ...int)
AddCollaborationIDs adds the "collaborations" edge to the Collaboration entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddMemoIDs ¶
func (m *UserMutation) AddMemoIDs(ids ...uuid.UUID)
AddMemoIDs adds the "memos" edge to the Memo entity by ids.
func (*UserMutation) AddSubscribingMemoIDs ¶
func (m *UserMutation) AddSubscribingMemoIDs(ids ...uuid.UUID)
AddSubscribingMemoIDs adds the "subscribing_memos" edge to the Memo entity by ids.
func (*UserMutation) AddSubscriptionIDs ¶
func (m *UserMutation) AddSubscriptionIDs(ids ...int)
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearCollaboratingMemos ¶
func (m *UserMutation) ClearCollaboratingMemos()
ClearCollaboratingMemos clears the "collaborating_memos" edge to the Memo entity.
func (*UserMutation) ClearCollaborations ¶
func (m *UserMutation) ClearCollaborations()
ClearCollaborations clears the "collaborations" edge to the Collaboration entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearFamilyName ¶
func (m *UserMutation) ClearFamilyName()
ClearFamilyName clears the value of the "family_name" field.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearGivenName ¶
func (m *UserMutation) ClearGivenName()
ClearGivenName clears the value of the "given_name" field.
func (*UserMutation) ClearMemos ¶
func (m *UserMutation) ClearMemos()
ClearMemos clears the "memos" edge to the Memo entity.
func (*UserMutation) ClearPhotoURL ¶
func (m *UserMutation) ClearPhotoURL()
ClearPhotoURL clears the value of the "photo_url" field.
func (*UserMutation) ClearSubscribingMemos ¶
func (m *UserMutation) ClearSubscribingMemos()
ClearSubscribingMemos clears the "subscribing_memos" edge to the Memo entity.
func (*UserMutation) ClearSubscriptions ¶
func (m *UserMutation) ClearSubscriptions()
ClearSubscriptions clears the "subscriptions" edge to the Subscription entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CollaboratingMemosCleared ¶
func (m *UserMutation) CollaboratingMemosCleared() bool
CollaboratingMemosCleared reports if the "collaborating_memos" edge to the Memo entity was cleared.
func (*UserMutation) CollaboratingMemosIDs ¶
func (m *UserMutation) CollaboratingMemosIDs() (ids []uuid.UUID)
CollaboratingMemosIDs returns the "collaborating_memos" edge IDs in the mutation.
func (*UserMutation) CollaborationsCleared ¶
func (m *UserMutation) CollaborationsCleared() bool
CollaborationsCleared reports if the "collaborations" edge to the Collaboration entity was cleared.
func (*UserMutation) CollaborationsIDs ¶
func (m *UserMutation) CollaborationsIDs() (ids []int)
CollaborationsIDs returns the "collaborations" edge IDs in the mutation.
func (*UserMutation) CreateTime ¶
func (m *UserMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) ExecContext ¶
func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserMutation) FamilyName ¶
func (m *UserMutation) FamilyName() (r string, exists bool)
FamilyName returns the value of the "family_name" field in the mutation.
func (*UserMutation) FamilyNameCleared ¶
func (m *UserMutation) FamilyNameCleared() bool
FamilyNameCleared returns if the "family_name" field was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) GetType ¶
func (m *UserMutation) GetType() (r enum.UserType, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*UserMutation) GivenName ¶
func (m *UserMutation) GivenName() (r string, exists bool)
GivenName returns the value of the "given_name" field in the mutation.
func (*UserMutation) GivenNameCleared ¶
func (m *UserMutation) GivenNameCleared() bool
GivenNameCleared returns if the "given_name" field was cleared in this mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) MemosCleared ¶
func (m *UserMutation) MemosCleared() bool
MemosCleared reports if the "memos" edge to the Memo entity was cleared.
func (*UserMutation) MemosIDs ¶
func (m *UserMutation) MemosIDs() (ids []uuid.UUID)
MemosIDs returns the "memos" edge IDs in the mutation.
func (*UserMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldFamilyName ¶
func (m *UserMutation) OldFamilyName(ctx context.Context) (v string, err error)
OldFamilyName returns the old "family_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldGivenName ¶
func (m *UserMutation) OldGivenName(ctx context.Context) (v string, err error)
OldGivenName returns the old "given_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPhotoURL ¶
func (m *UserMutation) OldPhotoURL(ctx context.Context) (v string, err error)
OldPhotoURL returns the old "photo_url" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldType ¶
OldType returns the old "type" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUserName ¶
func (m *UserMutation) OldUserName(ctx context.Context) (v string, err error)
OldUserName returns the old "user_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) PhotoURL ¶
func (m *UserMutation) PhotoURL() (r string, exists bool)
PhotoURL returns the value of the "photo_url" field in the mutation.
func (*UserMutation) PhotoURLCleared ¶
func (m *UserMutation) PhotoURLCleared() bool
PhotoURLCleared returns if the "photo_url" field was cleared in this mutation.
func (*UserMutation) QueryContext ¶
func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserMutation) RemoveCollaboratingMemoIDs ¶
func (m *UserMutation) RemoveCollaboratingMemoIDs(ids ...uuid.UUID)
RemoveCollaboratingMemoIDs removes the "collaborating_memos" edge to the Memo entity by IDs.
func (*UserMutation) RemoveCollaborationIDs ¶
func (m *UserMutation) RemoveCollaborationIDs(ids ...int)
RemoveCollaborationIDs removes the "collaborations" edge to the Collaboration entity by IDs.
func (*UserMutation) RemoveMemoIDs ¶
func (m *UserMutation) RemoveMemoIDs(ids ...uuid.UUID)
RemoveMemoIDs removes the "memos" edge to the Memo entity by IDs.
func (*UserMutation) RemoveSubscribingMemoIDs ¶
func (m *UserMutation) RemoveSubscribingMemoIDs(ids ...uuid.UUID)
RemoveSubscribingMemoIDs removes the "subscribing_memos" edge to the Memo entity by IDs.
func (*UserMutation) RemoveSubscriptionIDs ¶
func (m *UserMutation) RemoveSubscriptionIDs(ids ...int)
RemoveSubscriptionIDs removes the "subscriptions" edge to the Subscription entity by IDs.
func (*UserMutation) RemovedCollaboratingMemosIDs ¶
func (m *UserMutation) RemovedCollaboratingMemosIDs() (ids []uuid.UUID)
RemovedCollaboratingMemos returns the removed IDs of the "collaborating_memos" edge to the Memo entity.
func (*UserMutation) RemovedCollaborationsIDs ¶
func (m *UserMutation) RemovedCollaborationsIDs() (ids []int)
RemovedCollaborations returns the removed IDs of the "collaborations" edge to the Collaboration entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedMemosIDs ¶
func (m *UserMutation) RemovedMemosIDs() (ids []uuid.UUID)
RemovedMemos returns the removed IDs of the "memos" edge to the Memo entity.
func (*UserMutation) RemovedSubscribingMemosIDs ¶
func (m *UserMutation) RemovedSubscribingMemosIDs() (ids []uuid.UUID)
RemovedSubscribingMemos returns the removed IDs of the "subscribing_memos" edge to the Memo entity.
func (*UserMutation) RemovedSubscriptionsIDs ¶
func (m *UserMutation) RemovedSubscriptionsIDs() (ids []int)
RemovedSubscriptions returns the removed IDs of the "subscriptions" edge to the Subscription entity.
func (*UserMutation) ResetCollaboratingMemos ¶
func (m *UserMutation) ResetCollaboratingMemos()
ResetCollaboratingMemos resets all changes to the "collaborating_memos" edge.
func (*UserMutation) ResetCollaborations ¶
func (m *UserMutation) ResetCollaborations()
ResetCollaborations resets all changes to the "collaborations" edge.
func (*UserMutation) ResetCreateTime ¶
func (m *UserMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetFamilyName ¶
func (m *UserMutation) ResetFamilyName()
ResetFamilyName resets all changes to the "family_name" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetGivenName ¶
func (m *UserMutation) ResetGivenName()
ResetGivenName resets all changes to the "given_name" field.
func (*UserMutation) ResetMemos ¶
func (m *UserMutation) ResetMemos()
ResetMemos resets all changes to the "memos" edge.
func (*UserMutation) ResetPhotoURL ¶
func (m *UserMutation) ResetPhotoURL()
ResetPhotoURL resets all changes to the "photo_url" field.
func (*UserMutation) ResetSubscribingMemos ¶
func (m *UserMutation) ResetSubscribingMemos()
ResetSubscribingMemos resets all changes to the "subscribing_memos" edge.
func (*UserMutation) ResetSubscriptions ¶
func (m *UserMutation) ResetSubscriptions()
ResetSubscriptions resets all changes to the "subscriptions" edge.
func (*UserMutation) ResetType ¶
func (m *UserMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*UserMutation) ResetUpdateTime ¶
func (m *UserMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserMutation) ResetUserName ¶
func (m *UserMutation) ResetUserName()
ResetUserName resets all changes to the "user_name" field.
func (*UserMutation) SetCreateTime ¶
func (m *UserMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetFamilyName ¶
func (m *UserMutation) SetFamilyName(s string)
SetFamilyName sets the "family_name" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetGivenName ¶
func (m *UserMutation) SetGivenName(s string)
SetGivenName sets the "given_name" field.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPhotoURL ¶
func (m *UserMutation) SetPhotoURL(s string)
SetPhotoURL sets the "photo_url" field.
func (*UserMutation) SetType ¶
func (m *UserMutation) SetType(et enum.UserType)
SetType sets the "type" field.
func (*UserMutation) SetUpdateTime ¶
func (m *UserMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserMutation) SetUserName ¶
func (m *UserMutation) SetUserName(s string)
SetUserName sets the "user_name" field.
func (*UserMutation) SubscribingMemosCleared ¶
func (m *UserMutation) SubscribingMemosCleared() bool
SubscribingMemosCleared reports if the "subscribing_memos" edge to the Memo entity was cleared.
func (*UserMutation) SubscribingMemosIDs ¶
func (m *UserMutation) SubscribingMemosIDs() (ids []uuid.UUID)
SubscribingMemosIDs returns the "subscribing_memos" edge IDs in the mutation.
func (*UserMutation) SubscriptionsCleared ¶
func (m *UserMutation) SubscriptionsCleared() bool
SubscriptionsCleared reports if the "subscriptions" edge to the Subscription entity was cleared.
func (*UserMutation) SubscriptionsIDs ¶
func (m *UserMutation) SubscriptionsIDs() (ids []int)
SubscriptionsIDs returns the "subscriptions" edge IDs in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdateTime ¶
func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserMutation) UserName ¶
func (m *UserMutation) UserName() (r string, exists bool)
UserName returns the value of the "user_name" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) ExecContext ¶
func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryCollaboratingMemos ¶
QueryCollaboratingMemos chains the current query on the "collaborating_memos" edge.
func (*UserQuery) QueryCollaborations ¶
func (uq *UserQuery) QueryCollaborations() *CollaborationQuery
QueryCollaborations chains the current query on the "collaborations" edge.
func (*UserQuery) QueryContext ¶
func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserQuery) QueryMemos ¶
QueryMemos chains the current query on the "memos" edge.
func (*UserQuery) QuerySubscribingMemos ¶
QuerySubscribingMemos chains the current query on the "subscribing_memos" edge.
func (*UserQuery) QuerySubscriptions ¶
func (uq *UserQuery) QuerySubscriptions() *SubscriptionQuery
QuerySubscriptions chains the current query on the "subscriptions" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.User.Query(). Select(user.FieldCreateTime). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithCollaboratingMemos ¶
WithCollaboratingMemos tells the query-builder to eager-load the nodes that are connected to the "collaborating_memos" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithCollaborations ¶
func (uq *UserQuery) WithCollaborations(opts ...func(*CollaborationQuery)) *UserQuery
WithCollaborations tells the query-builder to eager-load the nodes that are connected to the "collaborations" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithMemos ¶
WithMemos tells the query-builder to eager-load the nodes that are connected to the "memos" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithSubscribingMemos ¶
WithSubscribingMemos tells the query-builder to eager-load the nodes that are connected to the "subscribing_memos" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithSubscriptions ¶
func (uq *UserQuery) WithSubscriptions(opts ...func(*SubscriptionQuery)) *UserQuery
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.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (UserSelect) ExecContext ¶
func (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (UserSelect) QueryContext ¶
func (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddCollaboratingMemoIDs ¶
func (uu *UserUpdate) AddCollaboratingMemoIDs(ids ...uuid.UUID) *UserUpdate
AddCollaboratingMemoIDs adds the "collaborating_memos" edge to the Memo entity by IDs.
func (*UserUpdate) AddCollaboratingMemos ¶
func (uu *UserUpdate) AddCollaboratingMemos(m ...*Memo) *UserUpdate
AddCollaboratingMemos adds the "collaborating_memos" edges to the Memo entity.
func (*UserUpdate) AddCollaborationIDs ¶
func (uu *UserUpdate) AddCollaborationIDs(ids ...int) *UserUpdate
AddCollaborationIDs adds the "collaborations" edge to the Collaboration entity by IDs.
func (*UserUpdate) AddCollaborations ¶
func (uu *UserUpdate) AddCollaborations(c ...*Collaboration) *UserUpdate
AddCollaborations adds the "collaborations" edges to the Collaboration entity.
func (*UserUpdate) AddMemoIDs ¶
func (uu *UserUpdate) AddMemoIDs(ids ...uuid.UUID) *UserUpdate
AddMemoIDs adds the "memos" edge to the Memo entity by IDs.
func (*UserUpdate) AddMemos ¶
func (uu *UserUpdate) AddMemos(m ...*Memo) *UserUpdate
AddMemos adds the "memos" edges to the Memo entity.
func (*UserUpdate) AddSubscribingMemoIDs ¶
func (uu *UserUpdate) AddSubscribingMemoIDs(ids ...uuid.UUID) *UserUpdate
AddSubscribingMemoIDs adds the "subscribing_memos" edge to the Memo entity by IDs.
func (*UserUpdate) AddSubscribingMemos ¶
func (uu *UserUpdate) AddSubscribingMemos(m ...*Memo) *UserUpdate
AddSubscribingMemos adds the "subscribing_memos" edges to the Memo entity.
func (*UserUpdate) AddSubscriptionIDs ¶
func (uu *UserUpdate) AddSubscriptionIDs(ids ...int) *UserUpdate
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*UserUpdate) AddSubscriptions ¶
func (uu *UserUpdate) AddSubscriptions(s ...*Subscription) *UserUpdate
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*UserUpdate) ClearCollaboratingMemos ¶
func (uu *UserUpdate) ClearCollaboratingMemos() *UserUpdate
ClearCollaboratingMemos clears all "collaborating_memos" edges to the Memo entity.
func (*UserUpdate) ClearCollaborations ¶
func (uu *UserUpdate) ClearCollaborations() *UserUpdate
ClearCollaborations clears all "collaborations" edges to the Collaboration entity.
func (*UserUpdate) ClearFamilyName ¶
func (uu *UserUpdate) ClearFamilyName() *UserUpdate
ClearFamilyName clears the value of the "family_name" field.
func (*UserUpdate) ClearGivenName ¶
func (uu *UserUpdate) ClearGivenName() *UserUpdate
ClearGivenName clears the value of the "given_name" field.
func (*UserUpdate) ClearMemos ¶
func (uu *UserUpdate) ClearMemos() *UserUpdate
ClearMemos clears all "memos" edges to the Memo entity.
func (*UserUpdate) ClearPhotoURL ¶
func (uu *UserUpdate) ClearPhotoURL() *UserUpdate
ClearPhotoURL clears the value of the "photo_url" field.
func (*UserUpdate) ClearSubscribingMemos ¶
func (uu *UserUpdate) ClearSubscribingMemos() *UserUpdate
ClearSubscribingMemos clears all "subscribing_memos" edges to the Memo entity.
func (*UserUpdate) ClearSubscriptions ¶
func (uu *UserUpdate) ClearSubscriptions() *UserUpdate
ClearSubscriptions clears all "subscriptions" edges to the Subscription entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecContext ¶
func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) QueryContext ¶
func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserUpdate) RemoveCollaboratingMemoIDs ¶
func (uu *UserUpdate) RemoveCollaboratingMemoIDs(ids ...uuid.UUID) *UserUpdate
RemoveCollaboratingMemoIDs removes the "collaborating_memos" edge to Memo entities by IDs.
func (*UserUpdate) RemoveCollaboratingMemos ¶
func (uu *UserUpdate) RemoveCollaboratingMemos(m ...*Memo) *UserUpdate
RemoveCollaboratingMemos removes "collaborating_memos" edges to Memo entities.
func (*UserUpdate) RemoveCollaborationIDs ¶
func (uu *UserUpdate) RemoveCollaborationIDs(ids ...int) *UserUpdate
RemoveCollaborationIDs removes the "collaborations" edge to Collaboration entities by IDs.
func (*UserUpdate) RemoveCollaborations ¶
func (uu *UserUpdate) RemoveCollaborations(c ...*Collaboration) *UserUpdate
RemoveCollaborations removes "collaborations" edges to Collaboration entities.
func (*UserUpdate) RemoveMemoIDs ¶
func (uu *UserUpdate) RemoveMemoIDs(ids ...uuid.UUID) *UserUpdate
RemoveMemoIDs removes the "memos" edge to Memo entities by IDs.
func (*UserUpdate) RemoveMemos ¶
func (uu *UserUpdate) RemoveMemos(m ...*Memo) *UserUpdate
RemoveMemos removes "memos" edges to Memo entities.
func (*UserUpdate) RemoveSubscribingMemoIDs ¶
func (uu *UserUpdate) RemoveSubscribingMemoIDs(ids ...uuid.UUID) *UserUpdate
RemoveSubscribingMemoIDs removes the "subscribing_memos" edge to Memo entities by IDs.
func (*UserUpdate) RemoveSubscribingMemos ¶
func (uu *UserUpdate) RemoveSubscribingMemos(m ...*Memo) *UserUpdate
RemoveSubscribingMemos removes "subscribing_memos" edges to Memo entities.
func (*UserUpdate) RemoveSubscriptionIDs ¶
func (uu *UserUpdate) RemoveSubscriptionIDs(ids ...int) *UserUpdate
RemoveSubscriptionIDs removes the "subscriptions" edge to Subscription entities by IDs.
func (*UserUpdate) RemoveSubscriptions ¶
func (uu *UserUpdate) RemoveSubscriptions(s ...*Subscription) *UserUpdate
RemoveSubscriptions removes "subscriptions" edges to Subscription entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetFamilyName ¶
func (uu *UserUpdate) SetFamilyName(s string) *UserUpdate
SetFamilyName sets the "family_name" field.
func (*UserUpdate) SetGivenName ¶
func (uu *UserUpdate) SetGivenName(s string) *UserUpdate
SetGivenName sets the "given_name" field.
func (*UserUpdate) SetNillableEmail ¶
func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdate) SetNillableFamilyName ¶
func (uu *UserUpdate) SetNillableFamilyName(s *string) *UserUpdate
SetNillableFamilyName sets the "family_name" field if the given value is not nil.
func (*UserUpdate) SetNillableGivenName ¶
func (uu *UserUpdate) SetNillableGivenName(s *string) *UserUpdate
SetNillableGivenName sets the "given_name" field if the given value is not nil.
func (*UserUpdate) SetNillablePhotoURL ¶
func (uu *UserUpdate) SetNillablePhotoURL(s *string) *UserUpdate
SetNillablePhotoURL sets the "photo_url" field if the given value is not nil.
func (*UserUpdate) SetNillableType ¶
func (uu *UserUpdate) SetNillableType(et *enum.UserType) *UserUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*UserUpdate) SetNillableUserName ¶
func (uu *UserUpdate) SetNillableUserName(s *string) *UserUpdate
SetNillableUserName sets the "user_name" field if the given value is not nil.
func (*UserUpdate) SetPhotoURL ¶
func (uu *UserUpdate) SetPhotoURL(s string) *UserUpdate
SetPhotoURL sets the "photo_url" field.
func (*UserUpdate) SetType ¶
func (uu *UserUpdate) SetType(et enum.UserType) *UserUpdate
SetType sets the "type" field.
func (*UserUpdate) SetUpdateTime ¶
func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
SetUpdateTime sets the "update_time" field.
func (*UserUpdate) SetUserName ¶
func (uu *UserUpdate) SetUserName(s string) *UserUpdate
SetUserName sets the "user_name" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddCollaboratingMemoIDs ¶
func (uuo *UserUpdateOne) AddCollaboratingMemoIDs(ids ...uuid.UUID) *UserUpdateOne
AddCollaboratingMemoIDs adds the "collaborating_memos" edge to the Memo entity by IDs.
func (*UserUpdateOne) AddCollaboratingMemos ¶
func (uuo *UserUpdateOne) AddCollaboratingMemos(m ...*Memo) *UserUpdateOne
AddCollaboratingMemos adds the "collaborating_memos" edges to the Memo entity.
func (*UserUpdateOne) AddCollaborationIDs ¶
func (uuo *UserUpdateOne) AddCollaborationIDs(ids ...int) *UserUpdateOne
AddCollaborationIDs adds the "collaborations" edge to the Collaboration entity by IDs.
func (*UserUpdateOne) AddCollaborations ¶
func (uuo *UserUpdateOne) AddCollaborations(c ...*Collaboration) *UserUpdateOne
AddCollaborations adds the "collaborations" edges to the Collaboration entity.
func (*UserUpdateOne) AddMemoIDs ¶
func (uuo *UserUpdateOne) AddMemoIDs(ids ...uuid.UUID) *UserUpdateOne
AddMemoIDs adds the "memos" edge to the Memo entity by IDs.
func (*UserUpdateOne) AddMemos ¶
func (uuo *UserUpdateOne) AddMemos(m ...*Memo) *UserUpdateOne
AddMemos adds the "memos" edges to the Memo entity.
func (*UserUpdateOne) AddSubscribingMemoIDs ¶
func (uuo *UserUpdateOne) AddSubscribingMemoIDs(ids ...uuid.UUID) *UserUpdateOne
AddSubscribingMemoIDs adds the "subscribing_memos" edge to the Memo entity by IDs.
func (*UserUpdateOne) AddSubscribingMemos ¶
func (uuo *UserUpdateOne) AddSubscribingMemos(m ...*Memo) *UserUpdateOne
AddSubscribingMemos adds the "subscribing_memos" edges to the Memo entity.
func (*UserUpdateOne) AddSubscriptionIDs ¶
func (uuo *UserUpdateOne) AddSubscriptionIDs(ids ...int) *UserUpdateOne
AddSubscriptionIDs adds the "subscriptions" edge to the Subscription entity by IDs.
func (*UserUpdateOne) AddSubscriptions ¶
func (uuo *UserUpdateOne) AddSubscriptions(s ...*Subscription) *UserUpdateOne
AddSubscriptions adds the "subscriptions" edges to the Subscription entity.
func (*UserUpdateOne) ClearCollaboratingMemos ¶
func (uuo *UserUpdateOne) ClearCollaboratingMemos() *UserUpdateOne
ClearCollaboratingMemos clears all "collaborating_memos" edges to the Memo entity.
func (*UserUpdateOne) ClearCollaborations ¶
func (uuo *UserUpdateOne) ClearCollaborations() *UserUpdateOne
ClearCollaborations clears all "collaborations" edges to the Collaboration entity.
func (*UserUpdateOne) ClearFamilyName ¶
func (uuo *UserUpdateOne) ClearFamilyName() *UserUpdateOne
ClearFamilyName clears the value of the "family_name" field.
func (*UserUpdateOne) ClearGivenName ¶
func (uuo *UserUpdateOne) ClearGivenName() *UserUpdateOne
ClearGivenName clears the value of the "given_name" field.
func (*UserUpdateOne) ClearMemos ¶
func (uuo *UserUpdateOne) ClearMemos() *UserUpdateOne
ClearMemos clears all "memos" edges to the Memo entity.
func (*UserUpdateOne) ClearPhotoURL ¶
func (uuo *UserUpdateOne) ClearPhotoURL() *UserUpdateOne
ClearPhotoURL clears the value of the "photo_url" field.
func (*UserUpdateOne) ClearSubscribingMemos ¶
func (uuo *UserUpdateOne) ClearSubscribingMemos() *UserUpdateOne
ClearSubscribingMemos clears all "subscribing_memos" edges to the Memo entity.
func (*UserUpdateOne) ClearSubscriptions ¶
func (uuo *UserUpdateOne) ClearSubscriptions() *UserUpdateOne
ClearSubscriptions clears all "subscriptions" edges to the Subscription entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecContext ¶
func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) QueryContext ¶
func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserUpdateOne) RemoveCollaboratingMemoIDs ¶
func (uuo *UserUpdateOne) RemoveCollaboratingMemoIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveCollaboratingMemoIDs removes the "collaborating_memos" edge to Memo entities by IDs.
func (*UserUpdateOne) RemoveCollaboratingMemos ¶
func (uuo *UserUpdateOne) RemoveCollaboratingMemos(m ...*Memo) *UserUpdateOne
RemoveCollaboratingMemos removes "collaborating_memos" edges to Memo entities.
func (*UserUpdateOne) RemoveCollaborationIDs ¶
func (uuo *UserUpdateOne) RemoveCollaborationIDs(ids ...int) *UserUpdateOne
RemoveCollaborationIDs removes the "collaborations" edge to Collaboration entities by IDs.
func (*UserUpdateOne) RemoveCollaborations ¶
func (uuo *UserUpdateOne) RemoveCollaborations(c ...*Collaboration) *UserUpdateOne
RemoveCollaborations removes "collaborations" edges to Collaboration entities.
func (*UserUpdateOne) RemoveMemoIDs ¶
func (uuo *UserUpdateOne) RemoveMemoIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveMemoIDs removes the "memos" edge to Memo entities by IDs.
func (*UserUpdateOne) RemoveMemos ¶
func (uuo *UserUpdateOne) RemoveMemos(m ...*Memo) *UserUpdateOne
RemoveMemos removes "memos" edges to Memo entities.
func (*UserUpdateOne) RemoveSubscribingMemoIDs ¶
func (uuo *UserUpdateOne) RemoveSubscribingMemoIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveSubscribingMemoIDs removes the "subscribing_memos" edge to Memo entities by IDs.
func (*UserUpdateOne) RemoveSubscribingMemos ¶
func (uuo *UserUpdateOne) RemoveSubscribingMemos(m ...*Memo) *UserUpdateOne
RemoveSubscribingMemos removes "subscribing_memos" edges to Memo entities.
func (*UserUpdateOne) RemoveSubscriptionIDs ¶
func (uuo *UserUpdateOne) RemoveSubscriptionIDs(ids ...int) *UserUpdateOne
RemoveSubscriptionIDs removes the "subscriptions" edge to Subscription entities by IDs.
func (*UserUpdateOne) RemoveSubscriptions ¶
func (uuo *UserUpdateOne) RemoveSubscriptions(s ...*Subscription) *UserUpdateOne
RemoveSubscriptions removes "subscriptions" edges to Subscription entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetFamilyName ¶
func (uuo *UserUpdateOne) SetFamilyName(s string) *UserUpdateOne
SetFamilyName sets the "family_name" field.
func (*UserUpdateOne) SetGivenName ¶
func (uuo *UserUpdateOne) SetGivenName(s string) *UserUpdateOne
SetGivenName sets the "given_name" field.
func (*UserUpdateOne) SetNillableEmail ¶
func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdateOne) SetNillableFamilyName ¶
func (uuo *UserUpdateOne) SetNillableFamilyName(s *string) *UserUpdateOne
SetNillableFamilyName sets the "family_name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableGivenName ¶
func (uuo *UserUpdateOne) SetNillableGivenName(s *string) *UserUpdateOne
SetNillableGivenName sets the "given_name" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePhotoURL ¶
func (uuo *UserUpdateOne) SetNillablePhotoURL(s *string) *UserUpdateOne
SetNillablePhotoURL sets the "photo_url" field if the given value is not nil.
func (*UserUpdateOne) SetNillableType ¶
func (uuo *UserUpdateOne) SetNillableType(et *enum.UserType) *UserUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUserName ¶
func (uuo *UserUpdateOne) SetNillableUserName(s *string) *UserUpdateOne
SetNillableUserName sets the "user_name" field if the given value is not nil.
func (*UserUpdateOne) SetPhotoURL ¶
func (uuo *UserUpdateOne) SetPhotoURL(s string) *UserUpdateOne
SetPhotoURL sets the "photo_url" field.
func (*UserUpdateOne) SetType ¶
func (uuo *UserUpdateOne) SetType(et enum.UserType) *UserUpdateOne
SetType sets the "type" field.
func (*UserUpdateOne) SetUpdateTime ¶
func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
SetUpdateTime sets the "update_time" field.
func (*UserUpdateOne) SetUserName ¶
func (uuo *UserUpdateOne) SetUserName(s string) *UserUpdateOne
SetUserName sets the "user_name" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) ClearFamilyName ¶
func (u *UserUpsert) ClearFamilyName() *UserUpsert
ClearFamilyName clears the value of the "family_name" field.
func (*UserUpsert) ClearGivenName ¶
func (u *UserUpsert) ClearGivenName() *UserUpsert
ClearGivenName clears the value of the "given_name" field.
func (*UserUpsert) ClearPhotoURL ¶
func (u *UserUpsert) ClearPhotoURL() *UserUpsert
ClearPhotoURL clears the value of the "photo_url" field.
func (*UserUpsert) SetEmail ¶
func (u *UserUpsert) SetEmail(v string) *UserUpsert
SetEmail sets the "email" field.
func (*UserUpsert) SetFamilyName ¶
func (u *UserUpsert) SetFamilyName(v string) *UserUpsert
SetFamilyName sets the "family_name" field.
func (*UserUpsert) SetGivenName ¶
func (u *UserUpsert) SetGivenName(v string) *UserUpsert
SetGivenName sets the "given_name" field.
func (*UserUpsert) SetPhotoURL ¶
func (u *UserUpsert) SetPhotoURL(v string) *UserUpsert
SetPhotoURL sets the "photo_url" field.
func (*UserUpsert) SetType ¶
func (u *UserUpsert) SetType(v enum.UserType) *UserUpsert
SetType sets the "type" field.
func (*UserUpsert) SetUpdateTime ¶
func (u *UserUpsert) SetUpdateTime(v time.Time) *UserUpsert
SetUpdateTime sets the "update_time" field.
func (*UserUpsert) SetUserName ¶
func (u *UserUpsert) SetUserName(v string) *UserUpsert
SetUserName sets the "user_name" field.
func (*UserUpsert) UpdateEmail ¶
func (u *UserUpsert) UpdateEmail() *UserUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsert) UpdateFamilyName ¶
func (u *UserUpsert) UpdateFamilyName() *UserUpsert
UpdateFamilyName sets the "family_name" field to the value that was provided on create.
func (*UserUpsert) UpdateGivenName ¶
func (u *UserUpsert) UpdateGivenName() *UserUpsert
UpdateGivenName sets the "given_name" field to the value that was provided on create.
func (*UserUpsert) UpdatePhotoURL ¶
func (u *UserUpsert) UpdatePhotoURL() *UserUpsert
UpdatePhotoURL sets the "photo_url" field to the value that was provided on create.
func (*UserUpsert) UpdateType ¶
func (u *UserUpsert) UpdateType() *UserUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*UserUpsert) UpdateUpdateTime ¶
func (u *UserUpsert) UpdateUpdateTime() *UserUpsert
UpdateUpdateTime sets the "update_time" field to the value that was provided on create.
func (*UserUpsert) UpdateUserName ¶
func (u *UserUpsert) UpdateUserName() *UserUpsert
UpdateUserName sets the "user_name" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) ClearFamilyName ¶
func (u *UserUpsertBulk) ClearFamilyName() *UserUpsertBulk
ClearFamilyName clears the value of the "family_name" field.
func (*UserUpsertBulk) ClearGivenName ¶
func (u *UserUpsertBulk) ClearGivenName() *UserUpsertBulk
ClearGivenName clears the value of the "given_name" field.
func (*UserUpsertBulk) ClearPhotoURL ¶
func (u *UserUpsertBulk) ClearPhotoURL() *UserUpsertBulk
ClearPhotoURL clears the value of the "photo_url" field.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetEmail ¶
func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
SetEmail sets the "email" field.
func (*UserUpsertBulk) SetFamilyName ¶
func (u *UserUpsertBulk) SetFamilyName(v string) *UserUpsertBulk
SetFamilyName sets the "family_name" field.
func (*UserUpsertBulk) SetGivenName ¶
func (u *UserUpsertBulk) SetGivenName(v string) *UserUpsertBulk
SetGivenName sets the "given_name" field.
func (*UserUpsertBulk) SetPhotoURL ¶
func (u *UserUpsertBulk) SetPhotoURL(v string) *UserUpsertBulk
SetPhotoURL sets the "photo_url" field.
func (*UserUpsertBulk) SetType ¶
func (u *UserUpsertBulk) SetType(v enum.UserType) *UserUpsertBulk
SetType sets the "type" field.
func (*UserUpsertBulk) SetUpdateTime ¶
func (u *UserUpsertBulk) SetUpdateTime(v time.Time) *UserUpsertBulk
SetUpdateTime sets the "update_time" field.
func (*UserUpsertBulk) SetUserName ¶
func (u *UserUpsertBulk) SetUserName(v string) *UserUpsertBulk
SetUserName sets the "user_name" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateEmail ¶
func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateFamilyName ¶
func (u *UserUpsertBulk) UpdateFamilyName() *UserUpsertBulk
UpdateFamilyName sets the "family_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateGivenName ¶
func (u *UserUpsertBulk) UpdateGivenName() *UserUpsertBulk
UpdateGivenName sets the "given_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertBulk) UpdatePhotoURL ¶
func (u *UserUpsertBulk) UpdatePhotoURL() *UserUpsertBulk
UpdatePhotoURL sets the "photo_url" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateType ¶
func (u *UserUpsertBulk) UpdateType() *UserUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUpdateTime ¶
func (u *UserUpsertBulk) UpdateUpdateTime() *UserUpsertBulk
UpdateUpdateTime sets the "update_time" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUserName ¶
func (u *UserUpsertBulk) UpdateUserName() *UserUpsertBulk
UpdateUserName sets the "user_name" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) ClearFamilyName ¶
func (u *UserUpsertOne) ClearFamilyName() *UserUpsertOne
ClearFamilyName clears the value of the "family_name" field.
func (*UserUpsertOne) ClearGivenName ¶
func (u *UserUpsertOne) ClearGivenName() *UserUpsertOne
ClearGivenName clears the value of the "given_name" field.
func (*UserUpsertOne) ClearPhotoURL ¶
func (u *UserUpsertOne) ClearPhotoURL() *UserUpsertOne
ClearPhotoURL clears the value of the "photo_url" field.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetEmail ¶
func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
SetEmail sets the "email" field.
func (*UserUpsertOne) SetFamilyName ¶
func (u *UserUpsertOne) SetFamilyName(v string) *UserUpsertOne
SetFamilyName sets the "family_name" field.
func (*UserUpsertOne) SetGivenName ¶
func (u *UserUpsertOne) SetGivenName(v string) *UserUpsertOne
SetGivenName sets the "given_name" field.
func (*UserUpsertOne) SetPhotoURL ¶
func (u *UserUpsertOne) SetPhotoURL(v string) *UserUpsertOne
SetPhotoURL sets the "photo_url" field.
func (*UserUpsertOne) SetType ¶
func (u *UserUpsertOne) SetType(v enum.UserType) *UserUpsertOne
SetType sets the "type" field.
func (*UserUpsertOne) SetUpdateTime ¶
func (u *UserUpsertOne) SetUpdateTime(v time.Time) *UserUpsertOne
SetUpdateTime sets the "update_time" field.
func (*UserUpsertOne) SetUserName ¶
func (u *UserUpsertOne) SetUserName(v string) *UserUpsertOne
SetUserName sets the "user_name" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateEmail ¶
func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertOne) UpdateFamilyName ¶
func (u *UserUpsertOne) UpdateFamilyName() *UserUpsertOne
UpdateFamilyName sets the "family_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateGivenName ¶
func (u *UserUpsertOne) UpdateGivenName() *UserUpsertOne
UpdateGivenName sets the "given_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
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.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertOne) UpdatePhotoURL ¶
func (u *UserUpsertOne) UpdatePhotoURL() *UserUpsertOne
UpdatePhotoURL sets the "photo_url" field to the value that was provided on create.
func (*UserUpsertOne) UpdateType ¶
func (u *UserUpsertOne) UpdateType() *UserUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUpdateTime ¶
func (u *UserUpsertOne) UpdateUpdateTime() *UserUpsertOne
UpdateUpdateTime sets the "update_time" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUserName ¶
func (u *UserUpsertOne) UpdateUserName() *UserUpsertOne
UpdateUserName sets the "user_name" field to the value that was provided on create.
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 ¶
- client.go
- client_extension.go
- collaboration.go
- collaboration_create.go
- collaboration_delete.go
- collaboration_query.go
- collaboration_update.go
- ent.go
- memo.go
- memo_create.go
- memo_delete.go
- memo_query.go
- memo_update.go
- mutation.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
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go