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 Chart
- type ChartClient
- func (c *ChartClient) Create() *ChartCreate
- func (c *ChartClient) CreateBulk(builders ...*ChartCreate) *ChartCreateBulk
- func (c *ChartClient) Delete() *ChartDelete
- func (c *ChartClient) DeleteOne(ch *Chart) *ChartDeleteOne
- func (c *ChartClient) DeleteOneID(id uuid.UUID) *ChartDeleteOne
- func (c *ChartClient) Get(ctx context.Context, id uuid.UUID) (*Chart, error)
- func (c *ChartClient) GetX(ctx context.Context, id uuid.UUID) *Chart
- func (c *ChartClient) Hooks() []Hook
- func (c *ChartClient) Intercept(interceptors ...Interceptor)
- func (c *ChartClient) Interceptors() []Interceptor
- func (c *ChartClient) MapCreateBulk(slice any, setFunc func(*ChartCreate, int)) *ChartCreateBulk
- func (c *ChartClient) Query() *ChartQuery
- func (c *ChartClient) Update() *ChartUpdate
- func (c *ChartClient) UpdateOne(ch *Chart) *ChartUpdateOne
- func (c *ChartClient) UpdateOneID(id uuid.UUID) *ChartUpdateOne
- func (c *ChartClient) Use(hooks ...Hook)
- type ChartCreate
- func (cc *ChartCreate) Exec(ctx context.Context) error
- func (cc *ChartCreate) ExecX(ctx context.Context)
- func (cc *ChartCreate) Mutation() *ChartMutation
- func (cc *ChartCreate) Save(ctx context.Context) (*Chart, error)
- func (cc *ChartCreate) SaveX(ctx context.Context) *Chart
- func (cc *ChartCreate) SetChartID(u uint32) *ChartCreate
- func (cc *ChartCreate) SetClientID(s string) *ChartCreate
- func (cc *ChartCreate) SetContent(s string) *ChartCreate
- func (cc *ChartCreate) SetCreatedAt(t time.Time) *ChartCreate
- func (cc *ChartCreate) SetID(u uuid.UUID) *ChartCreate
- func (cc *ChartCreate) SetName(s string) *ChartCreate
- func (cc *ChartCreate) SetNillableChartID(u *uint32) *ChartCreate
- func (cc *ChartCreate) SetNillableClientID(s *string) *ChartCreate
- func (cc *ChartCreate) SetNillableContent(s *string) *ChartCreate
- func (cc *ChartCreate) SetNillableCreatedAt(t *time.Time) *ChartCreate
- func (cc *ChartCreate) SetNillableID(u *uuid.UUID) *ChartCreate
- func (cc *ChartCreate) SetNillableName(s *string) *ChartCreate
- func (cc *ChartCreate) SetNillableResolution(s *string) *ChartCreate
- func (cc *ChartCreate) SetNillableSymbol(s *string) *ChartCreate
- func (cc *ChartCreate) SetNillableTemplateID(s *string) *ChartCreate
- func (cc *ChartCreate) SetNillableType(s *string) *ChartCreate
- func (cc *ChartCreate) SetNillableUpdatedAt(t *time.Time) *ChartCreate
- func (cc *ChartCreate) SetNillableUserID(s *string) *ChartCreate
- func (cc *ChartCreate) SetResolution(s string) *ChartCreate
- func (cc *ChartCreate) SetSymbol(s string) *ChartCreate
- func (cc *ChartCreate) SetTemplateID(s string) *ChartCreate
- func (cc *ChartCreate) SetType(s string) *ChartCreate
- func (cc *ChartCreate) SetUpdatedAt(t time.Time) *ChartCreate
- func (cc *ChartCreate) SetUserID(s string) *ChartCreate
- type ChartCreateBulk
- type ChartDelete
- type ChartDeleteOne
- type ChartGroupBy
- func (cgb *ChartGroupBy) Aggregate(fns ...AggregateFunc) *ChartGroupBy
- func (s *ChartGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChartGroupBy) BoolX(ctx context.Context) bool
- func (s *ChartGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ChartGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ChartGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChartGroupBy) Float64X(ctx context.Context) float64
- func (s *ChartGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChartGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ChartGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ChartGroupBy) IntX(ctx context.Context) int
- func (s *ChartGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ChartGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ChartGroupBy) Scan(ctx context.Context, v any) error
- func (s *ChartGroupBy) ScanX(ctx context.Context, v any)
- func (s *ChartGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ChartGroupBy) StringX(ctx context.Context) string
- func (s *ChartGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ChartGroupBy) StringsX(ctx context.Context) []string
- type ChartMutation
- func (m *ChartMutation) AddChartID(u int32)
- func (m *ChartMutation) AddField(name string, value ent.Value) error
- func (m *ChartMutation) AddedChartID() (r int32, exists bool)
- func (m *ChartMutation) AddedEdges() []string
- func (m *ChartMutation) AddedField(name string) (ent.Value, bool)
- func (m *ChartMutation) AddedFields() []string
- func (m *ChartMutation) AddedIDs(name string) []ent.Value
- func (m *ChartMutation) ChartID() (r uint32, exists bool)
- func (m *ChartMutation) ChartIDCleared() bool
- func (m *ChartMutation) ClearChartID()
- func (m *ChartMutation) ClearEdge(name string) error
- func (m *ChartMutation) ClearField(name string) error
- func (m *ChartMutation) ClearedEdges() []string
- func (m *ChartMutation) ClearedFields() []string
- func (m ChartMutation) Client() *Client
- func (m *ChartMutation) ClientID() (r string, exists bool)
- func (m *ChartMutation) Content() (r string, exists bool)
- func (m *ChartMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ChartMutation) EdgeCleared(name string) bool
- func (m *ChartMutation) Field(name string) (ent.Value, bool)
- func (m *ChartMutation) FieldCleared(name string) bool
- func (m *ChartMutation) Fields() []string
- func (m *ChartMutation) GetType() (r string, exists bool)
- func (m *ChartMutation) ID() (id uuid.UUID, exists bool)
- func (m *ChartMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ChartMutation) Name() (r string, exists bool)
- func (m *ChartMutation) OldChartID(ctx context.Context) (v uint32, err error)
- func (m *ChartMutation) OldClientID(ctx context.Context) (v string, err error)
- func (m *ChartMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *ChartMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ChartMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ChartMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ChartMutation) OldResolution(ctx context.Context) (v string, err error)
- func (m *ChartMutation) OldSymbol(ctx context.Context) (v string, err error)
- func (m *ChartMutation) OldTemplateID(ctx context.Context) (v string, err error)
- func (m *ChartMutation) OldType(ctx context.Context) (v string, err error)
- func (m *ChartMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ChartMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *ChartMutation) Op() Op
- func (m *ChartMutation) RemovedEdges() []string
- func (m *ChartMutation) RemovedIDs(name string) []ent.Value
- func (m *ChartMutation) ResetChartID()
- func (m *ChartMutation) ResetClientID()
- func (m *ChartMutation) ResetContent()
- func (m *ChartMutation) ResetCreatedAt()
- func (m *ChartMutation) ResetEdge(name string) error
- func (m *ChartMutation) ResetField(name string) error
- func (m *ChartMutation) ResetName()
- func (m *ChartMutation) ResetResolution()
- func (m *ChartMutation) ResetSymbol()
- func (m *ChartMutation) ResetTemplateID()
- func (m *ChartMutation) ResetType()
- func (m *ChartMutation) ResetUpdatedAt()
- func (m *ChartMutation) ResetUserID()
- func (m *ChartMutation) Resolution() (r string, exists bool)
- func (m *ChartMutation) SetChartID(u uint32)
- func (m *ChartMutation) SetClientID(s string)
- func (m *ChartMutation) SetContent(s string)
- func (m *ChartMutation) SetCreatedAt(t time.Time)
- func (m *ChartMutation) SetField(name string, value ent.Value) error
- func (m *ChartMutation) SetID(id uuid.UUID)
- func (m *ChartMutation) SetName(s string)
- func (m *ChartMutation) SetOp(op Op)
- func (m *ChartMutation) SetResolution(s string)
- func (m *ChartMutation) SetSymbol(s string)
- func (m *ChartMutation) SetTemplateID(s string)
- func (m *ChartMutation) SetType(s string)
- func (m *ChartMutation) SetUpdatedAt(t time.Time)
- func (m *ChartMutation) SetUserID(s string)
- func (m *ChartMutation) Symbol() (r string, exists bool)
- func (m *ChartMutation) TemplateID() (r string, exists bool)
- func (m ChartMutation) Tx() (*Tx, error)
- func (m *ChartMutation) Type() string
- func (m *ChartMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ChartMutation) UserID() (r string, exists bool)
- func (m *ChartMutation) Where(ps ...predicate.Chart)
- func (m *ChartMutation) WhereP(ps ...func(*sql.Selector))
- type ChartQuery
- func (cq *ChartQuery) Aggregate(fns ...AggregateFunc) *ChartSelect
- func (cq *ChartQuery) All(ctx context.Context) ([]*Chart, error)
- func (cq *ChartQuery) AllX(ctx context.Context) []*Chart
- func (cq *ChartQuery) Clone() *ChartQuery
- func (cq *ChartQuery) Count(ctx context.Context) (int, error)
- func (cq *ChartQuery) CountX(ctx context.Context) int
- func (cq *ChartQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ChartQuery) ExistX(ctx context.Context) bool
- func (cq *ChartQuery) First(ctx context.Context) (*Chart, error)
- func (cq *ChartQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *ChartQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (cq *ChartQuery) FirstX(ctx context.Context) *Chart
- func (cq *ChartQuery) GroupBy(field string, fields ...string) *ChartGroupBy
- func (cq *ChartQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (cq *ChartQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cq *ChartQuery) Limit(limit int) *ChartQuery
- func (cq *ChartQuery) Offset(offset int) *ChartQuery
- func (cq *ChartQuery) Only(ctx context.Context) (*Chart, error)
- func (cq *ChartQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *ChartQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (cq *ChartQuery) OnlyX(ctx context.Context) *Chart
- func (cq *ChartQuery) Order(o ...chart.OrderOption) *ChartQuery
- func (cq *ChartQuery) Select(fields ...string) *ChartSelect
- func (cq *ChartQuery) Unique(unique bool) *ChartQuery
- func (cq *ChartQuery) Where(ps ...predicate.Chart) *ChartQuery
- type ChartSelect
- func (cs *ChartSelect) Aggregate(fns ...AggregateFunc) *ChartSelect
- func (s *ChartSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChartSelect) BoolX(ctx context.Context) bool
- func (s *ChartSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ChartSelect) BoolsX(ctx context.Context) []bool
- func (s *ChartSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChartSelect) Float64X(ctx context.Context) float64
- func (s *ChartSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChartSelect) Float64sX(ctx context.Context) []float64
- func (s *ChartSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ChartSelect) IntX(ctx context.Context) int
- func (s *ChartSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ChartSelect) IntsX(ctx context.Context) []int
- func (cs *ChartSelect) Scan(ctx context.Context, v any) error
- func (s *ChartSelect) ScanX(ctx context.Context, v any)
- func (s *ChartSelect) String(ctx context.Context) (_ string, err error)
- func (s *ChartSelect) StringX(ctx context.Context) string
- func (s *ChartSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ChartSelect) StringsX(ctx context.Context) []string
- type ChartUpdate
- func (cu *ChartUpdate) AddChartID(u int32) *ChartUpdate
- func (cu *ChartUpdate) ClearChartID() *ChartUpdate
- func (cu *ChartUpdate) Exec(ctx context.Context) error
- func (cu *ChartUpdate) ExecX(ctx context.Context)
- func (cu *ChartUpdate) Mutation() *ChartMutation
- func (cu *ChartUpdate) Save(ctx context.Context) (int, error)
- func (cu *ChartUpdate) SaveX(ctx context.Context) int
- func (cu *ChartUpdate) SetChartID(u uint32) *ChartUpdate
- func (cu *ChartUpdate) SetClientID(s string) *ChartUpdate
- func (cu *ChartUpdate) SetContent(s string) *ChartUpdate
- func (cu *ChartUpdate) SetName(s string) *ChartUpdate
- func (cu *ChartUpdate) SetNillableChartID(u *uint32) *ChartUpdate
- func (cu *ChartUpdate) SetNillableClientID(s *string) *ChartUpdate
- func (cu *ChartUpdate) SetNillableContent(s *string) *ChartUpdate
- func (cu *ChartUpdate) SetNillableName(s *string) *ChartUpdate
- func (cu *ChartUpdate) SetNillableResolution(s *string) *ChartUpdate
- func (cu *ChartUpdate) SetNillableSymbol(s *string) *ChartUpdate
- func (cu *ChartUpdate) SetNillableTemplateID(s *string) *ChartUpdate
- func (cu *ChartUpdate) SetNillableType(s *string) *ChartUpdate
- func (cu *ChartUpdate) SetNillableUserID(s *string) *ChartUpdate
- func (cu *ChartUpdate) SetResolution(s string) *ChartUpdate
- func (cu *ChartUpdate) SetSymbol(s string) *ChartUpdate
- func (cu *ChartUpdate) SetTemplateID(s string) *ChartUpdate
- func (cu *ChartUpdate) SetType(s string) *ChartUpdate
- func (cu *ChartUpdate) SetUpdatedAt(t time.Time) *ChartUpdate
- func (cu *ChartUpdate) SetUserID(s string) *ChartUpdate
- func (cu *ChartUpdate) Where(ps ...predicate.Chart) *ChartUpdate
- type ChartUpdateOne
- func (cuo *ChartUpdateOne) AddChartID(u int32) *ChartUpdateOne
- func (cuo *ChartUpdateOne) ClearChartID() *ChartUpdateOne
- func (cuo *ChartUpdateOne) Exec(ctx context.Context) error
- func (cuo *ChartUpdateOne) ExecX(ctx context.Context)
- func (cuo *ChartUpdateOne) Mutation() *ChartMutation
- func (cuo *ChartUpdateOne) Save(ctx context.Context) (*Chart, error)
- func (cuo *ChartUpdateOne) SaveX(ctx context.Context) *Chart
- func (cuo *ChartUpdateOne) Select(field string, fields ...string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetChartID(u uint32) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetClientID(s string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetContent(s string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetName(s string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetNillableChartID(u *uint32) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetNillableClientID(s *string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetNillableContent(s *string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetNillableName(s *string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetNillableResolution(s *string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetNillableSymbol(s *string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetNillableTemplateID(s *string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetNillableType(s *string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetNillableUserID(s *string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetResolution(s string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetSymbol(s string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetTemplateID(s string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetType(s string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetUpdatedAt(t time.Time) *ChartUpdateOne
- func (cuo *ChartUpdateOne) SetUserID(s string) *ChartUpdateOne
- func (cuo *ChartUpdateOne) Where(ps ...predicate.Chart) *ChartUpdateOne
- type Charts
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Profile
- type ProfileClient
- func (c *ProfileClient) Create() *ProfileCreate
- func (c *ProfileClient) CreateBulk(builders ...*ProfileCreate) *ProfileCreateBulk
- func (c *ProfileClient) Delete() *ProfileDelete
- func (c *ProfileClient) DeleteOne(pr *Profile) *ProfileDeleteOne
- func (c *ProfileClient) DeleteOneID(id uuid.UUID) *ProfileDeleteOne
- func (c *ProfileClient) Get(ctx context.Context, id uuid.UUID) (*Profile, error)
- func (c *ProfileClient) GetX(ctx context.Context, id uuid.UUID) *Profile
- func (c *ProfileClient) Hooks() []Hook
- func (c *ProfileClient) Intercept(interceptors ...Interceptor)
- func (c *ProfileClient) Interceptors() []Interceptor
- func (c *ProfileClient) MapCreateBulk(slice any, setFunc func(*ProfileCreate, int)) *ProfileCreateBulk
- func (c *ProfileClient) Query() *ProfileQuery
- func (c *ProfileClient) Update() *ProfileUpdate
- func (c *ProfileClient) UpdateOne(pr *Profile) *ProfileUpdateOne
- func (c *ProfileClient) UpdateOneID(id uuid.UUID) *ProfileUpdateOne
- func (c *ProfileClient) Use(hooks ...Hook)
- type ProfileCreate
- func (pc *ProfileCreate) Exec(ctx context.Context) error
- func (pc *ProfileCreate) ExecX(ctx context.Context)
- func (pc *ProfileCreate) Mutation() *ProfileMutation
- func (pc *ProfileCreate) Save(ctx context.Context) (*Profile, error)
- func (pc *ProfileCreate) SaveX(ctx context.Context) *Profile
- func (pc *ProfileCreate) SetCreatedAt(t time.Time) *ProfileCreate
- func (pc *ProfileCreate) SetEmail(s string) *ProfileCreate
- func (pc *ProfileCreate) SetEmailConfirmedAt(t time.Time) *ProfileCreate
- func (pc *ProfileCreate) SetFullName(s string) *ProfileCreate
- func (pc *ProfileCreate) SetID(u uuid.UUID) *ProfileCreate
- func (pc *ProfileCreate) SetIsSSOUser(b bool) *ProfileCreate
- func (pc *ProfileCreate) SetLanguage(s string) *ProfileCreate
- func (pc *ProfileCreate) SetNillableCreatedAt(t *time.Time) *ProfileCreate
- func (pc *ProfileCreate) SetNillableFullName(s *string) *ProfileCreate
- func (pc *ProfileCreate) SetNillableID(u *uuid.UUID) *ProfileCreate
- func (pc *ProfileCreate) SetNillableIsSSOUser(b *bool) *ProfileCreate
- func (pc *ProfileCreate) SetNillableLanguage(s *string) *ProfileCreate
- func (pc *ProfileCreate) SetNillableUpdatedAt(t *time.Time) *ProfileCreate
- func (pc *ProfileCreate) SetPhone(s string) *ProfileCreate
- func (pc *ProfileCreate) SetPhoneConfirmedAt(t time.Time) *ProfileCreate
- func (pc *ProfileCreate) SetUpdatedAt(t time.Time) *ProfileCreate
- func (pc *ProfileCreate) SetUserID(s string) *ProfileCreate
- type ProfileCreateBulk
- type ProfileDelete
- type ProfileDeleteOne
- type ProfileGroupBy
- func (pgb *ProfileGroupBy) Aggregate(fns ...AggregateFunc) *ProfileGroupBy
- func (s *ProfileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProfileGroupBy) BoolX(ctx context.Context) bool
- func (s *ProfileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProfileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProfileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProfileGroupBy) Float64X(ctx context.Context) float64
- func (s *ProfileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProfileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProfileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProfileGroupBy) IntX(ctx context.Context) int
- func (s *ProfileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProfileGroupBy) IntsX(ctx context.Context) []int
- func (pgb *ProfileGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProfileGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProfileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProfileGroupBy) StringX(ctx context.Context) string
- func (s *ProfileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProfileGroupBy) StringsX(ctx context.Context) []string
- type ProfileMutation
- func (m *ProfileMutation) AddField(name string, value ent.Value) error
- func (m *ProfileMutation) AddedEdges() []string
- func (m *ProfileMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProfileMutation) AddedFields() []string
- func (m *ProfileMutation) AddedIDs(name string) []ent.Value
- func (m *ProfileMutation) ClearEdge(name string) error
- func (m *ProfileMutation) ClearField(name string) error
- func (m *ProfileMutation) ClearedEdges() []string
- func (m *ProfileMutation) ClearedFields() []string
- func (m ProfileMutation) Client() *Client
- func (m *ProfileMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProfileMutation) EdgeCleared(name string) bool
- func (m *ProfileMutation) Email() (r string, exists bool)
- func (m *ProfileMutation) EmailConfirmedAt() (r time.Time, exists bool)
- func (m *ProfileMutation) Field(name string) (ent.Value, bool)
- func (m *ProfileMutation) FieldCleared(name string) bool
- func (m *ProfileMutation) Fields() []string
- func (m *ProfileMutation) FullName() (r string, exists bool)
- func (m *ProfileMutation) ID() (id uuid.UUID, exists bool)
- func (m *ProfileMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ProfileMutation) IsSSOUser() (r bool, exists bool)
- func (m *ProfileMutation) Language() (r string, exists bool)
- func (m *ProfileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProfileMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *ProfileMutation) OldEmailConfirmedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProfileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProfileMutation) OldFullName(ctx context.Context) (v string, err error)
- func (m *ProfileMutation) OldIsSSOUser(ctx context.Context) (v bool, err error)
- func (m *ProfileMutation) OldLanguage(ctx context.Context) (v string, err error)
- func (m *ProfileMutation) OldPhone(ctx context.Context) (v string, err error)
- func (m *ProfileMutation) OldPhoneConfirmedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProfileMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProfileMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *ProfileMutation) Op() Op
- func (m *ProfileMutation) Phone() (r string, exists bool)
- func (m *ProfileMutation) PhoneConfirmedAt() (r time.Time, exists bool)
- func (m *ProfileMutation) RemovedEdges() []string
- func (m *ProfileMutation) RemovedIDs(name string) []ent.Value
- func (m *ProfileMutation) ResetCreatedAt()
- func (m *ProfileMutation) ResetEdge(name string) error
- func (m *ProfileMutation) ResetEmail()
- func (m *ProfileMutation) ResetEmailConfirmedAt()
- func (m *ProfileMutation) ResetField(name string) error
- func (m *ProfileMutation) ResetFullName()
- func (m *ProfileMutation) ResetIsSSOUser()
- func (m *ProfileMutation) ResetLanguage()
- func (m *ProfileMutation) ResetPhone()
- func (m *ProfileMutation) ResetPhoneConfirmedAt()
- func (m *ProfileMutation) ResetUpdatedAt()
- func (m *ProfileMutation) ResetUserID()
- func (m *ProfileMutation) SetCreatedAt(t time.Time)
- func (m *ProfileMutation) SetEmail(s string)
- func (m *ProfileMutation) SetEmailConfirmedAt(t time.Time)
- func (m *ProfileMutation) SetField(name string, value ent.Value) error
- func (m *ProfileMutation) SetFullName(s string)
- func (m *ProfileMutation) SetID(id uuid.UUID)
- func (m *ProfileMutation) SetIsSSOUser(b bool)
- func (m *ProfileMutation) SetLanguage(s string)
- func (m *ProfileMutation) SetOp(op Op)
- func (m *ProfileMutation) SetPhone(s string)
- func (m *ProfileMutation) SetPhoneConfirmedAt(t time.Time)
- func (m *ProfileMutation) SetUpdatedAt(t time.Time)
- func (m *ProfileMutation) SetUserID(s string)
- func (m ProfileMutation) Tx() (*Tx, error)
- func (m *ProfileMutation) Type() string
- func (m *ProfileMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProfileMutation) UserID() (r string, exists bool)
- func (m *ProfileMutation) Where(ps ...predicate.Profile)
- func (m *ProfileMutation) WhereP(ps ...func(*sql.Selector))
- type ProfileQuery
- func (pq *ProfileQuery) Aggregate(fns ...AggregateFunc) *ProfileSelect
- func (pq *ProfileQuery) All(ctx context.Context) ([]*Profile, error)
- func (pq *ProfileQuery) AllX(ctx context.Context) []*Profile
- func (pq *ProfileQuery) Clone() *ProfileQuery
- func (pq *ProfileQuery) Count(ctx context.Context) (int, error)
- func (pq *ProfileQuery) CountX(ctx context.Context) int
- func (pq *ProfileQuery) Exist(ctx context.Context) (bool, error)
- func (pq *ProfileQuery) ExistX(ctx context.Context) bool
- func (pq *ProfileQuery) First(ctx context.Context) (*Profile, error)
- func (pq *ProfileQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *ProfileQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (pq *ProfileQuery) FirstX(ctx context.Context) *Profile
- func (pq *ProfileQuery) GroupBy(field string, fields ...string) *ProfileGroupBy
- func (pq *ProfileQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (pq *ProfileQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pq *ProfileQuery) Limit(limit int) *ProfileQuery
- func (pq *ProfileQuery) Offset(offset int) *ProfileQuery
- func (pq *ProfileQuery) Only(ctx context.Context) (*Profile, error)
- func (pq *ProfileQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *ProfileQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (pq *ProfileQuery) OnlyX(ctx context.Context) *Profile
- func (pq *ProfileQuery) Order(o ...profile.OrderOption) *ProfileQuery
- func (pq *ProfileQuery) Select(fields ...string) *ProfileSelect
- func (pq *ProfileQuery) Unique(unique bool) *ProfileQuery
- func (pq *ProfileQuery) Where(ps ...predicate.Profile) *ProfileQuery
- type ProfileSelect
- func (ps *ProfileSelect) Aggregate(fns ...AggregateFunc) *ProfileSelect
- func (s *ProfileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProfileSelect) BoolX(ctx context.Context) bool
- func (s *ProfileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProfileSelect) BoolsX(ctx context.Context) []bool
- func (s *ProfileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProfileSelect) Float64X(ctx context.Context) float64
- func (s *ProfileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProfileSelect) Float64sX(ctx context.Context) []float64
- func (s *ProfileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProfileSelect) IntX(ctx context.Context) int
- func (s *ProfileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProfileSelect) IntsX(ctx context.Context) []int
- func (ps *ProfileSelect) Scan(ctx context.Context, v any) error
- func (s *ProfileSelect) ScanX(ctx context.Context, v any)
- func (s *ProfileSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProfileSelect) StringX(ctx context.Context) string
- func (s *ProfileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProfileSelect) StringsX(ctx context.Context) []string
- type ProfileUpdate
- func (pu *ProfileUpdate) Exec(ctx context.Context) error
- func (pu *ProfileUpdate) ExecX(ctx context.Context)
- func (pu *ProfileUpdate) Mutation() *ProfileMutation
- func (pu *ProfileUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProfileUpdate) SaveX(ctx context.Context) int
- func (pu *ProfileUpdate) SetEmail(s string) *ProfileUpdate
- func (pu *ProfileUpdate) SetEmailConfirmedAt(t time.Time) *ProfileUpdate
- func (pu *ProfileUpdate) SetFullName(s string) *ProfileUpdate
- func (pu *ProfileUpdate) SetIsSSOUser(b bool) *ProfileUpdate
- func (pu *ProfileUpdate) SetLanguage(s string) *ProfileUpdate
- func (pu *ProfileUpdate) SetNillableEmail(s *string) *ProfileUpdate
- func (pu *ProfileUpdate) SetNillableEmailConfirmedAt(t *time.Time) *ProfileUpdate
- func (pu *ProfileUpdate) SetNillableFullName(s *string) *ProfileUpdate
- func (pu *ProfileUpdate) SetNillableIsSSOUser(b *bool) *ProfileUpdate
- func (pu *ProfileUpdate) SetNillableLanguage(s *string) *ProfileUpdate
- func (pu *ProfileUpdate) SetNillablePhone(s *string) *ProfileUpdate
- func (pu *ProfileUpdate) SetNillablePhoneConfirmedAt(t *time.Time) *ProfileUpdate
- func (pu *ProfileUpdate) SetNillableUserID(s *string) *ProfileUpdate
- func (pu *ProfileUpdate) SetPhone(s string) *ProfileUpdate
- func (pu *ProfileUpdate) SetPhoneConfirmedAt(t time.Time) *ProfileUpdate
- func (pu *ProfileUpdate) SetUpdatedAt(t time.Time) *ProfileUpdate
- func (pu *ProfileUpdate) SetUserID(s string) *ProfileUpdate
- func (pu *ProfileUpdate) Where(ps ...predicate.Profile) *ProfileUpdate
- type ProfileUpdateOne
- func (puo *ProfileUpdateOne) Exec(ctx context.Context) error
- func (puo *ProfileUpdateOne) ExecX(ctx context.Context)
- func (puo *ProfileUpdateOne) Mutation() *ProfileMutation
- func (puo *ProfileUpdateOne) Save(ctx context.Context) (*Profile, error)
- func (puo *ProfileUpdateOne) SaveX(ctx context.Context) *Profile
- func (puo *ProfileUpdateOne) Select(field string, fields ...string) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetEmail(s string) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetEmailConfirmedAt(t time.Time) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetFullName(s string) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetIsSSOUser(b bool) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetLanguage(s string) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetNillableEmail(s *string) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetNillableEmailConfirmedAt(t *time.Time) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetNillableFullName(s *string) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetNillableIsSSOUser(b *bool) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetNillableLanguage(s *string) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetNillablePhone(s *string) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetNillablePhoneConfirmedAt(t *time.Time) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetNillableUserID(s *string) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetPhone(s string) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetPhoneConfirmedAt(t time.Time) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetUpdatedAt(t time.Time) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) SetUserID(s string) *ProfileUpdateOne
- func (puo *ProfileUpdateOne) Where(ps ...predicate.Profile) *ProfileUpdateOne
- type Profiles
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeChart = "Chart" TypeProfile = "Profile" )
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 Chart ¶
type Chart struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // UserID holds the value of the "user_id" field. UserID string `json:"user_id,omitempty"` // ChartID holds the value of the "chart_id" field. ChartID uint32 `json:"chart_id,omitempty"` // TemplateID holds the value of the "template_id" field. TemplateID string `json:"template_id,omitempty"` // ClientID holds the value of the "client_id" field. ClientID string `json:"client_id,omitempty"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,omitempty"` // Symbol holds the value of the "symbol" field. Symbol string `json:"symbol,omitempty"` // Resolution holds the value of the "resolution" field. Resolution string `json:"resolution,omitempty"` // contains filtered or unexported fields }
Chart is the model entity for the Chart schema.
func (*Chart) Unwrap ¶
Unwrap unwraps the Chart 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 (*Chart) Update ¶
func (c *Chart) Update() *ChartUpdateOne
Update returns a builder for updating this Chart. Note that you need to call Chart.Unwrap() before calling this method if this Chart was returned from a transaction, and the transaction was committed or rolled back.
type ChartClient ¶
type ChartClient struct {
// contains filtered or unexported fields
}
ChartClient is a client for the Chart schema.
func NewChartClient ¶
func NewChartClient(c config) *ChartClient
NewChartClient returns a client for the Chart from the given config.
func (*ChartClient) Create ¶
func (c *ChartClient) Create() *ChartCreate
Create returns a builder for creating a Chart entity.
func (*ChartClient) CreateBulk ¶
func (c *ChartClient) CreateBulk(builders ...*ChartCreate) *ChartCreateBulk
CreateBulk returns a builder for creating a bulk of Chart entities.
func (*ChartClient) Delete ¶
func (c *ChartClient) Delete() *ChartDelete
Delete returns a delete builder for Chart.
func (*ChartClient) DeleteOne ¶
func (c *ChartClient) DeleteOne(ch *Chart) *ChartDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ChartClient) DeleteOneID ¶
func (c *ChartClient) DeleteOneID(id uuid.UUID) *ChartDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ChartClient) Intercept ¶
func (c *ChartClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `chart.Intercept(f(g(h())))`.
func (*ChartClient) Interceptors ¶
func (c *ChartClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ChartClient) MapCreateBulk ¶
func (c *ChartClient) MapCreateBulk(slice any, setFunc func(*ChartCreate, int)) *ChartCreateBulk
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 (*ChartClient) Query ¶
func (c *ChartClient) Query() *ChartQuery
Query returns a query builder for Chart.
func (*ChartClient) Update ¶
func (c *ChartClient) Update() *ChartUpdate
Update returns an update builder for Chart.
func (*ChartClient) UpdateOne ¶
func (c *ChartClient) UpdateOne(ch *Chart) *ChartUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ChartClient) UpdateOneID ¶
func (c *ChartClient) UpdateOneID(id uuid.UUID) *ChartUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ChartClient) Use ¶
func (c *ChartClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `chart.Hooks(f(g(h())))`.
type ChartCreate ¶
type ChartCreate struct {
// contains filtered or unexported fields
}
ChartCreate is the builder for creating a Chart entity.
func (*ChartCreate) Exec ¶
func (cc *ChartCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChartCreate) ExecX ¶
func (cc *ChartCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChartCreate) Mutation ¶
func (cc *ChartCreate) Mutation() *ChartMutation
Mutation returns the ChartMutation object of the builder.
func (*ChartCreate) Save ¶
func (cc *ChartCreate) Save(ctx context.Context) (*Chart, error)
Save creates the Chart in the database.
func (*ChartCreate) SaveX ¶
func (cc *ChartCreate) SaveX(ctx context.Context) *Chart
SaveX calls Save and panics if Save returns an error.
func (*ChartCreate) SetChartID ¶
func (cc *ChartCreate) SetChartID(u uint32) *ChartCreate
SetChartID sets the "chart_id" field.
func (*ChartCreate) SetClientID ¶
func (cc *ChartCreate) SetClientID(s string) *ChartCreate
SetClientID sets the "client_id" field.
func (*ChartCreate) SetContent ¶
func (cc *ChartCreate) SetContent(s string) *ChartCreate
SetContent sets the "content" field.
func (*ChartCreate) SetCreatedAt ¶
func (cc *ChartCreate) SetCreatedAt(t time.Time) *ChartCreate
SetCreatedAt sets the "created_at" field.
func (*ChartCreate) SetID ¶
func (cc *ChartCreate) SetID(u uuid.UUID) *ChartCreate
SetID sets the "id" field.
func (*ChartCreate) SetName ¶
func (cc *ChartCreate) SetName(s string) *ChartCreate
SetName sets the "name" field.
func (*ChartCreate) SetNillableChartID ¶
func (cc *ChartCreate) SetNillableChartID(u *uint32) *ChartCreate
SetNillableChartID sets the "chart_id" field if the given value is not nil.
func (*ChartCreate) SetNillableClientID ¶
func (cc *ChartCreate) SetNillableClientID(s *string) *ChartCreate
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*ChartCreate) SetNillableContent ¶
func (cc *ChartCreate) SetNillableContent(s *string) *ChartCreate
SetNillableContent sets the "content" field if the given value is not nil.
func (*ChartCreate) SetNillableCreatedAt ¶
func (cc *ChartCreate) SetNillableCreatedAt(t *time.Time) *ChartCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ChartCreate) SetNillableID ¶
func (cc *ChartCreate) SetNillableID(u *uuid.UUID) *ChartCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ChartCreate) SetNillableName ¶
func (cc *ChartCreate) SetNillableName(s *string) *ChartCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*ChartCreate) SetNillableResolution ¶
func (cc *ChartCreate) SetNillableResolution(s *string) *ChartCreate
SetNillableResolution sets the "resolution" field if the given value is not nil.
func (*ChartCreate) SetNillableSymbol ¶
func (cc *ChartCreate) SetNillableSymbol(s *string) *ChartCreate
SetNillableSymbol sets the "symbol" field if the given value is not nil.
func (*ChartCreate) SetNillableTemplateID ¶
func (cc *ChartCreate) SetNillableTemplateID(s *string) *ChartCreate
SetNillableTemplateID sets the "template_id" field if the given value is not nil.
func (*ChartCreate) SetNillableType ¶
func (cc *ChartCreate) SetNillableType(s *string) *ChartCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*ChartCreate) SetNillableUpdatedAt ¶
func (cc *ChartCreate) SetNillableUpdatedAt(t *time.Time) *ChartCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ChartCreate) SetNillableUserID ¶
func (cc *ChartCreate) SetNillableUserID(s *string) *ChartCreate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*ChartCreate) SetResolution ¶
func (cc *ChartCreate) SetResolution(s string) *ChartCreate
SetResolution sets the "resolution" field.
func (*ChartCreate) SetSymbol ¶
func (cc *ChartCreate) SetSymbol(s string) *ChartCreate
SetSymbol sets the "symbol" field.
func (*ChartCreate) SetTemplateID ¶
func (cc *ChartCreate) SetTemplateID(s string) *ChartCreate
SetTemplateID sets the "template_id" field.
func (*ChartCreate) SetType ¶
func (cc *ChartCreate) SetType(s string) *ChartCreate
SetType sets the "type" field.
func (*ChartCreate) SetUpdatedAt ¶
func (cc *ChartCreate) SetUpdatedAt(t time.Time) *ChartCreate
SetUpdatedAt sets the "updated_at" field.
func (*ChartCreate) SetUserID ¶
func (cc *ChartCreate) SetUserID(s string) *ChartCreate
SetUserID sets the "user_id" field.
type ChartCreateBulk ¶
type ChartCreateBulk struct {
// contains filtered or unexported fields
}
ChartCreateBulk is the builder for creating many Chart entities in bulk.
func (*ChartCreateBulk) Exec ¶
func (ccb *ChartCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChartCreateBulk) ExecX ¶
func (ccb *ChartCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ChartDelete ¶
type ChartDelete struct {
// contains filtered or unexported fields
}
ChartDelete is the builder for deleting a Chart entity.
func (*ChartDelete) Exec ¶
func (cd *ChartDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ChartDelete) ExecX ¶
func (cd *ChartDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ChartDelete) Where ¶
func (cd *ChartDelete) Where(ps ...predicate.Chart) *ChartDelete
Where appends a list predicates to the ChartDelete builder.
type ChartDeleteOne ¶
type ChartDeleteOne struct {
// contains filtered or unexported fields
}
ChartDeleteOne is the builder for deleting a single Chart entity.
func (*ChartDeleteOne) Exec ¶
func (cdo *ChartDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ChartDeleteOne) ExecX ¶
func (cdo *ChartDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChartDeleteOne) Where ¶
func (cdo *ChartDeleteOne) Where(ps ...predicate.Chart) *ChartDeleteOne
Where appends a list predicates to the ChartDelete builder.
type ChartGroupBy ¶
type ChartGroupBy struct {
// contains filtered or unexported fields
}
ChartGroupBy is the group-by builder for Chart entities.
func (*ChartGroupBy) Aggregate ¶
func (cgb *ChartGroupBy) Aggregate(fns ...AggregateFunc) *ChartGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ChartGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChartGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChartGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChartGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChartGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChartGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChartGroupBy) Scan ¶
func (cgb *ChartGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChartGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChartMutation ¶
type ChartMutation struct {
// contains filtered or unexported fields
}
ChartMutation represents an operation that mutates the Chart nodes in the graph.
func (*ChartMutation) AddChartID ¶
func (m *ChartMutation) AddChartID(u int32)
AddChartID adds u to the "chart_id" field.
func (*ChartMutation) AddField ¶
func (m *ChartMutation) 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 (*ChartMutation) AddedChartID ¶
func (m *ChartMutation) AddedChartID() (r int32, exists bool)
AddedChartID returns the value that was added to the "chart_id" field in this mutation.
func (*ChartMutation) AddedEdges ¶
func (m *ChartMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ChartMutation) AddedField ¶
func (m *ChartMutation) 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 (*ChartMutation) AddedFields ¶
func (m *ChartMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ChartMutation) AddedIDs ¶
func (m *ChartMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ChartMutation) ChartID ¶
func (m *ChartMutation) ChartID() (r uint32, exists bool)
ChartID returns the value of the "chart_id" field in the mutation.
func (*ChartMutation) ChartIDCleared ¶
func (m *ChartMutation) ChartIDCleared() bool
ChartIDCleared returns if the "chart_id" field was cleared in this mutation.
func (*ChartMutation) ClearChartID ¶
func (m *ChartMutation) ClearChartID()
ClearChartID clears the value of the "chart_id" field.
func (*ChartMutation) ClearEdge ¶
func (m *ChartMutation) 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 (*ChartMutation) ClearField ¶
func (m *ChartMutation) 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 (*ChartMutation) ClearedEdges ¶
func (m *ChartMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ChartMutation) ClearedFields ¶
func (m *ChartMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ChartMutation) Client ¶
func (m ChartMutation) 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 (*ChartMutation) ClientID ¶
func (m *ChartMutation) ClientID() (r string, exists bool)
ClientID returns the value of the "client_id" field in the mutation.
func (*ChartMutation) Content ¶
func (m *ChartMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*ChartMutation) CreatedAt ¶
func (m *ChartMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ChartMutation) EdgeCleared ¶
func (m *ChartMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ChartMutation) Field ¶
func (m *ChartMutation) 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 (*ChartMutation) FieldCleared ¶
func (m *ChartMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ChartMutation) Fields ¶
func (m *ChartMutation) 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 (*ChartMutation) GetType ¶
func (m *ChartMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*ChartMutation) ID ¶
func (m *ChartMutation) 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 (*ChartMutation) 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 (*ChartMutation) Name ¶
func (m *ChartMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ChartMutation) OldChartID ¶
func (m *ChartMutation) OldChartID(ctx context.Context) (v uint32, err error)
OldChartID returns the old "chart_id" field's value of the Chart entity. If the Chart object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChartMutation) OldClientID ¶
func (m *ChartMutation) OldClientID(ctx context.Context) (v string, err error)
OldClientID returns the old "client_id" field's value of the Chart entity. If the Chart object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChartMutation) OldContent ¶
func (m *ChartMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Chart entity. If the Chart object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChartMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Chart entity. If the Chart object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChartMutation) 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 (*ChartMutation) OldName ¶
func (m *ChartMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Chart entity. If the Chart object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChartMutation) OldResolution ¶
func (m *ChartMutation) OldResolution(ctx context.Context) (v string, err error)
OldResolution returns the old "resolution" field's value of the Chart entity. If the Chart object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChartMutation) OldSymbol ¶
func (m *ChartMutation) OldSymbol(ctx context.Context) (v string, err error)
OldSymbol returns the old "symbol" field's value of the Chart entity. If the Chart object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChartMutation) OldTemplateID ¶
func (m *ChartMutation) OldTemplateID(ctx context.Context) (v string, err error)
OldTemplateID returns the old "template_id" field's value of the Chart entity. If the Chart object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChartMutation) OldType ¶
func (m *ChartMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Chart entity. If the Chart object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChartMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Chart entity. If the Chart object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChartMutation) OldUserID ¶
func (m *ChartMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the Chart entity. If the Chart object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ChartMutation) RemovedEdges ¶
func (m *ChartMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ChartMutation) RemovedIDs ¶
func (m *ChartMutation) 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 (*ChartMutation) ResetChartID ¶
func (m *ChartMutation) ResetChartID()
ResetChartID resets all changes to the "chart_id" field.
func (*ChartMutation) ResetClientID ¶
func (m *ChartMutation) ResetClientID()
ResetClientID resets all changes to the "client_id" field.
func (*ChartMutation) ResetContent ¶
func (m *ChartMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*ChartMutation) ResetCreatedAt ¶
func (m *ChartMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ChartMutation) ResetEdge ¶
func (m *ChartMutation) 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 (*ChartMutation) ResetField ¶
func (m *ChartMutation) 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 (*ChartMutation) ResetName ¶
func (m *ChartMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ChartMutation) ResetResolution ¶
func (m *ChartMutation) ResetResolution()
ResetResolution resets all changes to the "resolution" field.
func (*ChartMutation) ResetSymbol ¶
func (m *ChartMutation) ResetSymbol()
ResetSymbol resets all changes to the "symbol" field.
func (*ChartMutation) ResetTemplateID ¶
func (m *ChartMutation) ResetTemplateID()
ResetTemplateID resets all changes to the "template_id" field.
func (*ChartMutation) ResetType ¶
func (m *ChartMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*ChartMutation) ResetUpdatedAt ¶
func (m *ChartMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ChartMutation) ResetUserID ¶
func (m *ChartMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*ChartMutation) Resolution ¶
func (m *ChartMutation) Resolution() (r string, exists bool)
Resolution returns the value of the "resolution" field in the mutation.
func (*ChartMutation) SetChartID ¶
func (m *ChartMutation) SetChartID(u uint32)
SetChartID sets the "chart_id" field.
func (*ChartMutation) SetClientID ¶
func (m *ChartMutation) SetClientID(s string)
SetClientID sets the "client_id" field.
func (*ChartMutation) SetContent ¶
func (m *ChartMutation) SetContent(s string)
SetContent sets the "content" field.
func (*ChartMutation) SetCreatedAt ¶
func (m *ChartMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ChartMutation) SetField ¶
func (m *ChartMutation) 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 (*ChartMutation) SetID ¶
func (m *ChartMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Chart entities.
func (*ChartMutation) SetName ¶
func (m *ChartMutation) SetName(s string)
SetName sets the "name" field.
func (*ChartMutation) SetOp ¶
func (m *ChartMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ChartMutation) SetResolution ¶
func (m *ChartMutation) SetResolution(s string)
SetResolution sets the "resolution" field.
func (*ChartMutation) SetSymbol ¶
func (m *ChartMutation) SetSymbol(s string)
SetSymbol sets the "symbol" field.
func (*ChartMutation) SetTemplateID ¶
func (m *ChartMutation) SetTemplateID(s string)
SetTemplateID sets the "template_id" field.
func (*ChartMutation) SetType ¶
func (m *ChartMutation) SetType(s string)
SetType sets the "type" field.
func (*ChartMutation) SetUpdatedAt ¶
func (m *ChartMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ChartMutation) SetUserID ¶
func (m *ChartMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*ChartMutation) Symbol ¶
func (m *ChartMutation) Symbol() (r string, exists bool)
Symbol returns the value of the "symbol" field in the mutation.
func (*ChartMutation) TemplateID ¶
func (m *ChartMutation) TemplateID() (r string, exists bool)
TemplateID returns the value of the "template_id" field in the mutation.
func (ChartMutation) Tx ¶
func (m ChartMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ChartMutation) Type ¶
func (m *ChartMutation) Type() string
Type returns the node type of this mutation (Chart).
func (*ChartMutation) UpdatedAt ¶
func (m *ChartMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ChartMutation) UserID ¶
func (m *ChartMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*ChartMutation) Where ¶
func (m *ChartMutation) Where(ps ...predicate.Chart)
Where appends a list predicates to the ChartMutation builder.
func (*ChartMutation) WhereP ¶
func (m *ChartMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ChartMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ChartQuery ¶
type ChartQuery struct {
// contains filtered or unexported fields
}
ChartQuery is the builder for querying Chart entities.
func (*ChartQuery) Aggregate ¶
func (cq *ChartQuery) Aggregate(fns ...AggregateFunc) *ChartSelect
Aggregate returns a ChartSelect configured with the given aggregations.
func (*ChartQuery) All ¶
func (cq *ChartQuery) All(ctx context.Context) ([]*Chart, error)
All executes the query and returns a list of Charts.
func (*ChartQuery) AllX ¶
func (cq *ChartQuery) AllX(ctx context.Context) []*Chart
AllX is like All, but panics if an error occurs.
func (*ChartQuery) Clone ¶
func (cq *ChartQuery) Clone() *ChartQuery
Clone returns a duplicate of the ChartQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ChartQuery) Count ¶
func (cq *ChartQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ChartQuery) CountX ¶
func (cq *ChartQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ChartQuery) Exist ¶
func (cq *ChartQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ChartQuery) ExistX ¶
func (cq *ChartQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ChartQuery) First ¶
func (cq *ChartQuery) First(ctx context.Context) (*Chart, error)
First returns the first Chart entity from the query. Returns a *NotFoundError when no Chart was found.
func (*ChartQuery) FirstID ¶
FirstID returns the first Chart ID from the query. Returns a *NotFoundError when no Chart ID was found.
func (*ChartQuery) FirstIDX ¶
func (cq *ChartQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ChartQuery) FirstX ¶
func (cq *ChartQuery) FirstX(ctx context.Context) *Chart
FirstX is like First, but panics if an error occurs.
func (*ChartQuery) GroupBy ¶
func (cq *ChartQuery) GroupBy(field string, fields ...string) *ChartGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Chart.Query(). GroupBy(chart.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ChartQuery) IDsX ¶
func (cq *ChartQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ChartQuery) Limit ¶
func (cq *ChartQuery) Limit(limit int) *ChartQuery
Limit the number of records to be returned by this query.
func (*ChartQuery) Offset ¶
func (cq *ChartQuery) Offset(offset int) *ChartQuery
Offset to start from.
func (*ChartQuery) Only ¶
func (cq *ChartQuery) Only(ctx context.Context) (*Chart, error)
Only returns a single Chart entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Chart entity is found. Returns a *NotFoundError when no Chart entities are found.
func (*ChartQuery) OnlyID ¶
OnlyID is like Only, but returns the only Chart ID in the query. Returns a *NotSingularError when more than one Chart ID is found. Returns a *NotFoundError when no entities are found.
func (*ChartQuery) OnlyIDX ¶
func (cq *ChartQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ChartQuery) OnlyX ¶
func (cq *ChartQuery) OnlyX(ctx context.Context) *Chart
OnlyX is like Only, but panics if an error occurs.
func (*ChartQuery) Order ¶
func (cq *ChartQuery) Order(o ...chart.OrderOption) *ChartQuery
Order specifies how the records should be ordered.
func (*ChartQuery) Select ¶
func (cq *ChartQuery) Select(fields ...string) *ChartSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Chart.Query(). Select(chart.FieldCreatedAt). Scan(ctx, &v)
func (*ChartQuery) Unique ¶
func (cq *ChartQuery) Unique(unique bool) *ChartQuery
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 (*ChartQuery) Where ¶
func (cq *ChartQuery) Where(ps ...predicate.Chart) *ChartQuery
Where adds a new predicate for the ChartQuery builder.
type ChartSelect ¶
type ChartSelect struct { *ChartQuery // contains filtered or unexported fields }
ChartSelect is the builder for selecting fields of Chart entities.
func (*ChartSelect) Aggregate ¶
func (cs *ChartSelect) Aggregate(fns ...AggregateFunc) *ChartSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ChartSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChartSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChartSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChartSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChartSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChartSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChartSelect) Scan ¶
func (cs *ChartSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChartSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChartUpdate ¶
type ChartUpdate struct {
// contains filtered or unexported fields
}
ChartUpdate is the builder for updating Chart entities.
func (*ChartUpdate) AddChartID ¶
func (cu *ChartUpdate) AddChartID(u int32) *ChartUpdate
AddChartID adds u to the "chart_id" field.
func (*ChartUpdate) ClearChartID ¶
func (cu *ChartUpdate) ClearChartID() *ChartUpdate
ClearChartID clears the value of the "chart_id" field.
func (*ChartUpdate) Exec ¶
func (cu *ChartUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChartUpdate) ExecX ¶
func (cu *ChartUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChartUpdate) Mutation ¶
func (cu *ChartUpdate) Mutation() *ChartMutation
Mutation returns the ChartMutation object of the builder.
func (*ChartUpdate) Save ¶
func (cu *ChartUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ChartUpdate) SaveX ¶
func (cu *ChartUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ChartUpdate) SetChartID ¶
func (cu *ChartUpdate) SetChartID(u uint32) *ChartUpdate
SetChartID sets the "chart_id" field.
func (*ChartUpdate) SetClientID ¶
func (cu *ChartUpdate) SetClientID(s string) *ChartUpdate
SetClientID sets the "client_id" field.
func (*ChartUpdate) SetContent ¶
func (cu *ChartUpdate) SetContent(s string) *ChartUpdate
SetContent sets the "content" field.
func (*ChartUpdate) SetName ¶
func (cu *ChartUpdate) SetName(s string) *ChartUpdate
SetName sets the "name" field.
func (*ChartUpdate) SetNillableChartID ¶
func (cu *ChartUpdate) SetNillableChartID(u *uint32) *ChartUpdate
SetNillableChartID sets the "chart_id" field if the given value is not nil.
func (*ChartUpdate) SetNillableClientID ¶
func (cu *ChartUpdate) SetNillableClientID(s *string) *ChartUpdate
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*ChartUpdate) SetNillableContent ¶
func (cu *ChartUpdate) SetNillableContent(s *string) *ChartUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*ChartUpdate) SetNillableName ¶
func (cu *ChartUpdate) SetNillableName(s *string) *ChartUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ChartUpdate) SetNillableResolution ¶
func (cu *ChartUpdate) SetNillableResolution(s *string) *ChartUpdate
SetNillableResolution sets the "resolution" field if the given value is not nil.
func (*ChartUpdate) SetNillableSymbol ¶
func (cu *ChartUpdate) SetNillableSymbol(s *string) *ChartUpdate
SetNillableSymbol sets the "symbol" field if the given value is not nil.
func (*ChartUpdate) SetNillableTemplateID ¶
func (cu *ChartUpdate) SetNillableTemplateID(s *string) *ChartUpdate
SetNillableTemplateID sets the "template_id" field if the given value is not nil.
func (*ChartUpdate) SetNillableType ¶
func (cu *ChartUpdate) SetNillableType(s *string) *ChartUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*ChartUpdate) SetNillableUserID ¶
func (cu *ChartUpdate) SetNillableUserID(s *string) *ChartUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*ChartUpdate) SetResolution ¶
func (cu *ChartUpdate) SetResolution(s string) *ChartUpdate
SetResolution sets the "resolution" field.
func (*ChartUpdate) SetSymbol ¶
func (cu *ChartUpdate) SetSymbol(s string) *ChartUpdate
SetSymbol sets the "symbol" field.
func (*ChartUpdate) SetTemplateID ¶
func (cu *ChartUpdate) SetTemplateID(s string) *ChartUpdate
SetTemplateID sets the "template_id" field.
func (*ChartUpdate) SetType ¶
func (cu *ChartUpdate) SetType(s string) *ChartUpdate
SetType sets the "type" field.
func (*ChartUpdate) SetUpdatedAt ¶
func (cu *ChartUpdate) SetUpdatedAt(t time.Time) *ChartUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ChartUpdate) SetUserID ¶
func (cu *ChartUpdate) SetUserID(s string) *ChartUpdate
SetUserID sets the "user_id" field.
func (*ChartUpdate) Where ¶
func (cu *ChartUpdate) Where(ps ...predicate.Chart) *ChartUpdate
Where appends a list predicates to the ChartUpdate builder.
type ChartUpdateOne ¶
type ChartUpdateOne struct {
// contains filtered or unexported fields
}
ChartUpdateOne is the builder for updating a single Chart entity.
func (*ChartUpdateOne) AddChartID ¶
func (cuo *ChartUpdateOne) AddChartID(u int32) *ChartUpdateOne
AddChartID adds u to the "chart_id" field.
func (*ChartUpdateOne) ClearChartID ¶
func (cuo *ChartUpdateOne) ClearChartID() *ChartUpdateOne
ClearChartID clears the value of the "chart_id" field.
func (*ChartUpdateOne) Exec ¶
func (cuo *ChartUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ChartUpdateOne) ExecX ¶
func (cuo *ChartUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChartUpdateOne) Mutation ¶
func (cuo *ChartUpdateOne) Mutation() *ChartMutation
Mutation returns the ChartMutation object of the builder.
func (*ChartUpdateOne) Save ¶
func (cuo *ChartUpdateOne) Save(ctx context.Context) (*Chart, error)
Save executes the query and returns the updated Chart entity.
func (*ChartUpdateOne) SaveX ¶
func (cuo *ChartUpdateOne) SaveX(ctx context.Context) *Chart
SaveX is like Save, but panics if an error occurs.
func (*ChartUpdateOne) Select ¶
func (cuo *ChartUpdateOne) Select(field string, fields ...string) *ChartUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ChartUpdateOne) SetChartID ¶
func (cuo *ChartUpdateOne) SetChartID(u uint32) *ChartUpdateOne
SetChartID sets the "chart_id" field.
func (*ChartUpdateOne) SetClientID ¶
func (cuo *ChartUpdateOne) SetClientID(s string) *ChartUpdateOne
SetClientID sets the "client_id" field.
func (*ChartUpdateOne) SetContent ¶
func (cuo *ChartUpdateOne) SetContent(s string) *ChartUpdateOne
SetContent sets the "content" field.
func (*ChartUpdateOne) SetName ¶
func (cuo *ChartUpdateOne) SetName(s string) *ChartUpdateOne
SetName sets the "name" field.
func (*ChartUpdateOne) SetNillableChartID ¶
func (cuo *ChartUpdateOne) SetNillableChartID(u *uint32) *ChartUpdateOne
SetNillableChartID sets the "chart_id" field if the given value is not nil.
func (*ChartUpdateOne) SetNillableClientID ¶
func (cuo *ChartUpdateOne) SetNillableClientID(s *string) *ChartUpdateOne
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*ChartUpdateOne) SetNillableContent ¶
func (cuo *ChartUpdateOne) SetNillableContent(s *string) *ChartUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*ChartUpdateOne) SetNillableName ¶
func (cuo *ChartUpdateOne) SetNillableName(s *string) *ChartUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ChartUpdateOne) SetNillableResolution ¶
func (cuo *ChartUpdateOne) SetNillableResolution(s *string) *ChartUpdateOne
SetNillableResolution sets the "resolution" field if the given value is not nil.
func (*ChartUpdateOne) SetNillableSymbol ¶
func (cuo *ChartUpdateOne) SetNillableSymbol(s *string) *ChartUpdateOne
SetNillableSymbol sets the "symbol" field if the given value is not nil.
func (*ChartUpdateOne) SetNillableTemplateID ¶
func (cuo *ChartUpdateOne) SetNillableTemplateID(s *string) *ChartUpdateOne
SetNillableTemplateID sets the "template_id" field if the given value is not nil.
func (*ChartUpdateOne) SetNillableType ¶
func (cuo *ChartUpdateOne) SetNillableType(s *string) *ChartUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*ChartUpdateOne) SetNillableUserID ¶
func (cuo *ChartUpdateOne) SetNillableUserID(s *string) *ChartUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*ChartUpdateOne) SetResolution ¶
func (cuo *ChartUpdateOne) SetResolution(s string) *ChartUpdateOne
SetResolution sets the "resolution" field.
func (*ChartUpdateOne) SetSymbol ¶
func (cuo *ChartUpdateOne) SetSymbol(s string) *ChartUpdateOne
SetSymbol sets the "symbol" field.
func (*ChartUpdateOne) SetTemplateID ¶
func (cuo *ChartUpdateOne) SetTemplateID(s string) *ChartUpdateOne
SetTemplateID sets the "template_id" field.
func (*ChartUpdateOne) SetType ¶
func (cuo *ChartUpdateOne) SetType(s string) *ChartUpdateOne
SetType sets the "type" field.
func (*ChartUpdateOne) SetUpdatedAt ¶
func (cuo *ChartUpdateOne) SetUpdatedAt(t time.Time) *ChartUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ChartUpdateOne) SetUserID ¶
func (cuo *ChartUpdateOne) SetUserID(s string) *ChartUpdateOne
SetUserID sets the "user_id" field.
func (*ChartUpdateOne) Where ¶
func (cuo *ChartUpdateOne) Where(ps ...predicate.Chart) *ChartUpdateOne
Where appends a list predicates to the ChartUpdate builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Chart is the client for interacting with the Chart builders. Chart *ChartClient // Profile is the client for interacting with the Profile builders. Profile *ProfileClient // 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(). Chart. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type 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 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 Profile ¶
type Profile struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // UserID holds the value of the "user_id" field. UserID string `json:"user_id,omitempty"` // FullName holds the value of the "full_name" field. FullName string `json:"full_name,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // EmailConfirmedAt holds the value of the "email_confirmed_at" field. EmailConfirmedAt time.Time `json:"email_confirmed_at,omitempty"` // Phone holds the value of the "phone" field. Phone string `json:"phone,omitempty"` // PhoneConfirmedAt holds the value of the "phone_confirmed_at" field. PhoneConfirmedAt time.Time `json:"phone_confirmed_at,omitempty"` // Language holds the value of the "language" field. Language string `json:"language,omitempty"` // IsSSOUser holds the value of the "is_sso_user" field. IsSSOUser bool `json:"is_sso_user,omitempty"` // contains filtered or unexported fields }
Profile is the model entity for the Profile schema.
func (*Profile) Unwrap ¶
Unwrap unwraps the Profile 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 (*Profile) Update ¶
func (pr *Profile) Update() *ProfileUpdateOne
Update returns a builder for updating this Profile. Note that you need to call Profile.Unwrap() before calling this method if this Profile was returned from a transaction, and the transaction was committed or rolled back.
type ProfileClient ¶
type ProfileClient struct {
// contains filtered or unexported fields
}
ProfileClient is a client for the Profile schema.
func NewProfileClient ¶
func NewProfileClient(c config) *ProfileClient
NewProfileClient returns a client for the Profile from the given config.
func (*ProfileClient) Create ¶
func (c *ProfileClient) Create() *ProfileCreate
Create returns a builder for creating a Profile entity.
func (*ProfileClient) CreateBulk ¶
func (c *ProfileClient) CreateBulk(builders ...*ProfileCreate) *ProfileCreateBulk
CreateBulk returns a builder for creating a bulk of Profile entities.
func (*ProfileClient) Delete ¶
func (c *ProfileClient) Delete() *ProfileDelete
Delete returns a delete builder for Profile.
func (*ProfileClient) DeleteOne ¶
func (c *ProfileClient) DeleteOne(pr *Profile) *ProfileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProfileClient) DeleteOneID ¶
func (c *ProfileClient) DeleteOneID(id uuid.UUID) *ProfileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProfileClient) Hooks ¶
func (c *ProfileClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProfileClient) Intercept ¶
func (c *ProfileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `profile.Intercept(f(g(h())))`.
func (*ProfileClient) Interceptors ¶
func (c *ProfileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProfileClient) MapCreateBulk ¶
func (c *ProfileClient) MapCreateBulk(slice any, setFunc func(*ProfileCreate, int)) *ProfileCreateBulk
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 (*ProfileClient) Query ¶
func (c *ProfileClient) Query() *ProfileQuery
Query returns a query builder for Profile.
func (*ProfileClient) Update ¶
func (c *ProfileClient) Update() *ProfileUpdate
Update returns an update builder for Profile.
func (*ProfileClient) UpdateOne ¶
func (c *ProfileClient) UpdateOne(pr *Profile) *ProfileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProfileClient) UpdateOneID ¶
func (c *ProfileClient) UpdateOneID(id uuid.UUID) *ProfileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProfileClient) Use ¶
func (c *ProfileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `profile.Hooks(f(g(h())))`.
type ProfileCreate ¶
type ProfileCreate struct {
// contains filtered or unexported fields
}
ProfileCreate is the builder for creating a Profile entity.
func (*ProfileCreate) Exec ¶
func (pc *ProfileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProfileCreate) ExecX ¶
func (pc *ProfileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProfileCreate) Mutation ¶
func (pc *ProfileCreate) Mutation() *ProfileMutation
Mutation returns the ProfileMutation object of the builder.
func (*ProfileCreate) Save ¶
func (pc *ProfileCreate) Save(ctx context.Context) (*Profile, error)
Save creates the Profile in the database.
func (*ProfileCreate) SaveX ¶
func (pc *ProfileCreate) SaveX(ctx context.Context) *Profile
SaveX calls Save and panics if Save returns an error.
func (*ProfileCreate) SetCreatedAt ¶
func (pc *ProfileCreate) SetCreatedAt(t time.Time) *ProfileCreate
SetCreatedAt sets the "created_at" field.
func (*ProfileCreate) SetEmail ¶
func (pc *ProfileCreate) SetEmail(s string) *ProfileCreate
SetEmail sets the "email" field.
func (*ProfileCreate) SetEmailConfirmedAt ¶
func (pc *ProfileCreate) SetEmailConfirmedAt(t time.Time) *ProfileCreate
SetEmailConfirmedAt sets the "email_confirmed_at" field.
func (*ProfileCreate) SetFullName ¶
func (pc *ProfileCreate) SetFullName(s string) *ProfileCreate
SetFullName sets the "full_name" field.
func (*ProfileCreate) SetID ¶
func (pc *ProfileCreate) SetID(u uuid.UUID) *ProfileCreate
SetID sets the "id" field.
func (*ProfileCreate) SetIsSSOUser ¶
func (pc *ProfileCreate) SetIsSSOUser(b bool) *ProfileCreate
SetIsSSOUser sets the "is_sso_user" field.
func (*ProfileCreate) SetLanguage ¶
func (pc *ProfileCreate) SetLanguage(s string) *ProfileCreate
SetLanguage sets the "language" field.
func (*ProfileCreate) SetNillableCreatedAt ¶
func (pc *ProfileCreate) SetNillableCreatedAt(t *time.Time) *ProfileCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProfileCreate) SetNillableFullName ¶
func (pc *ProfileCreate) SetNillableFullName(s *string) *ProfileCreate
SetNillableFullName sets the "full_name" field if the given value is not nil.
func (*ProfileCreate) SetNillableID ¶
func (pc *ProfileCreate) SetNillableID(u *uuid.UUID) *ProfileCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ProfileCreate) SetNillableIsSSOUser ¶
func (pc *ProfileCreate) SetNillableIsSSOUser(b *bool) *ProfileCreate
SetNillableIsSSOUser sets the "is_sso_user" field if the given value is not nil.
func (*ProfileCreate) SetNillableLanguage ¶
func (pc *ProfileCreate) SetNillableLanguage(s *string) *ProfileCreate
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*ProfileCreate) SetNillableUpdatedAt ¶
func (pc *ProfileCreate) SetNillableUpdatedAt(t *time.Time) *ProfileCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ProfileCreate) SetPhone ¶
func (pc *ProfileCreate) SetPhone(s string) *ProfileCreate
SetPhone sets the "phone" field.
func (*ProfileCreate) SetPhoneConfirmedAt ¶
func (pc *ProfileCreate) SetPhoneConfirmedAt(t time.Time) *ProfileCreate
SetPhoneConfirmedAt sets the "phone_confirmed_at" field.
func (*ProfileCreate) SetUpdatedAt ¶
func (pc *ProfileCreate) SetUpdatedAt(t time.Time) *ProfileCreate
SetUpdatedAt sets the "updated_at" field.
func (*ProfileCreate) SetUserID ¶
func (pc *ProfileCreate) SetUserID(s string) *ProfileCreate
SetUserID sets the "user_id" field.
type ProfileCreateBulk ¶
type ProfileCreateBulk struct {
// contains filtered or unexported fields
}
ProfileCreateBulk is the builder for creating many Profile entities in bulk.
func (*ProfileCreateBulk) Exec ¶
func (pcb *ProfileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProfileCreateBulk) ExecX ¶
func (pcb *ProfileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ProfileDelete ¶
type ProfileDelete struct {
// contains filtered or unexported fields
}
ProfileDelete is the builder for deleting a Profile entity.
func (*ProfileDelete) Exec ¶
func (pd *ProfileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProfileDelete) ExecX ¶
func (pd *ProfileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProfileDelete) Where ¶
func (pd *ProfileDelete) Where(ps ...predicate.Profile) *ProfileDelete
Where appends a list predicates to the ProfileDelete builder.
type ProfileDeleteOne ¶
type ProfileDeleteOne struct {
// contains filtered or unexported fields
}
ProfileDeleteOne is the builder for deleting a single Profile entity.
func (*ProfileDeleteOne) Exec ¶
func (pdo *ProfileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProfileDeleteOne) ExecX ¶
func (pdo *ProfileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProfileDeleteOne) Where ¶
func (pdo *ProfileDeleteOne) Where(ps ...predicate.Profile) *ProfileDeleteOne
Where appends a list predicates to the ProfileDelete builder.
type ProfileGroupBy ¶
type ProfileGroupBy struct {
// contains filtered or unexported fields
}
ProfileGroupBy is the group-by builder for Profile entities.
func (*ProfileGroupBy) Aggregate ¶
func (pgb *ProfileGroupBy) Aggregate(fns ...AggregateFunc) *ProfileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProfileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProfileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProfileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProfileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProfileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProfileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProfileGroupBy) Scan ¶
func (pgb *ProfileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProfileGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProfileMutation ¶
type ProfileMutation struct {
// contains filtered or unexported fields
}
ProfileMutation represents an operation that mutates the Profile nodes in the graph.
func (*ProfileMutation) AddField ¶
func (m *ProfileMutation) 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 (*ProfileMutation) AddedEdges ¶
func (m *ProfileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProfileMutation) AddedField ¶
func (m *ProfileMutation) 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 (*ProfileMutation) AddedFields ¶
func (m *ProfileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProfileMutation) AddedIDs ¶
func (m *ProfileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProfileMutation) ClearEdge ¶
func (m *ProfileMutation) 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 (*ProfileMutation) ClearField ¶
func (m *ProfileMutation) 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 (*ProfileMutation) ClearedEdges ¶
func (m *ProfileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProfileMutation) ClearedFields ¶
func (m *ProfileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProfileMutation) Client ¶
func (m ProfileMutation) 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 (*ProfileMutation) CreatedAt ¶
func (m *ProfileMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProfileMutation) EdgeCleared ¶
func (m *ProfileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProfileMutation) Email ¶
func (m *ProfileMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*ProfileMutation) EmailConfirmedAt ¶
func (m *ProfileMutation) EmailConfirmedAt() (r time.Time, exists bool)
EmailConfirmedAt returns the value of the "email_confirmed_at" field in the mutation.
func (*ProfileMutation) Field ¶
func (m *ProfileMutation) 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 (*ProfileMutation) FieldCleared ¶
func (m *ProfileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProfileMutation) Fields ¶
func (m *ProfileMutation) 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 (*ProfileMutation) FullName ¶
func (m *ProfileMutation) FullName() (r string, exists bool)
FullName returns the value of the "full_name" field in the mutation.
func (*ProfileMutation) ID ¶
func (m *ProfileMutation) 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 (*ProfileMutation) 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 (*ProfileMutation) IsSSOUser ¶
func (m *ProfileMutation) IsSSOUser() (r bool, exists bool)
IsSSOUser returns the value of the "is_sso_user" field in the mutation.
func (*ProfileMutation) Language ¶
func (m *ProfileMutation) Language() (r string, exists bool)
Language returns the value of the "language" field in the mutation.
func (*ProfileMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Profile entity. If the Profile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProfileMutation) OldEmail ¶
func (m *ProfileMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Profile entity. If the Profile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProfileMutation) OldEmailConfirmedAt ¶
OldEmailConfirmedAt returns the old "email_confirmed_at" field's value of the Profile entity. If the Profile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProfileMutation) 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 (*ProfileMutation) OldFullName ¶
func (m *ProfileMutation) OldFullName(ctx context.Context) (v string, err error)
OldFullName returns the old "full_name" field's value of the Profile entity. If the Profile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProfileMutation) OldIsSSOUser ¶
func (m *ProfileMutation) OldIsSSOUser(ctx context.Context) (v bool, err error)
OldIsSSOUser returns the old "is_sso_user" field's value of the Profile entity. If the Profile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProfileMutation) OldLanguage ¶
func (m *ProfileMutation) OldLanguage(ctx context.Context) (v string, err error)
OldLanguage returns the old "language" field's value of the Profile entity. If the Profile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProfileMutation) OldPhone ¶
func (m *ProfileMutation) OldPhone(ctx context.Context) (v string, err error)
OldPhone returns the old "phone" field's value of the Profile entity. If the Profile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProfileMutation) OldPhoneConfirmedAt ¶
OldPhoneConfirmedAt returns the old "phone_confirmed_at" field's value of the Profile entity. If the Profile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProfileMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Profile entity. If the Profile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProfileMutation) OldUserID ¶
func (m *ProfileMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the Profile entity. If the Profile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProfileMutation) Phone ¶
func (m *ProfileMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*ProfileMutation) PhoneConfirmedAt ¶
func (m *ProfileMutation) PhoneConfirmedAt() (r time.Time, exists bool)
PhoneConfirmedAt returns the value of the "phone_confirmed_at" field in the mutation.
func (*ProfileMutation) RemovedEdges ¶
func (m *ProfileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProfileMutation) RemovedIDs ¶
func (m *ProfileMutation) 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 (*ProfileMutation) ResetCreatedAt ¶
func (m *ProfileMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProfileMutation) ResetEdge ¶
func (m *ProfileMutation) 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 (*ProfileMutation) ResetEmail ¶
func (m *ProfileMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*ProfileMutation) ResetEmailConfirmedAt ¶
func (m *ProfileMutation) ResetEmailConfirmedAt()
ResetEmailConfirmedAt resets all changes to the "email_confirmed_at" field.
func (*ProfileMutation) ResetField ¶
func (m *ProfileMutation) 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 (*ProfileMutation) ResetFullName ¶
func (m *ProfileMutation) ResetFullName()
ResetFullName resets all changes to the "full_name" field.
func (*ProfileMutation) ResetIsSSOUser ¶
func (m *ProfileMutation) ResetIsSSOUser()
ResetIsSSOUser resets all changes to the "is_sso_user" field.
func (*ProfileMutation) ResetLanguage ¶
func (m *ProfileMutation) ResetLanguage()
ResetLanguage resets all changes to the "language" field.
func (*ProfileMutation) ResetPhone ¶
func (m *ProfileMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*ProfileMutation) ResetPhoneConfirmedAt ¶
func (m *ProfileMutation) ResetPhoneConfirmedAt()
ResetPhoneConfirmedAt resets all changes to the "phone_confirmed_at" field.
func (*ProfileMutation) ResetUpdatedAt ¶
func (m *ProfileMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProfileMutation) ResetUserID ¶
func (m *ProfileMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*ProfileMutation) SetCreatedAt ¶
func (m *ProfileMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProfileMutation) SetEmail ¶
func (m *ProfileMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*ProfileMutation) SetEmailConfirmedAt ¶
func (m *ProfileMutation) SetEmailConfirmedAt(t time.Time)
SetEmailConfirmedAt sets the "email_confirmed_at" field.
func (*ProfileMutation) SetField ¶
func (m *ProfileMutation) 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 (*ProfileMutation) SetFullName ¶
func (m *ProfileMutation) SetFullName(s string)
SetFullName sets the "full_name" field.
func (*ProfileMutation) SetID ¶
func (m *ProfileMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Profile entities.
func (*ProfileMutation) SetIsSSOUser ¶
func (m *ProfileMutation) SetIsSSOUser(b bool)
SetIsSSOUser sets the "is_sso_user" field.
func (*ProfileMutation) SetLanguage ¶
func (m *ProfileMutation) SetLanguage(s string)
SetLanguage sets the "language" field.
func (*ProfileMutation) SetOp ¶
func (m *ProfileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProfileMutation) SetPhone ¶
func (m *ProfileMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*ProfileMutation) SetPhoneConfirmedAt ¶
func (m *ProfileMutation) SetPhoneConfirmedAt(t time.Time)
SetPhoneConfirmedAt sets the "phone_confirmed_at" field.
func (*ProfileMutation) SetUpdatedAt ¶
func (m *ProfileMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ProfileMutation) SetUserID ¶
func (m *ProfileMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (ProfileMutation) Tx ¶
func (m ProfileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProfileMutation) Type ¶
func (m *ProfileMutation) Type() string
Type returns the node type of this mutation (Profile).
func (*ProfileMutation) UpdatedAt ¶
func (m *ProfileMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ProfileMutation) UserID ¶
func (m *ProfileMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*ProfileMutation) Where ¶
func (m *ProfileMutation) Where(ps ...predicate.Profile)
Where appends a list predicates to the ProfileMutation builder.
func (*ProfileMutation) WhereP ¶
func (m *ProfileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProfileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProfileQuery ¶
type ProfileQuery struct {
// contains filtered or unexported fields
}
ProfileQuery is the builder for querying Profile entities.
func (*ProfileQuery) Aggregate ¶
func (pq *ProfileQuery) Aggregate(fns ...AggregateFunc) *ProfileSelect
Aggregate returns a ProfileSelect configured with the given aggregations.
func (*ProfileQuery) All ¶
func (pq *ProfileQuery) All(ctx context.Context) ([]*Profile, error)
All executes the query and returns a list of Profiles.
func (*ProfileQuery) AllX ¶
func (pq *ProfileQuery) AllX(ctx context.Context) []*Profile
AllX is like All, but panics if an error occurs.
func (*ProfileQuery) Clone ¶
func (pq *ProfileQuery) Clone() *ProfileQuery
Clone returns a duplicate of the ProfileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProfileQuery) Count ¶
func (pq *ProfileQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProfileQuery) CountX ¶
func (pq *ProfileQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProfileQuery) Exist ¶
func (pq *ProfileQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProfileQuery) ExistX ¶
func (pq *ProfileQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProfileQuery) First ¶
func (pq *ProfileQuery) First(ctx context.Context) (*Profile, error)
First returns the first Profile entity from the query. Returns a *NotFoundError when no Profile was found.
func (*ProfileQuery) FirstID ¶
FirstID returns the first Profile ID from the query. Returns a *NotFoundError when no Profile ID was found.
func (*ProfileQuery) FirstIDX ¶
func (pq *ProfileQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProfileQuery) FirstX ¶
func (pq *ProfileQuery) FirstX(ctx context.Context) *Profile
FirstX is like First, but panics if an error occurs.
func (*ProfileQuery) GroupBy ¶
func (pq *ProfileQuery) GroupBy(field string, fields ...string) *ProfileGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Profile.Query(). GroupBy(profile.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProfileQuery) IDsX ¶
func (pq *ProfileQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ProfileQuery) Limit ¶
func (pq *ProfileQuery) Limit(limit int) *ProfileQuery
Limit the number of records to be returned by this query.
func (*ProfileQuery) Offset ¶
func (pq *ProfileQuery) Offset(offset int) *ProfileQuery
Offset to start from.
func (*ProfileQuery) Only ¶
func (pq *ProfileQuery) Only(ctx context.Context) (*Profile, error)
Only returns a single Profile entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Profile entity is found. Returns a *NotFoundError when no Profile entities are found.
func (*ProfileQuery) OnlyID ¶
OnlyID is like Only, but returns the only Profile ID in the query. Returns a *NotSingularError when more than one Profile ID is found. Returns a *NotFoundError when no entities are found.
func (*ProfileQuery) OnlyIDX ¶
func (pq *ProfileQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProfileQuery) OnlyX ¶
func (pq *ProfileQuery) OnlyX(ctx context.Context) *Profile
OnlyX is like Only, but panics if an error occurs.
func (*ProfileQuery) Order ¶
func (pq *ProfileQuery) Order(o ...profile.OrderOption) *ProfileQuery
Order specifies how the records should be ordered.
func (*ProfileQuery) Select ¶
func (pq *ProfileQuery) Select(fields ...string) *ProfileSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Profile.Query(). Select(profile.FieldCreatedAt). Scan(ctx, &v)
func (*ProfileQuery) Unique ¶
func (pq *ProfileQuery) Unique(unique bool) *ProfileQuery
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 (*ProfileQuery) Where ¶
func (pq *ProfileQuery) Where(ps ...predicate.Profile) *ProfileQuery
Where adds a new predicate for the ProfileQuery builder.
type ProfileSelect ¶
type ProfileSelect struct { *ProfileQuery // contains filtered or unexported fields }
ProfileSelect is the builder for selecting fields of Profile entities.
func (*ProfileSelect) Aggregate ¶
func (ps *ProfileSelect) Aggregate(fns ...AggregateFunc) *ProfileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProfileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProfileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProfileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProfileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProfileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProfileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProfileSelect) Scan ¶
func (ps *ProfileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProfileSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProfileUpdate ¶
type ProfileUpdate struct {
// contains filtered or unexported fields
}
ProfileUpdate is the builder for updating Profile entities.
func (*ProfileUpdate) Exec ¶
func (pu *ProfileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProfileUpdate) ExecX ¶
func (pu *ProfileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProfileUpdate) Mutation ¶
func (pu *ProfileUpdate) Mutation() *ProfileMutation
Mutation returns the ProfileMutation object of the builder.
func (*ProfileUpdate) Save ¶
func (pu *ProfileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProfileUpdate) SaveX ¶
func (pu *ProfileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProfileUpdate) SetEmail ¶
func (pu *ProfileUpdate) SetEmail(s string) *ProfileUpdate
SetEmail sets the "email" field.
func (*ProfileUpdate) SetEmailConfirmedAt ¶
func (pu *ProfileUpdate) SetEmailConfirmedAt(t time.Time) *ProfileUpdate
SetEmailConfirmedAt sets the "email_confirmed_at" field.
func (*ProfileUpdate) SetFullName ¶
func (pu *ProfileUpdate) SetFullName(s string) *ProfileUpdate
SetFullName sets the "full_name" field.
func (*ProfileUpdate) SetIsSSOUser ¶
func (pu *ProfileUpdate) SetIsSSOUser(b bool) *ProfileUpdate
SetIsSSOUser sets the "is_sso_user" field.
func (*ProfileUpdate) SetLanguage ¶
func (pu *ProfileUpdate) SetLanguage(s string) *ProfileUpdate
SetLanguage sets the "language" field.
func (*ProfileUpdate) SetNillableEmail ¶
func (pu *ProfileUpdate) SetNillableEmail(s *string) *ProfileUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*ProfileUpdate) SetNillableEmailConfirmedAt ¶
func (pu *ProfileUpdate) SetNillableEmailConfirmedAt(t *time.Time) *ProfileUpdate
SetNillableEmailConfirmedAt sets the "email_confirmed_at" field if the given value is not nil.
func (*ProfileUpdate) SetNillableFullName ¶
func (pu *ProfileUpdate) SetNillableFullName(s *string) *ProfileUpdate
SetNillableFullName sets the "full_name" field if the given value is not nil.
func (*ProfileUpdate) SetNillableIsSSOUser ¶
func (pu *ProfileUpdate) SetNillableIsSSOUser(b *bool) *ProfileUpdate
SetNillableIsSSOUser sets the "is_sso_user" field if the given value is not nil.
func (*ProfileUpdate) SetNillableLanguage ¶
func (pu *ProfileUpdate) SetNillableLanguage(s *string) *ProfileUpdate
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*ProfileUpdate) SetNillablePhone ¶
func (pu *ProfileUpdate) SetNillablePhone(s *string) *ProfileUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*ProfileUpdate) SetNillablePhoneConfirmedAt ¶
func (pu *ProfileUpdate) SetNillablePhoneConfirmedAt(t *time.Time) *ProfileUpdate
SetNillablePhoneConfirmedAt sets the "phone_confirmed_at" field if the given value is not nil.
func (*ProfileUpdate) SetNillableUserID ¶
func (pu *ProfileUpdate) SetNillableUserID(s *string) *ProfileUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*ProfileUpdate) SetPhone ¶
func (pu *ProfileUpdate) SetPhone(s string) *ProfileUpdate
SetPhone sets the "phone" field.
func (*ProfileUpdate) SetPhoneConfirmedAt ¶
func (pu *ProfileUpdate) SetPhoneConfirmedAt(t time.Time) *ProfileUpdate
SetPhoneConfirmedAt sets the "phone_confirmed_at" field.
func (*ProfileUpdate) SetUpdatedAt ¶
func (pu *ProfileUpdate) SetUpdatedAt(t time.Time) *ProfileUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ProfileUpdate) SetUserID ¶
func (pu *ProfileUpdate) SetUserID(s string) *ProfileUpdate
SetUserID sets the "user_id" field.
func (*ProfileUpdate) Where ¶
func (pu *ProfileUpdate) Where(ps ...predicate.Profile) *ProfileUpdate
Where appends a list predicates to the ProfileUpdate builder.
type ProfileUpdateOne ¶
type ProfileUpdateOne struct {
// contains filtered or unexported fields
}
ProfileUpdateOne is the builder for updating a single Profile entity.
func (*ProfileUpdateOne) Exec ¶
func (puo *ProfileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProfileUpdateOne) ExecX ¶
func (puo *ProfileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProfileUpdateOne) Mutation ¶
func (puo *ProfileUpdateOne) Mutation() *ProfileMutation
Mutation returns the ProfileMutation object of the builder.
func (*ProfileUpdateOne) Save ¶
func (puo *ProfileUpdateOne) Save(ctx context.Context) (*Profile, error)
Save executes the query and returns the updated Profile entity.
func (*ProfileUpdateOne) SaveX ¶
func (puo *ProfileUpdateOne) SaveX(ctx context.Context) *Profile
SaveX is like Save, but panics if an error occurs.
func (*ProfileUpdateOne) Select ¶
func (puo *ProfileUpdateOne) Select(field string, fields ...string) *ProfileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProfileUpdateOne) SetEmail ¶
func (puo *ProfileUpdateOne) SetEmail(s string) *ProfileUpdateOne
SetEmail sets the "email" field.
func (*ProfileUpdateOne) SetEmailConfirmedAt ¶
func (puo *ProfileUpdateOne) SetEmailConfirmedAt(t time.Time) *ProfileUpdateOne
SetEmailConfirmedAt sets the "email_confirmed_at" field.
func (*ProfileUpdateOne) SetFullName ¶
func (puo *ProfileUpdateOne) SetFullName(s string) *ProfileUpdateOne
SetFullName sets the "full_name" field.
func (*ProfileUpdateOne) SetIsSSOUser ¶
func (puo *ProfileUpdateOne) SetIsSSOUser(b bool) *ProfileUpdateOne
SetIsSSOUser sets the "is_sso_user" field.
func (*ProfileUpdateOne) SetLanguage ¶
func (puo *ProfileUpdateOne) SetLanguage(s string) *ProfileUpdateOne
SetLanguage sets the "language" field.
func (*ProfileUpdateOne) SetNillableEmail ¶
func (puo *ProfileUpdateOne) SetNillableEmail(s *string) *ProfileUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*ProfileUpdateOne) SetNillableEmailConfirmedAt ¶
func (puo *ProfileUpdateOne) SetNillableEmailConfirmedAt(t *time.Time) *ProfileUpdateOne
SetNillableEmailConfirmedAt sets the "email_confirmed_at" field if the given value is not nil.
func (*ProfileUpdateOne) SetNillableFullName ¶
func (puo *ProfileUpdateOne) SetNillableFullName(s *string) *ProfileUpdateOne
SetNillableFullName sets the "full_name" field if the given value is not nil.
func (*ProfileUpdateOne) SetNillableIsSSOUser ¶
func (puo *ProfileUpdateOne) SetNillableIsSSOUser(b *bool) *ProfileUpdateOne
SetNillableIsSSOUser sets the "is_sso_user" field if the given value is not nil.
func (*ProfileUpdateOne) SetNillableLanguage ¶
func (puo *ProfileUpdateOne) SetNillableLanguage(s *string) *ProfileUpdateOne
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*ProfileUpdateOne) SetNillablePhone ¶
func (puo *ProfileUpdateOne) SetNillablePhone(s *string) *ProfileUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*ProfileUpdateOne) SetNillablePhoneConfirmedAt ¶
func (puo *ProfileUpdateOne) SetNillablePhoneConfirmedAt(t *time.Time) *ProfileUpdateOne
SetNillablePhoneConfirmedAt sets the "phone_confirmed_at" field if the given value is not nil.
func (*ProfileUpdateOne) SetNillableUserID ¶
func (puo *ProfileUpdateOne) SetNillableUserID(s *string) *ProfileUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*ProfileUpdateOne) SetPhone ¶
func (puo *ProfileUpdateOne) SetPhone(s string) *ProfileUpdateOne
SetPhone sets the "phone" field.
func (*ProfileUpdateOne) SetPhoneConfirmedAt ¶
func (puo *ProfileUpdateOne) SetPhoneConfirmedAt(t time.Time) *ProfileUpdateOne
SetPhoneConfirmedAt sets the "phone_confirmed_at" field.
func (*ProfileUpdateOne) SetUpdatedAt ¶
func (puo *ProfileUpdateOne) SetUpdatedAt(t time.Time) *ProfileUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ProfileUpdateOne) SetUserID ¶
func (puo *ProfileUpdateOne) SetUserID(s string) *ProfileUpdateOne
SetUserID sets the "user_id" field.
func (*ProfileUpdateOne) Where ¶
func (puo *ProfileUpdateOne) Where(ps ...predicate.Profile) *ProfileUpdateOne
Where appends a list predicates to the ProfileUpdate builder.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Chart is the client for interacting with the Chart builders. Chart *ChartClient // Profile is the client for interacting with the Profile builders. Profile *ProfileClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.