Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Account
- type AccountClient
- func (c *AccountClient) Create() *AccountCreate
- func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk
- func (c *AccountClient) Delete() *AccountDelete
- func (c *AccountClient) DeleteOne(a *Account) *AccountDeleteOne
- func (c *AccountClient) DeleteOneID(id int) *AccountDeleteOne
- func (c *AccountClient) Get(ctx context.Context, id int) (*Account, error)
- func (c *AccountClient) GetX(ctx context.Context, id int) *Account
- func (c *AccountClient) Hooks() []Hook
- func (c *AccountClient) Intercept(interceptors ...Interceptor)
- func (c *AccountClient) Interceptors() []Interceptor
- func (c *AccountClient) Query() *AccountQuery
- func (c *AccountClient) Update() *AccountUpdate
- func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne
- func (c *AccountClient) UpdateOneID(id int) *AccountUpdateOne
- func (c *AccountClient) Use(hooks ...Hook)
- type AccountCreate
- func (ac *AccountCreate) Exec(ctx context.Context) error
- func (ac *AccountCreate) ExecX(ctx context.Context)
- func (ac *AccountCreate) Mutation() *AccountMutation
- func (ac *AccountCreate) OnConflict(opts ...sql.ConflictOption) *AccountUpsertOne
- func (ac *AccountCreate) OnConflictColumns(columns ...string) *AccountUpsertOne
- func (ac *AccountCreate) Save(ctx context.Context) (*Account, error)
- func (ac *AccountCreate) SaveX(ctx context.Context) *Account
- func (ac *AccountCreate) SetAvatarURL(s string) *AccountCreate
- func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate
- func (ac *AccountCreate) SetInternalID(i int64) *AccountCreate
- func (ac *AccountCreate) SetName(s string) *AccountCreate
- func (ac *AccountCreate) SetNillableCreatedAt(t *time.Time) *AccountCreate
- func (ac *AccountCreate) SetPlatform(a account.Platform) *AccountCreate
- func (ac *AccountCreate) SetPlatformAccountID(s string) *AccountCreate
- func (ac *AccountCreate) SetProfileURL(s string) *AccountCreate
- type AccountCreateBulk
- func (acb *AccountCreateBulk) Exec(ctx context.Context) error
- func (acb *AccountCreateBulk) ExecX(ctx context.Context)
- func (acb *AccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *AccountUpsertBulk
- func (acb *AccountCreateBulk) OnConflictColumns(columns ...string) *AccountUpsertBulk
- func (acb *AccountCreateBulk) Save(ctx context.Context) ([]*Account, error)
- func (acb *AccountCreateBulk) SaveX(ctx context.Context) []*Account
- type AccountDelete
- type AccountDeleteOne
- type AccountGroupBy
- func (agb *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy
- func (s *AccountGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountGroupBy) BoolX(ctx context.Context) bool
- func (s *AccountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AccountGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountGroupBy) Float64X(ctx context.Context) float64
- func (s *AccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AccountGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AccountGroupBy) IntX(ctx context.Context) int
- func (s *AccountGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AccountGroupBy) IntsX(ctx context.Context) []int
- func (agb *AccountGroupBy) Scan(ctx context.Context, v any) error
- func (s *AccountGroupBy) ScanX(ctx context.Context, v any)
- func (s *AccountGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AccountGroupBy) StringX(ctx context.Context) string
- func (s *AccountGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AccountGroupBy) StringsX(ctx context.Context) []string
- type AccountMutation
- func (m *AccountMutation) AddField(name string, value ent.Value) error
- func (m *AccountMutation) AddInternalID(i int64)
- func (m *AccountMutation) AddedEdges() []string
- func (m *AccountMutation) AddedField(name string) (ent.Value, bool)
- func (m *AccountMutation) AddedFields() []string
- func (m *AccountMutation) AddedIDs(name string) []ent.Value
- func (m *AccountMutation) AddedInternalID() (r int64, exists bool)
- func (m *AccountMutation) AvatarURL() (r string, exists bool)
- func (m *AccountMutation) ClearEdge(name string) error
- func (m *AccountMutation) ClearField(name string) error
- func (m *AccountMutation) ClearedEdges() []string
- func (m *AccountMutation) ClearedFields() []string
- func (m AccountMutation) Client() *Client
- func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AccountMutation) EdgeCleared(name string) bool
- func (m *AccountMutation) Field(name string) (ent.Value, bool)
- func (m *AccountMutation) FieldCleared(name string) bool
- func (m *AccountMutation) Fields() []string
- func (m *AccountMutation) ID() (id int, exists bool)
- func (m *AccountMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AccountMutation) InternalID() (r int64, exists bool)
- func (m *AccountMutation) Name() (r string, exists bool)
- func (m *AccountMutation) OldAvatarURL(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AccountMutation) OldInternalID(ctx context.Context) (v int64, err error)
- func (m *AccountMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldPlatform(ctx context.Context) (v account.Platform, err error)
- func (m *AccountMutation) OldPlatformAccountID(ctx context.Context) (v string, err error)
- func (m *AccountMutation) OldProfileURL(ctx context.Context) (v string, err error)
- func (m *AccountMutation) Op() Op
- func (m *AccountMutation) Platform() (r account.Platform, exists bool)
- func (m *AccountMutation) PlatformAccountID() (r string, exists bool)
- func (m *AccountMutation) ProfileURL() (r string, exists bool)
- func (m *AccountMutation) RemovedEdges() []string
- func (m *AccountMutation) RemovedIDs(name string) []ent.Value
- func (m *AccountMutation) ResetAvatarURL()
- func (m *AccountMutation) ResetCreatedAt()
- func (m *AccountMutation) ResetEdge(name string) error
- func (m *AccountMutation) ResetField(name string) error
- func (m *AccountMutation) ResetInternalID()
- func (m *AccountMutation) ResetName()
- func (m *AccountMutation) ResetPlatform()
- func (m *AccountMutation) ResetPlatformAccountID()
- func (m *AccountMutation) ResetProfileURL()
- func (m *AccountMutation) SetAvatarURL(s string)
- func (m *AccountMutation) SetCreatedAt(t time.Time)
- func (m *AccountMutation) SetField(name string, value ent.Value) error
- func (m *AccountMutation) SetInternalID(i int64)
- func (m *AccountMutation) SetName(s string)
- func (m *AccountMutation) SetOp(op Op)
- func (m *AccountMutation) SetPlatform(a account.Platform)
- func (m *AccountMutation) SetPlatformAccountID(s string)
- func (m *AccountMutation) SetProfileURL(s string)
- func (m AccountMutation) Tx() (*Tx, error)
- func (m *AccountMutation) Type() string
- func (m *AccountMutation) Where(ps ...predicate.Account)
- func (m *AccountMutation) WhereP(ps ...func(*sql.Selector))
- type AccountQuery
- func (aq *AccountQuery) Aggregate(fns ...AggregateFunc) *AccountSelect
- func (aq *AccountQuery) All(ctx context.Context) ([]*Account, error)
- func (aq *AccountQuery) AllX(ctx context.Context) []*Account
- func (aq *AccountQuery) Clone() *AccountQuery
- func (aq *AccountQuery) Count(ctx context.Context) (int, error)
- func (aq *AccountQuery) CountX(ctx context.Context) int
- func (aq *AccountQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AccountQuery) ExistX(ctx context.Context) bool
- func (aq *AccountQuery) First(ctx context.Context) (*Account, error)
- func (aq *AccountQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *AccountQuery) FirstIDX(ctx context.Context) int
- func (aq *AccountQuery) FirstX(ctx context.Context) *Account
- func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy
- func (aq *AccountQuery) IDs(ctx context.Context) ([]int, error)
- func (aq *AccountQuery) IDsX(ctx context.Context) []int
- func (aq *AccountQuery) Limit(limit int) *AccountQuery
- func (aq *AccountQuery) Offset(offset int) *AccountQuery
- func (aq *AccountQuery) Only(ctx context.Context) (*Account, error)
- func (aq *AccountQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *AccountQuery) OnlyIDX(ctx context.Context) int
- func (aq *AccountQuery) OnlyX(ctx context.Context) *Account
- func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery
- func (aq *AccountQuery) Select(fields ...string) *AccountSelect
- func (aq *AccountQuery) Unique(unique bool) *AccountQuery
- func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
- type AccountSelect
- func (as *AccountSelect) Aggregate(fns ...AggregateFunc) *AccountSelect
- func (s *AccountSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountSelect) BoolX(ctx context.Context) bool
- func (s *AccountSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountSelect) BoolsX(ctx context.Context) []bool
- func (s *AccountSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountSelect) Float64X(ctx context.Context) float64
- func (s *AccountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountSelect) Float64sX(ctx context.Context) []float64
- func (s *AccountSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AccountSelect) IntX(ctx context.Context) int
- func (s *AccountSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AccountSelect) IntsX(ctx context.Context) []int
- func (as *AccountSelect) Scan(ctx context.Context, v any) error
- func (s *AccountSelect) ScanX(ctx context.Context, v any)
- func (s *AccountSelect) String(ctx context.Context) (_ string, err error)
- func (s *AccountSelect) StringX(ctx context.Context) string
- func (s *AccountSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AccountSelect) StringsX(ctx context.Context) []string
- type AccountUpdate
- func (au *AccountUpdate) AddInternalID(i int64) *AccountUpdate
- func (au *AccountUpdate) Exec(ctx context.Context) error
- func (au *AccountUpdate) ExecX(ctx context.Context)
- func (au *AccountUpdate) Mutation() *AccountMutation
- func (au *AccountUpdate) Save(ctx context.Context) (int, error)
- func (au *AccountUpdate) SaveX(ctx context.Context) int
- func (au *AccountUpdate) SetAvatarURL(s string) *AccountUpdate
- func (au *AccountUpdate) SetCreatedAt(t time.Time) *AccountUpdate
- func (au *AccountUpdate) SetInternalID(i int64) *AccountUpdate
- func (au *AccountUpdate) SetName(s string) *AccountUpdate
- func (au *AccountUpdate) SetNillableCreatedAt(t *time.Time) *AccountUpdate
- func (au *AccountUpdate) SetPlatform(a account.Platform) *AccountUpdate
- func (au *AccountUpdate) SetPlatformAccountID(s string) *AccountUpdate
- func (au *AccountUpdate) SetProfileURL(s string) *AccountUpdate
- func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
- type AccountUpdateOne
- func (auo *AccountUpdateOne) AddInternalID(i int64) *AccountUpdateOne
- func (auo *AccountUpdateOne) Exec(ctx context.Context) error
- func (auo *AccountUpdateOne) ExecX(ctx context.Context)
- func (auo *AccountUpdateOne) Mutation() *AccountMutation
- func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)
- func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account
- func (auo *AccountUpdateOne) Select(field string, fields ...string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetAvatarURL(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetCreatedAt(t time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetInternalID(i int64) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetName(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetNillableCreatedAt(t *time.Time) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetPlatform(a account.Platform) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetPlatformAccountID(s string) *AccountUpdateOne
- func (auo *AccountUpdateOne) SetProfileURL(s string) *AccountUpdateOne
- type AccountUpsert
- func (u *AccountUpsert) AddInternalID(v int64) *AccountUpsert
- func (u *AccountUpsert) SetAvatarURL(v string) *AccountUpsert
- func (u *AccountUpsert) SetCreatedAt(v time.Time) *AccountUpsert
- func (u *AccountUpsert) SetInternalID(v int64) *AccountUpsert
- func (u *AccountUpsert) SetName(v string) *AccountUpsert
- func (u *AccountUpsert) SetPlatform(v account.Platform) *AccountUpsert
- func (u *AccountUpsert) SetPlatformAccountID(v string) *AccountUpsert
- func (u *AccountUpsert) SetProfileURL(v string) *AccountUpsert
- func (u *AccountUpsert) UpdateAvatarURL() *AccountUpsert
- func (u *AccountUpsert) UpdateCreatedAt() *AccountUpsert
- func (u *AccountUpsert) UpdateInternalID() *AccountUpsert
- func (u *AccountUpsert) UpdateName() *AccountUpsert
- func (u *AccountUpsert) UpdatePlatform() *AccountUpsert
- func (u *AccountUpsert) UpdatePlatformAccountID() *AccountUpsert
- func (u *AccountUpsert) UpdateProfileURL() *AccountUpsert
- type AccountUpsertBulk
- func (u *AccountUpsertBulk) AddInternalID(v int64) *AccountUpsertBulk
- func (u *AccountUpsertBulk) DoNothing() *AccountUpsertBulk
- func (u *AccountUpsertBulk) Exec(ctx context.Context) error
- func (u *AccountUpsertBulk) ExecX(ctx context.Context)
- func (u *AccountUpsertBulk) Ignore() *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetAvatarURL(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetCreatedAt(v time.Time) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetInternalID(v int64) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetName(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetPlatform(v account.Platform) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetPlatformAccountID(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) SetProfileURL(v string) *AccountUpsertBulk
- func (u *AccountUpsertBulk) Update(set func(*AccountUpsert)) *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateAvatarURL() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateCreatedAt() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateInternalID() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateName() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateNewValues() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdatePlatform() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdatePlatformAccountID() *AccountUpsertBulk
- func (u *AccountUpsertBulk) UpdateProfileURL() *AccountUpsertBulk
- type AccountUpsertOne
- func (u *AccountUpsertOne) AddInternalID(v int64) *AccountUpsertOne
- func (u *AccountUpsertOne) DoNothing() *AccountUpsertOne
- func (u *AccountUpsertOne) Exec(ctx context.Context) error
- func (u *AccountUpsertOne) ExecX(ctx context.Context)
- func (u *AccountUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *AccountUpsertOne) IDX(ctx context.Context) int
- func (u *AccountUpsertOne) Ignore() *AccountUpsertOne
- func (u *AccountUpsertOne) SetAvatarURL(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetCreatedAt(v time.Time) *AccountUpsertOne
- func (u *AccountUpsertOne) SetInternalID(v int64) *AccountUpsertOne
- func (u *AccountUpsertOne) SetName(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetPlatform(v account.Platform) *AccountUpsertOne
- func (u *AccountUpsertOne) SetPlatformAccountID(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) SetProfileURL(v string) *AccountUpsertOne
- func (u *AccountUpsertOne) Update(set func(*AccountUpsert)) *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateAvatarURL() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateCreatedAt() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateInternalID() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateName() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateNewValues() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdatePlatform() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdatePlatformAccountID() *AccountUpsertOne
- func (u *AccountUpsertOne) UpdateProfileURL() *AccountUpsertOne
- type Accounts
- type AggregateFunc
- type App
- type AppClient
- func (c *AppClient) Create() *AppCreate
- func (c *AppClient) CreateBulk(builders ...*AppCreate) *AppCreateBulk
- func (c *AppClient) Delete() *AppDelete
- func (c *AppClient) DeleteOne(a *App) *AppDeleteOne
- func (c *AppClient) DeleteOneID(id int) *AppDeleteOne
- func (c *AppClient) Get(ctx context.Context, id int) (*App, error)
- func (c *AppClient) GetX(ctx context.Context, id int) *App
- func (c *AppClient) Hooks() []Hook
- func (c *AppClient) Intercept(interceptors ...Interceptor)
- func (c *AppClient) Interceptors() []Interceptor
- func (c *AppClient) Query() *AppQuery
- func (c *AppClient) Update() *AppUpdate
- func (c *AppClient) UpdateOne(a *App) *AppUpdateOne
- func (c *AppClient) UpdateOneID(id int) *AppUpdateOne
- func (c *AppClient) Use(hooks ...Hook)
- type AppCreate
- func (ac *AppCreate) Exec(ctx context.Context) error
- func (ac *AppCreate) ExecX(ctx context.Context)
- func (ac *AppCreate) Mutation() *AppMutation
- func (ac *AppCreate) OnConflict(opts ...sql.ConflictOption) *AppUpsertOne
- func (ac *AppCreate) OnConflictColumns(columns ...string) *AppUpsertOne
- func (ac *AppCreate) Save(ctx context.Context) (*App, error)
- func (ac *AppCreate) SaveX(ctx context.Context) *App
- func (ac *AppCreate) SetCreatedAt(t time.Time) *AppCreate
- func (ac *AppCreate) SetDescription(s string) *AppCreate
- func (ac *AppCreate) SetDeveloper(s string) *AppCreate
- func (ac *AppCreate) SetImageURL(s string) *AppCreate
- func (ac *AppCreate) SetInternalID(i int64) *AppCreate
- func (ac *AppCreate) SetName(s string) *AppCreate
- func (ac *AppCreate) SetNillableCreatedAt(t *time.Time) *AppCreate
- func (ac *AppCreate) SetPublisher(s string) *AppCreate
- func (ac *AppCreate) SetReleaseDate(s string) *AppCreate
- func (ac *AppCreate) SetShortDescription(s string) *AppCreate
- func (ac *AppCreate) SetSource(a app.Source) *AppCreate
- func (ac *AppCreate) SetSourceAppID(s string) *AppCreate
- func (ac *AppCreate) SetSourceURL(s string) *AppCreate
- func (ac *AppCreate) SetType(a app.Type) *AppCreate
- type AppCreateBulk
- func (acb *AppCreateBulk) Exec(ctx context.Context) error
- func (acb *AppCreateBulk) ExecX(ctx context.Context)
- func (acb *AppCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppUpsertBulk
- func (acb *AppCreateBulk) OnConflictColumns(columns ...string) *AppUpsertBulk
- func (acb *AppCreateBulk) Save(ctx context.Context) ([]*App, error)
- func (acb *AppCreateBulk) SaveX(ctx context.Context) []*App
- type AppDelete
- type AppDeleteOne
- type AppGroupBy
- func (agb *AppGroupBy) Aggregate(fns ...AggregateFunc) *AppGroupBy
- func (s *AppGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AppGroupBy) BoolX(ctx context.Context) bool
- func (s *AppGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AppGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AppGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AppGroupBy) Float64X(ctx context.Context) float64
- func (s *AppGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AppGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AppGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AppGroupBy) IntX(ctx context.Context) int
- func (s *AppGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AppGroupBy) IntsX(ctx context.Context) []int
- func (agb *AppGroupBy) Scan(ctx context.Context, v any) error
- func (s *AppGroupBy) ScanX(ctx context.Context, v any)
- func (s *AppGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AppGroupBy) StringX(ctx context.Context) string
- func (s *AppGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AppGroupBy) StringsX(ctx context.Context) []string
- type AppMutation
- func (m *AppMutation) AddField(name string, value ent.Value) error
- func (m *AppMutation) AddInternalID(i int64)
- func (m *AppMutation) AddedEdges() []string
- func (m *AppMutation) AddedField(name string) (ent.Value, bool)
- func (m *AppMutation) AddedFields() []string
- func (m *AppMutation) AddedIDs(name string) []ent.Value
- func (m *AppMutation) AddedInternalID() (r int64, exists bool)
- func (m *AppMutation) ClearEdge(name string) error
- func (m *AppMutation) ClearField(name string) error
- func (m *AppMutation) ClearedEdges() []string
- func (m *AppMutation) ClearedFields() []string
- func (m AppMutation) Client() *Client
- func (m *AppMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AppMutation) Description() (r string, exists bool)
- func (m *AppMutation) Developer() (r string, exists bool)
- func (m *AppMutation) EdgeCleared(name string) bool
- func (m *AppMutation) Field(name string) (ent.Value, bool)
- func (m *AppMutation) FieldCleared(name string) bool
- func (m *AppMutation) Fields() []string
- func (m *AppMutation) GetType() (r app.Type, exists bool)
- func (m *AppMutation) ID() (id int, exists bool)
- func (m *AppMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AppMutation) ImageURL() (r string, exists bool)
- func (m *AppMutation) InternalID() (r int64, exists bool)
- func (m *AppMutation) Name() (r string, exists bool)
- func (m *AppMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AppMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *AppMutation) OldDeveloper(ctx context.Context) (v string, err error)
- func (m *AppMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AppMutation) OldImageURL(ctx context.Context) (v string, err error)
- func (m *AppMutation) OldInternalID(ctx context.Context) (v int64, err error)
- func (m *AppMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AppMutation) OldPublisher(ctx context.Context) (v string, err error)
- func (m *AppMutation) OldReleaseDate(ctx context.Context) (v string, err error)
- func (m *AppMutation) OldShortDescription(ctx context.Context) (v string, err error)
- func (m *AppMutation) OldSource(ctx context.Context) (v app.Source, err error)
- func (m *AppMutation) OldSourceAppID(ctx context.Context) (v string, err error)
- func (m *AppMutation) OldSourceURL(ctx context.Context) (v string, err error)
- func (m *AppMutation) OldType(ctx context.Context) (v app.Type, err error)
- func (m *AppMutation) Op() Op
- func (m *AppMutation) Publisher() (r string, exists bool)
- func (m *AppMutation) ReleaseDate() (r string, exists bool)
- func (m *AppMutation) RemovedEdges() []string
- func (m *AppMutation) RemovedIDs(name string) []ent.Value
- func (m *AppMutation) ResetCreatedAt()
- func (m *AppMutation) ResetDescription()
- func (m *AppMutation) ResetDeveloper()
- func (m *AppMutation) ResetEdge(name string) error
- func (m *AppMutation) ResetField(name string) error
- func (m *AppMutation) ResetImageURL()
- func (m *AppMutation) ResetInternalID()
- func (m *AppMutation) ResetName()
- func (m *AppMutation) ResetPublisher()
- func (m *AppMutation) ResetReleaseDate()
- func (m *AppMutation) ResetShortDescription()
- func (m *AppMutation) ResetSource()
- func (m *AppMutation) ResetSourceAppID()
- func (m *AppMutation) ResetSourceURL()
- func (m *AppMutation) ResetType()
- func (m *AppMutation) SetCreatedAt(t time.Time)
- func (m *AppMutation) SetDescription(s string)
- func (m *AppMutation) SetDeveloper(s string)
- func (m *AppMutation) SetField(name string, value ent.Value) error
- func (m *AppMutation) SetImageURL(s string)
- func (m *AppMutation) SetInternalID(i int64)
- func (m *AppMutation) SetName(s string)
- func (m *AppMutation) SetOp(op Op)
- func (m *AppMutation) SetPublisher(s string)
- func (m *AppMutation) SetReleaseDate(s string)
- func (m *AppMutation) SetShortDescription(s string)
- func (m *AppMutation) SetSource(a app.Source)
- func (m *AppMutation) SetSourceAppID(s string)
- func (m *AppMutation) SetSourceURL(s string)
- func (m *AppMutation) SetType(a app.Type)
- func (m *AppMutation) ShortDescription() (r string, exists bool)
- func (m *AppMutation) Source() (r app.Source, exists bool)
- func (m *AppMutation) SourceAppID() (r string, exists bool)
- func (m *AppMutation) SourceURL() (r string, exists bool)
- func (m AppMutation) Tx() (*Tx, error)
- func (m *AppMutation) Type() string
- func (m *AppMutation) Where(ps ...predicate.App)
- func (m *AppMutation) WhereP(ps ...func(*sql.Selector))
- type AppPackage
- type AppPackageClient
- func (c *AppPackageClient) Create() *AppPackageCreate
- func (c *AppPackageClient) CreateBulk(builders ...*AppPackageCreate) *AppPackageCreateBulk
- func (c *AppPackageClient) Delete() *AppPackageDelete
- func (c *AppPackageClient) DeleteOne(ap *AppPackage) *AppPackageDeleteOne
- func (c *AppPackageClient) DeleteOneID(id int) *AppPackageDeleteOne
- func (c *AppPackageClient) Get(ctx context.Context, id int) (*AppPackage, error)
- func (c *AppPackageClient) GetX(ctx context.Context, id int) *AppPackage
- func (c *AppPackageClient) Hooks() []Hook
- func (c *AppPackageClient) Intercept(interceptors ...Interceptor)
- func (c *AppPackageClient) Interceptors() []Interceptor
- func (c *AppPackageClient) Query() *AppPackageQuery
- func (c *AppPackageClient) Update() *AppPackageUpdate
- func (c *AppPackageClient) UpdateOne(ap *AppPackage) *AppPackageUpdateOne
- func (c *AppPackageClient) UpdateOneID(id int) *AppPackageUpdateOne
- func (c *AppPackageClient) Use(hooks ...Hook)
- type AppPackageCreate
- func (apc *AppPackageCreate) Exec(ctx context.Context) error
- func (apc *AppPackageCreate) ExecX(ctx context.Context)
- func (apc *AppPackageCreate) Mutation() *AppPackageMutation
- func (apc *AppPackageCreate) OnConflict(opts ...sql.ConflictOption) *AppPackageUpsertOne
- func (apc *AppPackageCreate) OnConflictColumns(columns ...string) *AppPackageUpsertOne
- func (apc *AppPackageCreate) Save(ctx context.Context) (*AppPackage, error)
- func (apc *AppPackageCreate) SaveX(ctx context.Context) *AppPackage
- func (apc *AppPackageCreate) SetBinaryName(s string) *AppPackageCreate
- func (apc *AppPackageCreate) SetBinarySize(s string) *AppPackageCreate
- func (apc *AppPackageCreate) SetCreatedAt(t time.Time) *AppPackageCreate
- func (apc *AppPackageCreate) SetDescription(s string) *AppPackageCreate
- func (apc *AppPackageCreate) SetInternalID(i int64) *AppPackageCreate
- func (apc *AppPackageCreate) SetName(s string) *AppPackageCreate
- func (apc *AppPackageCreate) SetNillableCreatedAt(t *time.Time) *AppPackageCreate
- func (apc *AppPackageCreate) SetSource(a apppackage.Source) *AppPackageCreate
- func (apc *AppPackageCreate) SetSourceID(i int64) *AppPackageCreate
- func (apc *AppPackageCreate) SetSourcePackageID(s string) *AppPackageCreate
- func (apc *AppPackageCreate) SetUpdatedAt(t time.Time) *AppPackageCreate
- type AppPackageCreateBulk
- func (apcb *AppPackageCreateBulk) Exec(ctx context.Context) error
- func (apcb *AppPackageCreateBulk) ExecX(ctx context.Context)
- func (apcb *AppPackageCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppPackageUpsertBulk
- func (apcb *AppPackageCreateBulk) OnConflictColumns(columns ...string) *AppPackageUpsertBulk
- func (apcb *AppPackageCreateBulk) Save(ctx context.Context) ([]*AppPackage, error)
- func (apcb *AppPackageCreateBulk) SaveX(ctx context.Context) []*AppPackage
- type AppPackageDelete
- type AppPackageDeleteOne
- type AppPackageGroupBy
- func (apgb *AppPackageGroupBy) Aggregate(fns ...AggregateFunc) *AppPackageGroupBy
- func (s *AppPackageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AppPackageGroupBy) BoolX(ctx context.Context) bool
- func (s *AppPackageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AppPackageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AppPackageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AppPackageGroupBy) Float64X(ctx context.Context) float64
- func (s *AppPackageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AppPackageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AppPackageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AppPackageGroupBy) IntX(ctx context.Context) int
- func (s *AppPackageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AppPackageGroupBy) IntsX(ctx context.Context) []int
- func (apgb *AppPackageGroupBy) Scan(ctx context.Context, v any) error
- func (s *AppPackageGroupBy) ScanX(ctx context.Context, v any)
- func (s *AppPackageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AppPackageGroupBy) StringX(ctx context.Context) string
- func (s *AppPackageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AppPackageGroupBy) StringsX(ctx context.Context) []string
- type AppPackageMutation
- func (m *AppPackageMutation) AddField(name string, value ent.Value) error
- func (m *AppPackageMutation) AddInternalID(i int64)
- func (m *AppPackageMutation) AddSourceID(i int64)
- func (m *AppPackageMutation) AddedEdges() []string
- func (m *AppPackageMutation) AddedField(name string) (ent.Value, bool)
- func (m *AppPackageMutation) AddedFields() []string
- func (m *AppPackageMutation) AddedIDs(name string) []ent.Value
- func (m *AppPackageMutation) AddedInternalID() (r int64, exists bool)
- func (m *AppPackageMutation) AddedSourceID() (r int64, exists bool)
- func (m *AppPackageMutation) BinaryName() (r string, exists bool)
- func (m *AppPackageMutation) BinarySize() (r string, exists bool)
- func (m *AppPackageMutation) ClearEdge(name string) error
- func (m *AppPackageMutation) ClearField(name string) error
- func (m *AppPackageMutation) ClearedEdges() []string
- func (m *AppPackageMutation) ClearedFields() []string
- func (m AppPackageMutation) Client() *Client
- func (m *AppPackageMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AppPackageMutation) Description() (r string, exists bool)
- func (m *AppPackageMutation) EdgeCleared(name string) bool
- func (m *AppPackageMutation) Field(name string) (ent.Value, bool)
- func (m *AppPackageMutation) FieldCleared(name string) bool
- func (m *AppPackageMutation) Fields() []string
- func (m *AppPackageMutation) ID() (id int, exists bool)
- func (m *AppPackageMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AppPackageMutation) InternalID() (r int64, exists bool)
- func (m *AppPackageMutation) Name() (r string, exists bool)
- func (m *AppPackageMutation) OldBinaryName(ctx context.Context) (v string, err error)
- func (m *AppPackageMutation) OldBinarySize(ctx context.Context) (v string, err error)
- func (m *AppPackageMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AppPackageMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *AppPackageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AppPackageMutation) OldInternalID(ctx context.Context) (v int64, err error)
- func (m *AppPackageMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AppPackageMutation) OldSource(ctx context.Context) (v apppackage.Source, err error)
- func (m *AppPackageMutation) OldSourceID(ctx context.Context) (v int64, err error)
- func (m *AppPackageMutation) OldSourcePackageID(ctx context.Context) (v string, err error)
- func (m *AppPackageMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AppPackageMutation) Op() Op
- func (m *AppPackageMutation) RemovedEdges() []string
- func (m *AppPackageMutation) RemovedIDs(name string) []ent.Value
- func (m *AppPackageMutation) ResetBinaryName()
- func (m *AppPackageMutation) ResetBinarySize()
- func (m *AppPackageMutation) ResetCreatedAt()
- func (m *AppPackageMutation) ResetDescription()
- func (m *AppPackageMutation) ResetEdge(name string) error
- func (m *AppPackageMutation) ResetField(name string) error
- func (m *AppPackageMutation) ResetInternalID()
- func (m *AppPackageMutation) ResetName()
- func (m *AppPackageMutation) ResetSource()
- func (m *AppPackageMutation) ResetSourceID()
- func (m *AppPackageMutation) ResetSourcePackageID()
- func (m *AppPackageMutation) ResetUpdatedAt()
- func (m *AppPackageMutation) SetBinaryName(s string)
- func (m *AppPackageMutation) SetBinarySize(s string)
- func (m *AppPackageMutation) SetCreatedAt(t time.Time)
- func (m *AppPackageMutation) SetDescription(s string)
- func (m *AppPackageMutation) SetField(name string, value ent.Value) error
- func (m *AppPackageMutation) SetInternalID(i int64)
- func (m *AppPackageMutation) SetName(s string)
- func (m *AppPackageMutation) SetOp(op Op)
- func (m *AppPackageMutation) SetSource(a apppackage.Source)
- func (m *AppPackageMutation) SetSourceID(i int64)
- func (m *AppPackageMutation) SetSourcePackageID(s string)
- func (m *AppPackageMutation) SetUpdatedAt(t time.Time)
- func (m *AppPackageMutation) Source() (r apppackage.Source, exists bool)
- func (m *AppPackageMutation) SourceID() (r int64, exists bool)
- func (m *AppPackageMutation) SourcePackageID() (r string, exists bool)
- func (m AppPackageMutation) Tx() (*Tx, error)
- func (m *AppPackageMutation) Type() string
- func (m *AppPackageMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AppPackageMutation) Where(ps ...predicate.AppPackage)
- func (m *AppPackageMutation) WhereP(ps ...func(*sql.Selector))
- type AppPackageQuery
- func (apq *AppPackageQuery) Aggregate(fns ...AggregateFunc) *AppPackageSelect
- func (apq *AppPackageQuery) All(ctx context.Context) ([]*AppPackage, error)
- func (apq *AppPackageQuery) AllX(ctx context.Context) []*AppPackage
- func (apq *AppPackageQuery) Clone() *AppPackageQuery
- func (apq *AppPackageQuery) Count(ctx context.Context) (int, error)
- func (apq *AppPackageQuery) CountX(ctx context.Context) int
- func (apq *AppPackageQuery) Exist(ctx context.Context) (bool, error)
- func (apq *AppPackageQuery) ExistX(ctx context.Context) bool
- func (apq *AppPackageQuery) First(ctx context.Context) (*AppPackage, error)
- func (apq *AppPackageQuery) FirstID(ctx context.Context) (id int, err error)
- func (apq *AppPackageQuery) FirstIDX(ctx context.Context) int
- func (apq *AppPackageQuery) FirstX(ctx context.Context) *AppPackage
- func (apq *AppPackageQuery) GroupBy(field string, fields ...string) *AppPackageGroupBy
- func (apq *AppPackageQuery) IDs(ctx context.Context) ([]int, error)
- func (apq *AppPackageQuery) IDsX(ctx context.Context) []int
- func (apq *AppPackageQuery) Limit(limit int) *AppPackageQuery
- func (apq *AppPackageQuery) Offset(offset int) *AppPackageQuery
- func (apq *AppPackageQuery) Only(ctx context.Context) (*AppPackage, error)
- func (apq *AppPackageQuery) OnlyID(ctx context.Context) (id int, err error)
- func (apq *AppPackageQuery) OnlyIDX(ctx context.Context) int
- func (apq *AppPackageQuery) OnlyX(ctx context.Context) *AppPackage
- func (apq *AppPackageQuery) Order(o ...OrderFunc) *AppPackageQuery
- func (apq *AppPackageQuery) Select(fields ...string) *AppPackageSelect
- func (apq *AppPackageQuery) Unique(unique bool) *AppPackageQuery
- func (apq *AppPackageQuery) Where(ps ...predicate.AppPackage) *AppPackageQuery
- type AppPackageSelect
- func (aps *AppPackageSelect) Aggregate(fns ...AggregateFunc) *AppPackageSelect
- func (s *AppPackageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AppPackageSelect) BoolX(ctx context.Context) bool
- func (s *AppPackageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AppPackageSelect) BoolsX(ctx context.Context) []bool
- func (s *AppPackageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AppPackageSelect) Float64X(ctx context.Context) float64
- func (s *AppPackageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AppPackageSelect) Float64sX(ctx context.Context) []float64
- func (s *AppPackageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AppPackageSelect) IntX(ctx context.Context) int
- func (s *AppPackageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AppPackageSelect) IntsX(ctx context.Context) []int
- func (aps *AppPackageSelect) Scan(ctx context.Context, v any) error
- func (s *AppPackageSelect) ScanX(ctx context.Context, v any)
- func (s *AppPackageSelect) String(ctx context.Context) (_ string, err error)
- func (s *AppPackageSelect) StringX(ctx context.Context) string
- func (s *AppPackageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AppPackageSelect) StringsX(ctx context.Context) []string
- type AppPackageUpdate
- func (apu *AppPackageUpdate) AddInternalID(i int64) *AppPackageUpdate
- func (apu *AppPackageUpdate) AddSourceID(i int64) *AppPackageUpdate
- func (apu *AppPackageUpdate) Exec(ctx context.Context) error
- func (apu *AppPackageUpdate) ExecX(ctx context.Context)
- func (apu *AppPackageUpdate) Mutation() *AppPackageMutation
- func (apu *AppPackageUpdate) Save(ctx context.Context) (int, error)
- func (apu *AppPackageUpdate) SaveX(ctx context.Context) int
- func (apu *AppPackageUpdate) SetBinaryName(s string) *AppPackageUpdate
- func (apu *AppPackageUpdate) SetBinarySize(s string) *AppPackageUpdate
- func (apu *AppPackageUpdate) SetCreatedAt(t time.Time) *AppPackageUpdate
- func (apu *AppPackageUpdate) SetDescription(s string) *AppPackageUpdate
- func (apu *AppPackageUpdate) SetInternalID(i int64) *AppPackageUpdate
- func (apu *AppPackageUpdate) SetName(s string) *AppPackageUpdate
- func (apu *AppPackageUpdate) SetNillableCreatedAt(t *time.Time) *AppPackageUpdate
- func (apu *AppPackageUpdate) SetSource(a apppackage.Source) *AppPackageUpdate
- func (apu *AppPackageUpdate) SetSourceID(i int64) *AppPackageUpdate
- func (apu *AppPackageUpdate) SetSourcePackageID(s string) *AppPackageUpdate
- func (apu *AppPackageUpdate) SetUpdatedAt(t time.Time) *AppPackageUpdate
- func (apu *AppPackageUpdate) Where(ps ...predicate.AppPackage) *AppPackageUpdate
- type AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) AddInternalID(i int64) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) AddSourceID(i int64) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) Exec(ctx context.Context) error
- func (apuo *AppPackageUpdateOne) ExecX(ctx context.Context)
- func (apuo *AppPackageUpdateOne) Mutation() *AppPackageMutation
- func (apuo *AppPackageUpdateOne) Save(ctx context.Context) (*AppPackage, error)
- func (apuo *AppPackageUpdateOne) SaveX(ctx context.Context) *AppPackage
- func (apuo *AppPackageUpdateOne) Select(field string, fields ...string) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) SetBinaryName(s string) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) SetBinarySize(s string) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) SetCreatedAt(t time.Time) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) SetDescription(s string) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) SetInternalID(i int64) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) SetName(s string) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) SetNillableCreatedAt(t *time.Time) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) SetSource(a apppackage.Source) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) SetSourceID(i int64) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) SetSourcePackageID(s string) *AppPackageUpdateOne
- func (apuo *AppPackageUpdateOne) SetUpdatedAt(t time.Time) *AppPackageUpdateOne
- type AppPackageUpsert
- func (u *AppPackageUpsert) AddInternalID(v int64) *AppPackageUpsert
- func (u *AppPackageUpsert) AddSourceID(v int64) *AppPackageUpsert
- func (u *AppPackageUpsert) SetBinaryName(v string) *AppPackageUpsert
- func (u *AppPackageUpsert) SetBinarySize(v string) *AppPackageUpsert
- func (u *AppPackageUpsert) SetCreatedAt(v time.Time) *AppPackageUpsert
- func (u *AppPackageUpsert) SetDescription(v string) *AppPackageUpsert
- func (u *AppPackageUpsert) SetInternalID(v int64) *AppPackageUpsert
- func (u *AppPackageUpsert) SetName(v string) *AppPackageUpsert
- func (u *AppPackageUpsert) SetSource(v apppackage.Source) *AppPackageUpsert
- func (u *AppPackageUpsert) SetSourceID(v int64) *AppPackageUpsert
- func (u *AppPackageUpsert) SetSourcePackageID(v string) *AppPackageUpsert
- func (u *AppPackageUpsert) SetUpdatedAt(v time.Time) *AppPackageUpsert
- func (u *AppPackageUpsert) UpdateBinaryName() *AppPackageUpsert
- func (u *AppPackageUpsert) UpdateBinarySize() *AppPackageUpsert
- func (u *AppPackageUpsert) UpdateCreatedAt() *AppPackageUpsert
- func (u *AppPackageUpsert) UpdateDescription() *AppPackageUpsert
- func (u *AppPackageUpsert) UpdateInternalID() *AppPackageUpsert
- func (u *AppPackageUpsert) UpdateName() *AppPackageUpsert
- func (u *AppPackageUpsert) UpdateSource() *AppPackageUpsert
- func (u *AppPackageUpsert) UpdateSourceID() *AppPackageUpsert
- func (u *AppPackageUpsert) UpdateSourcePackageID() *AppPackageUpsert
- func (u *AppPackageUpsert) UpdateUpdatedAt() *AppPackageUpsert
- type AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) AddInternalID(v int64) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) AddSourceID(v int64) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) DoNothing() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) Exec(ctx context.Context) error
- func (u *AppPackageUpsertBulk) ExecX(ctx context.Context)
- func (u *AppPackageUpsertBulk) Ignore() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) SetBinaryName(v string) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) SetBinarySize(v string) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) SetCreatedAt(v time.Time) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) SetDescription(v string) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) SetInternalID(v int64) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) SetName(v string) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) SetSource(v apppackage.Source) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) SetSourceID(v int64) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) SetSourcePackageID(v string) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) SetUpdatedAt(v time.Time) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) Update(set func(*AppPackageUpsert)) *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) UpdateBinaryName() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) UpdateBinarySize() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) UpdateCreatedAt() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) UpdateDescription() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) UpdateInternalID() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) UpdateName() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) UpdateNewValues() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) UpdateSource() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) UpdateSourceID() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) UpdateSourcePackageID() *AppPackageUpsertBulk
- func (u *AppPackageUpsertBulk) UpdateUpdatedAt() *AppPackageUpsertBulk
- type AppPackageUpsertOne
- func (u *AppPackageUpsertOne) AddInternalID(v int64) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) AddSourceID(v int64) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) DoNothing() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) Exec(ctx context.Context) error
- func (u *AppPackageUpsertOne) ExecX(ctx context.Context)
- func (u *AppPackageUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *AppPackageUpsertOne) IDX(ctx context.Context) int
- func (u *AppPackageUpsertOne) Ignore() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) SetBinaryName(v string) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) SetBinarySize(v string) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) SetCreatedAt(v time.Time) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) SetDescription(v string) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) SetInternalID(v int64) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) SetName(v string) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) SetSource(v apppackage.Source) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) SetSourceID(v int64) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) SetSourcePackageID(v string) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) SetUpdatedAt(v time.Time) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) Update(set func(*AppPackageUpsert)) *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) UpdateBinaryName() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) UpdateBinarySize() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) UpdateCreatedAt() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) UpdateDescription() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) UpdateInternalID() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) UpdateName() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) UpdateNewValues() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) UpdateSource() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) UpdateSourceID() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) UpdateSourcePackageID() *AppPackageUpsertOne
- func (u *AppPackageUpsertOne) UpdateUpdatedAt() *AppPackageUpsertOne
- type AppPackages
- type AppQuery
- func (aq *AppQuery) Aggregate(fns ...AggregateFunc) *AppSelect
- func (aq *AppQuery) All(ctx context.Context) ([]*App, error)
- func (aq *AppQuery) AllX(ctx context.Context) []*App
- func (aq *AppQuery) Clone() *AppQuery
- func (aq *AppQuery) Count(ctx context.Context) (int, error)
- func (aq *AppQuery) CountX(ctx context.Context) int
- func (aq *AppQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AppQuery) ExistX(ctx context.Context) bool
- func (aq *AppQuery) First(ctx context.Context) (*App, error)
- func (aq *AppQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *AppQuery) FirstIDX(ctx context.Context) int
- func (aq *AppQuery) FirstX(ctx context.Context) *App
- func (aq *AppQuery) GroupBy(field string, fields ...string) *AppGroupBy
- func (aq *AppQuery) IDs(ctx context.Context) ([]int, error)
- func (aq *AppQuery) IDsX(ctx context.Context) []int
- func (aq *AppQuery) Limit(limit int) *AppQuery
- func (aq *AppQuery) Offset(offset int) *AppQuery
- func (aq *AppQuery) Only(ctx context.Context) (*App, error)
- func (aq *AppQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *AppQuery) OnlyIDX(ctx context.Context) int
- func (aq *AppQuery) OnlyX(ctx context.Context) *App
- func (aq *AppQuery) Order(o ...OrderFunc) *AppQuery
- func (aq *AppQuery) Select(fields ...string) *AppSelect
- func (aq *AppQuery) Unique(unique bool) *AppQuery
- func (aq *AppQuery) Where(ps ...predicate.App) *AppQuery
- type AppSelect
- func (as *AppSelect) Aggregate(fns ...AggregateFunc) *AppSelect
- func (s *AppSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AppSelect) BoolX(ctx context.Context) bool
- func (s *AppSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AppSelect) BoolsX(ctx context.Context) []bool
- func (s *AppSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AppSelect) Float64X(ctx context.Context) float64
- func (s *AppSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AppSelect) Float64sX(ctx context.Context) []float64
- func (s *AppSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AppSelect) IntX(ctx context.Context) int
- func (s *AppSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AppSelect) IntsX(ctx context.Context) []int
- func (as *AppSelect) Scan(ctx context.Context, v any) error
- func (s *AppSelect) ScanX(ctx context.Context, v any)
- func (s *AppSelect) String(ctx context.Context) (_ string, err error)
- func (s *AppSelect) StringX(ctx context.Context) string
- func (s *AppSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AppSelect) StringsX(ctx context.Context) []string
- type AppUpdate
- func (au *AppUpdate) AddInternalID(i int64) *AppUpdate
- func (au *AppUpdate) Exec(ctx context.Context) error
- func (au *AppUpdate) ExecX(ctx context.Context)
- func (au *AppUpdate) Mutation() *AppMutation
- func (au *AppUpdate) Save(ctx context.Context) (int, error)
- func (au *AppUpdate) SaveX(ctx context.Context) int
- func (au *AppUpdate) SetCreatedAt(t time.Time) *AppUpdate
- func (au *AppUpdate) SetDescription(s string) *AppUpdate
- func (au *AppUpdate) SetDeveloper(s string) *AppUpdate
- func (au *AppUpdate) SetImageURL(s string) *AppUpdate
- func (au *AppUpdate) SetInternalID(i int64) *AppUpdate
- func (au *AppUpdate) SetName(s string) *AppUpdate
- func (au *AppUpdate) SetNillableCreatedAt(t *time.Time) *AppUpdate
- func (au *AppUpdate) SetPublisher(s string) *AppUpdate
- func (au *AppUpdate) SetReleaseDate(s string) *AppUpdate
- func (au *AppUpdate) SetShortDescription(s string) *AppUpdate
- func (au *AppUpdate) SetSource(a app.Source) *AppUpdate
- func (au *AppUpdate) SetSourceAppID(s string) *AppUpdate
- func (au *AppUpdate) SetSourceURL(s string) *AppUpdate
- func (au *AppUpdate) SetType(a app.Type) *AppUpdate
- func (au *AppUpdate) Where(ps ...predicate.App) *AppUpdate
- type AppUpdateOne
- func (auo *AppUpdateOne) AddInternalID(i int64) *AppUpdateOne
- func (auo *AppUpdateOne) Exec(ctx context.Context) error
- func (auo *AppUpdateOne) ExecX(ctx context.Context)
- func (auo *AppUpdateOne) Mutation() *AppMutation
- func (auo *AppUpdateOne) Save(ctx context.Context) (*App, error)
- func (auo *AppUpdateOne) SaveX(ctx context.Context) *App
- func (auo *AppUpdateOne) Select(field string, fields ...string) *AppUpdateOne
- func (auo *AppUpdateOne) SetCreatedAt(t time.Time) *AppUpdateOne
- func (auo *AppUpdateOne) SetDescription(s string) *AppUpdateOne
- func (auo *AppUpdateOne) SetDeveloper(s string) *AppUpdateOne
- func (auo *AppUpdateOne) SetImageURL(s string) *AppUpdateOne
- func (auo *AppUpdateOne) SetInternalID(i int64) *AppUpdateOne
- func (auo *AppUpdateOne) SetName(s string) *AppUpdateOne
- func (auo *AppUpdateOne) SetNillableCreatedAt(t *time.Time) *AppUpdateOne
- func (auo *AppUpdateOne) SetPublisher(s string) *AppUpdateOne
- func (auo *AppUpdateOne) SetReleaseDate(s string) *AppUpdateOne
- func (auo *AppUpdateOne) SetShortDescription(s string) *AppUpdateOne
- func (auo *AppUpdateOne) SetSource(a app.Source) *AppUpdateOne
- func (auo *AppUpdateOne) SetSourceAppID(s string) *AppUpdateOne
- func (auo *AppUpdateOne) SetSourceURL(s string) *AppUpdateOne
- func (auo *AppUpdateOne) SetType(a app.Type) *AppUpdateOne
- type AppUpsert
- func (u *AppUpsert) AddInternalID(v int64) *AppUpsert
- func (u *AppUpsert) SetCreatedAt(v time.Time) *AppUpsert
- func (u *AppUpsert) SetDescription(v string) *AppUpsert
- func (u *AppUpsert) SetDeveloper(v string) *AppUpsert
- func (u *AppUpsert) SetImageURL(v string) *AppUpsert
- func (u *AppUpsert) SetInternalID(v int64) *AppUpsert
- func (u *AppUpsert) SetName(v string) *AppUpsert
- func (u *AppUpsert) SetPublisher(v string) *AppUpsert
- func (u *AppUpsert) SetReleaseDate(v string) *AppUpsert
- func (u *AppUpsert) SetShortDescription(v string) *AppUpsert
- func (u *AppUpsert) SetSource(v app.Source) *AppUpsert
- func (u *AppUpsert) SetSourceAppID(v string) *AppUpsert
- func (u *AppUpsert) SetSourceURL(v string) *AppUpsert
- func (u *AppUpsert) SetType(v app.Type) *AppUpsert
- func (u *AppUpsert) UpdateCreatedAt() *AppUpsert
- func (u *AppUpsert) UpdateDescription() *AppUpsert
- func (u *AppUpsert) UpdateDeveloper() *AppUpsert
- func (u *AppUpsert) UpdateImageURL() *AppUpsert
- func (u *AppUpsert) UpdateInternalID() *AppUpsert
- func (u *AppUpsert) UpdateName() *AppUpsert
- func (u *AppUpsert) UpdatePublisher() *AppUpsert
- func (u *AppUpsert) UpdateReleaseDate() *AppUpsert
- func (u *AppUpsert) UpdateShortDescription() *AppUpsert
- func (u *AppUpsert) UpdateSource() *AppUpsert
- func (u *AppUpsert) UpdateSourceAppID() *AppUpsert
- func (u *AppUpsert) UpdateSourceURL() *AppUpsert
- func (u *AppUpsert) UpdateType() *AppUpsert
- type AppUpsertBulk
- func (u *AppUpsertBulk) AddInternalID(v int64) *AppUpsertBulk
- func (u *AppUpsertBulk) DoNothing() *AppUpsertBulk
- func (u *AppUpsertBulk) Exec(ctx context.Context) error
- func (u *AppUpsertBulk) ExecX(ctx context.Context)
- func (u *AppUpsertBulk) Ignore() *AppUpsertBulk
- func (u *AppUpsertBulk) SetCreatedAt(v time.Time) *AppUpsertBulk
- func (u *AppUpsertBulk) SetDescription(v string) *AppUpsertBulk
- func (u *AppUpsertBulk) SetDeveloper(v string) *AppUpsertBulk
- func (u *AppUpsertBulk) SetImageURL(v string) *AppUpsertBulk
- func (u *AppUpsertBulk) SetInternalID(v int64) *AppUpsertBulk
- func (u *AppUpsertBulk) SetName(v string) *AppUpsertBulk
- func (u *AppUpsertBulk) SetPublisher(v string) *AppUpsertBulk
- func (u *AppUpsertBulk) SetReleaseDate(v string) *AppUpsertBulk
- func (u *AppUpsertBulk) SetShortDescription(v string) *AppUpsertBulk
- func (u *AppUpsertBulk) SetSource(v app.Source) *AppUpsertBulk
- func (u *AppUpsertBulk) SetSourceAppID(v string) *AppUpsertBulk
- func (u *AppUpsertBulk) SetSourceURL(v string) *AppUpsertBulk
- func (u *AppUpsertBulk) SetType(v app.Type) *AppUpsertBulk
- func (u *AppUpsertBulk) Update(set func(*AppUpsert)) *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateCreatedAt() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateDescription() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateDeveloper() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateImageURL() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateInternalID() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateName() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateNewValues() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdatePublisher() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateReleaseDate() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateShortDescription() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateSource() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateSourceAppID() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateSourceURL() *AppUpsertBulk
- func (u *AppUpsertBulk) UpdateType() *AppUpsertBulk
- type AppUpsertOne
- func (u *AppUpsertOne) AddInternalID(v int64) *AppUpsertOne
- func (u *AppUpsertOne) DoNothing() *AppUpsertOne
- func (u *AppUpsertOne) Exec(ctx context.Context) error
- func (u *AppUpsertOne) ExecX(ctx context.Context)
- func (u *AppUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *AppUpsertOne) IDX(ctx context.Context) int
- func (u *AppUpsertOne) Ignore() *AppUpsertOne
- func (u *AppUpsertOne) SetCreatedAt(v time.Time) *AppUpsertOne
- func (u *AppUpsertOne) SetDescription(v string) *AppUpsertOne
- func (u *AppUpsertOne) SetDeveloper(v string) *AppUpsertOne
- func (u *AppUpsertOne) SetImageURL(v string) *AppUpsertOne
- func (u *AppUpsertOne) SetInternalID(v int64) *AppUpsertOne
- func (u *AppUpsertOne) SetName(v string) *AppUpsertOne
- func (u *AppUpsertOne) SetPublisher(v string) *AppUpsertOne
- func (u *AppUpsertOne) SetReleaseDate(v string) *AppUpsertOne
- func (u *AppUpsertOne) SetShortDescription(v string) *AppUpsertOne
- func (u *AppUpsertOne) SetSource(v app.Source) *AppUpsertOne
- func (u *AppUpsertOne) SetSourceAppID(v string) *AppUpsertOne
- func (u *AppUpsertOne) SetSourceURL(v string) *AppUpsertOne
- func (u *AppUpsertOne) SetType(v app.Type) *AppUpsertOne
- func (u *AppUpsertOne) Update(set func(*AppUpsert)) *AppUpsertOne
- func (u *AppUpsertOne) UpdateCreatedAt() *AppUpsertOne
- func (u *AppUpsertOne) UpdateDescription() *AppUpsertOne
- func (u *AppUpsertOne) UpdateDeveloper() *AppUpsertOne
- func (u *AppUpsertOne) UpdateImageURL() *AppUpsertOne
- func (u *AppUpsertOne) UpdateInternalID() *AppUpsertOne
- func (u *AppUpsertOne) UpdateName() *AppUpsertOne
- func (u *AppUpsertOne) UpdateNewValues() *AppUpsertOne
- func (u *AppUpsertOne) UpdatePublisher() *AppUpsertOne
- func (u *AppUpsertOne) UpdateReleaseDate() *AppUpsertOne
- func (u *AppUpsertOne) UpdateShortDescription() *AppUpsertOne
- func (u *AppUpsertOne) UpdateSource() *AppUpsertOne
- func (u *AppUpsertOne) UpdateSourceAppID() *AppUpsertOne
- func (u *AppUpsertOne) UpdateSourceURL() *AppUpsertOne
- func (u *AppUpsertOne) UpdateType() *AppUpsertOne
- type Apps
- 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 Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetInternalID(i int64) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
- func (uc *UserCreate) SetType(u user.Type) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddInternalID(i int64)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AddedInternalID() (r int64, exists bool)
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) GetType() (r user.Type, exists bool)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) InternalID() (r int64, exists bool)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldInternalID(ctx context.Context) (v int64, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldStatus(ctx context.Context) (v user.Status, err error)
- func (m *UserMutation) OldType(ctx context.Context) (v user.Type, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetInternalID()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetStatus()
- func (m *UserMutation) ResetType()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetInternalID(i int64)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetStatus(u user.Status)
- func (m *UserMutation) SetType(u user.Type)
- func (m *UserMutation) SetUsername(s string)
- func (m *UserMutation) Status() (r user.Status, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddInternalID(i int64) *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetInternalID(i int64) *UserUpdate
- func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
- func (uu *UserUpdate) SetType(u user.Type) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddInternalID(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetInternalID(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
- func (uuo *UserUpdateOne) SetType(u user.Type) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) AddInternalID(v int64) *UserUpsert
- func (u *UserUpsert) SetCreatedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetInternalID(v int64) *UserUpsert
- func (u *UserUpsert) SetPassword(v string) *UserUpsert
- func (u *UserUpsert) SetStatus(v user.Status) *UserUpsert
- func (u *UserUpsert) SetType(v user.Type) *UserUpsert
- func (u *UserUpsert) SetUsername(v string) *UserUpsert
- func (u *UserUpsert) UpdateCreatedAt() *UserUpsert
- func (u *UserUpsert) UpdateInternalID() *UserUpsert
- func (u *UserUpsert) UpdatePassword() *UserUpsert
- func (u *UserUpsert) UpdateStatus() *UserUpsert
- func (u *UserUpsert) UpdateType() *UserUpsert
- func (u *UserUpsert) UpdateUsername() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) AddInternalID(v int64) *UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetCreatedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetInternalID(v int64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetStatus(v user.Status) *UserUpsertBulk
- func (u *UserUpsertBulk) SetType(v user.Type) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateCreatedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateInternalID() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateStatus() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateType() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) AddInternalID(v int64) *UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) int
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetCreatedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetInternalID(v int64) *UserUpsertOne
- func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetStatus(v user.Status) *UserUpsertOne
- func (u *UserUpsertOne) SetType(v user.Type) *UserUpsertOne
- func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateCreatedAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateInternalID() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
- func (u *UserUpsertOne) UpdateStatus() *UserUpsertOne
- func (u *UserUpsertOne) UpdateType() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAccount = "Account" TypeApp = "App" TypeAppPackage = "AppPackage" TypeUser = "User" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Account ¶ added in v0.0.2
type Account struct { // ID of the ent. ID int `json:"id,omitempty"` // InternalID holds the value of the "internal_id" field. InternalID int64 `json:"internal_id,omitempty"` // Platform holds the value of the "platform" field. Platform account.Platform `json:"platform,omitempty"` // PlatformAccountID holds the value of the "platform_account_id" field. PlatformAccountID string `json:"platform_account_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // ProfileURL holds the value of the "profile_url" field. ProfileURL string `json:"profile_url,omitempty"` // AvatarURL holds the value of the "avatar_url" field. AvatarURL string `json:"avatar_url,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
Account is the model entity for the Account schema.
func (*Account) Unwrap ¶ added in v0.0.2
Unwrap unwraps the Account entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Account) Update ¶ added in v0.0.2
func (a *Account) Update() *AccountUpdateOne
Update returns a builder for updating this Account. Note that you need to call Account.Unwrap() before calling this method if this Account was returned from a transaction, and the transaction was committed or rolled back.
type AccountClient ¶ added in v0.0.2
type AccountClient struct {
// contains filtered or unexported fields
}
AccountClient is a client for the Account schema.
func NewAccountClient ¶ added in v0.0.2
func NewAccountClient(c config) *AccountClient
NewAccountClient returns a client for the Account from the given config.
func (*AccountClient) Create ¶ added in v0.0.2
func (c *AccountClient) Create() *AccountCreate
Create returns a builder for creating a Account entity.
func (*AccountClient) CreateBulk ¶ added in v0.0.2
func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk
CreateBulk returns a builder for creating a bulk of Account entities.
func (*AccountClient) Delete ¶ added in v0.0.2
func (c *AccountClient) Delete() *AccountDelete
Delete returns a delete builder for Account.
func (*AccountClient) DeleteOne ¶ added in v0.0.2
func (c *AccountClient) DeleteOne(a *Account) *AccountDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AccountClient) DeleteOneID ¶ added in v0.0.2
func (c *AccountClient) DeleteOneID(id int) *AccountDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AccountClient) GetX ¶ added in v0.0.2
func (c *AccountClient) GetX(ctx context.Context, id int) *Account
GetX is like Get, but panics if an error occurs.
func (*AccountClient) Hooks ¶ added in v0.0.2
func (c *AccountClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AccountClient) Intercept ¶ added in v0.0.4
func (c *AccountClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `account.Intercept(f(g(h())))`.
func (*AccountClient) Interceptors ¶ added in v0.0.4
func (c *AccountClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AccountClient) Query ¶ added in v0.0.2
func (c *AccountClient) Query() *AccountQuery
Query returns a query builder for Account.
func (*AccountClient) Update ¶ added in v0.0.2
func (c *AccountClient) Update() *AccountUpdate
Update returns an update builder for Account.
func (*AccountClient) UpdateOne ¶ added in v0.0.2
func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AccountClient) UpdateOneID ¶ added in v0.0.2
func (c *AccountClient) UpdateOneID(id int) *AccountUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AccountClient) Use ¶ added in v0.0.2
func (c *AccountClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `account.Hooks(f(g(h())))`.
type AccountCreate ¶ added in v0.0.2
type AccountCreate struct {
// contains filtered or unexported fields
}
AccountCreate is the builder for creating a Account entity.
func (*AccountCreate) Exec ¶ added in v0.0.2
func (ac *AccountCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountCreate) ExecX ¶ added in v0.0.2
func (ac *AccountCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountCreate) Mutation ¶ added in v0.0.2
func (ac *AccountCreate) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountCreate) OnConflict ¶ added in v0.0.2
func (ac *AccountCreate) OnConflict(opts ...sql.ConflictOption) *AccountUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Account.Create(). SetInternalID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AccountUpsert) { SetInternalID(v+v). }). Exec(ctx)
func (*AccountCreate) OnConflictColumns ¶ added in v0.0.2
func (ac *AccountCreate) OnConflictColumns(columns ...string) *AccountUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Account.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AccountCreate) Save ¶ added in v0.0.2
func (ac *AccountCreate) Save(ctx context.Context) (*Account, error)
Save creates the Account in the database.
func (*AccountCreate) SaveX ¶ added in v0.0.2
func (ac *AccountCreate) SaveX(ctx context.Context) *Account
SaveX calls Save and panics if Save returns an error.
func (*AccountCreate) SetAvatarURL ¶ added in v0.0.2
func (ac *AccountCreate) SetAvatarURL(s string) *AccountCreate
SetAvatarURL sets the "avatar_url" field.
func (*AccountCreate) SetCreatedAt ¶ added in v0.0.2
func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate
SetCreatedAt sets the "created_at" field.
func (*AccountCreate) SetInternalID ¶ added in v0.0.2
func (ac *AccountCreate) SetInternalID(i int64) *AccountCreate
SetInternalID sets the "internal_id" field.
func (*AccountCreate) SetName ¶ added in v0.0.2
func (ac *AccountCreate) SetName(s string) *AccountCreate
SetName sets the "name" field.
func (*AccountCreate) SetNillableCreatedAt ¶ added in v0.0.2
func (ac *AccountCreate) SetNillableCreatedAt(t *time.Time) *AccountCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccountCreate) SetPlatform ¶ added in v0.0.2
func (ac *AccountCreate) SetPlatform(a account.Platform) *AccountCreate
SetPlatform sets the "platform" field.
func (*AccountCreate) SetPlatformAccountID ¶ added in v0.0.2
func (ac *AccountCreate) SetPlatformAccountID(s string) *AccountCreate
SetPlatformAccountID sets the "platform_account_id" field.
func (*AccountCreate) SetProfileURL ¶ added in v0.0.2
func (ac *AccountCreate) SetProfileURL(s string) *AccountCreate
SetProfileURL sets the "profile_url" field.
type AccountCreateBulk ¶ added in v0.0.2
type AccountCreateBulk struct {
// contains filtered or unexported fields
}
AccountCreateBulk is the builder for creating many Account entities in bulk.
func (*AccountCreateBulk) Exec ¶ added in v0.0.2
func (acb *AccountCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountCreateBulk) ExecX ¶ added in v0.0.2
func (acb *AccountCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountCreateBulk) OnConflict ¶ added in v0.0.2
func (acb *AccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *AccountUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Account.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AccountUpsert) { SetInternalID(v+v). }). Exec(ctx)
func (*AccountCreateBulk) OnConflictColumns ¶ added in v0.0.2
func (acb *AccountCreateBulk) OnConflictColumns(columns ...string) *AccountUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Account.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type AccountDelete ¶ added in v0.0.2
type AccountDelete struct {
// contains filtered or unexported fields
}
AccountDelete is the builder for deleting a Account entity.
func (*AccountDelete) Exec ¶ added in v0.0.2
func (ad *AccountDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AccountDelete) ExecX ¶ added in v0.0.2
func (ad *AccountDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AccountDelete) Where ¶ added in v0.0.2
func (ad *AccountDelete) Where(ps ...predicate.Account) *AccountDelete
Where appends a list predicates to the AccountDelete builder.
type AccountDeleteOne ¶ added in v0.0.2
type AccountDeleteOne struct {
// contains filtered or unexported fields
}
AccountDeleteOne is the builder for deleting a single Account entity.
func (*AccountDeleteOne) Exec ¶ added in v0.0.2
func (ado *AccountDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AccountDeleteOne) ExecX ¶ added in v0.0.2
func (ado *AccountDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountDeleteOne) Where ¶ added in v0.0.4
func (ado *AccountDeleteOne) Where(ps ...predicate.Account) *AccountDeleteOne
Where appends a list predicates to the AccountDelete builder.
type AccountGroupBy ¶ added in v0.0.2
type AccountGroupBy struct {
// contains filtered or unexported fields
}
AccountGroupBy is the group-by builder for Account entities.
func (*AccountGroupBy) Aggregate ¶ added in v0.0.2
func (agb *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AccountGroupBy) Bool ¶ added in v0.0.2
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Bools ¶ added in v0.0.2
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) BoolsX ¶ added in v0.0.2
BoolsX is like Bools, but panics if an error occurs.
func (*AccountGroupBy) Float64 ¶ added in v0.0.2
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Float64X ¶ added in v0.0.2
Float64X is like Float64, but panics if an error occurs.
func (*AccountGroupBy) Float64s ¶ added in v0.0.2
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Float64sX ¶ added in v0.0.2
Float64sX is like Float64s, but panics if an error occurs.
func (*AccountGroupBy) Int ¶ added in v0.0.2
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Ints ¶ added in v0.0.2
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) Scan ¶ added in v0.0.2
func (agb *AccountGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccountGroupBy) String ¶ added in v0.0.2
String returns a single string from a selector. It is only allowed when selecting one field.
func (*AccountGroupBy) StringX ¶ added in v0.0.2
StringX is like String, but panics if an error occurs.
type AccountMutation ¶ added in v0.0.2
type AccountMutation struct {
// contains filtered or unexported fields
}
AccountMutation represents an operation that mutates the Account nodes in the graph.
func (*AccountMutation) AddField ¶ added in v0.0.2
func (m *AccountMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AccountMutation) AddInternalID ¶ added in v0.0.2
func (m *AccountMutation) AddInternalID(i int64)
AddInternalID adds i to the "internal_id" field.
func (*AccountMutation) AddedEdges ¶ added in v0.0.2
func (m *AccountMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AccountMutation) AddedField ¶ added in v0.0.2
func (m *AccountMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AccountMutation) AddedFields ¶ added in v0.0.2
func (m *AccountMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AccountMutation) AddedIDs ¶ added in v0.0.2
func (m *AccountMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AccountMutation) AddedInternalID ¶ added in v0.0.2
func (m *AccountMutation) AddedInternalID() (r int64, exists bool)
AddedInternalID returns the value that was added to the "internal_id" field in this mutation.
func (*AccountMutation) AvatarURL ¶ added in v0.0.2
func (m *AccountMutation) AvatarURL() (r string, exists bool)
AvatarURL returns the value of the "avatar_url" field in the mutation.
func (*AccountMutation) ClearEdge ¶ added in v0.0.2
func (m *AccountMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*AccountMutation) ClearField ¶ added in v0.0.2
func (m *AccountMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*AccountMutation) ClearedEdges ¶ added in v0.0.2
func (m *AccountMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AccountMutation) ClearedFields ¶ added in v0.0.2
func (m *AccountMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AccountMutation) Client ¶ added in v0.0.2
func (m AccountMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*AccountMutation) CreatedAt ¶ added in v0.0.2
func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AccountMutation) EdgeCleared ¶ added in v0.0.2
func (m *AccountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AccountMutation) Field ¶ added in v0.0.2
func (m *AccountMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AccountMutation) FieldCleared ¶ added in v0.0.2
func (m *AccountMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AccountMutation) Fields ¶ added in v0.0.2
func (m *AccountMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*AccountMutation) ID ¶ added in v0.0.2
func (m *AccountMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AccountMutation) IDs ¶ added in v0.0.2
func (m *AccountMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AccountMutation) InternalID ¶ added in v0.0.2
func (m *AccountMutation) InternalID() (r int64, exists bool)
InternalID returns the value of the "internal_id" field in the mutation.
func (*AccountMutation) Name ¶ added in v0.0.2
func (m *AccountMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*AccountMutation) OldAvatarURL ¶ added in v0.0.2
func (m *AccountMutation) OldAvatarURL(ctx context.Context) (v string, err error)
OldAvatarURL returns the old "avatar_url" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldCreatedAt ¶ added in v0.0.2
OldCreatedAt returns the old "created_at" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldField ¶ added in v0.0.2
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*AccountMutation) OldInternalID ¶ added in v0.0.2
func (m *AccountMutation) OldInternalID(ctx context.Context) (v int64, err error)
OldInternalID returns the old "internal_id" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldName ¶ added in v0.0.2
func (m *AccountMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldPlatform ¶ added in v0.0.2
OldPlatform returns the old "platform" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldPlatformAccountID ¶ added in v0.0.2
func (m *AccountMutation) OldPlatformAccountID(ctx context.Context) (v string, err error)
OldPlatformAccountID returns the old "platform_account_id" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) OldProfileURL ¶ added in v0.0.2
func (m *AccountMutation) OldProfileURL(ctx context.Context) (v string, err error)
OldProfileURL returns the old "profile_url" field's value of the Account entity. If the Account object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountMutation) Op ¶ added in v0.0.2
func (m *AccountMutation) Op() Op
Op returns the operation name.
func (*AccountMutation) Platform ¶ added in v0.0.2
func (m *AccountMutation) Platform() (r account.Platform, exists bool)
Platform returns the value of the "platform" field in the mutation.
func (*AccountMutation) PlatformAccountID ¶ added in v0.0.2
func (m *AccountMutation) PlatformAccountID() (r string, exists bool)
PlatformAccountID returns the value of the "platform_account_id" field in the mutation.
func (*AccountMutation) ProfileURL ¶ added in v0.0.2
func (m *AccountMutation) ProfileURL() (r string, exists bool)
ProfileURL returns the value of the "profile_url" field in the mutation.
func (*AccountMutation) RemovedEdges ¶ added in v0.0.2
func (m *AccountMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AccountMutation) RemovedIDs ¶ added in v0.0.2
func (m *AccountMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*AccountMutation) ResetAvatarURL ¶ added in v0.0.2
func (m *AccountMutation) ResetAvatarURL()
ResetAvatarURL resets all changes to the "avatar_url" field.
func (*AccountMutation) ResetCreatedAt ¶ added in v0.0.2
func (m *AccountMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AccountMutation) ResetEdge ¶ added in v0.0.2
func (m *AccountMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*AccountMutation) ResetField ¶ added in v0.0.2
func (m *AccountMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*AccountMutation) ResetInternalID ¶ added in v0.0.2
func (m *AccountMutation) ResetInternalID()
ResetInternalID resets all changes to the "internal_id" field.
func (*AccountMutation) ResetName ¶ added in v0.0.2
func (m *AccountMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*AccountMutation) ResetPlatform ¶ added in v0.0.2
func (m *AccountMutation) ResetPlatform()
ResetPlatform resets all changes to the "platform" field.
func (*AccountMutation) ResetPlatformAccountID ¶ added in v0.0.2
func (m *AccountMutation) ResetPlatformAccountID()
ResetPlatformAccountID resets all changes to the "platform_account_id" field.
func (*AccountMutation) ResetProfileURL ¶ added in v0.0.2
func (m *AccountMutation) ResetProfileURL()
ResetProfileURL resets all changes to the "profile_url" field.
func (*AccountMutation) SetAvatarURL ¶ added in v0.0.2
func (m *AccountMutation) SetAvatarURL(s string)
SetAvatarURL sets the "avatar_url" field.
func (*AccountMutation) SetCreatedAt ¶ added in v0.0.2
func (m *AccountMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AccountMutation) SetField ¶ added in v0.0.2
func (m *AccountMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AccountMutation) SetInternalID ¶ added in v0.0.2
func (m *AccountMutation) SetInternalID(i int64)
SetInternalID sets the "internal_id" field.
func (*AccountMutation) SetName ¶ added in v0.0.2
func (m *AccountMutation) SetName(s string)
SetName sets the "name" field.
func (*AccountMutation) SetOp ¶ added in v0.0.4
func (m *AccountMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AccountMutation) SetPlatform ¶ added in v0.0.2
func (m *AccountMutation) SetPlatform(a account.Platform)
SetPlatform sets the "platform" field.
func (*AccountMutation) SetPlatformAccountID ¶ added in v0.0.2
func (m *AccountMutation) SetPlatformAccountID(s string)
SetPlatformAccountID sets the "platform_account_id" field.
func (*AccountMutation) SetProfileURL ¶ added in v0.0.2
func (m *AccountMutation) SetProfileURL(s string)
SetProfileURL sets the "profile_url" field.
func (AccountMutation) Tx ¶ added in v0.0.2
func (m AccountMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AccountMutation) Type ¶ added in v0.0.2
func (m *AccountMutation) Type() string
Type returns the node type of this mutation (Account).
func (*AccountMutation) Where ¶ added in v0.0.2
func (m *AccountMutation) Where(ps ...predicate.Account)
Where appends a list predicates to the AccountMutation builder.
func (*AccountMutation) WhereP ¶ added in v0.0.4
func (m *AccountMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AccountMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AccountQuery ¶ added in v0.0.2
type AccountQuery struct {
// contains filtered or unexported fields
}
AccountQuery is the builder for querying Account entities.
func (*AccountQuery) Aggregate ¶ added in v0.0.3
func (aq *AccountQuery) Aggregate(fns ...AggregateFunc) *AccountSelect
Aggregate returns a AccountSelect configured with the given aggregations.
func (*AccountQuery) All ¶ added in v0.0.2
func (aq *AccountQuery) All(ctx context.Context) ([]*Account, error)
All executes the query and returns a list of Accounts.
func (*AccountQuery) AllX ¶ added in v0.0.2
func (aq *AccountQuery) AllX(ctx context.Context) []*Account
AllX is like All, but panics if an error occurs.
func (*AccountQuery) Clone ¶ added in v0.0.2
func (aq *AccountQuery) Clone() *AccountQuery
Clone returns a duplicate of the AccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AccountQuery) Count ¶ added in v0.0.2
func (aq *AccountQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AccountQuery) CountX ¶ added in v0.0.2
func (aq *AccountQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AccountQuery) Exist ¶ added in v0.0.2
func (aq *AccountQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AccountQuery) ExistX ¶ added in v0.0.2
func (aq *AccountQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AccountQuery) First ¶ added in v0.0.2
func (aq *AccountQuery) First(ctx context.Context) (*Account, error)
First returns the first Account entity from the query. Returns a *NotFoundError when no Account was found.
func (*AccountQuery) FirstID ¶ added in v0.0.2
func (aq *AccountQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Account ID from the query. Returns a *NotFoundError when no Account ID was found.
func (*AccountQuery) FirstIDX ¶ added in v0.0.2
func (aq *AccountQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AccountQuery) FirstX ¶ added in v0.0.2
func (aq *AccountQuery) FirstX(ctx context.Context) *Account
FirstX is like First, but panics if an error occurs.
func (*AccountQuery) GroupBy ¶ added in v0.0.2
func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { InternalID int64 `json:"internal_id,omitempty"` Count int `json:"count,omitempty"` } client.Account.Query(). GroupBy(account.FieldInternalID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AccountQuery) IDs ¶ added in v0.0.2
func (aq *AccountQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Account IDs.
func (*AccountQuery) IDsX ¶ added in v0.0.2
func (aq *AccountQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AccountQuery) Limit ¶ added in v0.0.2
func (aq *AccountQuery) Limit(limit int) *AccountQuery
Limit the number of records to be returned by this query.
func (*AccountQuery) Offset ¶ added in v0.0.2
func (aq *AccountQuery) Offset(offset int) *AccountQuery
Offset to start from.
func (*AccountQuery) Only ¶ added in v0.0.2
func (aq *AccountQuery) Only(ctx context.Context) (*Account, error)
Only returns a single Account entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Account entity is found. Returns a *NotFoundError when no Account entities are found.
func (*AccountQuery) OnlyID ¶ added in v0.0.2
func (aq *AccountQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Account ID in the query. Returns a *NotSingularError when more than one Account ID is found. Returns a *NotFoundError when no entities are found.
func (*AccountQuery) OnlyIDX ¶ added in v0.0.2
func (aq *AccountQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AccountQuery) OnlyX ¶ added in v0.0.2
func (aq *AccountQuery) OnlyX(ctx context.Context) *Account
OnlyX is like Only, but panics if an error occurs.
func (*AccountQuery) Order ¶ added in v0.0.2
func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery
Order specifies how the records should be ordered.
func (*AccountQuery) Select ¶ added in v0.0.2
func (aq *AccountQuery) Select(fields ...string) *AccountSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { InternalID int64 `json:"internal_id,omitempty"` } client.Account.Query(). Select(account.FieldInternalID). Scan(ctx, &v)
func (*AccountQuery) Unique ¶ added in v0.0.2
func (aq *AccountQuery) Unique(unique bool) *AccountQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*AccountQuery) Where ¶ added in v0.0.2
func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery
Where adds a new predicate for the AccountQuery builder.
type AccountSelect ¶ added in v0.0.2
type AccountSelect struct { *AccountQuery // contains filtered or unexported fields }
AccountSelect is the builder for selecting fields of Account entities.
func (*AccountSelect) Aggregate ¶ added in v0.0.3
func (as *AccountSelect) Aggregate(fns ...AggregateFunc) *AccountSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AccountSelect) Bool ¶ added in v0.0.2
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Bools ¶ added in v0.0.2
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Float64 ¶ added in v0.0.2
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Float64X ¶ added in v0.0.2
Float64X is like Float64, but panics if an error occurs.
func (*AccountSelect) Float64s ¶ added in v0.0.2
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Float64sX ¶ added in v0.0.2
Float64sX is like Float64s, but panics if an error occurs.
func (*AccountSelect) Int ¶ added in v0.0.2
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Ints ¶ added in v0.0.2
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountSelect) Scan ¶ added in v0.0.2
func (as *AccountSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccountSelect) String ¶ added in v0.0.2
String returns a single string from a selector. It is only allowed when selecting one field.
func (*AccountSelect) StringX ¶ added in v0.0.2
StringX is like String, but panics if an error occurs.
type AccountUpdate ¶ added in v0.0.2
type AccountUpdate struct {
// contains filtered or unexported fields
}
AccountUpdate is the builder for updating Account entities.
func (*AccountUpdate) AddInternalID ¶ added in v0.0.2
func (au *AccountUpdate) AddInternalID(i int64) *AccountUpdate
AddInternalID adds i to the "internal_id" field.
func (*AccountUpdate) Exec ¶ added in v0.0.2
func (au *AccountUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUpdate) ExecX ¶ added in v0.0.2
func (au *AccountUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpdate) Mutation ¶ added in v0.0.2
func (au *AccountUpdate) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountUpdate) Save ¶ added in v0.0.2
func (au *AccountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AccountUpdate) SaveX ¶ added in v0.0.2
func (au *AccountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdate) SetAvatarURL ¶ added in v0.0.2
func (au *AccountUpdate) SetAvatarURL(s string) *AccountUpdate
SetAvatarURL sets the "avatar_url" field.
func (*AccountUpdate) SetCreatedAt ¶ added in v0.0.2
func (au *AccountUpdate) SetCreatedAt(t time.Time) *AccountUpdate
SetCreatedAt sets the "created_at" field.
func (*AccountUpdate) SetInternalID ¶ added in v0.0.2
func (au *AccountUpdate) SetInternalID(i int64) *AccountUpdate
SetInternalID sets the "internal_id" field.
func (*AccountUpdate) SetName ¶ added in v0.0.2
func (au *AccountUpdate) SetName(s string) *AccountUpdate
SetName sets the "name" field.
func (*AccountUpdate) SetNillableCreatedAt ¶ added in v0.0.2
func (au *AccountUpdate) SetNillableCreatedAt(t *time.Time) *AccountUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccountUpdate) SetPlatform ¶ added in v0.0.2
func (au *AccountUpdate) SetPlatform(a account.Platform) *AccountUpdate
SetPlatform sets the "platform" field.
func (*AccountUpdate) SetPlatformAccountID ¶ added in v0.0.2
func (au *AccountUpdate) SetPlatformAccountID(s string) *AccountUpdate
SetPlatformAccountID sets the "platform_account_id" field.
func (*AccountUpdate) SetProfileURL ¶ added in v0.0.2
func (au *AccountUpdate) SetProfileURL(s string) *AccountUpdate
SetProfileURL sets the "profile_url" field.
func (*AccountUpdate) Where ¶ added in v0.0.2
func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate
Where appends a list predicates to the AccountUpdate builder.
type AccountUpdateOne ¶ added in v0.0.2
type AccountUpdateOne struct {
// contains filtered or unexported fields
}
AccountUpdateOne is the builder for updating a single Account entity.
func (*AccountUpdateOne) AddInternalID ¶ added in v0.0.2
func (auo *AccountUpdateOne) AddInternalID(i int64) *AccountUpdateOne
AddInternalID adds i to the "internal_id" field.
func (*AccountUpdateOne) Exec ¶ added in v0.0.2
func (auo *AccountUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AccountUpdateOne) ExecX ¶ added in v0.0.2
func (auo *AccountUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpdateOne) Mutation ¶ added in v0.0.2
func (auo *AccountUpdateOne) Mutation() *AccountMutation
Mutation returns the AccountMutation object of the builder.
func (*AccountUpdateOne) Save ¶ added in v0.0.2
func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)
Save executes the query and returns the updated Account entity.
func (*AccountUpdateOne) SaveX ¶ added in v0.0.2
func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account
SaveX is like Save, but panics if an error occurs.
func (*AccountUpdateOne) Select ¶ added in v0.0.2
func (auo *AccountUpdateOne) Select(field string, fields ...string) *AccountUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AccountUpdateOne) SetAvatarURL ¶ added in v0.0.2
func (auo *AccountUpdateOne) SetAvatarURL(s string) *AccountUpdateOne
SetAvatarURL sets the "avatar_url" field.
func (*AccountUpdateOne) SetCreatedAt ¶ added in v0.0.2
func (auo *AccountUpdateOne) SetCreatedAt(t time.Time) *AccountUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AccountUpdateOne) SetInternalID ¶ added in v0.0.2
func (auo *AccountUpdateOne) SetInternalID(i int64) *AccountUpdateOne
SetInternalID sets the "internal_id" field.
func (*AccountUpdateOne) SetName ¶ added in v0.0.2
func (auo *AccountUpdateOne) SetName(s string) *AccountUpdateOne
SetName sets the "name" field.
func (*AccountUpdateOne) SetNillableCreatedAt ¶ added in v0.0.2
func (auo *AccountUpdateOne) SetNillableCreatedAt(t *time.Time) *AccountUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccountUpdateOne) SetPlatform ¶ added in v0.0.2
func (auo *AccountUpdateOne) SetPlatform(a account.Platform) *AccountUpdateOne
SetPlatform sets the "platform" field.
func (*AccountUpdateOne) SetPlatformAccountID ¶ added in v0.0.2
func (auo *AccountUpdateOne) SetPlatformAccountID(s string) *AccountUpdateOne
SetPlatformAccountID sets the "platform_account_id" field.
func (*AccountUpdateOne) SetProfileURL ¶ added in v0.0.2
func (auo *AccountUpdateOne) SetProfileURL(s string) *AccountUpdateOne
SetProfileURL sets the "profile_url" field.
type AccountUpsert ¶ added in v0.0.2
AccountUpsert is the "OnConflict" setter.
func (*AccountUpsert) AddInternalID ¶ added in v0.0.2
func (u *AccountUpsert) AddInternalID(v int64) *AccountUpsert
AddInternalID adds v to the "internal_id" field.
func (*AccountUpsert) SetAvatarURL ¶ added in v0.0.2
func (u *AccountUpsert) SetAvatarURL(v string) *AccountUpsert
SetAvatarURL sets the "avatar_url" field.
func (*AccountUpsert) SetCreatedAt ¶ added in v0.0.2
func (u *AccountUpsert) SetCreatedAt(v time.Time) *AccountUpsert
SetCreatedAt sets the "created_at" field.
func (*AccountUpsert) SetInternalID ¶ added in v0.0.2
func (u *AccountUpsert) SetInternalID(v int64) *AccountUpsert
SetInternalID sets the "internal_id" field.
func (*AccountUpsert) SetName ¶ added in v0.0.2
func (u *AccountUpsert) SetName(v string) *AccountUpsert
SetName sets the "name" field.
func (*AccountUpsert) SetPlatform ¶ added in v0.0.2
func (u *AccountUpsert) SetPlatform(v account.Platform) *AccountUpsert
SetPlatform sets the "platform" field.
func (*AccountUpsert) SetPlatformAccountID ¶ added in v0.0.2
func (u *AccountUpsert) SetPlatformAccountID(v string) *AccountUpsert
SetPlatformAccountID sets the "platform_account_id" field.
func (*AccountUpsert) SetProfileURL ¶ added in v0.0.2
func (u *AccountUpsert) SetProfileURL(v string) *AccountUpsert
SetProfileURL sets the "profile_url" field.
func (*AccountUpsert) UpdateAvatarURL ¶ added in v0.0.2
func (u *AccountUpsert) UpdateAvatarURL() *AccountUpsert
UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.
func (*AccountUpsert) UpdateCreatedAt ¶ added in v0.0.2
func (u *AccountUpsert) UpdateCreatedAt() *AccountUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AccountUpsert) UpdateInternalID ¶ added in v0.0.2
func (u *AccountUpsert) UpdateInternalID() *AccountUpsert
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*AccountUpsert) UpdateName ¶ added in v0.0.2
func (u *AccountUpsert) UpdateName() *AccountUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*AccountUpsert) UpdatePlatform ¶ added in v0.0.2
func (u *AccountUpsert) UpdatePlatform() *AccountUpsert
UpdatePlatform sets the "platform" field to the value that was provided on create.
func (*AccountUpsert) UpdatePlatformAccountID ¶ added in v0.0.2
func (u *AccountUpsert) UpdatePlatformAccountID() *AccountUpsert
UpdatePlatformAccountID sets the "platform_account_id" field to the value that was provided on create.
func (*AccountUpsert) UpdateProfileURL ¶ added in v0.0.2
func (u *AccountUpsert) UpdateProfileURL() *AccountUpsert
UpdateProfileURL sets the "profile_url" field to the value that was provided on create.
type AccountUpsertBulk ¶ added in v0.0.2
type AccountUpsertBulk struct {
// contains filtered or unexported fields
}
AccountUpsertBulk is the builder for "upsert"-ing a bulk of Account nodes.
func (*AccountUpsertBulk) AddInternalID ¶ added in v0.0.2
func (u *AccountUpsertBulk) AddInternalID(v int64) *AccountUpsertBulk
AddInternalID adds v to the "internal_id" field.
func (*AccountUpsertBulk) DoNothing ¶ added in v0.0.2
func (u *AccountUpsertBulk) DoNothing() *AccountUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AccountUpsertBulk) Exec ¶ added in v0.0.2
func (u *AccountUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUpsertBulk) ExecX ¶ added in v0.0.2
func (u *AccountUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpsertBulk) Ignore ¶ added in v0.0.2
func (u *AccountUpsertBulk) Ignore() *AccountUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Account.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AccountUpsertBulk) SetAvatarURL ¶ added in v0.0.2
func (u *AccountUpsertBulk) SetAvatarURL(v string) *AccountUpsertBulk
SetAvatarURL sets the "avatar_url" field.
func (*AccountUpsertBulk) SetCreatedAt ¶ added in v0.0.2
func (u *AccountUpsertBulk) SetCreatedAt(v time.Time) *AccountUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*AccountUpsertBulk) SetInternalID ¶ added in v0.0.2
func (u *AccountUpsertBulk) SetInternalID(v int64) *AccountUpsertBulk
SetInternalID sets the "internal_id" field.
func (*AccountUpsertBulk) SetName ¶ added in v0.0.2
func (u *AccountUpsertBulk) SetName(v string) *AccountUpsertBulk
SetName sets the "name" field.
func (*AccountUpsertBulk) SetPlatform ¶ added in v0.0.2
func (u *AccountUpsertBulk) SetPlatform(v account.Platform) *AccountUpsertBulk
SetPlatform sets the "platform" field.
func (*AccountUpsertBulk) SetPlatformAccountID ¶ added in v0.0.2
func (u *AccountUpsertBulk) SetPlatformAccountID(v string) *AccountUpsertBulk
SetPlatformAccountID sets the "platform_account_id" field.
func (*AccountUpsertBulk) SetProfileURL ¶ added in v0.0.2
func (u *AccountUpsertBulk) SetProfileURL(v string) *AccountUpsertBulk
SetProfileURL sets the "profile_url" field.
func (*AccountUpsertBulk) Update ¶ added in v0.0.2
func (u *AccountUpsertBulk) Update(set func(*AccountUpsert)) *AccountUpsertBulk
Update allows overriding fields `UPDATE` values. See the AccountCreateBulk.OnConflict documentation for more info.
func (*AccountUpsertBulk) UpdateAvatarURL ¶ added in v0.0.2
func (u *AccountUpsertBulk) UpdateAvatarURL() *AccountUpsertBulk
UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateCreatedAt ¶ added in v0.0.2
func (u *AccountUpsertBulk) UpdateCreatedAt() *AccountUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateInternalID ¶ added in v0.0.2
func (u *AccountUpsertBulk) UpdateInternalID() *AccountUpsertBulk
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateName ¶ added in v0.0.2
func (u *AccountUpsertBulk) UpdateName() *AccountUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateNewValues ¶ added in v0.0.2
func (u *AccountUpsertBulk) UpdateNewValues() *AccountUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Account.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AccountUpsertBulk) UpdatePlatform ¶ added in v0.0.2
func (u *AccountUpsertBulk) UpdatePlatform() *AccountUpsertBulk
UpdatePlatform sets the "platform" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdatePlatformAccountID ¶ added in v0.0.2
func (u *AccountUpsertBulk) UpdatePlatformAccountID() *AccountUpsertBulk
UpdatePlatformAccountID sets the "platform_account_id" field to the value that was provided on create.
func (*AccountUpsertBulk) UpdateProfileURL ¶ added in v0.0.2
func (u *AccountUpsertBulk) UpdateProfileURL() *AccountUpsertBulk
UpdateProfileURL sets the "profile_url" field to the value that was provided on create.
type AccountUpsertOne ¶ added in v0.0.2
type AccountUpsertOne struct {
// contains filtered or unexported fields
}
AccountUpsertOne is the builder for "upsert"-ing
one Account node.
func (*AccountUpsertOne) AddInternalID ¶ added in v0.0.2
func (u *AccountUpsertOne) AddInternalID(v int64) *AccountUpsertOne
AddInternalID adds v to the "internal_id" field.
func (*AccountUpsertOne) DoNothing ¶ added in v0.0.2
func (u *AccountUpsertOne) DoNothing() *AccountUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AccountUpsertOne) Exec ¶ added in v0.0.2
func (u *AccountUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUpsertOne) ExecX ¶ added in v0.0.2
func (u *AccountUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUpsertOne) ID ¶ added in v0.0.2
func (u *AccountUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*AccountUpsertOne) IDX ¶ added in v0.0.2
func (u *AccountUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*AccountUpsertOne) Ignore ¶ added in v0.0.2
func (u *AccountUpsertOne) Ignore() *AccountUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Account.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AccountUpsertOne) SetAvatarURL ¶ added in v0.0.2
func (u *AccountUpsertOne) SetAvatarURL(v string) *AccountUpsertOne
SetAvatarURL sets the "avatar_url" field.
func (*AccountUpsertOne) SetCreatedAt ¶ added in v0.0.2
func (u *AccountUpsertOne) SetCreatedAt(v time.Time) *AccountUpsertOne
SetCreatedAt sets the "created_at" field.
func (*AccountUpsertOne) SetInternalID ¶ added in v0.0.2
func (u *AccountUpsertOne) SetInternalID(v int64) *AccountUpsertOne
SetInternalID sets the "internal_id" field.
func (*AccountUpsertOne) SetName ¶ added in v0.0.2
func (u *AccountUpsertOne) SetName(v string) *AccountUpsertOne
SetName sets the "name" field.
func (*AccountUpsertOne) SetPlatform ¶ added in v0.0.2
func (u *AccountUpsertOne) SetPlatform(v account.Platform) *AccountUpsertOne
SetPlatform sets the "platform" field.
func (*AccountUpsertOne) SetPlatformAccountID ¶ added in v0.0.2
func (u *AccountUpsertOne) SetPlatformAccountID(v string) *AccountUpsertOne
SetPlatformAccountID sets the "platform_account_id" field.
func (*AccountUpsertOne) SetProfileURL ¶ added in v0.0.2
func (u *AccountUpsertOne) SetProfileURL(v string) *AccountUpsertOne
SetProfileURL sets the "profile_url" field.
func (*AccountUpsertOne) Update ¶ added in v0.0.2
func (u *AccountUpsertOne) Update(set func(*AccountUpsert)) *AccountUpsertOne
Update allows overriding fields `UPDATE` values. See the AccountCreate.OnConflict documentation for more info.
func (*AccountUpsertOne) UpdateAvatarURL ¶ added in v0.0.2
func (u *AccountUpsertOne) UpdateAvatarURL() *AccountUpsertOne
UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateCreatedAt ¶ added in v0.0.2
func (u *AccountUpsertOne) UpdateCreatedAt() *AccountUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateInternalID ¶ added in v0.0.2
func (u *AccountUpsertOne) UpdateInternalID() *AccountUpsertOne
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateName ¶ added in v0.0.2
func (u *AccountUpsertOne) UpdateName() *AccountUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateNewValues ¶ added in v0.0.2
func (u *AccountUpsertOne) UpdateNewValues() *AccountUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Account.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AccountUpsertOne) UpdatePlatform ¶ added in v0.0.2
func (u *AccountUpsertOne) UpdatePlatform() *AccountUpsertOne
UpdatePlatform sets the "platform" field to the value that was provided on create.
func (*AccountUpsertOne) UpdatePlatformAccountID ¶ added in v0.0.2
func (u *AccountUpsertOne) UpdatePlatformAccountID() *AccountUpsertOne
UpdatePlatformAccountID sets the "platform_account_id" field to the value that was provided on create.
func (*AccountUpsertOne) UpdateProfileURL ¶ added in v0.0.2
func (u *AccountUpsertOne) UpdateProfileURL() *AccountUpsertOne
UpdateProfileURL sets the "profile_url" field to the value that was provided on create.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(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 App ¶
type App struct { // ID of the ent. ID int `json:"id,omitempty"` // InternalID holds the value of the "internal_id" field. InternalID int64 `json:"internal_id,omitempty"` // Source holds the value of the "source" field. Source app.Source `json:"source,omitempty"` // SourceAppID holds the value of the "source_app_id" field. SourceAppID string `json:"source_app_id,omitempty"` // SourceURL holds the value of the "source_url" field. SourceURL string `json:"source_url,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Type holds the value of the "type" field. Type app.Type `json:"type,omitempty"` // ShortDescription holds the value of the "short_description" field. ShortDescription string `json:"short_description,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // ImageURL holds the value of the "image_url" field. ImageURL string `json:"image_url,omitempty"` // ReleaseDate holds the value of the "release_date" field. ReleaseDate string `json:"release_date,omitempty"` // Developer holds the value of the "developer" field. Developer string `json:"developer,omitempty"` // Publisher holds the value of the "publisher" field. Publisher string `json:"publisher,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
App is the model entity for the App schema.
func (*App) Unwrap ¶
Unwrap unwraps the App 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 (*App) Update ¶
func (a *App) Update() *AppUpdateOne
Update returns a builder for updating this App. Note that you need to call App.Unwrap() before calling this method if this App was returned from a transaction, and the transaction was committed or rolled back.
type AppClient ¶
type AppClient struct {
// contains filtered or unexported fields
}
AppClient is a client for the App schema.
func NewAppClient ¶
func NewAppClient(c config) *AppClient
NewAppClient returns a client for the App from the given config.
func (*AppClient) CreateBulk ¶
func (c *AppClient) CreateBulk(builders ...*AppCreate) *AppCreateBulk
CreateBulk returns a builder for creating a bulk of App entities.
func (*AppClient) DeleteOne ¶
func (c *AppClient) DeleteOne(a *App) *AppDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AppClient) DeleteOneID ¶
func (c *AppClient) DeleteOneID(id int) *AppDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AppClient) Intercept ¶ added in v0.0.4
func (c *AppClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `app.Intercept(f(g(h())))`.
func (*AppClient) Interceptors ¶ added in v0.0.4
func (c *AppClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AppClient) UpdateOne ¶
func (c *AppClient) UpdateOne(a *App) *AppUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AppClient) UpdateOneID ¶
func (c *AppClient) UpdateOneID(id int) *AppUpdateOne
UpdateOneID returns an update builder for the given id.
type AppCreate ¶
type AppCreate struct {
// contains filtered or unexported fields
}
AppCreate is the builder for creating a App entity.
func (*AppCreate) Mutation ¶
func (ac *AppCreate) Mutation() *AppMutation
Mutation returns the AppMutation object of the builder.
func (*AppCreate) OnConflict ¶ added in v0.0.2
func (ac *AppCreate) OnConflict(opts ...sql.ConflictOption) *AppUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.App.Create(). SetInternalID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AppUpsert) { SetInternalID(v+v). }). Exec(ctx)
func (*AppCreate) OnConflictColumns ¶ added in v0.0.2
func (ac *AppCreate) OnConflictColumns(columns ...string) *AppUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.App.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AppCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*AppCreate) SetDescription ¶
SetDescription sets the "description" field.
func (*AppCreate) SetDeveloper ¶
SetDeveloper sets the "developer" field.
func (*AppCreate) SetImageURL ¶
SetImageURL sets the "image_url" field.
func (*AppCreate) SetInternalID ¶
SetInternalID sets the "internal_id" field.
func (*AppCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AppCreate) SetPublisher ¶
SetPublisher sets the "publisher" field.
func (*AppCreate) SetReleaseDate ¶
SetReleaseDate sets the "release_date" field.
func (*AppCreate) SetShortDescription ¶
SetShortDescription sets the "short_description" field.
func (*AppCreate) SetSourceAppID ¶
SetSourceAppID sets the "source_app_id" field.
func (*AppCreate) SetSourceURL ¶
SetSourceURL sets the "source_url" field.
type AppCreateBulk ¶
type AppCreateBulk struct {
// contains filtered or unexported fields
}
AppCreateBulk is the builder for creating many App entities in bulk.
func (*AppCreateBulk) Exec ¶
func (acb *AppCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AppCreateBulk) ExecX ¶
func (acb *AppCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppCreateBulk) OnConflict ¶ added in v0.0.2
func (acb *AppCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.App.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AppUpsert) { SetInternalID(v+v). }). Exec(ctx)
func (*AppCreateBulk) OnConflictColumns ¶ added in v0.0.2
func (acb *AppCreateBulk) OnConflictColumns(columns ...string) *AppUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.App.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type AppDelete ¶
type AppDelete struct {
// contains filtered or unexported fields
}
AppDelete is the builder for deleting a App entity.
func (*AppDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type AppDeleteOne ¶
type AppDeleteOne struct {
// contains filtered or unexported fields
}
AppDeleteOne is the builder for deleting a single App entity.
func (*AppDeleteOne) Exec ¶
func (ado *AppDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AppDeleteOne) ExecX ¶
func (ado *AppDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppDeleteOne) Where ¶ added in v0.0.4
func (ado *AppDeleteOne) Where(ps ...predicate.App) *AppDeleteOne
Where appends a list predicates to the AppDelete builder.
type AppGroupBy ¶
type AppGroupBy struct {
// contains filtered or unexported fields
}
AppGroupBy is the group-by builder for App entities.
func (*AppGroupBy) Aggregate ¶
func (agb *AppGroupBy) Aggregate(fns ...AggregateFunc) *AppGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AppGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AppGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AppGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AppGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AppGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AppGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AppGroupBy) Scan ¶
func (agb *AppGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AppGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AppMutation ¶
type AppMutation struct {
// contains filtered or unexported fields
}
AppMutation represents an operation that mutates the App nodes in the graph.
func (*AppMutation) AddField ¶
func (m *AppMutation) 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 (*AppMutation) AddInternalID ¶
func (m *AppMutation) AddInternalID(i int64)
AddInternalID adds i to the "internal_id" field.
func (*AppMutation) AddedEdges ¶
func (m *AppMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AppMutation) AddedField ¶
func (m *AppMutation) 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 (*AppMutation) AddedFields ¶
func (m *AppMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AppMutation) AddedIDs ¶
func (m *AppMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AppMutation) AddedInternalID ¶
func (m *AppMutation) AddedInternalID() (r int64, exists bool)
AddedInternalID returns the value that was added to the "internal_id" field in this mutation.
func (*AppMutation) ClearEdge ¶
func (m *AppMutation) 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 (*AppMutation) ClearField ¶
func (m *AppMutation) 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 (*AppMutation) ClearedEdges ¶
func (m *AppMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AppMutation) ClearedFields ¶
func (m *AppMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AppMutation) Client ¶
func (m AppMutation) 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 (*AppMutation) CreatedAt ¶
func (m *AppMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AppMutation) Description ¶
func (m *AppMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*AppMutation) Developer ¶
func (m *AppMutation) Developer() (r string, exists bool)
Developer returns the value of the "developer" field in the mutation.
func (*AppMutation) EdgeCleared ¶
func (m *AppMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AppMutation) Field ¶
func (m *AppMutation) 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 (*AppMutation) FieldCleared ¶
func (m *AppMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AppMutation) Fields ¶
func (m *AppMutation) 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 (*AppMutation) GetType ¶
func (m *AppMutation) GetType() (r app.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*AppMutation) ID ¶
func (m *AppMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AppMutation) IDs ¶
func (m *AppMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AppMutation) ImageURL ¶
func (m *AppMutation) ImageURL() (r string, exists bool)
ImageURL returns the value of the "image_url" field in the mutation.
func (*AppMutation) InternalID ¶
func (m *AppMutation) InternalID() (r int64, exists bool)
InternalID returns the value of the "internal_id" field in the mutation.
func (*AppMutation) Name ¶
func (m *AppMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*AppMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the App entity. If the App 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 (*AppMutation) OldDescription ¶
func (m *AppMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the App entity. If the App 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 (*AppMutation) OldDeveloper ¶
func (m *AppMutation) OldDeveloper(ctx context.Context) (v string, err error)
OldDeveloper returns the old "developer" field's value of the App entity. If the App 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 (*AppMutation) 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 (*AppMutation) OldImageURL ¶
func (m *AppMutation) OldImageURL(ctx context.Context) (v string, err error)
OldImageURL returns the old "image_url" field's value of the App entity. If the App 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 (*AppMutation) OldInternalID ¶
func (m *AppMutation) OldInternalID(ctx context.Context) (v int64, err error)
OldInternalID returns the old "internal_id" field's value of the App entity. If the App 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 (*AppMutation) OldName ¶
func (m *AppMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the App entity. If the App 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 (*AppMutation) OldPublisher ¶
func (m *AppMutation) OldPublisher(ctx context.Context) (v string, err error)
OldPublisher returns the old "publisher" field's value of the App entity. If the App 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 (*AppMutation) OldReleaseDate ¶
func (m *AppMutation) OldReleaseDate(ctx context.Context) (v string, err error)
OldReleaseDate returns the old "release_date" field's value of the App entity. If the App 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 (*AppMutation) OldShortDescription ¶
func (m *AppMutation) OldShortDescription(ctx context.Context) (v string, err error)
OldShortDescription returns the old "short_description" field's value of the App entity. If the App 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 (*AppMutation) OldSource ¶
OldSource returns the old "source" field's value of the App entity. If the App 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 (*AppMutation) OldSourceAppID ¶
func (m *AppMutation) OldSourceAppID(ctx context.Context) (v string, err error)
OldSourceAppID returns the old "source_app_id" field's value of the App entity. If the App 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 (*AppMutation) OldSourceURL ¶
func (m *AppMutation) OldSourceURL(ctx context.Context) (v string, err error)
OldSourceURL returns the old "source_url" field's value of the App entity. If the App 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 (*AppMutation) OldType ¶
OldType returns the old "type" field's value of the App entity. If the App 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 (*AppMutation) Publisher ¶
func (m *AppMutation) Publisher() (r string, exists bool)
Publisher returns the value of the "publisher" field in the mutation.
func (*AppMutation) ReleaseDate ¶
func (m *AppMutation) ReleaseDate() (r string, exists bool)
ReleaseDate returns the value of the "release_date" field in the mutation.
func (*AppMutation) RemovedEdges ¶
func (m *AppMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AppMutation) RemovedIDs ¶
func (m *AppMutation) 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 (*AppMutation) ResetCreatedAt ¶
func (m *AppMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AppMutation) ResetDescription ¶
func (m *AppMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*AppMutation) ResetDeveloper ¶
func (m *AppMutation) ResetDeveloper()
ResetDeveloper resets all changes to the "developer" field.
func (*AppMutation) ResetEdge ¶
func (m *AppMutation) 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 (*AppMutation) ResetField ¶
func (m *AppMutation) 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 (*AppMutation) ResetImageURL ¶
func (m *AppMutation) ResetImageURL()
ResetImageURL resets all changes to the "image_url" field.
func (*AppMutation) ResetInternalID ¶
func (m *AppMutation) ResetInternalID()
ResetInternalID resets all changes to the "internal_id" field.
func (*AppMutation) ResetName ¶
func (m *AppMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*AppMutation) ResetPublisher ¶
func (m *AppMutation) ResetPublisher()
ResetPublisher resets all changes to the "publisher" field.
func (*AppMutation) ResetReleaseDate ¶
func (m *AppMutation) ResetReleaseDate()
ResetReleaseDate resets all changes to the "release_date" field.
func (*AppMutation) ResetShortDescription ¶
func (m *AppMutation) ResetShortDescription()
ResetShortDescription resets all changes to the "short_description" field.
func (*AppMutation) ResetSource ¶
func (m *AppMutation) ResetSource()
ResetSource resets all changes to the "source" field.
func (*AppMutation) ResetSourceAppID ¶
func (m *AppMutation) ResetSourceAppID()
ResetSourceAppID resets all changes to the "source_app_id" field.
func (*AppMutation) ResetSourceURL ¶
func (m *AppMutation) ResetSourceURL()
ResetSourceURL resets all changes to the "source_url" field.
func (*AppMutation) ResetType ¶
func (m *AppMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*AppMutation) SetCreatedAt ¶
func (m *AppMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AppMutation) SetDescription ¶
func (m *AppMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*AppMutation) SetDeveloper ¶
func (m *AppMutation) SetDeveloper(s string)
SetDeveloper sets the "developer" field.
func (*AppMutation) SetField ¶
func (m *AppMutation) 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 (*AppMutation) SetImageURL ¶
func (m *AppMutation) SetImageURL(s string)
SetImageURL sets the "image_url" field.
func (*AppMutation) SetInternalID ¶
func (m *AppMutation) SetInternalID(i int64)
SetInternalID sets the "internal_id" field.
func (*AppMutation) SetName ¶
func (m *AppMutation) SetName(s string)
SetName sets the "name" field.
func (*AppMutation) SetOp ¶ added in v0.0.4
func (m *AppMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AppMutation) SetPublisher ¶
func (m *AppMutation) SetPublisher(s string)
SetPublisher sets the "publisher" field.
func (*AppMutation) SetReleaseDate ¶
func (m *AppMutation) SetReleaseDate(s string)
SetReleaseDate sets the "release_date" field.
func (*AppMutation) SetShortDescription ¶
func (m *AppMutation) SetShortDescription(s string)
SetShortDescription sets the "short_description" field.
func (*AppMutation) SetSource ¶
func (m *AppMutation) SetSource(a app.Source)
SetSource sets the "source" field.
func (*AppMutation) SetSourceAppID ¶
func (m *AppMutation) SetSourceAppID(s string)
SetSourceAppID sets the "source_app_id" field.
func (*AppMutation) SetSourceURL ¶
func (m *AppMutation) SetSourceURL(s string)
SetSourceURL sets the "source_url" field.
func (*AppMutation) SetType ¶
func (m *AppMutation) SetType(a app.Type)
SetType sets the "type" field.
func (*AppMutation) ShortDescription ¶
func (m *AppMutation) ShortDescription() (r string, exists bool)
ShortDescription returns the value of the "short_description" field in the mutation.
func (*AppMutation) Source ¶
func (m *AppMutation) Source() (r app.Source, exists bool)
Source returns the value of the "source" field in the mutation.
func (*AppMutation) SourceAppID ¶
func (m *AppMutation) SourceAppID() (r string, exists bool)
SourceAppID returns the value of the "source_app_id" field in the mutation.
func (*AppMutation) SourceURL ¶
func (m *AppMutation) SourceURL() (r string, exists bool)
SourceURL returns the value of the "source_url" field in the mutation.
func (AppMutation) Tx ¶
func (m AppMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AppMutation) Type ¶
func (m *AppMutation) Type() string
Type returns the node type of this mutation (App).
func (*AppMutation) Where ¶
func (m *AppMutation) Where(ps ...predicate.App)
Where appends a list predicates to the AppMutation builder.
func (*AppMutation) WhereP ¶ added in v0.0.4
func (m *AppMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AppMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AppPackage ¶ added in v0.0.4
type AppPackage struct { // ID of the ent. ID int `json:"id,omitempty"` // InternalID holds the value of the "internal_id" field. InternalID int64 `json:"internal_id,omitempty"` // Source holds the value of the "source" field. Source apppackage.Source `json:"source,omitempty"` // SourceID holds the value of the "source_id" field. SourceID int64 `json:"source_id,omitempty"` // SourcePackageID holds the value of the "source_package_id" field. SourcePackageID string `json:"source_package_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // BinaryName holds the value of the "binary_name" field. BinaryName string `json:"binary_name,omitempty"` // BinarySize holds the value of the "binary_size" field. BinarySize string `json:"binary_size,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
AppPackage is the model entity for the AppPackage schema.
func (*AppPackage) String ¶ added in v0.0.4
func (ap *AppPackage) String() string
String implements the fmt.Stringer.
func (*AppPackage) Unwrap ¶ added in v0.0.4
func (ap *AppPackage) Unwrap() *AppPackage
Unwrap unwraps the AppPackage 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 (*AppPackage) Update ¶ added in v0.0.4
func (ap *AppPackage) Update() *AppPackageUpdateOne
Update returns a builder for updating this AppPackage. Note that you need to call AppPackage.Unwrap() before calling this method if this AppPackage was returned from a transaction, and the transaction was committed or rolled back.
type AppPackageClient ¶ added in v0.0.4
type AppPackageClient struct {
// contains filtered or unexported fields
}
AppPackageClient is a client for the AppPackage schema.
func NewAppPackageClient ¶ added in v0.0.4
func NewAppPackageClient(c config) *AppPackageClient
NewAppPackageClient returns a client for the AppPackage from the given config.
func (*AppPackageClient) Create ¶ added in v0.0.4
func (c *AppPackageClient) Create() *AppPackageCreate
Create returns a builder for creating a AppPackage entity.
func (*AppPackageClient) CreateBulk ¶ added in v0.0.4
func (c *AppPackageClient) CreateBulk(builders ...*AppPackageCreate) *AppPackageCreateBulk
CreateBulk returns a builder for creating a bulk of AppPackage entities.
func (*AppPackageClient) Delete ¶ added in v0.0.4
func (c *AppPackageClient) Delete() *AppPackageDelete
Delete returns a delete builder for AppPackage.
func (*AppPackageClient) DeleteOne ¶ added in v0.0.4
func (c *AppPackageClient) DeleteOne(ap *AppPackage) *AppPackageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AppPackageClient) DeleteOneID ¶ added in v0.0.4
func (c *AppPackageClient) DeleteOneID(id int) *AppPackageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AppPackageClient) Get ¶ added in v0.0.4
func (c *AppPackageClient) Get(ctx context.Context, id int) (*AppPackage, error)
Get returns a AppPackage entity by its id.
func (*AppPackageClient) GetX ¶ added in v0.0.4
func (c *AppPackageClient) GetX(ctx context.Context, id int) *AppPackage
GetX is like Get, but panics if an error occurs.
func (*AppPackageClient) Hooks ¶ added in v0.0.4
func (c *AppPackageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AppPackageClient) Intercept ¶ added in v0.0.4
func (c *AppPackageClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `apppackage.Intercept(f(g(h())))`.
func (*AppPackageClient) Interceptors ¶ added in v0.0.4
func (c *AppPackageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AppPackageClient) Query ¶ added in v0.0.4
func (c *AppPackageClient) Query() *AppPackageQuery
Query returns a query builder for AppPackage.
func (*AppPackageClient) Update ¶ added in v0.0.4
func (c *AppPackageClient) Update() *AppPackageUpdate
Update returns an update builder for AppPackage.
func (*AppPackageClient) UpdateOne ¶ added in v0.0.4
func (c *AppPackageClient) UpdateOne(ap *AppPackage) *AppPackageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AppPackageClient) UpdateOneID ¶ added in v0.0.4
func (c *AppPackageClient) UpdateOneID(id int) *AppPackageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AppPackageClient) Use ¶ added in v0.0.4
func (c *AppPackageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `apppackage.Hooks(f(g(h())))`.
type AppPackageCreate ¶ added in v0.0.4
type AppPackageCreate struct {
// contains filtered or unexported fields
}
AppPackageCreate is the builder for creating a AppPackage entity.
func (*AppPackageCreate) Exec ¶ added in v0.0.4
func (apc *AppPackageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AppPackageCreate) ExecX ¶ added in v0.0.4
func (apc *AppPackageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppPackageCreate) Mutation ¶ added in v0.0.4
func (apc *AppPackageCreate) Mutation() *AppPackageMutation
Mutation returns the AppPackageMutation object of the builder.
func (*AppPackageCreate) OnConflict ¶ added in v0.0.4
func (apc *AppPackageCreate) OnConflict(opts ...sql.ConflictOption) *AppPackageUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.AppPackage.Create(). SetInternalID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AppPackageUpsert) { SetInternalID(v+v). }). Exec(ctx)
func (*AppPackageCreate) OnConflictColumns ¶ added in v0.0.4
func (apc *AppPackageCreate) OnConflictColumns(columns ...string) *AppPackageUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.AppPackage.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AppPackageCreate) Save ¶ added in v0.0.4
func (apc *AppPackageCreate) Save(ctx context.Context) (*AppPackage, error)
Save creates the AppPackage in the database.
func (*AppPackageCreate) SaveX ¶ added in v0.0.4
func (apc *AppPackageCreate) SaveX(ctx context.Context) *AppPackage
SaveX calls Save and panics if Save returns an error.
func (*AppPackageCreate) SetBinaryName ¶ added in v0.0.4
func (apc *AppPackageCreate) SetBinaryName(s string) *AppPackageCreate
SetBinaryName sets the "binary_name" field.
func (*AppPackageCreate) SetBinarySize ¶ added in v0.0.4
func (apc *AppPackageCreate) SetBinarySize(s string) *AppPackageCreate
SetBinarySize sets the "binary_size" field.
func (*AppPackageCreate) SetCreatedAt ¶ added in v0.0.4
func (apc *AppPackageCreate) SetCreatedAt(t time.Time) *AppPackageCreate
SetCreatedAt sets the "created_at" field.
func (*AppPackageCreate) SetDescription ¶ added in v0.0.4
func (apc *AppPackageCreate) SetDescription(s string) *AppPackageCreate
SetDescription sets the "description" field.
func (*AppPackageCreate) SetInternalID ¶ added in v0.0.4
func (apc *AppPackageCreate) SetInternalID(i int64) *AppPackageCreate
SetInternalID sets the "internal_id" field.
func (*AppPackageCreate) SetName ¶ added in v0.0.4
func (apc *AppPackageCreate) SetName(s string) *AppPackageCreate
SetName sets the "name" field.
func (*AppPackageCreate) SetNillableCreatedAt ¶ added in v0.0.4
func (apc *AppPackageCreate) SetNillableCreatedAt(t *time.Time) *AppPackageCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AppPackageCreate) SetSource ¶ added in v0.0.4
func (apc *AppPackageCreate) SetSource(a apppackage.Source) *AppPackageCreate
SetSource sets the "source" field.
func (*AppPackageCreate) SetSourceID ¶ added in v0.0.4
func (apc *AppPackageCreate) SetSourceID(i int64) *AppPackageCreate
SetSourceID sets the "source_id" field.
func (*AppPackageCreate) SetSourcePackageID ¶ added in v0.0.4
func (apc *AppPackageCreate) SetSourcePackageID(s string) *AppPackageCreate
SetSourcePackageID sets the "source_package_id" field.
func (*AppPackageCreate) SetUpdatedAt ¶ added in v0.0.4
func (apc *AppPackageCreate) SetUpdatedAt(t time.Time) *AppPackageCreate
SetUpdatedAt sets the "updated_at" field.
type AppPackageCreateBulk ¶ added in v0.0.4
type AppPackageCreateBulk struct {
// contains filtered or unexported fields
}
AppPackageCreateBulk is the builder for creating many AppPackage entities in bulk.
func (*AppPackageCreateBulk) Exec ¶ added in v0.0.4
func (apcb *AppPackageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AppPackageCreateBulk) ExecX ¶ added in v0.0.4
func (apcb *AppPackageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppPackageCreateBulk) OnConflict ¶ added in v0.0.4
func (apcb *AppPackageCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppPackageUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.AppPackage.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AppPackageUpsert) { SetInternalID(v+v). }). Exec(ctx)
func (*AppPackageCreateBulk) OnConflictColumns ¶ added in v0.0.4
func (apcb *AppPackageCreateBulk) OnConflictColumns(columns ...string) *AppPackageUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.AppPackage.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AppPackageCreateBulk) Save ¶ added in v0.0.4
func (apcb *AppPackageCreateBulk) Save(ctx context.Context) ([]*AppPackage, error)
Save creates the AppPackage entities in the database.
func (*AppPackageCreateBulk) SaveX ¶ added in v0.0.4
func (apcb *AppPackageCreateBulk) SaveX(ctx context.Context) []*AppPackage
SaveX is like Save, but panics if an error occurs.
type AppPackageDelete ¶ added in v0.0.4
type AppPackageDelete struct {
// contains filtered or unexported fields
}
AppPackageDelete is the builder for deleting a AppPackage entity.
func (*AppPackageDelete) Exec ¶ added in v0.0.4
func (apd *AppPackageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AppPackageDelete) ExecX ¶ added in v0.0.4
func (apd *AppPackageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AppPackageDelete) Where ¶ added in v0.0.4
func (apd *AppPackageDelete) Where(ps ...predicate.AppPackage) *AppPackageDelete
Where appends a list predicates to the AppPackageDelete builder.
type AppPackageDeleteOne ¶ added in v0.0.4
type AppPackageDeleteOne struct {
// contains filtered or unexported fields
}
AppPackageDeleteOne is the builder for deleting a single AppPackage entity.
func (*AppPackageDeleteOne) Exec ¶ added in v0.0.4
func (apdo *AppPackageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AppPackageDeleteOne) ExecX ¶ added in v0.0.4
func (apdo *AppPackageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppPackageDeleteOne) Where ¶ added in v0.0.4
func (apdo *AppPackageDeleteOne) Where(ps ...predicate.AppPackage) *AppPackageDeleteOne
Where appends a list predicates to the AppPackageDelete builder.
type AppPackageGroupBy ¶ added in v0.0.4
type AppPackageGroupBy struct {
// contains filtered or unexported fields
}
AppPackageGroupBy is the group-by builder for AppPackage entities.
func (*AppPackageGroupBy) Aggregate ¶ added in v0.0.4
func (apgb *AppPackageGroupBy) Aggregate(fns ...AggregateFunc) *AppPackageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AppPackageGroupBy) Bool ¶ added in v0.0.4
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AppPackageGroupBy) BoolX ¶ added in v0.0.4
BoolX is like Bool, but panics if an error occurs.
func (*AppPackageGroupBy) Bools ¶ added in v0.0.4
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AppPackageGroupBy) BoolsX ¶ added in v0.0.4
BoolsX is like Bools, but panics if an error occurs.
func (*AppPackageGroupBy) Float64 ¶ added in v0.0.4
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AppPackageGroupBy) Float64X ¶ added in v0.0.4
Float64X is like Float64, but panics if an error occurs.
func (*AppPackageGroupBy) Float64s ¶ added in v0.0.4
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AppPackageGroupBy) Float64sX ¶ added in v0.0.4
Float64sX is like Float64s, but panics if an error occurs.
func (*AppPackageGroupBy) Int ¶ added in v0.0.4
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AppPackageGroupBy) Ints ¶ added in v0.0.4
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AppPackageGroupBy) IntsX ¶ added in v0.0.4
IntsX is like Ints, but panics if an error occurs.
func (*AppPackageGroupBy) Scan ¶ added in v0.0.4
func (apgb *AppPackageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AppPackageGroupBy) ScanX ¶ added in v0.0.4
ScanX is like Scan, but panics if an error occurs.
func (*AppPackageGroupBy) String ¶ added in v0.0.4
String returns a single string from a selector. It is only allowed when selecting one field.
func (*AppPackageGroupBy) StringX ¶ added in v0.0.4
StringX is like String, but panics if an error occurs.
type AppPackageMutation ¶ added in v0.0.4
type AppPackageMutation struct {
// contains filtered or unexported fields
}
AppPackageMutation represents an operation that mutates the AppPackage nodes in the graph.
func (*AppPackageMutation) AddField ¶ added in v0.0.4
func (m *AppPackageMutation) 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 (*AppPackageMutation) AddInternalID ¶ added in v0.0.4
func (m *AppPackageMutation) AddInternalID(i int64)
AddInternalID adds i to the "internal_id" field.
func (*AppPackageMutation) AddSourceID ¶ added in v0.0.4
func (m *AppPackageMutation) AddSourceID(i int64)
AddSourceID adds i to the "source_id" field.
func (*AppPackageMutation) AddedEdges ¶ added in v0.0.4
func (m *AppPackageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AppPackageMutation) AddedField ¶ added in v0.0.4
func (m *AppPackageMutation) 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 (*AppPackageMutation) AddedFields ¶ added in v0.0.4
func (m *AppPackageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AppPackageMutation) AddedIDs ¶ added in v0.0.4
func (m *AppPackageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AppPackageMutation) AddedInternalID ¶ added in v0.0.4
func (m *AppPackageMutation) AddedInternalID() (r int64, exists bool)
AddedInternalID returns the value that was added to the "internal_id" field in this mutation.
func (*AppPackageMutation) AddedSourceID ¶ added in v0.0.4
func (m *AppPackageMutation) AddedSourceID() (r int64, exists bool)
AddedSourceID returns the value that was added to the "source_id" field in this mutation.
func (*AppPackageMutation) BinaryName ¶ added in v0.0.4
func (m *AppPackageMutation) BinaryName() (r string, exists bool)
BinaryName returns the value of the "binary_name" field in the mutation.
func (*AppPackageMutation) BinarySize ¶ added in v0.0.4
func (m *AppPackageMutation) BinarySize() (r string, exists bool)
BinarySize returns the value of the "binary_size" field in the mutation.
func (*AppPackageMutation) ClearEdge ¶ added in v0.0.4
func (m *AppPackageMutation) 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 (*AppPackageMutation) ClearField ¶ added in v0.0.4
func (m *AppPackageMutation) 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 (*AppPackageMutation) ClearedEdges ¶ added in v0.0.4
func (m *AppPackageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AppPackageMutation) ClearedFields ¶ added in v0.0.4
func (m *AppPackageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AppPackageMutation) Client ¶ added in v0.0.4
func (m AppPackageMutation) 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 (*AppPackageMutation) CreatedAt ¶ added in v0.0.4
func (m *AppPackageMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AppPackageMutation) Description ¶ added in v0.0.4
func (m *AppPackageMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*AppPackageMutation) EdgeCleared ¶ added in v0.0.4
func (m *AppPackageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AppPackageMutation) Field ¶ added in v0.0.4
func (m *AppPackageMutation) 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 (*AppPackageMutation) FieldCleared ¶ added in v0.0.4
func (m *AppPackageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AppPackageMutation) Fields ¶ added in v0.0.4
func (m *AppPackageMutation) 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 (*AppPackageMutation) ID ¶ added in v0.0.4
func (m *AppPackageMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AppPackageMutation) IDs ¶ added in v0.0.4
func (m *AppPackageMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AppPackageMutation) InternalID ¶ added in v0.0.4
func (m *AppPackageMutation) InternalID() (r int64, exists bool)
InternalID returns the value of the "internal_id" field in the mutation.
func (*AppPackageMutation) Name ¶ added in v0.0.4
func (m *AppPackageMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*AppPackageMutation) OldBinaryName ¶ added in v0.0.4
func (m *AppPackageMutation) OldBinaryName(ctx context.Context) (v string, err error)
OldBinaryName returns the old "binary_name" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldBinarySize ¶ added in v0.0.4
func (m *AppPackageMutation) OldBinarySize(ctx context.Context) (v string, err error)
OldBinarySize returns the old "binary_size" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldCreatedAt ¶ added in v0.0.4
OldCreatedAt returns the old "created_at" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldDescription ¶ added in v0.0.4
func (m *AppPackageMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldField ¶ added in v0.0.4
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 (*AppPackageMutation) OldInternalID ¶ added in v0.0.4
func (m *AppPackageMutation) OldInternalID(ctx context.Context) (v int64, err error)
OldInternalID returns the old "internal_id" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldName ¶ added in v0.0.4
func (m *AppPackageMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldSource ¶ added in v0.0.4
func (m *AppPackageMutation) OldSource(ctx context.Context) (v apppackage.Source, err error)
OldSource returns the old "source" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldSourceID ¶ added in v0.0.4
func (m *AppPackageMutation) OldSourceID(ctx context.Context) (v int64, err error)
OldSourceID returns the old "source_id" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldSourcePackageID ¶ added in v0.0.4
func (m *AppPackageMutation) OldSourcePackageID(ctx context.Context) (v string, err error)
OldSourcePackageID returns the old "source_package_id" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) OldUpdatedAt ¶ added in v0.0.4
OldUpdatedAt returns the old "updated_at" field's value of the AppPackage entity. If the AppPackage 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 (*AppPackageMutation) Op ¶ added in v0.0.4
func (m *AppPackageMutation) Op() Op
Op returns the operation name.
func (*AppPackageMutation) RemovedEdges ¶ added in v0.0.4
func (m *AppPackageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AppPackageMutation) RemovedIDs ¶ added in v0.0.4
func (m *AppPackageMutation) 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 (*AppPackageMutation) ResetBinaryName ¶ added in v0.0.4
func (m *AppPackageMutation) ResetBinaryName()
ResetBinaryName resets all changes to the "binary_name" field.
func (*AppPackageMutation) ResetBinarySize ¶ added in v0.0.4
func (m *AppPackageMutation) ResetBinarySize()
ResetBinarySize resets all changes to the "binary_size" field.
func (*AppPackageMutation) ResetCreatedAt ¶ added in v0.0.4
func (m *AppPackageMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AppPackageMutation) ResetDescription ¶ added in v0.0.4
func (m *AppPackageMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*AppPackageMutation) ResetEdge ¶ added in v0.0.4
func (m *AppPackageMutation) 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 (*AppPackageMutation) ResetField ¶ added in v0.0.4
func (m *AppPackageMutation) 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 (*AppPackageMutation) ResetInternalID ¶ added in v0.0.4
func (m *AppPackageMutation) ResetInternalID()
ResetInternalID resets all changes to the "internal_id" field.
func (*AppPackageMutation) ResetName ¶ added in v0.0.4
func (m *AppPackageMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*AppPackageMutation) ResetSource ¶ added in v0.0.4
func (m *AppPackageMutation) ResetSource()
ResetSource resets all changes to the "source" field.
func (*AppPackageMutation) ResetSourceID ¶ added in v0.0.4
func (m *AppPackageMutation) ResetSourceID()
ResetSourceID resets all changes to the "source_id" field.
func (*AppPackageMutation) ResetSourcePackageID ¶ added in v0.0.4
func (m *AppPackageMutation) ResetSourcePackageID()
ResetSourcePackageID resets all changes to the "source_package_id" field.
func (*AppPackageMutation) ResetUpdatedAt ¶ added in v0.0.4
func (m *AppPackageMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AppPackageMutation) SetBinaryName ¶ added in v0.0.4
func (m *AppPackageMutation) SetBinaryName(s string)
SetBinaryName sets the "binary_name" field.
func (*AppPackageMutation) SetBinarySize ¶ added in v0.0.4
func (m *AppPackageMutation) SetBinarySize(s string)
SetBinarySize sets the "binary_size" field.
func (*AppPackageMutation) SetCreatedAt ¶ added in v0.0.4
func (m *AppPackageMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AppPackageMutation) SetDescription ¶ added in v0.0.4
func (m *AppPackageMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*AppPackageMutation) SetField ¶ added in v0.0.4
func (m *AppPackageMutation) 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 (*AppPackageMutation) SetInternalID ¶ added in v0.0.4
func (m *AppPackageMutation) SetInternalID(i int64)
SetInternalID sets the "internal_id" field.
func (*AppPackageMutation) SetName ¶ added in v0.0.4
func (m *AppPackageMutation) SetName(s string)
SetName sets the "name" field.
func (*AppPackageMutation) SetOp ¶ added in v0.0.4
func (m *AppPackageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AppPackageMutation) SetSource ¶ added in v0.0.4
func (m *AppPackageMutation) SetSource(a apppackage.Source)
SetSource sets the "source" field.
func (*AppPackageMutation) SetSourceID ¶ added in v0.0.4
func (m *AppPackageMutation) SetSourceID(i int64)
SetSourceID sets the "source_id" field.
func (*AppPackageMutation) SetSourcePackageID ¶ added in v0.0.4
func (m *AppPackageMutation) SetSourcePackageID(s string)
SetSourcePackageID sets the "source_package_id" field.
func (*AppPackageMutation) SetUpdatedAt ¶ added in v0.0.4
func (m *AppPackageMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*AppPackageMutation) Source ¶ added in v0.0.4
func (m *AppPackageMutation) Source() (r apppackage.Source, exists bool)
Source returns the value of the "source" field in the mutation.
func (*AppPackageMutation) SourceID ¶ added in v0.0.4
func (m *AppPackageMutation) SourceID() (r int64, exists bool)
SourceID returns the value of the "source_id" field in the mutation.
func (*AppPackageMutation) SourcePackageID ¶ added in v0.0.4
func (m *AppPackageMutation) SourcePackageID() (r string, exists bool)
SourcePackageID returns the value of the "source_package_id" field in the mutation.
func (AppPackageMutation) Tx ¶ added in v0.0.4
func (m AppPackageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AppPackageMutation) Type ¶ added in v0.0.4
func (m *AppPackageMutation) Type() string
Type returns the node type of this mutation (AppPackage).
func (*AppPackageMutation) UpdatedAt ¶ added in v0.0.4
func (m *AppPackageMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AppPackageMutation) Where ¶ added in v0.0.4
func (m *AppPackageMutation) Where(ps ...predicate.AppPackage)
Where appends a list predicates to the AppPackageMutation builder.
func (*AppPackageMutation) WhereP ¶ added in v0.0.4
func (m *AppPackageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AppPackageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AppPackageQuery ¶ added in v0.0.4
type AppPackageQuery struct {
// contains filtered or unexported fields
}
AppPackageQuery is the builder for querying AppPackage entities.
func (*AppPackageQuery) Aggregate ¶ added in v0.0.4
func (apq *AppPackageQuery) Aggregate(fns ...AggregateFunc) *AppPackageSelect
Aggregate returns a AppPackageSelect configured with the given aggregations.
func (*AppPackageQuery) All ¶ added in v0.0.4
func (apq *AppPackageQuery) All(ctx context.Context) ([]*AppPackage, error)
All executes the query and returns a list of AppPackages.
func (*AppPackageQuery) AllX ¶ added in v0.0.4
func (apq *AppPackageQuery) AllX(ctx context.Context) []*AppPackage
AllX is like All, but panics if an error occurs.
func (*AppPackageQuery) Clone ¶ added in v0.0.4
func (apq *AppPackageQuery) Clone() *AppPackageQuery
Clone returns a duplicate of the AppPackageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AppPackageQuery) Count ¶ added in v0.0.4
func (apq *AppPackageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AppPackageQuery) CountX ¶ added in v0.0.4
func (apq *AppPackageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AppPackageQuery) Exist ¶ added in v0.0.4
func (apq *AppPackageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AppPackageQuery) ExistX ¶ added in v0.0.4
func (apq *AppPackageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AppPackageQuery) First ¶ added in v0.0.4
func (apq *AppPackageQuery) First(ctx context.Context) (*AppPackage, error)
First returns the first AppPackage entity from the query. Returns a *NotFoundError when no AppPackage was found.
func (*AppPackageQuery) FirstID ¶ added in v0.0.4
func (apq *AppPackageQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first AppPackage ID from the query. Returns a *NotFoundError when no AppPackage ID was found.
func (*AppPackageQuery) FirstIDX ¶ added in v0.0.4
func (apq *AppPackageQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AppPackageQuery) FirstX ¶ added in v0.0.4
func (apq *AppPackageQuery) FirstX(ctx context.Context) *AppPackage
FirstX is like First, but panics if an error occurs.
func (*AppPackageQuery) GroupBy ¶ added in v0.0.4
func (apq *AppPackageQuery) GroupBy(field string, fields ...string) *AppPackageGroupBy
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 { InternalID int64 `json:"internal_id,omitempty"` Count int `json:"count,omitempty"` } client.AppPackage.Query(). GroupBy(apppackage.FieldInternalID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AppPackageQuery) IDs ¶ added in v0.0.4
func (apq *AppPackageQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of AppPackage IDs.
func (*AppPackageQuery) IDsX ¶ added in v0.0.4
func (apq *AppPackageQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AppPackageQuery) Limit ¶ added in v0.0.4
func (apq *AppPackageQuery) Limit(limit int) *AppPackageQuery
Limit the number of records to be returned by this query.
func (*AppPackageQuery) Offset ¶ added in v0.0.4
func (apq *AppPackageQuery) Offset(offset int) *AppPackageQuery
Offset to start from.
func (*AppPackageQuery) Only ¶ added in v0.0.4
func (apq *AppPackageQuery) Only(ctx context.Context) (*AppPackage, error)
Only returns a single AppPackage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AppPackage entity is found. Returns a *NotFoundError when no AppPackage entities are found.
func (*AppPackageQuery) OnlyID ¶ added in v0.0.4
func (apq *AppPackageQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only AppPackage ID in the query. Returns a *NotSingularError when more than one AppPackage ID is found. Returns a *NotFoundError when no entities are found.
func (*AppPackageQuery) OnlyIDX ¶ added in v0.0.4
func (apq *AppPackageQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AppPackageQuery) OnlyX ¶ added in v0.0.4
func (apq *AppPackageQuery) OnlyX(ctx context.Context) *AppPackage
OnlyX is like Only, but panics if an error occurs.
func (*AppPackageQuery) Order ¶ added in v0.0.4
func (apq *AppPackageQuery) Order(o ...OrderFunc) *AppPackageQuery
Order specifies how the records should be ordered.
func (*AppPackageQuery) Select ¶ added in v0.0.4
func (apq *AppPackageQuery) Select(fields ...string) *AppPackageSelect
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 { InternalID int64 `json:"internal_id,omitempty"` } client.AppPackage.Query(). Select(apppackage.FieldInternalID). Scan(ctx, &v)
func (*AppPackageQuery) Unique ¶ added in v0.0.4
func (apq *AppPackageQuery) Unique(unique bool) *AppPackageQuery
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 (*AppPackageQuery) Where ¶ added in v0.0.4
func (apq *AppPackageQuery) Where(ps ...predicate.AppPackage) *AppPackageQuery
Where adds a new predicate for the AppPackageQuery builder.
type AppPackageSelect ¶ added in v0.0.4
type AppPackageSelect struct { *AppPackageQuery // contains filtered or unexported fields }
AppPackageSelect is the builder for selecting fields of AppPackage entities.
func (*AppPackageSelect) Aggregate ¶ added in v0.0.4
func (aps *AppPackageSelect) Aggregate(fns ...AggregateFunc) *AppPackageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AppPackageSelect) Bool ¶ added in v0.0.4
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AppPackageSelect) Bools ¶ added in v0.0.4
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AppPackageSelect) BoolsX ¶ added in v0.0.4
BoolsX is like Bools, but panics if an error occurs.
func (*AppPackageSelect) Float64 ¶ added in v0.0.4
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AppPackageSelect) Float64X ¶ added in v0.0.4
Float64X is like Float64, but panics if an error occurs.
func (*AppPackageSelect) Float64s ¶ added in v0.0.4
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AppPackageSelect) Float64sX ¶ added in v0.0.4
Float64sX is like Float64s, but panics if an error occurs.
func (*AppPackageSelect) Int ¶ added in v0.0.4
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AppPackageSelect) Ints ¶ added in v0.0.4
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AppPackageSelect) Scan ¶ added in v0.0.4
func (aps *AppPackageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AppPackageSelect) String ¶ added in v0.0.4
String returns a single string from a selector. It is only allowed when selecting one field.
func (*AppPackageSelect) StringX ¶ added in v0.0.4
StringX is like String, but panics if an error occurs.
type AppPackageUpdate ¶ added in v0.0.4
type AppPackageUpdate struct {
// contains filtered or unexported fields
}
AppPackageUpdate is the builder for updating AppPackage entities.
func (*AppPackageUpdate) AddInternalID ¶ added in v0.0.4
func (apu *AppPackageUpdate) AddInternalID(i int64) *AppPackageUpdate
AddInternalID adds i to the "internal_id" field.
func (*AppPackageUpdate) AddSourceID ¶ added in v0.0.4
func (apu *AppPackageUpdate) AddSourceID(i int64) *AppPackageUpdate
AddSourceID adds i to the "source_id" field.
func (*AppPackageUpdate) Exec ¶ added in v0.0.4
func (apu *AppPackageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AppPackageUpdate) ExecX ¶ added in v0.0.4
func (apu *AppPackageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppPackageUpdate) Mutation ¶ added in v0.0.4
func (apu *AppPackageUpdate) Mutation() *AppPackageMutation
Mutation returns the AppPackageMutation object of the builder.
func (*AppPackageUpdate) Save ¶ added in v0.0.4
func (apu *AppPackageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AppPackageUpdate) SaveX ¶ added in v0.0.4
func (apu *AppPackageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AppPackageUpdate) SetBinaryName ¶ added in v0.0.4
func (apu *AppPackageUpdate) SetBinaryName(s string) *AppPackageUpdate
SetBinaryName sets the "binary_name" field.
func (*AppPackageUpdate) SetBinarySize ¶ added in v0.0.4
func (apu *AppPackageUpdate) SetBinarySize(s string) *AppPackageUpdate
SetBinarySize sets the "binary_size" field.
func (*AppPackageUpdate) SetCreatedAt ¶ added in v0.0.4
func (apu *AppPackageUpdate) SetCreatedAt(t time.Time) *AppPackageUpdate
SetCreatedAt sets the "created_at" field.
func (*AppPackageUpdate) SetDescription ¶ added in v0.0.4
func (apu *AppPackageUpdate) SetDescription(s string) *AppPackageUpdate
SetDescription sets the "description" field.
func (*AppPackageUpdate) SetInternalID ¶ added in v0.0.4
func (apu *AppPackageUpdate) SetInternalID(i int64) *AppPackageUpdate
SetInternalID sets the "internal_id" field.
func (*AppPackageUpdate) SetName ¶ added in v0.0.4
func (apu *AppPackageUpdate) SetName(s string) *AppPackageUpdate
SetName sets the "name" field.
func (*AppPackageUpdate) SetNillableCreatedAt ¶ added in v0.0.4
func (apu *AppPackageUpdate) SetNillableCreatedAt(t *time.Time) *AppPackageUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AppPackageUpdate) SetSource ¶ added in v0.0.4
func (apu *AppPackageUpdate) SetSource(a apppackage.Source) *AppPackageUpdate
SetSource sets the "source" field.
func (*AppPackageUpdate) SetSourceID ¶ added in v0.0.4
func (apu *AppPackageUpdate) SetSourceID(i int64) *AppPackageUpdate
SetSourceID sets the "source_id" field.
func (*AppPackageUpdate) SetSourcePackageID ¶ added in v0.0.4
func (apu *AppPackageUpdate) SetSourcePackageID(s string) *AppPackageUpdate
SetSourcePackageID sets the "source_package_id" field.
func (*AppPackageUpdate) SetUpdatedAt ¶ added in v0.0.4
func (apu *AppPackageUpdate) SetUpdatedAt(t time.Time) *AppPackageUpdate
SetUpdatedAt sets the "updated_at" field.
func (*AppPackageUpdate) Where ¶ added in v0.0.4
func (apu *AppPackageUpdate) Where(ps ...predicate.AppPackage) *AppPackageUpdate
Where appends a list predicates to the AppPackageUpdate builder.
type AppPackageUpdateOne ¶ added in v0.0.4
type AppPackageUpdateOne struct {
// contains filtered or unexported fields
}
AppPackageUpdateOne is the builder for updating a single AppPackage entity.
func (*AppPackageUpdateOne) AddInternalID ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) AddInternalID(i int64) *AppPackageUpdateOne
AddInternalID adds i to the "internal_id" field.
func (*AppPackageUpdateOne) AddSourceID ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) AddSourceID(i int64) *AppPackageUpdateOne
AddSourceID adds i to the "source_id" field.
func (*AppPackageUpdateOne) Exec ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AppPackageUpdateOne) ExecX ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppPackageUpdateOne) Mutation ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) Mutation() *AppPackageMutation
Mutation returns the AppPackageMutation object of the builder.
func (*AppPackageUpdateOne) Save ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) Save(ctx context.Context) (*AppPackage, error)
Save executes the query and returns the updated AppPackage entity.
func (*AppPackageUpdateOne) SaveX ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SaveX(ctx context.Context) *AppPackage
SaveX is like Save, but panics if an error occurs.
func (*AppPackageUpdateOne) Select ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) Select(field string, fields ...string) *AppPackageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AppPackageUpdateOne) SetBinaryName ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SetBinaryName(s string) *AppPackageUpdateOne
SetBinaryName sets the "binary_name" field.
func (*AppPackageUpdateOne) SetBinarySize ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SetBinarySize(s string) *AppPackageUpdateOne
SetBinarySize sets the "binary_size" field.
func (*AppPackageUpdateOne) SetCreatedAt ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SetCreatedAt(t time.Time) *AppPackageUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AppPackageUpdateOne) SetDescription ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SetDescription(s string) *AppPackageUpdateOne
SetDescription sets the "description" field.
func (*AppPackageUpdateOne) SetInternalID ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SetInternalID(i int64) *AppPackageUpdateOne
SetInternalID sets the "internal_id" field.
func (*AppPackageUpdateOne) SetName ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SetName(s string) *AppPackageUpdateOne
SetName sets the "name" field.
func (*AppPackageUpdateOne) SetNillableCreatedAt ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SetNillableCreatedAt(t *time.Time) *AppPackageUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AppPackageUpdateOne) SetSource ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SetSource(a apppackage.Source) *AppPackageUpdateOne
SetSource sets the "source" field.
func (*AppPackageUpdateOne) SetSourceID ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SetSourceID(i int64) *AppPackageUpdateOne
SetSourceID sets the "source_id" field.
func (*AppPackageUpdateOne) SetSourcePackageID ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SetSourcePackageID(s string) *AppPackageUpdateOne
SetSourcePackageID sets the "source_package_id" field.
func (*AppPackageUpdateOne) SetUpdatedAt ¶ added in v0.0.4
func (apuo *AppPackageUpdateOne) SetUpdatedAt(t time.Time) *AppPackageUpdateOne
SetUpdatedAt sets the "updated_at" field.
type AppPackageUpsert ¶ added in v0.0.4
AppPackageUpsert is the "OnConflict" setter.
func (*AppPackageUpsert) AddInternalID ¶ added in v0.0.4
func (u *AppPackageUpsert) AddInternalID(v int64) *AppPackageUpsert
AddInternalID adds v to the "internal_id" field.
func (*AppPackageUpsert) AddSourceID ¶ added in v0.0.4
func (u *AppPackageUpsert) AddSourceID(v int64) *AppPackageUpsert
AddSourceID adds v to the "source_id" field.
func (*AppPackageUpsert) SetBinaryName ¶ added in v0.0.4
func (u *AppPackageUpsert) SetBinaryName(v string) *AppPackageUpsert
SetBinaryName sets the "binary_name" field.
func (*AppPackageUpsert) SetBinarySize ¶ added in v0.0.4
func (u *AppPackageUpsert) SetBinarySize(v string) *AppPackageUpsert
SetBinarySize sets the "binary_size" field.
func (*AppPackageUpsert) SetCreatedAt ¶ added in v0.0.4
func (u *AppPackageUpsert) SetCreatedAt(v time.Time) *AppPackageUpsert
SetCreatedAt sets the "created_at" field.
func (*AppPackageUpsert) SetDescription ¶ added in v0.0.4
func (u *AppPackageUpsert) SetDescription(v string) *AppPackageUpsert
SetDescription sets the "description" field.
func (*AppPackageUpsert) SetInternalID ¶ added in v0.0.4
func (u *AppPackageUpsert) SetInternalID(v int64) *AppPackageUpsert
SetInternalID sets the "internal_id" field.
func (*AppPackageUpsert) SetName ¶ added in v0.0.4
func (u *AppPackageUpsert) SetName(v string) *AppPackageUpsert
SetName sets the "name" field.
func (*AppPackageUpsert) SetSource ¶ added in v0.0.4
func (u *AppPackageUpsert) SetSource(v apppackage.Source) *AppPackageUpsert
SetSource sets the "source" field.
func (*AppPackageUpsert) SetSourceID ¶ added in v0.0.4
func (u *AppPackageUpsert) SetSourceID(v int64) *AppPackageUpsert
SetSourceID sets the "source_id" field.
func (*AppPackageUpsert) SetSourcePackageID ¶ added in v0.0.4
func (u *AppPackageUpsert) SetSourcePackageID(v string) *AppPackageUpsert
SetSourcePackageID sets the "source_package_id" field.
func (*AppPackageUpsert) SetUpdatedAt ¶ added in v0.0.4
func (u *AppPackageUpsert) SetUpdatedAt(v time.Time) *AppPackageUpsert
SetUpdatedAt sets the "updated_at" field.
func (*AppPackageUpsert) UpdateBinaryName ¶ added in v0.0.4
func (u *AppPackageUpsert) UpdateBinaryName() *AppPackageUpsert
UpdateBinaryName sets the "binary_name" field to the value that was provided on create.
func (*AppPackageUpsert) UpdateBinarySize ¶ added in v0.0.4
func (u *AppPackageUpsert) UpdateBinarySize() *AppPackageUpsert
UpdateBinarySize sets the "binary_size" field to the value that was provided on create.
func (*AppPackageUpsert) UpdateCreatedAt ¶ added in v0.0.4
func (u *AppPackageUpsert) UpdateCreatedAt() *AppPackageUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AppPackageUpsert) UpdateDescription ¶ added in v0.0.4
func (u *AppPackageUpsert) UpdateDescription() *AppPackageUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*AppPackageUpsert) UpdateInternalID ¶ added in v0.0.4
func (u *AppPackageUpsert) UpdateInternalID() *AppPackageUpsert
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*AppPackageUpsert) UpdateName ¶ added in v0.0.4
func (u *AppPackageUpsert) UpdateName() *AppPackageUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*AppPackageUpsert) UpdateSource ¶ added in v0.0.4
func (u *AppPackageUpsert) UpdateSource() *AppPackageUpsert
UpdateSource sets the "source" field to the value that was provided on create.
func (*AppPackageUpsert) UpdateSourceID ¶ added in v0.0.4
func (u *AppPackageUpsert) UpdateSourceID() *AppPackageUpsert
UpdateSourceID sets the "source_id" field to the value that was provided on create.
func (*AppPackageUpsert) UpdateSourcePackageID ¶ added in v0.0.4
func (u *AppPackageUpsert) UpdateSourcePackageID() *AppPackageUpsert
UpdateSourcePackageID sets the "source_package_id" field to the value that was provided on create.
func (*AppPackageUpsert) UpdateUpdatedAt ¶ added in v0.0.4
func (u *AppPackageUpsert) UpdateUpdatedAt() *AppPackageUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type AppPackageUpsertBulk ¶ added in v0.0.4
type AppPackageUpsertBulk struct {
// contains filtered or unexported fields
}
AppPackageUpsertBulk is the builder for "upsert"-ing a bulk of AppPackage nodes.
func (*AppPackageUpsertBulk) AddInternalID ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) AddInternalID(v int64) *AppPackageUpsertBulk
AddInternalID adds v to the "internal_id" field.
func (*AppPackageUpsertBulk) AddSourceID ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) AddSourceID(v int64) *AppPackageUpsertBulk
AddSourceID adds v to the "source_id" field.
func (*AppPackageUpsertBulk) DoNothing ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) DoNothing() *AppPackageUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AppPackageUpsertBulk) Exec ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AppPackageUpsertBulk) ExecX ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppPackageUpsertBulk) Ignore ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) Ignore() *AppPackageUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.AppPackage.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AppPackageUpsertBulk) SetBinaryName ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) SetBinaryName(v string) *AppPackageUpsertBulk
SetBinaryName sets the "binary_name" field.
func (*AppPackageUpsertBulk) SetBinarySize ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) SetBinarySize(v string) *AppPackageUpsertBulk
SetBinarySize sets the "binary_size" field.
func (*AppPackageUpsertBulk) SetCreatedAt ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) SetCreatedAt(v time.Time) *AppPackageUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*AppPackageUpsertBulk) SetDescription ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) SetDescription(v string) *AppPackageUpsertBulk
SetDescription sets the "description" field.
func (*AppPackageUpsertBulk) SetInternalID ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) SetInternalID(v int64) *AppPackageUpsertBulk
SetInternalID sets the "internal_id" field.
func (*AppPackageUpsertBulk) SetName ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) SetName(v string) *AppPackageUpsertBulk
SetName sets the "name" field.
func (*AppPackageUpsertBulk) SetSource ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) SetSource(v apppackage.Source) *AppPackageUpsertBulk
SetSource sets the "source" field.
func (*AppPackageUpsertBulk) SetSourceID ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) SetSourceID(v int64) *AppPackageUpsertBulk
SetSourceID sets the "source_id" field.
func (*AppPackageUpsertBulk) SetSourcePackageID ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) SetSourcePackageID(v string) *AppPackageUpsertBulk
SetSourcePackageID sets the "source_package_id" field.
func (*AppPackageUpsertBulk) SetUpdatedAt ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) SetUpdatedAt(v time.Time) *AppPackageUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*AppPackageUpsertBulk) Update ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) Update(set func(*AppPackageUpsert)) *AppPackageUpsertBulk
Update allows overriding fields `UPDATE` values. See the AppPackageCreateBulk.OnConflict documentation for more info.
func (*AppPackageUpsertBulk) UpdateBinaryName ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) UpdateBinaryName() *AppPackageUpsertBulk
UpdateBinaryName sets the "binary_name" field to the value that was provided on create.
func (*AppPackageUpsertBulk) UpdateBinarySize ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) UpdateBinarySize() *AppPackageUpsertBulk
UpdateBinarySize sets the "binary_size" field to the value that was provided on create.
func (*AppPackageUpsertBulk) UpdateCreatedAt ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) UpdateCreatedAt() *AppPackageUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AppPackageUpsertBulk) UpdateDescription ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) UpdateDescription() *AppPackageUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*AppPackageUpsertBulk) UpdateInternalID ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) UpdateInternalID() *AppPackageUpsertBulk
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*AppPackageUpsertBulk) UpdateName ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) UpdateName() *AppPackageUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*AppPackageUpsertBulk) UpdateNewValues ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) UpdateNewValues() *AppPackageUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.AppPackage.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AppPackageUpsertBulk) UpdateSource ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) UpdateSource() *AppPackageUpsertBulk
UpdateSource sets the "source" field to the value that was provided on create.
func (*AppPackageUpsertBulk) UpdateSourceID ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) UpdateSourceID() *AppPackageUpsertBulk
UpdateSourceID sets the "source_id" field to the value that was provided on create.
func (*AppPackageUpsertBulk) UpdateSourcePackageID ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) UpdateSourcePackageID() *AppPackageUpsertBulk
UpdateSourcePackageID sets the "source_package_id" field to the value that was provided on create.
func (*AppPackageUpsertBulk) UpdateUpdatedAt ¶ added in v0.0.4
func (u *AppPackageUpsertBulk) UpdateUpdatedAt() *AppPackageUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type AppPackageUpsertOne ¶ added in v0.0.4
type AppPackageUpsertOne struct {
// contains filtered or unexported fields
}
AppPackageUpsertOne is the builder for "upsert"-ing
one AppPackage node.
func (*AppPackageUpsertOne) AddInternalID ¶ added in v0.0.4
func (u *AppPackageUpsertOne) AddInternalID(v int64) *AppPackageUpsertOne
AddInternalID adds v to the "internal_id" field.
func (*AppPackageUpsertOne) AddSourceID ¶ added in v0.0.4
func (u *AppPackageUpsertOne) AddSourceID(v int64) *AppPackageUpsertOne
AddSourceID adds v to the "source_id" field.
func (*AppPackageUpsertOne) DoNothing ¶ added in v0.0.4
func (u *AppPackageUpsertOne) DoNothing() *AppPackageUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AppPackageUpsertOne) Exec ¶ added in v0.0.4
func (u *AppPackageUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*AppPackageUpsertOne) ExecX ¶ added in v0.0.4
func (u *AppPackageUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppPackageUpsertOne) ID ¶ added in v0.0.4
func (u *AppPackageUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*AppPackageUpsertOne) IDX ¶ added in v0.0.4
func (u *AppPackageUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*AppPackageUpsertOne) Ignore ¶ added in v0.0.4
func (u *AppPackageUpsertOne) Ignore() *AppPackageUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.AppPackage.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AppPackageUpsertOne) SetBinaryName ¶ added in v0.0.4
func (u *AppPackageUpsertOne) SetBinaryName(v string) *AppPackageUpsertOne
SetBinaryName sets the "binary_name" field.
func (*AppPackageUpsertOne) SetBinarySize ¶ added in v0.0.4
func (u *AppPackageUpsertOne) SetBinarySize(v string) *AppPackageUpsertOne
SetBinarySize sets the "binary_size" field.
func (*AppPackageUpsertOne) SetCreatedAt ¶ added in v0.0.4
func (u *AppPackageUpsertOne) SetCreatedAt(v time.Time) *AppPackageUpsertOne
SetCreatedAt sets the "created_at" field.
func (*AppPackageUpsertOne) SetDescription ¶ added in v0.0.4
func (u *AppPackageUpsertOne) SetDescription(v string) *AppPackageUpsertOne
SetDescription sets the "description" field.
func (*AppPackageUpsertOne) SetInternalID ¶ added in v0.0.4
func (u *AppPackageUpsertOne) SetInternalID(v int64) *AppPackageUpsertOne
SetInternalID sets the "internal_id" field.
func (*AppPackageUpsertOne) SetName ¶ added in v0.0.4
func (u *AppPackageUpsertOne) SetName(v string) *AppPackageUpsertOne
SetName sets the "name" field.
func (*AppPackageUpsertOne) SetSource ¶ added in v0.0.4
func (u *AppPackageUpsertOne) SetSource(v apppackage.Source) *AppPackageUpsertOne
SetSource sets the "source" field.
func (*AppPackageUpsertOne) SetSourceID ¶ added in v0.0.4
func (u *AppPackageUpsertOne) SetSourceID(v int64) *AppPackageUpsertOne
SetSourceID sets the "source_id" field.
func (*AppPackageUpsertOne) SetSourcePackageID ¶ added in v0.0.4
func (u *AppPackageUpsertOne) SetSourcePackageID(v string) *AppPackageUpsertOne
SetSourcePackageID sets the "source_package_id" field.
func (*AppPackageUpsertOne) SetUpdatedAt ¶ added in v0.0.4
func (u *AppPackageUpsertOne) SetUpdatedAt(v time.Time) *AppPackageUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*AppPackageUpsertOne) Update ¶ added in v0.0.4
func (u *AppPackageUpsertOne) Update(set func(*AppPackageUpsert)) *AppPackageUpsertOne
Update allows overriding fields `UPDATE` values. See the AppPackageCreate.OnConflict documentation for more info.
func (*AppPackageUpsertOne) UpdateBinaryName ¶ added in v0.0.4
func (u *AppPackageUpsertOne) UpdateBinaryName() *AppPackageUpsertOne
UpdateBinaryName sets the "binary_name" field to the value that was provided on create.
func (*AppPackageUpsertOne) UpdateBinarySize ¶ added in v0.0.4
func (u *AppPackageUpsertOne) UpdateBinarySize() *AppPackageUpsertOne
UpdateBinarySize sets the "binary_size" field to the value that was provided on create.
func (*AppPackageUpsertOne) UpdateCreatedAt ¶ added in v0.0.4
func (u *AppPackageUpsertOne) UpdateCreatedAt() *AppPackageUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AppPackageUpsertOne) UpdateDescription ¶ added in v0.0.4
func (u *AppPackageUpsertOne) UpdateDescription() *AppPackageUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*AppPackageUpsertOne) UpdateInternalID ¶ added in v0.0.4
func (u *AppPackageUpsertOne) UpdateInternalID() *AppPackageUpsertOne
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*AppPackageUpsertOne) UpdateName ¶ added in v0.0.4
func (u *AppPackageUpsertOne) UpdateName() *AppPackageUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*AppPackageUpsertOne) UpdateNewValues ¶ added in v0.0.4
func (u *AppPackageUpsertOne) UpdateNewValues() *AppPackageUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.AppPackage.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AppPackageUpsertOne) UpdateSource ¶ added in v0.0.4
func (u *AppPackageUpsertOne) UpdateSource() *AppPackageUpsertOne
UpdateSource sets the "source" field to the value that was provided on create.
func (*AppPackageUpsertOne) UpdateSourceID ¶ added in v0.0.4
func (u *AppPackageUpsertOne) UpdateSourceID() *AppPackageUpsertOne
UpdateSourceID sets the "source_id" field to the value that was provided on create.
func (*AppPackageUpsertOne) UpdateSourcePackageID ¶ added in v0.0.4
func (u *AppPackageUpsertOne) UpdateSourcePackageID() *AppPackageUpsertOne
UpdateSourcePackageID sets the "source_package_id" field to the value that was provided on create.
func (*AppPackageUpsertOne) UpdateUpdatedAt ¶ added in v0.0.4
func (u *AppPackageUpsertOne) UpdateUpdatedAt() *AppPackageUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type AppPackages ¶ added in v0.0.4
type AppPackages []*AppPackage
AppPackages is a parsable slice of AppPackage.
type AppQuery ¶
type AppQuery struct {
// contains filtered or unexported fields
}
AppQuery is the builder for querying App entities.
func (*AppQuery) Aggregate ¶ added in v0.0.3
func (aq *AppQuery) Aggregate(fns ...AggregateFunc) *AppSelect
Aggregate returns a AppSelect configured with the given aggregations.
func (*AppQuery) Clone ¶
Clone returns a duplicate of the AppQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AppQuery) First ¶
First returns the first App entity from the query. Returns a *NotFoundError when no App was found.
func (*AppQuery) FirstID ¶
FirstID returns the first App ID from the query. Returns a *NotFoundError when no App ID was found.
func (*AppQuery) GroupBy ¶
func (aq *AppQuery) GroupBy(field string, fields ...string) *AppGroupBy
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 { InternalID int64 `json:"internal_id,omitempty"` Count int `json:"count,omitempty"` } client.App.Query(). GroupBy(app.FieldInternalID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AppQuery) Only ¶
Only returns a single App entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one App entity is found. Returns a *NotFoundError when no App entities are found.
func (*AppQuery) OnlyID ¶
OnlyID is like Only, but returns the only App ID in the query. Returns a *NotSingularError when more than one App ID is found. Returns a *NotFoundError when no entities are found.
func (*AppQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { InternalID int64 `json:"internal_id,omitempty"` } client.App.Query(). Select(app.FieldInternalID). Scan(ctx, &v)
type AppSelect ¶
type AppSelect struct { *AppQuery // contains filtered or unexported fields }
AppSelect is the builder for selecting fields of App entities.
func (*AppSelect) Aggregate ¶ added in v0.0.3
func (as *AppSelect) Aggregate(fns ...AggregateFunc) *AppSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AppSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AppSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AppSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AppSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AppSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AppSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AppSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AppUpdate ¶
type AppUpdate struct {
// contains filtered or unexported fields
}
AppUpdate is the builder for updating App entities.
func (*AppUpdate) AddInternalID ¶
AddInternalID adds i to the "internal_id" field.
func (*AppUpdate) Mutation ¶
func (au *AppUpdate) Mutation() *AppMutation
Mutation returns the AppMutation object of the builder.
func (*AppUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*AppUpdate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*AppUpdate) SetDescription ¶
SetDescription sets the "description" field.
func (*AppUpdate) SetDeveloper ¶
SetDeveloper sets the "developer" field.
func (*AppUpdate) SetImageURL ¶
SetImageURL sets the "image_url" field.
func (*AppUpdate) SetInternalID ¶
SetInternalID sets the "internal_id" field.
func (*AppUpdate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AppUpdate) SetPublisher ¶
SetPublisher sets the "publisher" field.
func (*AppUpdate) SetReleaseDate ¶
SetReleaseDate sets the "release_date" field.
func (*AppUpdate) SetShortDescription ¶
SetShortDescription sets the "short_description" field.
func (*AppUpdate) SetSourceAppID ¶
SetSourceAppID sets the "source_app_id" field.
func (*AppUpdate) SetSourceURL ¶
SetSourceURL sets the "source_url" field.
type AppUpdateOne ¶
type AppUpdateOne struct {
// contains filtered or unexported fields
}
AppUpdateOne is the builder for updating a single App entity.
func (*AppUpdateOne) AddInternalID ¶
func (auo *AppUpdateOne) AddInternalID(i int64) *AppUpdateOne
AddInternalID adds i to the "internal_id" field.
func (*AppUpdateOne) Exec ¶
func (auo *AppUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AppUpdateOne) ExecX ¶
func (auo *AppUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppUpdateOne) Mutation ¶
func (auo *AppUpdateOne) Mutation() *AppMutation
Mutation returns the AppMutation object of the builder.
func (*AppUpdateOne) Save ¶
func (auo *AppUpdateOne) Save(ctx context.Context) (*App, error)
Save executes the query and returns the updated App entity.
func (*AppUpdateOne) SaveX ¶
func (auo *AppUpdateOne) SaveX(ctx context.Context) *App
SaveX is like Save, but panics if an error occurs.
func (*AppUpdateOne) Select ¶
func (auo *AppUpdateOne) Select(field string, fields ...string) *AppUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AppUpdateOne) SetCreatedAt ¶
func (auo *AppUpdateOne) SetCreatedAt(t time.Time) *AppUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AppUpdateOne) SetDescription ¶
func (auo *AppUpdateOne) SetDescription(s string) *AppUpdateOne
SetDescription sets the "description" field.
func (*AppUpdateOne) SetDeveloper ¶
func (auo *AppUpdateOne) SetDeveloper(s string) *AppUpdateOne
SetDeveloper sets the "developer" field.
func (*AppUpdateOne) SetImageURL ¶
func (auo *AppUpdateOne) SetImageURL(s string) *AppUpdateOne
SetImageURL sets the "image_url" field.
func (*AppUpdateOne) SetInternalID ¶
func (auo *AppUpdateOne) SetInternalID(i int64) *AppUpdateOne
SetInternalID sets the "internal_id" field.
func (*AppUpdateOne) SetName ¶
func (auo *AppUpdateOne) SetName(s string) *AppUpdateOne
SetName sets the "name" field.
func (*AppUpdateOne) SetNillableCreatedAt ¶
func (auo *AppUpdateOne) SetNillableCreatedAt(t *time.Time) *AppUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AppUpdateOne) SetPublisher ¶
func (auo *AppUpdateOne) SetPublisher(s string) *AppUpdateOne
SetPublisher sets the "publisher" field.
func (*AppUpdateOne) SetReleaseDate ¶
func (auo *AppUpdateOne) SetReleaseDate(s string) *AppUpdateOne
SetReleaseDate sets the "release_date" field.
func (*AppUpdateOne) SetShortDescription ¶
func (auo *AppUpdateOne) SetShortDescription(s string) *AppUpdateOne
SetShortDescription sets the "short_description" field.
func (*AppUpdateOne) SetSource ¶
func (auo *AppUpdateOne) SetSource(a app.Source) *AppUpdateOne
SetSource sets the "source" field.
func (*AppUpdateOne) SetSourceAppID ¶
func (auo *AppUpdateOne) SetSourceAppID(s string) *AppUpdateOne
SetSourceAppID sets the "source_app_id" field.
func (*AppUpdateOne) SetSourceURL ¶
func (auo *AppUpdateOne) SetSourceURL(s string) *AppUpdateOne
SetSourceURL sets the "source_url" field.
func (*AppUpdateOne) SetType ¶
func (auo *AppUpdateOne) SetType(a app.Type) *AppUpdateOne
SetType sets the "type" field.
type AppUpsert ¶ added in v0.0.2
AppUpsert is the "OnConflict" setter.
func (*AppUpsert) AddInternalID ¶ added in v0.0.2
AddInternalID adds v to the "internal_id" field.
func (*AppUpsert) SetCreatedAt ¶ added in v0.0.2
SetCreatedAt sets the "created_at" field.
func (*AppUpsert) SetDescription ¶ added in v0.0.2
SetDescription sets the "description" field.
func (*AppUpsert) SetDeveloper ¶ added in v0.0.2
SetDeveloper sets the "developer" field.
func (*AppUpsert) SetImageURL ¶ added in v0.0.2
SetImageURL sets the "image_url" field.
func (*AppUpsert) SetInternalID ¶ added in v0.0.2
SetInternalID sets the "internal_id" field.
func (*AppUpsert) SetPublisher ¶ added in v0.0.2
SetPublisher sets the "publisher" field.
func (*AppUpsert) SetReleaseDate ¶ added in v0.0.2
SetReleaseDate sets the "release_date" field.
func (*AppUpsert) SetShortDescription ¶ added in v0.0.2
SetShortDescription sets the "short_description" field.
func (*AppUpsert) SetSourceAppID ¶ added in v0.0.2
SetSourceAppID sets the "source_app_id" field.
func (*AppUpsert) SetSourceURL ¶ added in v0.0.2
SetSourceURL sets the "source_url" field.
func (*AppUpsert) UpdateCreatedAt ¶ added in v0.0.2
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AppUpsert) UpdateDescription ¶ added in v0.0.2
UpdateDescription sets the "description" field to the value that was provided on create.
func (*AppUpsert) UpdateDeveloper ¶ added in v0.0.2
UpdateDeveloper sets the "developer" field to the value that was provided on create.
func (*AppUpsert) UpdateImageURL ¶ added in v0.0.2
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (*AppUpsert) UpdateInternalID ¶ added in v0.0.2
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*AppUpsert) UpdateName ¶ added in v0.0.2
UpdateName sets the "name" field to the value that was provided on create.
func (*AppUpsert) UpdatePublisher ¶ added in v0.0.2
UpdatePublisher sets the "publisher" field to the value that was provided on create.
func (*AppUpsert) UpdateReleaseDate ¶ added in v0.0.2
UpdateReleaseDate sets the "release_date" field to the value that was provided on create.
func (*AppUpsert) UpdateShortDescription ¶ added in v0.0.2
UpdateShortDescription sets the "short_description" field to the value that was provided on create.
func (*AppUpsert) UpdateSource ¶ added in v0.0.2
UpdateSource sets the "source" field to the value that was provided on create.
func (*AppUpsert) UpdateSourceAppID ¶ added in v0.0.2
UpdateSourceAppID sets the "source_app_id" field to the value that was provided on create.
func (*AppUpsert) UpdateSourceURL ¶ added in v0.0.2
UpdateSourceURL sets the "source_url" field to the value that was provided on create.
func (*AppUpsert) UpdateType ¶ added in v0.0.2
UpdateType sets the "type" field to the value that was provided on create.
type AppUpsertBulk ¶ added in v0.0.2
type AppUpsertBulk struct {
// contains filtered or unexported fields
}
AppUpsertBulk is the builder for "upsert"-ing a bulk of App nodes.
func (*AppUpsertBulk) AddInternalID ¶ added in v0.0.2
func (u *AppUpsertBulk) AddInternalID(v int64) *AppUpsertBulk
AddInternalID adds v to the "internal_id" field.
func (*AppUpsertBulk) DoNothing ¶ added in v0.0.2
func (u *AppUpsertBulk) DoNothing() *AppUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AppUpsertBulk) Exec ¶ added in v0.0.2
func (u *AppUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AppUpsertBulk) ExecX ¶ added in v0.0.2
func (u *AppUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppUpsertBulk) Ignore ¶ added in v0.0.2
func (u *AppUpsertBulk) Ignore() *AppUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.App.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AppUpsertBulk) SetCreatedAt ¶ added in v0.0.2
func (u *AppUpsertBulk) SetCreatedAt(v time.Time) *AppUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*AppUpsertBulk) SetDescription ¶ added in v0.0.2
func (u *AppUpsertBulk) SetDescription(v string) *AppUpsertBulk
SetDescription sets the "description" field.
func (*AppUpsertBulk) SetDeveloper ¶ added in v0.0.2
func (u *AppUpsertBulk) SetDeveloper(v string) *AppUpsertBulk
SetDeveloper sets the "developer" field.
func (*AppUpsertBulk) SetImageURL ¶ added in v0.0.2
func (u *AppUpsertBulk) SetImageURL(v string) *AppUpsertBulk
SetImageURL sets the "image_url" field.
func (*AppUpsertBulk) SetInternalID ¶ added in v0.0.2
func (u *AppUpsertBulk) SetInternalID(v int64) *AppUpsertBulk
SetInternalID sets the "internal_id" field.
func (*AppUpsertBulk) SetName ¶ added in v0.0.2
func (u *AppUpsertBulk) SetName(v string) *AppUpsertBulk
SetName sets the "name" field.
func (*AppUpsertBulk) SetPublisher ¶ added in v0.0.2
func (u *AppUpsertBulk) SetPublisher(v string) *AppUpsertBulk
SetPublisher sets the "publisher" field.
func (*AppUpsertBulk) SetReleaseDate ¶ added in v0.0.2
func (u *AppUpsertBulk) SetReleaseDate(v string) *AppUpsertBulk
SetReleaseDate sets the "release_date" field.
func (*AppUpsertBulk) SetShortDescription ¶ added in v0.0.2
func (u *AppUpsertBulk) SetShortDescription(v string) *AppUpsertBulk
SetShortDescription sets the "short_description" field.
func (*AppUpsertBulk) SetSource ¶ added in v0.0.2
func (u *AppUpsertBulk) SetSource(v app.Source) *AppUpsertBulk
SetSource sets the "source" field.
func (*AppUpsertBulk) SetSourceAppID ¶ added in v0.0.2
func (u *AppUpsertBulk) SetSourceAppID(v string) *AppUpsertBulk
SetSourceAppID sets the "source_app_id" field.
func (*AppUpsertBulk) SetSourceURL ¶ added in v0.0.2
func (u *AppUpsertBulk) SetSourceURL(v string) *AppUpsertBulk
SetSourceURL sets the "source_url" field.
func (*AppUpsertBulk) SetType ¶ added in v0.0.2
func (u *AppUpsertBulk) SetType(v app.Type) *AppUpsertBulk
SetType sets the "type" field.
func (*AppUpsertBulk) Update ¶ added in v0.0.2
func (u *AppUpsertBulk) Update(set func(*AppUpsert)) *AppUpsertBulk
Update allows overriding fields `UPDATE` values. See the AppCreateBulk.OnConflict documentation for more info.
func (*AppUpsertBulk) UpdateCreatedAt ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateCreatedAt() *AppUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateDescription ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateDescription() *AppUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateDeveloper ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateDeveloper() *AppUpsertBulk
UpdateDeveloper sets the "developer" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateImageURL ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateImageURL() *AppUpsertBulk
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateInternalID ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateInternalID() *AppUpsertBulk
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateName ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateName() *AppUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateNewValues ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateNewValues() *AppUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.App.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AppUpsertBulk) UpdatePublisher ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdatePublisher() *AppUpsertBulk
UpdatePublisher sets the "publisher" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateReleaseDate ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateReleaseDate() *AppUpsertBulk
UpdateReleaseDate sets the "release_date" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateShortDescription ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateShortDescription() *AppUpsertBulk
UpdateShortDescription sets the "short_description" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateSource ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateSource() *AppUpsertBulk
UpdateSource sets the "source" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateSourceAppID ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateSourceAppID() *AppUpsertBulk
UpdateSourceAppID sets the "source_app_id" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateSourceURL ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateSourceURL() *AppUpsertBulk
UpdateSourceURL sets the "source_url" field to the value that was provided on create.
func (*AppUpsertBulk) UpdateType ¶ added in v0.0.2
func (u *AppUpsertBulk) UpdateType() *AppUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
type AppUpsertOne ¶ added in v0.0.2
type AppUpsertOne struct {
// contains filtered or unexported fields
}
AppUpsertOne is the builder for "upsert"-ing
one App node.
func (*AppUpsertOne) AddInternalID ¶ added in v0.0.2
func (u *AppUpsertOne) AddInternalID(v int64) *AppUpsertOne
AddInternalID adds v to the "internal_id" field.
func (*AppUpsertOne) DoNothing ¶ added in v0.0.2
func (u *AppUpsertOne) DoNothing() *AppUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AppUpsertOne) Exec ¶ added in v0.0.2
func (u *AppUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*AppUpsertOne) ExecX ¶ added in v0.0.2
func (u *AppUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AppUpsertOne) ID ¶ added in v0.0.2
func (u *AppUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*AppUpsertOne) IDX ¶ added in v0.0.2
func (u *AppUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*AppUpsertOne) Ignore ¶ added in v0.0.2
func (u *AppUpsertOne) Ignore() *AppUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.App.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AppUpsertOne) SetCreatedAt ¶ added in v0.0.2
func (u *AppUpsertOne) SetCreatedAt(v time.Time) *AppUpsertOne
SetCreatedAt sets the "created_at" field.
func (*AppUpsertOne) SetDescription ¶ added in v0.0.2
func (u *AppUpsertOne) SetDescription(v string) *AppUpsertOne
SetDescription sets the "description" field.
func (*AppUpsertOne) SetDeveloper ¶ added in v0.0.2
func (u *AppUpsertOne) SetDeveloper(v string) *AppUpsertOne
SetDeveloper sets the "developer" field.
func (*AppUpsertOne) SetImageURL ¶ added in v0.0.2
func (u *AppUpsertOne) SetImageURL(v string) *AppUpsertOne
SetImageURL sets the "image_url" field.
func (*AppUpsertOne) SetInternalID ¶ added in v0.0.2
func (u *AppUpsertOne) SetInternalID(v int64) *AppUpsertOne
SetInternalID sets the "internal_id" field.
func (*AppUpsertOne) SetName ¶ added in v0.0.2
func (u *AppUpsertOne) SetName(v string) *AppUpsertOne
SetName sets the "name" field.
func (*AppUpsertOne) SetPublisher ¶ added in v0.0.2
func (u *AppUpsertOne) SetPublisher(v string) *AppUpsertOne
SetPublisher sets the "publisher" field.
func (*AppUpsertOne) SetReleaseDate ¶ added in v0.0.2
func (u *AppUpsertOne) SetReleaseDate(v string) *AppUpsertOne
SetReleaseDate sets the "release_date" field.
func (*AppUpsertOne) SetShortDescription ¶ added in v0.0.2
func (u *AppUpsertOne) SetShortDescription(v string) *AppUpsertOne
SetShortDescription sets the "short_description" field.
func (*AppUpsertOne) SetSource ¶ added in v0.0.2
func (u *AppUpsertOne) SetSource(v app.Source) *AppUpsertOne
SetSource sets the "source" field.
func (*AppUpsertOne) SetSourceAppID ¶ added in v0.0.2
func (u *AppUpsertOne) SetSourceAppID(v string) *AppUpsertOne
SetSourceAppID sets the "source_app_id" field.
func (*AppUpsertOne) SetSourceURL ¶ added in v0.0.2
func (u *AppUpsertOne) SetSourceURL(v string) *AppUpsertOne
SetSourceURL sets the "source_url" field.
func (*AppUpsertOne) SetType ¶ added in v0.0.2
func (u *AppUpsertOne) SetType(v app.Type) *AppUpsertOne
SetType sets the "type" field.
func (*AppUpsertOne) Update ¶ added in v0.0.2
func (u *AppUpsertOne) Update(set func(*AppUpsert)) *AppUpsertOne
Update allows overriding fields `UPDATE` values. See the AppCreate.OnConflict documentation for more info.
func (*AppUpsertOne) UpdateCreatedAt ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateCreatedAt() *AppUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AppUpsertOne) UpdateDescription ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateDescription() *AppUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*AppUpsertOne) UpdateDeveloper ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateDeveloper() *AppUpsertOne
UpdateDeveloper sets the "developer" field to the value that was provided on create.
func (*AppUpsertOne) UpdateImageURL ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateImageURL() *AppUpsertOne
UpdateImageURL sets the "image_url" field to the value that was provided on create.
func (*AppUpsertOne) UpdateInternalID ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateInternalID() *AppUpsertOne
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*AppUpsertOne) UpdateName ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateName() *AppUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*AppUpsertOne) UpdateNewValues ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateNewValues() *AppUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.App.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AppUpsertOne) UpdatePublisher ¶ added in v0.0.2
func (u *AppUpsertOne) UpdatePublisher() *AppUpsertOne
UpdatePublisher sets the "publisher" field to the value that was provided on create.
func (*AppUpsertOne) UpdateReleaseDate ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateReleaseDate() *AppUpsertOne
UpdateReleaseDate sets the "release_date" field to the value that was provided on create.
func (*AppUpsertOne) UpdateShortDescription ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateShortDescription() *AppUpsertOne
UpdateShortDescription sets the "short_description" field to the value that was provided on create.
func (*AppUpsertOne) UpdateSource ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateSource() *AppUpsertOne
UpdateSource sets the "source" field to the value that was provided on create.
func (*AppUpsertOne) UpdateSourceAppID ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateSourceAppID() *AppUpsertOne
UpdateSourceAppID sets the "source_app_id" field to the value that was provided on create.
func (*AppUpsertOne) UpdateSourceURL ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateSourceURL() *AppUpsertOne
UpdateSourceURL sets the "source_url" field to the value that was provided on create.
func (*AppUpsertOne) UpdateType ¶ added in v0.0.2
func (u *AppUpsertOne) UpdateType() *AppUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Account is the client for interacting with the Account builders. Account *AccountClient // App is the client for interacting with the App builders. App *AppClient // AppPackage is the client for interacting with the AppPackage builders. AppPackage *AppPackageClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Account. Query(). Count(ctx)
func (*Client) Intercept ¶ added in v0.0.4
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 ¶ added in v0.0.4
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶ added in v0.0.4
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 QuerierFunc ¶ added in v0.0.4
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶ added in v0.0.4
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 ¶ added in v0.0.4
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Account is the client for interacting with the Account builders. Account *AccountClient // App is the client for interacting with the App builders. App *AppClient // AppPackage is the client for interacting with the AppPackage builders. AppPackage *AppPackageClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // InternalID holds the value of the "internal_id" field. InternalID int64 `json:"internal_id,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // Status holds the value of the "status" field. Status user.Status `json:"status,omitempty"` // Type holds the value of the "type" field. Type user.Type `json:"type,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶ added in v0.0.4
func (c *UserClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶ added in v0.0.4
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶ added in v0.0.2
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetInternalID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetInternalID(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶ added in v0.0.2
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetInternalID ¶
func (uc *UserCreate) SetInternalID(i int64) *UserCreate
SetInternalID sets the "internal_id" field.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetStatus ¶
func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
SetStatus sets the "status" field.
func (*UserCreate) SetType ¶
func (uc *UserCreate) SetType(u user.Type) *UserCreate
SetType sets the "type" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶ added in v0.0.2
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetInternalID(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶ added in v0.0.2
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶ added in v0.0.4
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddInternalID ¶
func (m *UserMutation) AddInternalID(i int64)
AddInternalID adds i to the "internal_id" field.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AddedInternalID ¶
func (m *UserMutation) AddedInternalID() (r int64, exists bool)
AddedInternalID returns the value that was added to the "internal_id" field in this mutation.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) GetType ¶
func (m *UserMutation) GetType() (r user.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) InternalID ¶
func (m *UserMutation) InternalID() (r int64, exists bool)
InternalID returns the value of the "internal_id" field in the mutation.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldInternalID ¶
func (m *UserMutation) OldInternalID(ctx context.Context) (v int64, err error)
OldInternalID returns the old "internal_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldType ¶
OldType returns the old "type" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetInternalID ¶
func (m *UserMutation) ResetInternalID()
ResetInternalID resets all changes to the "internal_id" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetStatus ¶
func (m *UserMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*UserMutation) ResetType ¶
func (m *UserMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetInternalID ¶
func (m *UserMutation) SetInternalID(i int64)
SetInternalID sets the "internal_id" field.
func (*UserMutation) SetOp ¶ added in v0.0.4
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetStatus ¶
func (m *UserMutation) SetStatus(u user.Status)
SetStatus sets the "status" field.
func (*UserMutation) SetType ¶
func (m *UserMutation) SetType(u user.Type)
SetType sets the "type" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*UserMutation) Status ¶
func (m *UserMutation) Status() (r user.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶ added in v0.0.4
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶ added in v0.0.3
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { InternalID int64 `json:"internal_id,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldInternalID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { InternalID int64 `json:"internal_id,omitempty"` } client.User.Query(). Select(user.FieldInternalID). Scan(ctx, &v)
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶ added in v0.0.3
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddInternalID ¶
func (uu *UserUpdate) AddInternalID(i int64) *UserUpdate
AddInternalID adds i to the "internal_id" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetCreatedAt ¶
func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
SetCreatedAt sets the "created_at" field.
func (*UserUpdate) SetInternalID ¶
func (uu *UserUpdate) SetInternalID(i int64) *UserUpdate
SetInternalID sets the "internal_id" field.
func (*UserUpdate) SetNillableCreatedAt ¶
func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetStatus ¶
func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
SetStatus sets the "status" field.
func (*UserUpdate) SetType ¶
func (uu *UserUpdate) SetType(u user.Type) *UserUpdate
SetType sets the "type" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddInternalID ¶
func (uuo *UserUpdateOne) AddInternalID(i int64) *UserUpdateOne
AddInternalID adds i to the "internal_id" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetCreatedAt ¶
func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserUpdateOne) SetInternalID ¶
func (uuo *UserUpdateOne) SetInternalID(i int64) *UserUpdateOne
SetInternalID sets the "internal_id" field.
func (*UserUpdateOne) SetNillableCreatedAt ¶
func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetStatus ¶
func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
SetStatus sets the "status" field.
func (*UserUpdateOne) SetType ¶
func (uuo *UserUpdateOne) SetType(u user.Type) *UserUpdateOne
SetType sets the "type" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
type UserUpsert ¶ added in v0.0.2
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) AddInternalID ¶ added in v0.0.2
func (u *UserUpsert) AddInternalID(v int64) *UserUpsert
AddInternalID adds v to the "internal_id" field.
func (*UserUpsert) SetCreatedAt ¶ added in v0.0.2
func (u *UserUpsert) SetCreatedAt(v time.Time) *UserUpsert
SetCreatedAt sets the "created_at" field.
func (*UserUpsert) SetInternalID ¶ added in v0.0.2
func (u *UserUpsert) SetInternalID(v int64) *UserUpsert
SetInternalID sets the "internal_id" field.
func (*UserUpsert) SetPassword ¶ added in v0.0.2
func (u *UserUpsert) SetPassword(v string) *UserUpsert
SetPassword sets the "password" field.
func (*UserUpsert) SetStatus ¶ added in v0.0.2
func (u *UserUpsert) SetStatus(v user.Status) *UserUpsert
SetStatus sets the "status" field.
func (*UserUpsert) SetType ¶ added in v0.0.2
func (u *UserUpsert) SetType(v user.Type) *UserUpsert
SetType sets the "type" field.
func (*UserUpsert) SetUsername ¶ added in v0.0.2
func (u *UserUpsert) SetUsername(v string) *UserUpsert
SetUsername sets the "username" field.
func (*UserUpsert) UpdateCreatedAt ¶ added in v0.0.2
func (u *UserUpsert) UpdateCreatedAt() *UserUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsert) UpdateInternalID ¶ added in v0.0.2
func (u *UserUpsert) UpdateInternalID() *UserUpsert
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*UserUpsert) UpdatePassword ¶ added in v0.0.2
func (u *UserUpsert) UpdatePassword() *UserUpsert
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsert) UpdateStatus ¶ added in v0.0.2
func (u *UserUpsert) UpdateStatus() *UserUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*UserUpsert) UpdateType ¶ added in v0.0.2
func (u *UserUpsert) UpdateType() *UserUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*UserUpsert) UpdateUsername ¶ added in v0.0.2
func (u *UserUpsert) UpdateUsername() *UserUpsert
UpdateUsername sets the "username" field to the value that was provided on create.
type UserUpsertBulk ¶ added in v0.0.2
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) AddInternalID ¶ added in v0.0.2
func (u *UserUpsertBulk) AddInternalID(v int64) *UserUpsertBulk
AddInternalID adds v to the "internal_id" field.
func (*UserUpsertBulk) DoNothing ¶ added in v0.0.2
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶ added in v0.0.2
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶ added in v0.0.2
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶ added in v0.0.2
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetCreatedAt ¶ added in v0.0.2
func (u *UserUpsertBulk) SetCreatedAt(v time.Time) *UserUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*UserUpsertBulk) SetInternalID ¶ added in v0.0.2
func (u *UserUpsertBulk) SetInternalID(v int64) *UserUpsertBulk
SetInternalID sets the "internal_id" field.
func (*UserUpsertBulk) SetPassword ¶ added in v0.0.2
func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk
SetPassword sets the "password" field.
func (*UserUpsertBulk) SetStatus ¶ added in v0.0.2
func (u *UserUpsertBulk) SetStatus(v user.Status) *UserUpsertBulk
SetStatus sets the "status" field.
func (*UserUpsertBulk) SetType ¶ added in v0.0.2
func (u *UserUpsertBulk) SetType(v user.Type) *UserUpsertBulk
SetType sets the "type" field.
func (*UserUpsertBulk) SetUsername ¶ added in v0.0.2
func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk
SetUsername sets the "username" field.
func (*UserUpsertBulk) Update ¶ added in v0.0.2
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateCreatedAt ¶ added in v0.0.2
func (u *UserUpsertBulk) UpdateCreatedAt() *UserUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateInternalID ¶ added in v0.0.2
func (u *UserUpsertBulk) UpdateInternalID() *UserUpsertBulk
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶ added in v0.0.2
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserUpsertBulk) UpdatePassword ¶ added in v0.0.2
func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateStatus ¶ added in v0.0.2
func (u *UserUpsertBulk) UpdateStatus() *UserUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateType ¶ added in v0.0.2
func (u *UserUpsertBulk) UpdateType() *UserUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUsername ¶ added in v0.0.2
func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk
UpdateUsername sets the "username" field to the value that was provided on create.
type UserUpsertOne ¶ added in v0.0.2
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) AddInternalID ¶ added in v0.0.2
func (u *UserUpsertOne) AddInternalID(v int64) *UserUpsertOne
AddInternalID adds v to the "internal_id" field.
func (*UserUpsertOne) DoNothing ¶ added in v0.0.2
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶ added in v0.0.2
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶ added in v0.0.2
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) ID ¶ added in v0.0.2
func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserUpsertOne) IDX ¶ added in v0.0.2
func (u *UserUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶ added in v0.0.2
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetCreatedAt ¶ added in v0.0.2
func (u *UserUpsertOne) SetCreatedAt(v time.Time) *UserUpsertOne
SetCreatedAt sets the "created_at" field.
func (*UserUpsertOne) SetInternalID ¶ added in v0.0.2
func (u *UserUpsertOne) SetInternalID(v int64) *UserUpsertOne
SetInternalID sets the "internal_id" field.
func (*UserUpsertOne) SetPassword ¶ added in v0.0.2
func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne
SetPassword sets the "password" field.
func (*UserUpsertOne) SetStatus ¶ added in v0.0.2
func (u *UserUpsertOne) SetStatus(v user.Status) *UserUpsertOne
SetStatus sets the "status" field.
func (*UserUpsertOne) SetType ¶ added in v0.0.2
func (u *UserUpsertOne) SetType(v user.Type) *UserUpsertOne
SetType sets the "type" field.
func (*UserUpsertOne) SetUsername ¶ added in v0.0.2
func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne
SetUsername sets the "username" field.
func (*UserUpsertOne) Update ¶ added in v0.0.2
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateCreatedAt ¶ added in v0.0.2
func (u *UserUpsertOne) UpdateCreatedAt() *UserUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateInternalID ¶ added in v0.0.2
func (u *UserUpsertOne) UpdateInternalID() *UserUpsertOne
UpdateInternalID sets the "internal_id" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶ added in v0.0.2
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserUpsertOne) UpdatePassword ¶ added in v0.0.2
func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertOne) UpdateStatus ¶ added in v0.0.2
func (u *UserUpsertOne) UpdateStatus() *UserUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*UserUpsertOne) UpdateType ¶ added in v0.0.2
func (u *UserUpsertOne) UpdateType() *UserUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUsername ¶ added in v0.0.2
func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne
UpdateUsername sets the "username" field to the value that was provided on create.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- account.go
- account_create.go
- account_delete.go
- account_query.go
- account_update.go
- app.go
- app_create.go
- app_delete.go
- app_query.go
- app_update.go
- apppackage.go
- apppackage_create.go
- apppackage_delete.go
- apppackage_query.go
- apppackage_update.go
- client.go
- config.go
- context.go
- ent.go
- generate.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go